V8 Project
v8::internal Namespace Reference

Namespaces

 anonymous_namespace{assert-scope.cc}
 
 anonymous_namespace{ast-value-factory.cc}
 
 anonymous_namespace{builtins.cc}
 
 anonymous_namespace{conversions.cc}
 
 anonymous_namespace{flags.cc}
 
 anonymous_namespace{gc-idle-time-handler-unittest.cc}
 
 anonymous_namespace{heap-snapshot-generator.cc}
 
 anonymous_namespace{i18n.cc}
 
 anonymous_namespace{sampler.cc}
 
 anonymous_namespace{scanner-character-streams.cc}
 
 compiler
 

Classes

class  FrameFunctionIterator
 
class  Accessors
 
class  AllocationSiteContext
 
class  AllocationSiteCreationContext
 
class  AllocationSiteUsageContext
 
class  AllocationTraceNode
 
class  AllocationTraceTree
 
class  AddressToTraceMap
 
class  AllocationTracker
 
class  Malloced
 
class  AllStatic
 
class  FreeStoreAllocationPolicy
 
class  StringTracker
 
class  DeferredHandles
 
class  HandleScopeImplementer
 
class  Testing
 
class  BASE_EMBEDDED
 
class  CustomArgumentsBase
 
class  CustomArguments
 
class  PropertyCallbackArguments
 
class  FunctionCallbackArguments
 
struct  Register
 
struct  SwVfpRegister
 
struct  DwVfpRegister
 
struct  LowDwVfpRegister
 
struct  QwNeonRegister
 
struct  CRegister
 
struct  VmovIndex
 
class  Assembler
 
class  StringHelper
 
class  WriteInt32ToHeapNumberStub
 
class  RecordWriteStub
 
class  DirectCEntryStub
 
class  NameDictionaryLookupStub
 
class  StringCharLoadGenerator
 
class  MathExpGenerator
 
class  Instruction
 
class  Registers
 
class  VFPRegisters
 
class  EntryFrameConstants
 
class  ExitFrameConstants
 
class  JavaScriptFrameConstants
 
class  ArgumentsAdaptorFrameConstants
 
class  ConstructFrameConstants
 
class  InternalFrameConstants
 
class  PlatformInterfaceDescriptor
 
class  LInstruction
 
class  LTemplateResultInstruction
 
class  LTemplateInstruction
 
class  LGap
 
class  FINAL
 Source to read snapshot and builtins files from. More...
 
class  LControlInstruction
 
class  LStoreFrameContext
 
class  LAllocateBlockContext
 
class  LCodeGen
 
class  LDeferredCode
 
class  MacroAssembler
 
class  CodePatcher
 
class  FrameAndConstantPoolScope
 
class  ConstantPoolUnavailableScope
 
class  RegExpMacroAssemblerARM
 
class  SimulatorStack
 
struct  ImmediateInitializer
 
struct  ImmediateInitializer< Smi * >
 
struct  ImmediateInitializer< ExternalReference >
 
struct  CPURegister
 
struct  FPRegister
 
class  CPURegList
 
class  Immediate
 
class  Operand
 
class  MemOperand
 
class  ConstPool
 
class  PatchingAssembler
 
class  StoreRegistersStateStub
 
class  RestoreRegistersStateStub
 
class  DecoderVisitor
 
class  DispatchingDecoderVisitor
 
class  Decoder
 
class  Disassembler
 
class  PrintDisassembler
 
class  InstructionSequence
 
struct  CounterDescriptor
 
class  Counter
 
class  Instrument
 
class  LLoadKeyed
 
class  LLoadKeyedExternal
 
class  LLoadKeyedFixed
 
class  LLoadKeyedFixedDouble
 
class  LUnaryMathOperation
 
class  LMathAbsTagged
 
class  LStoreKeyed
 
class  LSubS
 
class  BranchOnCondition
 
class  CompareAndBranch
 
class  TestAndBranch
 
class  BranchIfNonZeroNumber
 
class  BranchIfHeapNumber
 
class  BranchIfRoot
 
class  DelayedGapMasm
 
class  UseScratchRegisterScope
 
class  InlineSmiCheckInfo
 
class  RegExpMacroAssemblerARM64
 
class  AssemblerBase
 
class  PredictableCodeSizeScope
 
class  CpuFeatures
 
class  RelocInfo
 
class  RelocIterator
 
struct  PositionState
 
class  CallWrapper
 
class  NullCallWrapper
 
class  PerThreadAssertScope
 
class  PerIsolateAssertScope
 
class  PerThreadAssertScopeDebugOnly
 
class  PerIsolateAssertScopeDebugOnly
 
class  AstRawStringInternalizationKey
 
class  AstString
 
class  AstRawString
 
class  AstConsString
 
class  AstValue
 
class  AstValueFactory
 
class  AstNodeFactory
 
class  AstNode
 
class  Statement
 
class  Expression
 
class  BreakableStatement
 
class  Declaration
 
class  Module
 
class  IterationStatement
 
class  ForEachStatement
 
class  JumpStatement
 
class  TryStatement
 
class  MaterializedLiteral
 
class  RegExpTree
 
struct  StreamedSource
 
class  BackgroundParsingTask
 
class  BasicBlockProfiler
 
class  Bignum
 
class  NoTrackDoubleFieldsForSerializerScope
 
struct  BuiltinDesc
 
class  BuiltinFunctionTable
 
class  Builtins
 
struct  CachedPower
 
class  PowersOfTenCache
 
struct  IdentifierStart
 
struct  IdentifierPart
 
struct  WhiteSpace
 
struct  WhiteSpaceOrLineTerminator
 
class  SamplingCircularQueue
 
class  CodeStubGraphBuilderBase
 
class  CodeStubGraphBuilder
 
class  CodeStubGraphBuilder< KeyedLoadGenericStub >
 
class  SimpleListPrinter
 
class  PlatformCodeStub
 
class  CodeStubDescriptor
 
class  HydrogenCodeStub
 
class  RuntimeCallHelper
 
class  StubRuntimeCallHelper
 
class  NopRuntimeCallHelper
 
class  ToNumberStub
 
class  FastNewClosureStub
 
class  FastCloneShallowArrayStub
 
class  FastCloneShallowObjectStub
 
class  CreateAllocationSiteStub
 
class  InstanceofStub
 
class  ArrayConstructorStub
 
class  InternalArrayConstructorStub
 
class  MathPowStub
 
class  CallICStub
 
class  CallIC_ArrayStub
 
class  FunctionPrototypeStub
 
class  LoadIndexedInterceptorStub
 
class  HandlerStub
 
class  LoadFieldStub
 
class  KeyedLoadSloppyArgumentsStub
 
class  LoadConstantStub
 
class  StringLengthStub
 
class  StoreFieldStub
 
class  StoreGlobalStub
 
class  CallApiFunctionStub
 
class  CallApiGetterStub
 
class  BinaryOpICStub
 
class  CompareICStub
 
class  CompareNilICStub
 
class  CEntryStub
 
class  JSEntryStub
 
class  ArgumentsAccessStub
 
class  RegExpExecStub
 
class  CallFunctionStub
 
class  CallConstructStub
 
class  StringCharCodeAtGenerator
 
class  StringCharFromCodeGenerator
 
class  StringCharAtGenerator
 
class  LoadDictionaryElementStub
 
class  KeyedLoadGenericStub
 
class  LoadICTrampolineStub
 
class  KeyedLoadICTrampolineStub
 
class  MegamorphicLoadStub
 
class  VectorLoadStub
 
class  VectorKeyedLoadStub
 
class  DoubleToIStub
 
class  LoadFastElementStub
 
class  StoreFastElementStub
 
class  TransitionElementsKindStub
 
class  ArrayConstructorStubBase
 
class  ArrayNoArgumentConstructorStub
 
class  ArraySingleArgumentConstructorStub
 
class  ArrayNArgumentsConstructorStub
 
class  InternalArrayConstructorStubBase
 
class  InternalArrayNoArgumentConstructorStub
 
class  InternalArraySingleArgumentConstructorStub
 
class  InternalArrayNArgumentsConstructorStub
 
class  StoreElementStub
 
class  ToBooleanStub
 
class  ElementsTransitionAndStoreStub
 
class  StoreArrayLiteralElementStub
 
class  StubFailureTrampolineStub
 
class  ProfileEntryHookStub
 
class  StoreBufferOverflowStub
 
class  SubStringStub
 
class  StringCompareStub
 
class  CodeGenerator
 
class  ElementsTransitionGenerator
 
class  CodeAgingHelper
 
class  CompilationSubCache
 
class  CompilationCacheScript
 
class  CompilationCacheEval
 
class  CompilationCacheRegExp
 
class  CompilationCache
 
class  Unique
 
class  TypeImpl
 
class  HOptimizedGraphBuilderWithPositions
 
struct  OffsetRange
 
class  ScriptData
 
class  CompilationInfo
 
class  CompilationInfoWithZone
 
class  OptimizedCompileJob
 
class  Compiler
 
class  Context
 
class  StatsTable
 
class  StatsCounter
 
class  Histogram
 
class  HistogramTimer
 
class  Counters
 
class  CodeEventRecord
 
class  CodeCreateEventRecord
 
class  CodeMoveEventRecord
 
class  CodeDisableOptEventRecord
 
class  SharedFunctionInfoMoveEventRecord
 
class  ReportBuiltinEventRecord
 
class  TickSampleEventRecord
 
class  CodeEventsContainer
 
class  ProfilerEventsProcessor
 
class  CpuProfiler
 
class  BitVector
 
class  DateCache
 
class  DateParser
 
class  ActiveFunctionsCollector
 
class  ActiveFunctionsRedirector
 
class  BreakLocationIterator
 
class  ScriptCache
 
class  DebugInfoListNode
 
class  MessageImpl
 
class  EventDetailsImpl
 
class  CommandMessage
 
class  Debug
 
class  DebugCodegen
 
class  Deoptimizer
 
class  FrameDescription
 
class  DeoptimizerData
 
class  MaterializedObjectStore
 
class  DeoptimizedFrameInfo
 
class  DiyFp
 
class  Double
 
struct  Effect
 
class  EffectsMixin
 
class  Effects
 
class  NestedEffectsBase
 
class  EffectsBase
 
class  NestedEffects
 
struct  InitializeFastElementsKindSequence
 
class  ElementsKindTraits
 
class  ElementsAccessorBase
 
class  FastElementsAccessor
 
class  FastSmiOrObjectElementsAccessor
 
class  FastPackedSmiElementsAccessor
 
class  FastHoleySmiElementsAccessor
 
class  FastPackedObjectElementsAccessor
 
class  FastHoleyObjectElementsAccessor
 
class  FastDoubleElementsAccessor
 
class  FastPackedDoubleElementsAccessor
 
class  FastHoleyDoubleElementsAccessor
 
class  TypedElementsAccessor
 
class  DictionaryElementsAccessor
 
class  SloppyArgumentsElementsAccessor
 
class  ElementsAccessor
 
class  SimpleStringResource
 
class  ExternalizeStringExtension
 
class  FreeBufferExtension
 
class  GCExtension
 
class  StatisticsExtension
 
class  TriggerFailureExtension
 
class  FeedbackSlotInterface
 
class  UInt128
 
class  FlagList
 
struct  JSCallerSavedCodeData
 
class  InnerPointerToCodeCache
 
class  StackHandlerConstants
 
class  StandardFrameConstants
 
class  EntryFrame
 
class  EntryConstructFrame
 
class  ExitFrame
 
class  StandardFrame
 
class  JavaScriptFrame
 
class  StubFrame
 
class  OptimizedFrame
 
class  ArgumentsAdaptorFrame
 
class  InternalFrame
 
class  StubFailureTrampolineFrame
 
class  ConstructFrame
 
class  StackFrameIterator
 
class  StackTraceFrameIterator
 
class  SafeStackFrameIterator
 
class  BreakableStatementChecker
 
class  FullCodeGenerator
 
class  AccessorTable
 
class  BackEdgeTable
 
class  FuncNameInferrer
 
struct  ObjectGroup
 
struct  ImplicitRefGroup
 
struct  ObjectGroupConnection
 
struct  ObjectGroupRetainerInfo
 
class  GlobalHandles
 
class  EternalHandles
 
class  List
 
class  MaybeHandle
 
class  Handle
 
class  SplayTree
 
struct  CodeDesc
 
union  DoubleRepresentation
 
union  IeeeDoubleLittleEndianArchType
 
union  IeeeDoubleBigEndianArchType
 
struct  AccessorDescriptor
 
class  HandleScope
 
class  DeferredHandleScope
 
struct  HandleScopeData
 
class  TemplateHashMapImpl
 
class  TemplateHashMap
 
class  GCIdleTimeAction
 
class  GCIdleTimeHandler
 
class  RingBuffer
 
class  GCTracer
 
class  ScavengeVisitor
 
class  ScavengeWeakObjectRetainer
 
class  NewSpaceScavenger
 
class  ScavengingVisitor
 
class  HeapObjectsFilter
 
class  UnreachableObjectsFilter
 
class  StoreBufferRebuilder
 
class  PromotionQueue
 
class  ExternalStringTable
 
class  Heap
 
class  HeapStats
 
class  AlwaysAllocateScope
 
class  GCCallbacksScope
 
class  VerifyPointersVisitor
 
class  VerifySmisVisitor
 
class  SpaceIterator
 
class  KeyedLookupCache
 
class  DescriptorLookupCache
 
class  RegExpResultsCache
 
class  WeakObjectRetainer
 
class  IntrusiveMarking
 
class  IncrementalMarkingMarkingVisitor
 
class  IncrementalMarkingRootMarkingVisitor
 
class  IncrementalMarking
 
class  MarkCompactMarkingVisitor
 
class  CodeMarkingVisitor
 
class  SharedFunctionInfoMarkingVisitor
 
class  RootMarkingVisitor
 
class  StringTableCleaner
 
class  MarkCompactWeakObjectRetainer
 
class  PointersUpdatingVisitor
 
class  EvacuationWeakObjectRetainer
 
class  Marking
 
class  MarkingDeque
 
class  SlotsBufferAllocator
 
class  SlotsBuffer
 
class  CodeFlusher
 
class  MarkCompactCollector
 
struct  WeakListVisitor
 
struct  WeakListVisitor< JSFunction >
 
struct  WeakListVisitor< Code >
 
struct  WeakListVisitor< Context >
 
struct  WeakListVisitor< JSArrayBufferView >
 
struct  WeakListVisitor< JSArrayBuffer >
 
struct  WeakListVisitor< AllocationSite >
 
class  StaticVisitorBase
 
class  VisitorDispatchTable
 
class  BodyVisitorBase
 
class  FlexibleBodyVisitor
 
class  FixedBodyVisitor
 
class  StaticNewSpaceVisitor
 
class  StaticMarkingVisitor
 
class  MarkBit
 
class  Bitmap
 
class  MemoryChunk
 
class  Page
 
class  LargePage
 
class  Space
 
class  CodeRange
 
class  SkipList
 
class  MemoryAllocator
 
class  ObjectIterator
 
class  HeapObjectIterator
 
class  AllocationInfo
 
class  FreeListNode
 
class  FreeListCategory
 
class  FreeList
 
class  AllocationResult
 
class  PagedSpace
 
class  HistogramInfo
 
class  NewSpacePage
 
class  SemiSpace
 
class  SemiSpaceIterator
 
class  NewSpace
 
class  OldSpace
 
class  MapSpace
 
class  CellSpace
 
class  PropertyCellSpace
 
class  LargeObjectSpace
 
class  LargeObjectIterator
 
class  StoreBuffer
 
class  StoreBufferRebuildScope
 
class  DontMoveStoreBufferEntriesScope
 
class  SweeperThread
 
class  HeapProfiler
 
class  FindEntryById
 
class  SnapshotFiller
 
class  IndexedReferencesExtractor
 
class  JSArrayBufferDataEntryAllocator
 
class  RootsReferencesExtractor
 
class  GlobalObjectsEnumerator
 
class  GlobalHandlesExtractor
 
class  BasicHeapEntriesAllocator
 
class  NativeGroupRetainedObjectInfo
 
struct  MaxDecimalDigitsIn
 
struct  MaxDecimalDigitsIn< 4 >
 
struct  MaxDecimalDigitsIn< 8 >
 
class  OutputStreamWriter
 
class  HeapSnapshot
 
class  HeapObjectsMap
 
class  HeapEntriesAllocator
 
class  HeapEntriesMap
 
class  HeapObjectsSet
 
class  SnapshottingProgressReportingInterface
 
class  V8HeapExplorer
 
class  NativeObjectsExplorer
 
class  HeapSnapshotGenerator
 
class  HeapSnapshotJSONSerializer
 
class  HAliasAnalyzer
 
class  BoundsCheckKey
 
class  BoundsCheckBbData
 
class  HBoundsCheckEliminationState
 
class  BoundsCheckTable
 
class  HBoundsCheckEliminationPhase
 
class  HBoundsCheckHoistingPhase
 
class  HCanonicalizePhase
 
struct  HCheckTableEntry
 
class  HCheckTable
 
class  HCheckMapsEffects
 
class  HCheckEliminationPhase
 
class  HDeadCodeEliminationPhase
 
class  HDehoistIndexComputationsPhase
 
class  HEnvironmentLivenessAnalysisPhase
 
class  HEscapeAnalysisPhase
 
class  NoEffects
 
class  NoState
 
class  HFlowEngine
 
class  GvnBasicBlockState
 
struct  TrackedEffects
 
class  HInferRepresentationPhase
 
class  HInferTypesPhase
 
class  HUseListNode
 
class  HSourcePosition
 
class  HValue
 
struct  NameOf
 
struct  TypeOf
 
struct  ChangesOf
 
class  HPositionInfo
 
class  HInstruction
 
class  HTemplateInstruction
 
class  HControlInstruction
 
class  HTemplateControlInstruction
 
class  HUnaryControlInstruction
 
class  HUnaryOperation
 
class  HCall
 
class  HUnaryCall
 
class  HBinaryCall
 
struct  InductionVariableLimitUpdate
 
class  HDematerializedObject
 
class  HBinaryOperation
 
class  HBitwiseBinaryOperation
 
class  HArithmeticBinaryOperation
 
class  HCompareNumericAndBranch
 
class  HCompareObjectEqAndBranch
 
class  HStringCompareAndBranch
 
class  HIsConstructCallAndBranch
 
class  ArrayInstructionInterface
 
class  HMaterializedLiteral
 
class  HStoreFrameContext
 
class  HAllocateBlockContext
 
class  HFieldApproximation
 
class  HLoadEliminationTable
 
class  HLoadEliminationEffects
 
class  HLoadEliminationPhase
 
class  HMarkDeoptimizeOnUndefinedPhase
 
class  HComputeChangeUndefinedToNaN
 
class  HMarkUnreachableBlocksPhase
 
class  HOsrBuilder
 
class  Pending
 
class  HRangeAnalysisPhase
 
class  HRedundantPhiEliminationPhase
 
class  State
 
class  HMergeRemovableSimulatesPhase
 
class  HRepresentationChangesPhase
 
class  HStackCheckEliminationPhase
 
class  HStoreEliminationPhase
 
class  HUint32AnalysisPhase
 
class  PostorderProcessor
 
class  FunctionSorter
 
class  AstContext
 
class  HGraphBuilder
 
class  HOptimizedGraphBuilder
 
class  HPhase
 
class  I18N
 
class  DateFormat
 
class  NumberFormat
 
class  Collator
 
class  BreakIterator
 
struct  XMMRegister
 
class  RegExpMacroAssemblerIA32
 
class  PropertyHandlerCompiler
 
class  NamedLoadHandlerCompiler
 
class  NamedStoreHandlerCompiler
 
class  ElementHandlerCompiler
 
class  PropertyICCompiler
 
class  ICUtility
 
class  CompareICState
 
class  IC
 
class  IC_Utility
 
class  CallIC
 
class  LoadIC
 
class  KeyedLoadIC
 
class  StoreIC
 
class  KeyedStoreIC
 
class  BinaryOpIC
 
class  CompareIC
 
class  CompareNilIC
 
class  ToBooleanIC
 
class  SCTableReference
 
class  StubCache
 
class  CallInterfaceDescriptorData
 
class  CallDescriptors
 
class  CallInterfaceDescriptor
 
class  LoadDescriptor
 
class  StoreDescriptor
 
class  ElementTransitionAndStoreDescriptor
 
class  InstanceofDescriptor
 
class  VectorLoadICTrampolineDescriptor
 
class  VectorLoadICDescriptor
 
class  FastNewClosureDescriptor
 
class  FastNewContextDescriptor
 
class  ToNumberDescriptor
 
class  NumberToStringDescriptor
 
class  FastCloneShallowArrayDescriptor
 
class  FastCloneShallowObjectDescriptor
 
class  CreateAllocationSiteDescriptor
 
class  CallFunctionDescriptor
 
class  CallFunctionWithFeedbackDescriptor
 
class  CallConstructDescriptor
 
class  RegExpConstructResultDescriptor
 
class  TransitionElementsKindDescriptor
 
class  ArrayConstructorConstantArgCountDescriptor
 
class  ArrayConstructorDescriptor
 
class  InternalArrayConstructorConstantArgCountDescriptor
 
class  InternalArrayConstructorDescriptor
 
class  CompareNilDescriptor
 
class  ToBooleanDescriptor
 
class  BinaryOpDescriptor
 
class  BinaryOpWithAllocationSiteDescriptor
 
class  StringAddDescriptor
 
class  KeyedDescriptor
 
class  NamedDescriptor
 
class  CallHandlerDescriptor
 
class  ArgumentAdaptorDescriptor
 
class  ApiFunctionDescriptor
 
class  ApiGetterDescriptor
 
class  ArgumentsAccessReadDescriptor
 
class  StoreArrayLiteralElementDescriptor
 
class  MathPowTaggedDescriptor
 
class  MathPowIntegerDescriptor
 
class  ContextOnlyDescriptor
 
class  Interface
 
class  BacktrackStack
 
class  IrregexpInterpreter
 
class  VMState
 
class  ThreadId
 
class  Isolate
 
class  PromiseOnStack
 
class  FrequencyCollator
 
class  RegExpCompiler
 
class  RecursionCheck
 
class  VisitMarker
 
class  AlternativeGeneration
 
class  AlternativeGenerationList
 
class  RegExpExpansionLimiter
 
class  CharacterRangeSplitter
 
class  AddDispatchRange
 
class  RegExpImpl
 
class  CharacterRange
 
class  OutSet
 
class  DispatchTable
 
struct  NodeInfo
 
class  QuickCheckDetails
 
class  RegExpNode
 
class  Interval
 
class  SeqRegExpNode
 
class  ActionNode
 
class  TextNode
 
class  AssertionNode
 
class  BackReferenceNode
 
class  EndNode
 
class  NegativeSubmatchSuccess
 
class  Guard
 
class  GuardedAlternative
 
class  ChoiceNode
 
class  NegativeLookaheadChoiceNode
 
class  LoopChoiceNode
 
class  BoyerMoorePositionInfo
 
class  BoyerMooreLookahead
 
class  Trace
 
class  GreedyLoopState
 
struct  PreloadState
 
class  NodeVisitor
 
class  DispatchTableConstructor
 
class  Analysis
 
struct  RegExpCompileData
 
class  RegExpEngine
 
class  ElementCmp
 
class  Vector
 
class  LifetimePosition
 
class  UseInterval
 
class  UsePosition
 
class  LiveRange
 
class  LAllocatorPhase
 
class  LOperand
 
class  LUnallocated
 
class  LChunk
 
class  LPhase
 
class  Differencer
 
class  SubrangableInput
 
class  SubrangableOutput
 
class  CompareOutputArrayWriter
 
class  TokensCompareInput
 
class  TokensCompareOutput
 
class  LineEndsWrapper
 
class  LineArrayCompareInput
 
class  TokenizingLineArrayCompareOutput
 
class  FunctionInfoListener
 
class  ReplacingVisitor
 
class  LiteralFixer
 
class  DependentFunctionMarker
 
class  RelocInfoBuffer
 
class  MultipleFunctionTarget
 
class  InactiveThreadActivationsChecker
 
class  SingleFrameTarget
 
class  LiveEditFunctionTracker
 
class  LiveEdit
 
class  Comparator
 
class  JSArrayBasedStruct
 
class  FunctionInfoWrapper
 
class  SharedInfoWrapper
 
class  Log
 
class  PerfBasicLogger
 
class  LowLevelLogger
 
class  JitLogger
 
class  Profiler
 
class  Ticker
 
class  EnumerateOptimizedFunctionsVisitor
 
class  Logger
 
class  TimerEventScope
 
class  CodeEventListener
 
class  CodeEventLogger
 
class  FrameScope
 
class  AllowExternalCallThatCantCauseGC
 
class  NoCurrentFrameScope
 
class  Comment
 
class  AllocationUtils
 
class  MessageLocation
 
class  MessageHandler
 
struct  FPURegister
 
struct  FPUControlRegister
 
class  FPURegisters
 
class  RegExpMacroAssemblerMIPS
 
class  NativesStore
 NativesStore stores the 'native' (builtin) JS libraries. More...
 
class  NativesHolder
 
class  NativesCollection
 
class  SequentialStringKey
 
class  OneByteStringKey
 
class  SeqOneByteSubStringKey
 
class  TwoByteStringKey
 
class  Utf8StringKey
 
struct  DescriptorArrayAppender
 
struct  FixedArrayAppender
 
class  JSObjectWalkVisitor
 
class  IntrusiveMapTransitionIterator
 
class  IntrusivePrototypeTransitionIterator
 
class  TraversableMap
 
class  CodeCacheHashTableKey
 
class  PolymorphicCodeCacheHashTableKey
 
class  RawStringComparator
 
class  RawStringComparator< uint16_t, uint16_t >
 
class  RawStringComparator< uint8_t, uint8_t >
 
class  StringComparator
 
class  StringSharedKey
 
class  RegExpKey
 
class  InternalizedStringKey
 
class  TwoCharHashTableKey
 
class  StringsKey
 
struct  EnumIndexComparator
 
class  Object
 
struct  Brief
 
class  Smi
 
class  HeapObject
 
class  FixedBodyDescriptor
 
class  FlexibleBodyDescriptor
 
class  HeapNumber
 
class  JSReceiver
 
class  JSObject
 
class  FixedArrayBase
 
class  FixedArray
 
class  FixedDoubleArray
 
class  ConstantPoolArray
 
class  DescriptorArray
 
class  BaseShape
 
class  HashTable
 
class  HashTableKey
 
class  StringTableShape
 
class  StringTable
 
class  MapCacheShape
 
class  MapCache
 
class  Dictionary
 
class  NameDictionaryShape
 
class  NameDictionary
 
class  NumberDictionaryShape
 
class  SeededNumberDictionaryShape
 
class  UnseededNumberDictionaryShape
 
class  SeededNumberDictionary
 
class  UnseededNumberDictionary
 
class  ObjectHashTableShape
 
class  ObjectHashTable
 
class  OrderedHashTable
 
class  OrderedHashSet
 
class  OrderedHashMap
 
class  WeakHashTableShape
 
class  WeakHashTable
 
class  JSFunctionResultCache
 
class  ScopeInfo
 
class  NormalizedMapCache
 
class  ByteArray
 
class  FreeSpace
 
class  ExternalArray
 
class  ExternalUint8ClampedArray
 
class  ExternalInt8Array
 
class  ExternalUint8Array
 
class  ExternalInt16Array
 
class  ExternalUint16Array
 
class  ExternalInt32Array
 
class  ExternalUint32Array
 
class  ExternalFloat32Array
 
class  ExternalFloat64Array
 
class  FixedTypedArrayBase
 
class  FixedTypedArray
 
class  DeoptimizationInputData
 
class  DeoptimizationOutputData
 
class  Code
 
class  DependentCode
 
class  Map
 
class  Struct
 
class  Box
 
class  Script
 
class  SharedFunctionInfo
 
struct  SourceCodeOf
 
class  JSGeneratorObject
 
class  JSModule
 
class  JSFunction
 
class  JSGlobalProxy
 
class  GlobalObject
 
class  JSGlobalObject
 
class  JSBuiltinsObject
 
class  JSValue
 
class  JSDate
 
class  JSMessageObject
 
class  JSRegExp
 
class  CompilationCacheShape
 
class  CompilationCacheTable
 
class  CodeCache
 
class  CodeCacheHashTableShape
 
class  CodeCacheHashTable
 
class  PolymorphicCodeCache
 
class  PolymorphicCodeCacheHashTable
 
class  TypeFeedbackInfo
 
class  AllocationSite
 
class  AllocationMemento
 
class  AliasedArgumentsEntry
 
class  StringHasher
 
class  IteratingStringHasher
 
class  Name
 
class  Symbol
 
class  String
 
class  SeqString
 
class  SeqOneByteString
 
class  SeqTwoByteString
 
class  ConsString
 
class  SlicedString
 
class  ExternalString
 
class  ExternalOneByteString
 
class  ExternalTwoByteString
 
class  FlatStringReader
 
class  ConsStringNullOp
 
class  ConsStringIteratorOp
 
class  StringCharacterStream
 
class  VectorIterator
 
class  Oddball
 
class  Cell
 
class  PropertyCell
 
class  JSProxy
 
class  JSFunctionProxy
 
class  JSCollection
 
class  JSSet
 
class  JSMap
 
class  OrderedHashTableIterator
 
class  JSSetIterator
 
class  JSMapIterator
 
class  JSWeakCollection
 
class  JSWeakMap
 
class  JSWeakSet
 
class  JSArrayBuffer
 
class  JSArrayBufferView
 
class  JSTypedArray
 
class  JSDataView
 
class  Foreign
 
class  JSArray
 
class  JSRegExpResult
 
class  AccessorInfo
 
struct  BitmaskCompareDescriptor
 
struct  PointerCompareDescriptor
 
struct  PrimitiveValueDescriptor
 
struct  ObjectDerefenceDescriptor
 
struct  PointerShiftDescriptor
 
struct  DeclaredAccessorDescriptorData
 
class  DeclaredAccessorDescriptorIterator
 
class  DeclaredAccessorDescriptor
 
class  DeclaredAccessorInfo
 
class  ExecutableAccessorInfo
 
class  AccessorPair
 
class  AccessCheckInfo
 
class  InterceptorInfo
 
class  CallHandlerInfo
 
class  TemplateInfo
 
class  FunctionTemplateInfo
 
class  ObjectTemplateInfo
 
class  SignatureInfo
 
class  TypeSwitchInfo
 
class  DebugInfo
 
class  BreakPointInfo
 
class  VisitorSynchronization
 
class  StructBodyDescriptor
 
class  BooleanBit
 
class  OptimizingCompilerThread
 
class  OStream
 
class  OStringStream
 
class  OFStream
 
struct  AsUC16
 
struct  AsReversiblyEscapedUC16
 
class  ZoneListWrapper
 
class  ParseData
 
class  BufferedZoneList
 
class  RegExpBuilder
 
class  ParserTraits
 
class  Parser
 
class  CompileTimeValue
 
class  PerfJitLogger
 
struct  PreparseDataConstants
 
class  ParserRecorder
 
class  SingletonLogger
 
class  CompleteParserRecorder
 
class  ParserBase
 
class  PreParserIdentifier
 
class  PreParserExpression
 
class  PreParserExpressionList
 
class  PreParserStatement
 
class  PreParserStatementList
 
class  PreParserScope
 
class  PreParserFactory
 
class  PreParserTraits
 
class  PreParser
 
class  DeleteNodesCallback
 
struct  NodesPair
 
class  Position
 
class  StringsStorage
 
class  CodeEntry
 
class  ProfileNode
 
class  ProfileTree
 
class  CpuProfile
 
class  CodeMap
 
class  CpuProfilesCollection
 
class  ProfileGenerator
 
class  Representation
 
class  PrototypeIterator
 A class to uniformly access the prototype of any Object and walk its prototype chain. More...
 
class  PrintablePrinter
 
class  RegExpMacroAssemblerTracer
 
struct  DisjunctDecisionRow
 
class  RegExpMacroAssembler
 
class  NativeRegExpMacroAssembler
 
class  RegExpStackScope
 
class  RegExpStack
 
class  Processor
 
class  Rewriter
 
class  ActivationsFinder
 
class  CompiledReplacement
 
class  URIUnescape
 
class  URIEscape
 
class  ArrayConcatVisitor
 A simple visitor visits every element of Array's. More...
 
class  FrameInspector
 
class  ScopeIterator
 
class  RuntimeState
 
class  Runtime
 
class  AllocateDoubleAlignFlag
 
class  AllocateTargetSpace
 
class  DeclareGlobalsEvalFlag
 
class  DeclareGlobalsNativeFlag
 
class  DeclareGlobalsStrictMode
 
class  FixedArrayBuilder
 
class  ReplacementStringBuilder
 
class  RuntimeProfiler
 
class  SamplerThread
 
struct  RegisterState
 
struct  TickSample
 
class  Sampler
 
class  BufferedUtf16CharacterStream
 
class  GenericStringUtf16CharacterStream
 
class  Utf8ToUtf16CharacterStream
 
class  ExternalStreamingStream
 
class  ExternalTwoByteStringUtf16CharacterStream
 
class  Utf16CharacterStream
 
class  UnicodeCache
 
class  DuplicateFinder
 
class  LiteralBuffer
 
class  Scanner
 
class  ContextSlotCache
 
class  ModuleInfo
 
class  VarAndOrder
 
class  VariableMap
 
class  DynamicScopePart
 
class  Scope
 
class  CodeAddressMap
 
class  StringTableInsertionKey
 
class  ExternalReferenceTable
 
class  ExternalReferenceEncoder
 
class  ExternalReferenceDecoder
 
class  SerializerDeserializer
 
class  Deserializer
 
class  SerializationAddressMapper
 
class  Serializer
 
class  PartialSerializer
 
class  StartupSerializer
 
class  CodeSerializer
 
class  SerializedCodeData
 
class  SmallPointerList
 
class  SmartPointerBase
 
struct  ArrayDeallocator
 
class  SmartArrayPointer
 
struct  ObjectDeallocator
 
class  SmartPointer
 
struct  SnapshotImpl
 
class  SnapshotByteSink
 Sink to write snapshot files to. More...
 
class  DummySnapshotSink
 
class  DebugSnapshotSink
 
class  ListSnapshotSink
 
class  Snapshot
 
class  StringSearchBase
 
class  StringSearch
 
class  StringAllocator
 
class  TestWithIsolate
 
class  TestWithZone
 
class  Token
 
class  TransitionArray
 
class  TypeFeedbackVector
 
class  TypeFeedbackOracle
 
struct  TypeImplIteratorAux
 
struct  TypeImplIteratorAux< Config, i::Map >
 
struct  TypeImplIteratorAux< Config, i::Object >
 
struct  ZoneTypeConfig
 
struct  HeapTypeConfig
 
struct  BoundsImpl
 
class  AstTyper
 
class  UniqueSet
 
struct  make_unsigned
 
struct  make_unsigned< int32_t >
 
struct  make_unsigned< int64_t >
 
class  BitFieldBase
 
class  BitField
 
class  BitField64
 
class  StaticResource
 
class  Access
 
class  SetOncePointer
 
class  EmbeddedVector
 
class  Collector
 
class  SequenceCollector
 
class  EmbeddedContainer
 
class  EmbeddedContainer< ElementType, 0 >
 
class  SimpleStringBuilder
 
class  EnumSet
 
class  TypeFeedbackId
 
class  BailoutId
 
class  ContainerPointerWrapper
 
class  StringBuilder
 
class  V8
 
class  Memory
 
class  ThreadState
 
class  ThreadVisitor
 
class  ThreadManager
 
class  Variable
 
class  ScopedVector
 
class  Version
 
class  SmiOperationExecutionMode
 
struct  SmiIndex
 
class  RegExpMacroAssemblerX64
 
struct  X87Register
 
class  RegExpMacroAssemblerX87
 
class  zone_allocator
 
class  ZoneVector
 
class  ZoneDeque
 
class  ZoneQueue
 
class  Segment
 
class  Zone
 
class  ZoneObject
 
struct  ZoneScope
 
struct  ZoneAllocationPolicy
 
class  ZoneList
 
class  ZoneSplayTree
 
struct  SmiTagging
 
struct  SmiTagging< 4 >
 
struct  SmiTagging< 8 >
 
class  Internals
 This class exports constants and functionality from within v8 that is necessary to implement inline functions in the v8 api. More...
 

Typedefs

typedef DwVfpRegister DoubleRegister
 
typedef QwNeonRegister QuadRegister
 
typedef int32_t Instr
 
typedef uint32_t SRegisterFieldMask
 
typedef int(* arm_regexp_matcher) (String *, int, const byte *, const byte *, void *, int *, int, Address, int, Isolate *)
 
typedef int(* arm64_regexp_matcher) (String *input, int64_t start_offset, const byte *input_start, const byte *input_end, int *output, int64_t output_size, Address stack_base, int64_t direct_call, void *return_address, Isolate *isolate)
 
typedef PerThreadAssertScopeDebugOnly< HANDLE_ALLOCATION_ASSERT, falseDisallowHandleAllocation
 
typedef PerThreadAssertScopeDebugOnly< HANDLE_ALLOCATION_ASSERT, trueAllowHandleAllocation
 
typedef PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, falseDisallowHeapAllocation
 
typedef PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, trueAllowHeapAllocation
 
typedef PerThreadAssertScopeDebugOnly< HANDLE_DEREFERENCE_ASSERT, falseDisallowHandleDereference
 
typedef PerThreadAssertScopeDebugOnly< HANDLE_DEREFERENCE_ASSERT, trueAllowHandleDereference
 
typedef PerThreadAssertScopeDebugOnly< DEFERRED_HANDLE_DEREFERENCE_ASSERT, falseDisallowDeferredHandleDereference
 
typedef PerThreadAssertScopeDebugOnly< DEFERRED_HANDLE_DEREFERENCE_ASSERT, trueAllowDeferredHandleDereference
 
typedef PerThreadAssertScopeDebugOnly< CODE_DEPENDENCY_CHANGE_ASSERT, falseDisallowCodeDependencyChange
 
typedef PerThreadAssertScopeDebugOnly< CODE_DEPENDENCY_CHANGE_ASSERT, trueAllowCodeDependencyChange
 
typedef PerIsolateAssertScope< JAVASCRIPT_EXECUTION_ASSERT, falseDisallowJavascriptExecution
 
typedef PerIsolateAssertScope< JAVASCRIPT_EXECUTION_ASSERT, trueAllowJavascriptExecution
 
typedef PerIsolateAssertScope< JAVASCRIPT_EXECUTION_THROWS, falseThrowOnJavascriptExecution
 
typedef PerIsolateAssertScope< JAVASCRIPT_EXECUTION_THROWS, trueNoThrowOnJavascriptExecution
 
typedef PerIsolateAssertScopeDebugOnly< ALLOCATION_FAILURE_ASSERT, falseDisallowAllocationFailure
 
typedef PerIsolateAssertScopeDebugOnly< ALLOCATION_FAILURE_ASSERT, trueAllowAllocationFailure
 
typedef PerIsolateAssertScopeDebugOnly< DEOPTIMIZATION_ASSERT, falseDisallowDeoptimization
 
typedef PerIsolateAssertScopeDebugOnly< DEOPTIMIZATION_ASSERT, trueAllowDeoptimization
 
typedef PerIsolateAssertScopeDebugOnly< COMPILATION_ASSERT, falseDisallowCompilation
 
typedef PerIsolateAssertScopeDebugOnly< COMPILATION_ASSERT, trueAllowCompilation
 
typedef ZoneList< Handle< String > > ZoneStringList
 
typedef ZoneList< Handle< Object > > ZoneObjectList
 
typedef double(* UnaryMathFunction) (double x)
 
typedef TypeImpl< ZoneTypeConfigType
 
typedef SimpleStringResource< char, v8::String::ExternalOneByteStringResourceSimpleOneByteStringResource
 
typedef SimpleStringResource< uc16, v8::String::ExternalStringResourceSimpleTwoByteStringResource
 
typedef uint32_t RegList
 
typedef uint8_t byte
 
typedef byteAddress
 
typedef uint16_t uc16
 
typedef int32_t uc32
 
typedef bool(* WeakSlotCallback) (Object **pointer)
 
typedef bool(* WeakSlotCallbackWithHeap) (Heap *heap, Object **pointer)
 
typedef int(* HeapObjectCallback) (HeapObject *obj)
 
typedef bool(* ConstraintCallback) (Address new_addr, Address old_addr)
 
typedef void(* InlineCacheCallback) (Code *code, Address ic)
 
typedef void(* StoreBufferCallback) (Heap *heap, MemoryChunk *page, StoreBufferEvent event)
 
typedef TemplateHashMapImpl< FreeStoreAllocationPolicyHashMap
 
typedef String *(* ExternalStringTableUpdaterCallback) (Heap *heap, Object **pointer)
 
typedef void(* ScavengingCallback) (Map *map, HeapObject **slot, HeapObject *object)
 
typedef StringTableCleaner< falseInternalizedStringTableCleaner
 
typedef StringTableCleaner< trueExternalStringTableCleaner
 
typedef bool(* IsAliveFunction) (HeapObject *obj, int *size, int *offset)
 
typedef void(* ObjectSlotCallback) (HeapObject **from, HeapObject *to)
 
typedef void(StoreBuffer::* RegionCallback) (Address start, Address end, ObjectSlotCallback slot_callback, bool clear_maps)
 
typedef void * HeapThing
 
typedef const UniqueSet< Map > * MapSet
 
typedef EnumSet< GVNFlag, int32_t > GVNFlagSet
 
typedef Operand MemOperand
 
typedef int(* regexp_matcher) (String *, int, const byte *, const byte *, int *, int, Address, int, Isolate *)
 
typedef unibrow::Mapping< unibrow::Ecma262CanonicalizeCanonicalize
 
typedef void * ExternalReferenceRedirectorPointer()
 
typedef List< HeapObject * > DebugObjectCache
 
typedef bool EmitCharacterFunction(Isolate *isolate, RegExpCompiler *compiler, uc16 c, Label *on_failure, int cp_offset, bool check, bool preloaded)
 
typedef TypeImpl< HeapTypeConfigHeapType
 
typedef List< Map * > MapList
 
typedef List< Code * > CodeList
 
typedef List< Handle< Map > > MapHandleList
 
typedef List< Handle< HeapType > > TypeHandleList
 
typedef List< Handle< Code > > CodeHandleList
 
typedef FPURegister FloatRegister
 
typedef int(* mips_regexp_matcher) (String *, int, const byte *, const byte *, void *, int *, int, Address, int, Isolate *)
 
typedef bool(* NativeSourceCallback) (Vector< const char > name, Vector< const char > source, int index)
 
typedef NativesCollection< CORENatives
 
typedef NativesCollection< EXPERIMENTALExperimentalNatives
 
typedef int ExtraICState
 
typedef uint64_t ObjectPair
 
typedef BitField< int, 0, kStringBuilderConcatHelperLengthBitsStringBuilderSubstringLength
 
typedef BitField< int, kStringBuilderConcatHelperLengthBits, kStringBuilderConcatHelperPositionBitsStringBuilderSubstringPosition
 
typedef BoundsImpl< ZoneTypeConfigBounds
 
typedef zone_allocator< boolZoneBoolAllocator
 
typedef zone_allocator< intZoneIntAllocator
 
typedef ZoneVector< boolBoolVector
 
typedef ZoneVector< intIntVector
 
typedef TemplateHashMapImpl< ZoneAllocationPolicyZoneHashMap
 
typedef SmiTagging< kApiPointerSizePlatformSmiTagging
 

Enumerations

enum  Coprocessor {
  p0 = 0 , p1 = 1 , p2 = 2 , p3 = 3 ,
  p4 = 4 , p5 = 5 , p6 = 6 , p7 = 7 ,
  p8 = 8 , p9 = 9 , p10 = 10 , p11 = 11 ,
  p12 = 12 , p13 = 13 , p14 = 14 , p15 = 15
}
 
enum  TypeofState {
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF ,
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF
}
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  Opcode {
  AND = 0 << 21 , EOR = 1 << 21 , SUB = 2 << 21 , RSB = 3 << 21 ,
  ADD = 4 << 21 , ADC = 5 << 21 , SBC = 6 << 21 , RSC = 7 << 21 ,
  TST = 8 << 21 , TEQ = 9 << 21 , CMP = 10 << 21 , CMN = 11 << 21 ,
  ORR = 12 << 21 , MOV = 13 << 21 , BIC = 14 << 21 , MVN = 15 << 21 ,
  SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift , JAL = ((0 << 3) + 3) << kOpcodeShift ,
  BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift , BGTZ = ((0 << 3) + 7) << kOpcodeShift ,
  ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift , SLTIU = ((1 << 3) + 3) << kOpcodeShift ,
  ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift , LUI = ((1 << 3) + 7) << kOpcodeShift ,
  BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift , BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift ,
  BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift , DADDI = ((3 << 3) + 0) << kOpcodeShift , SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift ,
  SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift , LWL = ((4 << 3) + 2) << kOpcodeShift ,
  LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift , LWR = ((4 << 3) + 6) << kOpcodeShift ,
  SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift , SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift , BEQZC = ((6 << 3) + 6) << kOpcodeShift ,
  PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift , SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift ,
  JAL = ((0 << 3) + 3) << kOpcodeShift , BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift ,
  BGTZ = ((0 << 3) + 7) << kOpcodeShift , ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift ,
  SLTIU = ((1 << 3) + 3) << kOpcodeShift , ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift ,
  LUI = ((1 << 3) + 7) << kOpcodeShift , DAUI = ((3 << 3) + 5) << kOpcodeShift , BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift ,
  BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift , BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift ,
  DADDI = ((3 << 3) + 0) << kOpcodeShift , DADDIU = ((3 << 3) + 1) << kOpcodeShift , LDL = ((3 << 3) + 2) << kOpcodeShift , LDR = ((3 << 3) + 3) << kOpcodeShift ,
  SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift , SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift ,
  LWL = ((4 << 3) + 2) << kOpcodeShift , LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift ,
  LWR = ((4 << 3) + 6) << kOpcodeShift , LWU = ((4 << 3) + 7) << kOpcodeShift , SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift ,
  SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift , SDL = ((5 << 3) + 4) << kOpcodeShift , SDR = ((5 << 3) + 5) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LLD = ((6 << 3) + 4) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift ,
  BEQZC = ((6 << 3) + 6) << kOpcodeShift , LD = ((6 << 3) + 7) << kOpcodeShift , PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift ,
  SCD = ((7 << 3) + 4) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift , SD = ((7 << 3) + 7) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift
}
 
enum  MiscInstructionsBits74 {
  BX = 1 << 4 , BXJ = 2 << 4 , BLX = 3 << 4 , BKPT = 7 << 4 ,
  CLZ = 1 << 4
}
 
enum  {
  H = 1 << 5 , S6 = 1 << 6 , L = 1 << 20 , S = 1 << 20 ,
  W = 1 << 21 , A = 1 << 21 , B = 1 << 22 , N = 1 << 22 ,
  U = 1 << 23 , P = 1 << 24 , I = 1 << 25 , B4 = 1 << 4 ,
  B5 = 1 << 5 , B6 = 1 << 6 , B7 = 1 << 7 , B8 = 1 << 8 ,
  B9 = 1 << 9 , B12 = 1 << 12 , B16 = 1 << 16 , B18 = 1 << 18 ,
  B19 = 1 << 19 , B20 = 1 << 20 , B21 = 1 << 21 , B22 = 1 << 22 ,
  B23 = 1 << 23 , B24 = 1 << 24 , B25 = 1 << 25 , B26 = 1 << 26 ,
  B27 = 1 << 27 , B28 = 1 << 28 , kCondMask = 15 << 28 , kALUMask = 0x6f << 21 ,
  kRdMask = 15 << 12 , kCoprocessorMask = 15 << 8 , kOpCodeMask = 15 << 21 , kImm24Mask = (1 << 24) - 1 ,
  kImm16Mask = (1 << 16) - 1 , kImm8Mask = (1 << 8) - 1 , kOff12Mask = (1 << 12) - 1 , kOff8Mask = (1 << 8) - 1
}
 
enum  SBit { SetCC = 1 << 20 , LeaveCC = 0 << 20 }
 
enum  SRegister { CPSR = 0 << 22 , SPSR = 1 << 22 }
 
enum  ShiftOp {
  LSL = 0 << 5 , LSR = 1 << 5 , ASR = 2 << 5 , ROR = 3 << 5 ,
  RRX = -1 , kNumberOfShifts = 4
}
 
enum  SRegisterField {
  CPSR_c = CPSR | 1 << 16 , CPSR_x = CPSR | 1 << 17 , CPSR_s = CPSR | 1 << 18 , CPSR_f = CPSR | 1 << 19 ,
  SPSR_c = SPSR | 1 << 16 , SPSR_x = SPSR | 1 << 17 , SPSR_s = SPSR | 1 << 18 , SPSR_f = SPSR | 1 << 19
}
 
enum  AddrMode {
  Offset = (8|4|0) << 21 , PreIndex = (8|4|1) << 21 , PostIndex = (0|4|0) << 21 , NegOffset = (8|0|0) << 21 ,
  NegPreIndex = (8|0|1) << 21 , NegPostIndex = (0|0|0) << 21 , Offset = (8|4|0) << 21 , PreIndex = (8|4|1) << 21 ,
  PostIndex = (0|4|0) << 21
}
 
enum  BlockAddrMode {
  da = (0|0|0) << 21 , ia = (0|4|0) << 21 , db = (8|0|0) << 21 , ib = (8|4|0) << 21 ,
  da_w = (0|0|1) << 21 , ia_w = (0|4|1) << 21 , db_w = (8|0|1) << 21 , ib_w = (8|4|1) << 21 ,
  da_x = (0|0|0) << 21 , ia_x = (0|4|0) << 21 , db_x = (8|0|0) << 21 , ib_x = (8|4|0) << 21 ,
  kBlockAddrModeMask = (8|4|1) << 21
}
 
enum  LFlag { Long = 1 << 22 , Short = 0 << 22 }
 
enum  NeonDataType {
  NeonS8 = 0x1 , NeonS16 = 0x2 , NeonS32 = 0x4 , NeonU8 = 1 << 24 | 0x1 ,
  NeonU16 = 1 << 24 | 0x2 , NeonU32 = 1 << 24 | 0x4 , NeonDataTypeSizeMask = 0x7 , NeonDataTypeUMask = 1 << 24
}
 
enum  NeonListType { nlt_1 = 0x7 , nlt_2 = 0xA , nlt_3 = 0x6 , nlt_4 = 0x2 }
 
enum  NeonSize { Neon8 = 0x0 , Neon16 = 0x1 , Neon32 = 0x2 , Neon64 = 0x3 }
 
enum  SoftwareInterruptCodes {
  kCallRtRedirected = 0x10 , kBreakpoint = 0x20 , kStopCode = 1 << 23 , call_rt_redirected = 0xfffff ,
  call_rt_redirected = 0xfffff
}
 
enum  VFPRegPrecision { kSinglePrecision = 0 , kDoublePrecision = 1 }
 
enum  VFPConversionMode { kFPSCRRounding = 0 , kDefaultRoundToZero = 1 }
 
enum  VFPRoundingMode {
  RN = 0 << 22 , RP = 1 << 22 , RM = 2 << 22 , RZ = 3 << 22 ,
  kRoundToNearest = RN , kRoundToPlusInf = RP , kRoundToMinusInf = RM , kRoundToZero = RZ
}
 
enum  CheckForInexactConversion {
  kCheckForInexactConversion , kDontCheckForInexactConversion , kCheckForInexactConversion , kDontCheckForInexactConversion ,
  kCheckForInexactConversion , kDontCheckForInexactConversion
}
 
enum  Hint { no_hint = 0 , no_hint = 0 , no_hint = 0 }
 
enum  TaggingMode {
  TAG_RESULT , DONT_TAG_RESULT , TAG_RESULT , DONT_TAG_RESULT ,
  TAG_RESULT , DONT_TAG_RESULT
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  LinkRegisterStatus { kLRHasNotBeenSaved , kLRHasBeenSaved , kLRHasNotBeenSaved , kLRHasBeenSaved }
 
enum  TargetAddressStorageMode { CAN_INLINE_TARGET_ADDRESS , NEVER_INLINE_TARGET_ADDRESS , CAN_INLINE_TARGET_ADDRESS , NEVER_INLINE_TARGET_ADDRESS }
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  FlagsUpdate { SetFlags = 1 , LeaveFlags = 0 }
 
enum  StatusFlags {
  NoFlag = 0 , NFlag = N_mask , ZFlag = Z_mask , CFlag = C_mask ,
  VFlag = V_mask , NZFlag = NFlag | ZFlag , NCFlag = NFlag | CFlag , NVFlag = NFlag | VFlag ,
  ZCFlag = ZFlag | CFlag , ZVFlag = ZFlag | VFlag , CVFlag = CFlag | VFlag , NZCFlag = NFlag | ZFlag | CFlag ,
  NZVFlag = NFlag | ZFlag | VFlag , NCVFlag = NFlag | CFlag | VFlag , ZCVFlag = ZFlag | CFlag | VFlag , NZCVFlag = NFlag | ZFlag | CFlag | VFlag ,
  FPEqualFlag = ZCFlag , FPLessThanFlag = NFlag , FPGreaterThanFlag = CFlag , FPUnorderedFlag = CVFlag
}
 
enum  Shift {
  NO_SHIFT = -1 , LSL = 0 << 5 , LSR = 1 << 5 , ASR = 2 << 5 ,
  ROR = 3 << 5
}
 
enum  Extend {
  NO_EXTEND = -1 , UXTB = 0 , UXTH = 1 , UXTW = 2 ,
  UXTX = 3 , SXTB = 4 , SXTH = 5 , SXTW = 6 ,
  SXTX = 7
}
 
enum  SystemHint {
  NOP = 0 , YIELD = 1 , WFE = 2 , WFI = 3 ,
  SEV = 4 , SEVL = 5
}
 
enum  BarrierDomain { OuterShareable = 0 , NonShareable = 1 , InnerShareable = 2 , FullSystem = 3 }
 
enum  BarrierType { BarrierOther = 0 , BarrierReads = 1 , BarrierWrites = 2 , BarrierAll = 3 }
 
enum  SystemRegister { NZCV , FPCR }
 
enum  GenericInstrField { SixtyFourBits = 0x80000000 , ThirtyTwoBits = 0x00000000 , FP32 = 0x00000000 , FP64 = 0x00400000 }
 
enum  PCRelAddressingOp {
  PCRelAddressingFixed = 0x10000000 , PCRelAddressingFMask = 0x1F000000 , PCRelAddressingMask = 0x9F000000 , ADR = PCRelAddressingFixed | 0x00000000 ,
  ADRP = PCRelAddressingFixed | 0x80000000
}
 
enum  AddSubOp {
  AddSubOpMask = 0x60000000 , AddSubSetFlagsBit = 0x20000000 , ADD = 4 << 21 , ADDS = ADD | AddSubSetFlagsBit ,
  SUB = 2 << 21 , SUBS = SUB | AddSubSetFlagsBit
}
 
enum  AddSubImmediateOp { AddSubImmediateFixed = 0x11000000 , AddSubImmediateFMask = 0x1F000000 , AddSubImmediateMask = 0xFF000000 }
 
enum  AddSubShiftedOp { AddSubShiftedFixed = 0x0B000000 , AddSubShiftedFMask = 0x1F200000 , AddSubShiftedMask = 0xFF200000 }
 
enum  AddSubExtendedOp { AddSubExtendedFixed = 0x0B200000 , AddSubExtendedFMask = 0x1F200000 , AddSubExtendedMask = 0xFFE00000 }
 
enum  AddSubWithCarryOp {
  AddSubWithCarryFixed = 0x1A000000 , AddSubWithCarryFMask = 0x1FE00000 , AddSubWithCarryMask = 0xFFE0FC00 , ADC_w = AddSubWithCarryFixed | ADD ,
  ADC_x = AddSubWithCarryFixed | ADD | SixtyFourBits , ADC = 5 << 21 , ADCS_w = AddSubWithCarryFixed | ADDS , ADCS_x = AddSubWithCarryFixed | ADDS | SixtyFourBits ,
  SBC_w = AddSubWithCarryFixed | SUB , SBC_x = AddSubWithCarryFixed | SUB | SixtyFourBits , SBC = 6 << 21 , SBCS_w = AddSubWithCarryFixed | SUBS ,
  SBCS_x = AddSubWithCarryFixed | SUBS | SixtyFourBits
}
 
enum  LogicalOp {
  LogicalOpMask = 0x60200000 , NOT = 0x00200000 , AND = 0 << 21 , BIC = 14 << 21 ,
  ORR = 12 << 21 , ORN = ORR | NOT , EOR = 1 << 21 , EON = EOR | NOT ,
  ANDS = 0x60000000 , BICS = ANDS | NOT
}
 
enum  LogicalImmediateOp {
  LogicalImmediateFixed = 0x12000000 , LogicalImmediateFMask = 0x1F800000 , LogicalImmediateMask = 0xFF800000 , AND_w_imm = LogicalImmediateFixed | AND ,
  AND_x_imm = LogicalImmediateFixed | AND | SixtyFourBits , ORR_w_imm = LogicalImmediateFixed | ORR , ORR_x_imm = LogicalImmediateFixed | ORR | SixtyFourBits , EOR_w_imm = LogicalImmediateFixed | EOR ,
  EOR_x_imm = LogicalImmediateFixed | EOR | SixtyFourBits , ANDS_w_imm = LogicalImmediateFixed | ANDS , ANDS_x_imm = LogicalImmediateFixed | ANDS | SixtyFourBits
}
 
enum  LogicalShiftedOp {
  LogicalShiftedFixed = 0x0A000000 , LogicalShiftedFMask = 0x1F000000 , LogicalShiftedMask = 0xFF200000 , AND_w = LogicalShiftedFixed | AND ,
  AND_x = LogicalShiftedFixed | AND | SixtyFourBits , AND_shift = AND_w , BIC_w = LogicalShiftedFixed | BIC , BIC_x = LogicalShiftedFixed | BIC | SixtyFourBits ,
  BIC_shift = BIC_w , ORR_w = LogicalShiftedFixed | ORR , ORR_x = LogicalShiftedFixed | ORR | SixtyFourBits , ORR_shift = ORR_w ,
  ORN_w = LogicalShiftedFixed | ORN , ORN_x = LogicalShiftedFixed | ORN | SixtyFourBits , ORN_shift = ORN_w , EOR_w = LogicalShiftedFixed | EOR ,
  EOR_x = LogicalShiftedFixed | EOR | SixtyFourBits , EOR_shift = EOR_w , EON_w = LogicalShiftedFixed | EON , EON_x = LogicalShiftedFixed | EON | SixtyFourBits ,
  EON_shift = EON_w , ANDS_w = LogicalShiftedFixed | ANDS , ANDS_x = LogicalShiftedFixed | ANDS | SixtyFourBits , ANDS_shift = ANDS_w ,
  BICS_w = LogicalShiftedFixed | BICS , BICS_x = LogicalShiftedFixed | BICS | SixtyFourBits , BICS_shift = BICS_w
}
 
enum  MoveWideImmediateOp {
  MoveWideImmediateFixed = 0x12800000 , MoveWideImmediateFMask = 0x1F800000 , MoveWideImmediateMask = 0xFF800000 , MOVN = 0x00000000 ,
  MOVZ = 0x40000000 , MOVK = 0x60000000 , MOVN_w = MoveWideImmediateFixed | MOVN , MOVN_x = MoveWideImmediateFixed | MOVN | SixtyFourBits ,
  MOVZ_w = MoveWideImmediateFixed | MOVZ , MOVZ_x = MoveWideImmediateFixed | MOVZ | SixtyFourBits , MOVK_w = MoveWideImmediateFixed | MOVK , MOVK_x = MoveWideImmediateFixed | MOVK | SixtyFourBits
}
 
enum  BitfieldOp {
  BitfieldFixed = 0x13000000 , BitfieldFMask = 0x1F800000 , BitfieldMask = 0xFF800000 , SBFM_w = BitfieldFixed | 0x00000000 ,
  SBFM_x = BitfieldFixed | 0x80000000 , SBFM = SBFM_w , BFM_w = BitfieldFixed | 0x20000000 , BFM_x = BitfieldFixed | 0xA0000000 ,
  BFM = BFM_w , UBFM_w = BitfieldFixed | 0x40000000 , UBFM_x = BitfieldFixed | 0xC0000000 , UBFM = UBFM_w
}
 
enum  ExtractOp {
  ExtractFixed = 0x13800000 , ExtractFMask = 0x1F800000 , ExtractMask = 0xFFA00000 , EXTR_w = ExtractFixed | 0x00000000 ,
  EXTR_x = ExtractFixed | 0x80000000 , EXTR = EXTR_w
}
 
enum  UnconditionalBranchOp {
  UnconditionalBranchFixed = 0x14000000 , UnconditionalBranchFMask = 0x7C000000 , UnconditionalBranchMask = 0xFC000000 , B = 1 << 22 ,
  BL = UnconditionalBranchFixed | 0x80000000
}
 
enum  UnconditionalBranchToRegisterOp {
  UnconditionalBranchToRegisterFixed = 0xD6000000 , UnconditionalBranchToRegisterFMask = 0xFE000000 , UnconditionalBranchToRegisterMask = 0xFFFFFC1F , BR = UnconditionalBranchToRegisterFixed | 0x001F0000 ,
  BLR = UnconditionalBranchToRegisterFixed | 0x003F0000 , RET = UnconditionalBranchToRegisterFixed | 0x005F0000
}
 
enum  CompareBranchOp {
  CompareBranchFixed = 0x34000000 , CompareBranchFMask = 0x7E000000 , CompareBranchMask = 0xFF000000 , CBZ_w = CompareBranchFixed | 0x00000000 ,
  CBZ_x = CompareBranchFixed | 0x80000000 , CBZ = CBZ_w , CBNZ_w = CompareBranchFixed | 0x01000000 , CBNZ_x = CompareBranchFixed | 0x81000000 ,
  CBNZ = CBNZ_w
}
 
enum  TestBranchOp {
  TestBranchFixed = 0x36000000 , TestBranchFMask = 0x7E000000 , TestBranchMask = 0x7F000000 , TBZ = TestBranchFixed | 0x00000000 ,
  TBNZ = TestBranchFixed | 0x01000000
}
 
enum  ConditionalBranchOp { ConditionalBranchFixed = 0x54000000 , ConditionalBranchFMask = 0xFE000000 , ConditionalBranchMask = 0xFF000010 , B_cond = ConditionalBranchFixed | 0x00000000 }
 
enum  SystemOp { SystemFixed = 0xD5000000 , SystemFMask = 0xFFC00000 }
 
enum  SystemSysRegOp {
  SystemSysRegFixed = 0xD5100000 , SystemSysRegFMask = 0xFFD00000 , SystemSysRegMask = 0xFFF00000 , MRS = SystemSysRegFixed | 0x00200000 ,
  MSR = SystemSysRegFixed | 0x00000000
}
 
enum  SystemHintOp { SystemHintFixed = 0xD503201F , SystemHintFMask = 0xFFFFF01F , SystemHintMask = 0xFFFFF01F , HINT = SystemHintFixed | 0x00000000 }
 
enum  ExceptionOp {
  ExceptionFixed = 0xD4000000 , ExceptionFMask = 0xFF000000 , ExceptionMask = 0xFFE0001F , HLT = ExceptionFixed | 0x00400000 ,
  BRK = ExceptionFixed | 0x00200000 , SVC = ExceptionFixed | 0x00000001 , HVC = ExceptionFixed | 0x00000002 , SMC = ExceptionFixed | 0x00000003 ,
  DCPS1 = ExceptionFixed | 0x00A00001 , DCPS2 = ExceptionFixed | 0x00A00002 , DCPS3 = ExceptionFixed | 0x00A00003
}
 
enum  MemBarrierOp {
  MemBarrierFixed = 0xD503309F , MemBarrierFMask = 0xFFFFF09F , MemBarrierMask = 0xFFFFF0FF , DSB = MemBarrierFixed | 0x00000000 ,
  DMB = MemBarrierFixed | 0x00000020 , ISB = MemBarrierFixed | 0x00000040
}
 
enum  LoadStoreAnyOp { LoadStoreAnyFMask = 0x0a000000 , LoadStoreAnyFixed = 0x08000000 }
 
enum  LoadStorePairAnyOp { LoadStorePairAnyFMask = 0x3a000000 , LoadStorePairAnyFixed = 0x28000000 }
 
enum  LoadStorePairOp { LoadStorePairMask = 0xC4400000 , LoadStorePairLBit = 1 << 22 }
 
enum  LoadStorePairPostIndexOp { LoadStorePairPostIndexFixed = 0x28800000 , LoadStorePairPostIndexFMask = 0x3B800000 , LoadStorePairPostIndexMask = 0xFFC00000 }
 
enum  LoadStorePairPreIndexOp { LoadStorePairPreIndexFixed = 0x29800000 , LoadStorePairPreIndexFMask = 0x3B800000 , LoadStorePairPreIndexMask = 0xFFC00000 }
 
enum  LoadStorePairOffsetOp { LoadStorePairOffsetFixed = 0x29000000 , LoadStorePairOffsetFMask = 0x3B800000 , LoadStorePairOffsetMask = 0xFFC00000 }
 
enum  LoadStorePairNonTemporalOp {
  LoadStorePairNonTemporalFixed = 0x28000000 , LoadStorePairNonTemporalFMask = 0x3B800000 , LoadStorePairNonTemporalMask = 0xFFC00000 , STNP_w = LoadStorePairNonTemporalFixed | STP_w ,
  LDNP_w = LoadStorePairNonTemporalFixed | LDP_w , STNP_x = LoadStorePairNonTemporalFixed | STP_x , LDNP_x = LoadStorePairNonTemporalFixed | LDP_x , STNP_s = LoadStorePairNonTemporalFixed | STP_s ,
  LDNP_s = LoadStorePairNonTemporalFixed | LDP_s , STNP_d = LoadStorePairNonTemporalFixed | STP_d , LDNP_d = LoadStorePairNonTemporalFixed | LDP_d
}
 
enum  LoadLiteralOp {
  LoadLiteralFixed = 0x18000000 , LoadLiteralFMask = 0x3B000000 , LoadLiteralMask = 0xFF000000 , LDR_w_lit = LoadLiteralFixed | 0x00000000 ,
  LDR_x_lit = LoadLiteralFixed | 0x40000000 , LDRSW_x_lit = LoadLiteralFixed | 0x80000000 , PRFM_lit = LoadLiteralFixed | 0xC0000000 , LDR_s_lit = LoadLiteralFixed | 0x04000000 ,
  LDR_d_lit = LoadLiteralFixed | 0x44000000
}
 
enum  LoadStoreUnscaledOffsetOp { LoadStoreUnscaledOffsetFixed = 0x38000000 , LoadStoreUnscaledOffsetFMask = 0x3B200C00 , LoadStoreUnscaledOffsetMask = 0xFFE00C00 }
 
enum  LoadStoreOp { LoadStoreOpMask = 0xC4C00000 , LOAD_STORE_OP_LIST =(LOAD_STORE) , PRFM = 0xC0800000 }
 
enum  LoadStorePostIndex { LoadStorePostIndexFixed = 0x38000400 , LoadStorePostIndexFMask = 0x3B200C00 , LoadStorePostIndexMask = 0xFFE00C00 }
 
enum  LoadStorePreIndex { LoadStorePreIndexFixed = 0x38000C00 , LoadStorePreIndexFMask = 0x3B200C00 , LoadStorePreIndexMask = 0xFFE00C00 }
 
enum  LoadStoreUnsignedOffset { LoadStoreUnsignedOffsetFixed = 0x39000000 , LoadStoreUnsignedOffsetFMask = 0x3B000000 , LoadStoreUnsignedOffsetMask = 0xFFC00000 , PRFM_unsigned = LoadStoreUnsignedOffsetFixed | PRFM }
 
enum  LoadStoreRegisterOffset { LoadStoreRegisterOffsetFixed = 0x38200800 , LoadStoreRegisterOffsetFMask = 0x3B200C00 , LoadStoreRegisterOffsetMask = 0xFFE00C00 , PRFM_reg = LoadStoreRegisterOffsetFixed | PRFM }
 
enum  ConditionalCompareOp { ConditionalCompareMask = 0x60000000 , CCMN = 0x20000000 , CCMP = 0x60000000 }
 
enum  ConditionalCompareRegisterOp {
  ConditionalCompareRegisterFixed = 0x1A400000 , ConditionalCompareRegisterFMask = 0x1FE00800 , ConditionalCompareRegisterMask = 0xFFE00C10 , CCMN_w = ConditionalCompareRegisterFixed | CCMN ,
  CCMN_x = ConditionalCompareRegisterFixed | SixtyFourBits | CCMN , CCMP_w = ConditionalCompareRegisterFixed | CCMP , CCMP_x = ConditionalCompareRegisterFixed | SixtyFourBits | CCMP
}
 
enum  ConditionalCompareImmediateOp {
  ConditionalCompareImmediateFixed = 0x1A400800 , ConditionalCompareImmediateFMask = 0x1FE00800 , ConditionalCompareImmediateMask = 0xFFE00C10 , CCMN_w_imm = ConditionalCompareImmediateFixed | CCMN ,
  CCMN_x_imm = ConditionalCompareImmediateFixed | SixtyFourBits | CCMN , CCMP_w_imm = ConditionalCompareImmediateFixed | CCMP , CCMP_x_imm = ConditionalCompareImmediateFixed | SixtyFourBits | CCMP
}
 
enum  ConditionalSelectOp {
  ConditionalSelectFixed = 0x1A800000 , ConditionalSelectFMask = 0x1FE00000 , ConditionalSelectMask = 0xFFE00C00 , CSEL_w = ConditionalSelectFixed | 0x00000000 ,
  CSEL_x = ConditionalSelectFixed | 0x80000000 , CSEL = CSEL_w , CSINC_w = ConditionalSelectFixed | 0x00000400 , CSINC_x = ConditionalSelectFixed | 0x80000400 ,
  CSINC = CSINC_w , CSINV_w = ConditionalSelectFixed | 0x40000000 , CSINV_x = ConditionalSelectFixed | 0xC0000000 , CSINV = CSINV_w ,
  CSNEG_w = ConditionalSelectFixed | 0x40000400 , CSNEG_x = ConditionalSelectFixed | 0xC0000400 , CSNEG = CSNEG_w
}
 
enum  DataProcessing1SourceOp {
  DataProcessing1SourceFixed = 0x5AC00000 , DataProcessing1SourceFMask = 0x5FE00000 , DataProcessing1SourceMask = 0xFFFFFC00 , RBIT = DataProcessing1SourceFixed | 0x00000000 ,
  RBIT_w = RBIT , RBIT_x = RBIT | SixtyFourBits , REV16 = DataProcessing1SourceFixed | 0x00000400 , REV16_w = REV16 ,
  REV16_x = REV16 | SixtyFourBits , REV = DataProcessing1SourceFixed | 0x00000800 , REV_w = REV , REV32_x = REV | SixtyFourBits ,
  REV_x = DataProcessing1SourceFixed | SixtyFourBits | 0x00000C00 , CLZ = 1 << 4 , CLZ_w = CLZ , CLZ_x = CLZ | SixtyFourBits ,
  CLS = DataProcessing1SourceFixed | 0x00001400 , CLS_w = CLS , CLS_x = CLS | SixtyFourBits
}
 
enum  DataProcessing2SourceOp {
  DataProcessing2SourceFixed = 0x1AC00000 , DataProcessing2SourceFMask = 0x5FE00000 , DataProcessing2SourceMask = 0xFFE0FC00 , UDIV_w = DataProcessing2SourceFixed | 0x00000800 ,
  UDIV_x = DataProcessing2SourceFixed | 0x80000800 , UDIV = UDIV_w , SDIV_w = DataProcessing2SourceFixed | 0x00000C00 , SDIV_x = DataProcessing2SourceFixed | 0x80000C00 ,
  SDIV = SDIV_w , LSLV_w = DataProcessing2SourceFixed | 0x00002000 , LSLV_x = DataProcessing2SourceFixed | 0x80002000 , LSLV = LSLV_w ,
  LSRV_w = DataProcessing2SourceFixed | 0x00002400 , LSRV_x = DataProcessing2SourceFixed | 0x80002400 , LSRV = LSRV_w , ASRV_w = DataProcessing2SourceFixed | 0x00002800 ,
  ASRV_x = DataProcessing2SourceFixed | 0x80002800 , ASRV = ASRV_w , RORV_w = DataProcessing2SourceFixed | 0x00002C00 , RORV_x = DataProcessing2SourceFixed | 0x80002C00 ,
  RORV = RORV_w , CRC32B = DataProcessing2SourceFixed | 0x00004000 , CRC32H = DataProcessing2SourceFixed | 0x00004400 , CRC32W = DataProcessing2SourceFixed | 0x00004800 ,
  CRC32X = DataProcessing2SourceFixed | SixtyFourBits | 0x00004C00 , CRC32CB = DataProcessing2SourceFixed | 0x00005000 , CRC32CH = DataProcessing2SourceFixed | 0x00005400 , CRC32CW = DataProcessing2SourceFixed | 0x00005800 ,
  CRC32CX = DataProcessing2SourceFixed | SixtyFourBits | 0x00005C00
}
 
enum  DataProcessing3SourceOp {
  DataProcessing3SourceFixed = 0x1B000000 , DataProcessing3SourceFMask = 0x1F000000 , DataProcessing3SourceMask = 0xFFE08000 , MADD_w = DataProcessing3SourceFixed | 0x00000000 ,
  MADD_x = DataProcessing3SourceFixed | 0x80000000 , MADD = MADD_w , MSUB_w = DataProcessing3SourceFixed | 0x00008000 , MSUB_x = DataProcessing3SourceFixed | 0x80008000 ,
  MSUB = MSUB_w , SMADDL_x = DataProcessing3SourceFixed | 0x80200000 , SMSUBL_x = DataProcessing3SourceFixed | 0x80208000 , SMULH_x = DataProcessing3SourceFixed | 0x80400000 ,
  UMADDL_x = DataProcessing3SourceFixed | 0x80A00000 , UMSUBL_x = DataProcessing3SourceFixed | 0x80A08000 , UMULH_x = DataProcessing3SourceFixed | 0x80C00000
}
 
enum  FPCompareOp {
  FPCompareFixed = 0x1E202000 , FPCompareFMask = 0x5F203C00 , FPCompareMask = 0xFFE0FC1F , FCMP_s = FPCompareFixed | 0x00000000 ,
  FCMP_d = FPCompareFixed | FP64 | 0x00000000 , FCMP = FCMP_s , FCMP_s_zero = FPCompareFixed | 0x00000008 , FCMP_d_zero = FPCompareFixed | FP64 | 0x00000008 ,
  FCMP_zero = FCMP_s_zero , FCMPE_s = FPCompareFixed | 0x00000010 , FCMPE_d = FPCompareFixed | FP64 | 0x00000010 , FCMPE_s_zero = FPCompareFixed | 0x00000018 ,
  FCMPE_d_zero = FPCompareFixed | FP64 | 0x00000018
}
 
enum  FPConditionalCompareOp {
  FPConditionalCompareFixed = 0x1E200400 , FPConditionalCompareFMask = 0x5F200C00 , FPConditionalCompareMask = 0xFFE00C10 , FCCMP_s = FPConditionalCompareFixed | 0x00000000 ,
  FCCMP_d = FPConditionalCompareFixed | FP64 | 0x00000000 , FCCMP = FCCMP_s , FCCMPE_s = FPConditionalCompareFixed | 0x00000010 , FCCMPE_d = FPConditionalCompareFixed | FP64 | 0x00000010 ,
  FCCMPE = FCCMPE_s
}
 
enum  FPConditionalSelectOp {
  FPConditionalSelectFixed = 0x1E200C00 , FPConditionalSelectFMask = 0x5F200C00 , FPConditionalSelectMask = 0xFFE00C00 , FCSEL_s = FPConditionalSelectFixed | 0x00000000 ,
  FCSEL_d = FPConditionalSelectFixed | FP64 | 0x00000000 , FCSEL = FCSEL_s
}
 
enum  FPImmediateOp {
  FPImmediateFixed = 0x1E201000 , FPImmediateFMask = 0x5F201C00 , FPImmediateMask = 0xFFE01C00 , FMOV_s_imm = FPImmediateFixed | 0x00000000 ,
  FMOV_d_imm = FPImmediateFixed | FP64 | 0x00000000
}
 
enum  FPDataProcessing1SourceOp {
  FPDataProcessing1SourceFixed = 0x1E204000 , FPDataProcessing1SourceFMask = 0x5F207C00 , FPDataProcessing1SourceMask = 0xFFFFFC00 , FMOV_s = FPDataProcessing1SourceFixed | 0x00000000 ,
  FMOV_d = FPDataProcessing1SourceFixed | FP64 | 0x00000000 , FMOV = FMOV_s , FABS_s = FPDataProcessing1SourceFixed | 0x00008000 , FABS_d = FPDataProcessing1SourceFixed | FP64 | 0x00008000 ,
  FABS = FABS_s , FNEG_s = FPDataProcessing1SourceFixed | 0x00010000 , FNEG_d = FPDataProcessing1SourceFixed | FP64 | 0x00010000 , FNEG = FNEG_s ,
  FSQRT_s = FPDataProcessing1SourceFixed | 0x00018000 , FSQRT_d = FPDataProcessing1SourceFixed | FP64 | 0x00018000 , FSQRT = FSQRT_s , FCVT_ds = FPDataProcessing1SourceFixed | 0x00028000 ,
  FCVT_sd = FPDataProcessing1SourceFixed | FP64 | 0x00020000 , FRINTN_s = FPDataProcessing1SourceFixed | 0x00040000 , FRINTN_d = FPDataProcessing1SourceFixed | FP64 | 0x00040000 , FRINTN = FRINTN_s ,
  FRINTP_s = FPDataProcessing1SourceFixed | 0x00048000 , FRINTP_d = FPDataProcessing1SourceFixed | FP64 | 0x00048000 , FRINTP = FRINTP_s , FRINTM_s = FPDataProcessing1SourceFixed | 0x00050000 ,
  FRINTM_d = FPDataProcessing1SourceFixed | FP64 | 0x00050000 , FRINTM = FRINTM_s , FRINTZ_s = FPDataProcessing1SourceFixed | 0x00058000 , FRINTZ_d = FPDataProcessing1SourceFixed | FP64 | 0x00058000 ,
  FRINTZ = FRINTZ_s , FRINTA_s = FPDataProcessing1SourceFixed | 0x00060000 , FRINTA_d = FPDataProcessing1SourceFixed | FP64 | 0x00060000 , FRINTA = FRINTA_s ,
  FRINTX_s = FPDataProcessing1SourceFixed | 0x00070000 , FRINTX_d = FPDataProcessing1SourceFixed | FP64 | 0x00070000 , FRINTX = FRINTX_s , FRINTI_s = FPDataProcessing1SourceFixed | 0x00078000 ,
  FRINTI_d = FPDataProcessing1SourceFixed | FP64 | 0x00078000 , FRINTI = FRINTI_s
}
 
enum  FPDataProcessing2SourceOp {
  FPDataProcessing2SourceFixed = 0x1E200800 , FPDataProcessing2SourceFMask = 0x5F200C00 , FPDataProcessing2SourceMask = 0xFFE0FC00 , FMUL = FPDataProcessing2SourceFixed | 0x00000000 ,
  FMUL_s = FMUL , FMUL_d = FMUL | FP64 , FDIV = FPDataProcessing2SourceFixed | 0x00001000 , FDIV_s = FDIV ,
  FDIV_d = FDIV | FP64 , FADD = FPDataProcessing2SourceFixed | 0x00002000 , FADD_s = FADD , FADD_d = FADD | FP64 ,
  FSUB = FPDataProcessing2SourceFixed | 0x00003000 , FSUB_s = FSUB , FSUB_d = FSUB | FP64 , FMAX = FPDataProcessing2SourceFixed | 0x00004000 ,
  FMAX_s = FMAX , FMAX_d = FMAX | FP64 , FMIN = FPDataProcessing2SourceFixed | 0x00005000 , FMIN_s = FMIN ,
  FMIN_d = FMIN | FP64 , FMAXNM = FPDataProcessing2SourceFixed | 0x00006000 , FMAXNM_s = FMAXNM , FMAXNM_d = FMAXNM | FP64 ,
  FMINNM = FPDataProcessing2SourceFixed | 0x00007000 , FMINNM_s = FMINNM , FMINNM_d = FMINNM | FP64 , FNMUL = FPDataProcessing2SourceFixed | 0x00008000 ,
  FNMUL_s = FNMUL , FNMUL_d = FNMUL | FP64
}
 
enum  FPDataProcessing3SourceOp {
  FPDataProcessing3SourceFixed = 0x1F000000 , FPDataProcessing3SourceFMask = 0x5F000000 , FPDataProcessing3SourceMask = 0xFFE08000 , FMADD_s = FPDataProcessing3SourceFixed | 0x00000000 ,
  FMSUB_s = FPDataProcessing3SourceFixed | 0x00008000 , FNMADD_s = FPDataProcessing3SourceFixed | 0x00200000 , FNMSUB_s = FPDataProcessing3SourceFixed | 0x00208000 , FMADD_d = FPDataProcessing3SourceFixed | 0x00400000 ,
  FMSUB_d = FPDataProcessing3SourceFixed | 0x00408000 , FNMADD_d = FPDataProcessing3SourceFixed | 0x00600000 , FNMSUB_d = FPDataProcessing3SourceFixed | 0x00608000
}
 
enum  FPIntegerConvertOp {
  FPIntegerConvertFixed = 0x1E200000 , FPIntegerConvertFMask = 0x5F20FC00 , FPIntegerConvertMask = 0xFFFFFC00 , FCVTNS = FPIntegerConvertFixed | 0x00000000 ,
  FCVTNS_ws = FCVTNS , FCVTNS_xs = FCVTNS | SixtyFourBits , FCVTNS_wd = FCVTNS | FP64 , FCVTNS_xd = FCVTNS | SixtyFourBits | FP64 ,
  FCVTNU = FPIntegerConvertFixed | 0x00010000 , FCVTNU_ws = FCVTNU , FCVTNU_xs = FCVTNU | SixtyFourBits , FCVTNU_wd = FCVTNU | FP64 ,
  FCVTNU_xd = FCVTNU | SixtyFourBits | FP64 , FCVTPS = FPIntegerConvertFixed | 0x00080000 , FCVTPS_ws = FCVTPS , FCVTPS_xs = FCVTPS | SixtyFourBits ,
  FCVTPS_wd = FCVTPS | FP64 , FCVTPS_xd = FCVTPS | SixtyFourBits | FP64 , FCVTPU = FPIntegerConvertFixed | 0x00090000 , FCVTPU_ws = FCVTPU ,
  FCVTPU_xs = FCVTPU | SixtyFourBits , FCVTPU_wd = FCVTPU | FP64 , FCVTPU_xd = FCVTPU | SixtyFourBits | FP64 , FCVTMS = FPIntegerConvertFixed | 0x00100000 ,
  FCVTMS_ws = FCVTMS , FCVTMS_xs = FCVTMS | SixtyFourBits , FCVTMS_wd = FCVTMS | FP64 , FCVTMS_xd = FCVTMS | SixtyFourBits | FP64 ,
  FCVTMU = FPIntegerConvertFixed | 0x00110000 , FCVTMU_ws = FCVTMU , FCVTMU_xs = FCVTMU | SixtyFourBits , FCVTMU_wd = FCVTMU | FP64 ,
  FCVTMU_xd = FCVTMU | SixtyFourBits | FP64 , FCVTZS = FPIntegerConvertFixed | 0x00180000 , FCVTZS_ws = FCVTZS , FCVTZS_xs = FCVTZS | SixtyFourBits ,
  FCVTZS_wd = FCVTZS | FP64 , FCVTZS_xd = FCVTZS | SixtyFourBits | FP64 , FCVTZU = FPIntegerConvertFixed | 0x00190000 , FCVTZU_ws = FCVTZU ,
  FCVTZU_xs = FCVTZU | SixtyFourBits , FCVTZU_wd = FCVTZU | FP64 , FCVTZU_xd = FCVTZU | SixtyFourBits | FP64 , SCVTF = FPIntegerConvertFixed | 0x00020000 ,
  SCVTF_sw = SCVTF , SCVTF_sx = SCVTF | SixtyFourBits , SCVTF_dw = SCVTF | FP64 , SCVTF_dx = SCVTF | SixtyFourBits | FP64 ,
  UCVTF = FPIntegerConvertFixed | 0x00030000 , UCVTF_sw = UCVTF , UCVTF_sx = UCVTF | SixtyFourBits , UCVTF_dw = UCVTF | FP64 ,
  UCVTF_dx = UCVTF | SixtyFourBits | FP64 , FCVTAS = FPIntegerConvertFixed | 0x00040000 , FCVTAS_ws = FCVTAS , FCVTAS_xs = FCVTAS | SixtyFourBits ,
  FCVTAS_wd = FCVTAS | FP64 , FCVTAS_xd = FCVTAS | SixtyFourBits | FP64 , FCVTAU = FPIntegerConvertFixed | 0x00050000 , FCVTAU_ws = FCVTAU ,
  FCVTAU_xs = FCVTAU | SixtyFourBits , FCVTAU_wd = FCVTAU | FP64 , FCVTAU_xd = FCVTAU | SixtyFourBits | FP64 , FMOV_ws = FPIntegerConvertFixed | 0x00060000 ,
  FMOV_sw = FPIntegerConvertFixed | 0x00070000 , FMOV_xd = FMOV_ws | SixtyFourBits | FP64 , FMOV_dx = FMOV_sw | SixtyFourBits | FP64
}
 
enum  FPFixedPointConvertOp {
  FPFixedPointConvertFixed = 0x1E000000 , FPFixedPointConvertFMask = 0x5F200000 , FPFixedPointConvertMask = 0xFFFF0000 , FCVTZS_fixed = FPFixedPointConvertFixed | 0x00180000 ,
  FCVTZS_ws_fixed = FCVTZS_fixed , FCVTZS_xs_fixed = FCVTZS_fixed | SixtyFourBits , FCVTZS_wd_fixed = FCVTZS_fixed | FP64 , FCVTZS_xd_fixed = FCVTZS_fixed | SixtyFourBits | FP64 ,
  FCVTZU_fixed = FPFixedPointConvertFixed | 0x00190000 , FCVTZU_ws_fixed = FCVTZU_fixed , FCVTZU_xs_fixed = FCVTZU_fixed | SixtyFourBits , FCVTZU_wd_fixed = FCVTZU_fixed | FP64 ,
  FCVTZU_xd_fixed = FCVTZU_fixed | SixtyFourBits | FP64 , SCVTF_fixed = FPFixedPointConvertFixed | 0x00020000 , SCVTF_sw_fixed = SCVTF_fixed , SCVTF_sx_fixed = SCVTF_fixed | SixtyFourBits ,
  SCVTF_dw_fixed = SCVTF_fixed | FP64 , SCVTF_dx_fixed = SCVTF_fixed | SixtyFourBits | FP64 , UCVTF_fixed = FPFixedPointConvertFixed | 0x00030000 , UCVTF_sw_fixed = UCVTF_fixed ,
  UCVTF_sx_fixed = UCVTF_fixed | SixtyFourBits , UCVTF_dw_fixed = UCVTF_fixed | FP64 , UCVTF_dx_fixed = UCVTF_fixed | SixtyFourBits | FP64
}
 
enum  UnimplementedOp { UnimplementedFixed = 0x00000000 , UnimplementedFMask = 0x00000000 }
 
enum  UnallocatedOp { UnallocatedFixed = 0x00000000 , UnallocatedFMask = 0x00000000 }
 
enum  LSDataSize { LSByte = 0 , LSHalfword = 1 , LSWord = 2 , LSDoubleWord = 3 }
 
enum  ImmBranchType {
  UnknownBranchType = 0 , CondBranchType = 1 , UncondBranchType = 2 , CompareBranchType = 3 ,
  TestBranchType = 4
}
 
enum  AddrMode {
  Offset = (8|4|0) << 21 , PreIndex = (8|4|1) << 21 , PostIndex = (0|4|0) << 21 , NegOffset = (8|0|0) << 21 ,
  NegPreIndex = (8|0|1) << 21 , NegPostIndex = (0|0|0) << 21 , Offset = (8|4|0) << 21 , PreIndex = (8|4|1) << 21 ,
  PostIndex = (0|4|0) << 21
}
 
enum  FPRounding {
  FPTieEven = 0x0 , FPPositiveInfinity = 0x1 , FPNegativeInfinity = 0x2 , FPZero = 0x3 ,
  FPTieAway
}
 
enum  Reg31Mode { Reg31IsStackPointer , Reg31IsZeroRegister }
 
enum  PrintfArgPattern { kPrintfArgW = 1 , kPrintfArgX = 2 , kPrintfArgD = 3 }
 
enum  DebugParameters {
  NO_PARAM = 0 , BREAK = 1 << 0 , LOG_DISASM = 1 << 1 , LOG_REGS = 1 << 2 ,
  LOG_FP_REGS = 1 << 3 , LOG_SYS_REGS = 1 << 4 , LOG_WRITE = 1 << 5 , LOG_STATE = LOG_REGS | LOG_FP_REGS | LOG_SYS_REGS ,
  LOG_ALL = LOG_DISASM | LOG_STATE | LOG_WRITE , TRACE_ENABLE = 1 << 6 , TRACE_DISABLE = 2 << 6 , TRACE_OVERRIDE = 3 << 6
}
 
enum  InstrumentState { InstrumentStateDisable = 0 , InstrumentStateEnable = 1 }
 
enum  CounterType { Gauge = 0 , Cumulative = 1 }
 
enum  BranchType {
  integer_eq = eq , integer_ne = ne , integer_hs = hs , integer_lo = lo ,
  integer_mi = mi , integer_pl = pl , integer_vs = vs , integer_vc = vc ,
  integer_hi = hi , integer_ls = ls , integer_ge = ge , integer_lt = lt ,
  integer_gt = gt , integer_le = le , integer_al = al , integer_nv = nv ,
  always = 16 , never = 17 , reg_zero , reg_not_zero ,
  reg_bit_clear , reg_bit_set , kBranchTypeFirstCondition = eq , kBranchTypeLastCondition = nv ,
  kBranchTypeFirstUsingReg = reg_zero , kBranchTypeFirstUsingBit = reg_bit_clear
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  LinkRegisterStatus { kLRHasNotBeenSaved , kLRHasBeenSaved , kLRHasNotBeenSaved , kLRHasBeenSaved }
 
enum  TargetAddressStorageMode { CAN_INLINE_TARGET_ADDRESS , NEVER_INLINE_TARGET_ADDRESS , CAN_INLINE_TARGET_ADDRESS , NEVER_INLINE_TARGET_ADDRESS }
 
enum  UntagMode { kNotSpeculativeUntag , kSpeculativeUntag }
 
enum  ArrayHasHoles { kArrayCantHaveHoles , kArrayCanHaveHoles }
 
enum  CopyHint { kCopyUnknown , kCopyShort , kCopyLong }
 
enum  DiscardMoveMode { kDontDiscardForSameWReg , kDiscardForSameWReg }
 
enum  SeqStringSetCharCheckIndexType { kIndexIsSmi , kIndexIsInteger32 }
 
enum  SaveFPRegsMode { kDontSaveFPRegs , kSaveFPRegs }
 
enum  ICacheFlushMode { FLUSH_ICACHE_IF_NEEDED , SKIP_ICACHE_FLUSH }
 
enum  PerThreadAssertType {
  HEAP_ALLOCATION_ASSERT , HANDLE_ALLOCATION_ASSERT , HANDLE_DEREFERENCE_ASSERT , DEFERRED_HANDLE_DEREFERENCE_ASSERT ,
  CODE_DEPENDENCY_CHANGE_ASSERT , LAST_PER_THREAD_ASSERT_TYPE
}
 
enum  PerIsolateAssertType {
  JAVASCRIPT_EXECUTION_ASSERT , JAVASCRIPT_EXECUTION_THROWS , ALLOCATION_FAILURE_ASSERT , DEOPTIMIZATION_ASSERT ,
  COMPILATION_ASSERT
}
 
enum  AstPropertiesFlag { kDontSelfOptimize , kDontSoftInline , kDontCache }
 
enum  BailoutReason { ERROR_MESSAGES_LIST =(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage }
 
enum  BignumDtoaMode { BIGNUM_DTOA_SHORTEST , BIGNUM_DTOA_FIXED , BIGNUM_DTOA_PRECISION }
 
enum  BuiltinExtraArguments { NO_EXTRA_ARGUMENTS = 0 , NEEDS_CALLED_FUNCTION = 1 }
 
enum  StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE , JS_FUNCTION_STUB_MODE }
 
enum  HandlerArgumentsMode { DONT_PASS_ARGUMENTS , PASS_ARGUMENTS }
 
enum  AllocationSiteOverrideMode { DONT_OVERRIDE , DISABLE_ALLOCATION_SITES , LAST_ALLOCATION_SITE_OVERRIDE_MODE = DISABLE_ALLOCATION_SITES }
 
enum  StringAddFlags { STRING_ADD_CHECK_NONE = 0 , STRING_ADD_CHECK_LEFT = 1 << 0 , STRING_ADD_CHECK_RIGHT = 1 << 1 , STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT }
 
enum  StringIndexFlags { STRING_INDEX_IS_NUMBER , STRING_INDEX_IS_ARRAY_INDEX }
 
enum  ParseRestriction { NO_PARSE_RESTRICTION , ONLY_SINGLE_FUNCTION_LITERAL }
 
enum  ContextLookupFlags { FOLLOW_CONTEXT_CHAIN = 1 , FOLLOW_PROTOTYPE_CHAIN = 2 , DONT_FOLLOW_CHAINS = 0 , FOLLOW_CHAINS = FOLLOW_CONTEXT_CHAIN | FOLLOW_PROTOTYPE_CHAIN }
 
enum  BindingFlags {
  MUTABLE_IS_INITIALIZED , MUTABLE_CHECK_INITIALIZED , IMMUTABLE_IS_INITIALIZED , IMMUTABLE_CHECK_INITIALIZED ,
  IMMUTABLE_IS_INITIALIZED_HARMONY , IMMUTABLE_CHECK_INITIALIZED_HARMONY , MISSING_BINDING
}
 
enum  ConversionFlags {
  NO_FLAGS = 0 , ALLOW_HEX = 1 , ALLOW_OCTAL = 2 , ALLOW_IMPLICIT_OCTAL = 4 ,
  ALLOW_BINARY = 8 , ALLOW_TRAILING_JUNK = 16
}
 
enum  StepAction {
  StepNone = -1 , StepOut = 0 , StepNext = 1 , StepIn = 2 ,
  StepMin = 3 , StepInMin = 4
}
 
enum  ExceptionBreakType { BreakException = 0 , BreakUncaughtException = 1 }
 
enum  BreakLocatorType { ALL_BREAK_LOCATIONS = 0 , SOURCE_BREAK_LOCATIONS = 1 }
 
enum  BreakPositionAlignment { STATEMENT_ALIGNED = 0 , BREAK_POSITION_ALIGNED = 1 }
 
enum  DtoaMode { DTOA_SHORTEST , DTOA_FIXED , DTOA_PRECISION }
 
enum  ElementsKind {
  FAST_SMI_ELEMENTS , FAST_HOLEY_SMI_ELEMENTS , FAST_ELEMENTS , FAST_HOLEY_ELEMENTS ,
  FAST_DOUBLE_ELEMENTS , FAST_HOLEY_DOUBLE_ELEMENTS , DICTIONARY_ELEMENTS , SLOPPY_ARGUMENTS_ELEMENTS ,
  EXTERNAL_INT8_ELEMENTS , EXTERNAL_UINT8_ELEMENTS , EXTERNAL_INT16_ELEMENTS , EXTERNAL_UINT16_ELEMENTS ,
  EXTERNAL_INT32_ELEMENTS , EXTERNAL_UINT32_ELEMENTS , EXTERNAL_FLOAT32_ELEMENTS , EXTERNAL_FLOAT64_ELEMENTS ,
  EXTERNAL_UINT8_CLAMPED_ELEMENTS , UINT8_ELEMENTS , INT8_ELEMENTS , UINT16_ELEMENTS ,
  INT16_ELEMENTS , UINT32_ELEMENTS , INT32_ELEMENTS , FLOAT32_ELEMENTS ,
  FLOAT64_ELEMENTS , UINT8_CLAMPED_ELEMENTS , FIRST_ELEMENTS_KIND = FAST_SMI_ELEMENTS , LAST_ELEMENTS_KIND = UINT8_CLAMPED_ELEMENTS ,
  FIRST_FAST_ELEMENTS_KIND = FAST_SMI_ELEMENTS , LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS , FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_INT8_ELEMENTS , LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_UINT8_CLAMPED_ELEMENTS ,
  FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND = UINT8_ELEMENTS , LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND = UINT8_CLAMPED_ELEMENTS , TERMINAL_FAST_ELEMENTS_KIND = FAST_HOLEY_ELEMENTS
}
 
enum  FastDtoaMode { FAST_DTOA_SHORTEST , FAST_DTOA_PRECISION }
 
enum  StrictMode { SLOPPY , STRICT }
 
enum  AllocationSpace {
  NEW_SPACE , OLD_POINTER_SPACE , OLD_DATA_SPACE , CODE_SPACE ,
  MAP_SPACE , CELL_SPACE , PROPERTY_CELL_SPACE , LO_SPACE ,
  INVALID_SPACE , FIRST_SPACE = NEW_SPACE , LAST_SPACE = LO_SPACE , FIRST_PAGED_SPACE = OLD_POINTER_SPACE ,
  LAST_PAGED_SPACE = PROPERTY_CELL_SPACE
}
 
enum  PretenureFlag { NOT_TENURED , TENURED }
 
enum  MinimumCapacity { USE_DEFAULT_MINIMUM_CAPACITY , USE_CUSTOM_MINIMUM_CAPACITY }
 
enum  GarbageCollector { SCAVENGER , MARK_COMPACTOR }
 
enum  Executability { NOT_EXECUTABLE , EXECUTABLE }
 
enum  VisitMode { VISIT_ALL , VISIT_ALL_IN_SCAVENGE , VISIT_ALL_IN_SWEEP_NEWSPACE , VISIT_ONLY_STRONG }
 
enum  NativesFlag { NOT_NATIVES_CODE , NATIVES_CODE }
 
enum  InlineCacheState {
  UNINITIALIZED , PREMONOMORPHIC , MONOMORPHIC , PROTOTYPE_FAILURE ,
  POLYMORPHIC , MEGAMORPHIC , GENERIC , DEBUG_STUB ,
  DEFAULT
}
 
enum  CallFunctionFlags { NO_CALL_FUNCTION_FLAGS , CALL_AS_METHOD , WRAP_AND_CALL }
 
enum  CallConstructorFlags { NO_CALL_CONSTRUCTOR_FLAGS , RECORD_CONSTRUCTOR_TARGET }
 
enum  CacheHolderFlag { kCacheOnPrototype , kCacheOnPrototypeReceiverIsDictionary , kCacheOnPrototypeReceiverIsPrimitive , kCacheOnReceiver }
 
enum  StoreBufferEvent { kStoreBufferFullEvent , kStoreBufferStartScanningPagesEvent , kStoreBufferScanningPageEvent }
 
enum  StateTag {
  JS , GC , COMPILER , OTHER ,
  EXTERNAL , IDLE
}
 
enum  CpuFeature {
  SSE4_1 , SSE3 , SAHF , VFP3 ,
  ARMv7 , SUDIV , MLS , UNALIGNED_ACCESSES ,
  MOVW_MOVT_IMMEDIATE_LOADS , VFP32DREGS , NEON , FPU ,
  FP64FPU , MIPSr1 , MIPSr2 , MIPSr6 ,
  ALWAYS_ALIGN_CSP , NUMBER_OF_CPU_FEATURES
}
 
enum  SmiCheckType { DONT_DO_SMI_CHECK , DO_SMI_CHECK }
 
enum  ScopeType {
  EVAL_SCOPE , FUNCTION_SCOPE , MODULE_SCOPE , GLOBAL_SCOPE ,
  CATCH_SCOPE , BLOCK_SCOPE , WITH_SCOPE
}
 
enum  VariableMode {
  VAR , CONST_LEGACY , LET , CONST ,
  MODULE , INTERNAL , TEMPORARY , DYNAMIC ,
  DYNAMIC_GLOBAL , DYNAMIC_LOCAL
}
 
enum  InitializationFlag { kNeedsInitialization , kCreatedInitialized }
 
enum  MaybeAssignedFlag { kNotAssigned , kMaybeAssigned }
 
enum  ClearExceptionFlag { KEEP_EXCEPTION , CLEAR_EXCEPTION }
 
enum  MinusZeroMode { TREAT_MINUS_ZERO_AS_ZERO , FAIL_ON_MINUS_ZERO }
 
enum  Signedness { kSigned , kUnsigned }
 
enum  FunctionKind {
  kNormalFunction = 0 , kArrowFunction = 1 , kGeneratorFunction = 2 , kConciseMethod = 4 ,
  kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod
}
 
enum  GCIdleTimeActionType {
  DONE , DO_NOTHING , DO_INCREMENTAL_MARKING , DO_SCAVENGE ,
  DO_FULL_GC , DO_FINALIZE_SWEEPING
}
 
enum  LoggingAndProfiling { LOGGING_AND_PROFILING_ENABLED , LOGGING_AND_PROFILING_DISABLED }
 
enum  MarksHandling { TRANSFER_MARKS , IGNORE_MARKS }
 
enum  ArrayStorageAllocationMode { DONT_INITIALIZE_ARRAY_ELEMENTS , INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE }
 
enum  SweepingMode { SWEEP_ONLY , SWEEP_AND_VISIT_LIVE_OBJECTS }
 
enum  SkipListRebuildingMode { REBUILD_SKIP_LIST , IGNORE_SKIP_LIST }
 
enum  FreeSpaceTreatmentMode { IGNORE_FREE_SPACE , ZAP_FREE_SPACE }
 
enum  SemiSpaceId { kFromSpace = 0 , kToSpace = 1 }
 
enum  HAliasing { kMustAlias , kMayAlias , kNoAlias }
 
enum  PropertyAccessType { LOAD , STORE }
 
enum  GVNFlag { kNumberOfTrackedSideEffects = 0 GVN_TRACKED_FLAG_LIST(COUNT_FLAG) , kNumberOfUntrackedSideEffects = 0 GVN_UNTRACKED_FLAG_LIST(COUNT_FLAG) , kNumberOfFlags = kNumberOfTrackedSideEffects + kNumberOfUntrackedSideEffects }
 
enum  RemovableSimulate { REMOVABLE_SIMULATE , FIXED_SIMULATE }
 
enum  InliningKind { NORMAL_RETURN , CONSTRUCT_CALL_RETURN , GETTER_CALL_RETURN , SETTER_CALL_RETURN }
 
enum  LoadKeyedHoleMode { NEVER_RETURN_HOLE , ALLOW_RETURN_HOLE }
 
enum  StoreFieldOrKeyedMode { INITIALIZING_STORE , STORE_TO_INITIALIZED_ENTRY }
 
enum  FrameType {
  JS_FUNCTION , JS_CONSTRUCT , JS_GETTER , JS_SETTER ,
  ARGUMENTS_ADAPTOR , STUB
}
 
enum  ArgumentsAllowedFlag { ARGUMENTS_NOT_ALLOWED , ARGUMENTS_ALLOWED }
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  ScaleFactor {
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_half_pointer_size = times_2 , times_pointer_size = times_4 , times_twice_pointer_size = times_8 ,
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_pointer_size = times_4 , times_1 = 0 , times_2 = 1 ,
  times_4 = 2 , times_8 = 3 , times_int_size = times_4 , times_half_pointer_size = times_2 ,
  times_pointer_size = times_4 , times_twice_pointer_size = times_8
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  RegisterValueType { REGISTER_VALUE_IS_SMI , REGISTER_VALUE_IS_INT32 , REGISTER_VALUE_IS_SMI , REGISTER_VALUE_IS_INT32 }
 
enum  PrototypeCheckType { CHECK_ALL_MAPS , SKIP_RECEIVER }
 
enum  IcCheckType { ELEMENT , PROPERTY }
 
enum  OverwriteMode { NO_OVERWRITE , OVERWRITE_LEFT , OVERWRITE_RIGHT }
 
enum  KeyedStoreCheckMap { kDontCheckMap , kCheckMap }
 
enum  KeyedStoreIncrementLength { kDontIncrementLength , kIncrementLength }
 
enum  InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK , DISABLE_INLINED_SMI_CHECK }
 
enum  MayAccessDecision { YES , NO , UNKNOWN }
 
enum  ElementInSetsRelation { kInsideNone = 0 , kInsideFirst = 1 , kInsideSecond = 2 , kInsideBoth = 3 }
 
enum  ContainedInLattice { kNotYet = 0 , kLatticeIn = 1 , kLatticeOut = 2 , kLatticeUnknown = 3 }
 
enum  NumberUntagDMode { NUMBER_CANDIDATE_IS_SMI , NUMBER_CANDIDATE_IS_ANY_TAGGED }
 
enum  RegisterKind { UNALLOCATED_REGISTERS , GENERAL_REGISTERS , DOUBLE_REGISTERS }
 
enum  TypeofState {
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF ,
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF
}
 
enum  SoftwareInterruptCodes {
  kCallRtRedirected = 0x10 , kBreakpoint = 0x20 , kStopCode = 1 << 23 , call_rt_redirected = 0xfffff ,
  call_rt_redirected = 0xfffff
}
 
enum  Opcode {
  AND = 0 << 21 , EOR = 1 << 21 , SUB = 2 << 21 , RSB = 3 << 21 ,
  ADD = 4 << 21 , ADC = 5 << 21 , SBC = 6 << 21 , RSC = 7 << 21 ,
  TST = 8 << 21 , TEQ = 9 << 21 , CMP = 10 << 21 , CMN = 11 << 21 ,
  ORR = 12 << 21 , MOV = 13 << 21 , BIC = 14 << 21 , MVN = 15 << 21 ,
  SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift , JAL = ((0 << 3) + 3) << kOpcodeShift ,
  BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift , BGTZ = ((0 << 3) + 7) << kOpcodeShift ,
  ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift , SLTIU = ((1 << 3) + 3) << kOpcodeShift ,
  ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift , LUI = ((1 << 3) + 7) << kOpcodeShift ,
  BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift , BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift ,
  BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift , DADDI = ((3 << 3) + 0) << kOpcodeShift , SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift ,
  SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift , LWL = ((4 << 3) + 2) << kOpcodeShift ,
  LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift , LWR = ((4 << 3) + 6) << kOpcodeShift ,
  SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift , SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift , BEQZC = ((6 << 3) + 6) << kOpcodeShift ,
  PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift , SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift ,
  JAL = ((0 << 3) + 3) << kOpcodeShift , BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift ,
  BGTZ = ((0 << 3) + 7) << kOpcodeShift , ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift ,
  SLTIU = ((1 << 3) + 3) << kOpcodeShift , ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift ,
  LUI = ((1 << 3) + 7) << kOpcodeShift , DAUI = ((3 << 3) + 5) << kOpcodeShift , BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift ,
  BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift , BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift ,
  DADDI = ((3 << 3) + 0) << kOpcodeShift , DADDIU = ((3 << 3) + 1) << kOpcodeShift , LDL = ((3 << 3) + 2) << kOpcodeShift , LDR = ((3 << 3) + 3) << kOpcodeShift ,
  SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift , SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift ,
  LWL = ((4 << 3) + 2) << kOpcodeShift , LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift ,
  LWR = ((4 << 3) + 6) << kOpcodeShift , LWU = ((4 << 3) + 7) << kOpcodeShift , SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift ,
  SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift , SDL = ((5 << 3) + 4) << kOpcodeShift , SDR = ((5 << 3) + 5) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LLD = ((6 << 3) + 4) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift ,
  BEQZC = ((6 << 3) + 6) << kOpcodeShift , LD = ((6 << 3) + 7) << kOpcodeShift , PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift ,
  SCD = ((7 << 3) + 4) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift , SD = ((7 << 3) + 7) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift
}
 
enum  SecondaryField {
  SLL = ((0 << 3) + 0) , MOVCI = ((0 << 3) + 1) , SRL = ((0 << 3) + 2) , SRA = ((0 << 3) + 3) ,
  SLLV = ((0 << 3) + 4) , SRLV = ((0 << 3) + 6) , SRAV = ((0 << 3) + 7) , JR = ((1 << 3) + 0) ,
  JALR = ((1 << 3) + 1) , MOVZ = 0x40000000 , MOVN = 0x00000000 , BREAK = 1 << 0 ,
  MFHI = ((2 << 3) + 0) , CLZ_R6 = ((2 << 3) + 0) , CLO_R6 = ((2 << 3) + 1) , MFLO = ((2 << 3) + 2) ,
  MULT = ((3 << 3) + 0) , MULTU = ((3 << 3) + 1) , DIV = ((3 << 3) + 2) , DIVU = ((3 << 3) + 3) ,
  ADD = 4 << 21 , ADDU = ((4 << 3) + 1) , SUB = 2 << 21 , SUBU = ((4 << 3) + 3) ,
  AND = 0 << 21 , OR = ((4 << 3) + 5) , XOR = ((4 << 3) + 6) , NOR = ((4 << 3) + 7) ,
  SLT = ((5 << 3) + 2) , SLTU = ((5 << 3) + 3) , TGE = ((6 << 3) + 0) , TGEU = ((6 << 3) + 1) ,
  TLT = ((6 << 3) + 2) , TLTU = ((6 << 3) + 3) , TEQ = 9 << 21 , SELEQZ_S = ((6 << 3) + 5) ,
  TNE = ((6 << 3) + 6) , SELNEZ_S = ((6 << 3) + 7) , MUL_MUH = ((3 << 3) + 0) , MUL_MUH_U = ((3 << 3) + 1) ,
  MUL_OP = ((0 << 3) + 2) , MUH_OP = ((0 << 3) + 3) , DIV_OP = ((0 << 3) + 2) , MOD_OP = ((0 << 3) + 3) ,
  DIV_MOD = ((3 << 3) + 2) , DIV_MOD_U = ((3 << 3) + 3) , MUL = ((0 << 3) + 2) , CLZ = 1 << 4 ,
  CLO = ((4 << 3) + 1) , EXT = ((0 << 3) + 0) , INS = ((0 << 3) + 4) , BLTZ = ((0 << 3) + 0) << 16 ,
  BGEZ = ((0 << 3) + 1) << 16 , BLTZAL = ((2 << 3) + 0) << 16 , BGEZAL = ((2 << 3) + 1) << 16 , BGEZALL = ((2 << 3) + 3) << 16 ,
  MFC1 = ((0 << 3) + 0) << 21 , CFC1 = ((0 << 3) + 2) << 21 , MFHC1 = ((0 << 3) + 3) << 21 , MTC1 = ((0 << 3) + 4) << 21 ,
  CTC1 = ((0 << 3) + 6) << 21 , MTHC1 = ((0 << 3) + 7) << 21 , BC1 = ((1 << 3) + 0) << 21 , S = 1 << 20 ,
  D = ((2 << 3) + 1) << 21 , W = 1 << 21 , L = 1 << 20 , PS = ((2 << 3) + 6) << 21 ,
  ROUND_L_S = ((1 << 3) + 0) , TRUNC_L_S = ((1 << 3) + 1) , CEIL_L_S = ((1 << 3) + 2) , FLOOR_L_S = ((1 << 3) + 3) ,
  ROUND_W_S = ((1 << 3) + 4) , TRUNC_W_S = ((1 << 3) + 5) , CEIL_W_S = ((1 << 3) + 6) , FLOOR_W_S = ((1 << 3) + 7) ,
  CVT_D_S = ((4 << 3) + 1) , CVT_W_S = ((4 << 3) + 4) , CVT_L_S = ((4 << 3) + 5) , CVT_PS_S = ((4 << 3) + 6) ,
  ADD_D = ((0 << 3) + 0) , SUB_D = ((0 << 3) + 1) , MUL_D = ((0 << 3) + 2) , DIV_D = ((0 << 3) + 3) ,
  SQRT_D = ((0 << 3) + 4) , ABS_D = ((0 << 3) + 5) , MOV_D = ((0 << 3) + 6) , NEG_D = ((0 << 3) + 7) ,
  ROUND_L_D = ((1 << 3) + 0) , TRUNC_L_D = ((1 << 3) + 1) , CEIL_L_D = ((1 << 3) + 2) , FLOOR_L_D = ((1 << 3) + 3) ,
  ROUND_W_D = ((1 << 3) + 4) , TRUNC_W_D = ((1 << 3) + 5) , CEIL_W_D = ((1 << 3) + 6) , FLOOR_W_D = ((1 << 3) + 7) ,
  MIN = ((3 << 3) + 4) , MINA = ((3 << 3) + 5) , MAX = ((3 << 3) + 6) , MAXA = ((3 << 3) + 7) ,
  CVT_S_D = ((4 << 3) + 0) , CVT_W_D = ((4 << 3) + 4) , CVT_L_D = ((4 << 3) + 5) , C_F_D = ((6 << 3) + 0) ,
  C_UN_D = ((6 << 3) + 1) , C_EQ_D = ((6 << 3) + 2) , C_UEQ_D = ((6 << 3) + 3) , C_OLT_D = ((6 << 3) + 4) ,
  C_ULT_D = ((6 << 3) + 5) , C_OLE_D = ((6 << 3) + 6) , C_ULE_D = ((6 << 3) + 7) , CVT_S_W = ((4 << 3) + 0) ,
  CVT_D_W = ((4 << 3) + 1) , CVT_S_L = ((4 << 3) + 0) , CVT_D_L = ((4 << 3) + 1) , BC1EQZ = ((2 << 2) + 1) << 21 ,
  BC1NEZ = ((3 << 2) + 1) << 21 , CMP_AF = ((0 << 3) + 0) , CMP_UN = ((0 << 3) + 1) , CMP_EQ = ((0 << 3) + 2) ,
  CMP_UEQ = ((0 << 3) + 3) , CMP_LT = ((0 << 3) + 4) , CMP_ULT = ((0 << 3) + 5) , CMP_LE = ((0 << 3) + 6) ,
  CMP_ULE = ((0 << 3) + 7) , CMP_SAF = ((1 << 3) + 0) , CMP_SUN = ((1 << 3) + 1) , CMP_SEQ = ((1 << 3) + 2) ,
  CMP_SUEQ = ((1 << 3) + 3) , CMP_SSLT = ((1 << 3) + 4) , CMP_SSULT = ((1 << 3) + 5) , CMP_SLE = ((1 << 3) + 6) ,
  CMP_SULE = ((1 << 3) + 7) , CMP_AT = ((2 << 3) + 0) , CMP_OR = ((2 << 3) + 1) , CMP_UNE = ((2 << 3) + 2) ,
  CMP_NE = ((2 << 3) + 3) , CMP_UGE = ((2 << 3) + 4) , CMP_OGE = ((2 << 3) + 5) , CMP_UGT = ((2 << 3) + 6) ,
  CMP_OGT = ((2 << 3) + 7) , CMP_SAT = ((3 << 3) + 0) , CMP_SOR = ((3 << 3) + 1) , CMP_SUNE = ((3 << 3) + 2) ,
  CMP_SNE = ((3 << 3) + 3) , CMP_SUGE = ((3 << 3) + 4) , CMP_SOGE = ((3 << 3) + 5) , CMP_SUGT = ((3 << 3) + 6) ,
  CMP_SOGT = ((3 << 3) + 7) , SEL = ((2 << 3) + 0) , SELEQZ_C = ((2 << 3) + 4) , SELNEZ_C = ((2 << 3) + 7) ,
  MADD_D = ((4 << 3) + 1) , NULLSF = 0 , SLL = ((0 << 3) + 0) , MOVCI = ((0 << 3) + 1) ,
  SRL = ((0 << 3) + 2) , SRA = ((0 << 3) + 3) , SLLV = ((0 << 3) + 4) , SRLV = ((0 << 3) + 6) ,
  SRAV = ((0 << 3) + 7) , JR = ((1 << 3) + 0) , JALR = ((1 << 3) + 1) , MOVZ = 0x40000000 ,
  MOVN = 0x00000000 , BREAK = 1 << 0 , MFHI = ((2 << 3) + 0) , CLZ_R6 = ((2 << 3) + 0) ,
  CLO_R6 = ((2 << 3) + 1) , MFLO = ((2 << 3) + 2) , DSLLV = ((2 << 3) + 4) , DSRLV = ((2 << 3) + 6) ,
  DSRAV = ((2 << 3) + 7) , MULT = ((3 << 3) + 0) , MULTU = ((3 << 3) + 1) , DIV = ((3 << 3) + 2) ,
  DIVU = ((3 << 3) + 3) , DMULT = ((3 << 3) + 4) , DMULTU = ((3 << 3) + 5) , DDIV = ((3 << 3) + 6) ,
  DDIVU = ((3 << 3) + 7) , ADD = 4 << 21 , ADDU = ((4 << 3) + 1) , SUB = 2 << 21 ,
  SUBU = ((4 << 3) + 3) , AND = 0 << 21 , OR = ((4 << 3) + 5) , XOR = ((4 << 3) + 6) ,
  NOR = ((4 << 3) + 7) , SLT = ((5 << 3) + 2) , SLTU = ((5 << 3) + 3) , DADD = ((5 << 3) + 4) ,
  DADDU = ((5 << 3) + 5) , DSUB = ((5 << 3) + 6) , DSUBU = ((5 << 3) + 7) , TGE = ((6 << 3) + 0) ,
  TGEU = ((6 << 3) + 1) , TLT = ((6 << 3) + 2) , TLTU = ((6 << 3) + 3) , TEQ = 9 << 21 ,
  SELEQZ_S = ((6 << 3) + 5) , TNE = ((6 << 3) + 6) , SELNEZ_S = ((6 << 3) + 7) , DSLL = ((7 << 3) + 0) ,
  DSRL = ((7 << 3) + 2) , DSRA = ((7 << 3) + 3) , DSLL32 = ((7 << 3) + 4) , DSRL32 = ((7 << 3) + 6) ,
  DSRA32 = ((7 << 3) + 7) , MUL_MUH = ((3 << 3) + 0) , MUL_MUH_U = ((3 << 3) + 1) , D_MUL_MUH = ((7 << 2) + 0) ,
  D_MUL_MUH_U = ((7 << 2) + 1) , MUL_OP = ((0 << 3) + 2) , MUH_OP = ((0 << 3) + 3) , DIV_OP = ((0 << 3) + 2) ,
  MOD_OP = ((0 << 3) + 3) , DIV_MOD = ((3 << 3) + 2) , DIV_MOD_U = ((3 << 3) + 3) , D_DIV_MOD = ((3 << 3) + 6) ,
  D_DIV_MOD_U = ((3 << 3) + 7) , MUL = ((0 << 3) + 2) , CLZ = 1 << 4 , CLO = ((4 << 3) + 1) ,
  EXT = ((0 << 3) + 0) , DEXTM = ((0 << 3) + 1) , DEXTU = ((0 << 3) + 2) , DEXT = ((0 << 3) + 3) ,
  INS = ((0 << 3) + 4) , DINSM = ((0 << 3) + 5) , DINSU = ((0 << 3) + 6) , DINS = ((0 << 3) + 7) ,
  DSBH = ((4 << 3) + 4) , BLTZ = ((0 << 3) + 0) << 16 , BGEZ = ((0 << 3) + 1) << 16 , BLTZAL = ((2 << 3) + 0) << 16 ,
  BGEZAL = ((2 << 3) + 1) << 16 , BGEZALL = ((2 << 3) + 3) << 16 , DAHI = ((0 << 3) + 6) << 16 , DATI = ((3 << 3) + 6) << 16 ,
  MFC1 = ((0 << 3) + 0) << 21 , DMFC1 = ((0 << 3) + 1) << 21 , CFC1 = ((0 << 3) + 2) << 21 , MFHC1 = ((0 << 3) + 3) << 21 ,
  MTC1 = ((0 << 3) + 4) << 21 , DMTC1 = ((0 << 3) + 5) << 21 , CTC1 = ((0 << 3) + 6) << 21 , MTHC1 = ((0 << 3) + 7) << 21 ,
  BC1 = ((1 << 3) + 0) << 21 , S = 1 << 20 , D = ((2 << 3) + 1) << 21 , W = 1 << 21 ,
  L = 1 << 20 , PS = ((2 << 3) + 6) << 21 , ROUND_L_S = ((1 << 3) + 0) , TRUNC_L_S = ((1 << 3) + 1) ,
  CEIL_L_S = ((1 << 3) + 2) , FLOOR_L_S = ((1 << 3) + 3) , ROUND_W_S = ((1 << 3) + 4) , TRUNC_W_S = ((1 << 3) + 5) ,
  CEIL_W_S = ((1 << 3) + 6) , FLOOR_W_S = ((1 << 3) + 7) , CVT_D_S = ((4 << 3) + 1) , CVT_W_S = ((4 << 3) + 4) ,
  CVT_L_S = ((4 << 3) + 5) , CVT_PS_S = ((4 << 3) + 6) , ADD_D = ((0 << 3) + 0) , SUB_D = ((0 << 3) + 1) ,
  MUL_D = ((0 << 3) + 2) , DIV_D = ((0 << 3) + 3) , SQRT_D = ((0 << 3) + 4) , ABS_D = ((0 << 3) + 5) ,
  MOV_D = ((0 << 3) + 6) , NEG_D = ((0 << 3) + 7) , ROUND_L_D = ((1 << 3) + 0) , TRUNC_L_D = ((1 << 3) + 1) ,
  CEIL_L_D = ((1 << 3) + 2) , FLOOR_L_D = ((1 << 3) + 3) , ROUND_W_D = ((1 << 3) + 4) , TRUNC_W_D = ((1 << 3) + 5) ,
  CEIL_W_D = ((1 << 3) + 6) , FLOOR_W_D = ((1 << 3) + 7) , MIN = ((3 << 3) + 4) , MINA = ((3 << 3) + 5) ,
  MAX = ((3 << 3) + 6) , MAXA = ((3 << 3) + 7) , CVT_S_D = ((4 << 3) + 0) , CVT_W_D = ((4 << 3) + 4) ,
  CVT_L_D = ((4 << 3) + 5) , C_F_D = ((6 << 3) + 0) , C_UN_D = ((6 << 3) + 1) , C_EQ_D = ((6 << 3) + 2) ,
  C_UEQ_D = ((6 << 3) + 3) , C_OLT_D = ((6 << 3) + 4) , C_ULT_D = ((6 << 3) + 5) , C_OLE_D = ((6 << 3) + 6) ,
  C_ULE_D = ((6 << 3) + 7) , CVT_S_W = ((4 << 3) + 0) , CVT_D_W = ((4 << 3) + 1) , CVT_S_L = ((4 << 3) + 0) ,
  CVT_D_L = ((4 << 3) + 1) , BC1EQZ = ((2 << 2) + 1) << 21 , BC1NEZ = ((3 << 2) + 1) << 21 , CMP_AF = ((0 << 3) + 0) ,
  CMP_UN = ((0 << 3) + 1) , CMP_EQ = ((0 << 3) + 2) , CMP_UEQ = ((0 << 3) + 3) , CMP_LT = ((0 << 3) + 4) ,
  CMP_ULT = ((0 << 3) + 5) , CMP_LE = ((0 << 3) + 6) , CMP_ULE = ((0 << 3) + 7) , CMP_SAF = ((1 << 3) + 0) ,
  CMP_SUN = ((1 << 3) + 1) , CMP_SEQ = ((1 << 3) + 2) , CMP_SUEQ = ((1 << 3) + 3) , CMP_SSLT = ((1 << 3) + 4) ,
  CMP_SSULT = ((1 << 3) + 5) , CMP_SLE = ((1 << 3) + 6) , CMP_SULE = ((1 << 3) + 7) , CMP_AT = ((2 << 3) + 0) ,
  CMP_OR = ((2 << 3) + 1) , CMP_UNE = ((2 << 3) + 2) , CMP_NE = ((2 << 3) + 3) , CMP_UGE = ((2 << 3) + 4) ,
  CMP_OGE = ((2 << 3) + 5) , CMP_UGT = ((2 << 3) + 6) , CMP_OGT = ((2 << 3) + 7) , CMP_SAT = ((3 << 3) + 0) ,
  CMP_SOR = ((3 << 3) + 1) , CMP_SUNE = ((3 << 3) + 2) , CMP_SNE = ((3 << 3) + 3) , CMP_SUGE = ((3 << 3) + 4) ,
  CMP_SOGE = ((3 << 3) + 5) , CMP_SUGT = ((3 << 3) + 6) , CMP_SOGT = ((3 << 3) + 7) , SEL = ((2 << 3) + 0) ,
  SELEQZ_C = ((2 << 3) + 4) , SELNEZ_C = ((2 << 3) + 7) , MADD_D = ((4 << 3) + 1) , NULLSF = 0
}
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  FPUCondition {
  kNoFPUCondition = -1 , F = 0 , UN = 1 , EQ = 2 ,
  UEQ = 3 , OLT = 4 , ULT = 5 , OLE = 6 ,
  ULE = 7 , kNoFPUCondition = -1 , F = 0 , UN = 1 ,
  EQ = 2 , UEQ = 3 , OLT = 4 , ULT = 5 ,
  OLE = 6 , ULE = 7
}
 
enum  FPURoundingMode {
  RN = 0 << 22 , RZ = 3 << 22 , RP = 1 << 22 , RM = 2 << 22 ,
  kRoundToNearest = RN , kRoundToZero = RZ , kRoundToPlusInf = RP , kRoundToMinusInf = RM ,
  RN = 0 << 22 , RZ = 3 << 22 , RP = 1 << 22 , RM = 2 << 22 ,
  kRoundToNearest = RN , kRoundToZero = RZ , kRoundToPlusInf = RP , kRoundToMinusInf = RM
}
 
enum  CheckForInexactConversion {
  kCheckForInexactConversion , kDontCheckForInexactConversion , kCheckForInexactConversion , kDontCheckForInexactConversion ,
  kCheckForInexactConversion , kDontCheckForInexactConversion
}
 
enum  Hint { no_hint = 0 , no_hint = 0 , no_hint = 0 }
 
enum  LeaveExitFrameMode { EMIT_RETURN = true , NO_EMIT_RETURN = false , EMIT_RETURN = true , NO_EMIT_RETURN = false }
 
enum  TaggingMode {
  TAG_RESULT , DONT_TAG_RESULT , TAG_RESULT , DONT_TAG_RESULT ,
  TAG_RESULT , DONT_TAG_RESULT
}
 
enum  ObjectToDoubleFlags {
  NO_OBJECT_TO_DOUBLE_FLAGS = 0 , OBJECT_NOT_SMI = 1 << 0 , AVOID_NANS_AND_INFINITIES = 1 << 1 , NO_OBJECT_TO_DOUBLE_FLAGS = 0 ,
  OBJECT_NOT_SMI = 1 << 0 , AVOID_NANS_AND_INFINITIES = 1 << 1
}
 
enum  BranchDelaySlot { USE_DELAY_SLOT , PROTECT , USE_DELAY_SLOT , PROTECT }
 
enum  LiFlags {
  OPTIMIZE_SIZE = 0 , CONSTANT_SIZE = 1 , OPTIMIZE_SIZE = 0 , CONSTANT_SIZE = 1 ,
  ADDRESS_LOAD = 2
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  RAStatus { kRAHasNotBeenSaved , kRAHasBeenSaved , kRAHasNotBeenSaved , kRAHasBeenSaved }
 
enum  TypeofState {
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF ,
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF
}
 
enum  SoftwareInterruptCodes {
  kCallRtRedirected = 0x10 , kBreakpoint = 0x20 , kStopCode = 1 << 23 , call_rt_redirected = 0xfffff ,
  call_rt_redirected = 0xfffff
}
 
enum  Opcode {
  AND = 0 << 21 , EOR = 1 << 21 , SUB = 2 << 21 , RSB = 3 << 21 ,
  ADD = 4 << 21 , ADC = 5 << 21 , SBC = 6 << 21 , RSC = 7 << 21 ,
  TST = 8 << 21 , TEQ = 9 << 21 , CMP = 10 << 21 , CMN = 11 << 21 ,
  ORR = 12 << 21 , MOV = 13 << 21 , BIC = 14 << 21 , MVN = 15 << 21 ,
  SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift , JAL = ((0 << 3) + 3) << kOpcodeShift ,
  BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift , BGTZ = ((0 << 3) + 7) << kOpcodeShift ,
  ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift , SLTIU = ((1 << 3) + 3) << kOpcodeShift ,
  ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift , LUI = ((1 << 3) + 7) << kOpcodeShift ,
  BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift , BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift ,
  BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift , DADDI = ((3 << 3) + 0) << kOpcodeShift , SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift ,
  SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift , LWL = ((4 << 3) + 2) << kOpcodeShift ,
  LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift , LWR = ((4 << 3) + 6) << kOpcodeShift ,
  SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift , SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift , BEQZC = ((6 << 3) + 6) << kOpcodeShift ,
  PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift , SPECIAL = 0 << kOpcodeShift , REGIMM = 1 << kOpcodeShift , J = ((0 << 3) + 2) << kOpcodeShift ,
  JAL = ((0 << 3) + 3) << kOpcodeShift , BEQ = ((0 << 3) + 4) << kOpcodeShift , BNE = ((0 << 3) + 5) << kOpcodeShift , BLEZ = ((0 << 3) + 6) << kOpcodeShift ,
  BGTZ = ((0 << 3) + 7) << kOpcodeShift , ADDI = ((1 << 3) + 0) << kOpcodeShift , ADDIU = ((1 << 3) + 1) << kOpcodeShift , SLTI = ((1 << 3) + 2) << kOpcodeShift ,
  SLTIU = ((1 << 3) + 3) << kOpcodeShift , ANDI = ((1 << 3) + 4) << kOpcodeShift , ORI = ((1 << 3) + 5) << kOpcodeShift , XORI = ((1 << 3) + 6) << kOpcodeShift ,
  LUI = ((1 << 3) + 7) << kOpcodeShift , DAUI = ((3 << 3) + 5) << kOpcodeShift , BEQC = ((2 << 3) + 0) << kOpcodeShift , COP1 = ((2 << 3) + 1) << kOpcodeShift ,
  BEQL = ((2 << 3) + 4) << kOpcodeShift , BNEL = ((2 << 3) + 5) << kOpcodeShift , BLEZL = ((2 << 3) + 6) << kOpcodeShift , BGTZL = ((2 << 3) + 7) << kOpcodeShift ,
  DADDI = ((3 << 3) + 0) << kOpcodeShift , DADDIU = ((3 << 3) + 1) << kOpcodeShift , LDL = ((3 << 3) + 2) << kOpcodeShift , LDR = ((3 << 3) + 3) << kOpcodeShift ,
  SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift , SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift , LB = ((4 << 3) + 0) << kOpcodeShift , LH = ((4 << 3) + 1) << kOpcodeShift ,
  LWL = ((4 << 3) + 2) << kOpcodeShift , LW = ((4 << 3) + 3) << kOpcodeShift , LBU = ((4 << 3) + 4) << kOpcodeShift , LHU = ((4 << 3) + 5) << kOpcodeShift ,
  LWR = ((4 << 3) + 6) << kOpcodeShift , LWU = ((4 << 3) + 7) << kOpcodeShift , SB = ((5 << 3) + 0) << kOpcodeShift , SH = ((5 << 3) + 1) << kOpcodeShift ,
  SWL = ((5 << 3) + 2) << kOpcodeShift , SW = ((5 << 3) + 3) << kOpcodeShift , SDL = ((5 << 3) + 4) << kOpcodeShift , SDR = ((5 << 3) + 5) << kOpcodeShift ,
  SWR = ((5 << 3) + 6) << kOpcodeShift , LWC1 = ((6 << 3) + 1) << kOpcodeShift , LLD = ((6 << 3) + 4) << kOpcodeShift , LDC1 = ((6 << 3) + 5) << kOpcodeShift ,
  BEQZC = ((6 << 3) + 6) << kOpcodeShift , LD = ((6 << 3) + 7) << kOpcodeShift , PREF = ((6 << 3) + 3) << kOpcodeShift , SWC1 = ((7 << 3) + 1) << kOpcodeShift ,
  SCD = ((7 << 3) + 4) << kOpcodeShift , SDC1 = ((7 << 3) + 5) << kOpcodeShift , BNEZC = ((7 << 3) + 6) << kOpcodeShift , SD = ((7 << 3) + 7) << kOpcodeShift ,
  COP1X = ((1 << 4) + 3) << kOpcodeShift
}
 
enum  SecondaryField {
  SLL = ((0 << 3) + 0) , MOVCI = ((0 << 3) + 1) , SRL = ((0 << 3) + 2) , SRA = ((0 << 3) + 3) ,
  SLLV = ((0 << 3) + 4) , SRLV = ((0 << 3) + 6) , SRAV = ((0 << 3) + 7) , JR = ((1 << 3) + 0) ,
  JALR = ((1 << 3) + 1) , MOVZ = 0x40000000 , MOVN = 0x00000000 , BREAK = 1 << 0 ,
  MFHI = ((2 << 3) + 0) , CLZ_R6 = ((2 << 3) + 0) , CLO_R6 = ((2 << 3) + 1) , MFLO = ((2 << 3) + 2) ,
  MULT = ((3 << 3) + 0) , MULTU = ((3 << 3) + 1) , DIV = ((3 << 3) + 2) , DIVU = ((3 << 3) + 3) ,
  ADD = 4 << 21 , ADDU = ((4 << 3) + 1) , SUB = 2 << 21 , SUBU = ((4 << 3) + 3) ,
  AND = 0 << 21 , OR = ((4 << 3) + 5) , XOR = ((4 << 3) + 6) , NOR = ((4 << 3) + 7) ,
  SLT = ((5 << 3) + 2) , SLTU = ((5 << 3) + 3) , TGE = ((6 << 3) + 0) , TGEU = ((6 << 3) + 1) ,
  TLT = ((6 << 3) + 2) , TLTU = ((6 << 3) + 3) , TEQ = 9 << 21 , SELEQZ_S = ((6 << 3) + 5) ,
  TNE = ((6 << 3) + 6) , SELNEZ_S = ((6 << 3) + 7) , MUL_MUH = ((3 << 3) + 0) , MUL_MUH_U = ((3 << 3) + 1) ,
  MUL_OP = ((0 << 3) + 2) , MUH_OP = ((0 << 3) + 3) , DIV_OP = ((0 << 3) + 2) , MOD_OP = ((0 << 3) + 3) ,
  DIV_MOD = ((3 << 3) + 2) , DIV_MOD_U = ((3 << 3) + 3) , MUL = ((0 << 3) + 2) , CLZ = 1 << 4 ,
  CLO = ((4 << 3) + 1) , EXT = ((0 << 3) + 0) , INS = ((0 << 3) + 4) , BLTZ = ((0 << 3) + 0) << 16 ,
  BGEZ = ((0 << 3) + 1) << 16 , BLTZAL = ((2 << 3) + 0) << 16 , BGEZAL = ((2 << 3) + 1) << 16 , BGEZALL = ((2 << 3) + 3) << 16 ,
  MFC1 = ((0 << 3) + 0) << 21 , CFC1 = ((0 << 3) + 2) << 21 , MFHC1 = ((0 << 3) + 3) << 21 , MTC1 = ((0 << 3) + 4) << 21 ,
  CTC1 = ((0 << 3) + 6) << 21 , MTHC1 = ((0 << 3) + 7) << 21 , BC1 = ((1 << 3) + 0) << 21 , S = 1 << 20 ,
  D = ((2 << 3) + 1) << 21 , W = 1 << 21 , L = 1 << 20 , PS = ((2 << 3) + 6) << 21 ,
  ROUND_L_S = ((1 << 3) + 0) , TRUNC_L_S = ((1 << 3) + 1) , CEIL_L_S = ((1 << 3) + 2) , FLOOR_L_S = ((1 << 3) + 3) ,
  ROUND_W_S = ((1 << 3) + 4) , TRUNC_W_S = ((1 << 3) + 5) , CEIL_W_S = ((1 << 3) + 6) , FLOOR_W_S = ((1 << 3) + 7) ,
  CVT_D_S = ((4 << 3) + 1) , CVT_W_S = ((4 << 3) + 4) , CVT_L_S = ((4 << 3) + 5) , CVT_PS_S = ((4 << 3) + 6) ,
  ADD_D = ((0 << 3) + 0) , SUB_D = ((0 << 3) + 1) , MUL_D = ((0 << 3) + 2) , DIV_D = ((0 << 3) + 3) ,
  SQRT_D = ((0 << 3) + 4) , ABS_D = ((0 << 3) + 5) , MOV_D = ((0 << 3) + 6) , NEG_D = ((0 << 3) + 7) ,
  ROUND_L_D = ((1 << 3) + 0) , TRUNC_L_D = ((1 << 3) + 1) , CEIL_L_D = ((1 << 3) + 2) , FLOOR_L_D = ((1 << 3) + 3) ,
  ROUND_W_D = ((1 << 3) + 4) , TRUNC_W_D = ((1 << 3) + 5) , CEIL_W_D = ((1 << 3) + 6) , FLOOR_W_D = ((1 << 3) + 7) ,
  MIN = ((3 << 3) + 4) , MINA = ((3 << 3) + 5) , MAX = ((3 << 3) + 6) , MAXA = ((3 << 3) + 7) ,
  CVT_S_D = ((4 << 3) + 0) , CVT_W_D = ((4 << 3) + 4) , CVT_L_D = ((4 << 3) + 5) , C_F_D = ((6 << 3) + 0) ,
  C_UN_D = ((6 << 3) + 1) , C_EQ_D = ((6 << 3) + 2) , C_UEQ_D = ((6 << 3) + 3) , C_OLT_D = ((6 << 3) + 4) ,
  C_ULT_D = ((6 << 3) + 5) , C_OLE_D = ((6 << 3) + 6) , C_ULE_D = ((6 << 3) + 7) , CVT_S_W = ((4 << 3) + 0) ,
  CVT_D_W = ((4 << 3) + 1) , CVT_S_L = ((4 << 3) + 0) , CVT_D_L = ((4 << 3) + 1) , BC1EQZ = ((2 << 2) + 1) << 21 ,
  BC1NEZ = ((3 << 2) + 1) << 21 , CMP_AF = ((0 << 3) + 0) , CMP_UN = ((0 << 3) + 1) , CMP_EQ = ((0 << 3) + 2) ,
  CMP_UEQ = ((0 << 3) + 3) , CMP_LT = ((0 << 3) + 4) , CMP_ULT = ((0 << 3) + 5) , CMP_LE = ((0 << 3) + 6) ,
  CMP_ULE = ((0 << 3) + 7) , CMP_SAF = ((1 << 3) + 0) , CMP_SUN = ((1 << 3) + 1) , CMP_SEQ = ((1 << 3) + 2) ,
  CMP_SUEQ = ((1 << 3) + 3) , CMP_SSLT = ((1 << 3) + 4) , CMP_SSULT = ((1 << 3) + 5) , CMP_SLE = ((1 << 3) + 6) ,
  CMP_SULE = ((1 << 3) + 7) , CMP_AT = ((2 << 3) + 0) , CMP_OR = ((2 << 3) + 1) , CMP_UNE = ((2 << 3) + 2) ,
  CMP_NE = ((2 << 3) + 3) , CMP_UGE = ((2 << 3) + 4) , CMP_OGE = ((2 << 3) + 5) , CMP_UGT = ((2 << 3) + 6) ,
  CMP_OGT = ((2 << 3) + 7) , CMP_SAT = ((3 << 3) + 0) , CMP_SOR = ((3 << 3) + 1) , CMP_SUNE = ((3 << 3) + 2) ,
  CMP_SNE = ((3 << 3) + 3) , CMP_SUGE = ((3 << 3) + 4) , CMP_SOGE = ((3 << 3) + 5) , CMP_SUGT = ((3 << 3) + 6) ,
  CMP_SOGT = ((3 << 3) + 7) , SEL = ((2 << 3) + 0) , SELEQZ_C = ((2 << 3) + 4) , SELNEZ_C = ((2 << 3) + 7) ,
  MADD_D = ((4 << 3) + 1) , NULLSF = 0 , SLL = ((0 << 3) + 0) , MOVCI = ((0 << 3) + 1) ,
  SRL = ((0 << 3) + 2) , SRA = ((0 << 3) + 3) , SLLV = ((0 << 3) + 4) , SRLV = ((0 << 3) + 6) ,
  SRAV = ((0 << 3) + 7) , JR = ((1 << 3) + 0) , JALR = ((1 << 3) + 1) , MOVZ = 0x40000000 ,
  MOVN = 0x00000000 , BREAK = 1 << 0 , MFHI = ((2 << 3) + 0) , CLZ_R6 = ((2 << 3) + 0) ,
  CLO_R6 = ((2 << 3) + 1) , MFLO = ((2 << 3) + 2) , DSLLV = ((2 << 3) + 4) , DSRLV = ((2 << 3) + 6) ,
  DSRAV = ((2 << 3) + 7) , MULT = ((3 << 3) + 0) , MULTU = ((3 << 3) + 1) , DIV = ((3 << 3) + 2) ,
  DIVU = ((3 << 3) + 3) , DMULT = ((3 << 3) + 4) , DMULTU = ((3 << 3) + 5) , DDIV = ((3 << 3) + 6) ,
  DDIVU = ((3 << 3) + 7) , ADD = 4 << 21 , ADDU = ((4 << 3) + 1) , SUB = 2 << 21 ,
  SUBU = ((4 << 3) + 3) , AND = 0 << 21 , OR = ((4 << 3) + 5) , XOR = ((4 << 3) + 6) ,
  NOR = ((4 << 3) + 7) , SLT = ((5 << 3) + 2) , SLTU = ((5 << 3) + 3) , DADD = ((5 << 3) + 4) ,
  DADDU = ((5 << 3) + 5) , DSUB = ((5 << 3) + 6) , DSUBU = ((5 << 3) + 7) , TGE = ((6 << 3) + 0) ,
  TGEU = ((6 << 3) + 1) , TLT = ((6 << 3) + 2) , TLTU = ((6 << 3) + 3) , TEQ = 9 << 21 ,
  SELEQZ_S = ((6 << 3) + 5) , TNE = ((6 << 3) + 6) , SELNEZ_S = ((6 << 3) + 7) , DSLL = ((7 << 3) + 0) ,
  DSRL = ((7 << 3) + 2) , DSRA = ((7 << 3) + 3) , DSLL32 = ((7 << 3) + 4) , DSRL32 = ((7 << 3) + 6) ,
  DSRA32 = ((7 << 3) + 7) , MUL_MUH = ((3 << 3) + 0) , MUL_MUH_U = ((3 << 3) + 1) , D_MUL_MUH = ((7 << 2) + 0) ,
  D_MUL_MUH_U = ((7 << 2) + 1) , MUL_OP = ((0 << 3) + 2) , MUH_OP = ((0 << 3) + 3) , DIV_OP = ((0 << 3) + 2) ,
  MOD_OP = ((0 << 3) + 3) , DIV_MOD = ((3 << 3) + 2) , DIV_MOD_U = ((3 << 3) + 3) , D_DIV_MOD = ((3 << 3) + 6) ,
  D_DIV_MOD_U = ((3 << 3) + 7) , MUL = ((0 << 3) + 2) , CLZ = 1 << 4 , CLO = ((4 << 3) + 1) ,
  EXT = ((0 << 3) + 0) , DEXTM = ((0 << 3) + 1) , DEXTU = ((0 << 3) + 2) , DEXT = ((0 << 3) + 3) ,
  INS = ((0 << 3) + 4) , DINSM = ((0 << 3) + 5) , DINSU = ((0 << 3) + 6) , DINS = ((0 << 3) + 7) ,
  DSBH = ((4 << 3) + 4) , BLTZ = ((0 << 3) + 0) << 16 , BGEZ = ((0 << 3) + 1) << 16 , BLTZAL = ((2 << 3) + 0) << 16 ,
  BGEZAL = ((2 << 3) + 1) << 16 , BGEZALL = ((2 << 3) + 3) << 16 , DAHI = ((0 << 3) + 6) << 16 , DATI = ((3 << 3) + 6) << 16 ,
  MFC1 = ((0 << 3) + 0) << 21 , DMFC1 = ((0 << 3) + 1) << 21 , CFC1 = ((0 << 3) + 2) << 21 , MFHC1 = ((0 << 3) + 3) << 21 ,
  MTC1 = ((0 << 3) + 4) << 21 , DMTC1 = ((0 << 3) + 5) << 21 , CTC1 = ((0 << 3) + 6) << 21 , MTHC1 = ((0 << 3) + 7) << 21 ,
  BC1 = ((1 << 3) + 0) << 21 , S = 1 << 20 , D = ((2 << 3) + 1) << 21 , W = 1 << 21 ,
  L = 1 << 20 , PS = ((2 << 3) + 6) << 21 , ROUND_L_S = ((1 << 3) + 0) , TRUNC_L_S = ((1 << 3) + 1) ,
  CEIL_L_S = ((1 << 3) + 2) , FLOOR_L_S = ((1 << 3) + 3) , ROUND_W_S = ((1 << 3) + 4) , TRUNC_W_S = ((1 << 3) + 5) ,
  CEIL_W_S = ((1 << 3) + 6) , FLOOR_W_S = ((1 << 3) + 7) , CVT_D_S = ((4 << 3) + 1) , CVT_W_S = ((4 << 3) + 4) ,
  CVT_L_S = ((4 << 3) + 5) , CVT_PS_S = ((4 << 3) + 6) , ADD_D = ((0 << 3) + 0) , SUB_D = ((0 << 3) + 1) ,
  MUL_D = ((0 << 3) + 2) , DIV_D = ((0 << 3) + 3) , SQRT_D = ((0 << 3) + 4) , ABS_D = ((0 << 3) + 5) ,
  MOV_D = ((0 << 3) + 6) , NEG_D = ((0 << 3) + 7) , ROUND_L_D = ((1 << 3) + 0) , TRUNC_L_D = ((1 << 3) + 1) ,
  CEIL_L_D = ((1 << 3) + 2) , FLOOR_L_D = ((1 << 3) + 3) , ROUND_W_D = ((1 << 3) + 4) , TRUNC_W_D = ((1 << 3) + 5) ,
  CEIL_W_D = ((1 << 3) + 6) , FLOOR_W_D = ((1 << 3) + 7) , MIN = ((3 << 3) + 4) , MINA = ((3 << 3) + 5) ,
  MAX = ((3 << 3) + 6) , MAXA = ((3 << 3) + 7) , CVT_S_D = ((4 << 3) + 0) , CVT_W_D = ((4 << 3) + 4) ,
  CVT_L_D = ((4 << 3) + 5) , C_F_D = ((6 << 3) + 0) , C_UN_D = ((6 << 3) + 1) , C_EQ_D = ((6 << 3) + 2) ,
  C_UEQ_D = ((6 << 3) + 3) , C_OLT_D = ((6 << 3) + 4) , C_ULT_D = ((6 << 3) + 5) , C_OLE_D = ((6 << 3) + 6) ,
  C_ULE_D = ((6 << 3) + 7) , CVT_S_W = ((4 << 3) + 0) , CVT_D_W = ((4 << 3) + 1) , CVT_S_L = ((4 << 3) + 0) ,
  CVT_D_L = ((4 << 3) + 1) , BC1EQZ = ((2 << 2) + 1) << 21 , BC1NEZ = ((3 << 2) + 1) << 21 , CMP_AF = ((0 << 3) + 0) ,
  CMP_UN = ((0 << 3) + 1) , CMP_EQ = ((0 << 3) + 2) , CMP_UEQ = ((0 << 3) + 3) , CMP_LT = ((0 << 3) + 4) ,
  CMP_ULT = ((0 << 3) + 5) , CMP_LE = ((0 << 3) + 6) , CMP_ULE = ((0 << 3) + 7) , CMP_SAF = ((1 << 3) + 0) ,
  CMP_SUN = ((1 << 3) + 1) , CMP_SEQ = ((1 << 3) + 2) , CMP_SUEQ = ((1 << 3) + 3) , CMP_SSLT = ((1 << 3) + 4) ,
  CMP_SSULT = ((1 << 3) + 5) , CMP_SLE = ((1 << 3) + 6) , CMP_SULE = ((1 << 3) + 7) , CMP_AT = ((2 << 3) + 0) ,
  CMP_OR = ((2 << 3) + 1) , CMP_UNE = ((2 << 3) + 2) , CMP_NE = ((2 << 3) + 3) , CMP_UGE = ((2 << 3) + 4) ,
  CMP_OGE = ((2 << 3) + 5) , CMP_UGT = ((2 << 3) + 6) , CMP_OGT = ((2 << 3) + 7) , CMP_SAT = ((3 << 3) + 0) ,
  CMP_SOR = ((3 << 3) + 1) , CMP_SUNE = ((3 << 3) + 2) , CMP_SNE = ((3 << 3) + 3) , CMP_SUGE = ((3 << 3) + 4) ,
  CMP_SOGE = ((3 << 3) + 5) , CMP_SUGT = ((3 << 3) + 6) , CMP_SOGT = ((3 << 3) + 7) , SEL = ((2 << 3) + 0) ,
  SELEQZ_C = ((2 << 3) + 4) , SELNEZ_C = ((2 << 3) + 7) , MADD_D = ((4 << 3) + 1) , NULLSF = 0
}
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  FPUCondition {
  kNoFPUCondition = -1 , F = 0 , UN = 1 , EQ = 2 ,
  UEQ = 3 , OLT = 4 , ULT = 5 , OLE = 6 ,
  ULE = 7 , kNoFPUCondition = -1 , F = 0 , UN = 1 ,
  EQ = 2 , UEQ = 3 , OLT = 4 , ULT = 5 ,
  OLE = 6 , ULE = 7
}
 
enum  FPURoundingMode {
  RN = 0 << 22 , RZ = 3 << 22 , RP = 1 << 22 , RM = 2 << 22 ,
  kRoundToNearest = RN , kRoundToZero = RZ , kRoundToPlusInf = RP , kRoundToMinusInf = RM ,
  RN = 0 << 22 , RZ = 3 << 22 , RP = 1 << 22 , RM = 2 << 22 ,
  kRoundToNearest = RN , kRoundToZero = RZ , kRoundToPlusInf = RP , kRoundToMinusInf = RM
}
 
enum  CheckForInexactConversion {
  kCheckForInexactConversion , kDontCheckForInexactConversion , kCheckForInexactConversion , kDontCheckForInexactConversion ,
  kCheckForInexactConversion , kDontCheckForInexactConversion
}
 
enum  Hint { no_hint = 0 , no_hint = 0 , no_hint = 0 }
 
enum  LeaveExitFrameMode { EMIT_RETURN = true , NO_EMIT_RETURN = false , EMIT_RETURN = true , NO_EMIT_RETURN = false }
 
enum  TaggingMode {
  TAG_RESULT , DONT_TAG_RESULT , TAG_RESULT , DONT_TAG_RESULT ,
  TAG_RESULT , DONT_TAG_RESULT
}
 
enum  ObjectToDoubleFlags {
  NO_OBJECT_TO_DOUBLE_FLAGS = 0 , OBJECT_NOT_SMI = 1 << 0 , AVOID_NANS_AND_INFINITIES = 1 << 1 , NO_OBJECT_TO_DOUBLE_FLAGS = 0 ,
  OBJECT_NOT_SMI = 1 << 0 , AVOID_NANS_AND_INFINITIES = 1 << 1
}
 
enum  BranchDelaySlot { USE_DELAY_SLOT , PROTECT , USE_DELAY_SLOT , PROTECT }
 
enum  LiFlags {
  OPTIMIZE_SIZE = 0 , CONSTANT_SIZE = 1 , OPTIMIZE_SIZE = 0 , CONSTANT_SIZE = 1 ,
  ADDRESS_LOAD = 2
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  RAStatus { kRAHasNotBeenSaved , kRAHasBeenSaved , kRAHasNotBeenSaved , kRAHasBeenSaved }
 
enum  NativeType { CORE , EXPERIMENTAL , D8 , TEST }
 
enum  KeyedAccessStoreMode {
  STANDARD_STORE , STORE_TRANSITION_SMI_TO_OBJECT , STORE_TRANSITION_SMI_TO_DOUBLE , STORE_TRANSITION_DOUBLE_TO_OBJECT ,
  STORE_TRANSITION_HOLEY_SMI_TO_OBJECT , STORE_TRANSITION_HOLEY_SMI_TO_DOUBLE , STORE_TRANSITION_HOLEY_DOUBLE_TO_OBJECT , STORE_AND_GROW_NO_TRANSITION ,
  STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT , STORE_AND_GROW_TRANSITION_SMI_TO_DOUBLE , STORE_AND_GROW_TRANSITION_DOUBLE_TO_OBJECT , STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_OBJECT ,
  STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_DOUBLE , STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT , STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS , STORE_NO_TRANSITION_HANDLE_COW
}
 
enum  ContextualMode { NOT_CONTEXTUAL , CONTEXTUAL }
 
enum  MutableMode { MUTABLE , IMMUTABLE }
 
enum  WriteBarrierMode { SKIP_WRITE_BARRIER , UPDATE_WRITE_BARRIER }
 
enum  StoreMode { ALLOW_AS_CONSTANT , FORCE_FIELD }
 
enum  PropertyNormalizationMode { CLEAR_INOBJECT_PROPERTIES , KEEP_INOBJECT_PROPERTIES }
 
enum  PrototypeOptimizationMode { REGULAR_PROTOTYPE , FAST_PROTOTYPE }
 
enum  TransitionFlag { INSERT_TRANSITION , OMIT_TRANSITION }
 
enum  DebugExtraICState { DEBUG_BREAK , DEBUG_PREPARE_STEP_IN }
 
enum  SimpleTransitionFlag { SIMPLE_TRANSITION , FULL_TRANSITION }
 
enum  DescriptorFlag { ALL_DESCRIPTORS , OWN_DESCRIPTORS }
 
enum  MarkingParity { NO_MARKING_PARITY , ODD_MARKING_PARITY , EVEN_MARKING_PARITY }
 
enum  StringRepresentationTag { kSeqStringTag = 0x0 , kConsStringTag = 0x1 , kExternalStringTag = 0x2 , kSlicedStringTag = 0x3 }
 
enum  InstanceType {
  INTERNALIZED_STRING_TYPE , ONE_BYTE_INTERNALIZED_STRING_TYPE , EXTERNAL_INTERNALIZED_STRING_TYPE , EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE ,
  EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE , SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE , SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE , SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE ,
  STRING_TYPE = INTERNALIZED_STRING_TYPE | kNotInternalizedTag , ONE_BYTE_STRING_TYPE , CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag | kNotInternalizedTag , CONS_ONE_BYTE_STRING_TYPE ,
  SLICED_STRING_TYPE , SLICED_ONE_BYTE_STRING_TYPE , EXTERNAL_STRING_TYPE , EXTERNAL_ONE_BYTE_STRING_TYPE ,
  EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE , SHORT_EXTERNAL_STRING_TYPE , SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE , SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE ,
  SYMBOL_TYPE = kNotStringTag , MAP_TYPE , CODE_TYPE , ODDBALL_TYPE ,
  CELL_TYPE , PROPERTY_CELL_TYPE , HEAP_NUMBER_TYPE , MUTABLE_HEAP_NUMBER_TYPE ,
  FOREIGN_TYPE , BYTE_ARRAY_TYPE , FREE_SPACE_TYPE , EXTERNAL_INT8_ARRAY_TYPE ,
  EXTERNAL_UINT8_ARRAY_TYPE , EXTERNAL_INT16_ARRAY_TYPE , EXTERNAL_UINT16_ARRAY_TYPE , EXTERNAL_INT32_ARRAY_TYPE ,
  EXTERNAL_UINT32_ARRAY_TYPE , EXTERNAL_FLOAT32_ARRAY_TYPE , EXTERNAL_FLOAT64_ARRAY_TYPE , EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE ,
  FIXED_INT8_ARRAY_TYPE , FIXED_UINT8_ARRAY_TYPE , FIXED_INT16_ARRAY_TYPE , FIXED_UINT16_ARRAY_TYPE ,
  FIXED_INT32_ARRAY_TYPE , FIXED_UINT32_ARRAY_TYPE , FIXED_FLOAT32_ARRAY_TYPE , FIXED_FLOAT64_ARRAY_TYPE ,
  FIXED_UINT8_CLAMPED_ARRAY_TYPE , FIXED_DOUBLE_ARRAY_TYPE , FILLER_TYPE , DECLARED_ACCESSOR_DESCRIPTOR_TYPE ,
  DECLARED_ACCESSOR_INFO_TYPE , EXECUTABLE_ACCESSOR_INFO_TYPE , ACCESSOR_PAIR_TYPE , ACCESS_CHECK_INFO_TYPE ,
  INTERCEPTOR_INFO_TYPE , CALL_HANDLER_INFO_TYPE , FUNCTION_TEMPLATE_INFO_TYPE , OBJECT_TEMPLATE_INFO_TYPE ,
  SIGNATURE_INFO_TYPE , TYPE_SWITCH_INFO_TYPE , ALLOCATION_SITE_TYPE , ALLOCATION_MEMENTO_TYPE ,
  SCRIPT_TYPE , CODE_CACHE_TYPE , POLYMORPHIC_CODE_CACHE_TYPE , TYPE_FEEDBACK_INFO_TYPE ,
  ALIASED_ARGUMENTS_ENTRY_TYPE , BOX_TYPE , DEBUG_INFO_TYPE , BREAK_POINT_INFO_TYPE ,
  FIXED_ARRAY_TYPE , CONSTANT_POOL_ARRAY_TYPE , SHARED_FUNCTION_INFO_TYPE , JS_FUNCTION_PROXY_TYPE ,
  JS_PROXY_TYPE , JS_VALUE_TYPE , JS_MESSAGE_OBJECT_TYPE , JS_DATE_TYPE ,
  JS_OBJECT_TYPE , JS_CONTEXT_EXTENSION_OBJECT_TYPE , JS_GENERATOR_OBJECT_TYPE , JS_MODULE_TYPE ,
  JS_GLOBAL_OBJECT_TYPE , JS_BUILTINS_OBJECT_TYPE , JS_GLOBAL_PROXY_TYPE , JS_ARRAY_TYPE ,
  JS_ARRAY_BUFFER_TYPE , JS_TYPED_ARRAY_TYPE , JS_DATA_VIEW_TYPE , JS_SET_TYPE ,
  JS_MAP_TYPE , JS_SET_ITERATOR_TYPE , JS_MAP_ITERATOR_TYPE , JS_WEAK_MAP_TYPE ,
  JS_WEAK_SET_TYPE , JS_REGEXP_TYPE , JS_FUNCTION_TYPE , FIRST_TYPE = 0x0 ,
  LAST_TYPE = JS_FUNCTION_TYPE , FIRST_NAME_TYPE = FIRST_TYPE , LAST_NAME_TYPE = SYMBOL_TYPE , FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE ,
  LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE , FIRST_NONSTRING_TYPE = SYMBOL_TYPE , FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_INT8_ARRAY_TYPE , LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE ,
  FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE , LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE , LAST_DATA_TYPE = FILLER_TYPE , FIRST_JS_RECEIVER_TYPE = JS_FUNCTION_PROXY_TYPE ,
  LAST_JS_RECEIVER_TYPE = LAST_TYPE , FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE , LAST_JS_OBJECT_TYPE = LAST_TYPE , FIRST_JS_PROXY_TYPE = JS_FUNCTION_PROXY_TYPE ,
  LAST_JS_PROXY_TYPE = JS_PROXY_TYPE , FIRST_SPEC_OBJECT_TYPE = FIRST_JS_RECEIVER_TYPE , LAST_SPEC_OBJECT_TYPE = LAST_JS_RECEIVER_TYPE , FIRST_NONCALLABLE_SPEC_OBJECT_TYPE = JS_PROXY_TYPE ,
  LAST_NONCALLABLE_SPEC_OBJECT_TYPE = JS_REGEXP_TYPE , NUM_OF_CALLABLE_SPEC_OBJECT_TYPES = 2
}
 
enum  FixedArraySubInstanceType { LAST_FIXED_ARRAY_SUB_TYPE = TRANSITION_ARRAY_SUB_TYPE }
 
enum  CompareResult { LESS = -1 , EQUAL = 0 , GREATER = 1 , NOT_EQUAL = GREATER }
 
enum  EnsureElementsMode { DONT_ALLOW_DOUBLE_ELEMENTS , ALLOW_COPIED_DOUBLE_ELEMENTS , ALLOW_CONVERTED_DOUBLE_ELEMENTS }
 
enum  SetPropertyMode { SET_PROPERTY , DEFINE_PROPERTY }
 
enum  AccessorComponent { ACCESSOR_GETTER , ACCESSOR_SETTER }
 
enum  SearchMode { ALL_ENTRIES , VALID_ENTRIES }
 
enum  BuiltinFunctionId { kArrayCode , kMathPowHalf }
 
enum  AllocationSiteMode { DONT_TRACK_ALLOCATION_SITE , TRACK_ALLOCATION_SITE , LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE }
 
enum  AllowNullsFlag { ALLOW_NULLS , DISALLOW_NULLS }
 
enum  RobustnessFlag { ROBUST_STRING_TRAVERSAL , FAST_STRING_TRAVERSAL }
 
enum  AccessorDescriptorType {
  kDescriptorBitmaskCompare , kDescriptorPointerCompare , kDescriptorPrimitiveValue , kDescriptorObjectDereference ,
  kDescriptorPointerDereference , kDescriptorPointerShift , kDescriptorReturnObject
}
 
enum  PropertyType { NORMAL = 0 , FIELD = 1 , CONSTANT = 2 , CALLBACKS = 3 }
 
enum  TypedArraySetResultCodes { TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE = 0 , TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING = 1 , TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING = 2 , TYPED_ARRAY_SET_NON_TYPED_ARRAY = 3 }
 
enum  PropertyDescriptorIndices {
  IS_ACCESSOR_INDEX , VALUE_INDEX , GETTER_INDEX , SETTER_INDEX ,
  WRITABLE_INDEX , ENUMERABLE_INDEX , CONFIGURABLE_INDEX , DESCRIPTOR_SIZE
}
 
enum  TypeCode {
  UNCLASSIFIED , C_BUILTIN , BUILTIN , RUNTIME_FUNCTION ,
  IC_UTILITY , STATS_COUNTER , TOP_ADDRESS , ACCESSOR ,
  STUB_CACHE_TABLE , RUNTIME_ENTRY , LAZY_DEOPTIMIZATION
}
 
enum  NilValue { kNullValue , kUndefinedValue }
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  ScaleFactor {
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_half_pointer_size = times_2 , times_pointer_size = times_4 , times_twice_pointer_size = times_8 ,
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_pointer_size = times_4 , times_1 = 0 , times_2 = 1 ,
  times_4 = 2 , times_8 = 3 , times_int_size = times_4 , times_half_pointer_size = times_2 ,
  times_pointer_size = times_4 , times_twice_pointer_size = times_8
}
 
enum  TypeofState {
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF ,
  INSIDE_TYPEOF , NOT_INSIDE_TYPEOF , INSIDE_TYPEOF , NOT_INSIDE_TYPEOF
}
 
enum  StackArgumentsAccessorReceiverMode { ARGUMENTS_CONTAIN_RECEIVER , ARGUMENTS_DONT_CONTAIN_RECEIVER }
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  SmiOperationConstraint { PRESERVE_SOURCE_REGISTER , BAILOUT_ON_NO_OVERFLOW , BAILOUT_ON_OVERFLOW , NUMBER_OF_CONSTRAINTS }
 
enum  Condition {
  kNoCondition = -1 , eq = 0 << 28 , ne = 1 << 28 , cs = 2 << 28 ,
  cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 , vs = 6 << 28 ,
  vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , al = 14 << 28 ,
  kSpecialCondition = 15 << 28 , kNumberOfConditions = 16 , hs = cs , lo = cc ,
  eq = 0 << 28 , ne = 1 << 28 , hs = cs , cs = 2 << 28 ,
  lo = cc , cc = 3 << 28 , mi = 4 << 28 , pl = 5 << 28 ,
  vs = 6 << 28 , vc = 7 << 28 , hi = 8 << 28 , ls = 9 << 28 ,
  ge = 10 << 28 , lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 ,
  al = 14 << 28 , nv = 15 , no_condition = -1 , overflow = 0 ,
  no_overflow = 1 , below = 2 , above_equal = 3 , equal = 4 ,
  not_equal = 5 , below_equal = 6 , above = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , carry = below ,
  not_carry = above_equal , zero = equal , not_zero = not_equal , sign = negative ,
  not_sign = positive , kNoCondition = -1 , overflow = 0 , no_overflow = 1 ,
  Uless = 2 , Ugreater_equal = 3 , equal = 4 , not_equal = 5 ,
  Uless_equal = 6 , Ugreater = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , ueq = 16 , nue = 17 ,
  cc_always = 18 , carry = below , not_carry = above_equal , zero = equal ,
  eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 , nz = not_equal ,
  sign = negative , not_sign = positive , mi = 4 << 28 , pl = 5 << 28 ,
  hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 , lt = 11 << 28 ,
  gt = 12 << 28 , le = 13 << 28 , hs = cs , lo = cc ,
  al = 14 << 28 , cc_default = kNoCondition , kNoCondition = -1 , overflow = 0 ,
  no_overflow = 1 , Uless = 2 , Ugreater_equal = 3 , equal = 4 ,
  not_equal = 5 , Uless_equal = 6 , Ugreater = 7 , negative = 8 ,
  positive = 9 , parity_even = 10 , parity_odd = 11 , less = 12 ,
  greater_equal = 13 , less_equal = 14 , greater = 15 , ueq = 16 ,
  nue = 17 , cc_always = 18 , carry = below , not_carry = above_equal ,
  zero = equal , eq = 0 << 28 , not_zero = not_equal , ne = 1 << 28 ,
  nz = not_equal , sign = negative , not_sign = positive , mi = 4 << 28 ,
  pl = 5 << 28 , hi = 8 << 28 , ls = 9 << 28 , ge = 10 << 28 ,
  lt = 11 << 28 , gt = 12 << 28 , le = 13 << 28 , hs = cs ,
  lo = cc , al = 14 << 28 , cc_default = kNoCondition , no_condition = -1 ,
  overflow = 0 , no_overflow = 1 , below = 2 , above_equal = 3 ,
  equal = 4 , not_equal = 5 , below_equal = 6 , above = 7 ,
  negative = 8 , positive = 9 , parity_even = 10 , parity_odd = 11 ,
  less = 12 , greater_equal = 13 , less_equal = 14 , greater = 15 ,
  always = 16 , never = 17 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive ,
  last_condition = greater , no_condition = -1 , overflow = 0 , no_overflow = 1 ,
  below = 2 , above_equal = 3 , equal = 4 , not_equal = 5 ,
  below_equal = 6 , above = 7 , negative = 8 , positive = 9 ,
  parity_even = 10 , parity_odd = 11 , less = 12 , greater_equal = 13 ,
  less_equal = 14 , greater = 15 , carry = below , not_carry = above_equal ,
  zero = equal , not_zero = not_equal , sign = negative , not_sign = positive
}
 
enum  ScaleFactor {
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_half_pointer_size = times_2 , times_pointer_size = times_4 , times_twice_pointer_size = times_8 ,
  times_1 = 0 , times_2 = 1 , times_4 = 2 , times_8 = 3 ,
  times_int_size = times_4 , times_pointer_size = times_4 , times_1 = 0 , times_2 = 1 ,
  times_4 = 2 , times_8 = 3 , times_int_size = times_4 , times_half_pointer_size = times_2 ,
  times_pointer_size = times_4 , times_twice_pointer_size = times_8
}
 
enum  RememberedSetAction {
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET , EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET ,
  EMIT_REMEMBERED_SET , OMIT_REMEMBERED_SET
}
 
enum  SmiCheck {
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK , INLINE_SMI_CHECK , OMIT_SMI_CHECK ,
  INLINE_SMI_CHECK , OMIT_SMI_CHECK
}
 
enum  PointersToHereCheck {
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting , kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting ,
  kPointersToHereMaybeInteresting , kPointersToHereAreAlwaysInteresting
}
 
enum  RegisterValueType { REGISTER_VALUE_IS_SMI , REGISTER_VALUE_IS_INT32 , REGISTER_VALUE_IS_SMI , REGISTER_VALUE_IS_INT32 }
 

Functions

template<class C >
static C * FindInstanceOf (Isolate *isolate, Object *obj)
 
static bool CheckForName (Handle< Name > name, Handle< String > property_name, int offset, int *object_offset)
 
bool SetPropertyOnInstanceIfInherited (Isolate *isolate, const v8::PropertyCallbackInfo< void > &info, v8::Local< v8::Name > name, Handle< Object > value)
 
static Handle< ObjectGetFunctionPrototype (Isolate *isolate, Handle< JSFunction > function)
 
static Handle< ObjectSetFunctionPrototype (Isolate *isolate, Handle< JSFunction > function, Handle< Object > value)
 
static Handle< ObjectArgumentsForInlinedFunction (JavaScriptFrame *frame, Handle< JSFunction > inlined_function, int inlined_frame_index)
 
static int FindFunctionInFrame (JavaScriptFrame *frame, Handle< JSFunction > function)
 
Handle< ObjectGetFunctionArguments (Isolate *isolate, Handle< JSFunction > function)
 
static bool AllowAccessToFunction (Context *current_context, JSFunction *function)
 
MaybeHandle< JSFunctionFindCaller (Isolate *isolate, Handle< JSFunction > function)
 
static void ModuleGetExport (v8::Local< v8::String > property, const v8::PropertyCallbackInfo< v8::Value > &info)
 
static void ModuleSetExport (v8::Local< v8::String > property, v8::Local< v8::Value > value, const v8::PropertyCallbackInfo< v8::Value > &info)
 
static uint32_t SnapshotObjectIdHash (SnapshotObjectId id)
 
char * StrDup (const char *str)
 
char * StrNDup (const char *str, int n)
 
void * AlignedAlloc (size_t size, size_t alignment)
 
void AlignedFree (void *ptr)
 
void FatalProcessOutOfMemory (const char *message)
 
template<typename T >
TNewArray (size_t size)
 
template<typename T >
void DeleteArray (T *array)
 
void InvokeAccessorGetterCallback (v8::Local< v8::Name > property, const v8::PropertyCallbackInfo< v8::Value > &info, v8::AccessorNameGetterCallback getter)
 
void InvokeFunctionCallback (const v8::FunctionCallbackInfo< v8::Value > &info, v8::FunctionCallback callback)
 
double ClobberDoubleRegisters (double x1, double x2, double x3, double x4)
 
void ArrayNativeCode (MacroAssembler *masm, Label *call_generic_code)
 
int EncodeConstantPoolLength (int length)
 
int DecodeConstantPoolLength (int instr)
 
Condition NegateCondition (Condition cond)
 
Condition CommuteCondition (Condition cond)
 
Hint NegateHint (Hint ignored)
 
int JSCallerSavedCode (int n)
 
static int ArgumentsOffsetWithoutFrame (int index)
 
static const char * LabelType (LLabel *label)
 
static Condition ComputeCompareCondition (Token::Value op)
 
static InstanceType TestType (HHasInstanceTypeAndBranch *instr)
 
static Condition BranchCondition (HHasInstanceTypeAndBranch *instr)
 
MemOperand FieldMemOperand (Register object, int offset)
 
Register GetRegisterThatIsNotOneOf (Register reg1, Register reg2=no_reg, Register reg3=no_reg, Register reg4=no_reg, Register reg5=no_reg, Register reg6=no_reg)
 
MemOperand ContextOperand (Register context, int index)
 
MemOperand GlobalObjectOperand ()
 
 STATIC_ASSERT (sizeof(CPURegister)==sizeof(Register))
 
 INITIALIZE_REGISTER (Register, NoReg, 0, 0, CPURegister::kNoRegister)
 
 INITIALIZE_REGISTER (FPRegister, NoFPReg, 0, 0, CPURegister::kNoRegister)
 
 INITIALIZE_REGISTER (CPURegister, NoCPUReg, 0, 0, CPURegister::kNoRegister)
 
 INITIALIZE_REGISTER (Register, no_reg, 0, 0, CPURegister::kNoRegister)
 
 INITIALIZE_REGISTER (Register, wcsp, kSPRegInternalCode, kWRegSizeInBits, CPURegister::kRegister)
 
 INITIALIZE_REGISTER (Register, csp, kSPRegInternalCode, kXRegSizeInBits, CPURegister::kRegister)
 
 ALIAS_REGISTER (Register, ip0, x16)
 
 ALIAS_REGISTER (Register, ip1, x17)
 
 ALIAS_REGISTER (Register, wip0, w16)
 
 ALIAS_REGISTER (Register, wip1, w17)
 
 ALIAS_REGISTER (Register, root, x26)
 
 ALIAS_REGISTER (Register, rr, x26)
 
 ALIAS_REGISTER (Register, cp, x27)
 
 STATIC_ASSERT (kJSSPCode==28)
 
 ALIAS_REGISTER (Register, jssp, x28)
 
 ALIAS_REGISTER (Register, wjssp, w28)
 
 ALIAS_REGISTER (Register, fp, x29)
 
 ALIAS_REGISTER (Register, lr, x30)
 
 ALIAS_REGISTER (Register, xzr, x31)
 
 ALIAS_REGISTER (Register, wzr, w31)
 
 ALIAS_REGISTER (FPRegister, fp_zero, d15)
 
 ALIAS_REGISTER (FPRegister, crankshaft_fp_scratch, d29)
 
 ALIAS_REGISTER (FPRegister, fp_scratch, d30)
 
 ALIAS_REGISTER (FPRegister, fp_scratch1, d30)
 
 ALIAS_REGISTER (FPRegister, fp_scratch2, d31)
 
Register GetAllocatableRegisterThatIsNotOneOf (Register reg1, Register reg2=NoReg, Register reg3=NoReg, Register reg4=NoReg)
 
bool AreAliased (const CPURegister &reg1, const CPURegister &reg2, const CPURegister &reg3=NoReg, const CPURegister &reg4=NoReg, const CPURegister &reg5=NoReg, const CPURegister &reg6=NoReg, const CPURegister &reg7=NoReg, const CPURegister &reg8=NoReg)
 
bool AreSameSizeAndType (const CPURegister &reg1, const CPURegister &reg2, const CPURegister &reg3=NoCPUReg, const CPURegister &reg4=NoCPUReg, const CPURegister &reg5=NoCPUReg, const CPURegister &reg6=NoCPUReg, const CPURegister &reg7=NoCPUReg, const CPURegister &reg8=NoCPUReg)
 
 DEFINE_FLOAT (kFP32PositiveInfinity, 0x7f800000)
 
 DEFINE_FLOAT (kFP32NegativeInfinity, 0xff800000)
 
 DEFINE_DOUBLE (kFP64PositiveInfinity, 0x7ff0000000000000UL)
 
 DEFINE_DOUBLE (kFP64NegativeInfinity, 0xfff0000000000000UL)
 
 DEFINE_DOUBLE (kFP64SignallingNaN, 0x7ff000007f800001)
 
 DEFINE_FLOAT (kFP32SignallingNaN, 0x7f800001)
 
 DEFINE_DOUBLE (kFP64QuietNaN, 0x7ff800007fc00001)
 
 DEFINE_FLOAT (kFP32QuietNaN, 0x7fc00001)
 
 DEFINE_DOUBLE (kFP64DefaultNaN, 0x7ff8000000000000UL)
 
 DEFINE_FLOAT (kFP32DefaultNaN, 0x7fc00000)
 
LSDataSize CalcLSPairDataSize (LoadStorePairOp op)
 
static int64_t ArgumentsOffsetWithoutFrame (int index)
 
static InstanceType TestType (HHasInstanceTypeAndBranch *instr)
 
static Condition BranchCondition (HHasInstanceTypeAndBranch *instr)
 
static const char * LabelType (LLabel *label)
 
MemOperand UntagSmiFieldMemOperand (Register object, int offset)
 
MemOperand UntagSmiMemOperand (Register object, int offset)
 
BranchType InvertBranchType (BranchType type)
 
MemOperand ContextMemOperand (Register context, int index)
 
MemOperand GlobalObjectMemOperand ()
 
 STATIC_ASSERT ((static_cast< int32_t >(-1) >> 1)==-1)
 
 STATIC_ASSERT ((static_cast< uint32_t >(-1) >> 1)==0x7FFFFFFF)
 
static uint32_t float_to_rawbits (float value)
 
static uint64_t double_to_rawbits (double value)
 
static float rawbits_to_float (uint32_t bits)
 
static double rawbits_to_double (uint64_t bits)
 
int CountLeadingZeros (uint64_t value, int width)
 
int CountLeadingSignBits (int64_t value, int width)
 
int CountTrailingZeros (uint64_t value, int width)
 
int CountSetBits (uint64_t value, int width)
 
uint64_t LargestPowerOf2Divisor (uint64_t value)
 
int MaskToBit (uint64_t mask)
 
bool IsSignallingNaN (double num)
 
bool IsSignallingNaN (float num)
 
template<typename T >
bool IsQuietNaN (T num)
 
double ToQuietNaN (double num)
 
float ToQuietNaN (float num)
 
double FusedMultiplyAdd (double op1, double op2, double a)
 
float FusedMultiplyAdd (float op1, float op2, float a)
 
static RelocInfo::Mode GetPositionModeFromTag (int tag)
 
double power_helper (double x, double y)
 
double power_double_int (double x, int y)
 
double power_double_double (double x, double y)
 
bool EvalComparison (Token::Value op, double op1, double op2)
 
int NumberOfBitsSet (uint32_t x)
 
static bool IsTypeof (Expression *expr)
 
static bool MatchLiteralCompareTypeof (Expression *left, Token::Value op, Expression *right, Expression **expr, Handle< String > *check)
 
static bool IsVoidOfLiteral (Expression *expr)
 
static bool MatchLiteralCompareUndefined (Expression *left, Token::Value op, Expression *right, Expression **expr, Isolate *isolate)
 
static bool MatchLiteralCompareNull (Expression *left, Token::Value op, Expression *right, Expression **expr)
 
static Interval ListCaptureRegisters (ZoneList< RegExpTree * > *children)
 
static int IncreaseBy (int previous, int increase)
 
const char * GetBailoutReason (BailoutReason reason)
 
static void InsertIntoString (OStringStream *os, std::string *string)
 
OStreamoperator<< (OStream &os, const BasicBlockProfiler &p)
 
OStreamoperator<< (OStream &os, const BasicBlockProfiler::Data &d)
 
static int NormalizedExponent (uint64_t significand, int exponent)
 
static int EstimatePower (int exponent)
 
static void InitialScaledStartValues (double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
 
static void FixupMultiply10 (int estimated_power, bool is_even, int *decimal_point, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
 
static void GenerateShortestDigits (Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus, bool is_even, Vector< char > buffer, int *length)
 
static void BignumToFixed (int requested_digits, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
 
static void GenerateCountedDigits (int count, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
 
void BignumDtoa (double v, BignumDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
 
static void InitialScaledStartValuesPositiveExponent (double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
 
static void InitialScaledStartValuesNegativeExponentPositivePower (double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
 
static void InitialScaledStartValuesNegativeExponentNegativePower (double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
 
template<typename S >
static int BitSize (S value)
 
static uint64_t ReadUInt64 (Vector< const char > buffer, int from, int digits_to_read)
 
static int HexCharValue (char c)
 
template<typename S >
static int SizeInHexChars (S number)
 
static char HexCharOfValue (int value)
 
static const char * GCFunctionName ()
 
static void SetObjectPrototype (Handle< JSObject > object, Handle< Object > proto)
 
static Handle< JSFunctionInstallFunction (Handle< JSObject > target, const char *name, InstanceType type, int instance_size, MaybeHandle< JSObject > maybe_prototype, Builtins::Name call)
 
static void SetAccessors (Handle< Map > map, Handle< String > name, Handle< JSFunction > func)
 
static void ReplaceAccessors (Handle< Map > map, Handle< String > name, PropertyAttributes attributes, Handle< AccessorPair > accessor_pair)
 
static void AddToWeakNativeContextList (Context *context)
 
static Handle< JSObjectResolveBuiltinIdHolder (Handle< Context > native_context, const char *holder_expr)
 
static void InstallBuiltinFunctionId (Handle< JSObject > holder, const char *function_name, BuiltinFunctionId id)
 
static FixedArrayCreateCache (int size, Handle< JSFunction > factory_function)
 
static uint32_t Hash (RegisteredExtension *extension)
 
 BUILTIN (Illegal)
 
 BUILTIN (EmptyFunction)
 
static void MoveDoubleElements (FixedDoubleArray *dst, int dst_index, FixedDoubleArray *src, int src_index, int len)
 
static bool ArrayPrototypeHasNoElements (Heap *heap, Context *native_context, JSObject *array_proto)
 
static MUST_USE_RESULT MaybeHandle< FixedArrayBaseEnsureJSArrayWithWritableFastElements (Isolate *isolate, Handle< Object > receiver, Arguments *args, int first_added_arg)
 
static bool IsJSArrayFastElementMovingAllowed (Heap *heap, JSArray *receiver)
 
static MUST_USE_RESULT ObjectCallJsBuiltin (Isolate *isolate, const char *name, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
 
 BUILTIN (ArrayPush)
 
 BUILTIN (ArrayPop)
 
 BUILTIN (ArrayShift)
 
 BUILTIN (ArrayUnshift)
 
 BUILTIN (ArraySlice)
 
 BUILTIN (ArraySplice)
 
 BUILTIN (ArrayConcat)
 
 BUILTIN (StrictModePoisonPill)
 
 BUILTIN (GeneratorPoisonPill)
 
static ObjectFindHidden (Heap *heap, Object *object, FunctionTemplateInfo *type)
 
static ObjectTypeCheck (Heap *heap, int argc, Object **argv, FunctionTemplateInfo *info)
 
template<bool is_construct>
static MUST_USE_RESULT ObjectHandleApiCallHelper (BuiltinArguments< NEEDS_CALLED_FUNCTION > args, Isolate *isolate)
 
 BUILTIN (HandleApiCall)
 
 BUILTIN (HandleApiCallConstruct)
 
static MUST_USE_RESULT ObjectHandleApiCallAsFunctionOrConstructor (Isolate *isolate, bool is_construct_call, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
 
 BUILTIN (HandleApiCallAsFunction)
 
 BUILTIN (HandleApiCallAsConstructor)
 
static void Generate_LoadIC_Miss (MacroAssembler *masm)
 
static void Generate_LoadIC_Normal (MacroAssembler *masm)
 
static void Generate_LoadIC_Getter_ForDeopt (MacroAssembler *masm)
 
static void Generate_LoadIC_Slow (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_Initialize (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_Slow (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_Miss (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_Generic (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_String (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_PreMonomorphic (MacroAssembler *masm)
 
static void Generate_StoreIC_Miss (MacroAssembler *masm)
 
static void Generate_StoreIC_Normal (MacroAssembler *masm)
 
static void Generate_StoreIC_Slow (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Slow (MacroAssembler *masm)
 
static void Generate_StoreIC_Setter_ForDeopt (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Generic (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Generic_Strict (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Miss (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Initialize (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_Initialize_Strict (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_PreMonomorphic (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_PreMonomorphic_Strict (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_SloppyArguments (MacroAssembler *masm)
 
static void Generate_CallICStub_DebugBreak (MacroAssembler *masm)
 
static void Generate_LoadIC_DebugBreak (MacroAssembler *masm)
 
static void Generate_StoreIC_DebugBreak (MacroAssembler *masm)
 
static void Generate_KeyedLoadIC_DebugBreak (MacroAssembler *masm)
 
static void Generate_KeyedStoreIC_DebugBreak (MacroAssembler *masm)
 
static void Generate_CompareNilIC_DebugBreak (MacroAssembler *masm)
 
static void Generate_Return_DebugBreak (MacroAssembler *masm)
 
static void Generate_CallFunctionStub_DebugBreak (MacroAssembler *masm)
 
static void Generate_CallConstructStub_DebugBreak (MacroAssembler *masm)
 
static void Generate_CallConstructStub_Recording_DebugBreak (MacroAssembler *masm)
 
static void Generate_Slot_DebugBreak (MacroAssembler *masm)
 
static void Generate_PlainReturn_LiveEdit (MacroAssembler *masm)
 
static void Generate_FrameDropper_LiveEdit (MacroAssembler *masm)
 
int AsciiAlphaToLower (uc32 c)
 
bool IsCarriageReturn (uc32 c)
 
bool IsLineFeed (uc32 c)
 
bool IsInRange (int value, int lower_limit, int higher_limit)
 
bool IsDecimalDigit (uc32 c)
 
bool IsHexDigit (uc32 c)
 
bool IsOctalDigit (uc32 c)
 
bool IsBinaryDigit (uc32 c)
 
bool IsRegExpWord (uc16 c)
 
bool IsRegExpNewline (uc16 c)
 
bool IsRegExpWord (uc32 c)
 
bool IsRegExpNewline (uc32 c)
 
intptr_t HeapObjectTagMask ()
 
static LChunkOptimizeGraph (HGraph *graph)
 
template<class Stub >
static Handle< CodeDoGenerateCode (Stub *stub)
 
static void InitializeDescriptorDispatchedCall (CodeStub *stub, void **value_out)
 
OStreamoperator<< (OStream &os, const CompareNilICStub::State &s)
 
static void InitializeVectorLoadStub (Isolate *isolate, CodeStubDescriptor *descriptor, Address deoptimization_handler)
 
OStreamoperator<< (OStream &os, const ToBooleanStub::Types &s)
 
double modulo (double x, double y)
 
void lazily_initialize_fast_exp ()
 
UnaryMathFunction CreateExpFunction ()
 
UnaryMathFunction CreateSqrtFunction ()
 
double fast_exp (double input)
 
double fast_sqrt (double input)
 
void init_fast_sqrt_function ()
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Unique< T > &value)
 
std::ostream & operator<< (std::ostream &os, const ExternalReference &value)
 
void SetExpectedNofPropertiesFromEstimate (Handle< SharedFunctionInfo > shared, int estimate)
 
static void SetFunctionInfo (Handle< SharedFunctionInfo > function_info, FunctionLiteral *lit, bool is_toplevel, Handle< Script > script)
 
static void RecordFunctionCompilation (Logger::LogEventsAndTags tag, CompilationInfo *info, Handle< SharedFunctionInfo > shared)
 
static bool CompileUnoptimizedCode (CompilationInfo *info)
 
static MUST_USE_RESULT MaybeHandle< CodeGetUnoptimizedCodeCommon (CompilationInfo *info)
 
static MUST_USE_RESULT MaybeHandle< CodeGetCodeFromOptimizedCodeMap (Handle< JSFunction > function, BailoutId osr_ast_id)
 
static void InsertCodeIntoOptimizedCodeMap (CompilationInfo *info)
 
static bool CompileOptimizedPrologue (CompilationInfo *info)
 
static bool GetOptimizedCodeNow (CompilationInfo *info)
 
static bool GetOptimizedCodeLater (CompilationInfo *info)
 
static Handle< SharedFunctionInfoCompileToplevel (CompilationInfo *info)
 
static Maybe< PropertyAttributesUnscopableLookup (LookupIterator *it)
 Lookups a property in an object environment, taking the unscopables into account. More...
 
double JunkStringValue ()
 
double SignedZero (bool negative)
 
unsigned int FastD2UI (double x)
 
float DoubleToFloat32 (double x)
 
double DoubleToInteger (double x)
 
int32_t DoubleToInt32 (double x)
 
template<class Iterator , class EndMark >
bool SubStringEquals (Iterator *current, EndMark end, const char *substring)
 
template<class Iterator , class EndMark >
bool AdvanceToNonspace (UnicodeCache *unicode_cache, Iterator *current, EndMark end)
 
template<int radix_log_2, class Iterator , class EndMark >
double InternalStringToIntDouble (UnicodeCache *unicode_cache, Iterator current, EndMark end, bool negative, bool allow_trailing_junk)
 
template<class Iterator , class EndMark >
double InternalStringToInt (UnicodeCache *unicode_cache, Iterator current, EndMark end, int radix)
 
template<class Iterator , class EndMark >
double InternalStringToDouble (UnicodeCache *unicode_cache, Iterator current, EndMark end, int flags, double empty_string_val)
 
double StringToDouble (UnicodeCache *unicode_cache, const char *str, int flags, double empty_string_val)
 
double StringToDouble (UnicodeCache *unicode_cache, Vector< const uint8_t > str, int flags, double empty_string_val)
 
double StringToDouble (UnicodeCache *unicode_cache, Vector< const uc16 > str, int flags, double empty_string_val)
 
double StringToInt (UnicodeCache *unicode_cache, Vector< const uint8_t > vector, int radix)
 
double StringToInt (UnicodeCache *unicode_cache, Vector< const uc16 > vector, int radix)
 
const char * DoubleToCString (double v, Vector< char > buffer)
 
const char * IntToCString (int n, Vector< char > buffer)
 
char * DoubleToFixedCString (double value, int f)
 
static char * CreateExponentialRepresentation (char *decimal_rep, int exponent, bool negative, int significant_digits)
 
char * DoubleToExponentialCString (double value, int f)
 
char * DoubleToPrecisionCString (double value, int p)
 
char * DoubleToRadixCString (double value, int radix)
 
double StringToDouble (UnicodeCache *unicode_cache, String *string, int flags, double empty_string_val)
 
bool isDigit (int x, int radix)
 
bool isBinaryDigit (int x)
 
int FastD2IChecked (double x)
 
int FastD2I (double x)
 
double FastI2D (int x)
 
double FastUI2D (unsigned x)
 
uint32_t DoubleToUint32 (double x)
 
static bool IsMinusZero (double value)
 
static bool IsSmiDouble (double value)
 
static bool IsInt32Double (double value)
 
static bool IsUint32Double (double value)
 
int32_t NumberToInt32 (Object *number)
 
uint32_t NumberToUint32 (Object *number)
 
bool TryNumberToSize (Isolate *isolate, Object *number, size_t *result)
 
size_t NumberToSize (Isolate *isolate, Object *number)
 
static bool FilterOutCodeCreateEvent (Logger::LogEventsAndTags tag)
 
static v8::Handle< v8::ContextGetDebugEventContext (Isolate *isolate)
 
static bool IsSourceBreakStub (Code *code)
 
static bool IsBreakStub (Code *code)
 
static Handle< CodeDebugBreakForIC (Handle< Code > code, RelocInfo::Mode mode)
 
 RUNTIME_FUNCTION (Debug_Break)
 
static void CollectActiveFunctionsFromThread (Isolate *isolate, ThreadLocalTop *top, List< Handle< JSFunction > > *active_functions, Object *active_code_marker)
 
static int ComputeCodeOffsetFromPcOffset (Code *code, int pc_offset)
 
static int ComputePcOffsetFromCodeOffset (Code *code, int code_offset)
 
static void RedirectActivationsToRecompiledCodeOnThread (Isolate *isolate, ThreadLocalTop *top)
 
static void EnsureFunctionHasDebugBreakSlots (Handle< JSFunction > function)
 
static void RecompileAndRelocateSuspendedGenerators (const List< Handle< JSGeneratorObject > > &generators)
 
 DECLARE_RUNTIME_FUNCTION (Debug_Break)
 
static MemoryChunkAllocateCodeChunk (MemoryAllocator *allocator)
 
static const char * TraceValueType (bool is_smi)
 
static double read_double_value (Address p)
 
uint64_t double_to_uint64 (double d)
 
double uint64_to_double (uint64_t d64)
 
static BignumDtoaMode DtoaToBignumDtoaMode (DtoaMode dtoa_mode)
 
void DoubleToAscii (double v, DtoaMode mode, int requested_digits, Vector< char > buffer, int *sign, int *length, int *point)
 
int ElementsKindToShiftSize (ElementsKind elements_kind)
 
int GetDefaultHeaderSizeForElementsKind (ElementsKind elements_kind)
 
const char * ElementsKindToString (ElementsKind kind)
 
ElementsKind GetFastElementsKindFromSequenceIndex (int sequence_number)
 
int GetSequenceIndexFromFastElementsKind (ElementsKind elements_kind)
 
ElementsKind GetNextTransitionElementsKind (ElementsKind kind)
 
ElementsKind GetNextMoreGeneralFastElementsKind (ElementsKind elements_kind, bool allow_only_packed)
 
static bool IsTypedArrayElementsKind (ElementsKind elements_kind)
 
static bool IsFastTransitionTarget (ElementsKind elements_kind)
 
bool IsMoreGeneralElementsKindTransition (ElementsKind from_kind, ElementsKind to_kind)
 
ElementsKind GetInitialFastElementsKind ()
 
bool IsDictionaryElementsKind (ElementsKind kind)
 
bool IsSloppyArgumentsElements (ElementsKind kind)
 
bool IsExternalArrayElementsKind (ElementsKind kind)
 
bool IsTerminalElementsKind (ElementsKind kind)
 
bool IsFixedTypedArrayElementsKind (ElementsKind kind)
 
bool IsFastElementsKind (ElementsKind kind)
 
bool IsTransitionElementsKind (ElementsKind kind)
 
bool IsFastDoubleElementsKind (ElementsKind kind)
 
bool IsExternalFloatOrDoubleElementsKind (ElementsKind kind)
 
bool IsFixedFloatElementsKind (ElementsKind kind)
 
bool IsDoubleOrFloatElementsKind (ElementsKind kind)
 
bool IsFastSmiOrObjectElementsKind (ElementsKind kind)
 
bool IsFastSmiElementsKind (ElementsKind kind)
 
bool IsFastObjectElementsKind (ElementsKind kind)
 
bool IsFastHoleyElementsKind (ElementsKind kind)
 
bool IsHoleyElementsKind (ElementsKind kind)
 
bool IsFastPackedElementsKind (ElementsKind kind)
 
ElementsKind GetPackedElementsKind (ElementsKind holey_kind)
 
ElementsKind GetHoleyElementsKind (ElementsKind packed_kind)
 
ElementsKind FastSmiToObjectElementsKind (ElementsKind from_kind)
 
bool IsSimpleMapChangeTransition (ElementsKind from_kind, ElementsKind to_kind)
 
bool IsTransitionableFastElementsKind (ElementsKind from_kind)
 
bool CanTransitionToMoreGeneralFastElementsKind (ElementsKind elements_kind, bool allow_only_packed)
 
static bool HasKey (Handle< FixedArray > array, Handle< Object > key_handle)
 
static MUST_USE_RESULT MaybeHandle< ObjectThrowArrayLengthRangeError (Isolate *isolate)
 
static void CopyObjectToObjectElements (FixedArrayBase *from_base, ElementsKind from_kind, uint32_t from_start, FixedArrayBase *to_base, ElementsKind to_kind, uint32_t to_start, int raw_copy_size)
 
static void CopyDictionaryToObjectElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, ElementsKind to_kind, uint32_t to_start, int raw_copy_size)
 
static void CopyDoubleToObjectElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, ElementsKind to_kind, uint32_t to_start, int raw_copy_size)
 
static void CopyDoubleToDoubleElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, uint32_t to_start, int raw_copy_size)
 
static void CopySmiToDoubleElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, uint32_t to_start, int raw_copy_size)
 
static void CopyPackedSmiToDoubleElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, uint32_t to_start, int packed_size, int raw_copy_size)
 
static void CopyObjectToDoubleElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, uint32_t to_start, int raw_copy_size)
 
static void CopyDictionaryToDoubleElements (FixedArrayBase *from_base, uint32_t from_start, FixedArrayBase *to_base, uint32_t to_start, int raw_copy_size)
 
static void TraceTopFrame (Isolate *isolate)
 
void CheckArrayAbuse (Handle< JSObject > obj, const char *op, uint32_t key, bool allow_appending)
 
static ElementsKind ElementsKindForArray (FixedArrayBase *array)
 
MaybeHandle< ObjectArrayConstructInitializeElements (Handle< JSArray > array, Arguments *args)
 
static MUST_USE_RESULT MaybeHandle< ObjectInvoke (bool is_construct, Handle< JSFunction > function, Handle< Object > receiver, int argc, Handle< Object > args[])
 
static void AddCounter (v8::Isolate *isolate, v8::Local< v8::Object > object, StatsCounter *counter, const char *name)
 
static void AddNumber (v8::Isolate *isolate, v8::Local< v8::Object > object, intptr_t value, const char *name)
 
static void AddNumber64 (v8::Isolate *isolate, v8::Local< v8::Object > object, int64_t value, const char *name)
 
static bool Between (uint32_t character, uint32_t from, uint32_t to)
 
static Handle< StringMakeOrFindTwoCharacterString (Isolate *isolate, uint16_t c1, uint16_t c2)
 
template<typename SinkChar , typename StringType >
Handle< StringConcatStringContent (Handle< StringType > result, Handle< String > first, Handle< String > second)
 
static JSFunctionGetTypedArrayFun (ExternalArrayType type, Isolate *isolate)
 
static int NumberCacheHash (Handle< FixedArray > cache, Handle< Object > number)
 
static bool RoundWeed (Vector< char > buffer, int length, uint64_t distance_too_high_w, uint64_t unsafe_interval, uint64_t rest, uint64_t ten_kappa, uint64_t unit)
 
static bool RoundWeedCounted (Vector< char > buffer, int length, uint64_t rest, uint64_t ten_kappa, uint64_t unit, int *kappa)
 
static void BiggestPowerTen (uint32_t number, int number_bits, uint32_t *power, int *exponent)
 
static bool DigitGen (DiyFp low, DiyFp w, DiyFp high, Vector< char > buffer, int *length, int *kappa)
 
static bool DigitGenCounted (DiyFp w, int requested_digits, Vector< char > buffer, int *length, int *kappa)
 
static bool Grisu3 (double v, Vector< char > buffer, int *length, int *decimal_exponent)
 
static bool Grisu3Counted (double v, int requested_digits, Vector< char > buffer, int *length, int *decimal_exponent)
 
bool FastDtoa (double v, FastDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
 
static void FillDigits32FixedLength (uint32_t number, int requested_length, Vector< char > buffer, int *length)
 
static void FillDigits32 (uint32_t number, Vector< char > buffer, int *length)
 
static void FillDigits64FixedLength (uint64_t number, int requested_length, Vector< char > buffer, int *length)
 
static void FillDigits64 (uint64_t number, Vector< char > buffer, int *length)
 
static void RoundUp (Vector< char > buffer, int *length, int *decimal_point)
 
static void FillFractionals (uint64_t fractionals, int exponent, int fractional_count, Vector< char > buffer, int *length, int *decimal_point)
 
static void TrimZeros (Vector< char > buffer, int *length, int *decimal_point)
 
bool FastFixedDtoa (double v, int fractional_count, Vector< char > buffer, int *length, int *decimal_point)
 
static const char * Type2String (Flag::FlagType type)
 
OStreamoperator<< (OStream &os, const Flag &flag)
 
char NormalizeChar (char ch)
 
static void SplitArgument (const char *arg, char *buffer, int buffer_size, const char **name, const char **value, bool *is_bool)
 
static bool EqualNames (const char *a, const char *b)
 
static Flag * FindFlag (const char *name)
 
static char * SkipWhiteSpace (char *p)
 
static char * SkipBlackSpace (char *p)
 
static MapGcSafeMapOfCodeSpaceObject (HeapObject *object)
 
static int GcSafeSizeOfCodeSpaceObject (HeapObject *object)
 
int NumRegs (RegList reglist)
 
void SetUpJSCallerSavedCodeData ()
 
static StackFrameAllocateFrameCopy (StackFrame *frame, Zone *zone)
 
Vector< StackFrame * > CreateStackMap (Isolate *isolate, Zone *zone)
 
 STATIC_ASSERT (kPointerSize==(1<< kPointerSizeLog2))
 
template<typename F >
F FUNCTION_CAST (Address addr)
 
bool IsDynamicVariableMode (VariableMode mode)
 
bool IsDeclaredVariableMode (VariableMode mode)
 
bool IsLexicalVariableMode (VariableMode mode)
 
bool IsImmutableVariableMode (VariableMode mode)
 
bool IsValidFunctionKind (FunctionKind kind)
 
bool IsArrowFunction (FunctionKind kind)
 
bool IsGeneratorFunction (FunctionKind kind)
 
bool IsConciseMethod (FunctionKind kind)
 
template<class T >
Handle< Thandle (T *t, Isolate *isolate)
 
template<class T >
Handle< Thandle (T *t)
 
bool operator< (const Handle< Map > &lhs, const Handle< Map > &rhs)
 
 TEST (GCIdleTimeHandler, EstimateMarkingStepSizeInitial)
 
 TEST (GCIdleTimeHandler, EstimateMarkingStepSizeNonZero)
 
 TEST (GCIdleTimeHandler, EstimateMarkingStepSizeOverflow1)
 
 TEST (GCIdleTimeHandler, EstimateMarkingStepSizeOverflow2)
 
 TEST (GCIdleTimeHandler, EstimateMarkCompactTimeInitial)
 
 TEST (GCIdleTimeHandler, EstimateMarkCompactTimeNonZero)
 
 TEST (GCIdleTimeHandler, EstimateMarkCompactTimeMax)
 
 TEST (GCIdleTimeHandler, EstimateScavengeTimeInitial)
 
 TEST (GCIdleTimeHandler, EstimateScavengeTimeNonZero)
 
 TEST (GCIdleTimeHandler, ScavangeMayHappenSoonInitial)
 
 TEST (GCIdleTimeHandler, ScavangeMayHappenSoonNonZeroFalse)
 
 TEST (GCIdleTimeHandler, ScavangeMayHappenSoonNonZeroTrue)
 
 TEST_F (GCIdleTimeHandlerTest, AfterContextDisposeLargeIdleTime)
 
 TEST_F (GCIdleTimeHandlerTest, AfterContextDisposeSmallIdleTime1)
 
 TEST_F (GCIdleTimeHandlerTest, AfterContextDisposeSmallIdleTime2)
 
 TEST_F (GCIdleTimeHandlerTest, IncrementalMarking1)
 
 TEST_F (GCIdleTimeHandlerTest, IncrementalMarking2)
 
 TEST_F (GCIdleTimeHandlerTest, NotEnoughTime)
 
 TEST_F (GCIdleTimeHandlerTest, StopEventually1)
 
 TEST_F (GCIdleTimeHandlerTest, StopEventually2)
 
 TEST_F (GCIdleTimeHandlerTest, ContinueAfterStop1)
 
 TEST_F (GCIdleTimeHandlerTest, ContinueAfterStop2)
 
 TEST_F (GCIdleTimeHandlerTest, Scavenge)
 
 TEST_F (GCIdleTimeHandlerTest, ScavengeAndDone)
 
 TEST_F (GCIdleTimeHandlerTest, ZeroIdleTimeNothingToDo)
 
 TEST_F (GCIdleTimeHandlerTest, ZeroIdleTimeDoNothingButStartIdleRound)
 
static intptr_t CountTotalHolesSize (Heap *heap)
 
static bool AbortIncrementalMarkingAndCollectGarbage (Heap *heap, AllocationSpace space, const char *gc_reason=NULL)
 
static bool IsUnscavengedHeapObject (Heap *heap, Object **p)
 
 STATIC_ASSERT ((FixedDoubleArray::kHeaderSize &kDoubleAlignmentMask)==0)
 
 STATIC_ASSERT ((ConstantPoolArray::kFirstEntryOffset &kDoubleAlignmentMask)==0)
 
 STATIC_ASSERT ((ConstantPoolArray::kExtendedFirstOffset &kDoubleAlignmentMask)==0)
 
 INLINE (static HeapObject *EnsureDoubleAligned(Heap *heap, HeapObject *object, int size))
 
static HeapObjectEnsureDoubleAligned (Heap *heap, HeapObject *object, int size)
 
static void InitializeScavengingVisitorsTables ()
 
template void Heap::RightTrimFixedArray< Heap::FROM_GC > (FixedArrayBase *, int)
 
template void Heap::RightTrimFixedArray< Heap::FROM_MUTATOR > (FixedArrayBase *, int)
 
static void ForFixedTypedArray (ExternalArrayType array_type, int *element_size, ElementsKind *element_kind)
 
static void WriteOneByteData (Vector< const char > vector, uint8_t *chars, int len)
 
static void WriteTwoByteData (Vector< const char > vector, uint16_t *chars, int len)
 
static void WriteOneByteData (String *s, uint8_t *chars, int len)
 
static void WriteTwoByteData (String *s, uint16_t *chars, int len)
 
 V8_DECLARE_ONCE (initialize_gc_once)
 
static void InitializeGCOnce ()
 
static void MarkObjectGreyDoNotEnqueue (Object *obj)
 
static void MarkBlackOrKeepGrey (HeapObject *heap_object, MarkBit mark_bit, int size)
 
static void MarkBlackOrKeepBlack (HeapObject *heap_object, MarkBit mark_bit, int size)
 
static void PatchIncrementalMarkingRecordWriteStubs (Heap *heap, RecordWriteStub::Mode mode)
 
static void TraceFragmentation (PagedSpace *space)
 
static void ClearMarkbitsInPagedSpace (PagedSpace *space)
 
static void ClearMarkbitsInNewSpace (NewSpace *space)
 
const char * AllocationSpaceName (AllocationSpace space)
 
static int FreeListFragmentation (PagedSpace *space, Page *p)
 
static HeapObjectShortCircuitConsString (Object **p)
 
template<class T >
static void DiscoverGreyObjectsWithIterator (Heap *heap, MarkingDeque *marking_deque, T *it)
 
static int MarkWordToObjectStarts (uint32_t mark_bits, int *starts)
 
static void DiscoverGreyObjectsOnPage (MarkingDeque *marking_deque, MemoryChunk *p)
 
static void DiscoverGreyObjectsInSpace (Heap *heap, MarkingDeque *marking_deque, PagedSpace *space)
 
static void DiscoverGreyObjectsInNewSpace (Heap *heap, MarkingDeque *marking_deque)
 
static void UpdatePointer (HeapObject **address, HeapObject *object)
 
static StringUpdateReferenceInExternalStringTableEntry (Heap *heap, Object **p)
 
static void UpdateSlot (Isolate *isolate, ObjectVisitor *v, SlotsBuffer::SlotType slot_type, Address addr)
 
template<MarkCompactCollector::SweepingParallelism mode>
static intptr_t Free (PagedSpace *space, FreeList *free_list, Address start, int size)
 
template<SweepingMode sweeping_mode, MarkCompactCollector::SweepingParallelism parallelism, SkipListRebuildingMode skip_list_mode, FreeSpaceTreatmentMode free_space_mode>
static int Sweep (PagedSpace *space, FreeList *free_list, Page *p, ObjectVisitor *v)
 
static bool SetMarkBitsUnderInvalidatedCode (Code *code, bool value)
 
static bool IsOnInvalidatedCodeObject (Address addr)
 
static bool ShouldStartSweeperThreads (MarkCompactCollector::SweeperType type)
 
static bool ShouldWaitForSweeperThreads (MarkCompactCollector::SweeperType type)
 
static SlotsBuffer::SlotType SlotTypeForRMode (RelocInfo::Mode rmode)
 
static SlotsBuffer::SlotType DecodeSlotType (SlotsBuffer::ObjectSlot slot)
 
static bool IsValidNonBuiltinContext (Object *context)
 
static bool HasSourceCode (Heap *heap, SharedFunctionInfo *info)
 
static bool MustRecordSlots (Heap *heap)
 
template<class T >
ObjectVisitWeakList (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
template<class T >
static void ClearWeakList (Heap *heap, Object *list)
 
template ObjectVisitWeakList< Code > (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
template ObjectVisitWeakList< JSFunction > (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
template ObjectVisitWeakList< Context > (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
template ObjectVisitWeakList< JSArrayBuffer > (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
template ObjectVisitWeakList< AllocationSite > (Heap *heap, Object *list, WeakObjectRetainer *retainer)
 
static void DoReportStatistics (Isolate *isolate, HistogramInfo *info, const char *description)
 
static bool ComparePointers (void *key1, void *key2)
 
 STATIC_ASSERT (sizeof(MemoryChunk)<=MemoryChunk::kHeaderSize)
 
 STATIC_ASSERT (sizeof(Page)<=MemoryChunk::kHeaderSize)
 
 STATIC_ASSERT (sizeof(LargePage)<=MemoryChunk::kHeaderSize)
 
static void DeleteHeapSnapshot (HeapSnapshot **snapshot_ptr)
 
template<class T >
static int SortByIds (const T *entry1_ptr, const T *entry2_ptr)
 
static bool AddressesMatch (void *key1, void *key2)
 
template<typename T >
static int utoa_impl (T value, const Vector< char > &buffer, int buffer_pos)
 
template<typename T >
static int utoa (T value, const Vector< char > &buffer, int buffer_pos)
 
static void WriteUChar (OutputStreamWriter *w, unibrow::uchar u)
 
static int SerializePosition (int position, const Vector< char > &buffer, int buffer_pos)
 
static bool BoundsCheckKeyMatch (void *key1, void *key2)
 
static void DehoistArrayIndex (ArrayInstructionInterface *array_operation)
 
void TraceGVN (const char *msg,...)
 
OStreamoperator<< (OStream &os, const TrackedEffects &te)
 
static int32_t ConvertAndSetOverflow (Representation r, int64_t result, bool *overflow)
 
static int32_t AddWithoutOverflow (Representation r, int32_t a, int32_t b, bool *overflow)
 
static int32_t SubWithoutOverflow (Representation r, int32_t a, int32_t b, bool *overflow)
 
static int32_t MulWithoutOverflow (const Representation &r, int32_t a, int32_t b, bool *overflow)
 
OStreamoperator<< (OStream &os, const HValue &v)
 
OStreamoperator<< (OStream &os, const TypeOf &t)
 
OStreamoperator<< (OStream &os, const ChangesOf &c)
 
OStreamoperator<< (OStream &os, const HSourcePosition &p)
 
OStreamoperator<< (OStream &os, const NameOf &v)
 
static StringTypeOfString (HConstant *constant, Isolate *isolate)
 
static bool MatchLeftIsOnes (HValue *l, HValue *r, HValue **negated)
 
static bool MatchNegationViaXor (HValue *instr, HValue **negated)
 
static bool MatchDoubleNegation (HValue *instr, HValue **arg)
 
static bool IsIdentityOperation (HValue *arg1, HValue *arg2, int32_t identity)
 
static int32_t AbsMinus1 (int32_t a)
 
static void ReplayEnvironmentNested (const ZoneList< HValue * > *values, HCapturedObject *other)
 
static bool IsInteger32 (double value)
 
bool ConstantIsObject (HConstant *constant, Isolate *isolate)
 
 DEFINE_NEW_H_BITWISE_INSTR (HSar, c_left->NumberValueAsInteger32() >>(c_right->NumberValueAsInteger32() &0x1f)) DEFINE_NEW_H_BITWISE_INSTR(HShl
 
c_left NumberValueAsInteger32 ()<<(c_right -> NumberValueAsInteger32() &0x1f)) HInstruction *HShr::New(Zone *zone, HValue *context, HValue *left, HValue *right)
 
OStreamoperator<< (OStream &os, const HObjectAccess &access)
 
static GVNFlag GVNFlagFromInt (int i)
 
bool StoringValueNeedsWriteBarrier (HValue *value)
 
bool ReceiverObjectNeedsWriteBarrier (HValue *object, HValue *value, HValue *dominator)
 
PointersToHereCheck PointersToHereCheckForObject (HValue *object, HValue *dominator)
 
static bool IsNonDeoptingIntToSmiChange (HChange *change)
 
OStreamoperator<< (OStream &os, const HType &t)
 
static bool IsUnsignedLoad (HLoadKeyed *instr)
 
static bool IsUint32Operation (HValue *instr)
 
OStreamoperator<< (OStream &os, const HBasicBlock &b)
 
static bool CanInlinePropertyAccess (Type *type)
 
static bool IsFastLiteral (Handle< JSObject > boilerplate, int max_depth, int *max_properties)
 
static bool NeedsWrappingFor (Type *type, Handle< JSFunction > target)
 
static bool ComputeReceiverTypes (Expression *expr, HValue *receiver, SmallMapList **t, Zone *zone)
 
static bool AreStringTypes (SmallMapList *types)
 
bool operator< (const FunctionSorter &lhs, const FunctionSorter &rhs)
 
static bool IsAllocationInlineable (Handle< JSFunction > constructor)
 
static Handle< MapTypedArrayMap (Isolate *isolate, ExternalArrayType array_type, ElementsKind target_kind)
 
static bool ShiftAmountsAllowReplaceByRotate (HValue *sa, HValue *const32_minus_sa)
 
bool CanBeZero (HValue *right)
 
static bool IsClassOfTest (CompareOperation *expr)
 
static bool IsLiteralCompareBool (Isolate *isolate, HValue *left, Token::Value op, HValue *right)
 
OStreamoperator<< (OStream &os, const HEnvironment &env)
 
template<class T >
void DeleteNativeObjectAt (const v8::WeakCallbackData< v8::Value, void > &data, int index)
 
static void DestroyGlobalHandle (const v8::WeakCallbackData< v8::Value, void > &data)
 
void ArrayNativeCode (MacroAssembler *masm, bool construct_call, Label *call_generic_code)
 
static bool ExternalArrayOpRequiresTemp (Representation key_representation, ElementsKind elements_kind)
 
Operand FieldOperand (Register object, int offset)
 
Operand FieldOperand (Register object, Register index, ScaleFactor scale, int offset)
 
Operand FixedArrayElementOperand (Register array, Register index_as_smi, int additional_offset=0)
 
Operand ApiParameterOperand (int index)
 
static void FillCache (Isolate *isolate, Handle< Code > code)
 
OStreamoperator<< (OStream &os, const CallICState &s)
 
OStreamoperator<< (OStream &os, const BinaryOpICState &s)
 
const char * GetTransitionMarkModifier (KeyedAccessStoreMode mode)
 
static void LookupForRead (LookupIterator *it)
 
static void ComputeTypeInfoCountDelta (IC::State old_state, IC::State new_state, int *polymorphic_delta, int *generic_delta)
 
static bool MigrateDeprecated (Handle< Object > object)
 
static bool AddOneReceiverMapIfMissing (MapHandleList *receiver_maps, Handle< Map > new_receiver_map)
 
static Handle< ObjectTryConvertKey (Handle< Object > key, Isolate *isolate)
 
bool IsOutOfBoundsAccess (Handle< JSObject > receiver, int index)
 
 RUNTIME_FUNCTION (CallIC_Miss)
 
 RUNTIME_FUNCTION (CallIC_Customization_Miss)
 
 RUNTIME_FUNCTION (LoadIC_Miss)
 
 RUNTIME_FUNCTION (KeyedLoadIC_Miss)
 
 RUNTIME_FUNCTION (KeyedLoadIC_MissFromStubFailure)
 
 RUNTIME_FUNCTION (StoreIC_Miss)
 
 RUNTIME_FUNCTION (StoreIC_MissFromStubFailure)
 
 RUNTIME_FUNCTION (SharedStoreIC_ExtendStorage)
 
 RUNTIME_FUNCTION (KeyedStoreIC_Miss)
 
 RUNTIME_FUNCTION (KeyedStoreIC_MissFromStubFailure)
 
 RUNTIME_FUNCTION (StoreIC_Slow)
 
 RUNTIME_FUNCTION (KeyedStoreIC_Slow)
 
 RUNTIME_FUNCTION (ElementsTransitionAndStoreIC_Miss)
 
 RUNTIME_FUNCTION (BinaryOpIC_Miss)
 
 RUNTIME_FUNCTION (BinaryOpIC_MissWithAllocationSite)
 
 RUNTIME_FUNCTION (CompareIC_Miss)
 
 RUNTIME_FUNCTION (CompareNilIC_Miss)
 
 RUNTIME_FUNCTION (Unreachable)
 
 RUNTIME_FUNCTION (ToBooleanIC_Miss)
 
 RUNTIME_FUNCTION (StoreCallbackProperty)
 
 RUNTIME_FUNCTION (LoadPropertyWithInterceptorOnly)
 Attempts to load a property with an interceptor (which must be present), but doesn't search the prototype chain. More...
 
static ObjectThrowReferenceError (Isolate *isolate, Name *name)
 
 RUNTIME_FUNCTION (LoadPropertyWithInterceptor)
 Loads a property with an interceptor performing post interceptor lookup if interceptor failed. More...
 
 RUNTIME_FUNCTION (StorePropertyWithInterceptor)
 
 RUNTIME_FUNCTION (LoadElementWithInterceptor)
 
 RUNTIME_FUNCTION (VectorLoadIC_MissFromStubFailure)
 
 RUNTIME_FUNCTION (VectorKeyedLoadIC_MissFromStubFailure)
 
void PatchInlinedSmiCode (Address address, InlinedSmiCheck check)
 
 DECLARE_RUNTIME_FUNCTION (KeyedLoadIC_MissFromStubFailure)
 
 DECLARE_RUNTIME_FUNCTION (KeyedStoreIC_MissFromStubFailure)
 
 DECLARE_RUNTIME_FUNCTION (UnaryOpIC_Miss)
 
 DECLARE_RUNTIME_FUNCTION (StoreIC_MissFromStubFailure)
 
 DECLARE_RUNTIME_FUNCTION (ElementsTransitionAndStoreIC_Miss)
 
 DECLARE_RUNTIME_FUNCTION (BinaryOpIC_Miss)
 
 DECLARE_RUNTIME_FUNCTION (BinaryOpIC_MissWithAllocationSite)
 
 DECLARE_RUNTIME_FUNCTION (CompareNilIC_Miss)
 
 DECLARE_RUNTIME_FUNCTION (ToBooleanIC_Miss)
 
 DECLARE_RUNTIME_FUNCTION (VectorLoadIC_MissFromStubFailure)
 
 DECLARE_RUNTIME_FUNCTION (VectorKeyedLoadIC_MissFromStubFailure)
 
 DECLARE_RUNTIME_FUNCTION (StoreCallbackProperty)
 
 DECLARE_RUNTIME_FUNCTION (LoadPropertyWithInterceptorOnly)
 
 DECLARE_RUNTIME_FUNCTION (LoadPropertyWithInterceptor)
 
 DECLARE_RUNTIME_FUNCTION (LoadElementWithInterceptor)
 
 DECLARE_RUNTIME_FUNCTION (StorePropertyWithInterceptor)
 
static Code::Flags CommonStubCacheChecks (Name *name, Map *map, Code::Flags flags)
 
bool InitializeICU (const char *icu_data_file)
 
static bool BackRefMatchesNoCase (Canonicalize *interp_canonicalize, int from, int current, int len, Vector< const uc16 > subject)
 
static bool BackRefMatchesNoCase (Canonicalize *interp_canonicalize, int from, int current, int len, Vector< const uint8_t > subject)
 
static int32_t Load32Aligned (const byte *pc)
 
static int32_t Load16Aligned (const byte *pc)
 
template<typename Char >
static RegExpImpl::IrregexpResult RawMatch (Isolate *isolate, const byte *code_base, Vector< const Char > subject, int *registers, int current, uint32_t current_char)
 
static bool IsVisibleInStackTrace (JSFunction *fun, Object *caller, Object *receiver, bool *seen_caller)
 
static void PrintFrames (Isolate *isolate, StringStream *accumulator, StackFrame::PrintMode mode)
 
static AccessCheckInfoGetAccessCheckInfo (Isolate *isolate, Handle< JSObject > receiver)
 
static MayAccessDecision MayAccessPreCheck (Isolate *isolate, Handle< JSObject > receiver, v8::AccessType type)
 
template<typename StringType >
void SeqStringSet (Handle< StringType > seq_str, int i, uc32 c)
 
template<>
void SeqStringSet (Handle< SeqTwoByteString > seq_str, int i, uc32 c)
 
template<>
void SeqStringSet (Handle< SeqOneByteString > seq_str, int i, uc32 c)
 
template<typename StringType >
Handle< StringType > NewRawString (Factory *factory, int length, PretenureFlag pretenure)
 
template<>
Handle< SeqTwoByteStringNewRawString (Factory *factory, int length, PretenureFlag pretenure)
 
static JSRegExp::Flags RegExpFlagsFromString (Handle< String > str)
 
static MUST_USE_RESULT MaybeHandle< ObjectThrowRegExpException (Handle< JSRegExp > re, Handle< String > pattern, Handle< String > error_text, const char *message)
 
ContainedInLattice AddRange (ContainedInLattice containment, const int *ranges, int ranges_length, Interval new_range)
 
static bool HasFewDifferentCharacters (Handle< String > pattern)
 
static void SetAtomLastCapture (FixedArray *array, String *subject, int from, int to)
 
static void CreateRegExpErrorObjectAndThrow (Handle< JSRegExp > re, Handle< String > error_message, Isolate *isolate)
 
static RegExpEngine::CompilationResult IrregexpRegExpTooBig (Isolate *isolate)
 
static int GetCaseIndependentLetters (Isolate *isolate, uc16 character, bool one_byte_subject, unibrow::uchar *letters)
 
static bool EmitSimpleCharacter (Isolate *isolate, RegExpCompiler *compiler, uc16 c, Label *on_failure, int cp_offset, bool check, bool preloaded)
 
static bool EmitAtomNonLetter (Isolate *isolate, RegExpCompiler *compiler, uc16 c, Label *on_failure, int cp_offset, bool check, bool preloaded)
 
static bool ShortCutEmitCharacterPair (RegExpMacroAssembler *macro_assembler, bool one_byte, uc16 c1, uc16 c2, Label *on_failure)
 
static bool EmitAtomLetter (Isolate *isolate, RegExpCompiler *compiler, uc16 c, Label *on_failure, int cp_offset, bool check, bool preloaded)
 
static void EmitBoundaryTest (RegExpMacroAssembler *masm, int border, Label *fall_through, Label *above_or_equal, Label *below)
 
static void EmitDoubleBoundaryTest (RegExpMacroAssembler *masm, int first, int last, Label *fall_through, Label *in_range, Label *out_of_range)
 
static void EmitUseLookupTable (RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, int min_char, Label *fall_through, Label *even_label, Label *odd_label)
 
static void CutOutRange (RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, int cut_index, Label *even_label, Label *odd_label)
 
static void SplitSearchSpace (ZoneList< int > *ranges, int start_index, int end_index, int *new_start_index, int *new_end_index, int *border)
 
static void GenerateBranches (RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, uc16 min_char, uc16 max_char, Label *fall_through, Label *even_label, Label *odd_label)
 
static void EmitCharClass (RegExpMacroAssembler *macro_assembler, RegExpCharacterClass *cc, bool one_byte, Label *on_failure, int cp_offset, bool check_offset, bool preloaded, Zone *zone)
 
static uint32_t SmearBitsRight (uint32_t v)
 
static bool RangeContainsLatin1Equivalents (CharacterRange range)
 
static bool RangesContainLatin1Equivalents (ZoneList< CharacterRange > *ranges)
 
static void EmitWordCheck (RegExpMacroAssembler *assembler, Label *word, Label *non_word, bool fall_through_on_word)
 
static void EmitHat (RegExpCompiler *compiler, RegExpNode *on_success, Trace *trace)
 
static bool DeterminedAlready (QuickCheckDetails *quick_check, int offset)
 
static void UpdateBoundsCheck (int index, int *checked_up_to)
 
static bool CompareInverseRanges (ZoneList< CharacterRange > *ranges, const int *special_class, int length)
 
static bool CompareRanges (ZoneList< CharacterRange > *ranges, const int *special_class, int length)
 
static void AddClass (const int *elmv, int elmc, ZoneList< CharacterRange > *ranges, Zone *zone)
 
static void AddClassNegated (const int *elmv, int elmc, ZoneList< CharacterRange > *ranges, Zone *zone)
 
static void MoveRanges (ZoneList< CharacterRange > *list, int from, int to, int count)
 
static int InsertRangeInCanonicalList (ZoneList< CharacterRange > *list, int count, CharacterRange insert)
 
 STATIC_ASSERT (BoyerMoorePositionInfo::kMapSize==RegExpMacroAssembler::kTableSize)
 
static int CompareRangeByFrom (const CharacterRange *a, const CharacterRange *b)
 
ContainedInLattice Combine (ContainedInLattice a, ContainedInLattice b)
 
template<typename T , typename P >
int SortedListBSearch (const List< T > &list, P cmp)
 
template<typename T >
int SortedListBSearch (const List< T > &list, T elem)
 
template<typename T , class P >
size_t GetMemoryUsedByList (const List< T, P > &list)
 
static LifetimePosition Min (LifetimePosition a, LifetimePosition b)
 
static LifetimePosition Max (LifetimePosition a, LifetimePosition b)
 
static int UnhandledSortHelper (LiveRange *const *a, LiveRange *const *b)
 
 STATIC_ASSERT (DoubleRegister::kMaxNumAllocatableRegisters >=Register::kMaxNumAllocatableRegisters)
 
static void AddWeakObjectToCodeDependency (Isolate *isolate, Handle< Object > object, Handle< Code > code)
 
int StackSlotOffset (int index)
 
void SetElementSloppy (Handle< JSObject > object, uint32_t index, Handle< Object > value)
 
static bool CompareSubstrings (Handle< String > s1, int pos1, Handle< String > s2, int pos2, int len)
 
static int min (int a, int b)
 
static void NarrowDownInput (SubrangableInput *input, SubrangableOutput *output)
 
static Handle< ObjectUnwrapJSValue (Handle< JSValue > jsValue)
 
static Handle< JSValueWrapInJSValue (Handle< HeapObject > object)
 
static Handle< SharedFunctionInfoUnwrapSharedFunctionInfoFromJSValue (Handle< JSValue > jsValue)
 
static int GetArrayLength (Handle< JSArray > array)
 
static void ReplaceCodeObject (Handle< Code > original, Handle< Code > substitution)
 
static bool IsJSFunctionCode (Code *code)
 
static bool IsInlined (JSFunction *function, SharedFunctionInfo *candidate)
 
static void DeoptimizeDependentFunctions (SharedFunctionInfo *function_info)
 
static int TranslatePosition (int original_position, Handle< JSArray > position_change_array)
 
static Handle< CodePatchPositionsInCode (Handle< Code > code, Handle< JSArray > position_change_array)
 
static Handle< ScriptCreateScriptCopy (Handle< Script > original)
 
static bool CheckActivation (Handle< JSArray > shared_info_array, Handle< JSArray > result, StackFrame *frame, LiveEdit::FunctionPatchabilityStatus status)
 
static bool FixTryCatchHandler (StackFrame *top_frame, StackFrame *bottom_frame)
 
static Object ** SetUpFrameDropperFrame (StackFrame *bottom_js_frame, Handle< Code > code)
 
static const char * DropFrames (Vector< StackFrame * > frames, int top_frame_index, int bottom_js_frame_index, LiveEdit::FrameDropMode *mode, Object ***restarter_frame_function_pointer)
 
template<typename TARGET >
static const char * DropActivationsInActiveThreadImpl (Isolate *isolate, TARGET &target, bool do_drop)
 
static const char * DropActivationsInActiveThread (Handle< JSArray > shared_info_array, Handle< JSArray > result, bool do_drop)
 
static const char * ComputeMarker (Code *code)
 
static void AppendCodeCreateHeader (Log::MessageBuilder *msg, Logger::LogEventsAndTags tag, Code *code)
 
static int EnumerateCompiledFunctions (Heap *heap, Handle< SharedFunctionInfo > *sfis, Handle< Code > *code_objects)
 
static void AddIsolateIdIfNeeded (OStream &os, Isolate *isolate)
 
static void PrepareLogFileName (OStream &os, Isolate *isolate, const char *file_name)
 
 REGISTER (no_reg, -1)
 
 REGISTER (zero_reg, 0)
 
 REGISTER (at, 1)
 
 REGISTER (v0, 2)
 
 REGISTER (v1, 3)
 
 REGISTER (a0, 4)
 
 REGISTER (a1, 5)
 
 REGISTER (a2, 6)
 
 REGISTER (a3, 7)
 
 REGISTER (t0, 8)
 
 REGISTER (t1, 9)
 
 REGISTER (t2, 10)
 
 REGISTER (t3, 11)
 
 REGISTER (t4, 12)
 
 REGISTER (t5, 13)
 
 REGISTER (t6, 14)
 
 REGISTER (t7, 15)
 
 REGISTER (s0, 16)
 
 REGISTER (s1, 17)
 
 REGISTER (s2, 18)
 
 REGISTER (s3, 19)
 
 REGISTER (s4, 20)
 
 REGISTER (s5, 21)
 
 REGISTER (s6, 22)
 
 REGISTER (s7, 23)
 
 REGISTER (t8, 24)
 
 REGISTER (t9, 25)
 
 REGISTER (k0, 26)
 
 REGISTER (k1, 27)
 
 REGISTER (gp, 28)
 
 REGISTER (sp, 29)
 
 REGISTER (fp, 30)
 
 REGISTER (ra, 31)
 
int ToNumber (Register reg)
 
Register ToRegister (int num)
 
 STATIC_ASSERT (kMaxWatchpointCode< kMaxStopCode)
 
static int ArgumentsOffsetWithoutFrame (int index)
 
static const char * LabelType (LLabel *label)
 
static Condition ComputeCompareCondition (Token::Value op)
 
static InstanceType TestType (HHasInstanceTypeAndBranch *instr)
 
static Condition BranchCondition (HHasInstanceTypeAndBranch *instr)
 
bool AreAliased (Register reg1, Register reg2, Register reg3=no_reg, Register reg4=no_reg, Register reg5=no_reg, Register reg6=no_reg, Register reg7=no_reg, Register reg8=no_reg)
 
MemOperand CFunctionArgumentOperand (int index)
 
 REGISTER (a4, 8)
 
 REGISTER (a5, 9)
 
 REGISTER (a6, 10)
 
 REGISTER (a7, 11)
 
 REGISTER (t0, 12)
 
 REGISTER (t1, 13)
 
 REGISTER (t2, 14)
 
 REGISTER (t3, 15)
 
static int ArgumentsOffsetWithoutFrame (int index)
 
static const char * LabelType (LLabel *label)
 
static Condition ComputeCompareCondition (Token::Value op)
 
static InstanceType TestType (HHasInstanceTypeAndBranch *instr)
 
static Condition BranchCondition (HHasInstanceTypeAndBranch *instr)
 
int IntegerLog2 (uint32_t value)
 
void SetNativesFromFile (StartupData *natives_blob)
 Read the Natives (library sources) blob, as generated by js2c + the build system. More...
 
 STATIC_ASSERT ((kStringRepresentationMask|kStringEncodingMask)==Internals::kFullStringRepresentationMask)
 
 STATIC_ASSERT (static_cast< uint32_t >(kStringEncodingMask)==Internals::kStringEncodingMask)
 
 STATIC_ASSERT ((kExternalStringTag|kOneByteStringTag)==Internals::kExternalOneByteRepresentationTag)
 
 STATIC_ASSERT (v8::String::ONE_BYTE_ENCODING==kOneByteStringTag)
 
 STATIC_ASSERT ((kExternalStringTag|kTwoByteStringTag)==Internals::kExternalTwoByteRepresentationTag)
 
 STATIC_ASSERT (v8::String::TWO_BYTE_ENCODING==kTwoByteStringTag)
 
template<>
bool Is< JSFunction > (Object *obj)
 
template<>
bool Is< JSArray > (Object *obj)
 
template<SearchMode search_mode, typename T >
int BinarySearch (T *array, Name *name, int low, int high, int valid_entries)
 
template<SearchMode search_mode, typename T >
int LinearSearch (T *array, Name *name, int len, int valid_entries)
 
template<SearchMode search_mode, typename T >
int Search (T *array, Name *name, int valid_entries)
 
static void EnsureHasTransitionArray (Handle< Map > map)
 
 ACCESSORS (AccessorInfo, expected_receiver_type, Object, kExpectedReceiverTypeOffset) ACCESSORS(DeclaredAccessorDescriptor
 
kSerializedDataOffset ACCESSORS (DeclaredAccessorInfo, descriptor, DeclaredAccessorDescriptor, kDescriptorOffset) ACCESSORS(FunctionTemplateInfo
 
kSerializedDataOffset kPrototypeTemplateOffset ACCESSORS (FunctionTemplateInfo, named_property_handler, Object, kNamedPropertyHandlerOffset) ACCESSORS(FunctionTemplateInfo
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset ACCESSORS (FunctionTemplateInfo, instance_template, Object, kInstanceTemplateOffset) ACCESSORS(FunctionTemplateInfo
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset ACCESSORS (FunctionTemplateInfo, access_check_info, Object, kAccessCheckInfoOffset) ACCESSORS(ObjectTemplateInfo
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset ACCESSORS_TO_SMI (AllocationSite, pretenure_create_count, kPretenureCreateCountOffset) ACCESSORS(AllocationSite
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset kDependentCodeOffset ACCESSORS_TO_SMI (Script, eval_from_instructions_offset, kEvalFrominstructionsOffsetOffset) Script
 
 ACCESSORS (SharedFunctionInfo, optimized_code_map, Object, kOptimizedCodeMapOffset) ACCESSORS(SharedFunctionInfo
 
kFeedbackVectorOffset ACCESSORS (SharedFunctionInfo, instance_class_name, Object, kInstanceClassNameOffset) BOOL_ACCESSORS(FunctionTemplateInfo
 
kFeedbackVectorOffset kHiddenPrototypeBit BOOL_ACCESSORS (FunctionTemplateInfo, flag, needs_access_check, kNeedsAccessCheckBit) BOOL_ACCESSORS(FunctionTemplateInfo
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit BOOL_ACCESSORS (FunctionTemplateInfo, flag, remove_prototype, kRemovePrototypeBit) BOOL_ACCESSORS(FunctionTemplateInfo
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit BOOL_ACCESSORS (SharedFunctionInfo, start_position_and_type, is_expression, kIsExpressionBit) BOOL_ACCESSORS(SharedFunctionInfo
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit BOOL_ACCESSORS (SharedFunctionInfo, compiler_hints, allows_lazy_compilation, kAllowLazyCompilation) BOOL_ACCESSORS(SharedFunctionInfo
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext BOOL_ACCESSORS (SharedFunctionInfo, compiler_hints, uses_arguments, kUsesArguments) BOOL_ACCESSORS(SharedFunctionInfo
 
 PSEUDO_SMI_ACCESSORS_HI (SharedFunctionInfo, formal_parameter_count, kFormalParameterCountOffset) PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo
 
kExpectedNofPropertiesOffset PSEUDO_SMI_ACCESSORS_HI (SharedFunctionInfo, start_position_and_type, kStartPositionAndTypeOffset) PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo
 
kExpectedNofPropertiesOffset kFunctionTokenPositionOffset PSEUDO_SMI_ACCESSORS_HI (SharedFunctionInfo, compiler_hints, kCompilerHintsOffset) PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo
 
kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset PSEUDO_SMI_ACCESSORS_LO (SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo
 
kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset kProfilerTicksOffset BOOL_GETTER (SharedFunctionInfo, compiler_hints, optimization_disabled, kOptimizationDisabled) void SharedFunctionInfo
 
 BOOL_ACCESSORS (SharedFunctionInfo, compiler_hints, inline_builtin, kInlineBuiltin) BOOL_ACCESSORS(SharedFunctionInfo
 
kNameShouldPrintAsAnonymous BOOL_ACCESSORS (SharedFunctionInfo, compiler_hints, is_concise_method, kIsConciseMethod) bool Script
 
 ACCESSORS (JSFunction, prototype_or_initial_map, Object, kPrototypeOrInitialMapOffset) Map *JSFunction
 
template<typename To >
static To * CheckedCast (void *from)
 
static Handle< ObjectPerformCompare (const BitmaskCompareDescriptor &descriptor, char *ptr, Isolate *isolate)
 
static Handle< ObjectPerformCompare (const PointerCompareDescriptor &descriptor, char *ptr, Isolate *isolate)
 
static Handle< ObjectGetPrimitiveValue (const PrimitiveValueDescriptor &descriptor, char *ptr, Isolate *isolate)
 
static Handle< ObjectGetDeclaredAccessorProperty (Handle< Object > receiver, Handle< DeclaredAccessorInfo > info, Isolate *isolate)
 
static bool FindAllCanReadHolder (LookupIterator *it)
 
static bool FindAllCanWriteHolder (LookupIterator *it)
 
OStreamoperator<< (OStream &os, const Brief &v)
 
static bool AnWord (String *str)
 
template<class T >
static int AppendUniqueCallbacks (NeanderArray *callbacks, Handle< typename T::Array > array, int valid_descriptors)
 
static bool ContainsMap (MapHandleList *maps, Handle< Map > map)
 
template<class T >
static Handle< TMaybeNull (T *p)
 
static MapFindClosestElementsTransition (Map *map, ElementsKind to_kind)
 
static Handle< MapAddMissingElementsTransitions (Handle< Map > map, ElementsKind to_kind)
 
static Handle< SeededNumberDictionaryCopyFastElementsToDictionary (Handle< FixedArrayBase > array, int length, Handle< SeededNumberDictionary > dictionary)
 
static SmiGenerateIdentityHash (Isolate *isolate)
 
template<typename ProxyType >
static Handle< SmiGetOrCreateIdentityHashHelper (Handle< ProxyType > proxy)
 
template<typename Dictionary >
static void FreezeDictionary (Dictionary *dictionary)
 
static bool FilterKey (Object *key, PropertyAttributes filter)
 
static bool ContainsOnlyValidKeys (Handle< FixedArray > array)
 
static Handle< FixedArrayReduceFixedArrayTo (Handle< FixedArray > array, int length)
 
static Handle< FixedArrayGetEnumPropertyKeys (Handle< JSObject > object, bool cache_result)
 
static bool UpdateGetterSetterInDictionary (SeededNumberDictionary *dictionary, uint32_t index, Object *getter, Object *setter, PropertyAttributes attributes)
 
template<typename SourceChar >
static void CalculateLineEndsImpl (Isolate *isolate, List< int > *line_ends, Vector< const SourceChar > src, bool include_ending_line)
 
template<typename Char >
static bool CompareRawStringContents (const Char *const a, const Char *const b, int length)
 
static uint32_t ObjectAddressForHashing (Object *object)
 
static bool CheckEquivalent (Map *first, Map *second)
 
Handle< ObjectCacheInitialJSArrayMaps (Handle< Context > native_context, Handle< Map > initial_map)
 
static void ClearWrapperCacheWeakCallback (const v8::WeakCallbackData< v8::Value, void > &data)
 
OStreamoperator<< (OStream &os, const SourceCodeOf &v)
 
static bool IsCodeEquivalent (Code *code, Code *recompiled)
 
static void GetMinInobjectSlack (Map *map, void *data)
 
static void ShrinkInstanceSize (Map *map, void *data)
 
static Code::Age EffectiveAge (Code::Age age)
 
static bool GetOldValue (Isolate *isolate, Handle< JSObject > object, uint32_t index, List< Handle< Object > > *old_values, List< uint32_t > *indices)
 
static void EnqueueSpliceRecord (Handle< JSArray > object, uint32_t index, Handle< JSArray > deleted, uint32_t add_count)
 
static void BeginPerformSplice (Handle< JSArray > object)
 
static void EndPerformSplice (Handle< JSArray > object)
 
static bool CodeListContains (Object *head, Code *code)
 
static void InsertionSortPairs (FixedArray *content, FixedArray *numbers, int len)
 
void HeapSortPairs (FixedArray *content, FixedArray *numbers, int len)
 
template<typename ExternalArrayClass , typename ValueType >
static Handle< ObjectExternalArrayIntSetter (Isolate *isolate, Handle< ExternalArrayClass > receiver, uint32_t index, Handle< Object > value)
 
static ElementsKind FixedToExternalElementsKind (ElementsKind elements_kind)
 
 STATIC_ASSERT (STANDARD_STORE==0)
 
 STATIC_ASSERT (kGrowICDelta==STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT - STORE_TRANSITION_SMI_TO_OBJECT)
 
static KeyedAccessStoreMode GetGrowStoreMode (KeyedAccessStoreMode store_mode)
 
static bool IsTransitionStoreMode (KeyedAccessStoreMode store_mode)
 
static KeyedAccessStoreMode GetNonTransitioningStoreMode (KeyedAccessStoreMode store_mode)
 
static bool IsGrowStoreMode (KeyedAccessStoreMode store_mode)
 
 STATIC_ASSERT ((kSeqStringTag &kIsIndirectStringMask)==0)
 
 STATIC_ASSERT ((kExternalStringTag &kIsIndirectStringMask)==0)
 
 STATIC_ASSERT ((kConsStringTag &kIsIndirectStringMask)==kIsIndirectStringTag)
 
 STATIC_ASSERT ((kSlicedStringTag &kIsIndirectStringMask)==kIsIndirectStringTag)
 
 STATIC_ASSERT (IS_POWER_OF_TWO(kSlicedNotConsMask))
 
static bool IsShortcutCandidate (int type)
 
 STATIC_ASSERT (JS_OBJECT_TYPE==Internals::kJSObjectType)
 
 STATIC_ASSERT (FIRST_NONSTRING_TYPE==Internals::kFirstNonstringType)
 
 STATIC_ASSERT (ODDBALL_TYPE==Internals::kOddballType)
 
 STATIC_ASSERT (FOREIGN_TYPE==Internals::kForeignType)
 
template<class C >
bool Is (Object *obj)
 
static void DisposeOptimizedCompileJob (OptimizedCompileJob *job, bool restore_function_code)
 
OStreamflush (OStream &os)
 
OStreamendl (OStream &os)
 
OStreamhex (OStream &os)
 
OStreamdec (OStream &os)
 
static bool IsPrint (uint16_t c)
 
static bool IsSpace (uint16_t c)
 
static bool IsOK (uint16_t c)
 
static OStreamPrintUC16 (OStream &os, uint16_t c, bool(*pred)(uint16_t))
 
OStreamoperator<< (OStream &os, const AsReversiblyEscapedUC16 &c)
 
OStreamoperator<< (OStream &os, const AsUC16 &c)
 
static bool ContainsLabel (ZoneList< const AstRawString * > *labels, const AstRawString *label)
 
bool CheckAndDeclareArrowParameter (ParserTraits *traits, Expression *expression, Scope *scope, int *num_params, Scanner::Location *dupe_loc)
 
static void AddRangeOrEscape (ZoneList< CharacterRange > *ranges, uc16 char_class, CharacterRange range, Zone *zone)
 
static void DeleteCodeEntry (CodeEntry **entry_ptr)
 
static void DeleteCpuProfile (CpuProfile **profile_ptr)
 
OStreamoperator<< (OStream &os, const LookupResult &r)
 
OStreamoperator<< (OStream &os, const Descriptor &d)
 
static int LabelToInt (Label *label)
 
 RUNTIME_FUNCTION (Runtime_SetInitialize)
 
 RUNTIME_FUNCTION (Runtime_SetAdd)
 
 RUNTIME_FUNCTION (Runtime_SetHas)
 
 RUNTIME_FUNCTION (Runtime_SetDelete)
 
 RUNTIME_FUNCTION (Runtime_SetClear)
 
 RUNTIME_FUNCTION (Runtime_SetGetSize)
 
 RUNTIME_FUNCTION (Runtime_SetIteratorInitialize)
 
 RUNTIME_FUNCTION (Runtime_SetIteratorNext)
 
 RUNTIME_FUNCTION (Runtime_MapInitialize)
 
 RUNTIME_FUNCTION (Runtime_MapGet)
 
 RUNTIME_FUNCTION (Runtime_MapHas)
 
 RUNTIME_FUNCTION (Runtime_MapDelete)
 
 RUNTIME_FUNCTION (Runtime_MapClear)
 
 RUNTIME_FUNCTION (Runtime_MapSet)
 
 RUNTIME_FUNCTION (Runtime_MapGetSize)
 
 RUNTIME_FUNCTION (Runtime_MapIteratorInitialize)
 
 RUNTIME_FUNCTION (Runtime_GetWeakMapEntries)
 
 RUNTIME_FUNCTION (Runtime_MapIteratorNext)
 
static Handle< JSWeakCollectionWeakCollectionInitialize (Isolate *isolate, Handle< JSWeakCollection > weak_collection)
 
 RUNTIME_FUNCTION (Runtime_WeakCollectionInitialize)
 
 RUNTIME_FUNCTION (Runtime_WeakCollectionGet)
 
 RUNTIME_FUNCTION (Runtime_WeakCollectionHas)
 
 RUNTIME_FUNCTION (Runtime_WeakCollectionDelete)
 
 RUNTIME_FUNCTION (Runtime_WeakCollectionSet)
 
 RUNTIME_FUNCTION (Runtime_GetWeakSetValues)
 
 RUNTIME_FUNCTION (Runtime_ObservationWeakMapCreate)
 
 RUNTIME_FUNCTION (Runtime_CompileLazy)
 
 RUNTIME_FUNCTION (Runtime_CompileOptimized)
 
 RUNTIME_FUNCTION (Runtime_NotifyStubFailure)
 
 RUNTIME_FUNCTION (Runtime_NotifyDeoptimized)
 
static bool IsSuitableForOnStackReplacement (Isolate *isolate, Handle< JSFunction > function, Handle< Code > current_code)
 
 RUNTIME_FUNCTION (Runtime_CompileForOnStackReplacement)
 
 RUNTIME_FUNCTION (Runtime_TryInstallOptimizedCode)
 
bool CodeGenerationFromStringsAllowed (Isolate *isolate, Handle< Context > context)
 
 RUNTIME_FUNCTION (Runtime_CompileString)
 
static ObjectPair CompileGlobalEval (Isolate *isolate, Handle< String > source, Handle< Object > receiver, StrictMode strict_mode, int scope_position)
 
 RUNTIME_FUNCTION_RETURN_PAIR (Runtime_ResolvePossiblyDirectEval)
 
 RUNTIME_FUNCTION (Runtime_QuoteJSONString)
 
 RUNTIME_FUNCTION (Runtime_BasicJSONStringify)
 
 RUNTIME_FUNCTION (Runtime_ParseJson)
 
 RUNTIME_FUNCTION (Runtime_DoubleHi)
 
 RUNTIME_FUNCTION (Runtime_DoubleLo)
 
 RUNTIME_FUNCTION (Runtime_ConstructDouble)
 
 RUNTIME_FUNCTION (Runtime_RemPiO2)
 
 RUNTIME_FUNCTION (Runtime_MathAtan2)
 
 RUNTIME_FUNCTION (Runtime_MathExpRT)
 
 RUNTIME_FUNCTION (Runtime_MathFloorRT)
 
 RUNTIME_FUNCTION (Runtime_MathPowSlow)
 
 RUNTIME_FUNCTION (Runtime_MathPowRT)
 
 RUNTIME_FUNCTION (Runtime_RoundNumber)
 
 RUNTIME_FUNCTION (Runtime_MathSqrtRT)
 
 RUNTIME_FUNCTION (Runtime_MathFround)
 
 RUNTIME_FUNCTION (RuntimeReference_MathPow)
 
 RUNTIME_FUNCTION (RuntimeReference_IsMinusZero)
 
 RUNTIME_FUNCTION (Runtime_NumberToRadixString)
 
 RUNTIME_FUNCTION (Runtime_NumberToFixed)
 
 RUNTIME_FUNCTION (Runtime_NumberToExponential)
 
 RUNTIME_FUNCTION (Runtime_NumberToPrecision)
 
 RUNTIME_FUNCTION (Runtime_IsValidSmi)
 
static bool AreDigits (const uint8_t *s, int from, int to)
 
static int ParseDecimalInteger (const uint8_t *s, int from, int to)
 
 RUNTIME_FUNCTION (Runtime_StringToNumber)
 
 RUNTIME_FUNCTION (Runtime_StringParseInt)
 
 RUNTIME_FUNCTION (Runtime_StringParseFloat)
 
 RUNTIME_FUNCTION (Runtime_NumberToStringRT)
 
 RUNTIME_FUNCTION (Runtime_NumberToStringSkipCache)
 
 RUNTIME_FUNCTION (Runtime_NumberToInteger)
 
 RUNTIME_FUNCTION (Runtime_NumberToIntegerMapMinusZero)
 
 RUNTIME_FUNCTION (Runtime_NumberToJSUint32)
 
 RUNTIME_FUNCTION (Runtime_NumberToJSInt32)
 
 RUNTIME_FUNCTION (Runtime_NumberToSmi)
 
 RUNTIME_FUNCTION (Runtime_NumberAdd)
 
 RUNTIME_FUNCTION (Runtime_NumberSub)
 
 RUNTIME_FUNCTION (Runtime_NumberMul)
 
 RUNTIME_FUNCTION (Runtime_NumberUnaryMinus)
 
 RUNTIME_FUNCTION (Runtime_NumberDiv)
 
 RUNTIME_FUNCTION (Runtime_NumberMod)
 
 RUNTIME_FUNCTION (Runtime_NumberImul)
 
 RUNTIME_FUNCTION (Runtime_NumberOr)
 
 RUNTIME_FUNCTION (Runtime_NumberAnd)
 
 RUNTIME_FUNCTION (Runtime_NumberXor)
 
 RUNTIME_FUNCTION (Runtime_NumberShl)
 
 RUNTIME_FUNCTION (Runtime_NumberShr)
 
 RUNTIME_FUNCTION (Runtime_NumberSar)
 
 RUNTIME_FUNCTION (Runtime_NumberEquals)
 
 RUNTIME_FUNCTION (Runtime_NumberCompare)
 
 RUNTIME_FUNCTION (Runtime_SmiLexicographicCompare)
 
 RUNTIME_FUNCTION (RuntimeReference_NumberToString)
 
void FindOneByteStringIndices (Vector< const uint8_t > subject, char pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
 
void FindTwoByteStringIndices (const Vector< const uc16 > subject, uc16 pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
 
template<typename SubjectChar , typename PatternChar >
void FindStringIndices (Isolate *isolate, Vector< const SubjectChar > subject, Vector< const PatternChar > pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
 
void FindStringIndicesDispatch (Isolate *isolate, String *subject, String *pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
 
template<typename ResultSeqString >
static MUST_USE_RESULT ObjectStringReplaceGlobalAtomRegExpWithString (Isolate *isolate, Handle< String > subject, Handle< JSRegExp > pattern_regexp, Handle< String > replacement, Handle< JSArray > last_match_info)
 
static MUST_USE_RESULT ObjectStringReplaceGlobalRegExpWithString (Isolate *isolate, Handle< String > subject, Handle< JSRegExp > regexp, Handle< String > replacement, Handle< JSArray > last_match_info)
 
template<typename ResultSeqString >
static MUST_USE_RESULT ObjectStringReplaceGlobalRegExpWithEmptyString (Isolate *isolate, Handle< String > subject, Handle< JSRegExp > regexp, Handle< JSArray > last_match_info)
 
 RUNTIME_FUNCTION (Runtime_StringReplaceGlobalRegExpWithString)
 
 RUNTIME_FUNCTION (Runtime_StringSplit)
 
 RUNTIME_FUNCTION (Runtime_RegExpCompile)
 
 RUNTIME_FUNCTION (Runtime_RegExpExecRT)
 
 RUNTIME_FUNCTION (Runtime_RegExpConstructResult)
 
 RUNTIME_FUNCTION (Runtime_RegExpInitializeObject)
 
 RUNTIME_FUNCTION (Runtime_MaterializeRegExpLiteral)
 
template<bool has_capture>
static ObjectSearchRegExpMultiple (Isolate *isolate, Handle< String > subject, Handle< JSRegExp > regexp, Handle< JSArray > last_match_array, Handle< JSArray > result_array)
 
 RUNTIME_FUNCTION (Runtime_RegExpExecMultiple)
 
 RUNTIME_FUNCTION (RuntimeReference_RegExpConstructResult)
 
 RUNTIME_FUNCTION (RuntimeReference_RegExpExec)
 
MaybeHandle< StringStringReplaceOneCharWithString (Isolate *isolate, Handle< String > subject, Handle< String > search, Handle< String > replace, bool *found, int recursion_limit)
 
 RUNTIME_FUNCTION (Runtime_StringReplaceOneCharWithString)
 
 RUNTIME_FUNCTION (Runtime_StringIndexOf)
 
template<typename schar , typename pchar >
static int StringMatchBackwards (Vector< const schar > subject, Vector< const pchar > pattern, int idx)
 
 RUNTIME_FUNCTION (Runtime_StringLastIndexOf)
 
 RUNTIME_FUNCTION (Runtime_StringLocaleCompare)
 
 RUNTIME_FUNCTION (Runtime_SubString)
 
 RUNTIME_FUNCTION (Runtime_StringAdd)
 
 RUNTIME_FUNCTION (Runtime_InternalizeString)
 
 RUNTIME_FUNCTION (Runtime_StringMatch)
 
 RUNTIME_FUNCTION (Runtime_StringCharCodeAtRT)
 
 RUNTIME_FUNCTION (Runtime_CharFromCode)
 
 RUNTIME_FUNCTION (Runtime_StringCompare)
 
 RUNTIME_FUNCTION (Runtime_StringBuilderConcat)
 
 RUNTIME_FUNCTION (Runtime_StringBuilderJoin)
 
template<typename Char >
static void JoinSparseArrayWithSeparator (FixedArray *elements, int elements_length, uint32_t array_length, String *separator, Vector< Char > buffer)
 
 RUNTIME_FUNCTION (Runtime_SparseJoinWithSeparator)
 
static int CopyCachedOneByteCharsToArray (Heap *heap, const uint8_t *chars, FixedArray *elements, int length)
 
 RUNTIME_FUNCTION (Runtime_StringToArray)
 
static bool ToUpperOverflows (uc32 character)
 
template<class Converter >
static MUST_USE_RESULT ObjectConvertCaseHelper (Isolate *isolate, String *string, SeqString *result, int result_length, unibrow::Mapping< Converter, 128 > *mapping)
 
static uintptr_t AsciiRangeMask (uintptr_t w, char m, char n)
 
template<class Converter >
static bool FastAsciiConvert (char *dst, const char *src, int length, bool *changed_out)
 
template<class Converter >
static MUST_USE_RESULT ObjectConvertCase (Handle< String > s, Isolate *isolate, unibrow::Mapping< Converter, 128 > *mapping)
 
 RUNTIME_FUNCTION (Runtime_StringToLowerCase)
 
 RUNTIME_FUNCTION (Runtime_StringToUpperCase)
 
 RUNTIME_FUNCTION (Runtime_StringTrim)
 
 RUNTIME_FUNCTION (Runtime_TruncateString)
 
 RUNTIME_FUNCTION (Runtime_NewString)
 
 RUNTIME_FUNCTION (Runtime_StringEquals)
 
 RUNTIME_FUNCTION (Runtime_FlattenString)
 
 RUNTIME_FUNCTION (RuntimeReference_StringCharFromCode)
 
 RUNTIME_FUNCTION (RuntimeReference_StringCharAt)
 
 RUNTIME_FUNCTION (RuntimeReference_OneByteSeqStringSetChar)
 
 RUNTIME_FUNCTION (RuntimeReference_TwoByteSeqStringSetChar)
 
 RUNTIME_FUNCTION (RuntimeReference_StringCompare)
 
 RUNTIME_FUNCTION (RuntimeReference_StringCharCodeAt)
 
 RUNTIME_FUNCTION (RuntimeReference_SubString)
 
 RUNTIME_FUNCTION (RuntimeReference_StringAdd)
 
 RUNTIME_FUNCTION (Runtime_DeoptimizeFunction)
 
 RUNTIME_FUNCTION (Runtime_RunningInSimulator)
 
 RUNTIME_FUNCTION (Runtime_IsConcurrentRecompilationSupported)
 
 RUNTIME_FUNCTION (Runtime_OptimizeFunctionOnNextCall)
 
 RUNTIME_FUNCTION (Runtime_NeverOptimizeFunction)
 
 RUNTIME_FUNCTION (Runtime_GetOptimizationStatus)
 
 RUNTIME_FUNCTION (Runtime_UnblockConcurrentRecompilation)
 
 RUNTIME_FUNCTION (Runtime_GetOptimizationCount)
 
 RUNTIME_FUNCTION (Runtime_ClearFunctionTypeFeedback)
 
 RUNTIME_FUNCTION (Runtime_NotifyContextDisposed)
 
 RUNTIME_FUNCTION (Runtime_SetAllocationTimeout)
 
 RUNTIME_FUNCTION (Runtime_DebugPrint)
 
 RUNTIME_FUNCTION (Runtime_DebugTrace)
 
 RUNTIME_FUNCTION (Runtime_GlobalPrint)
 
 RUNTIME_FUNCTION (Runtime_SystemBreak)
 
 RUNTIME_FUNCTION (Runtime_SetFlags)
 
 RUNTIME_FUNCTION (Runtime_Abort)
 
 RUNTIME_FUNCTION (Runtime_AbortJS)
 
 RUNTIME_FUNCTION (Runtime_HaveSameMap)
 
 RUNTIME_FUNCTION (Runtime_ArrayBufferInitialize)
 
 RUNTIME_FUNCTION (Runtime_ArrayBufferGetByteLength)
 
 RUNTIME_FUNCTION (Runtime_ArrayBufferSliceImpl)
 
 RUNTIME_FUNCTION (Runtime_ArrayBufferIsView)
 
 RUNTIME_FUNCTION (Runtime_ArrayBufferNeuter)
 
 RUNTIME_FUNCTION (Runtime_TypedArrayInitialize)
 
 RUNTIME_FUNCTION (Runtime_TypedArrayInitializeFromArrayLike)
 
 RUNTIME_FUNCTION (Runtime_TypedArrayGetBuffer)
 
 RUNTIME_FUNCTION (Runtime_TypedArraySetFastCases)
 
 RUNTIME_FUNCTION (Runtime_TypedArrayMaxSizeInHeap)
 
 RUNTIME_FUNCTION (Runtime_DataViewInitialize)
 
static bool NeedToFlipBytes (bool is_little_endian)
 
template<int n>
void CopyBytes (uint8_t *target, uint8_t *source)
 
template<int n>
void FlipBytes (uint8_t *target, uint8_t *source)
 
template<typename T >
static bool DataViewGetValue (Isolate *isolate, Handle< JSDataView > data_view, Handle< Object > byte_offset_obj, bool is_little_endian, T *result)
 
template<typename T >
static bool DataViewSetValue (Isolate *isolate, Handle< JSDataView > data_view, Handle< Object > byte_offset_obj, bool is_little_endian, T data)
 
template<typename T >
static T DataViewConvertValue (double value)
 
template<>
int8_t DataViewConvertValue< int8_t > (double value)
 
template<>
int16_t DataViewConvertValue< int16_t > (double value)
 
template<>
int32_t DataViewConvertValue< int32_t > (double value)
 
template<>
uint8_t DataViewConvertValue< uint8_t > (double value)
 
template<>
uint16_t DataViewConvertValue< uint16_t > (double value)
 
template<>
uint32_t DataViewConvertValue< uint32_t > (double value)
 
template<>
float DataViewConvertValue< float > (double value)
 
template<>
double DataViewConvertValue< double > (double value)
 
template<typename Char >
static INLINE (Vector< const Char > GetCharVector(Handle< String > string))
 
template<>
Vector< const uint8_t > GetCharVector (Handle< String > string)
 
 RUNTIME_FUNCTION (Runtime_URIEscape)
 
 RUNTIME_FUNCTION (Runtime_URIUnescape)
 
static ObjectPair MakePair (Object *x, Object *y)
 
static Handle< MapComputeObjectLiteralMap (Handle< Context > context, Handle< FixedArray > constant_properties, bool *is_result_from_cache)
 
static MUST_USE_RESULT MaybeHandle< ObjectCreateLiteralBoilerplate (Isolate *isolate, Handle< FixedArray > literals, Handle< FixedArray > constant_properties)
 
static MUST_USE_RESULT MaybeHandle< ObjectCreateObjectLiteralBoilerplate (Isolate *isolate, Handle< FixedArray > literals, Handle< FixedArray > constant_properties, bool should_have_fast_elements, bool has_function_literal)
 
static MUST_USE_RESULT MaybeHandle< ObjectTransitionElements (Handle< Object > object, ElementsKind to_kind, Isolate *isolate)
 
 RUNTIME_FUNCTION (Runtime_CreateObjectLiteral)
 
static MUST_USE_RESULT MaybeHandle< AllocationSiteGetLiteralAllocationSite (Isolate *isolate, Handle< FixedArray > literals, int literals_index, Handle< FixedArray > elements)
 
static MaybeHandle< JSObjectCreateArrayLiteralImpl (Isolate *isolate, Handle< FixedArray > literals, int literals_index, Handle< FixedArray > elements, int flags)
 
 RUNTIME_FUNCTION (Runtime_CreateArrayLiteral)
 
 RUNTIME_FUNCTION (Runtime_CreateArrayLiteralStubBailout)
 
 RUNTIME_FUNCTION (Runtime_CreateSymbol)
 
 RUNTIME_FUNCTION (Runtime_CreatePrivateSymbol)
 
 RUNTIME_FUNCTION (Runtime_CreatePrivateOwnSymbol)
 
 RUNTIME_FUNCTION (Runtime_CreateGlobalPrivateOwnSymbol)
 
 RUNTIME_FUNCTION (Runtime_NewSymbolWrapper)
 
 RUNTIME_FUNCTION (Runtime_SymbolDescription)
 
 RUNTIME_FUNCTION (Runtime_SymbolRegistry)
 
 RUNTIME_FUNCTION (Runtime_SymbolIsPrivate)
 
 RUNTIME_FUNCTION (Runtime_CreateJSProxy)
 
 RUNTIME_FUNCTION (Runtime_CreateJSFunctionProxy)
 
 RUNTIME_FUNCTION (Runtime_IsJSProxy)
 
 RUNTIME_FUNCTION (Runtime_IsJSFunctionProxy)
 
 RUNTIME_FUNCTION (Runtime_GetHandler)
 
 RUNTIME_FUNCTION (Runtime_GetCallTrap)
 
 RUNTIME_FUNCTION (Runtime_GetConstructTrap)
 
 RUNTIME_FUNCTION (Runtime_Fix)
 
 RUNTIME_FUNCTION (Runtime_GetPrototype)
 
static Handle< ObjectGetPrototypeSkipHiddenPrototypes (Isolate *isolate, Handle< Object > receiver)
 
 RUNTIME_FUNCTION (Runtime_InternalSetPrototype)
 
 RUNTIME_FUNCTION (Runtime_SetPrototype)
 
 RUNTIME_FUNCTION (Runtime_IsInPrototypeChain)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetOwnProperty (Isolate *isolate, Handle< JSObject > obj, Handle< Name > name)
 
 RUNTIME_FUNCTION (Runtime_GetOwnProperty)
 
 RUNTIME_FUNCTION (Runtime_PreventExtensions)
 
 RUNTIME_FUNCTION (Runtime_ToMethod)
 
 RUNTIME_FUNCTION (Runtime_HomeObjectSymbol)
 
 RUNTIME_FUNCTION (Runtime_LoadFromSuper)
 
static ObjectStoreToSuper (Isolate *isolate, Handle< JSObject > home_object, Handle< Object > receiver, Handle< Name > name, Handle< Object > value, StrictMode strict_mode)
 
 RUNTIME_FUNCTION (Runtime_StoreToSuper_Strict)
 
 RUNTIME_FUNCTION (Runtime_StoreToSuper_Sloppy)
 
 RUNTIME_FUNCTION (Runtime_IsExtensible)
 
 RUNTIME_FUNCTION (Runtime_CreateApiFunction)
 
 RUNTIME_FUNCTION (Runtime_IsTemplate)
 
 RUNTIME_FUNCTION (Runtime_GetTemplateField)
 
 RUNTIME_FUNCTION (Runtime_DisableAccessChecks)
 
 RUNTIME_FUNCTION (Runtime_EnableAccessChecks)
 
static ObjectThrowRedeclarationError (Isolate *isolate, Handle< String > name)
 
static ObjectDeclareGlobals (Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
 
 RUNTIME_FUNCTION (Runtime_DeclareGlobals)
 
 RUNTIME_FUNCTION (Runtime_InitializeVarGlobal)
 
 RUNTIME_FUNCTION (Runtime_InitializeConstGlobal)
 
 RUNTIME_FUNCTION (Runtime_DeclareLookupSlot)
 
 RUNTIME_FUNCTION (Runtime_InitializeLegacyConstLookupSlot)
 
 RUNTIME_FUNCTION (Runtime_OptimizeObjectForAddingMultipleProperties)
 
 RUNTIME_FUNCTION (Runtime_FinishArrayPrototypeSetup)
 
static void InstallBuiltin (Isolate *isolate, Handle< JSObject > holder, const char *name, Builtins::Name builtin_name)
 
 RUNTIME_FUNCTION (Runtime_SpecialArrayFunctions)
 
 RUNTIME_FUNCTION (Runtime_IsSloppyModeFunction)
 
 RUNTIME_FUNCTION (Runtime_GetDefaultReceiver)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetName)
 
 RUNTIME_FUNCTION (Runtime_FunctionSetName)
 
 RUNTIME_FUNCTION (Runtime_FunctionNameShouldPrintAsAnonymous)
 
 RUNTIME_FUNCTION (Runtime_FunctionMarkNameShouldPrintAsAnonymous)
 
 RUNTIME_FUNCTION (Runtime_FunctionIsGenerator)
 
 RUNTIME_FUNCTION (Runtime_FunctionIsArrow)
 
 RUNTIME_FUNCTION (Runtime_FunctionIsConciseMethod)
 
 RUNTIME_FUNCTION (Runtime_FunctionRemovePrototype)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetScript)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetSourceCode)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetScriptSourcePosition)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetPositionForOffset)
 
 RUNTIME_FUNCTION (Runtime_FunctionSetInstanceClassName)
 
 RUNTIME_FUNCTION (Runtime_FunctionSetLength)
 
 RUNTIME_FUNCTION (Runtime_FunctionSetPrototype)
 
 RUNTIME_FUNCTION (Runtime_FunctionIsAPIFunction)
 
 RUNTIME_FUNCTION (Runtime_FunctionIsBuiltin)
 
 RUNTIME_FUNCTION (Runtime_SetCode)
 
 RUNTIME_FUNCTION (Runtime_CreateJSGeneratorObject)
 
 RUNTIME_FUNCTION (Runtime_SuspendJSGeneratorObject)
 
 RUNTIME_FUNCTION (Runtime_ResumeJSGeneratorObject)
 
 RUNTIME_FUNCTION (Runtime_ThrowGeneratorStateError)
 
 RUNTIME_FUNCTION (Runtime_ObjectFreeze)
 
static Handle< ObjectGetCharAt (Handle< String > string, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< NameToName (Isolate *isolate, Handle< Object > key)
 
 RUNTIME_FUNCTION (Runtime_GetProperty)
 
 RUNTIME_FUNCTION (Runtime_KeyedGetProperty)
 
static bool IsValidAccessor (Handle< Object > obj)
 
static Handle< ObjectInstantiateAccessorComponent (Isolate *isolate, Handle< Object > component)
 
 RUNTIME_FUNCTION (Runtime_DefineApiAccessorProperty)
 
 RUNTIME_FUNCTION (Runtime_DefineAccessorPropertyUnchecked)
 
 RUNTIME_FUNCTION (Runtime_DefineDataPropertyUnchecked)
 
 RUNTIME_FUNCTION (Runtime_GetDataProperty)
 
 RUNTIME_FUNCTION (Runtime_SetHiddenProperty)
 
 RUNTIME_FUNCTION (Runtime_AddNamedProperty)
 
 RUNTIME_FUNCTION (Runtime_AddPropertyForTemplate)
 
 RUNTIME_FUNCTION (Runtime_SetProperty)
 
 RUNTIME_FUNCTION (Runtime_AddElement)
 
 RUNTIME_FUNCTION (Runtime_TransitionElementsKind)
 
 RUNTIME_FUNCTION (Runtime_SetNativeFlag)
 
 RUNTIME_FUNCTION (Runtime_SetInlineBuiltinFlag)
 
 RUNTIME_FUNCTION (Runtime_StoreArrayLiteralElement)
 
 RUNTIME_FUNCTION (Runtime_DebugCallbackSupportsStepping)
 
 RUNTIME_FUNCTION (Runtime_DebugPrepareStepInIfStepping)
 
 RUNTIME_FUNCTION (Runtime_DebugPushPromise)
 
 RUNTIME_FUNCTION (Runtime_DebugPopPromise)
 
 RUNTIME_FUNCTION (Runtime_DebugPromiseEvent)
 
 RUNTIME_FUNCTION (Runtime_DebugPromiseRejectEvent)
 
 RUNTIME_FUNCTION (Runtime_DebugAsyncTaskEvent)
 
 RUNTIME_FUNCTION (Runtime_DeleteProperty)
 
static ObjectHasOwnPropertyImplementation (Isolate *isolate, Handle< JSObject > object, Handle< Name > key)
 
 RUNTIME_FUNCTION (Runtime_HasOwnProperty)
 
 RUNTIME_FUNCTION (Runtime_HasProperty)
 
 RUNTIME_FUNCTION (Runtime_HasElement)
 
 RUNTIME_FUNCTION (Runtime_IsPropertyEnumerable)
 
 RUNTIME_FUNCTION (Runtime_GetPropertyNames)
 
 RUNTIME_FUNCTION (Runtime_GetPropertyNamesFast)
 
static int OwnPrototypeChainLength (JSObject *obj)
 
 RUNTIME_FUNCTION (Runtime_GetOwnPropertyNames)
 
 RUNTIME_FUNCTION (Runtime_GetOwnElementNames)
 
 RUNTIME_FUNCTION (Runtime_GetInterceptorInfo)
 
 RUNTIME_FUNCTION (Runtime_GetNamedInterceptorPropertyNames)
 
 RUNTIME_FUNCTION (Runtime_GetIndexedInterceptorElementNames)
 
 RUNTIME_FUNCTION (Runtime_OwnKeys)
 
 RUNTIME_FUNCTION (Runtime_GetArgumentsProperty)
 
 RUNTIME_FUNCTION (Runtime_ToFastProperties)
 
 RUNTIME_FUNCTION (Runtime_ToBool)
 
 RUNTIME_FUNCTION (Runtime_Typeof)
 
 RUNTIME_FUNCTION (Runtime_Booleanize)
 
 RUNTIME_FUNCTION (Runtime_NewStringWrapper)
 
 RUNTIME_FUNCTION (Runtime_AllocateHeapNumber)
 
 RUNTIME_FUNCTION (Runtime_DateMakeDay)
 
 RUNTIME_FUNCTION (Runtime_DateSetValue)
 
static Handle< JSObjectNewSloppyArguments (Isolate *isolate, Handle< JSFunction > callee, Object **parameters, int argument_count)
 
static Handle< JSObjectNewStrictArguments (Isolate *isolate, Handle< JSFunction > callee, Object **parameters, int argument_count)
 
 RUNTIME_FUNCTION (Runtime_NewArguments)
 
 RUNTIME_FUNCTION (Runtime_NewSloppyArguments)
 
 RUNTIME_FUNCTION (Runtime_NewStrictArguments)
 
 RUNTIME_FUNCTION (Runtime_NewClosureFromStubFailure)
 
 RUNTIME_FUNCTION (Runtime_NewClosure)
 
static SmartArrayPointer< Handle< Object > > GetCallerArguments (Isolate *isolate, int prefix_argc, int *total_argc)
 
 RUNTIME_FUNCTION (Runtime_FunctionBindArguments)
 
 RUNTIME_FUNCTION (Runtime_BoundFunctionGetBindings)
 
 RUNTIME_FUNCTION (Runtime_NewObjectFromBound)
 
static ObjectRuntime_NewObjectHelper (Isolate *isolate, Handle< Object > constructor, Handle< AllocationSite > site)
 
 RUNTIME_FUNCTION (Runtime_NewObject)
 
 RUNTIME_FUNCTION (Runtime_NewObjectWithAllocationSite)
 
 RUNTIME_FUNCTION (Runtime_FinalizeInstanceSize)
 
 RUNTIME_FUNCTION (Runtime_CheckIsBootstrapping)
 
 RUNTIME_FUNCTION (Runtime_GetRootNaN)
 
 RUNTIME_FUNCTION (Runtime_Call)
 
 RUNTIME_FUNCTION (Runtime_Apply)
 
 RUNTIME_FUNCTION (Runtime_GetFunctionDelegate)
 
 RUNTIME_FUNCTION (Runtime_GetConstructorDelegate)
 
 RUNTIME_FUNCTION (Runtime_NewGlobalContext)
 
 RUNTIME_FUNCTION (Runtime_NewFunctionContext)
 
 RUNTIME_FUNCTION (Runtime_PushWithContext)
 
 RUNTIME_FUNCTION (Runtime_PushCatchContext)
 
 RUNTIME_FUNCTION (Runtime_PushBlockContext)
 
 RUNTIME_FUNCTION (Runtime_IsJSModule)
 
 RUNTIME_FUNCTION (Runtime_PushModuleContext)
 
 RUNTIME_FUNCTION (Runtime_DeclareModules)
 
 RUNTIME_FUNCTION (Runtime_DeleteLookupSlot)
 
static ObjectComputeReceiverForNonGlobal (Isolate *isolate, JSObject *holder)
 
static ObjectPair LoadLookupSlotHelper (Arguments args, Isolate *isolate, bool throw_error)
 
 RUNTIME_FUNCTION_RETURN_PAIR (Runtime_LoadLookupSlot)
 
 RUNTIME_FUNCTION_RETURN_PAIR (Runtime_LoadLookupSlotNoReferenceError)
 
 RUNTIME_FUNCTION (Runtime_StoreLookupSlot)
 
 RUNTIME_FUNCTION (Runtime_Throw)
 
 RUNTIME_FUNCTION (Runtime_ReThrow)
 
 RUNTIME_FUNCTION (Runtime_PromoteScheduledException)
 
 RUNTIME_FUNCTION (Runtime_ThrowReferenceError)
 
 RUNTIME_FUNCTION (Runtime_ThrowNonMethodError)
 
 RUNTIME_FUNCTION (Runtime_ThrowUnsupportedSuperError)
 
 RUNTIME_FUNCTION (Runtime_ThrowNotDateError)
 
 RUNTIME_FUNCTION (Runtime_StackGuard)
 
 RUNTIME_FUNCTION (Runtime_Interrupt)
 
static int StackSize (Isolate *isolate)
 
static void PrintTransition (Isolate *isolate, Object *result)
 
 RUNTIME_FUNCTION (Runtime_TraceEnter)
 
 RUNTIME_FUNCTION (Runtime_TraceExit)
 
 RUNTIME_FUNCTION (Runtime_DateCurrentTime)
 
 RUNTIME_FUNCTION (Runtime_DateParseString)
 
 RUNTIME_FUNCTION (Runtime_DateLocalTimezone)
 
 RUNTIME_FUNCTION (Runtime_DateToUTC)
 
 RUNTIME_FUNCTION (Runtime_DateCacheVersion)
 
 RUNTIME_FUNCTION (Runtime_GlobalProxy)
 
 RUNTIME_FUNCTION (Runtime_IsAttachedGlobal)
 
 RUNTIME_FUNCTION (Runtime_AllocateInNewSpace)
 
 RUNTIME_FUNCTION (Runtime_AllocateInTargetSpace)
 
 RUNTIME_FUNCTION (Runtime_PushIfAbsent)
 
static uint32_t EstimateElementCount (Handle< JSArray > array)
 
template<class ExternalArrayClass , class ElementType >
static void IterateExternalArrayElements (Isolate *isolate, Handle< JSObject > receiver, bool elements_are_ints, bool elements_are_guaranteed_smis, ArrayConcatVisitor *visitor)
 
static int compareUInt32 (const uint32_t *ap, const uint32_t *bp)
 
static void CollectElementIndices (Handle< JSObject > object, uint32_t range, List< uint32_t > *indices)
 
static bool IterateElements (Isolate *isolate, Handle< JSArray > receiver, ArrayConcatVisitor *visitor)
 A helper function that visits elements of a JSArray in numerical order. More...
 
 RUNTIME_FUNCTION (Runtime_ArrayConcat)
 Array::concat implementation. More...
 
 RUNTIME_FUNCTION (Runtime_RemoveArrayHoles)
 
 RUNTIME_FUNCTION (Runtime_MoveArrayContents)
 
 RUNTIME_FUNCTION (Runtime_EstimateNumberOfElements)
 
 RUNTIME_FUNCTION (Runtime_GetArrayKeys)
 
 RUNTIME_FUNCTION (Runtime_LookupAccessor)
 
 RUNTIME_FUNCTION (Runtime_DebugBreak)
 
static SmiWrapFrameId (StackFrame::Id id)
 
static StackFrame::Id UnwrapFrameId (int wrapped)
 
 RUNTIME_FUNCTION (Runtime_SetDebugEventListener)
 
 RUNTIME_FUNCTION (Runtime_Break)
 
static Handle< ObjectDebugGetProperty (LookupIterator *it, bool *has_caught=NULL)
 
 RUNTIME_FUNCTION (Runtime_DebugGetPropertyDetails)
 
 RUNTIME_FUNCTION (Runtime_DebugGetProperty)
 
 RUNTIME_FUNCTION (Runtime_DebugPropertyTypeFromDetails)
 
 RUNTIME_FUNCTION (Runtime_DebugPropertyAttributesFromDetails)
 
 RUNTIME_FUNCTION (Runtime_DebugPropertyIndexFromDetails)
 
 RUNTIME_FUNCTION (Runtime_DebugNamedInterceptorPropertyValue)
 
 RUNTIME_FUNCTION (Runtime_DebugIndexedInterceptorElementValue)
 
static bool CheckExecutionState (Isolate *isolate, int break_id)
 
 RUNTIME_FUNCTION (Runtime_CheckExecutionState)
 
 RUNTIME_FUNCTION (Runtime_GetFrameCount)
 
static SaveContext * FindSavedContextForFrame (Isolate *isolate, JavaScriptFrame *frame)
 
static int FindIndexedNonNativeFrame (JavaScriptFrameIterator *it, int index)
 
 RUNTIME_FUNCTION (Runtime_GetFrameDetails)
 
static bool ParameterIsShadowedByContextLocal (Handle< ScopeInfo > info, Handle< String > parameter_name)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeStackLocalsWithFrameInspector (Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, FrameInspector *frame_inspector)
 
static void UpdateStackLocalsFromMaterializedObject (Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, JavaScriptFrame *frame, int inlined_jsframe_index)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeLocalContext (Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, JavaScriptFrame *frame)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeLocalScope (Isolate *isolate, JavaScriptFrame *frame, int inlined_jsframe_index)
 
static bool SetContextLocalValue (Isolate *isolate, Handle< ScopeInfo > scope_info, Handle< Context > context, Handle< String > variable_name, Handle< Object > new_value)
 
static bool SetLocalVariableValue (Isolate *isolate, JavaScriptFrame *frame, int inlined_jsframe_index, Handle< String > variable_name, Handle< Object > new_value)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeClosure (Isolate *isolate, Handle< Context > context)
 
static bool SetClosureVariableValue (Isolate *isolate, Handle< Context > context, Handle< String > variable_name, Handle< Object > new_value)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeCatchScope (Isolate *isolate, Handle< Context > context)
 
static bool SetCatchVariableValue (Isolate *isolate, Handle< Context > context, Handle< String > variable_name, Handle< Object > new_value)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeBlockScope (Isolate *isolate, Handle< Context > context)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeModuleScope (Isolate *isolate, Handle< Context > context)
 
 RUNTIME_FUNCTION (Runtime_GetScopeCount)
 
 RUNTIME_FUNCTION (Runtime_GetStepInPositions)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeScopeDetails (Isolate *isolate, ScopeIterator *it)
 
 RUNTIME_FUNCTION (Runtime_GetScopeDetails)
 
 RUNTIME_FUNCTION (Runtime_GetAllScopesDetails)
 
 RUNTIME_FUNCTION (Runtime_GetFunctionScopeCount)
 
 RUNTIME_FUNCTION (Runtime_GetFunctionScopeDetails)
 
static bool SetScopeVariableValue (ScopeIterator *it, int index, Handle< String > variable_name, Handle< Object > new_value)
 
 RUNTIME_FUNCTION (Runtime_SetScopeVariableValue)
 
 RUNTIME_FUNCTION (Runtime_DebugPrintScopes)
 
 RUNTIME_FUNCTION (Runtime_GetThreadCount)
 
 RUNTIME_FUNCTION (Runtime_GetThreadDetails)
 
 RUNTIME_FUNCTION (Runtime_SetDisableBreak)
 
static bool IsPositionAlignmentCodeCorrect (int alignment)
 
 RUNTIME_FUNCTION (Runtime_GetBreakLocations)
 
 RUNTIME_FUNCTION (Runtime_SetFunctionBreakPoint)
 
 RUNTIME_FUNCTION (Runtime_SetScriptBreakPoint)
 
 RUNTIME_FUNCTION (Runtime_ClearBreakPoint)
 
 RUNTIME_FUNCTION (Runtime_ChangeBreakOnException)
 
 RUNTIME_FUNCTION (Runtime_IsBreakOnException)
 
 RUNTIME_FUNCTION (Runtime_PrepareStep)
 
 RUNTIME_FUNCTION (Runtime_ClearStepping)
 
static MUST_USE_RESULT MaybeHandle< JSObjectMaterializeArgumentsObject (Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function)
 
static MaybeHandle< ObjectDebugEvaluate (Isolate *isolate, Handle< Context > context, Handle< Object > context_extension, Handle< Object > receiver, Handle< String > source)
 
static Handle< JSObjectNewJSObjectWithNullProto (Isolate *isolate)
 
 RUNTIME_FUNCTION (Runtime_DebugEvaluate)
 
 RUNTIME_FUNCTION (Runtime_DebugEvaluateGlobal)
 
 RUNTIME_FUNCTION (Runtime_DebugGetLoadedScripts)
 
static int DebugReferencedBy (HeapIterator *iterator, JSObject *target, Object *instance_filter, int max_references, FixedArray *instances, int instances_size, JSFunction *arguments_function)
 
 RUNTIME_FUNCTION (Runtime_DebugReferencedBy)
 
static int DebugConstructedBy (HeapIterator *iterator, JSFunction *constructor, int max_references, FixedArray *instances, int instances_size)
 
 RUNTIME_FUNCTION (Runtime_DebugConstructedBy)
 
 RUNTIME_FUNCTION (Runtime_DebugGetPrototype)
 
 RUNTIME_FUNCTION (Runtime_DebugSetScriptSource)
 
 RUNTIME_FUNCTION (Runtime_DebugDisassembleFunction)
 
 RUNTIME_FUNCTION (Runtime_DebugDisassembleConstructor)
 
 RUNTIME_FUNCTION (Runtime_FunctionGetInferredName)
 
static int FindSharedFunctionInfosForScript (HeapIterator *iterator, Script *script, FixedArray *buffer)
 
 RUNTIME_FUNCTION (Runtime_LiveEditFindSharedFunctionInfosForScript)
 
 RUNTIME_FUNCTION (Runtime_LiveEditGatherCompileInfo)
 
 RUNTIME_FUNCTION (Runtime_LiveEditReplaceScript)
 
 RUNTIME_FUNCTION (Runtime_LiveEditFunctionSourceUpdated)
 
 RUNTIME_FUNCTION (Runtime_LiveEditReplaceFunctionCode)
 
 RUNTIME_FUNCTION (Runtime_LiveEditFunctionSetScript)
 
 RUNTIME_FUNCTION (Runtime_LiveEditReplaceRefToNestedFunction)
 
 RUNTIME_FUNCTION (Runtime_LiveEditPatchFunctionPositions)
 
 RUNTIME_FUNCTION (Runtime_LiveEditCheckAndDropActivations)
 
 RUNTIME_FUNCTION (Runtime_LiveEditCompareStrings)
 
 RUNTIME_FUNCTION (Runtime_LiveEditRestartFrame)
 
 RUNTIME_FUNCTION (Runtime_GetFunctionCodePositionFromSource)
 
 RUNTIME_FUNCTION (Runtime_ExecuteInDebugContext)
 
 RUNTIME_FUNCTION (Runtime_CollectGarbage)
 
 RUNTIME_FUNCTION (Runtime_GetHeapUsage)
 
static Handle< ObjectRuntime_GetScriptFromScriptName (Handle< String > script_name)
 
 RUNTIME_FUNCTION (Runtime_GetScript)
 
 RUNTIME_FUNCTION (Runtime_CollectStackTrace)
 
 RUNTIME_FUNCTION (Runtime_GetV8Version)
 
 RUNTIME_FUNCTION (Runtime_GeneratorGetFunction)
 
 RUNTIME_FUNCTION (Runtime_GeneratorGetContext)
 
 RUNTIME_FUNCTION (Runtime_GeneratorGetReceiver)
 
 RUNTIME_FUNCTION (Runtime_GeneratorGetContinuation)
 
 RUNTIME_FUNCTION (Runtime_GeneratorGetSourcePosition)
 
 RUNTIME_FUNCTION (Runtime_LoadMutableDouble)
 
 RUNTIME_FUNCTION (Runtime_TryMigrateInstance)
 
 RUNTIME_FUNCTION (Runtime_GetFromCache)
 
 RUNTIME_FUNCTION (Runtime_MessageGetStartPosition)
 
 RUNTIME_FUNCTION (Runtime_MessageGetScript)
 
 RUNTIME_FUNCTION (Runtime_IS_VAR)
 
 RUNTIME_FUNCTION (Runtime_IsJSGlobalProxy)
 
 RUNTIME_FUNCTION (Runtime_IsObserved)
 
 RUNTIME_FUNCTION (Runtime_SetIsObserved)
 
 RUNTIME_FUNCTION (Runtime_EnqueueMicrotask)
 
 RUNTIME_FUNCTION (Runtime_RunMicrotasks)
 
 RUNTIME_FUNCTION (Runtime_GetObservationState)
 
static bool ContextsHaveSameOrigin (Handle< Context > context1, Handle< Context > context2)
 
 RUNTIME_FUNCTION (Runtime_ObserverObjectAndRecordHaveSameOrigin)
 
 RUNTIME_FUNCTION (Runtime_ObjectWasCreatedInCurrentOrigin)
 
 RUNTIME_FUNCTION (Runtime_GetObjectContextObjectObserve)
 
 RUNTIME_FUNCTION (Runtime_GetObjectContextObjectGetNotifier)
 
 RUNTIME_FUNCTION (Runtime_GetObjectContextNotifierPerformChange)
 
static ObjectArrayConstructorCommon (Isolate *isolate, Handle< JSFunction > constructor, Handle< AllocationSite > site, Arguments *caller_args)
 
 RUNTIME_FUNCTION (Runtime_ArrayConstructor)
 
 RUNTIME_FUNCTION (Runtime_InternalArrayConstructor)
 
 RUNTIME_FUNCTION (Runtime_NormalizeElements)
 
 RUNTIME_FUNCTION (Runtime_MaxSmi)
 
 RUNTIME_FUNCTION_RETURN_PAIR (Runtime_ForInInit)
 
 RUNTIME_FUNCTION (Runtime_ForInCacheArrayLength)
 
 RUNTIME_FUNCTION_RETURN_PAIR (Runtime_ForInNext)
 
 U (IsStringWrapperSafeForDefaultValueOf) U(DebugBreakInOptimizedCode) RUNTIME_FUNCTION(RuntimeReference_IsSmi)
 
 RUNTIME_FUNCTION (RuntimeReference_IsNonNegativeSmi)
 
 RUNTIME_FUNCTION (RuntimeReference_IsArray)
 
 RUNTIME_FUNCTION (RuntimeReference_IsRegExp)
 
 RUNTIME_FUNCTION (RuntimeReference_IsConstructCall)
 
 RUNTIME_FUNCTION (RuntimeReference_CallFunction)
 
 RUNTIME_FUNCTION (RuntimeReference_ArgumentsLength)
 
 RUNTIME_FUNCTION (RuntimeReference_Arguments)
 
 RUNTIME_FUNCTION (RuntimeReference_ValueOf)
 
 RUNTIME_FUNCTION (RuntimeReference_SetValueOf)
 
 RUNTIME_FUNCTION (RuntimeReference_DateField)
 
 RUNTIME_FUNCTION (RuntimeReference_ObjectEquals)
 
 RUNTIME_FUNCTION (RuntimeReference_IsObject)
 
 RUNTIME_FUNCTION (RuntimeReference_IsFunction)
 
 RUNTIME_FUNCTION (RuntimeReference_IsUndetectableObject)
 
 RUNTIME_FUNCTION (RuntimeReference_IsSpecObject)
 
 RUNTIME_FUNCTION (RuntimeReference_HasCachedArrayIndex)
 
 RUNTIME_FUNCTION (RuntimeReference_GetCachedArrayIndex)
 
 RUNTIME_FUNCTION (RuntimeReference_FastOneByteArrayJoin)
 
 RUNTIME_FUNCTION (RuntimeReference_GeneratorNext)
 
 RUNTIME_FUNCTION (RuntimeReference_GeneratorThrow)
 
 RUNTIME_FUNCTION (RuntimeReference_ClassOf)
 
 RUNTIME_FUNCTION (RuntimeReference_GetFromCache)
 
 RUNTIME_FUNCTION (RuntimeReference_DebugIsActive)
 
template<typename sinkchar >
static void StringBuilderConcatHelper (String *special, sinkchar *sink, FixedArray *fixed_array, int array_length)
 
static int StringBuilderConcatLength (int special_length, FixedArray *fixed_array, int array_length, bool *one_byte)
 
static void GetICCounts (Code *shared_code, int *ic_with_type_info_count, int *ic_generic_count, int *ic_total_count, int *type_info_percentage, int *generic_percentage)
 
static bool IsUtf8MultiCharacterFollower (byte later_byte)
 
static void Utf8CharacterBack (const byte *buffer, unsigned *cursor)
 
static void Utf8CharacterForward (const byte *buffer, unsigned *cursor)
 
 STATIC_ASSERT (Token::NUM_TOKENS<=0x100)
 
static bool IsLittleEndianByteOrderMark (uc32 c)
 
static Token::Value KeywordOrIdentifierToken (const uint8_t *input, int input_length, bool harmony_scoping, bool harmony_modules, bool harmony_classes)
 
int HexValue (uc32 c)
 
static uint32_t EncodeExternal (TypeCode type, uint16_t id)
 
static intGetInternalPointer (StatsCounter *counter)
 
static CodeCloneCodeObject (HeapObject *code)
 
static void WipeOutRelocations (Code *code)
 
void SetSnapshotFromFile (StartupData *snapshot_blob)
 
template<typename PatternChar , typename SubjectChar >
bool CharCompare (const PatternChar *pattern, const SubjectChar *subject, int length)
 
template<typename SubjectChar , typename PatternChar >
int SearchString (Isolate *isolate, Vector< const SubjectChar > subject, Vector< const PatternChar > pattern, int start_index)
 
static bool IsControlChar (char c)
 
static Vector< const char > TrimLeadingZeros (Vector< const char > buffer)
 
static Vector< const char > TrimTrailingZeros (Vector< const char > buffer)
 
static void TrimToMaxSignificantDigits (Vector< const char > buffer, int exponent, char *significant_buffer, int *significant_exponent)
 
static uint64_t ReadUint64 (Vector< const char > buffer, int *number_of_read_digits)
 
static void ReadDiyFp (Vector< const char > buffer, DiyFp *result, int *remaining_decimals)
 
static bool DoubleStrtod (Vector< const char > trimmed, int exponent, double *result)
 
static DiyFp AdjustmentPowerOfTen (int exponent)
 
static bool DiyFpStrtod (Vector< const char > buffer, int exponent, double *result)
 
static double BignumStrtod (Vector< const char > buffer, int exponent, double guess)
 
double Strtod (Vector< const char > buffer, int exponent)
 
static bool InsertionPointFound (Name *key1, Name *key2)
 
static uint32_t IdToKey (TypeFeedbackId ast_id)
 
static bool AddIsSafe (int x, int y)
 
void PrintF (const char *format,...)
 
void PrintF (FILE *out, const char *format,...)
 
void PrintPID (const char *format,...)
 
int SNPrintF (Vector< char > str, const char *format,...)
 
int VSNPrintF (Vector< char > str, const char *format, va_list args)
 
void StrNCpy (Vector< char > dest, const char *src, size_t n)
 
void Flush (FILE *out)
 
char * ReadLine (const char *prompt)
 
char * ReadCharsFromFile (FILE *file, int *size, int extra_space, bool verbose, const char *filename)
 
char * ReadCharsFromFile (const char *filename, int *size, int extra_space, bool verbose)
 
byteReadBytes (const char *filename, int *size, bool verbose)
 
static Vector< const char > SetVectorContents (char *chars, int size, bool *exists)
 
Vector< const char > ReadFile (const char *filename, bool *exists, bool verbose)
 
Vector< const char > ReadFile (FILE *file, bool *exists, bool verbose)
 
int WriteCharsToFile (const char *str, int size, FILE *f)
 
int AppendChars (const char *filename, const char *str, int size, bool verbose)
 
int WriteChars (const char *filename, const char *str, int size, bool verbose)
 
int WriteBytes (const char *filename, const byte *bytes, int size, bool verbose)
 
void init_memcopy_functions ()
 
bool DoubleToBoolean (double d)
 
bool CStringEquals (const char *s1, const char *s2)
 
int WhichPowerOf2 (uint32_t x)
 
int MostSignificantBit (uint32_t x)
 
int ArithmeticShiftRight (int x, int s)
 
template<typename T >
int Compare (const T &a, const T &b)
 
template<typename T >
int PointerValueCompare (const T *a, const T *b)
 
template<typename T >
int HandleObjectPointerCompare (const Handle< T > *a, const Handle< T > *b)
 
template<typename T , typename U >
bool IsAligned (T value, U alignment)
 
bool IsAddressAligned (Address addr, intptr_t alignment, int offset=0)
 
template<typename T >
T Max (T a, T b)
 
template<typename T >
T Min (T a, T b)
 
template<typename T >
T Abs (T a)
 
double Floor (double x)
 
int32_t WhichPowerOf2Abs (int32_t x)
 
uint32_t ComputeIntegerHash (uint32_t key, uint32_t seed)
 
uint32_t ComputeLongHash (uint64_t key)
 
uint32_t ComputePointerHash (void *ptr)
 
void MemCopy (void *dest, const void *src, size_t size)
 
void MemMove (void *dest, const void *src, size_t size)
 
template<typename lchar , typename rchar >
int CompareCharsUnsigned (const lchar *lhs, const rchar *rhs, int chars)
 
template<typename lchar , typename rchar >
int CompareChars (const lchar *lhs, const rchar *rhs, int chars)
 
int TenToThe (int exponent)
 
uint32_t unsigned_bitextract_32 (int msb, int lsb, uint32_t x)
 
uint64_t unsigned_bitextract_64 (int msb, int lsb, uint64_t x)
 
int32_t signed_bitextract_32 (int msb, int lsb, int32_t x)
 
int signed_bitextract_64 (int msb, int lsb, int x)
 
bool is_intn (int64_t x, unsigned n)
 
bool is_uintn (int64_t x, unsigned n)
 
template<class T >
T truncate_to_intn (T x, unsigned n)
 
void Flush ()
 
int WriteAsCFile (const char *filename, const char *varname, const char *str, int size, bool verbose=true)
 
template<typename T >
Vector< Handle< Object > > HandleVector (v8::internal::Handle< T > *elms, int length)
 
template<typename T >
void CopyWords (T *dst, const T *src, size_t num_words)
 
template<typename T >
void MoveWords (T *dst, const T *src, size_t num_words)
 
template<typename T >
void CopyBytes (T *dst, const T *src, size_t num_bytes)
 
template<typename T , typename U >
void MemsetPointer (T **dest, U *value, int counter)
 
template<typename sourcechar , typename sinkchar >
 INLINE (static void CopyCharsUnsigned(sinkchar *dest, const sourcechar *src, int chars))
 
template<typename sourcechar , typename sinkchar >
 INLINE (void CopyChars(sinkchar *dest, const sourcechar *src, int chars))
 
template<typename sourcechar , typename sinkchar >
void CopyChars (sinkchar *dest, const sourcechar *src, int chars)
 
template<typename sourcechar , typename sinkchar >
void CopyCharsUnsigned (sinkchar *dest, const sourcechar *src, int chars)
 
template<typename Stream >
bool StringToArrayIndex (Stream *stream, uint32_t *index)
 
DISABLE_ASAN uintptr_t GetCurrentStackPosition ()
 
 V8_DECLARE_ONCE (init_once)
 
static int ArchiveSpacePerThread ()
 
int StrLength (const char *string)
 
Vector< const char > CStrVector (const char *data)
 
Vector< const uint8_t > OneByteVector (const char *data, int length)
 
Vector< const uint8_t > OneByteVector (const char *data)
 
Vector< char > MutableCStrVector (char *data)
 
Vector< char > MutableCStrVector (char *data, int max)
 
const char * StateToString (StateTag state)
 
static bool ExternalArrayOpRequiresTemp (Representation key_representation, ElementsKind elements_kind)
 
 STATIC_ASSERT (NUMBER_OF_CONSTRAINTS<=8)
 
Operand StackSpaceOperand (int index)
 
Operand StackOperandForReturnAddress (int32_t disp)
 
static bool ExternalArrayOpRequiresTemp (Representation key_representation, ElementsKind elements_kind)
 
template<int kSmiShiftSize>
internal::ObjectIntToSmi (int value)
 
static bool SmiValuesAre31Bits ()
 
static bool SmiValuesAre32Bits ()
 

Variables

const int kHandleBlockSize = v8::internal::KB - 2
 
static const int kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize
 
const int kRegister_no_reg_Code = -1
 
const int kRegister_r0_Code = 0
 
const int kRegister_r1_Code = 1
 
const int kRegister_r2_Code = 2
 
const int kRegister_r3_Code = 3
 
const int kRegister_r4_Code = 4
 
const int kRegister_r5_Code = 5
 
const int kRegister_r6_Code = 6
 
const int kRegister_r7_Code = 7
 
const int kRegister_r8_Code = 8
 
const int kRegister_r9_Code = 9
 
const int kRegister_r10_Code = 10
 
const int kRegister_fp_Code = 11
 
const int kRegister_ip_Code = 12
 
const int kRegister_sp_Code = 13
 
const int kRegister_lr_Code = 14
 
const int kRegister_pc_Code = 15
 
const Register no_reg = { kRegister_no_reg_Code }
 
const Register r0 = { kRegister_r0_Code }
 
const Register r1 = { kRegister_r1_Code }
 
const Register r2 = { kRegister_r2_Code }
 
const Register r3 = { kRegister_r3_Code }
 
const Register r4 = { kRegister_r4_Code }
 
const Register r5 = { kRegister_r5_Code }
 
const Register r6 = { kRegister_r6_Code }
 
const Register r7 = { kRegister_r7_Code }
 
const Register r8 = { kRegister_r8_Code }
 
const Register r9 = { kRegister_r9_Code }
 
const Register r10 = { kRegister_r10_Code }
 
const Register fp = { kRegister_fp_Code }
 
const Register ip = { kRegister_ip_Code }
 
const Register sp = { kRegister_sp_Code }
 
const Register lr = { kRegister_lr_Code }
 
const Register pc = { kRegister_pc_Code }
 
const SwVfpRegister s0 = { 0 }
 
const SwVfpRegister s1 = { 1 }
 
const SwVfpRegister s2 = { 2 }
 
const SwVfpRegister s3 = { 3 }
 
const SwVfpRegister s4 = { 4 }
 
const SwVfpRegister s5 = { 5 }
 
const SwVfpRegister s6 = { 6 }
 
const SwVfpRegister s7 = { 7 }
 
const SwVfpRegister s8 = { 8 }
 
const SwVfpRegister s9 = { 9 }
 
const SwVfpRegister s10 = { 10 }
 
const SwVfpRegister s11 = { 11 }
 
const SwVfpRegister s12 = { 12 }
 
const SwVfpRegister s13 = { 13 }
 
const SwVfpRegister s14 = { 14 }
 
const SwVfpRegister s15 = { 15 }
 
const SwVfpRegister s16 = { 16 }
 
const SwVfpRegister s17 = { 17 }
 
const SwVfpRegister s18 = { 18 }
 
const SwVfpRegister s19 = { 19 }
 
const SwVfpRegister s20 = { 20 }
 
const SwVfpRegister s21 = { 21 }
 
const SwVfpRegister s22 = { 22 }
 
const SwVfpRegister s23 = { 23 }
 
const SwVfpRegister s24 = { 24 }
 
const SwVfpRegister s25 = { 25 }
 
const SwVfpRegister s26 = { 26 }
 
const SwVfpRegister s27 = { 27 }
 
const SwVfpRegister s28 = { 28 }
 
const SwVfpRegister s29 = { 29 }
 
const SwVfpRegister s30 = { 30 }
 
const SwVfpRegister s31 = { 31 }
 
const DwVfpRegister no_dreg = { -1 }
 
const LowDwVfpRegister d0 = { 0 }
 
const LowDwVfpRegister d1 = { 1 }
 
const LowDwVfpRegister d2 = { 2 }
 
const LowDwVfpRegister d3 = { 3 }
 
const LowDwVfpRegister d4 = { 4 }
 
const LowDwVfpRegister d5 = { 5 }
 
const LowDwVfpRegister d6 = { 6 }
 
const LowDwVfpRegister d7 = { 7 }
 
const LowDwVfpRegister d8 = { 8 }
 
const LowDwVfpRegister d9 = { 9 }
 
const LowDwVfpRegister d10 = { 10 }
 
const LowDwVfpRegister d11 = { 11 }
 
const LowDwVfpRegister d12 = { 12 }
 
const LowDwVfpRegister d13 = { 13 }
 
const LowDwVfpRegister d14 = { 14 }
 
const LowDwVfpRegister d15 = { 15 }
 
const DwVfpRegister d16 = { 16 }
 
const DwVfpRegister d17 = { 17 }
 
const DwVfpRegister d18 = { 18 }
 
const DwVfpRegister d19 = { 19 }
 
const DwVfpRegister d20 = { 20 }
 
const DwVfpRegister d21 = { 21 }
 
const DwVfpRegister d22 = { 22 }
 
const DwVfpRegister d23 = { 23 }
 
const DwVfpRegister d24 = { 24 }
 
const DwVfpRegister d25 = { 25 }
 
const DwVfpRegister d26 = { 26 }
 
const DwVfpRegister d27 = { 27 }
 
const DwVfpRegister d28 = { 28 }
 
const DwVfpRegister d29 = { 29 }
 
const DwVfpRegister d30 = { 30 }
 
const DwVfpRegister d31 = { 31 }
 
const QwNeonRegister q0 = { 0 }
 
const QwNeonRegister q1 = { 1 }
 
const QwNeonRegister q2 = { 2 }
 
const QwNeonRegister q3 = { 3 }
 
const QwNeonRegister q4 = { 4 }
 
const QwNeonRegister q5 = { 5 }
 
const QwNeonRegister q6 = { 6 }
 
const QwNeonRegister q7 = { 7 }
 
const QwNeonRegister q8 = { 8 }
 
const QwNeonRegister q9 = { 9 }
 
const QwNeonRegister q10 = { 10 }
 
const QwNeonRegister q11 = { 11 }
 
const QwNeonRegister q12 = { 12 }
 
const QwNeonRegister q13 = { 13 }
 
const QwNeonRegister q14 = { 14 }
 
const QwNeonRegister q15 = { 15 }
 
const CRegister no_creg = { -1 }
 
const CRegister cr0 = { 0 }
 
const CRegister cr1 = { 1 }
 
const CRegister cr2 = { 2 }
 
const CRegister cr3 = { 3 }
 
const CRegister cr4 = { 4 }
 
const CRegister cr5 = { 5 }
 
const CRegister cr6 = { 6 }
 
const CRegister cr7 = { 7 }
 
const CRegister cr8 = { 8 }
 
const CRegister cr9 = { 9 }
 
const CRegister cr10 = { 10 }
 
const CRegister cr11 = { 11 }
 
const CRegister cr12 = { 12 }
 
const CRegister cr13 = { 13 }
 
const CRegister cr14 = { 14 }
 
const CRegister cr15 = { 15 }
 
const VmovIndex VmovIndexLo = { 0 }
 
const VmovIndex VmovIndexHi = { 1 }
 
const int kConstantPoolMarkerMask = 0xfff000f0
 
const int kConstantPoolMarker = 0xe7f000f0
 
const int kConstantPoolLengthMaxMask = 0xffff
 
const int kCodeAgeJumpInstruction = 0xe51ff004
 
const int kNumRegisters = 16
 
const int kNumVFPSingleRegisters = 32
 
const int kNumVFPDoubleRegisters = 32
 
const int kNumVFPRegisters = kNumVFPSingleRegisters + kNumVFPDoubleRegisters
 
const int kPCRegister = 15
 
const int kNoRegister = -1
 
const uint32_t kStopCodeMask = kStopCode - 1
 
const uint32_t kMaxStopCode = kStopCode - 1
 
const int32_t kDefaultStopCode = -1
 
const uint32_t kVFPExceptionMask = 0xf
 
const uint32_t kVFPInvalidOpExceptionBit = 1 << 0
 
const uint32_t kVFPOverflowExceptionBit = 1 << 2
 
const uint32_t kVFPUnderflowExceptionBit = 1 << 3
 
const uint32_t kVFPInexactExceptionBit = 1 << 4
 
const uint32_t kVFPFlushToZeroMask = 1 << 24
 
const uint32_t kVFPDefaultNaNModeControlBit = 1 << 25
 
const uint32_t kVFPNConditionFlagBit = 1 << 31
 
const uint32_t kVFPZConditionFlagBit = 1 << 30
 
const uint32_t kVFPCConditionFlagBit = 1 << 29
 
const uint32_t kVFPVConditionFlagBit = 1 << 28
 
const uint32_t kVFPRoundingModeMask = 3 << 22
 
const int kR9Available = 1
 
const int kNumRegs = 16
 
const RegList kJSCallerSaved
 
const int kNumJSCallerSaved = 4
 
const RegList kCalleeSaved
 
const RegList kCallerSaved
 
const int kNumCalleeSaved = 7 + kR9Available
 
const int kNumDoubleCalleeSaved = 8
 
const int kNumSafepointRegisters = 16
 
const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved
 
const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved
 
const Register cp = { kRegister_r7_Code }
 
const Register pp = { kRegister_r8_Code }
 
const Register kRootRegister = { kRegister_r10_Code }
 
static const int kNoCodeAgeSequenceLength = 5 * kInstructionSize
 
static const int kCodeAgeStubEntryOffset = 3 * kInstructionSize
 
static const int kRegListSizeInBits = sizeof(RegList) * kBitsPerByte
 
const int kSmiShift = kSmiTagSize + kSmiShiftSize
 
const uint64_t kSmiShiftMask = (1UL << kSmiShift) - 1
 
const unsigned kInstructionSize = 4
 
const unsigned kInstructionSizeLog2 = 2
 
const unsigned kLoadLiteralScaleLog2 = 2
 
const unsigned kMaxLoadLiteralRange = 1 * MB
 
const unsigned kNumberOfRegisters = 32
 
const unsigned kNumberOfFPRegisters = 32
 
const int kNumberOfCalleeSavedRegisters = 11
 
const int kFirstCalleeSavedRegisterIndex = 19
 
const int kNumberOfCalleeSavedFPRegisters = 8
 
const int kFirstCalleeSavedFPRegisterIndex = 8
 
const unsigned kJSCalleeSavedRegList = 0x03f80000
 
const unsigned kWRegSizeInBits = 32
 
const unsigned kWRegSizeInBitsLog2 = 5
 
const unsigned kWRegSize = kWRegSizeInBits >> 3
 
const unsigned kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3
 
const unsigned kXRegSizeInBits = 64
 
const unsigned kXRegSizeInBitsLog2 = 6
 
const unsigned kXRegSize = kXRegSizeInBits >> 3
 
const unsigned kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3
 
const unsigned kSRegSizeInBits = 32
 
const unsigned kSRegSizeInBitsLog2 = 5
 
const unsigned kSRegSize = kSRegSizeInBits >> 3
 
const unsigned kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3
 
const unsigned kDRegSizeInBits = 64
 
const unsigned kDRegSizeInBitsLog2 = 6
 
const unsigned kDRegSize = kDRegSizeInBits >> 3
 
const unsigned kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3
 
const int64_t kWRegMask = 0x00000000ffffffffL
 
const int64_t kXRegMask = 0xffffffffffffffffL
 
const int64_t kSRegMask = 0x00000000ffffffffL
 
const int64_t kDRegMask = 0xffffffffffffffffL
 
const int64_t kDSignBit = 63
 
const int64_t kDSignMask = 0x1L << kDSignBit
 
const int64_t kSSignBit = 31
 
const int64_t kSSignMask = 0x1L << kSSignBit
 
const int64_t kXSignBit = 63
 
const int64_t kXSignMask = 0x1L << kXSignBit
 
const int64_t kWSignBit = 31
 
const int64_t kWSignMask = 0x1L << kWSignBit
 
const int64_t kDQuietNanBit = 51
 
const int64_t kDQuietNanMask = 0x1L << kDQuietNanBit
 
const int64_t kSQuietNanBit = 22
 
const int64_t kSQuietNanMask = 0x1L << kSQuietNanBit
 
const int64_t kByteMask = 0xffL
 
const int64_t kHalfWordMask = 0xffffL
 
const int64_t kWordMask = 0xffffffffL
 
const uint64_t kXMaxUInt = 0xffffffffffffffffUL
 
const uint64_t kWMaxUInt = 0xffffffffUL
 
const int64_t kXMaxInt = 0x7fffffffffffffffL
 
const int64_t kXMinInt = 0x8000000000000000L
 
const int32_t kWMaxInt = 0x7fffffff
 
const int32_t kWMinInt = 0x80000000
 
const unsigned kFramePointerRegCode = 29
 
const unsigned kLinkRegCode = 30
 
const unsigned kZeroRegCode = 31
 
const unsigned kJSSPCode = 28
 
const unsigned kSPRegInternalCode = 63
 
const unsigned kRegCodeMask = 0x1f
 
const unsigned kShiftAmountWRegMask = 0x1f
 
const unsigned kShiftAmountXRegMask = 0x3f
 
const unsigned kByteSize = 8
 
const unsigned kByteSizeInBytes = kByteSize >> 3
 
const unsigned kHalfWordSize = 16
 
const unsigned kHalfWordSizeLog2 = 4
 
const unsigned kHalfWordSizeInBytes = kHalfWordSize >> 3
 
const unsigned kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3
 
const unsigned kWordSize = 32
 
const unsigned kWordSizeLog2 = 5
 
const unsigned kWordSizeInBytes = kWordSize >> 3
 
const unsigned kWordSizeInBytesLog2 = kWordSizeLog2 - 3
 
const unsigned kDoubleWordSize = 64
 
const unsigned kDoubleWordSizeInBytes = kDoubleWordSize >> 3
 
const unsigned kQuadWordSize = 128
 
const unsigned kQuadWordSizeInBytes = kQuadWordSize >> 3
 
const unsigned kDoubleMantissaBits = 52
 
const unsigned kDoubleExponentBits = 11
 
const unsigned kDoubleExponentBias = 1023
 
const unsigned kFloatMantissaBits = 23
 
const unsigned kFloatExponentBits = 8
 
const int ImmPCRel_mask = ImmPCRelLo_mask | ImmPCRelHi_mask
 
const int kSFOffset = 31
 
const int kBitfieldNOffset = 22
 
const int kHltBadCode = 0xbad
 
const Instr kImmExceptionIsRedirectedCall = 0xca11
 
const Instr kImmExceptionIsUnreachable = 0xdebf
 
const Instr kImmExceptionIsPrintf = 0xdeb1
 
const unsigned kPrintfArgCountOffset = 1 * kInstructionSize
 
const unsigned kPrintfArgPatternListOffset = 2 * kInstructionSize
 
const unsigned kPrintfLength = 3 * kInstructionSize
 
const unsigned kPrintfMaxArgCount = 4
 
static const unsigned kPrintfArgPatternBits = 2
 
const Instr kImmExceptionIsDebug = 0xdeb0
 
const unsigned kDebugCodeOffset = 1 * kInstructionSize
 
const unsigned kDebugParamsOffset = 2 * kInstructionSize
 
const unsigned kDebugMessageOffset = 3 * kInstructionSize
 
const unsigned kDebuggerTracingDirectivesMask = 3 << 6
 
static const CounterDescriptor kCounterList []
 
const int kCounterNameMaxLength = 256
 
const uint64_t kDefaultInstrumentationSamplingPeriod = 1 << 22
 
static DoubleConstant double_constants
 
static bool math_exp_data_initialized = false
 
static base::Mutex * math_exp_data_mutex = NULL
 
static double * math_exp_constants_array = NULL
 
static double * math_exp_log_table_array = NULL
 
const int kTagBits = 2
 
const int kTagMask = (1 << kTagBits) - 1
 
const int kExtraTagBits = 4
 
const int kLocatableTypeTagBits = 2
 
const int kSmallDataBits = kBitsPerByte - kLocatableTypeTagBits
 
const int kEmbeddedObjectTag = 0
 
const int kCodeTargetTag = 1
 
const int kLocatableTag = 2
 
const int kDefaultTag = 3
 
const int kPCJumpExtraTag = (1 << kExtraTagBits) - 1
 
const int kSmallPCDeltaBits = kBitsPerByte - kTagBits
 
const int kSmallPCDeltaMask = (1 << kSmallPCDeltaBits) - 1
 
const int kVariableLengthPCJumpTopTag = 1
 
const int kChunkBits = 7
 
const int kChunkMask = (1 << kChunkBits) - 1
 
const int kLastChunkTagBits = 1
 
const int kLastChunkTagMask = 1
 
const int kLastChunkTag = 1
 
const int kDataJumpExtraTag = kPCJumpExtraTag - 1
 
const int kCodeWithIdTag = 0
 
const int kNonstatementPositionTag = 1
 
const int kStatementPositionTag = 2
 
const int kCommentTag = 3
 
const int kPoolExtraTag = kPCJumpExtraTag - 2
 
const int kConstPoolTag = 0
 
const int kVeneerPoolTag = 1
 
static BuiltinFunctionTable builtin_function_table
 
const int BYTECODE_MASK = 0xff
 
const unsigned int MAX_FIRST_ARG = 0x7fffffu
 
const int BYTECODE_SHIFT = 8
 
static const CachedPower kCachedPowers []
 
static const int kCachedPowersOffset = 348
 
static const double kD_1_LOG2_10 = 0.30102999566398114
 
const bool FLAG_enable_slow_asserts = false
 
static const int kNumberDictionaryProbes = 4
 
static const int kScriptGenerations = 5
 
static const int kEvalGlobalGenerations = 2
 
static const int kEvalContextualGenerations = 2
 
static const int kRegExpGenerations = 2
 
static const int kInitialCacheSize = 64
 
const int kMaxSignificantDigits = 772
 
const int kDoubleToCStringMinBufferSize = 100
 
static const int kProfilerStackSize = 64 * KB
 
static const int kDaysIn4Years = 4 * 365 + 1
 
static const int kDaysIn100Years = 25 * kDaysIn4Years - 1
 
static const int kDaysIn400Years = 4 * kDaysIn100Years + 1
 
static const int kDays1970to2000 = 30 * 365 + 7
 
static const int kDaysOffset
 
static const int kYearsOffset = 400000
 
static const char kDaysInMonths []
 
static const int kDeoptTableMaxEpilogueCodeSize = 2 * KB
 
const int kBase10MaximalLength = 17
 
static base::LazyInstance< ElementsKind *, InitializeFastElementsKindSequence >::type fast_elements_kind_sequence = LAZY_INSTANCE_INITIALIZER
 
const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1
 
const int kFastElementsKindCount
 
const int kFastElementsKindPackedToHoley
 
static const int kPackedSizeNotKnown = -1
 
static const int kMinimalTargetExponent = -60
 
static const int kMaximalTargetExponent = -32
 
static const uint32_t kTen4 = 10000
 
static const uint32_t kTen5 = 100000
 
static const uint32_t kTen6 = 1000000
 
static const uint32_t kTen7 = 10000000
 
static const uint32_t kTen8 = 100000000
 
static const uint32_t kTen9 = 1000000000
 
const int kFastDtoaMaximalLength = 17
 
static const int kDoubleSignificandSize = 53
 
JSCallerSavedCodeData caller_saved_code_data
 
const int KB = 1024
 
const int MB = KB * KB
 
const int GB = KB * KB * KB
 
const int kMaxInt = 0x7FFFFFFF
 
const int kMinInt = -kMaxInt - 1
 
const int kMaxInt8 = (1 << 7) - 1
 
const int kMinInt8 = -(1 << 7)
 
const int kMaxUInt8 = (1 << 8) - 1
 
const int kMinUInt8 = 0
 
const int kMaxInt16 = (1 << 15) - 1
 
const int kMinInt16 = -(1 << 15)
 
const int kMaxUInt16 = (1 << 16) - 1
 
const int kMinUInt16 = 0
 
const uint32_t kMaxUInt32 = 0xFFFFFFFFu
 
const int kCharSize = sizeof(char)
 
const int kShortSize = sizeof(short)
 
const int kIntSize = sizeof(int)
 
const int kInt32Size = sizeof(int32_t)
 
const int kInt64Size = sizeof(int64_t)
 
const int kDoubleSize = sizeof(double)
 
const int kIntptrSize = sizeof(intptr_t)
 
const int kPointerSize = sizeof(void*)
 
const int kRegisterSize = kPointerSize
 
const int kPCOnStackSize = kRegisterSize
 
const int kFPOnStackSize = kRegisterSize
 
const int kDoubleSizeLog2 = 3
 
const int kPointerSizeLog2 = 2
 
const intptr_t kIntptrSignBit = 0x80000000
 
const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu
 
const bool kRequiresCodeRange = false
 
const size_t kMaximalCodeRangeSize = 0 * MB
 
const int kBitsPerByte = 8
 
const int kBitsPerByteLog2 = 3
 
const int kBitsPerPointer = kPointerSize * kBitsPerByte
 
const int kBitsPerInt = kIntSize * kBitsPerByte
 
const uint32_t kBinary32SignMask = 0x80000000u
 
const uint32_t kBinary32ExponentMask = 0x7f800000u
 
const uint32_t kBinary32MantissaMask = 0x007fffffu
 
const int kBinary32ExponentBias = 127
 
const int kBinary32MaxExponent = 0xFE
 
const int kBinary32MinExponent = 0x01
 
const int kBinary32MantissaBits = 23
 
const int kBinary32ExponentShift = 23
 
const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51
 
const int kOneByteSize = kCharSize
 
const int kUC16Size = sizeof(uc16)
 
const intptr_t kSmiSignMask = kIntptrSignBit
 
const int kObjectAlignmentBits = kPointerSizeLog2
 
const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits
 
const intptr_t kObjectAlignmentMask = kObjectAlignment - 1
 
const intptr_t kPointerAlignment = (1 << kPointerSizeLog2)
 
const intptr_t kPointerAlignmentMask = kPointerAlignment - 1
 
const intptr_t kDoubleAlignment = 8
 
const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1
 
const int kCodeAlignmentBits = 5
 
const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits
 
const intptr_t kCodeAlignmentMask = kCodeAlignment - 1
 
const int kPageHeaderTag = 3
 
const int kPageHeaderTagSize = 2
 
const intptr_t kPageHeaderTagMask = (1 << kPageHeaderTagSize) - 1
 
const Address kZapValue = reinterpret_cast<Address>(0xdeadbeef)
 
const Address kHandleZapValue = reinterpret_cast<Address>(0xbaddeaf)
 
const Address kGlobalHandleZapValue = reinterpret_cast<Address>(0xbaffedf)
 
const Address kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdaf)
 
const uint32_t kSlotsZapValue = 0xbeefdeef
 
const uint32_t kDebugZapValue = 0xbadbaddb
 
const uint32_t kFreeListZapValue = 0xfeed1eaf
 
const int kCodeZapValue = 0xbadc0de
 
const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32)
 
const int kSpaceTagSize = 3
 
const int kSpaceTagMask = (1 << kSpaceTagSize) - 1
 
const uint32_t kHoleNanUpper32 = 0x7FFFFFFF
 
const uint32_t kHoleNanLower32 = 0xFFFFFFFF
 
const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000
 
const uint64_t kHoleNanInt64
 
const uint64_t kLastNonNaNInt64
 
static base::LazyMutex checkpoint_object_stats_mutex = LAZY_MUTEX_INITIALIZER
 
static const int kStartTableEntriesPerLine = 5
 
static const int kStartTableLines = 171
 
static const int kStartTableInvalidLine = 127
 
static const int kStartTableUnusedEntry = 126
 
char kStartTable [kStartTableLines *kStartTableEntriesPerLine]
 
static const int kSweeperThreadStackSize = 64 * KB
 
static const int kDefaultKeyedHeaderOffsetSentinel = -1
 
static const int kMaxTrackedFields = 16
 
static const int kMaxTrackedObjects = 5
 
static const int kNotInlinable = 1000000000
 
static const byte kCallOpcode = 0xE8
 
static const int kNoCodeAgeSequenceLength = 5
 
const int kRegister_eax_Code = 0
 
const int kRegister_ecx_Code = 1
 
const int kRegister_edx_Code = 2
 
const int kRegister_ebx_Code = 3
 
const int kRegister_esp_Code = 4
 
const int kRegister_ebp_Code = 5
 
const int kRegister_esi_Code = 6
 
const int kRegister_edi_Code = 7
 
const Register eax = { kRegister_eax_Code }
 
const Register ecx = { kRegister_ecx_Code }
 
const Register edx = { kRegister_edx_Code }
 
const Register ebx = { kRegister_ebx_Code }
 
const Register esp = { kRegister_esp_Code }
 
const Register ebp = { kRegister_ebp_Code }
 
const Register esi = { kRegister_esi_Code }
 
const Register edi = { kRegister_edi_Code }
 
const XMMRegister xmm0 = { 0 }
 
const XMMRegister xmm1 = { 1 }
 
const XMMRegister xmm2 = { 2 }
 
const XMMRegister xmm3 = { 3 }
 
const XMMRegister xmm4 = { 4 }
 
const XMMRegister xmm5 = { 5 }
 
const XMMRegister xmm6 = { 6 }
 
const XMMRegister xmm7 = { 7 }
 
const XMMRegister no_xmm_reg = { -1 }
 
const int kNoAlignmentPadding = 0
 
const int kAlignmentPaddingPushed = 2
 
const int kAlignmentZapValue = 0x12345678
 
const int kMaxKeyedPolymorphism = 4
 
static const Address IC_utilities []
 
static int fatal_exception_depth = 0
 
const int kMaxLookaheadForBoyerMoore = 8
 
const int kPatternTooShortForBoyerMoore = 2
 
static const int kSpaceRanges []
 
static const int kSpaceRangeCount = arraysize(kSpaceRanges)
 
static const int kWordRanges []
 
static const int kWordRangeCount = arraysize(kWordRanges)
 
static const int kDigitRanges [] = { '0', '9' + 1, 0x10000 }
 
static const int kDigitRangeCount = arraysize(kDigitRanges)
 
static const int kSurrogateRanges [] = { 0xd800, 0xe000, 0x10000 }
 
static const int kSurrogateRangeCount = arraysize(kSurrogateRanges)
 
static const int kLineTerminatorRanges []
 
static const int kLineTerminatorRangeCount = arraysize(kLineTerminatorRanges)
 
int kUninitializedRegExpNodePlaceHolder
 
static const char *const kLogEventsNames [Logger::NUMBER_OF_LOG_EVENTS]
 
static const int kNoCodeAgeSequenceLength = 7 * Assembler::kInstrSize
 
const FPURegister no_freg = { -1 }
 
const FPURegister f0 = { 0 }
 
const FPURegister f1 = { 1 }
 
const FPURegister f2 = { 2 }
 
const FPURegister f3 = { 3 }
 
const FPURegister f4 = { 4 }
 
const FPURegister f5 = { 5 }
 
const FPURegister f6 = { 6 }
 
const FPURegister f7 = { 7 }
 
const FPURegister f8 = { 8 }
 
const FPURegister f9 = { 9 }
 
const FPURegister f10 = { 10 }
 
const FPURegister f11 = { 11 }
 
const FPURegister f12 = { 12 }
 
const FPURegister f13 = { 13 }
 
const FPURegister f14 = { 14 }
 
const FPURegister f15 = { 15 }
 
const FPURegister f16 = { 16 }
 
const FPURegister f17 = { 17 }
 
const FPURegister f18 = { 18 }
 
const FPURegister f19 = { 19 }
 
const FPURegister f20 = { 20 }
 
const FPURegister f21 = { 21 }
 
const FPURegister f22 = { 22 }
 
const FPURegister f23 = { 23 }
 
const FPURegister f24 = { 24 }
 
const FPURegister f25 = { 25 }
 
const FPURegister f26 = { 26 }
 
const FPURegister f27 = { 27 }
 
const FPURegister f28 = { 28 }
 
const FPURegister f29 = { 29 }
 
const FPURegister f30 = { 30 }
 
const FPURegister f31 = { 31 }
 
const FPUControlRegister no_fpucreg = { kInvalidFPUControlRegister }
 
const FPUControlRegister FCSR = { kFCSRRegister }
 
const int kInvalidRegister = -1
 
const int kNumSimuRegisters = 35
 
const int kNumFPURegisters = 32
 
const int kInvalidFPURegister = -1
 
const int kFCSRRegister = 31
 
const int kInvalidFPUControlRegister = -1
 
const uint32_t kFPUInvalidResult = static_cast<uint32_t>(1 << 31) - 1
 
const uint64_t kFPU64InvalidResult
 
const uint32_t kFCSRInexactFlagBit = 2
 
const uint32_t kFCSRUnderflowFlagBit = 3
 
const uint32_t kFCSROverflowFlagBit = 4
 
const uint32_t kFCSRDivideByZeroFlagBit = 5
 
const uint32_t kFCSRInvalidOpFlagBit = 6
 
const uint32_t kFCSRInexactFlagMask = 1 << kFCSRInexactFlagBit
 
const uint32_t kFCSRUnderflowFlagMask = 1 << kFCSRUnderflowFlagBit
 
const uint32_t kFCSROverflowFlagMask = 1 << kFCSROverflowFlagBit
 
const uint32_t kFCSRDivideByZeroFlagMask = 1 << kFCSRDivideByZeroFlagBit
 
const uint32_t kFCSRInvalidOpFlagMask = 1 << kFCSRInvalidOpFlagBit
 
const uint32_t kFCSRFlagMask
 
const uint32_t kFCSRExceptionFlagMask = kFCSRFlagMask ^ kFCSRInexactFlagMask
 
const int32_t kPrefHintLoad = 0
 
const int32_t kPrefHintStore = 1
 
const int32_t kPrefHintLoadStreamed = 4
 
const int32_t kPrefHintStoreStreamed = 5
 
const int32_t kPrefHintLoadRetained = 6
 
const int32_t kPrefHintStoreRetained = 7
 
const int32_t kPrefHintWritebackInvalidate = 25
 
const int32_t kPrefHintPrepareForStore = 30
 
const uint32_t kMaxWatchpointCode = 31
 
const int kOpcodeShift = 26
 
const int kOpcodeBits = 6
 
const int kRsShift = 21
 
const int kRsBits = 5
 
const int kRtShift = 16
 
const int kRtBits = 5
 
const int kRdShift = 11
 
const int kRdBits = 5
 
const int kSaShift = 6
 
const int kSaBits = 5
 
const int kFunctionShift = 0
 
const int kFunctionBits = 6
 
const int kLuiShift = 16
 
const int kImm16Shift = 0
 
const int kImm16Bits = 16
 
const int kImm21Shift = 0
 
const int kImm21Bits = 21
 
const int kImm26Shift = 0
 
const int kImm26Bits = 26
 
const int kImm28Shift = 0
 
const int kImm28Bits = 28
 
const int kImm32Shift = 0
 
const int kImm32Bits = 32
 
const int kImmFieldShift = 2
 
const int kFrBits = 5
 
const int kFrShift = 21
 
const int kFsShift = 11
 
const int kFsBits = 5
 
const int kFtShift = 16
 
const int kFtBits = 5
 
const int kFdShift = 6
 
const int kFdBits = 5
 
const int kFCccShift = 8
 
const int kFCccBits = 3
 
const int kFBccShift = 18
 
const int kFBccBits = 3
 
const int kFBtrueShift = 16
 
const int kFBtrueBits = 1
 
const int kOpcodeMask = ((1 << kOpcodeBits) - 1) << kOpcodeShift
 
const int kImm26Mask = ((1 << kImm26Bits) - 1) << kImm26Shift
 
const int kImm28Mask = ((1 << kImm28Bits) - 1) << kImm28Shift
 
const int kRsFieldMask = ((1 << kRsBits) - 1) << kRsShift
 
const int kRtFieldMask = ((1 << kRtBits) - 1) << kRtShift
 
const int kRdFieldMask = ((1 << kRdBits) - 1) << kRdShift
 
const int kSaFieldMask = ((1 << kSaBits) - 1) << kSaShift
 
const int kFunctionFieldMask = ((1 << kFunctionBits) - 1) << kFunctionShift
 
const int kHiMask = 0xffff << 16
 
const int kLoMask = 0xffff
 
const int kSignMask = 0x80000000
 
const int kJumpAddrMask = (1 << (kImm26Bits + kImmFieldShift)) - 1
 
const uint32_t kFPURoundingModeMask = 3 << 0
 
const Instr kPopInstruction
 
const Instr kPushInstruction
 
const Instr kPushRegPattern
 
const Instr kPopRegPattern
 
const Instr kLwRegFpOffsetPattern
 
const Instr kSwRegFpOffsetPattern
 
const Instr kLwRegFpNegOffsetPattern
 
const Instr kSwRegFpNegOffsetPattern
 
const Instr kRtMask
 
const Instr kLwSwInstrTypeMask
 
const Instr kLwSwInstrArgumentMask
 
const Instr kLwSwOffsetMask
 
const Instr rtCallRedirInstr = SPECIAL | BREAK | call_rt_redirected << 6
 
const Instr nopInstr = 0
 
const int kCArgSlotCount = 4
 
const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize
 
const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize
 
const int kBArgsSlotsSize = 0 * Instruction::kInstrSize
 
const int kBranchReturnOffset = 2 * Instruction::kInstrSize
 
const RegList kCalleeSavedFPU
 
const int kNumCalleeSavedFPU = 6
 
const RegList kCallerSavedFPU
 
const int kUndefIndex = -1
 
const int kSafepointRegisterStackIndexMap [kNumRegs]
 
static const int kNoCodeAgeSequenceLength = 9 * Assembler::kInstrSize
 
const int64_t kHi16MaskOf64 = (int64_t)0xffff << 48
 
const int64_t kSe16MaskOf64 = (int64_t)0xffff << 32
 
const int64_t kTh16MaskOf64 = (int64_t)0xffff << 16
 
 serialized_data
 
 ByteArray
 
kSerializedDataOffset prototype_template
 
kSerializedDataOffset Object
 
kSerializedDataOffset kPrototypeTemplateOffset indexed_property_handler
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset instance_call_handler
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset internal_field_count
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
 
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset DependentCode
 
 feedback_vector
 
 TypeFeedbackVector
 
kFeedbackVectorOffset flag
 
kFeedbackVectorOffset hidden_prototype
 
kFeedbackVectorOffset kHiddenPrototypeBit read_only_prototype
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit do_not_cache
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit start_position_and_type
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit is_toplevel
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit compiler_hints
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit allows_lazy_compilation_without_context
 
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext has_duplicate_parameters
 
 expected_nof_properties
 
kExpectedNofPropertiesOffset function_token_position
 
kExpectedNofPropertiesOffset kFunctionTokenPositionOffset opt_count_and_bailout_reason
 
kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset profiler_ticks
 
 name_should_print_as_anonymous
 
static const int kGrowICDelta
 
static const ExtraICState kNoExtraICState = 0
 
const int kVariableSizeSentinel = 0
 
const int kStubMajorKeyBits = 7
 
const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1
 
const uint32_t kIsNotStringMask = 0x80
 
const uint32_t kStringTag = 0x0
 
const uint32_t kNotStringTag = 0x80
 
const uint32_t kIsNotInternalizedMask = 0x40
 
const uint32_t kNotInternalizedTag = 0x40
 
const uint32_t kInternalizedTag = 0x0
 
const uint32_t kStringEncodingMask = 0x4
 
const uint32_t kTwoByteStringTag = 0x0
 
const uint32_t kOneByteStringTag = 0x4
 
const uint32_t kStringRepresentationMask = 0x03
 
const uint32_t kIsIndirectStringMask = 0x1
 
const uint32_t kIsIndirectStringTag = 0x1
 
const uint32_t kSlicedNotConsMask = kSlicedStringTag & ~kConsStringTag
 
const uint32_t kOneByteDataHintMask = 0x08
 
const uint32_t kOneByteDataHintTag = 0x08
 
const uint32_t kShortExternalStringMask = 0x10
 
const uint32_t kShortExternalStringTag = 0x10
 
const uint32_t kShortcutTypeMask
 
const uint32_t kShortcutTypeTag = kConsStringTag | kNotInternalizedTag
 
const int kExternalArrayTypeCount
 
static const uc16 kNoCharClass = 0
 
static const int kDescriptorIndexBitCount = 10
 
static const int kMaxNumberOfDescriptors
 
static const int kInvalidEnumCacheSentinel
 
static const double kPiDividedBy4 = 0.78539816339744830962
 
static const uintptr_t kOneInEveryByte = kUintptrAllBitsSet / 0xFF
 
static const uintptr_t kAsciiMask = kOneInEveryByte << 7
 
static const int kFrameDetailsFrameIdIndex = 0
 
static const int kFrameDetailsReceiverIndex = 1
 
static const int kFrameDetailsFunctionIndex = 2
 
static const int kFrameDetailsArgumentCountIndex = 3
 
static const int kFrameDetailsLocalCountIndex = 4
 
static const int kFrameDetailsSourcePositionIndex = 5
 
static const int kFrameDetailsConstructCallIndex = 6
 
static const int kFrameDetailsAtReturnIndex = 7
 
static const int kFrameDetailsFlagsIndex = 8
 
static const int kFrameDetailsFirstDynamicIndex = 9
 
static const int kScopeDetailsTypeIndex = 0
 
static const int kScopeDetailsObjectIndex = 1
 
static const int kScopeDetailsSize = 2
 
static const int kThreadDetailsCurrentThreadIndex = 0
 
static const int kThreadDetailsThreadIdIndex = 1
 
static const int kThreadDetailsSize = 2
 
static const Runtime::Function kIntrinsicFunctions []
 
const int kStringBuilderConcatHelperLengthBits = 11
 
const int kStringBuilderConcatHelperPositionBits = 19
 
static const int kProfilerTicksBeforeOptimization = 2
 
static const int kProfilerTicksBeforeReenablingOptimization = 250
 
static const int kTicksWhenNotEnoughTypeInfo = 100
 
static const int kOSRCodeSizeAllowanceBase
 
static const int kOSRCodeSizeAllowancePerTick
 
static const int kMaxSizeEarlyOpt
 
static const byte kUtf8MultiByteMask = 0xC0
 
static const byte kUtf8MultiByteCharFollower = 0x80
 
static const byte one_char_tokens []
 
const int kTypeCodeCount = LAZY_DEOPTIMIZATION + 1
 
const int kFirstTypeCode = UNCLASSIFIED
 
const int kReferenceIdBits = 16
 
const int kReferenceIdMask = (1 << kReferenceIdBits) - 1
 
const int kReferenceTypeShift = kReferenceIdBits
 
const int kDeoptTableSerializeEntryCount = 64
 
static SnapshotImplsnapshot_impl_ = NULL
 
static const int kMentionedObjectCacheMaxSize = 256
 
static const int kMaxExactDoubleIntegerDecimalDigits = 15
 
static const int kMaxUint64DecimalDigits = 19
 
static const int kMaxDecimalPower = 309
 
static const int kMinDecimalPower = -324
 
static const uint64_t kMaxUint64 = V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF)
 
static const double exact_powers_of_ten []
 
static const int kExactPowersOfTenSize = arraysize(exact_powers_of_ten)
 
static const int kMaxSignificantDecimalDigits = 780
 
static const uint32_t kZeroHashSeed = 0
 
const int kMinComplexMemCopy = 16 * kPointerSize
 
static const byte kCallOpcode = 0xE8
 
static const int kNoCodeAgeSequenceLength = kPointerSize == kInt64Size ? 6 : 17
 
const int kRegister_rax_Code = 0
 
const int kRegister_rcx_Code = 1
 
const int kRegister_rdx_Code = 2
 
const int kRegister_rbx_Code = 3
 
const int kRegister_rsp_Code = 4
 
const int kRegister_rbp_Code = 5
 
const int kRegister_rsi_Code = 6
 
const int kRegister_rdi_Code = 7
 
const int kRegister_r11_Code = 11
 
const int kRegister_r12_Code = 12
 
const int kRegister_r13_Code = 13
 
const int kRegister_r14_Code = 14
 
const int kRegister_r15_Code = 15
 
const Register rax = { kRegister_rax_Code }
 
const Register rcx = { kRegister_rcx_Code }
 
const Register rdx = { kRegister_rdx_Code }
 
const Register rbx = { kRegister_rbx_Code }
 
const Register rsp = { kRegister_rsp_Code }
 
const Register rbp = { kRegister_rbp_Code }
 
const Register rsi = { kRegister_rsi_Code }
 
const Register rdi = { kRegister_rdi_Code }
 
const Register r11 = { kRegister_r11_Code }
 
const Register r12 = { kRegister_r12_Code }
 
const Register r13 = { kRegister_r13_Code }
 
const Register r14 = { kRegister_r14_Code }
 
const Register r15 = { kRegister_r15_Code }
 
const Register arg_reg_1 = { kRegister_rdi_Code }
 
const Register arg_reg_2 = { kRegister_rsi_Code }
 
const Register arg_reg_3 = { kRegister_rdx_Code }
 
const Register arg_reg_4 = { kRegister_rcx_Code }
 
const XMMRegister xmm8 = { 8 }
 
const XMMRegister xmm9 = { 9 }
 
const XMMRegister xmm10 = { 10 }
 
const XMMRegister xmm11 = { 11 }
 
const XMMRegister xmm12 = { 12 }
 
const XMMRegister xmm13 = { 13 }
 
const XMMRegister xmm14 = { 14 }
 
const XMMRegister xmm15 = { 15 }
 
const Register kScratchRegister = { 10 }
 
const Register kSmiConstantRegister = { 12 }
 
const int kSmiConstantRegisterValue = 1
 
const int kRootRegisterBias = 128
 
static const byte kCallOpcode = 0xE8
 
static const int kNoCodeAgeSequenceLength = 5
 
const X87Register stX_0 = { 0 }
 
const X87Register stX_1 = { 1 }
 
const X87Register stX_2 = { 2 }
 
const X87Register stX_3 = { 3 }
 
const X87Register stX_4 = { 4 }
 
const X87Register stX_5 = { 5 }
 
const X87Register stX_6 = { 6 }
 
const X87Register stX_7 = { 7 }
 
static const int kASanRedzoneBytes = 24
 
const int kApiPointerSize = sizeof(void*)
 
const int kApiIntSize = sizeof(int)
 
const int kApiInt64Size = sizeof(int64_t)
 
const int kHeapObjectTag = 1
 
const int kHeapObjectTagSize = 2
 
const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1
 
const int kSmiTag = 0
 
const int kSmiTagSize = 1
 
const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1
 
const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize
 
const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize
 

Typedef Documentation

◆ Address

Definition at line 101 of file globals.h.

◆ AllowAllocationFailure

◆ AllowCodeDependencyChange

◆ AllowCompilation

◆ AllowDeferredHandleDereference

◆ AllowDeoptimization

◆ AllowHandleAllocation

◆ AllowHandleDereference

◆ AllowHeapAllocation

◆ AllowJavascriptExecution

◆ arm64_regexp_matcher

typedef int(* v8::internal::arm64_regexp_matcher) (String *input, int64_t start_offset, const byte *input_start, const byte *input_end, int *output, int64_t output_size, Address stack_base, int64_t direct_call, void *return_address, Isolate *isolate)

Definition at line 38 of file simulator-arm64.h.

◆ arm_regexp_matcher

typedef int(* v8::internal::arm_regexp_matcher) (String *, int, const byte *, const byte *, void *, int *, int, Address, int, Isolate *)

Definition at line 28 of file simulator-arm.h.

◆ BoolVector

Definition at line 54 of file zone-containers.h.

◆ Bounds

Definition at line 1047 of file types.h.

◆ byte

typedef uint8_t v8::internal::byte

Definition at line 100 of file globals.h.

◆ Canonicalize

◆ CodeHandleList

Definition at line 199 of file list.h.

◆ CodeList

Definition at line 196 of file list.h.

◆ ConstraintCallback

typedef bool(* v8::internal::ConstraintCallback) (Address new_addr, Address old_addr)

Definition at line 435 of file globals.h.

◆ DebugObjectCache

Definition at line 354 of file isolate.h.

◆ DisallowAllocationFailure

◆ DisallowCodeDependencyChange

◆ DisallowCompilation

◆ DisallowDeferredHandleDereference

◆ DisallowDeoptimization

◆ DisallowHandleAllocation

◆ DisallowHandleDereference

◆ DisallowHeapAllocation

◆ DisallowJavascriptExecution

◆ DoubleRegister

Definition at line 257 of file assembler-arm.h.

◆ EmitCharacterFunction

typedef bool v8::internal::EmitCharacterFunction(Isolate *isolate, RegExpCompiler *compiler, uc16 c, Label *on_failure, int cp_offset, bool check, bool preloaded)

Definition at line 1707 of file jsregexp.cc.

◆ ExperimentalNatives

◆ ExternalReferenceRedirectorPointer

typedef void* v8::internal::ExternalReferenceRedirectorPointer()

Definition at line 77 of file isolate.h.

◆ ExternalStringTableCleaner

◆ ExternalStringTableUpdaterCallback

typedef String*(* v8::internal::ExternalStringTableUpdaterCallback) (Heap *heap, Object **pointer)

Definition at line 346 of file heap.h.

◆ ExtraICState

Definition at line 305 of file objects.h.

◆ FloatRegister

Definition at line 287 of file assembler-mips.h.

◆ GVNFlagSet

Definition at line 414 of file hydrogen-instructions.h.

◆ HashMap

◆ HeapObjectCallback

typedef int(* v8::internal::HeapObjectCallback) (HeapObject *obj)

Definition at line 429 of file globals.h.

◆ HeapThing

typedef void* v8::internal::HeapThing

Definition at line 267 of file heap-snapshot-generator.h.

◆ HeapType

Definition at line 192 of file list.h.

◆ InlineCacheCallback

typedef void(* v8::internal::InlineCacheCallback) (Code *code, Address ic)

Definition at line 440 of file globals.h.

◆ Instr

typedef int32_t v8::internal::Instr

Definition at line 124 of file constants-arm.h.

◆ InternalizedStringTableCleaner

◆ IntVector

Definition at line 55 of file zone-containers.h.

◆ IsAliveFunction

typedef bool(* v8::internal::IsAliveFunction) (HeapObject *obj, int *size, int *offset)

Definition at line 17 of file mark-compact.h.

◆ MapHandleList

Definition at line 197 of file list.h.

◆ MapList

Definition at line 195 of file list.h.

◆ MapSet

Definition at line 25 of file hydrogen-check-elimination.cc.

◆ MemOperand

Definition at line 18 of file macro-assembler-ia32.h.

◆ mips_regexp_matcher

typedef int(* v8::internal::mips_regexp_matcher)(String *input, int32_t start_offset, const byte *input_start, const byte *input_end, void *return_address, int *output, int32_t output_size, Address stack_base, int32_t direct_call, Isolate *isolate)

Definition at line 29 of file simulator-mips.h.

◆ Natives

Definition at line 43 of file natives.h.

◆ NativeSourceCallback

typedef bool(* v8::internal::NativeSourceCallback) (Vector< const char > name, Vector< const char > source, int index)

Definition at line 15 of file natives.h.

◆ NoThrowOnJavascriptExecution

◆ ObjectPair

typedef uint64_t v8::internal::ObjectPair

Definition at line 130 of file runtime-utils.h.

◆ ObjectSlotCallback

typedef void(* v8::internal::ObjectSlotCallback) (HeapObject **from, HeapObject *to)

Definition at line 20 of file store-buffer.h.

◆ PlatformSmiTagging

◆ QuadRegister

Definition at line 329 of file assembler-arm.h.

◆ regexp_matcher

typedef int(* v8::internal::regexp_matcher)(String *, int, const byte *, const byte *, int *, int, Address, int, Isolate *)

Definition at line 19 of file simulator-ia32.h.

◆ RegionCallback

typedef void(StoreBuffer::* v8::internal::RegionCallback) (Address start, Address end, ObjectSlotCallback slot_callback, bool clear_maps)

Definition at line 22 of file store-buffer.h.

◆ RegList

Definition at line 18 of file frames.h.

◆ ScavengingCallback

typedef void(* v8::internal::ScavengingCallback) (Map *map, HeapObject **slot, HeapObject *object)

Definition at line 467 of file heap.h.

◆ SimpleOneByteStringResource

◆ SimpleTwoByteStringResource

◆ SRegisterFieldMask

Definition at line 256 of file constants-arm.h.

◆ StoreBufferCallback

typedef void(* v8::internal::StoreBufferCallback) (Heap *heap, MemoryChunk *page, StoreBufferEvent event)

Definition at line 500 of file globals.h.

◆ StringBuilderSubstringLength

◆ StringBuilderSubstringPosition

◆ ThrowOnJavascriptExecution

◆ Type

Definition at line 18 of file simplified-operator.h.

◆ TypeHandleList

Definition at line 198 of file list.h.

◆ uc16

typedef uint16_t v8::internal::uc16

Definition at line 184 of file globals.h.

◆ uc32

typedef int32_t v8::internal::uc32

Definition at line 185 of file globals.h.

◆ UnaryMathFunction

typedef double(* v8::internal::UnaryMathFunction) (double x)

Definition at line 98 of file codegen.h.

◆ WeakSlotCallback

typedef bool(* v8::internal::WeakSlotCallback) (Object **pointer)

Definition at line 349 of file globals.h.

◆ WeakSlotCallbackWithHeap

typedef bool(* v8::internal::WeakSlotCallbackWithHeap) (Heap *heap, Object **pointer)

Definition at line 351 of file globals.h.

◆ ZoneBoolAllocator

◆ ZoneHashMap

◆ ZoneIntAllocator

◆ ZoneObjectList

Definition at line 144 of file ast.h.

◆ ZoneStringList

Definition at line 143 of file ast.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
S6 
B4 
B5 
B6 
B7 
B8 
B9 
B12 
B16 
B18 
B19 
B20 
B21 
B22 
B23 
B24 
B25 
B26 
B27 
B28 
kCondMask 
kALUMask 
kRdMask 
kCoprocessorMask 
kOpCodeMask 
kImm24Mask 
kImm16Mask 
kImm8Mask 
kOff12Mask 
kOff8Mask 

Definition at line 163 of file constants-arm.h.

163  {
164  H = 1 << 5, // Halfword (or byte).
165  S6 = 1 << 6, // Signed (or unsigned).
166  L = 1 << 20, // Load (or store).
167  S = 1 << 20, // Set condition code (or leave unchanged).
168  W = 1 << 21, // Writeback base register (or leave unchanged).
169  A = 1 << 21, // Accumulate in multiply instruction (or not).
170  B = 1 << 22, // Unsigned byte (or word).
171  N = 1 << 22, // Long (or short).
172  U = 1 << 23, // Positive (or negative) offset/index.
173  P = 1 << 24, // Offset/pre-indexed addressing (or post-indexed addressing).
174  I = 1 << 25, // Immediate shifter operand (or not).
175 
176  B4 = 1 << 4,
177  B5 = 1 << 5,
178  B6 = 1 << 6,
179  B7 = 1 << 7,
180  B8 = 1 << 8,
181  B9 = 1 << 9,
182  B12 = 1 << 12,
183  B16 = 1 << 16,
184  B18 = 1 << 18,
185  B19 = 1 << 19,
186  B20 = 1 << 20,
187  B21 = 1 << 21,
188  B22 = 1 << 22,
189  B23 = 1 << 23,
190  B24 = 1 << 24,
191  B25 = 1 << 25,
192  B26 = 1 << 26,
193  B27 = 1 << 27,
194  B28 = 1 << 28,
195 
196  // Instruction bit masks.
197  kCondMask = 15 << 28,
198  kALUMask = 0x6f << 21,
199  kRdMask = 15 << 12, // In str instruction.
200  kCoprocessorMask = 15 << 8,
201  kOpCodeMask = 15 << 21, // In data-processing instructions.
202  kImm24Mask = (1 << 24) - 1,
203  kImm16Mask = (1 << 16) - 1,
204  kImm8Mask = (1 << 8) - 1,
205  kOff12Mask = (1 << 12) - 1,
206  kOff8Mask = (1 << 8) - 1
207 };
#define P(name, number_of_args, result_size)
Definition: runtime.cc:53
#define U(name)
Definition: runtime.cc:9020
#define S(x)
Definition: version.cc:55

◆ AccessorComponent

Enumerator
ACCESSOR_GETTER 
ACCESSOR_SETTER 

Definition at line 1557 of file objects.h.

1557  {
1560 };
@ ACCESSOR_GETTER
Definition: objects.h:1558
@ ACCESSOR_SETTER
Definition: objects.h:1559

◆ AccessorDescriptorType

Enumerator
kDescriptorBitmaskCompare 
kDescriptorPointerCompare 
kDescriptorPrimitiveValue 
kDescriptorObjectDereference 
kDescriptorPointerDereference 
kDescriptorPointerShift 
kDescriptorReturnObject 

Definition at line 10154 of file objects.h.

◆ AddrMode [1/2]

Enumerator
Offset 
PreIndex 
PostIndex 
NegOffset 
NegPreIndex 
NegPostIndex 
Offset 
PreIndex 
PostIndex 

Definition at line 260 of file constants-arm.h.

260  {
261  // Bit encoding P U W.
262  Offset = (8|4|0) << 21, // Offset (without writeback to base).
263  PreIndex = (8|4|1) << 21, // Pre-indexed addressing with writeback.
264  PostIndex = (0|4|0) << 21, // Post-indexed addressing with writeback.
265  NegOffset = (8|0|0) << 21, // Negative offset (without writeback to base).
266  NegPreIndex = (8|0|1) << 21, // Negative pre-indexed with writeback.
267  NegPostIndex = (0|0|0) << 21 // Negative post-indexed with writeback.
268 };

◆ AddrMode [2/2]

Enumerator
Offset 
PreIndex 
PostIndex 
NegOffset 
NegPreIndex 
NegPostIndex 
Offset 
PreIndex 
PostIndex 

Definition at line 72 of file instructions-arm64.h.

72  {
73  Offset,
74  PreIndex,
75  PostIndex
76 };

◆ AddSubExtendedOp

Enumerator
AddSubExtendedFixed 
AddSubExtendedFMask 
AddSubExtendedMask 

Definition at line 467 of file constants-arm64.h.

467  {
468  AddSubExtendedFixed = 0x0B200000,
469  AddSubExtendedFMask = 0x1F200000,
470  AddSubExtendedMask = 0xFFE00000,
471  #define ADD_SUB_EXTENDED(A) \
472  A##_w_ext = AddSubExtendedFixed | A, \
473  A##_x_ext = AddSubExtendedFixed | A | SixtyFourBits
475  #undef ADD_SUB_EXTENDED
476 };
#define ADD_SUB_OP_LIST(V)
#define ADD_SUB_EXTENDED(A)

◆ AddSubImmediateOp

Enumerator
AddSubImmediateFixed 
AddSubImmediateFMask 
AddSubImmediateMask 

Definition at line 445 of file constants-arm64.h.

445  {
446  AddSubImmediateFixed = 0x11000000,
447  AddSubImmediateFMask = 0x1F000000,
448  AddSubImmediateMask = 0xFF000000,
449  #define ADD_SUB_IMMEDIATE(A) \
450  A##_w_imm = AddSubImmediateFixed | A, \
451  A##_x_imm = AddSubImmediateFixed | A | SixtyFourBits
453  #undef ADD_SUB_IMMEDIATE
454 };
#define ADD_SUB_IMMEDIATE(A)

◆ AddSubOp

Enumerator
AddSubOpMask 
AddSubSetFlagsBit 
ADD 
ADDS 
SUB 
SUBS 

Definition at line 430 of file constants-arm64.h.

430  {
431  AddSubOpMask = 0x60000000,
432  AddSubSetFlagsBit = 0x20000000,
433  ADD = 0x00000000,
435  SUB = 0x40000000,
437 };

◆ AddSubShiftedOp

Enumerator
AddSubShiftedFixed 
AddSubShiftedFMask 
AddSubShiftedMask 

Definition at line 456 of file constants-arm64.h.

456  {
457  AddSubShiftedFixed = 0x0B000000,
458  AddSubShiftedFMask = 0x1F200000,
459  AddSubShiftedMask = 0xFF200000,
460  #define ADD_SUB_SHIFTED(A) \
461  A##_w_shift = AddSubShiftedFixed | A, \
462  A##_x_shift = AddSubShiftedFixed | A | SixtyFourBits
464  #undef ADD_SUB_SHIFTED
465 };
#define ADD_SUB_SHIFTED(A)

◆ AddSubWithCarryOp

Enumerator
AddSubWithCarryFixed 
AddSubWithCarryFMask 
AddSubWithCarryMask 
ADC_w 
ADC_x 
ADC 
ADCS_w 
ADCS_x 
SBC_w 
SBC_x 
SBC 
SBCS_w 
SBCS_x 

Definition at line 479 of file constants-arm64.h.

479  {
480  AddSubWithCarryFixed = 0x1A000000,
481  AddSubWithCarryFMask = 0x1FE00000,
482  AddSubWithCarryMask = 0xFFE0FC00,
485  ADC = ADC_w,
490  SBC = SBC_w,
493 };

◆ AllocationSiteMode

Enumerator
DONT_TRACK_ALLOCATION_SITE 
TRACK_ALLOCATION_SITE 
LAST_ALLOCATION_SITE_MODE 

Definition at line 8083 of file objects.h.

◆ AllocationSiteOverrideMode

Enumerator
DONT_OVERRIDE 
DISABLE_ALLOCATION_SITES 
LAST_ALLOCATION_SITE_OVERRIDE_MODE 

Definition at line 716 of file code-stubs.h.

◆ AllocationSpace

Enumerator
NEW_SPACE 
OLD_POINTER_SPACE 
OLD_DATA_SPACE 
CODE_SPACE 
MAP_SPACE 
CELL_SPACE 
PROPERTY_CELL_SPACE 
LO_SPACE 
INVALID_SPACE 
FIRST_SPACE 
LAST_SPACE 
FIRST_PAGED_SPACE 
LAST_PAGED_SPACE 

Definition at line 358 of file globals.h.

358  {
359  NEW_SPACE, // Semispaces collected with copying collector.
360  OLD_POINTER_SPACE, // May contain pointers to new space.
361  OLD_DATA_SPACE, // Must not have pointers to new space.
362  CODE_SPACE, // No pointers to new space, marked executable.
363  MAP_SPACE, // Only and all map objects.
364  CELL_SPACE, // Only and all cell objects.
365  PROPERTY_CELL_SPACE, // Only and all global property cell objects.
366  LO_SPACE, // Promoted large objects.
367  INVALID_SPACE, // Only used in AllocationResult to signal success.
368 
373 };
@ FIRST_PAGED_SPACE
Definition: globals.h:371
@ INVALID_SPACE
Definition: globals.h:367
@ LAST_PAGED_SPACE
Definition: globals.h:372
@ OLD_DATA_SPACE
Definition: globals.h:361
@ PROPERTY_CELL_SPACE
Definition: globals.h:365
@ OLD_POINTER_SPACE
Definition: globals.h:360

◆ AllowNullsFlag

Enumerator
ALLOW_NULLS 
DISALLOW_NULLS 

Definition at line 8337 of file objects.h.

◆ ArgumentsAllowedFlag

Enumerator
ARGUMENTS_NOT_ALLOWED 
ARGUMENTS_ALLOWED 

Definition at line 751 of file hydrogen.h.

751  {
754 };
@ ARGUMENTS_ALLOWED
Definition: hydrogen.h:753
@ ARGUMENTS_NOT_ALLOWED
Definition: hydrogen.h:752

◆ ArrayHasHoles

Enumerator
kArrayCantHaveHoles 
kArrayCanHaveHoles 

Definition at line 127 of file macro-assembler-arm64.h.

◆ ArrayStorageAllocationMode

Enumerator
DONT_INITIALIZE_ARRAY_ELEMENTS 
INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE 

Definition at line 511 of file heap.h.

511  {
514 };
@ INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE
Definition: heap.h:513
@ DONT_INITIALIZE_ARRAY_ELEMENTS
Definition: heap.h:512

◆ AstPropertiesFlag

Enumerator
kDontSelfOptimize 
kDontSoftInline 
kDontCache 

Definition at line 155 of file ast.h.

155  {
158  kDontCache
159 };
@ kDontCache
Definition: ast.h:158
@ kDontSelfOptimize
Definition: ast.h:156
@ kDontSoftInline
Definition: ast.h:157

◆ BailoutReason

Enumerator
ERROR_MESSAGES_LIST 

Definition at line 329 of file bailout-reason.h.

329  {
331 };
#define ERROR_MESSAGES_CONSTANTS(C, T)
#define ERROR_MESSAGES_LIST(V)

◆ BarrierDomain

Enumerator
OuterShareable 
NonShareable 
InnerShareable 
FullSystem 

Definition at line 361 of file constants-arm64.h.

361  {
362  OuterShareable = 0,
363  NonShareable = 1,
364  InnerShareable = 2,
365  FullSystem = 3
366 };

◆ BarrierType

Enumerator
BarrierOther 
BarrierReads 
BarrierWrites 
BarrierAll 

Definition at line 368 of file constants-arm64.h.

368  {
369  BarrierOther = 0,
370  BarrierReads = 1,
371  BarrierWrites = 2,
372  BarrierAll = 3
373 };

◆ BignumDtoaMode

Enumerator
BIGNUM_DTOA_SHORTEST 
BIGNUM_DTOA_FIXED 
BIGNUM_DTOA_PRECISION 

Definition at line 11 of file bignum-dtoa.h.

11  {
12  // Return the shortest correct representation.
13  // For example the output of 0.299999999999999988897 is (the less accurate but
14  // correct) 0.3.
16  // Return a fixed number of digits after the decimal point.
17  // For instance fixed(0.1, 4) becomes 0.1000
18  // If the input number is big, the output will be big.
20  // Return a fixed number of digits, no matter what the exponent is.
22 };
@ BIGNUM_DTOA_SHORTEST
Definition: bignum-dtoa.h:15
@ BIGNUM_DTOA_PRECISION
Definition: bignum-dtoa.h:21

◆ BindingFlags

Enumerator
MUTABLE_IS_INITIALIZED 
MUTABLE_CHECK_INITIALIZED 
IMMUTABLE_IS_INITIALIZED 
IMMUTABLE_CHECK_INITIALIZED 
IMMUTABLE_IS_INITIALIZED_HARMONY 
IMMUTABLE_CHECK_INITIALIZED_HARMONY 
MISSING_BINDING 

Definition at line 56 of file contexts.h.

◆ BitfieldOp

Enumerator
BitfieldFixed 
BitfieldFMask 
BitfieldMask 
SBFM_w 
SBFM_x 
SBFM 
BFM_w 
BFM_x 
BFM 
UBFM_w 
UBFM_x 
UBFM 

Definition at line 574 of file constants-arm64.h.

574  {
575  BitfieldFixed = 0x13000000,
576  BitfieldFMask = 0x1F800000,
577  BitfieldMask = 0xFF800000,
578  SBFM_w = BitfieldFixed | 0x00000000,
579  SBFM_x = BitfieldFixed | 0x80000000,
580  SBFM = SBFM_w,
581  BFM_w = BitfieldFixed | 0x20000000,
582  BFM_x = BitfieldFixed | 0xA0000000,
583  BFM = BFM_w,
584  UBFM_w = BitfieldFixed | 0x40000000,
585  UBFM_x = BitfieldFixed | 0xC0000000,
586  UBFM = UBFM_w
587  // Bitfield N field.
588 };

◆ BlockAddrMode

Enumerator
da 
ia 
db 
ib 
da_w 
ia_w 
db_w 
ib_w 
da_x 
ia_x 
db_x 
ib_x 
kBlockAddrModeMask 

Definition at line 272 of file constants-arm.h.

272  {
273  // Bit encoding P U W .
274  da = (0|0|0) << 21, // Decrement after.
275  ia = (0|4|0) << 21, // Increment after.
276  db = (8|0|0) << 21, // Decrement before.
277  ib = (8|4|0) << 21, // Increment before.
278  da_w = (0|0|1) << 21, // Decrement after with writeback to base.
279  ia_w = (0|4|1) << 21, // Increment after with writeback to base.
280  db_w = (8|0|1) << 21, // Decrement before with writeback to base.
281  ib_w = (8|4|1) << 21, // Increment before with writeback to base.
282 
283  // Alias modes for comparison when writeback does not matter.
284  da_x = (0|0|0) << 21, // Decrement after.
285  ia_x = (0|4|0) << 21, // Increment after.
286  db_x = (8|0|0) << 21, // Decrement before.
287  ib_x = (8|4|0) << 21, // Increment before.
288 
289  kBlockAddrModeMask = (8|4|1) << 21
290 };

◆ BranchDelaySlot [1/2]

Enumerator
USE_DELAY_SLOT 
PROTECT 
USE_DELAY_SLOT 
PROTECT 

Definition at line 56 of file macro-assembler-mips.h.

◆ BranchDelaySlot [2/2]

Enumerator
USE_DELAY_SLOT 
PROTECT 
USE_DELAY_SLOT 
PROTECT 

Definition at line 56 of file macro-assembler-mips64.h.

56  {
58  PROTECT
59 };

◆ BranchType

Enumerator
integer_eq 
integer_ne 
integer_hs 
integer_lo 
integer_mi 
integer_pl 
integer_vs 
integer_vc 
integer_hi 
integer_ls 
integer_ge 
integer_lt 
integer_gt 
integer_le 
integer_al 
integer_nv 
always 
never 
reg_zero 
reg_not_zero 
reg_bit_clear 
reg_bit_set 
kBranchTypeFirstCondition 
kBranchTypeLastCondition 
kBranchTypeFirstUsingReg 
kBranchTypeFirstUsingBit 

Definition at line 68 of file macro-assembler-arm64.h.

68  {
69  // Copies of architectural conditions.
70  // The associated conditions can be used in place of those, the code will
71  // take care of reinterpreting them with the correct type.
72  integer_eq = eq,
73  integer_ne = ne,
74  integer_hs = hs,
75  integer_lo = lo,
76  integer_mi = mi,
77  integer_pl = pl,
78  integer_vs = vs,
79  integer_vc = vc,
80  integer_hi = hi,
81  integer_ls = ls,
82  integer_ge = ge,
83  integer_lt = lt,
84  integer_gt = gt,
85  integer_le = le,
86  integer_al = al,
87  integer_nv = nv,
88 
89  // These two are *different* from the architectural codes al and nv.
90  // 'always' is used to generate unconditional branches.
91  // 'never' is used to not generate a branch (generally as the inverse
92  // branch type of 'always).
93  always, never,
94  // cbz and cbnz
96  // tbz and tbnz
98 
99  // Aliases.
104 };

◆ BreakLocatorType

Enumerator
ALL_BREAK_LOCATIONS 
SOURCE_BREAK_LOCATIONS 

Definition at line 52 of file debug.h.

52  {
55 };
@ ALL_BREAK_LOCATIONS
Definition: debug.h:53
@ SOURCE_BREAK_LOCATIONS
Definition: debug.h:54

◆ BreakPositionAlignment

Enumerator
STATEMENT_ALIGNED 
BREAK_POSITION_ALIGNED 

Definition at line 60 of file debug.h.

60  {
63 };
@ STATEMENT_ALIGNED
Definition: debug.h:61
@ BREAK_POSITION_ALIGNED
Definition: debug.h:62

◆ BuiltinExtraArguments

Enumerator
NO_EXTRA_ARGUMENTS 
NEEDS_CALLED_FUNCTION 

Definition at line 12 of file builtins.h.

12  {
15 };
@ NEEDS_CALLED_FUNCTION
Definition: builtins.h:14
@ NO_EXTRA_ARGUMENTS
Definition: builtins.h:13

◆ BuiltinFunctionId

Enumerator
kArrayCode 
kMathPowHalf 

Definition at line 6566 of file objects.h.

6566  {
6567  kArrayCode,
6568 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
6569  k##name,
6571 #undef DECLARE_FUNCTION_ID
6572  // Fake id for a special case of Math.pow. Note, it continues the
6573  // list of math functions.
6574  kMathPowHalf
6575 };
#define DECLARE_FUNCTION_ID(ignored1, ignore2, name)
Definition: objects.h:6568
#define FUNCTIONS_WITH_ID_LIST(V)
Definition: objects.h:6542

◆ CacheHolderFlag

Enumerator
kCacheOnPrototype 
kCacheOnPrototypeReceiverIsDictionary 
kCacheOnPrototypeReceiverIsPrimitive 
kCacheOnReceiver 

Definition at line 484 of file globals.h.

484  {
489 };
@ kCacheOnPrototype
Definition: globals.h:485
@ kCacheOnReceiver
Definition: globals.h:488
@ kCacheOnPrototypeReceiverIsPrimitive
Definition: globals.h:487
@ kCacheOnPrototypeReceiverIsDictionary
Definition: globals.h:486

◆ CallConstructorFlags

Enumerator
NO_CALL_CONSTRUCTOR_FLAGS 
RECORD_CONSTRUCTOR_TARGET 

Definition at line 477 of file globals.h.

477  {
479  // The call target is cached in the instruction stream.
481 };
@ NO_CALL_CONSTRUCTOR_FLAGS
Definition: globals.h:478
@ RECORD_CONSTRUCTOR_TARGET
Definition: globals.h:480

◆ CallFunctionFlags

Enumerator
NO_CALL_FUNCTION_FLAGS 
CALL_AS_METHOD 
WRAP_AND_CALL 

Definition at line 468 of file globals.h.

468  {
471  // Always wrap the receiver and call to the JSFunction. Only use this flag
472  // both the receiver type and the target method are statically known.
474 };
@ NO_CALL_FUNCTION_FLAGS
Definition: globals.h:469
@ WRAP_AND_CALL
Definition: globals.h:473
@ CALL_AS_METHOD
Definition: globals.h:470

◆ CheckForInexactConversion [1/3]

Enumerator
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 

Definition at line 391 of file constants-arm.h.

◆ CheckForInexactConversion [2/3]

Enumerator
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 

Definition at line 678 of file constants-mips.h.

◆ CheckForInexactConversion [3/3]

Enumerator
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 
kCheckForInexactConversion 
kDontCheckForInexactConversion 

Definition at line 692 of file constants-mips64.h.

◆ ClearExceptionFlag

Enumerator
KEEP_EXCEPTION 
CLEAR_EXCEPTION 

Definition at line 760 of file globals.h.

760  {
763 };
@ KEEP_EXCEPTION
Definition: globals.h:761
@ CLEAR_EXCEPTION
Definition: globals.h:762

◆ CompareBranchOp

Enumerator
CompareBranchFixed 
CompareBranchFMask 
CompareBranchMask 
CBZ_w 
CBZ_x 
CBZ 
CBNZ_w 
CBNZ_x 
CBNZ 

Definition at line 620 of file constants-arm64.h.

620  {
621  CompareBranchFixed = 0x34000000,
622  CompareBranchFMask = 0x7E000000,
623  CompareBranchMask = 0xFF000000,
624  CBZ_w = CompareBranchFixed | 0x00000000,
625  CBZ_x = CompareBranchFixed | 0x80000000,
626  CBZ = CBZ_w,
627  CBNZ_w = CompareBranchFixed | 0x01000000,
628  CBNZ_x = CompareBranchFixed | 0x81000000,
629  CBNZ = CBNZ_w
630 };

◆ CompareResult

Enumerator
LESS 
EQUAL 
GREATER 
NOT_EQUAL 

Definition at line 819 of file objects.h.

819  {
820  LESS = -1,
821  EQUAL = 0,
822  GREATER = 1,
823 
825 };

◆ Condition [1/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 58 of file constants-arm.h.

58  {
59  kNoCondition = -1,
60 
61  eq = 0 << 28, // Z set Equal.
62  ne = 1 << 28, // Z clear Not equal.
63  cs = 2 << 28, // C set Unsigned higher or same.
64  cc = 3 << 28, // C clear Unsigned lower.
65  mi = 4 << 28, // N set Negative.
66  pl = 5 << 28, // N clear Positive or zero.
67  vs = 6 << 28, // V set Overflow.
68  vc = 7 << 28, // V clear No overflow.
69  hi = 8 << 28, // C set, Z clear Unsigned higher.
70  ls = 9 << 28, // C clear or Z set Unsigned lower or same.
71  ge = 10 << 28, // N == V Greater or equal.
72  lt = 11 << 28, // N != V Less than.
73  gt = 12 << 28, // Z clear, N == V Greater than.
74  le = 13 << 28, // Z set or N != V Less then or equal
75  al = 14 << 28, // Always.
76 
77  kSpecialCondition = 15 << 28, // Special condition (refer to section A3.2.1).
79 
80  // Aliases.
81  hs = cs, // C set Unsigned higher or same.
82  lo = cc // C clear Unsigned lower.
83 };

◆ Condition [2/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 243 of file constants-arm64.h.

243  {
244  eq = 0,
245  ne = 1,
246  hs = 2, cs = hs,
247  lo = 3, cc = lo,
248  mi = 4,
249  pl = 5,
250  vs = 6,
251  vc = 7,
252  hi = 8,
253  ls = 9,
254  ge = 10,
255  lt = 11,
256  gt = 12,
257  le = 13,
258  al = 14,
259  nv = 15 // Behaves as always/al.
260 };

◆ Condition [3/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 214 of file assembler-ia32.h.

214  {
215  // any value < 0 is considered no_condition
216  no_condition = -1,
217 
218  overflow = 0,
219  no_overflow = 1,
220  below = 2,
221  above_equal = 3,
222  equal = 4,
223  not_equal = 5,
224  below_equal = 6,
225  above = 7,
226  negative = 8,
227  positive = 9,
228  parity_even = 10,
229  parity_odd = 11,
230  less = 12,
231  greater_equal = 13,
232  less_equal = 14,
233  greater = 15,
234 
235  // aliases
236  carry = below,
238  zero = equal,
240  sign = negative,
242 };

◆ Condition [4/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 561 of file constants-mips.h.

561  {
562  // Any value < 0 is considered no_condition.
563  kNoCondition = -1,
564 
565  overflow = 0,
566  no_overflow = 1,
567  Uless = 2,
568  Ugreater_equal= 3,
569  equal = 4,
570  not_equal = 5,
571  Uless_equal = 6,
572  Ugreater = 7,
573  negative = 8,
574  positive = 9,
575  parity_even = 10,
576  parity_odd = 11,
577  less = 12,
578  greater_equal = 13,
579  less_equal = 14,
580  greater = 15,
581  ueq = 16, // Unordered or Equal.
582  nue = 17, // Not (Unordered or Equal).
583 
584  cc_always = 18,
585 
586  // Aliases.
587  carry = Uless,
589  zero = equal,
590  eq = equal,
592  ne = not_equal,
593  nz = not_equal,
594  sign = negative,
595  not_sign = positive,
596  mi = negative,
597  pl = positive,
598  hi = Ugreater,
599  ls = Uless_equal,
600  ge = greater_equal,
601  lt = less,
602  gt = greater,
603  le = less_equal,
604  hs = Ugreater_equal,
605  lo = Uless,
606  al = cc_always,
607 
609 };

◆ Condition [5/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 575 of file constants-mips64.h.

575  {
576  // Any value < 0 is considered no_condition.
577  kNoCondition = -1,
578 
579  overflow = 0,
580  no_overflow = 1,
581  Uless = 2,
582  Ugreater_equal= 3,
583  equal = 4,
584  not_equal = 5,
585  Uless_equal = 6,
586  Ugreater = 7,
587  negative = 8,
588  positive = 9,
589  parity_even = 10,
590  parity_odd = 11,
591  less = 12,
592  greater_equal = 13,
593  less_equal = 14,
594  greater = 15,
595  ueq = 16, // Unordered or Equal.
596  nue = 17, // Not (Unordered or Equal).
597 
598  cc_always = 18,
599 
600  // Aliases.
601  carry = Uless,
603  zero = equal,
604  eq = equal,
606  ne = not_equal,
607  nz = not_equal,
608  sign = negative,
609  not_sign = positive,
610  mi = negative,
611  pl = positive,
612  hi = Ugreater,
613  ls = Uless_equal,
614  ge = greater_equal,
615  lt = less,
616  gt = greater,
617  le = less_equal,
618  hs = Ugreater_equal,
619  lo = Uless,
620  al = cc_always,
621 
623 };

◆ Condition [6/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 289 of file assembler-x64.h.

289  {
290  // any value < 0 is considered no_condition
291  no_condition = -1,
292 
293  overflow = 0,
294  no_overflow = 1,
295  below = 2,
296  above_equal = 3,
297  equal = 4,
298  not_equal = 5,
299  below_equal = 6,
300  above = 7,
301  negative = 8,
302  positive = 9,
303  parity_even = 10,
304  parity_odd = 11,
305  less = 12,
306  greater_equal = 13,
307  less_equal = 14,
308  greater = 15,
309 
310  // Fake conditions that are handled by the
311  // opcodes using them.
312  always = 16,
313  never = 17,
314  // aliases
315  carry = below,
317  zero = equal,
319  sign = negative,
320  not_sign = positive,
322 };

◆ Condition [7/7]

Enumerator
kNoCondition 
eq 
ne 
cs 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
kSpecialCondition 
kNumberOfConditions 
hs 
lo 
eq 
ne 
hs 
cs 
lo 
cc 
mi 
pl 
vs 
vc 
hi 
ls 
ge 
lt 
gt 
le 
al 
nv 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
kNoCondition 
overflow 
no_overflow 
Uless 
Ugreater_equal 
equal 
not_equal 
Uless_equal 
Ugreater 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
ueq 
nue 
cc_always 
carry 
not_carry 
zero 
eq 
not_zero 
ne 
nz 
sign 
not_sign 
mi 
pl 
hi 
ls 
ge 
lt 
gt 
le 
hs 
lo 
al 
cc_default 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
always 
never 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 
last_condition 
no_condition 
overflow 
no_overflow 
below 
above_equal 
equal 
not_equal 
below_equal 
above 
negative 
positive 
parity_even 
parity_odd 
less 
greater_equal 
less_equal 
greater 
carry 
not_carry 
zero 
not_zero 
sign 
not_sign 

Definition at line 208 of file assembler-x87.h.

208  {
209  // any value < 0 is considered no_condition
210  no_condition = -1,
211 
212  overflow = 0,
213  no_overflow = 1,
214  below = 2,
215  above_equal = 3,
216  equal = 4,
217  not_equal = 5,
218  below_equal = 6,
219  above = 7,
220  negative = 8,
221  positive = 9,
222  parity_even = 10,
223  parity_odd = 11,
224  less = 12,
225  greater_equal = 13,
226  less_equal = 14,
227  greater = 15,
228 
229  // aliases
230  carry = below,
232  zero = equal,
234  sign = negative,
236 };

◆ ConditionalBranchOp

Enumerator
ConditionalBranchFixed 
ConditionalBranchFMask 
ConditionalBranchMask 
B_cond 

Definition at line 642 of file constants-arm64.h.

642  {
643  ConditionalBranchFixed = 0x54000000,
644  ConditionalBranchFMask = 0xFE000000,
645  ConditionalBranchMask = 0xFF000010,
646  B_cond = ConditionalBranchFixed | 0x00000000
647 };

◆ ConditionalCompareImmediateOp

Enumerator
ConditionalCompareImmediateFixed 
ConditionalCompareImmediateFMask 
ConditionalCompareImmediateMask 
CCMN_w_imm 
CCMN_x_imm 
CCMP_w_imm 
CCMP_x_imm 

Definition at line 896 of file constants-arm64.h.

◆ ConditionalCompareOp

Enumerator
ConditionalCompareMask 
CCMN 
CCMP 

Definition at line 878 of file constants-arm64.h.

878  {
879  ConditionalCompareMask = 0x60000000,
880  CCMN = 0x20000000,
881  CCMP = 0x60000000
882 };

◆ ConditionalCompareRegisterOp

Enumerator
ConditionalCompareRegisterFixed 
ConditionalCompareRegisterFMask 
ConditionalCompareRegisterMask 
CCMN_w 
CCMN_x 
CCMP_w 
CCMP_x 

Definition at line 885 of file constants-arm64.h.

◆ ConditionalSelectOp

Enumerator
ConditionalSelectFixed 
ConditionalSelectFMask 
ConditionalSelectMask 
CSEL_w 
CSEL_x 
CSEL 
CSINC_w 
CSINC_x 
CSINC 
CSINV_w 
CSINV_x 
CSINV 
CSNEG_w 
CSNEG_x 
CSNEG 

Definition at line 907 of file constants-arm64.h.

907  {
908  ConditionalSelectFixed = 0x1A800000,
909  ConditionalSelectFMask = 0x1FE00000,
910  ConditionalSelectMask = 0xFFE00C00,
911  CSEL_w = ConditionalSelectFixed | 0x00000000,
912  CSEL_x = ConditionalSelectFixed | 0x80000000,
913  CSEL = CSEL_w,
914  CSINC_w = ConditionalSelectFixed | 0x00000400,
915  CSINC_x = ConditionalSelectFixed | 0x80000400,
916  CSINC = CSINC_w,
917  CSINV_w = ConditionalSelectFixed | 0x40000000,
918  CSINV_x = ConditionalSelectFixed | 0xC0000000,
919  CSINV = CSINV_w,
920  CSNEG_w = ConditionalSelectFixed | 0x40000400,
921  CSNEG_x = ConditionalSelectFixed | 0xC0000400,
922  CSNEG = CSNEG_w
923 };

◆ ContainedInLattice

Enumerator
kNotYet 
kLatticeIn 
kLatticeOut 
kLatticeUnknown 

Definition at line 1230 of file jsregexp.h.

1230  {
1231  kNotYet = 0,
1232  kLatticeIn = 1,
1233  kLatticeOut = 2,
1234  kLatticeUnknown = 3 // Can also mean both in and out.
1235 };

◆ ContextLookupFlags

Enumerator
FOLLOW_CONTEXT_CHAIN 
FOLLOW_PROTOTYPE_CHAIN 
DONT_FOLLOW_CHAINS 
FOLLOW_CHAINS 

Definition at line 15 of file contexts.h.

15  {
18 
21 };
@ FOLLOW_CONTEXT_CHAIN
Definition: contexts.h:16
@ DONT_FOLLOW_CHAINS
Definition: contexts.h:19
@ FOLLOW_CHAINS
Definition: contexts.h:20
@ FOLLOW_PROTOTYPE_CHAIN
Definition: contexts.h:17

◆ ContextualMode

Enumerator
NOT_CONTEXTUAL 
CONTEXTUAL 

Definition at line 173 of file objects.h.

173  {
175  CONTEXTUAL
176 };
@ NOT_CONTEXTUAL
Definition: objects.h:174

◆ ConversionFlags

Enumerator
NO_FLAGS 
ALLOW_HEX 
ALLOW_OCTAL 
ALLOW_IMPLICIT_OCTAL 
ALLOW_BINARY 
ALLOW_TRAILING_JUNK 

Definition at line 100 of file conversions.h.

100  {
101  NO_FLAGS = 0,
102  ALLOW_HEX = 1,
103  ALLOW_OCTAL = 2,
105  ALLOW_BINARY = 8,
107 };
@ ALLOW_IMPLICIT_OCTAL
Definition: conversions.h:104

◆ Coprocessor

Enumerator
p0 
p1 
p2 
p3 
p4 
p5 
p6 
p7 
p8 
p9 
p10 
p11 
p12 
p13 
p14 
p15 

Definition at line 467 of file assembler-arm.h.

467  {
468  p0 = 0,
469  p1 = 1,
470  p2 = 2,
471  p3 = 3,
472  p4 = 4,
473  p5 = 5,
474  p6 = 6,
475  p7 = 7,
476  p8 = 8,
477  p9 = 9,
478  p10 = 10,
479  p11 = 11,
480  p12 = 12,
481  p13 = 13,
482  p14 = 14,
483  p15 = 15
484 };

◆ CopyHint

Enumerator
kCopyUnknown 
kCopyShort 
kCopyLong 

Definition at line 128 of file macro-assembler-arm64.h.

◆ CounterType

Enumerator
Gauge 
Cumulative 

Definition at line 27 of file instrument-arm64.h.

27  {
28  Gauge = 0, // Gauge counters reset themselves after reading.
29  Cumulative = 1 // Cumulative counters keep their value after reading.
30 };

◆ CpuFeature

Enumerator
SSE4_1 
SSE3 
SAHF 
VFP3 
ARMv7 
SUDIV 
MLS 
UNALIGNED_ACCESSES 
MOVW_MOVT_IMMEDIATE_LOADS 
VFP32DREGS 
NEON 
FPU 
FP64FPU 
MIPSr1 
MIPSr2 
MIPSr6 
ALWAYS_ALIGN_CSP 
NUMBER_OF_CPU_FEATURES 

Definition at line 611 of file globals.h.

611  {
612  // x86
613  SSE4_1,
614  SSE3,
615  SAHF,
616  // ARM
617  VFP3,
618  ARMv7,
619  SUDIV,
620  MLS,
623  VFP32DREGS,
624  NEON,
625  // MIPS, MIPS64
626  FPU,
627  FP64FPU,
628  MIPSr1,
629  MIPSr2,
630  MIPSr6,
631  // ARM64
634 };
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for ARMv7(ARM only)") DEFINE_BOOL(enable_32dregs
@ ALWAYS_ALIGN_CSP
Definition: globals.h:632
@ MOVW_MOVT_IMMEDIATE_LOADS
Definition: globals.h:622
@ UNALIGNED_ACCESSES
Definition: globals.h:621
@ NUMBER_OF_CPU_FEATURES
Definition: globals.h:633

◆ DataProcessing1SourceOp

Enumerator
DataProcessing1SourceFixed 
DataProcessing1SourceFMask 
DataProcessing1SourceMask 
RBIT 
RBIT_w 
RBIT_x 
REV16 
REV16_w 
REV16_x 
REV 
REV_w 
REV32_x 
REV_x 
CLZ 
CLZ_w 
CLZ_x 
CLS 
CLS_w 
CLS_x 

Definition at line 926 of file constants-arm64.h.

926  {
927  DataProcessing1SourceFixed = 0x5AC00000,
928  DataProcessing1SourceFMask = 0x5FE00000,
929  DataProcessing1SourceMask = 0xFFFFFC00,
930  RBIT = DataProcessing1SourceFixed | 0x00000000,
931  RBIT_w = RBIT,
933  REV16 = DataProcessing1SourceFixed | 0x00000400,
934  REV16_w = REV16,
936  REV = DataProcessing1SourceFixed | 0x00000800,
937  REV_w = REV,
940  CLZ = DataProcessing1SourceFixed | 0x00001000,
941  CLZ_w = CLZ,
942  CLZ_x = CLZ | SixtyFourBits,
943  CLS = DataProcessing1SourceFixed | 0x00001400,
944  CLS_w = CLS,
946 };

◆ DataProcessing2SourceOp

Enumerator
DataProcessing2SourceFixed 
DataProcessing2SourceFMask 
DataProcessing2SourceMask 
UDIV_w 
UDIV_x 
UDIV 
SDIV_w 
SDIV_x 
SDIV 
LSLV_w 
LSLV_x 
LSLV 
LSRV_w 
LSRV_x 
LSRV 
ASRV_w 
ASRV_x 
ASRV 
RORV_w 
RORV_x 
RORV 
CRC32B 
CRC32H 
CRC32W 
CRC32X 
CRC32CB 
CRC32CH 
CRC32CW 
CRC32CX 

Definition at line 949 of file constants-arm64.h.

949  {
950  DataProcessing2SourceFixed = 0x1AC00000,
951  DataProcessing2SourceFMask = 0x5FE00000,
952  DataProcessing2SourceMask = 0xFFE0FC00,
953  UDIV_w = DataProcessing2SourceFixed | 0x00000800,
954  UDIV_x = DataProcessing2SourceFixed | 0x80000800,
955  UDIV = UDIV_w,
956  SDIV_w = DataProcessing2SourceFixed | 0x00000C00,
957  SDIV_x = DataProcessing2SourceFixed | 0x80000C00,
958  SDIV = SDIV_w,
959  LSLV_w = DataProcessing2SourceFixed | 0x00002000,
960  LSLV_x = DataProcessing2SourceFixed | 0x80002000,
961  LSLV = LSLV_w,
962  LSRV_w = DataProcessing2SourceFixed | 0x00002400,
963  LSRV_x = DataProcessing2SourceFixed | 0x80002400,
964  LSRV = LSRV_w,
965  ASRV_w = DataProcessing2SourceFixed | 0x00002800,
966  ASRV_x = DataProcessing2SourceFixed | 0x80002800,
967  ASRV = ASRV_w,
968  RORV_w = DataProcessing2SourceFixed | 0x00002C00,
969  RORV_x = DataProcessing2SourceFixed | 0x80002C00,
970  RORV = RORV_w,
971  CRC32B = DataProcessing2SourceFixed | 0x00004000,
972  CRC32H = DataProcessing2SourceFixed | 0x00004400,
973  CRC32W = DataProcessing2SourceFixed | 0x00004800,
975  CRC32CB = DataProcessing2SourceFixed | 0x00005000,
976  CRC32CH = DataProcessing2SourceFixed | 0x00005400,
977  CRC32CW = DataProcessing2SourceFixed | 0x00005800,
979 };

◆ DataProcessing3SourceOp

Enumerator
DataProcessing3SourceFixed 
DataProcessing3SourceFMask 
DataProcessing3SourceMask 
MADD_w 
MADD_x 
MADD 
MSUB_w 
MSUB_x 
MSUB 
SMADDL_x 
SMSUBL_x 
SMULH_x 
UMADDL_x 
UMSUBL_x 
UMULH_x 

Definition at line 982 of file constants-arm64.h.

982  {
983  DataProcessing3SourceFixed = 0x1B000000,
984  DataProcessing3SourceFMask = 0x1F000000,
985  DataProcessing3SourceMask = 0xFFE08000,
986  MADD_w = DataProcessing3SourceFixed | 0x00000000,
987  MADD_x = DataProcessing3SourceFixed | 0x80000000,
988  MADD = MADD_w,
989  MSUB_w = DataProcessing3SourceFixed | 0x00008000,
990  MSUB_x = DataProcessing3SourceFixed | 0x80008000,
991  MSUB = MSUB_w,
992  SMADDL_x = DataProcessing3SourceFixed | 0x80200000,
993  SMSUBL_x = DataProcessing3SourceFixed | 0x80208000,
994  SMULH_x = DataProcessing3SourceFixed | 0x80400000,
995  UMADDL_x = DataProcessing3SourceFixed | 0x80A00000,
996  UMSUBL_x = DataProcessing3SourceFixed | 0x80A08000,
997  UMULH_x = DataProcessing3SourceFixed | 0x80C00000
998 };

◆ DebugExtraICState

Enumerator
DEBUG_BREAK 
DEBUG_PREPARE_STEP_IN 

Definition at line 268 of file objects.h.

268  {
269  DEBUG_BREAK,
271 };
@ DEBUG_PREPARE_STEP_IN
Definition: objects.h:270

◆ DebugParameters

Enumerator
NO_PARAM 
BREAK 
LOG_DISASM 
LOG_REGS 
LOG_FP_REGS 
LOG_SYS_REGS 
LOG_WRITE 
LOG_STATE 
LOG_ALL 
TRACE_ENABLE 
TRACE_DISABLE 
TRACE_OVERRIDE 

Definition at line 487 of file instructions-arm64.h.

487  {
488  NO_PARAM = 0,
489  BREAK = 1 << 0,
490  LOG_DISASM = 1 << 1, // Use only with TRACE. Disassemble the code.
491  LOG_REGS = 1 << 2, // Log general purpose registers.
492  LOG_FP_REGS = 1 << 3, // Log floating-point registers.
493  LOG_SYS_REGS = 1 << 4, // Log the status flags.
494  LOG_WRITE = 1 << 5, // Log any memory write.
495 
498 
499  // Trace control.
500  TRACE_ENABLE = 1 << 6,
501  TRACE_DISABLE = 2 << 6,
502  TRACE_OVERRIDE = 3 << 6
503 };

◆ DescriptorFlag

Enumerator
ALL_DESCRIPTORS 
OWN_DESCRIPTORS 

Definition at line 285 of file objects.h.

285  {
288 };
@ OWN_DESCRIPTORS
Definition: objects.h:287
@ ALL_DESCRIPTORS
Definition: objects.h:286

◆ DiscardMoveMode

Enumerator
kDontDiscardForSameWReg 
kDiscardForSameWReg 

Definition at line 129 of file macro-assembler-arm64.h.

◆ DtoaMode

Enumerator
DTOA_SHORTEST 
DTOA_FIXED 
DTOA_PRECISION 

Definition at line 11 of file dtoa.h.

11  {
12  // Return the shortest correct representation.
13  // For example the output of 0.299999999999999988897 is (the less accurate but
14  // correct) 0.3.
16  // Return a fixed number of digits after the decimal point.
17  // For instance fixed(0.1, 4) becomes 0.1000
18  // If the input number is big, the output will be big.
19  DTOA_FIXED,
20  // Return a fixed number of digits, no matter what the exponent is.
22 };
@ DTOA_PRECISION
Definition: dtoa.h:21
@ DTOA_FIXED
Definition: dtoa.h:19
@ DTOA_SHORTEST
Definition: dtoa.h:15

◆ ElementInSetsRelation

Enumerator
kInsideNone 
kInsideFirst 
kInsideSecond 
kInsideBoth 

Definition at line 229 of file jsregexp.h.

229  {
230  kInsideNone = 0,
231  kInsideFirst = 1,
232  kInsideSecond = 2,
233  kInsideBoth = 3
234 };

◆ ElementsKind

Enumerator
FAST_SMI_ELEMENTS 
FAST_HOLEY_SMI_ELEMENTS 
FAST_ELEMENTS 
FAST_HOLEY_ELEMENTS 
FAST_DOUBLE_ELEMENTS 
FAST_HOLEY_DOUBLE_ELEMENTS 
DICTIONARY_ELEMENTS 
SLOPPY_ARGUMENTS_ELEMENTS 
EXTERNAL_INT8_ELEMENTS 
EXTERNAL_UINT8_ELEMENTS 
EXTERNAL_INT16_ELEMENTS 
EXTERNAL_UINT16_ELEMENTS 
EXTERNAL_INT32_ELEMENTS 
EXTERNAL_UINT32_ELEMENTS 
EXTERNAL_FLOAT32_ELEMENTS 
EXTERNAL_FLOAT64_ELEMENTS 
EXTERNAL_UINT8_CLAMPED_ELEMENTS 
UINT8_ELEMENTS 
INT8_ELEMENTS 
UINT16_ELEMENTS 
INT16_ELEMENTS 
UINT32_ELEMENTS 
INT32_ELEMENTS 
FLOAT32_ELEMENTS 
FLOAT64_ELEMENTS 
UINT8_CLAMPED_ELEMENTS 
FIRST_ELEMENTS_KIND 
LAST_ELEMENTS_KIND 
FIRST_FAST_ELEMENTS_KIND 
LAST_FAST_ELEMENTS_KIND 
FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND 
LAST_EXTERNAL_ARRAY_ELEMENTS_KIND 
FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND 
LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND 
TERMINAL_FAST_ELEMENTS_KIND 

Definition at line 13 of file elements-kind.h.

13  {
14  // The "fast" kind for elements that only contain SMI values. Must be first
15  // to make it possible to efficiently check maps for this kind.
18 
19  // The "fast" kind for tagged values. Must be second to make it possible to
20  // efficiently check maps for this and the FAST_SMI_ONLY_ELEMENTS kind
21  // together at once.
24 
25  // The "fast" kind for unwrapped, non-tagged double values.
28 
29  // The "slow" kind.
32  // The "fast" kind for external arrays
42 
43  // Fixed typed arrays
53 
54  // Derived constants from ElementsKind
64 };
@ EXTERNAL_UINT16_ELEMENTS
Definition: elements-kind.h:36
@ UINT8_CLAMPED_ELEMENTS
Definition: elements-kind.h:52
@ LAST_FAST_ELEMENTS_KIND
Definition: elements-kind.h:58
@ LAST_EXTERNAL_ARRAY_ELEMENTS_KIND
Definition: elements-kind.h:60
@ FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND
Definition: elements-kind.h:61
@ EXTERNAL_INT16_ELEMENTS
Definition: elements-kind.h:35
@ EXTERNAL_UINT8_ELEMENTS
Definition: elements-kind.h:34
@ LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND
Definition: elements-kind.h:62
@ EXTERNAL_INT32_ELEMENTS
Definition: elements-kind.h:37
@ FIRST_FAST_ELEMENTS_KIND
Definition: elements-kind.h:57
@ FAST_HOLEY_DOUBLE_ELEMENTS
Definition: elements-kind.h:27
@ SLOPPY_ARGUMENTS_ELEMENTS
Definition: elements-kind.h:31
@ EXTERNAL_INT8_ELEMENTS
Definition: elements-kind.h:33
@ EXTERNAL_FLOAT32_ELEMENTS
Definition: elements-kind.h:39
@ EXTERNAL_FLOAT64_ELEMENTS
Definition: elements-kind.h:40
@ TERMINAL_FAST_ELEMENTS_KIND
Definition: elements-kind.h:63
@ FAST_HOLEY_SMI_ELEMENTS
Definition: elements-kind.h:17
@ EXTERNAL_UINT32_ELEMENTS
Definition: elements-kind.h:38
@ EXTERNAL_UINT8_CLAMPED_ELEMENTS
Definition: elements-kind.h:41
@ FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND
Definition: elements-kind.h:59

◆ EnsureElementsMode

Enumerator
DONT_ALLOW_DOUBLE_ELEMENTS 
ALLOW_COPIED_DOUBLE_ELEMENTS 
ALLOW_CONVERTED_DOUBLE_ELEMENTS 

Definition at line 1539 of file objects.h.

1539  {
1543 };
@ DONT_ALLOW_DOUBLE_ELEMENTS
Definition: objects.h:1540
@ ALLOW_CONVERTED_DOUBLE_ELEMENTS
Definition: objects.h:1542
@ ALLOW_COPIED_DOUBLE_ELEMENTS
Definition: objects.h:1541

◆ ExceptionBreakType

Enumerator
BreakException 
BreakUncaughtException 

Definition at line 45 of file debug.h.

45  {
46  BreakException = 0,
48 };
@ BreakUncaughtException
Definition: debug.h:47
@ BreakException
Definition: debug.h:46

◆ ExceptionOp

Enumerator
ExceptionFixed 
ExceptionFMask 
ExceptionMask 
HLT 
BRK 
SVC 
HVC 
SMC 
DCPS1 
DCPS2 
DCPS3 

Definition at line 675 of file constants-arm64.h.

675  {
676  ExceptionFixed = 0xD4000000,
677  ExceptionFMask = 0xFF000000,
678  ExceptionMask = 0xFFE0001F,
679  HLT = ExceptionFixed | 0x00400000,
680  BRK = ExceptionFixed | 0x00200000,
681  SVC = ExceptionFixed | 0x00000001,
682  HVC = ExceptionFixed | 0x00000002,
683  SMC = ExceptionFixed | 0x00000003,
684  DCPS1 = ExceptionFixed | 0x00A00001,
685  DCPS2 = ExceptionFixed | 0x00A00002,
686  DCPS3 = ExceptionFixed | 0x00A00003
687 };

◆ Executability

Enumerator
NOT_EXECUTABLE 
EXECUTABLE 

Definition at line 391 of file globals.h.

@ NOT_EXECUTABLE
Definition: globals.h:391

◆ Extend

Enumerator
NO_EXTEND 
UXTB 
UXTH 
UXTW 
UXTX 
SXTB 
SXTH 
SXTW 
SXTX 

Definition at line 340 of file constants-arm64.h.

340  {
341  NO_EXTEND = -1,
342  UXTB = 0,
343  UXTH = 1,
344  UXTW = 2,
345  UXTX = 3,
346  SXTB = 4,
347  SXTH = 5,
348  SXTW = 6,
349  SXTX = 7
350 };

◆ ExtractOp

Enumerator
ExtractFixed 
ExtractFMask 
ExtractMask 
EXTR_w 
EXTR_x 
EXTR 

Definition at line 591 of file constants-arm64.h.

591  {
592  ExtractFixed = 0x13800000,
593  ExtractFMask = 0x1F800000,
594  ExtractMask = 0xFFA00000,
595  EXTR_w = ExtractFixed | 0x00000000,
596  EXTR_x = ExtractFixed | 0x80000000,
597  EXTR = EXTR_w
598 };

◆ FastDtoaMode

Enumerator
FAST_DTOA_SHORTEST 
FAST_DTOA_PRECISION 

Definition at line 11 of file fast-dtoa.h.

11  {
12  // Computes the shortest representation of the given input. The returned
13  // result will be the most accurate number of this length. Longer
14  // representations might be more accurate.
16  // Computes a representation where the precision (number of digits) is
17  // given as input. The precision is independent of the decimal point.
19 };
@ FAST_DTOA_SHORTEST
Definition: fast-dtoa.h:15
@ FAST_DTOA_PRECISION
Definition: fast-dtoa.h:18

◆ FixedArraySubInstanceType

Enumerator
LAST_FIXED_ARRAY_SUB_TYPE 

Definition at line 811 of file objects.h.

811  {
812 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name,
814 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE
815  LAST_FIXED_ARRAY_SUB_TYPE = TRANSITION_ARRAY_SUB_TYPE
816 };
@ LAST_FIXED_ARRAY_SUB_TYPE
Definition: objects.h:815
#define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name)
Definition: objects.h:812
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V)
Definition: objects.h:800

◆ FlagsUpdate

Enumerator
SetFlags 
LeaveFlags 

Definition at line 300 of file constants-arm64.h.

300  {
301  SetFlags = 1,
302  LeaveFlags = 0
303 };

◆ FPCompareOp

Enumerator
FPCompareFixed 
FPCompareFMask 
FPCompareMask 
FCMP_s 
FCMP_d 
FCMP 
FCMP_s_zero 
FCMP_d_zero 
FCMP_zero 
FCMPE_s 
FCMPE_d 
FCMPE_s_zero 
FCMPE_d_zero 

Definition at line 1001 of file constants-arm64.h.

1001  {
1002  FPCompareFixed = 0x1E202000,
1003  FPCompareFMask = 0x5F203C00,
1004  FPCompareMask = 0xFFE0FC1F,
1005  FCMP_s = FPCompareFixed | 0x00000000,
1006  FCMP_d = FPCompareFixed | FP64 | 0x00000000,
1007  FCMP = FCMP_s,
1008  FCMP_s_zero = FPCompareFixed | 0x00000008,
1009  FCMP_d_zero = FPCompareFixed | FP64 | 0x00000008,
1011  FCMPE_s = FPCompareFixed | 0x00000010,
1012  FCMPE_d = FPCompareFixed | FP64 | 0x00000010,
1013  FCMPE_s_zero = FPCompareFixed | 0x00000018,
1014  FCMPE_d_zero = FPCompareFixed | FP64 | 0x00000018
1015 };

◆ FPConditionalCompareOp

Enumerator
FPConditionalCompareFixed 
FPConditionalCompareFMask 
FPConditionalCompareMask 
FCCMP_s 
FCCMP_d 
FCCMP 
FCCMPE_s 
FCCMPE_d 
FCCMPE 

Definition at line 1018 of file constants-arm64.h.

1018  {
1019  FPConditionalCompareFixed = 0x1E200400,
1020  FPConditionalCompareFMask = 0x5F200C00,
1021  FPConditionalCompareMask = 0xFFE00C10,
1022  FCCMP_s = FPConditionalCompareFixed | 0x00000000,
1023  FCCMP_d = FPConditionalCompareFixed | FP64 | 0x00000000,
1024  FCCMP = FCCMP_s,
1025  FCCMPE_s = FPConditionalCompareFixed | 0x00000010,
1026  FCCMPE_d = FPConditionalCompareFixed | FP64 | 0x00000010,
1027  FCCMPE = FCCMPE_s
1028 };

◆ FPConditionalSelectOp

Enumerator
FPConditionalSelectFixed 
FPConditionalSelectFMask 
FPConditionalSelectMask 
FCSEL_s 
FCSEL_d 
FCSEL 

Definition at line 1031 of file constants-arm64.h.

1031  {
1032  FPConditionalSelectFixed = 0x1E200C00,
1033  FPConditionalSelectFMask = 0x5F200C00,
1034  FPConditionalSelectMask = 0xFFE00C00,
1035  FCSEL_s = FPConditionalSelectFixed | 0x00000000,
1036  FCSEL_d = FPConditionalSelectFixed | FP64 | 0x00000000,
1037  FCSEL = FCSEL_s
1038 };

◆ FPDataProcessing1SourceOp

Enumerator
FPDataProcessing1SourceFixed 
FPDataProcessing1SourceFMask 
FPDataProcessing1SourceMask 
FMOV_s 
FMOV_d 
FMOV 
FABS_s 
FABS_d 
FABS 
FNEG_s 
FNEG_d 
FNEG 
FSQRT_s 
FSQRT_d 
FSQRT 
FCVT_ds 
FCVT_sd 
FRINTN_s 
FRINTN_d 
FRINTN 
FRINTP_s 
FRINTP_d 
FRINTP 
FRINTM_s 
FRINTM_d 
FRINTM 
FRINTZ_s 
FRINTZ_d 
FRINTZ 
FRINTA_s 
FRINTA_d 
FRINTA 
FRINTX_s 
FRINTX_d 
FRINTX 
FRINTI_s 
FRINTI_d 
FRINTI 

Definition at line 1050 of file constants-arm64.h.

1050  {
1051  FPDataProcessing1SourceFixed = 0x1E204000,
1052  FPDataProcessing1SourceFMask = 0x5F207C00,
1053  FPDataProcessing1SourceMask = 0xFFFFFC00,
1054  FMOV_s = FPDataProcessing1SourceFixed | 0x00000000,
1055  FMOV_d = FPDataProcessing1SourceFixed | FP64 | 0x00000000,
1056  FMOV = FMOV_s,
1057  FABS_s = FPDataProcessing1SourceFixed | 0x00008000,
1058  FABS_d = FPDataProcessing1SourceFixed | FP64 | 0x00008000,
1059  FABS = FABS_s,
1060  FNEG_s = FPDataProcessing1SourceFixed | 0x00010000,
1061  FNEG_d = FPDataProcessing1SourceFixed | FP64 | 0x00010000,
1062  FNEG = FNEG_s,
1063  FSQRT_s = FPDataProcessing1SourceFixed | 0x00018000,
1064  FSQRT_d = FPDataProcessing1SourceFixed | FP64 | 0x00018000,
1065  FSQRT = FSQRT_s,
1066  FCVT_ds = FPDataProcessing1SourceFixed | 0x00028000,
1067  FCVT_sd = FPDataProcessing1SourceFixed | FP64 | 0x00020000,
1068  FRINTN_s = FPDataProcessing1SourceFixed | 0x00040000,
1069  FRINTN_d = FPDataProcessing1SourceFixed | FP64 | 0x00040000,
1070  FRINTN = FRINTN_s,
1071  FRINTP_s = FPDataProcessing1SourceFixed | 0x00048000,
1072  FRINTP_d = FPDataProcessing1SourceFixed | FP64 | 0x00048000,
1073  FRINTP = FRINTP_s,
1074  FRINTM_s = FPDataProcessing1SourceFixed | 0x00050000,
1075  FRINTM_d = FPDataProcessing1SourceFixed | FP64 | 0x00050000,
1076  FRINTM = FRINTM_s,
1077  FRINTZ_s = FPDataProcessing1SourceFixed | 0x00058000,
1078  FRINTZ_d = FPDataProcessing1SourceFixed | FP64 | 0x00058000,
1079  FRINTZ = FRINTZ_s,
1080  FRINTA_s = FPDataProcessing1SourceFixed | 0x00060000,
1081  FRINTA_d = FPDataProcessing1SourceFixed | FP64 | 0x00060000,
1082  FRINTA = FRINTA_s,
1083  FRINTX_s = FPDataProcessing1SourceFixed | 0x00070000,
1084  FRINTX_d = FPDataProcessing1SourceFixed | FP64 | 0x00070000,
1085  FRINTX = FRINTX_s,
1086  FRINTI_s = FPDataProcessing1SourceFixed | 0x00078000,
1087  FRINTI_d = FPDataProcessing1SourceFixed | FP64 | 0x00078000,
1088  FRINTI = FRINTI_s
1089 };

◆ FPDataProcessing2SourceOp

Enumerator
FPDataProcessing2SourceFixed 
FPDataProcessing2SourceFMask 
FPDataProcessing2SourceMask 
FMUL 
FMUL_s 
FMUL_d 
FDIV 
FDIV_s 
FDIV_d 
FADD 
FADD_s 
FADD_d 
FSUB 
FSUB_s 
FSUB_d 
FMAX 
FMAX_s 
FMAX_d 
FMIN 
FMIN_s 
FMIN_d 
FMAXNM 
FMAXNM_s 
FMAXNM_d 
FMINNM 
FMINNM_s 
FMINNM_d 
FNMUL 
FNMUL_s 
FNMUL_d 

Definition at line 1092 of file constants-arm64.h.

1092  {
1093  FPDataProcessing2SourceFixed = 0x1E200800,
1094  FPDataProcessing2SourceFMask = 0x5F200C00,
1095  FPDataProcessing2SourceMask = 0xFFE0FC00,
1096  FMUL = FPDataProcessing2SourceFixed | 0x00000000,
1097  FMUL_s = FMUL,
1098  FMUL_d = FMUL | FP64,
1099  FDIV = FPDataProcessing2SourceFixed | 0x00001000,
1100  FDIV_s = FDIV,
1101  FDIV_d = FDIV | FP64,
1102  FADD = FPDataProcessing2SourceFixed | 0x00002000,
1103  FADD_s = FADD,
1104  FADD_d = FADD | FP64,
1105  FSUB = FPDataProcessing2SourceFixed | 0x00003000,
1106  FSUB_s = FSUB,
1107  FSUB_d = FSUB | FP64,
1108  FMAX = FPDataProcessing2SourceFixed | 0x00004000,
1109  FMAX_s = FMAX,
1110  FMAX_d = FMAX | FP64,
1111  FMIN = FPDataProcessing2SourceFixed | 0x00005000,
1112  FMIN_s = FMIN,
1113  FMIN_d = FMIN | FP64,
1114  FMAXNM = FPDataProcessing2SourceFixed | 0x00006000,
1115  FMAXNM_s = FMAXNM,
1116  FMAXNM_d = FMAXNM | FP64,
1117  FMINNM = FPDataProcessing2SourceFixed | 0x00007000,
1118  FMINNM_s = FMINNM,
1119  FMINNM_d = FMINNM | FP64,
1120  FNMUL = FPDataProcessing2SourceFixed | 0x00008000,
1121  FNMUL_s = FNMUL,
1122  FNMUL_d = FNMUL | FP64
1123 };

◆ FPDataProcessing3SourceOp

Enumerator
FPDataProcessing3SourceFixed 
FPDataProcessing3SourceFMask 
FPDataProcessing3SourceMask 
FMADD_s 
FMSUB_s 
FNMADD_s 
FNMSUB_s 
FMADD_d 
FMSUB_d 
FNMADD_d 
FNMSUB_d 

Definition at line 1126 of file constants-arm64.h.

◆ FPFixedPointConvertOp

Enumerator
FPFixedPointConvertFixed 
FPFixedPointConvertFMask 
FPFixedPointConvertMask 
FCVTZS_fixed 
FCVTZS_ws_fixed 
FCVTZS_xs_fixed 
FCVTZS_wd_fixed 
FCVTZS_xd_fixed 
FCVTZU_fixed 
FCVTZU_ws_fixed 
FCVTZU_xs_fixed 
FCVTZU_wd_fixed 
FCVTZU_xd_fixed 
SCVTF_fixed 
SCVTF_sw_fixed 
SCVTF_sx_fixed 
SCVTF_dw_fixed 
SCVTF_dx_fixed 
UCVTF_fixed 
UCVTF_sw_fixed 
UCVTF_sx_fixed 
UCVTF_dw_fixed 
UCVTF_dx_fixed 

Definition at line 1212 of file constants-arm64.h.

1212  {
1213  FPFixedPointConvertFixed = 0x1E000000,
1214  FPFixedPointConvertFMask = 0x5F200000,
1215  FPFixedPointConvertMask = 0xFFFF0000,
1216  FCVTZS_fixed = FPFixedPointConvertFixed | 0x00180000,
1221  FCVTZU_fixed = FPFixedPointConvertFixed | 0x00190000,
1226  SCVTF_fixed = FPFixedPointConvertFixed | 0x00020000,
1231  UCVTF_fixed = FPFixedPointConvertFixed | 0x00030000,
1236 };

◆ FPImmediateOp

Enumerator
FPImmediateFixed 
FPImmediateFMask 
FPImmediateMask 
FMOV_s_imm 
FMOV_d_imm 

Definition at line 1041 of file constants-arm64.h.

1041  {
1042  FPImmediateFixed = 0x1E201000,
1043  FPImmediateFMask = 0x5F201C00,
1044  FPImmediateMask = 0xFFE01C00,
1045  FMOV_s_imm = FPImmediateFixed | 0x00000000,
1046  FMOV_d_imm = FPImmediateFixed | FP64 | 0x00000000
1047 };

◆ FPIntegerConvertOp

Enumerator
FPIntegerConvertFixed 
FPIntegerConvertFMask 
FPIntegerConvertMask 
FCVTNS 
FCVTNS_ws 
FCVTNS_xs 
FCVTNS_wd 
FCVTNS_xd 
FCVTNU 
FCVTNU_ws 
FCVTNU_xs 
FCVTNU_wd 
FCVTNU_xd 
FCVTPS 
FCVTPS_ws 
FCVTPS_xs 
FCVTPS_wd 
FCVTPS_xd 
FCVTPU 
FCVTPU_ws 
FCVTPU_xs 
FCVTPU_wd 
FCVTPU_xd 
FCVTMS 
FCVTMS_ws 
FCVTMS_xs 
FCVTMS_wd 
FCVTMS_xd 
FCVTMU 
FCVTMU_ws 
FCVTMU_xs 
FCVTMU_wd 
FCVTMU_xd 
FCVTZS 
FCVTZS_ws 
FCVTZS_xs 
FCVTZS_wd 
FCVTZS_xd 
FCVTZU 
FCVTZU_ws 
FCVTZU_xs 
FCVTZU_wd 
FCVTZU_xd 
SCVTF 
SCVTF_sw 
SCVTF_sx 
SCVTF_dw 
SCVTF_dx 
UCVTF 
UCVTF_sw 
UCVTF_sx 
UCVTF_dw 
UCVTF_dx 
FCVTAS 
FCVTAS_ws 
FCVTAS_xs 
FCVTAS_wd 
FCVTAS_xd 
FCVTAU 
FCVTAU_ws 
FCVTAU_xs 
FCVTAU_wd 
FCVTAU_xd 
FMOV_ws 
FMOV_sw 
FMOV_xd 
FMOV_dx 

Definition at line 1141 of file constants-arm64.h.

1141  {
1142  FPIntegerConvertFixed = 0x1E200000,
1143  FPIntegerConvertFMask = 0x5F20FC00,
1144  FPIntegerConvertMask = 0xFFFFFC00,
1145  FCVTNS = FPIntegerConvertFixed | 0x00000000,
1146  FCVTNS_ws = FCVTNS,
1148  FCVTNS_wd = FCVTNS | FP64,
1150  FCVTNU = FPIntegerConvertFixed | 0x00010000,
1151  FCVTNU_ws = FCVTNU,
1153  FCVTNU_wd = FCVTNU | FP64,
1155  FCVTPS = FPIntegerConvertFixed | 0x00080000,
1156  FCVTPS_ws = FCVTPS,
1158  FCVTPS_wd = FCVTPS | FP64,
1160  FCVTPU = FPIntegerConvertFixed | 0x00090000,
1161  FCVTPU_ws = FCVTPU,
1163  FCVTPU_wd = FCVTPU | FP64,
1165  FCVTMS = FPIntegerConvertFixed | 0x00100000,
1166  FCVTMS_ws = FCVTMS,
1168  FCVTMS_wd = FCVTMS | FP64,
1170  FCVTMU = FPIntegerConvertFixed | 0x00110000,
1171  FCVTMU_ws = FCVTMU,
1173  FCVTMU_wd = FCVTMU | FP64,
1175  FCVTZS = FPIntegerConvertFixed | 0x00180000,
1176  FCVTZS_ws = FCVTZS,
1178  FCVTZS_wd = FCVTZS | FP64,
1180  FCVTZU = FPIntegerConvertFixed | 0x00190000,
1181  FCVTZU_ws = FCVTZU,
1183  FCVTZU_wd = FCVTZU | FP64,
1185  SCVTF = FPIntegerConvertFixed | 0x00020000,
1186  SCVTF_sw = SCVTF,
1188  SCVTF_dw = SCVTF | FP64,
1190  UCVTF = FPIntegerConvertFixed | 0x00030000,
1191  UCVTF_sw = UCVTF,
1193  UCVTF_dw = UCVTF | FP64,
1195  FCVTAS = FPIntegerConvertFixed | 0x00040000,
1196  FCVTAS_ws = FCVTAS,
1198  FCVTAS_wd = FCVTAS | FP64,
1200  FCVTAU = FPIntegerConvertFixed | 0x00050000,
1201  FCVTAU_ws = FCVTAU,
1203  FCVTAU_wd = FCVTAU | FP64,
1205  FMOV_ws = FPIntegerConvertFixed | 0x00060000,
1206  FMOV_sw = FPIntegerConvertFixed | 0x00070000,
1209 };

◆ FPRounding

Enumerator
FPTieEven 
FPPositiveInfinity 
FPNegativeInfinity 
FPZero 
FPTieAway 

Definition at line 78 of file instructions-arm64.h.

78  {
79  // The first four values are encodable directly by FPCR<RMode>.
80  FPTieEven = 0x0,
81  FPPositiveInfinity = 0x1,
82  FPNegativeInfinity = 0x2,
83  FPZero = 0x3,
84 
85  // The final rounding mode is only available when explicitly specified by the
86  // instruction (such as with fcvta). It cannot be set in FPCR.
87  FPTieAway
88 };

◆ FPUCondition [1/2]

Enumerator
kNoFPUCondition 
UN 
EQ 
UEQ 
OLT 
ULT 
OLE 
ULE 
kNoFPUCondition 
UN 
EQ 
UEQ 
OLT 
ULT 
OLE 
ULE 

Definition at line 648 of file constants-mips.h.

648  {
649  kNoFPUCondition = -1,
650 
651  F = 0, // False.
652  UN = 1, // Unordered.
653  EQ = 2, // Equal.
654  UEQ = 3, // Unordered or Equal.
655  OLT = 4, // Ordered or Less Than.
656  ULT = 5, // Unordered or Less Than.
657  OLE = 6, // Ordered or Less Than or Equal.
658  ULE = 7 // Unordered or Less Than or Equal.
659 };

◆ FPUCondition [2/2]

Enumerator
kNoFPUCondition 
UN 
EQ 
UEQ 
OLT 
ULT 
OLE 
ULE 
kNoFPUCondition 
UN 
EQ 
UEQ 
OLT 
ULT 
OLE 
ULE 

Definition at line 662 of file constants-mips64.h.

662  {
663  kNoFPUCondition = -1,
664 
665  F = 0, // False.
666  UN = 1, // Unordered.
667  EQ = 2, // Equal.
668  UEQ = 3, // Unordered or Equal.
669  OLT = 4, // Ordered or Less Than.
670  ULT = 5, // Unordered or Less Than.
671  OLE = 6, // Ordered or Less Than or Equal.
672  ULE = 7 // Unordered or Less Than or Equal.
673 };
#define F(name, str)

◆ FPURoundingMode [1/2]

Enumerator
RN 
RZ 
RP 
RM 
kRoundToNearest 
kRoundToZero 
kRoundToPlusInf 
kRoundToMinusInf 
RN 
RZ 
RP 
RM 
kRoundToNearest 
kRoundToZero 
kRoundToPlusInf 
kRoundToMinusInf 

Definition at line 663 of file constants-mips.h.

663  {
664  RN = 0 << 0, // Round to Nearest.
665  RZ = 1 << 0, // Round towards zero.
666  RP = 2 << 0, // Round towards Plus Infinity.
667  RM = 3 << 0, // Round towards Minus Infinity.
668 
669  // Aliases.
671  kRoundToZero = RZ,
674 };

◆ FPURoundingMode [2/2]

Enumerator
RN 
RZ 
RP 
RM 
kRoundToNearest 
kRoundToZero 
kRoundToPlusInf 
kRoundToMinusInf 
RN 
RZ 
RP 
RM 
kRoundToNearest 
kRoundToZero 
kRoundToPlusInf 
kRoundToMinusInf 

Definition at line 677 of file constants-mips64.h.

677  {
678  RN = 0 << 0, // Round to Nearest.
679  RZ = 1 << 0, // Round towards zero.
680  RP = 2 << 0, // Round towards Plus Infinity.
681  RM = 3 << 0, // Round towards Minus Infinity.
682 
683  // Aliases.
685  kRoundToZero = RZ,
688 };

◆ FrameType

Enumerator
JS_FUNCTION 
JS_CONSTRUCT 
JS_GETTER 
JS_SETTER 
ARGUMENTS_ADAPTOR 
STUB 

Definition at line 541 of file hydrogen.h.

541  {
542  JS_FUNCTION,
543  JS_CONSTRUCT,
544  JS_GETTER,
545  JS_SETTER,
547  STUB
548 };
@ ARGUMENTS_ADAPTOR
Definition: hydrogen.h:546

◆ FreeSpaceTreatmentMode

Enumerator
IGNORE_FREE_SPACE 
ZAP_FREE_SPACE 

Definition at line 3274 of file mark-compact.cc.

◆ FunctionKind

Enumerator
kNormalFunction 
kArrowFunction 
kGeneratorFunction 
kConciseMethod 
kConciseGeneratorMethod 

Definition at line 775 of file globals.h.

775  {
776  kNormalFunction = 0,
777  kArrowFunction = 1,
778  kGeneratorFunction = 2,
779  kConciseMethod = 4,
781 };
@ kNormalFunction
Definition: globals.h:776
@ kGeneratorFunction
Definition: globals.h:778
@ kConciseGeneratorMethod
Definition: globals.h:780
@ kConciseMethod
Definition: globals.h:779
@ kArrowFunction
Definition: globals.h:777

◆ GarbageCollector

Enumerator
SCAVENGER 
MARK_COMPACTOR 

Definition at line 389 of file globals.h.

@ MARK_COMPACTOR
Definition: globals.h:389

◆ GCIdleTimeActionType

Enumerator
DONE 
DO_NOTHING 
DO_INCREMENTAL_MARKING 
DO_SCAVENGE 
DO_FULL_GC 
DO_FINALIZE_SWEEPING 

Definition at line 13 of file gc-idle-time-handler.h.

◆ GenericInstrField

Enumerator
SixtyFourBits 
ThirtyTwoBits 
FP32 
FP64 

Definition at line 412 of file constants-arm64.h.

412  {
413  SixtyFourBits = 0x80000000,
414  ThirtyTwoBits = 0x00000000,
415  FP32 = 0x00000000,
416  FP64 = 0x00400000
417 };

◆ GVNFlag

Enumerator
kNumberOfTrackedSideEffects 
kNumberOfUntrackedSideEffects 
kNumberOfFlags 

Definition at line 348 of file hydrogen-instructions.h.

348  {
349  // Declare global value numbering flags.
350 #define DECLARE_FLAG(Type) k##Type,
353 #undef DECLARE_FLAG
354 #define COUNT_FLAG(Type) + 1
357 #undef COUNT_FLAG
359 };
#define COUNT_FLAG(Type)
#define GVN_TRACKED_FLAG_LIST(V)
#define DECLARE_FLAG(Type)
#define GVN_UNTRACKED_FLAG_LIST(V)

◆ HAliasing

Enumerator
kMustAlias 
kMayAlias 
kNoAlias 

Definition at line 13 of file hydrogen-alias-analysis.h.

◆ HandlerArgumentsMode

Enumerator
DONT_PASS_ARGUMENTS 
PASS_ARGUMENTS 

Definition at line 351 of file code-stubs.h.

◆ Hint [1/3]

Enumerator
no_hint 
no_hint 
no_hint 

Definition at line 402 of file constants-arm.h.

402 { no_hint };

◆ Hint [2/3]

Enumerator
no_hint 
no_hint 
no_hint 

Definition at line 690 of file constants-mips.h.

690  {
691  no_hint = 0
692 };

◆ Hint [3/3]

Enumerator
no_hint 
no_hint 
no_hint 

Definition at line 704 of file constants-mips64.h.

704  {
705  no_hint = 0
706 };

◆ ICacheFlushMode

Enumerator
FLUSH_ICACHE_IF_NEEDED 
SKIP_ICACHE_FLUSH 

Definition at line 293 of file assembler.h.

◆ IcCheckType

Enumerator
ELEMENT 
PROPERTY 

Definition at line 14 of file ic-compiler.h.

◆ ImmBranchType

Enumerator
UnknownBranchType 
CondBranchType 
UncondBranchType 
CompareBranchType 
TestBranchType 

Definition at line 64 of file instructions-arm64.h.

◆ InitializationFlag

Enumerator
kNeedsInitialization 
kCreatedInitialized 

Definition at line 751 of file globals.h.

751  {
754 };
@ kNeedsInitialization
Definition: globals.h:752
@ kCreatedInitialized
Definition: globals.h:753

◆ InlineCacheState

Enumerator
UNINITIALIZED 
PREMONOMORPHIC 
MONOMORPHIC 
PROTOTYPE_FAILURE 
POLYMORPHIC 
MEGAMORPHIC 
GENERIC 
DEBUG_STUB 
DEFAULT 

Definition at line 444 of file globals.h.

444  {
445  // Has never been executed.
447  // Has been executed but monomorhic state has been delayed.
449  // Has been executed and only one receiver type has been seen.
450  MONOMORPHIC,
451  // Check failed due to prototype (or map deprecation).
453  // Multiple receiver types have been seen.
454  POLYMORPHIC,
455  // Many receiver types have been seen.
456  MEGAMORPHIC,
457  // A generic handler is installed and no extra typefeedback is recorded.
458  GENERIC,
459  // Special state for debug break or step in prepare stubs.
460  DEBUG_STUB,
461  // Type-vector-based ICs have a default state, with the full calculation
462  // of IC state only determined by a look at the IC and the typevector
463  // together.
464  DEFAULT
465 };
@ UNINITIALIZED
Definition: globals.h:446
@ PROTOTYPE_FAILURE
Definition: globals.h:452
@ PREMONOMORPHIC
Definition: globals.h:448

◆ InlinedSmiCheck

Enumerator
ENABLE_INLINED_SMI_CHECK 
DISABLE_INLINED_SMI_CHECK 

Definition at line 672 of file ic.h.

◆ InliningKind

Enumerator
NORMAL_RETURN 
CONSTRUCT_CALL_RETURN 
GETTER_CALL_RETURN 
SETTER_CALL_RETURN 

Definition at line 1990 of file hydrogen-instructions.h.

1990  {
1991  NORMAL_RETURN, // Drop the function from the environment on return.
1992  CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value.
1993  GETTER_CALL_RETURN, // Returning from a getter, need to restore context.
1994  SETTER_CALL_RETURN // Use the RHS of the assignment as the return value.
1995 };

◆ InstanceType

Enumerator
INTERNALIZED_STRING_TYPE 
ONE_BYTE_INTERNALIZED_STRING_TYPE 
EXTERNAL_INTERNALIZED_STRING_TYPE 
EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE 
EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE 
SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE 
SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE 
SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE 
STRING_TYPE 
ONE_BYTE_STRING_TYPE 
CONS_STRING_TYPE 
CONS_ONE_BYTE_STRING_TYPE 
SLICED_STRING_TYPE 
SLICED_ONE_BYTE_STRING_TYPE 
EXTERNAL_STRING_TYPE 
EXTERNAL_ONE_BYTE_STRING_TYPE 
EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE 
SHORT_EXTERNAL_STRING_TYPE 
SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE 
SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE 
SYMBOL_TYPE 
MAP_TYPE 
CODE_TYPE 
ODDBALL_TYPE 
CELL_TYPE 
PROPERTY_CELL_TYPE 
HEAP_NUMBER_TYPE 
MUTABLE_HEAP_NUMBER_TYPE 
FOREIGN_TYPE 
BYTE_ARRAY_TYPE 
FREE_SPACE_TYPE 
EXTERNAL_INT8_ARRAY_TYPE 
EXTERNAL_UINT8_ARRAY_TYPE 
EXTERNAL_INT16_ARRAY_TYPE 
EXTERNAL_UINT16_ARRAY_TYPE 
EXTERNAL_INT32_ARRAY_TYPE 
EXTERNAL_UINT32_ARRAY_TYPE 
EXTERNAL_FLOAT32_ARRAY_TYPE 
EXTERNAL_FLOAT64_ARRAY_TYPE 
EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE 
FIXED_INT8_ARRAY_TYPE 
FIXED_UINT8_ARRAY_TYPE 
FIXED_INT16_ARRAY_TYPE 
FIXED_UINT16_ARRAY_TYPE 
FIXED_INT32_ARRAY_TYPE 
FIXED_UINT32_ARRAY_TYPE 
FIXED_FLOAT32_ARRAY_TYPE 
FIXED_FLOAT64_ARRAY_TYPE 
FIXED_UINT8_CLAMPED_ARRAY_TYPE 
FIXED_DOUBLE_ARRAY_TYPE 
FILLER_TYPE 
DECLARED_ACCESSOR_DESCRIPTOR_TYPE 
DECLARED_ACCESSOR_INFO_TYPE 
EXECUTABLE_ACCESSOR_INFO_TYPE 
ACCESSOR_PAIR_TYPE 
ACCESS_CHECK_INFO_TYPE 
INTERCEPTOR_INFO_TYPE 
CALL_HANDLER_INFO_TYPE 
FUNCTION_TEMPLATE_INFO_TYPE 
OBJECT_TEMPLATE_INFO_TYPE 
SIGNATURE_INFO_TYPE 
TYPE_SWITCH_INFO_TYPE 
ALLOCATION_SITE_TYPE 
ALLOCATION_MEMENTO_TYPE 
SCRIPT_TYPE 
CODE_CACHE_TYPE 
POLYMORPHIC_CODE_CACHE_TYPE 
TYPE_FEEDBACK_INFO_TYPE 
ALIASED_ARGUMENTS_ENTRY_TYPE 
BOX_TYPE 
DEBUG_INFO_TYPE 
BREAK_POINT_INFO_TYPE 
FIXED_ARRAY_TYPE 
CONSTANT_POOL_ARRAY_TYPE 
SHARED_FUNCTION_INFO_TYPE 
JS_FUNCTION_PROXY_TYPE 
JS_PROXY_TYPE 
JS_VALUE_TYPE 
JS_MESSAGE_OBJECT_TYPE 
JS_DATE_TYPE 
JS_OBJECT_TYPE 
JS_CONTEXT_EXTENSION_OBJECT_TYPE 
JS_GENERATOR_OBJECT_TYPE 
JS_MODULE_TYPE 
JS_GLOBAL_OBJECT_TYPE 
JS_BUILTINS_OBJECT_TYPE 
JS_GLOBAL_PROXY_TYPE 
JS_ARRAY_TYPE 
JS_ARRAY_BUFFER_TYPE 
JS_TYPED_ARRAY_TYPE 
JS_DATA_VIEW_TYPE 
JS_SET_TYPE 
JS_MAP_TYPE 
JS_SET_ITERATOR_TYPE 
JS_MAP_ITERATOR_TYPE 
JS_WEAK_MAP_TYPE 
JS_WEAK_SET_TYPE 
JS_REGEXP_TYPE 
JS_FUNCTION_TYPE 
FIRST_TYPE 
LAST_TYPE 
FIRST_NAME_TYPE 
LAST_NAME_TYPE 
FIRST_UNIQUE_NAME_TYPE 
LAST_UNIQUE_NAME_TYPE 
FIRST_NONSTRING_TYPE 
FIRST_EXTERNAL_ARRAY_TYPE 
LAST_EXTERNAL_ARRAY_TYPE 
FIRST_FIXED_TYPED_ARRAY_TYPE 
LAST_FIXED_TYPED_ARRAY_TYPE 
LAST_DATA_TYPE 
FIRST_JS_RECEIVER_TYPE 
LAST_JS_RECEIVER_TYPE 
FIRST_JS_OBJECT_TYPE 
LAST_JS_OBJECT_TYPE 
FIRST_JS_PROXY_TYPE 
LAST_JS_PROXY_TYPE 
FIRST_SPEC_OBJECT_TYPE 
LAST_SPEC_OBJECT_TYPE 
FIRST_NONCALLABLE_SPEC_OBJECT_TYPE 
LAST_NONCALLABLE_SPEC_OBJECT_TYPE 
NUM_OF_CALLABLE_SPEC_OBJECT_TYPES 

Definition at line 610 of file objects.h.

610  {
611  // String types.
656 
657  // Non-string names
658  SYMBOL_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE, LAST_NAME_TYPE
659 
660  // Objects allocated in their own spaces (never in new space).
661  MAP_TYPE,
662  CODE_TYPE,
663  ODDBALL_TYPE,
664  CELL_TYPE,
666 
667  // "Data", objects that cannot contain non-map-word pointers to heap
668  // objects.
671  FOREIGN_TYPE,
674  EXTERNAL_INT8_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE
682  EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE
683  FIXED_INT8_ARRAY_TYPE, // FIRST_FIXED_TYPED_ARRAY_TYPE
691  FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE
693  FILLER_TYPE, // LAST_DATA_TYPE
694 
695  // Structs.
709  SCRIPT_TYPE,
714  BOX_TYPE,
720 
721  // All the following types are subtypes of JSReceiver, which corresponds to
722  // objects in the JS sense. The first and the last type in this range are
723  // the two forms of function. This organization enables using the same
724  // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the
725  // NONCALLABLE_JS_OBJECT range.
726  JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE
727  JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE
728  JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE
730  JS_DATE_TYPE,
742  JS_SET_TYPE,
743  JS_MAP_TYPE,
749  JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE
750 
751  // Pseudo-types
752  FIRST_TYPE = 0x0,
759  // Boundaries for testing for an external array.
762  // Boundaries for testing for a fixed typed array.
765  // Boundary for promotion to old data space/old pointer space.
767  // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy).
768  // Note that there is no range for JSObject or JSProxy, since their subtypes
769  // are not continuous in this enum! The enum ranges instead reflect the
770  // external class names, where proxies are treated as either ordinary objects,
771  // or functions.
774  // Boundaries for testing the types represented as JSObject
777  // Boundaries for testing the types represented as JSProxy
780  // Boundaries for testing whether the type is a JavaScript object.
783  // Boundaries for testing the types for which typeof is "object".
786  // Note that the types for which typeof is "function" are not continuous.
787  // Define this so that we can put assertions on discrete checks.
789 };
#define STRING_TYPE(NAME, size, name, Name)
@ kSeqStringTag
Definition: objects.h:563
@ kConsStringTag
Definition: objects.h:564
@ kSlicedStringTag
Definition: objects.h:566
@ kExternalStringTag
Definition: objects.h:565
const uint32_t kTwoByteStringTag
Definition: objects.h:556
const uint32_t kShortExternalStringTag
Definition: objects.h:590
const uint32_t kNotStringTag
Definition: objects.h:545
const uint32_t kNotInternalizedTag
Definition: objects.h:550
@ OBJECT_TEMPLATE_INFO_TYPE
Definition: objects.h:704
@ INTERCEPTOR_INFO_TYPE
Definition: objects.h:701
@ FIRST_FIXED_TYPED_ARRAY_TYPE
Definition: objects.h:763
@ EXTERNAL_STRING_TYPE
Definition: objects.h:642
@ LAST_NONCALLABLE_SPEC_OBJECT_TYPE
Definition: objects.h:785
@ JS_REGEXP_TYPE
Definition: objects.h:748
@ SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE
Definition: objects.h:623
@ SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE
Definition: objects.h:626
@ NUM_OF_CALLABLE_SPEC_OBJECT_TYPES
Definition: objects.h:788
@ FIXED_UINT8_ARRAY_TYPE
Definition: objects.h:684
@ SLICED_STRING_TYPE
Definition: objects.h:638
@ JS_VALUE_TYPE
Definition: objects.h:728
@ JS_DATE_TYPE
Definition: objects.h:730
@ JS_GLOBAL_PROXY_TYPE
Definition: objects.h:737
@ FIRST_UNIQUE_NAME_TYPE
Definition: objects.h:756
@ DECLARED_ACCESSOR_INFO_TYPE
Definition: objects.h:697
@ FIRST_NONCALLABLE_SPEC_OBJECT_TYPE
Definition: objects.h:784
@ FIRST_JS_PROXY_TYPE
Definition: objects.h:778
@ FIXED_DOUBLE_ARRAY_TYPE
Definition: objects.h:692
@ JS_ARRAY_TYPE
Definition: objects.h:738
@ DECLARED_ACCESSOR_DESCRIPTOR_TYPE
Definition: objects.h:696
@ FIXED_ARRAY_TYPE
Definition: objects.h:717
@ JS_MODULE_TYPE
Definition: objects.h:734
@ JS_OBJECT_TYPE
Definition: objects.h:731
@ JS_TYPED_ARRAY_TYPE
Definition: objects.h:740
@ CONS_ONE_BYTE_STRING_TYPE
Definition: objects.h:636
@ FIRST_NONSTRING_TYPE
Definition: objects.h:758
@ JS_DATA_VIEW_TYPE
Definition: objects.h:741
@ FIXED_INT8_ARRAY_TYPE
Definition: objects.h:683
@ LAST_NAME_TYPE
Definition: objects.h:755
@ PROPERTY_CELL_TYPE
Definition: objects.h:665
@ TYPE_SWITCH_INFO_TYPE
Definition: objects.h:706
@ FREE_SPACE_TYPE
Definition: objects.h:673
@ JS_GENERATOR_OBJECT_TYPE
Definition: objects.h:733
@ EXTERNAL_FLOAT32_ARRAY_TYPE
Definition: objects.h:680
@ EXTERNAL_UINT32_ARRAY_TYPE
Definition: objects.h:679
@ EXTERNAL_FLOAT64_ARRAY_TYPE
Definition: objects.h:681
@ BYTE_ARRAY_TYPE
Definition: objects.h:672
@ FIXED_INT32_ARRAY_TYPE
Definition: objects.h:687
@ EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE
Definition: objects.h:646
@ EXTERNAL_UINT8_ARRAY_TYPE
Definition: objects.h:675
@ FIXED_UINT16_ARRAY_TYPE
Definition: objects.h:686
@ JS_WEAK_SET_TYPE
Definition: objects.h:747
@ ODDBALL_TYPE
Definition: objects.h:663
@ ALLOCATION_MEMENTO_TYPE
Definition: objects.h:708
@ FIRST_SPEC_OBJECT_TYPE
Definition: objects.h:781
@ LAST_SPEC_OBJECT_TYPE
Definition: objects.h:782
@ SLICED_ONE_BYTE_STRING_TYPE
Definition: objects.h:640
@ LAST_JS_RECEIVER_TYPE
Definition: objects.h:773
@ SIGNATURE_INFO_TYPE
Definition: objects.h:705
@ ALLOCATION_SITE_TYPE
Definition: objects.h:707
@ JS_CONTEXT_EXTENSION_OBJECT_TYPE
Definition: objects.h:732
@ FIRST_JS_RECEIVER_TYPE
Definition: objects.h:772
@ MUTABLE_HEAP_NUMBER_TYPE
Definition: objects.h:670
@ LAST_UNIQUE_NAME_TYPE
Definition: objects.h:757
@ FIRST_JS_OBJECT_TYPE
Definition: objects.h:775
@ LAST_JS_OBJECT_TYPE
Definition: objects.h:776
@ LAST_DATA_TYPE
Definition: objects.h:766
@ ONE_BYTE_STRING_TYPE
Definition: objects.h:633
@ HEAP_NUMBER_TYPE
Definition: objects.h:669
@ DEBUG_INFO_TYPE
Definition: objects.h:715
@ EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE
Definition: objects.h:682
@ JS_MAP_ITERATOR_TYPE
Definition: objects.h:745
@ JS_MESSAGE_OBJECT_TYPE
Definition: objects.h:729
@ EXECUTABLE_ACCESSOR_INFO_TYPE
Definition: objects.h:698
@ JS_FUNCTION_TYPE
Definition: objects.h:749
@ JS_FUNCTION_PROXY_TYPE
Definition: objects.h:726
@ FIRST_EXTERNAL_ARRAY_TYPE
Definition: objects.h:760
@ SHARED_FUNCTION_INFO_TYPE
Definition: objects.h:719
@ JS_SET_ITERATOR_TYPE
Definition: objects.h:744
@ EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE
Definition: objects.h:620
@ EXTERNAL_INT32_ARRAY_TYPE
Definition: objects.h:678
@ INTERNALIZED_STRING_TYPE
Definition: objects.h:612
@ FIRST_NAME_TYPE
Definition: objects.h:754
@ ACCESSOR_PAIR_TYPE
Definition: objects.h:699
@ FUNCTION_TEMPLATE_INFO_TYPE
Definition: objects.h:703
@ ALIASED_ARGUMENTS_ENTRY_TYPE
Definition: objects.h:713
@ JS_GLOBAL_OBJECT_TYPE
Definition: objects.h:735
@ CALL_HANDLER_INFO_TYPE
Definition: objects.h:702
@ FIXED_FLOAT32_ARRAY_TYPE
Definition: objects.h:689
@ SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE
Definition: objects.h:653
@ EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE
Definition: objects.h:618
@ SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE
Definition: objects.h:629
@ LAST_FIXED_TYPED_ARRAY_TYPE
Definition: objects.h:764
@ EXTERNAL_INTERNALIZED_STRING_TYPE
Definition: objects.h:616
@ EXTERNAL_INT8_ARRAY_TYPE
Definition: objects.h:674
@ CONS_STRING_TYPE
Definition: objects.h:635
@ CODE_CACHE_TYPE
Definition: objects.h:710
@ JS_ARRAY_BUFFER_TYPE
Definition: objects.h:739
@ JS_PROXY_TYPE
Definition: objects.h:727
@ FIXED_UINT32_ARRAY_TYPE
Definition: objects.h:688
@ EXTERNAL_ONE_BYTE_STRING_TYPE
Definition: objects.h:644
@ SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE
Definition: objects.h:651
@ ACCESS_CHECK_INFO_TYPE
Definition: objects.h:700
@ FIXED_UINT8_CLAMPED_ARRAY_TYPE
Definition: objects.h:691
@ JS_BUILTINS_OBJECT_TYPE
Definition: objects.h:736
@ BREAK_POINT_INFO_TYPE
Definition: objects.h:716
@ CONSTANT_POOL_ARRAY_TYPE
Definition: objects.h:718
@ ONE_BYTE_INTERNALIZED_STRING_TYPE
Definition: objects.h:614
@ FIXED_FLOAT64_ARRAY_TYPE
Definition: objects.h:690
@ POLYMORPHIC_CODE_CACHE_TYPE
Definition: objects.h:711
@ LAST_JS_PROXY_TYPE
Definition: objects.h:779
@ FIXED_INT16_ARRAY_TYPE
Definition: objects.h:685
@ FOREIGN_TYPE
Definition: objects.h:671
@ EXTERNAL_INT16_ARRAY_TYPE
Definition: objects.h:676
@ EXTERNAL_UINT16_ARRAY_TYPE
Definition: objects.h:677
@ SHORT_EXTERNAL_STRING_TYPE
Definition: objects.h:649
@ TYPE_FEEDBACK_INFO_TYPE
Definition: objects.h:712
@ JS_WEAK_MAP_TYPE
Definition: objects.h:746
@ LAST_EXTERNAL_ARRAY_TYPE
Definition: objects.h:761
const uint32_t kOneByteStringTag
Definition: objects.h:557
const uint32_t kInternalizedTag
Definition: objects.h:551
const uint32_t kOneByteDataHintTag
Definition: objects.h:585

◆ InstrumentState

Enumerator
InstrumentStateDisable 
InstrumentStateEnable 

Definition at line 21 of file instrument-arm64.h.

21  {
24 };

◆ KeyedAccessStoreMode

Enumerator
STANDARD_STORE 
STORE_TRANSITION_SMI_TO_OBJECT 
STORE_TRANSITION_SMI_TO_DOUBLE 
STORE_TRANSITION_DOUBLE_TO_OBJECT 
STORE_TRANSITION_HOLEY_SMI_TO_OBJECT 
STORE_TRANSITION_HOLEY_SMI_TO_DOUBLE 
STORE_TRANSITION_HOLEY_DOUBLE_TO_OBJECT 
STORE_AND_GROW_NO_TRANSITION 
STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT 
STORE_AND_GROW_TRANSITION_SMI_TO_DOUBLE 
STORE_AND_GROW_TRANSITION_DOUBLE_TO_OBJECT 
STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_OBJECT 
STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_DOUBLE 
STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT 
STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS 
STORE_NO_TRANSITION_HANDLE_COW 

Definition at line 153 of file objects.h.

153  {
170 };
@ STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT
Definition: objects.h:167
@ STORE_TRANSITION_HOLEY_SMI_TO_OBJECT
Definition: objects.h:158
@ STORE_TRANSITION_DOUBLE_TO_OBJECT
Definition: objects.h:157
@ STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_DOUBLE
Definition: objects.h:166
@ STORE_AND_GROW_NO_TRANSITION
Definition: objects.h:161
@ STORE_AND_GROW_TRANSITION_SMI_TO_DOUBLE
Definition: objects.h:163
@ STORE_AND_GROW_TRANSITION_DOUBLE_TO_OBJECT
Definition: objects.h:164
@ STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS
Definition: objects.h:168
@ STORE_NO_TRANSITION_HANDLE_COW
Definition: objects.h:169
@ STORE_TRANSITION_HOLEY_SMI_TO_DOUBLE
Definition: objects.h:159
@ STORE_TRANSITION_HOLEY_DOUBLE_TO_OBJECT
Definition: objects.h:160
@ STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT
Definition: objects.h:162
@ STORE_TRANSITION_SMI_TO_DOUBLE
Definition: objects.h:156
@ STORE_TRANSITION_SMI_TO_OBJECT
Definition: objects.h:155
@ STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_OBJECT
Definition: objects.h:165
@ STANDARD_STORE
Definition: objects.h:154

◆ KeyedStoreCheckMap

Enumerator
kDontCheckMap 
kCheckMap 

Definition at line 524 of file ic.h.

@ kDontCheckMap
Definition: ic.h:524
@ kCheckMap
Definition: ic.h:524

◆ KeyedStoreIncrementLength

Enumerator
kDontIncrementLength 
kIncrementLength 

Definition at line 527 of file ic.h.

@ kDontIncrementLength
Definition: ic.h:527
@ kIncrementLength
Definition: ic.h:527

◆ LeaveExitFrameMode [1/2]

Enumerator
EMIT_RETURN 
NO_EMIT_RETURN 
EMIT_RETURN 
NO_EMIT_RETURN 

Definition at line 32 of file macro-assembler-mips.h.

32  {
33  EMIT_RETURN = true,
34  NO_EMIT_RETURN = false
35 };

◆ LeaveExitFrameMode [2/2]

Enumerator
EMIT_RETURN 
NO_EMIT_RETURN 
EMIT_RETURN 
NO_EMIT_RETURN 

Definition at line 32 of file macro-assembler-mips64.h.

32  {
33  EMIT_RETURN = true,
34  NO_EMIT_RETURN = false
35 };

◆ LFlag

Enumerator
Long 
Short 

Definition at line 294 of file constants-arm.h.

294  {
295  Long = 1 << 22, // Long load/store coprocessor.
296  Short = 0 << 22 // Short load/store coprocessor.
297 };

◆ LiFlags [1/2]

Enumerator
OPTIMIZE_SIZE 
CONSTANT_SIZE 
OPTIMIZE_SIZE 
CONSTANT_SIZE 
ADDRESS_LOAD 

Definition at line 62 of file macro-assembler-mips.h.

62  {
63  // If the constant value can be represented in just 16 bits, then
64  // optimize the li to use a single instruction, rather than lui/ori pair.
65  OPTIMIZE_SIZE = 0,
66  // Always use 2 instructions (lui/ori pair), even if the constant could
67  // be loaded with just one, so that this value is patchable later.
68  CONSTANT_SIZE = 1
69 };

◆ LiFlags [2/2]

Enumerator
OPTIMIZE_SIZE 
CONSTANT_SIZE 
OPTIMIZE_SIZE 
CONSTANT_SIZE 
ADDRESS_LOAD 

Definition at line 62 of file macro-assembler-mips64.h.

62  {
63  // If the constant value can be represented in just 16 bits, then
64  // optimize the li to use a single instruction, rather than lui/ori/dsll
65  // sequence.
66  OPTIMIZE_SIZE = 0,
67  // Always use 6 instructions (lui/ori/dsll sequence), even if the constant
68  // could be loaded with just one, so that this value is patchable later.
69  CONSTANT_SIZE = 1,
70  // For address loads only 4 instruction are required. Used to mark
71  // constant load that will be used as address without relocation
72  // information. It ensures predictable code size, so specific sites
73  // in code are patchable.
74  ADDRESS_LOAD = 2
75 };

◆ LinkRegisterStatus [1/2]

Enumerator
kLRHasNotBeenSaved 
kLRHasBeenSaved 
kLRHasNotBeenSaved 
kLRHasBeenSaved 

Definition at line 45 of file macro-assembler-arm.h.

◆ LinkRegisterStatus [2/2]

Enumerator
kLRHasNotBeenSaved 
kLRHasBeenSaved 
kLRHasNotBeenSaved 
kLRHasBeenSaved 

Definition at line 121 of file macro-assembler-arm64.h.

◆ LoadKeyedHoleMode

Enumerator
NEVER_RETURN_HOLE 
ALLOW_RETURN_HOLE 

Definition at line 6558 of file hydrogen-instructions.h.

◆ LoadLiteralOp

Enumerator
LoadLiteralFixed 
LoadLiteralFMask 
LoadLiteralMask 
LDR_w_lit 
LDR_x_lit 
LDRSW_x_lit 
PRFM_lit 
LDR_s_lit 
LDR_d_lit 

Definition at line 778 of file constants-arm64.h.

778  {
779  LoadLiteralFixed = 0x18000000,
780  LoadLiteralFMask = 0x3B000000,
781  LoadLiteralMask = 0xFF000000,
782  LDR_w_lit = LoadLiteralFixed | 0x00000000,
783  LDR_x_lit = LoadLiteralFixed | 0x40000000,
784  LDRSW_x_lit = LoadLiteralFixed | 0x80000000,
785  PRFM_lit = LoadLiteralFixed | 0xC0000000,
786  LDR_s_lit = LoadLiteralFixed | 0x04000000,
787  LDR_d_lit = LoadLiteralFixed | 0x44000000
788 };

◆ LoadStoreAnyOp

Enumerator
LoadStoreAnyFMask 
LoadStoreAnyFixed 

Definition at line 701 of file constants-arm64.h.

701  {
702  LoadStoreAnyFMask = 0x0a000000,
703  LoadStoreAnyFixed = 0x08000000
704 };

◆ LoadStoreOp

Enumerator
LoadStoreOpMask 
LOAD_STORE_OP_LIST 
PRFM 

Definition at line 822 of file constants-arm64.h.

822  {
823  LoadStoreOpMask = 0xC4C00000,
824  #define LOAD_STORE(A, B, C, D) \
825  A##B##_##C = D
827  #undef LOAD_STORE
828  PRFM = 0xC0800000
829 };
#define LOAD_STORE(A, B, C, D)
#define LOAD_STORE_OP_LIST(V)

◆ LoadStorePairAnyOp

Enumerator
LoadStorePairAnyFMask 
LoadStorePairAnyFixed 

Definition at line 707 of file constants-arm64.h.

707  {
708  LoadStorePairAnyFMask = 0x3a000000,
709  LoadStorePairAnyFixed = 0x28000000
710 };

◆ LoadStorePairNonTemporalOp

Enumerator
LoadStorePairNonTemporalFixed 
LoadStorePairNonTemporalFMask 
LoadStorePairNonTemporalMask 
STNP_w 
LDNP_w 
STNP_x 
LDNP_x 
STNP_s 
LDNP_s 
STNP_d 
LDNP_d 

Definition at line 763 of file constants-arm64.h.

◆ LoadStorePairOffsetOp

Enumerator
LoadStorePairOffsetFixed 
LoadStorePairOffsetFMask 
LoadStorePairOffsetMask 

Definition at line 753 of file constants-arm64.h.

753  {
754  LoadStorePairOffsetFixed = 0x29000000,
755  LoadStorePairOffsetFMask = 0x3B800000,
756  LoadStorePairOffsetMask = 0xFFC00000,
757  #define LOAD_STORE_PAIR_OFFSET(A, B, C) \
758  A##_##B##_off = LoadStorePairOffsetFixed | A##_##B
760  #undef LOAD_STORE_PAIR_OFFSET
761 };
#define LOAD_STORE_PAIR_OP_LIST(V)
#define LOAD_STORE_PAIR_OFFSET(A, B, C)

◆ LoadStorePairOp

Enumerator
LoadStorePairMask 
LoadStorePairLBit 

Definition at line 724 of file constants-arm64.h.

724  {
725  LoadStorePairMask = 0xC4400000,
726  LoadStorePairLBit = 1 << 22,
727  #define LOAD_STORE_PAIR(A, B, C) \
728  A##_##B = C
730  #undef LOAD_STORE_PAIR
731 };
#define LOAD_STORE_PAIR(A, B, C)

◆ LoadStorePairPostIndexOp

Enumerator
LoadStorePairPostIndexFixed 
LoadStorePairPostIndexFMask 
LoadStorePairPostIndexMask 

Definition at line 733 of file constants-arm64.h.

733  {
734  LoadStorePairPostIndexFixed = 0x28800000,
735  LoadStorePairPostIndexFMask = 0x3B800000,
736  LoadStorePairPostIndexMask = 0xFFC00000,
737  #define LOAD_STORE_PAIR_POST_INDEX(A, B, C) \
738  A##_##B##_post = LoadStorePairPostIndexFixed | A##_##B
740  #undef LOAD_STORE_PAIR_POST_INDEX
741 };
#define LOAD_STORE_PAIR_POST_INDEX(A, B, C)

◆ LoadStorePairPreIndexOp

Enumerator
LoadStorePairPreIndexFixed 
LoadStorePairPreIndexFMask 
LoadStorePairPreIndexMask 

Definition at line 743 of file constants-arm64.h.

743  {
744  LoadStorePairPreIndexFixed = 0x29800000,
745  LoadStorePairPreIndexFMask = 0x3B800000,
746  LoadStorePairPreIndexMask = 0xFFC00000,
747  #define LOAD_STORE_PAIR_PRE_INDEX(A, B, C) \
748  A##_##B##_pre = LoadStorePairPreIndexFixed | A##_##B
750  #undef LOAD_STORE_PAIR_PRE_INDEX
751 };
#define LOAD_STORE_PAIR_PRE_INDEX(A, B, C)

◆ LoadStorePostIndex

Enumerator
LoadStorePostIndexFixed 
LoadStorePostIndexFMask 
LoadStorePostIndexMask 

Definition at line 832 of file constants-arm64.h.

832  {
833  LoadStorePostIndexFixed = 0x38000400,
834  LoadStorePostIndexFMask = 0x3B200C00,
835  LoadStorePostIndexMask = 0xFFE00C00,
836  #define LOAD_STORE_POST_INDEX(A, B, C, D) \
837  A##B##_##C##_post = LoadStorePostIndexFixed | D
839  #undef LOAD_STORE_POST_INDEX
840 };
#define LOAD_STORE_POST_INDEX(A, B, C, D)

◆ LoadStorePreIndex

Enumerator
LoadStorePreIndexFixed 
LoadStorePreIndexFMask 
LoadStorePreIndexMask 

Definition at line 843 of file constants-arm64.h.

843  {
844  LoadStorePreIndexFixed = 0x38000C00,
845  LoadStorePreIndexFMask = 0x3B200C00,
846  LoadStorePreIndexMask = 0xFFE00C00,
847  #define LOAD_STORE_PRE_INDEX(A, B, C, D) \
848  A##B##_##C##_pre = LoadStorePreIndexFixed | D
850  #undef LOAD_STORE_PRE_INDEX
851 };
#define LOAD_STORE_PRE_INDEX(A, B, C, D)

◆ LoadStoreRegisterOffset

Enumerator
LoadStoreRegisterOffsetFixed 
LoadStoreRegisterOffsetFMask 
LoadStoreRegisterOffsetMask 
PRFM_reg 

Definition at line 866 of file constants-arm64.h.

866  {
867  LoadStoreRegisterOffsetFixed = 0x38200800,
868  LoadStoreRegisterOffsetFMask = 0x3B200C00,
869  LoadStoreRegisterOffsetMask = 0xFFE00C00,
871  #define LOAD_STORE_REGISTER_OFFSET(A, B, C, D) \
872  A##B##_##C##_reg = LoadStoreRegisterOffsetFixed | D
874  #undef LOAD_STORE_REGISTER_OFFSET
875 };
#define LOAD_STORE_REGISTER_OFFSET(A, B, C, D)
@ LoadStoreRegisterOffsetFixed
@ LoadStoreRegisterOffsetFMask

◆ LoadStoreUnscaledOffsetOp

Enumerator
LoadStoreUnscaledOffsetFixed 
LoadStoreUnscaledOffsetFMask 
LoadStoreUnscaledOffsetMask 

Definition at line 811 of file constants-arm64.h.

811  {
812  LoadStoreUnscaledOffsetFixed = 0x38000000,
813  LoadStoreUnscaledOffsetFMask = 0x3B200C00,
814  LoadStoreUnscaledOffsetMask = 0xFFE00C00,
815  #define LOAD_STORE_UNSCALED(A, B, C, D) \
816  A##U##B##_##C = LoadStoreUnscaledOffsetFixed | D
818  #undef LOAD_STORE_UNSCALED
819 };
#define LOAD_STORE_UNSCALED(A, B, C, D)
@ LoadStoreUnscaledOffsetFMask
@ LoadStoreUnscaledOffsetFixed

◆ LoadStoreUnsignedOffset

Enumerator
LoadStoreUnsignedOffsetFixed 
LoadStoreUnsignedOffsetFMask 
LoadStoreUnsignedOffsetMask 
PRFM_unsigned 

Definition at line 854 of file constants-arm64.h.

854  {
855  LoadStoreUnsignedOffsetFixed = 0x39000000,
856  LoadStoreUnsignedOffsetFMask = 0x3B000000,
857  LoadStoreUnsignedOffsetMask = 0xFFC00000,
859  #define LOAD_STORE_UNSIGNED_OFFSET(A, B, C, D) \
860  A##B##_##C##_unsigned = LoadStoreUnsignedOffsetFixed | D
862  #undef LOAD_STORE_UNSIGNED_OFFSET
863 };
#define LOAD_STORE_UNSIGNED_OFFSET(A, B, C, D)
@ LoadStoreUnsignedOffsetFixed
@ LoadStoreUnsignedOffsetFMask

◆ LoggingAndProfiling

Enumerator
LOGGING_AND_PROFILING_ENABLED 
LOGGING_AND_PROFILING_DISABLED 

Definition at line 1812 of file heap.cc.

1812  {
1815 };
@ LOGGING_AND_PROFILING_ENABLED
Definition: heap.cc:1813
@ LOGGING_AND_PROFILING_DISABLED
Definition: heap.cc:1814

◆ LogicalImmediateOp

Enumerator
LogicalImmediateFixed 
LogicalImmediateFMask 
LogicalImmediateMask 
AND_w_imm 
AND_x_imm 
ORR_w_imm 
ORR_x_imm 
EOR_w_imm 
EOR_x_imm 
ANDS_w_imm 
ANDS_x_imm 

Definition at line 511 of file constants-arm64.h.

511  {
512  LogicalImmediateFixed = 0x12000000,
513  LogicalImmediateFMask = 0x1F800000,
514  LogicalImmediateMask = 0xFF800000,
523 };

◆ LogicalOp

Enumerator
LogicalOpMask 
NOT 
AND 
BIC 
ORR 
ORN 
EOR 
EON 
ANDS 
BICS 

Definition at line 497 of file constants-arm64.h.

497  {
498  LogicalOpMask = 0x60200000,
499  NOT = 0x00200000,
500  AND = 0x00000000,
501  BIC = AND | NOT,
502  ORR = 0x20000000,
503  ORN = ORR | NOT,
504  EOR = 0x40000000,
505  EON = EOR | NOT,
506  ANDS = 0x60000000,
507  BICS = ANDS | NOT
508 };

◆ LogicalShiftedOp

Enumerator
LogicalShiftedFixed 
LogicalShiftedFMask 
LogicalShiftedMask 
AND_w 
AND_x 
AND_shift 
BIC_w 
BIC_x 
BIC_shift 
ORR_w 
ORR_x 
ORR_shift 
ORN_w 
ORN_x 
ORN_shift 
EOR_w 
EOR_x 
EOR_shift 
EON_w 
EON_x 
EON_shift 
ANDS_w 
ANDS_x 
ANDS_shift 
BICS_w 
BICS_x 
BICS_shift 

Definition at line 526 of file constants-arm64.h.

526  {
527  LogicalShiftedFixed = 0x0A000000,
528  LogicalShiftedFMask = 0x1F000000,
529  LogicalShiftedMask = 0xFF200000,
532  AND_shift = AND_w,
535  BIC_shift = BIC_w,
538  ORR_shift = ORR_w,
541  ORN_shift = ORN_w,
544  EOR_shift = EOR_w,
547  EON_shift = EON_w,
550  ANDS_shift = ANDS_w,
554 };

◆ LSDataSize

Enumerator
LSByte 
LSHalfword 
LSWord 
LSDoubleWord 

Definition at line 55 of file instructions-arm64.h.

55  {
56  LSByte = 0,
57  LSHalfword = 1,
58  LSWord = 2,
59  LSDoubleWord = 3
60 };

◆ MarkingParity

Enumerator
NO_MARKING_PARITY 
ODD_MARKING_PARITY 
EVEN_MARKING_PARITY 

Definition at line 297 of file objects.h.

297  {
301 };
@ ODD_MARKING_PARITY
Definition: objects.h:299
@ EVEN_MARKING_PARITY
Definition: objects.h:300
@ NO_MARKING_PARITY
Definition: objects.h:298

◆ MarksHandling

Enumerator
TRANSFER_MARKS 
IGNORE_MARKS 

Definition at line 1818 of file heap.cc.

@ IGNORE_MARKS
Definition: heap.cc:1818
@ TRANSFER_MARKS
Definition: heap.cc:1818

◆ MayAccessDecision

Enumerator
YES 
NO 
UNKNOWN 

Definition at line 666 of file isolate.cc.

666  {
667  YES, NO, UNKNOWN
668 };

◆ MaybeAssignedFlag

Enumerator
kNotAssigned 
kMaybeAssigned 

Definition at line 757 of file globals.h.

◆ MemBarrierOp

Enumerator
MemBarrierFixed 
MemBarrierFMask 
MemBarrierMask 
DSB 
DMB 
ISB 

Definition at line 691 of file constants-arm64.h.

691  {
692  MemBarrierFixed = 0xD503309F,
693  MemBarrierFMask = 0xFFFFF09F,
694  MemBarrierMask = 0xFFFFF0FF,
695  DSB = MemBarrierFixed | 0x00000000,
696  DMB = MemBarrierFixed | 0x00000020,
697  ISB = MemBarrierFixed | 0x00000040
698 };

◆ MinimumCapacity

Enumerator
USE_DEFAULT_MINIMUM_CAPACITY 
USE_CUSTOM_MINIMUM_CAPACITY 

Definition at line 384 of file globals.h.

384  {
387 };
@ USE_DEFAULT_MINIMUM_CAPACITY
Definition: globals.h:385
@ USE_CUSTOM_MINIMUM_CAPACITY
Definition: globals.h:386

◆ MinusZeroMode

Enumerator
TREAT_MINUS_ZERO_AS_ZERO 
FAIL_ON_MINUS_ZERO 

Definition at line 766 of file globals.h.

766  {
769 };
@ FAIL_ON_MINUS_ZERO
Definition: globals.h:768
@ TREAT_MINUS_ZERO_AS_ZERO
Definition: globals.h:767

◆ MiscInstructionsBits74

Enumerator
BX 
BXJ 
BLX 
BKPT 
CLZ 

Definition at line 150 of file constants-arm.h.

150  {
151  // With bits 22-21 01.
152  BX = 1 << 4,
153  BXJ = 2 << 4,
154  BLX = 3 << 4,
155  BKPT = 7 << 4,
156 
157  // With bits 22-21 11.
158  CLZ = 1 << 4
159 };

◆ MoveWideImmediateOp

Enumerator
MoveWideImmediateFixed 
MoveWideImmediateFMask 
MoveWideImmediateMask 
MOVN 
MOVZ 
MOVK 
MOVN_w 
MOVN_x 
MOVZ_w 
MOVZ_x 
MOVK_w 
MOVK_x 

Definition at line 557 of file constants-arm64.h.

◆ MutableMode

Enumerator
MUTABLE 
IMMUTABLE 

Definition at line 179 of file objects.h.

179  {
180  MUTABLE,
181  IMMUTABLE
182 };

◆ NativesFlag

Enumerator
NOT_NATIVES_CODE 
NATIVES_CODE 

Definition at line 401 of file globals.h.

◆ NativeType

Enumerator
CORE 
EXPERIMENTAL 
D8 
TEST 

Definition at line 19 of file natives.h.

19  {
21 };
@ EXPERIMENTAL
Definition: natives.h:20

◆ NeonDataType

Enumerator
NeonS8 
NeonS16 
NeonS32 
NeonU8 
NeonU16 
NeonU32 
NeonDataTypeSizeMask 
NeonDataTypeUMask 

Definition at line 301 of file constants-arm.h.

301  {
302  NeonS8 = 0x1, // U = 0, imm3 = 0b001
303  NeonS16 = 0x2, // U = 0, imm3 = 0b010
304  NeonS32 = 0x4, // U = 0, imm3 = 0b100
305  NeonU8 = 1 << 24 | 0x1, // U = 1, imm3 = 0b001
306  NeonU16 = 1 << 24 | 0x2, // U = 1, imm3 = 0b010
307  NeonU32 = 1 << 24 | 0x4, // U = 1, imm3 = 0b100
308  NeonDataTypeSizeMask = 0x7,
309  NeonDataTypeUMask = 1 << 24
310 };

◆ NeonListType

Enumerator
nlt_1 
nlt_2 
nlt_3 
nlt_4 

Definition at line 312 of file constants-arm.h.

312  {
313  nlt_1 = 0x7,
314  nlt_2 = 0xA,
315  nlt_3 = 0x6,
316  nlt_4 = 0x2
317 };

◆ NeonSize

Enumerator
Neon8 
Neon16 
Neon32 
Neon64 

Definition at line 319 of file constants-arm.h.

319  {
320  Neon8 = 0x0,
321  Neon16 = 0x1,
322  Neon32 = 0x2,
323  Neon64 = 0x3
324 };

◆ NilValue

Enumerator
kNullValue 
kUndefinedValue 

Definition at line 97 of file v8.h.

@ kNullValue
Definition: v8.h:97
@ kUndefinedValue
Definition: v8.h:97

◆ NumberUntagDMode

Enumerator
NUMBER_CANDIDATE_IS_SMI 
NUMBER_CANDIDATE_IS_ANY_TAGGED 

Definition at line 755 of file lithium.h.

755  {
758 };
@ NUMBER_CANDIDATE_IS_SMI
Definition: lithium.h:756
@ NUMBER_CANDIDATE_IS_ANY_TAGGED
Definition: lithium.h:757

◆ ObjectToDoubleFlags [1/2]

Enumerator
NO_OBJECT_TO_DOUBLE_FLAGS 
OBJECT_NOT_SMI 
AVOID_NANS_AND_INFINITIES 
NO_OBJECT_TO_DOUBLE_FLAGS 
OBJECT_NOT_SMI 
AVOID_NANS_AND_INFINITIES 

Definition at line 46 of file macro-assembler-mips.h.

46  {
47  // No special flags.
49  // Object is known to be a non smi.
50  OBJECT_NOT_SMI = 1 << 0,
51  // Don't load NaNs or infinities, branch to the non number case instead.
53 };

◆ ObjectToDoubleFlags [2/2]

Enumerator
NO_OBJECT_TO_DOUBLE_FLAGS 
OBJECT_NOT_SMI 
AVOID_NANS_AND_INFINITIES 
NO_OBJECT_TO_DOUBLE_FLAGS 
OBJECT_NOT_SMI 
AVOID_NANS_AND_INFINITIES 

Definition at line 46 of file macro-assembler-mips64.h.

46  {
47  // No special flags.
49  // Object is known to be a non smi.
50  OBJECT_NOT_SMI = 1 << 0,
51  // Don't load NaNs or infinities, branch to the non number case instead.
53 };

◆ Opcode [1/3]

Enumerator
AND 
EOR 
SUB 
RSB 
ADD 
ADC 
SBC 
RSC 
TST 
TEQ 
CMP 
CMN 
ORR 
MOV 
BIC 
MVN 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
SB 
SH 
SWL 
SW 
SWR 
LWC1 
LDC1 
BEQZC 
PREF 
SWC1 
SDC1 
BNEZC 
COP1X 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
DAUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
DADDIU 
LDL 
LDR 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
LWU 
SB 
SH 
SWL 
SW 
SDL 
SDR 
SWR 
LWC1 
LLD 
LDC1 
BEQZC 
LD 
PREF 
SWC1 
SCD 
SDC1 
BNEZC 
SD 
COP1X 

Definition at line 129 of file constants-arm.h.

129  {
130  AND = 0 << 21, // Logical AND.
131  EOR = 1 << 21, // Logical Exclusive OR.
132  SUB = 2 << 21, // Subtract.
133  RSB = 3 << 21, // Reverse Subtract.
134  ADD = 4 << 21, // Add.
135  ADC = 5 << 21, // Add with Carry.
136  SBC = 6 << 21, // Subtract with Carry.
137  RSC = 7 << 21, // Reverse Subtract with Carry.
138  TST = 8 << 21, // Test.
139  TEQ = 9 << 21, // Test Equivalence.
140  CMP = 10 << 21, // Compare.
141  CMN = 11 << 21, // Compare Negated.
142  ORR = 12 << 21, // Logical (inclusive) OR.
143  MOV = 13 << 21, // Move.
144  BIC = 14 << 21, // Bit Clear.
145  MVN = 15 << 21 // Move Not.
146 };

◆ Opcode [2/3]

Enumerator
AND 
EOR 
SUB 
RSB 
ADD 
ADC 
SBC 
RSC 
TST 
TEQ 
CMP 
CMN 
ORR 
MOV 
BIC 
MVN 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
SB 
SH 
SWL 
SW 
SWR 
LWC1 
LDC1 
BEQZC 
PREF 
SWC1 
SDC1 
BNEZC 
COP1X 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
DAUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
DADDIU 
LDL 
LDR 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
LWU 
SB 
SH 
SWL 
SW 
SDL 
SDR 
SWR 
LWC1 
LLD 
LDC1 
BEQZC 
LD 
PREF 
SWC1 
SCD 
SDC1 
BNEZC 
SD 
COP1X 

Definition at line 313 of file constants-mips.h.

313  {
314  SPECIAL = 0 << kOpcodeShift,
315  REGIMM = 1 << kOpcodeShift,
316 
317  J = ((0 << 3) + 2) << kOpcodeShift,
318  JAL = ((0 << 3) + 3) << kOpcodeShift,
319  BEQ = ((0 << 3) + 4) << kOpcodeShift,
320  BNE = ((0 << 3) + 5) << kOpcodeShift,
321  BLEZ = ((0 << 3) + 6) << kOpcodeShift,
322  BGTZ = ((0 << 3) + 7) << kOpcodeShift,
323 
324  ADDI = ((1 << 3) + 0) << kOpcodeShift,
325  ADDIU = ((1 << 3) + 1) << kOpcodeShift,
326  SLTI = ((1 << 3) + 2) << kOpcodeShift,
327  SLTIU = ((1 << 3) + 3) << kOpcodeShift,
328  ANDI = ((1 << 3) + 4) << kOpcodeShift,
329  ORI = ((1 << 3) + 5) << kOpcodeShift,
330  XORI = ((1 << 3) + 6) << kOpcodeShift,
331  LUI = ((1 << 3) + 7) << kOpcodeShift, // LUI/AUI family.
332 
333  BEQC = ((2 << 3) + 0) << kOpcodeShift,
334  COP1 = ((2 << 3) + 1) << kOpcodeShift, // Coprocessor 1 class.
335  BEQL = ((2 << 3) + 4) << kOpcodeShift,
336  BNEL = ((2 << 3) + 5) << kOpcodeShift,
337  BLEZL = ((2 << 3) + 6) << kOpcodeShift,
338  BGTZL = ((2 << 3) + 7) << kOpcodeShift,
339 
340  DADDI = ((3 << 3) + 0) << kOpcodeShift, // This is also BNEC.
341  SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift,
342  SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift,
343 
344  LB = ((4 << 3) + 0) << kOpcodeShift,
345  LH = ((4 << 3) + 1) << kOpcodeShift,
346  LWL = ((4 << 3) + 2) << kOpcodeShift,
347  LW = ((4 << 3) + 3) << kOpcodeShift,
348  LBU = ((4 << 3) + 4) << kOpcodeShift,
349  LHU = ((4 << 3) + 5) << kOpcodeShift,
350  LWR = ((4 << 3) + 6) << kOpcodeShift,
351  SB = ((5 << 3) + 0) << kOpcodeShift,
352  SH = ((5 << 3) + 1) << kOpcodeShift,
353  SWL = ((5 << 3) + 2) << kOpcodeShift,
354  SW = ((5 << 3) + 3) << kOpcodeShift,
355  SWR = ((5 << 3) + 6) << kOpcodeShift,
356 
357  LWC1 = ((6 << 3) + 1) << kOpcodeShift,
358  LDC1 = ((6 << 3) + 5) << kOpcodeShift,
359  BEQZC = ((6 << 3) + 6) << kOpcodeShift,
360 
361  PREF = ((6 << 3) + 3) << kOpcodeShift,
362 
363  SWC1 = ((7 << 3) + 1) << kOpcodeShift,
364  SDC1 = ((7 << 3) + 5) << kOpcodeShift,
365  BNEZC = ((7 << 3) + 6) << kOpcodeShift,
366 
367  COP1X = ((1 << 4) + 3) << kOpcodeShift
368 };
const int kOpcodeShift

◆ Opcode [3/3]

Enumerator
AND 
EOR 
SUB 
RSB 
ADD 
ADC 
SBC 
RSC 
TST 
TEQ 
CMP 
CMN 
ORR 
MOV 
BIC 
MVN 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
SB 
SH 
SWL 
SW 
SWR 
LWC1 
LDC1 
BEQZC 
PREF 
SWC1 
SDC1 
BNEZC 
COP1X 
SPECIAL 
REGIMM 
JAL 
BEQ 
BNE 
BLEZ 
BGTZ 
ADDI 
ADDIU 
SLTI 
SLTIU 
ANDI 
ORI 
XORI 
LUI 
DAUI 
BEQC 
COP1 
BEQL 
BNEL 
BLEZL 
BGTZL 
DADDI 
DADDIU 
LDL 
LDR 
SPECIAL2 
SPECIAL3 
LB 
LH 
LWL 
LW 
LBU 
LHU 
LWR 
LWU 
SB 
SH 
SWL 
SW 
SDL 
SDR 
SWR 
LWC1 
LLD 
LDC1 
BEQZC 
LD 
PREF 
SWC1 
SCD 
SDC1 
BNEZC 
SD 
COP1X 

Definition at line 278 of file constants-mips64.h.

278  {
279  SPECIAL = 0 << kOpcodeShift,
280  REGIMM = 1 << kOpcodeShift,
281 
282  J = ((0 << 3) + 2) << kOpcodeShift,
283  JAL = ((0 << 3) + 3) << kOpcodeShift,
284  BEQ = ((0 << 3) + 4) << kOpcodeShift,
285  BNE = ((0 << 3) + 5) << kOpcodeShift,
286  BLEZ = ((0 << 3) + 6) << kOpcodeShift,
287  BGTZ = ((0 << 3) + 7) << kOpcodeShift,
288 
289  ADDI = ((1 << 3) + 0) << kOpcodeShift,
290  ADDIU = ((1 << 3) + 1) << kOpcodeShift,
291  SLTI = ((1 << 3) + 2) << kOpcodeShift,
292  SLTIU = ((1 << 3) + 3) << kOpcodeShift,
293  ANDI = ((1 << 3) + 4) << kOpcodeShift,
294  ORI = ((1 << 3) + 5) << kOpcodeShift,
295  XORI = ((1 << 3) + 6) << kOpcodeShift,
296  LUI = ((1 << 3) + 7) << kOpcodeShift, // LUI/AUI family.
297  DAUI = ((3 << 3) + 5) << kOpcodeShift,
298 
299  BEQC = ((2 << 3) + 0) << kOpcodeShift,
300  COP1 = ((2 << 3) + 1) << kOpcodeShift, // Coprocessor 1 class.
301  BEQL = ((2 << 3) + 4) << kOpcodeShift,
302  BNEL = ((2 << 3) + 5) << kOpcodeShift,
303  BLEZL = ((2 << 3) + 6) << kOpcodeShift,
304  BGTZL = ((2 << 3) + 7) << kOpcodeShift,
305 
306  DADDI = ((3 << 3) + 0) << kOpcodeShift, // This is also BNEC.
307  DADDIU = ((3 << 3) + 1) << kOpcodeShift,
308  LDL = ((3 << 3) + 2) << kOpcodeShift,
309  LDR = ((3 << 3) + 3) << kOpcodeShift,
310  SPECIAL2 = ((3 << 3) + 4) << kOpcodeShift,
311  SPECIAL3 = ((3 << 3) + 7) << kOpcodeShift,
312 
313  LB = ((4 << 3) + 0) << kOpcodeShift,
314  LH = ((4 << 3) + 1) << kOpcodeShift,
315  LWL = ((4 << 3) + 2) << kOpcodeShift,
316  LW = ((4 << 3) + 3) << kOpcodeShift,
317  LBU = ((4 << 3) + 4) << kOpcodeShift,
318  LHU = ((4 << 3) + 5) << kOpcodeShift,
319  LWR = ((4 << 3) + 6) << kOpcodeShift,
320  LWU = ((4 << 3) + 7) << kOpcodeShift,
321 
322  SB = ((5 << 3) + 0) << kOpcodeShift,
323  SH = ((5 << 3) + 1) << kOpcodeShift,
324  SWL = ((5 << 3) + 2) << kOpcodeShift,
325  SW = ((5 << 3) + 3) << kOpcodeShift,
326  SDL = ((5 << 3) + 4) << kOpcodeShift,
327  SDR = ((5 << 3) + 5) << kOpcodeShift,
328  SWR = ((5 << 3) + 6) << kOpcodeShift,
329 
330  LWC1 = ((6 << 3) + 1) << kOpcodeShift,
331  LLD = ((6 << 3) + 4) << kOpcodeShift,
332  LDC1 = ((6 << 3) + 5) << kOpcodeShift,
333  BEQZC = ((6 << 3) + 6) << kOpcodeShift,
334  LD = ((6 << 3) + 7) << kOpcodeShift,
335 
336  PREF = ((6 << 3) + 3) << kOpcodeShift,
337 
338  SWC1 = ((7 << 3) + 1) << kOpcodeShift,
339  SCD = ((7 << 3) + 4) << kOpcodeShift,
340  SDC1 = ((7 << 3) + 5) << kOpcodeShift,
341  BNEZC = ((7 << 3) + 6) << kOpcodeShift,
342  SD = ((7 << 3) + 7) << kOpcodeShift,
343 
344  COP1X = ((1 << 4) + 3) << kOpcodeShift
345 };
LinkageHelper< ArmLinkageHelperTraits > LH
Definition: linkage-arm.cc:36

◆ OverwriteMode

Enumerator
NO_OVERWRITE 
OVERWRITE_LEFT 
OVERWRITE_RIGHT 

Definition at line 58 of file ic-state.h.

◆ ParseRestriction

Enumerator
NO_PARSE_RESTRICTION 
ONLY_SINGLE_FUNCTION_LITERAL 

Definition at line 21 of file compiler.h.

21  {
22  NO_PARSE_RESTRICTION, // All expressions are allowed.
23  ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression.
24 };
@ ONLY_SINGLE_FUNCTION_LITERAL
Definition: compiler.h:23
@ NO_PARSE_RESTRICTION
Definition: compiler.h:22

◆ PCRelAddressingOp

Enumerator
PCRelAddressingFixed 
PCRelAddressingFMask 
PCRelAddressingMask 
ADR 
ADRP 

Definition at line 420 of file constants-arm64.h.

420  {
421  PCRelAddressingFixed = 0x10000000,
422  PCRelAddressingFMask = 0x1F000000,
423  PCRelAddressingMask = 0x9F000000,
424  ADR = PCRelAddressingFixed | 0x00000000,
425  ADRP = PCRelAddressingFixed | 0x80000000
426 };

◆ PerIsolateAssertType

Enumerator
JAVASCRIPT_EXECUTION_ASSERT 
JAVASCRIPT_EXECUTION_THROWS 
ALLOCATION_FAILURE_ASSERT 
DEOPTIMIZATION_ASSERT 
COMPILATION_ASSERT 

Definition at line 29 of file assert-scope.h.

◆ PerThreadAssertType

Enumerator
HEAP_ALLOCATION_ASSERT 
HANDLE_ALLOCATION_ASSERT 
HANDLE_DEREFERENCE_ASSERT 
DEFERRED_HANDLE_DEREFERENCE_ASSERT 
CODE_DEPENDENCY_CHANGE_ASSERT 
LAST_PER_THREAD_ASSERT_TYPE 

Definition at line 19 of file assert-scope.h.

◆ PointersToHereCheck [1/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 41 of file macro-assembler-arm.h.

◆ PointersToHereCheck [2/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 117 of file macro-assembler-arm64.h.

◆ PointersToHereCheck [3/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 22 of file macro-assembler-ia32.h.

◆ PointersToHereCheck [4/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 74 of file macro-assembler-mips.h.

◆ PointersToHereCheck [5/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 80 of file macro-assembler-mips64.h.

◆ PointersToHereCheck [6/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 33 of file macro-assembler-x64.h.

◆ PointersToHereCheck [7/7]

Enumerator
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 
kPointersToHereMaybeInteresting 
kPointersToHereAreAlwaysInteresting 

Definition at line 22 of file macro-assembler-x87.h.

◆ PretenureFlag

Enumerator
NOT_TENURED 
TENURED 

Definition at line 382 of file globals.h.

382 { NOT_TENURED, TENURED };

◆ PrintfArgPattern

Enumerator
kPrintfArgW 
kPrintfArgX 
kPrintfArgD 

Definition at line 443 of file instructions-arm64.h.

443  {
444  kPrintfArgW = 1,
445  kPrintfArgX = 2,
446  // There is no kPrintfArgS because floats are always converted to doubles in C
447  // varargs calls.
448  kPrintfArgD = 3
449 };

◆ PropertyAccessType

Enumerator
LOAD 
STORE 

Definition at line 213 of file hydrogen-instructions.h.

◆ PropertyDescriptorIndices

Enumerator
IS_ACCESSOR_INDEX 
VALUE_INDEX 
GETTER_INDEX 
SETTER_INDEX 
WRITABLE_INDEX 
ENUMERABLE_INDEX 
CONFIGURABLE_INDEX 
DESCRIPTOR_SIZE 

Definition at line 745 of file runtime.cc.

745  {
747  VALUE_INDEX,
748  GETTER_INDEX,
749  SETTER_INDEX,
754 };
@ DESCRIPTOR_SIZE
Definition: runtime.cc:753
@ WRITABLE_INDEX
Definition: runtime.cc:750
@ ENUMERABLE_INDEX
Definition: runtime.cc:751
@ CONFIGURABLE_INDEX
Definition: runtime.cc:752
@ IS_ACCESSOR_INDEX
Definition: runtime.cc:746

◆ PropertyNormalizationMode

Enumerator
CLEAR_INOBJECT_PROPERTIES 
KEEP_INOBJECT_PROPERTIES 

Definition at line 247 of file objects.h.

247  {
250 };
@ KEEP_INOBJECT_PROPERTIES
Definition: objects.h:249
@ CLEAR_INOBJECT_PROPERTIES
Definition: objects.h:248

◆ PropertyType

Enumerator
NORMAL 
FIELD 
CONSTANT 
CALLBACKS 

Definition at line 47 of file property-details.h.

47  {
48  // Only in slow mode.
49  NORMAL = 0,
50  // Only in fast mode.
51  FIELD = 1,
52  CONSTANT = 2,
53  CALLBACKS = 3
54 };

◆ PrototypeCheckType

Enumerator
CHECK_ALL_MAPS 
SKIP_RECEIVER 

Definition at line 16 of file handler-compiler.h.

◆ PrototypeOptimizationMode

Enumerator
REGULAR_PROTOTYPE 
FAST_PROTOTYPE 

Definition at line 258 of file objects.h.

◆ RAStatus [1/2]

Enumerator
kRAHasNotBeenSaved 
kRAHasBeenSaved 
kRAHasNotBeenSaved 
kRAHasBeenSaved 

Definition at line 78 of file macro-assembler-mips.h.

◆ RAStatus [2/2]

Enumerator
kRAHasNotBeenSaved 
kRAHasBeenSaved 
kRAHasNotBeenSaved 
kRAHasBeenSaved 

Definition at line 84 of file macro-assembler-mips64.h.

◆ Reg31Mode

Enumerator
Reg31IsStackPointer 
Reg31IsZeroRegister 

Definition at line 90 of file instructions-arm64.h.

◆ RegisterKind

Enumerator
UNALLOCATED_REGISTERS 
GENERAL_REGISTERS 
DOUBLE_REGISTERS 

Definition at line 778 of file lithium.h.

778  {
782 };
@ GENERAL_REGISTERS
Definition: lithium.h:780
@ DOUBLE_REGISTERS
Definition: lithium.h:781
@ UNALLOCATED_REGISTERS
Definition: lithium.h:779

◆ RegisterValueType [1/2]

Enumerator
REGISTER_VALUE_IS_SMI 
REGISTER_VALUE_IS_INT32 
REGISTER_VALUE_IS_SMI 
REGISTER_VALUE_IS_INT32 

Definition at line 28 of file macro-assembler-ia32.h.

◆ RegisterValueType [2/2]

Enumerator
REGISTER_VALUE_IS_SMI 
REGISTER_VALUE_IS_INT32 
REGISTER_VALUE_IS_SMI 
REGISTER_VALUE_IS_INT32 

Definition at line 28 of file macro-assembler-x87.h.

◆ RememberedSetAction [1/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 39 of file macro-assembler-arm.h.

◆ RememberedSetAction [2/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 115 of file macro-assembler-arm64.h.

◆ RememberedSetAction [3/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 20 of file macro-assembler-ia32.h.

◆ RememberedSetAction [4/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 72 of file macro-assembler-mips.h.

◆ RememberedSetAction [5/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 78 of file macro-assembler-mips64.h.

◆ RememberedSetAction [6/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 31 of file macro-assembler-x64.h.

◆ RememberedSetAction [7/7]

Enumerator
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 
EMIT_REMEMBERED_SET 
OMIT_REMEMBERED_SET 

Definition at line 20 of file macro-assembler-x87.h.

◆ RemovableSimulate

Enumerator
REMOVABLE_SIMULATE 
FIXED_SIMULATE 

Definition at line 1798 of file hydrogen-instructions.h.

◆ RobustnessFlag

Enumerator
ROBUST_STRING_TRAVERSAL 
FAST_STRING_TRAVERSAL 

Definition at line 8338 of file objects.h.

◆ SaveFPRegsMode

Enumerator
kDontSaveFPRegs 
kSaveFPRegs 

Definition at line 286 of file assembler.h.

◆ SBit

Enumerator
SetCC 
LeaveCC 

Definition at line 214 of file constants-arm.h.

214  {
215  SetCC = 1 << 20, // Set condition code.
216  LeaveCC = 0 << 20 // Leave condition code unchanged.
217 };

◆ ScaleFactor [1/3]

Enumerator
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 

Definition at line 317 of file assembler-ia32.h.

◆ ScaleFactor [2/3]

Enumerator
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 

Definition at line 380 of file assembler-x64.h.

380  {
381  times_1 = 0,
382  times_2 = 1,
383  times_4 = 2,
384  times_8 = 3,
387 };
const int kPointerSize
Definition: globals.h:129

◆ ScaleFactor [3/3]

Enumerator
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_pointer_size 
times_1 
times_2 
times_4 
times_8 
times_int_size 
times_half_pointer_size 
times_pointer_size 
times_twice_pointer_size 

Definition at line 311 of file assembler-x87.h.

311  {
312  times_1 = 0,
313  times_2 = 1,
314  times_4 = 2,
315  times_8 = 3,
320 };

◆ ScopeType

Enumerator
EVAL_SCOPE 
FUNCTION_SCOPE 
MODULE_SCOPE 
GLOBAL_SCOPE 
CATCH_SCOPE 
BLOCK_SCOPE 
WITH_SCOPE 

Definition at line 645 of file globals.h.

645  {
646  EVAL_SCOPE, // The top-level scope for an eval source.
647  FUNCTION_SCOPE, // The top-level scope for a function.
648  MODULE_SCOPE, // The scope introduced by a module literal
649  GLOBAL_SCOPE, // The top-level scope for a program or a top-level eval.
650  CATCH_SCOPE, // The scope introduced by catch.
651  BLOCK_SCOPE, // The scope introduced by a new block.
652  WITH_SCOPE // The scope introduced by with.
653 };
@ FUNCTION_SCOPE
Definition: globals.h:647
@ MODULE_SCOPE
Definition: globals.h:648
@ GLOBAL_SCOPE
Definition: globals.h:649

◆ SearchMode

Enumerator
ALL_ENTRIES 
VALID_ENTRIES 

Definition at line 3130 of file objects.h.

◆ SecondaryField [1/2]

Enumerator
SLL 
MOVCI 
SRL 
SRA 
SLLV 
SRLV 
SRAV 
JR 
JALR 
MOVZ 
MOVN 
BREAK 
MFHI 
CLZ_R6 
CLO_R6 
MFLO 
MULT 
MULTU 
DIV 
DIVU 
ADD 
ADDU 
SUB 
SUBU 
AND 
OR 
XOR 
NOR 
SLT 
SLTU 
TGE 
TGEU 
TLT 
TLTU 
TEQ 
SELEQZ_S 
TNE 
SELNEZ_S 
MUL_MUH 
MUL_MUH_U 
MUL_OP 
MUH_OP 
DIV_OP 
MOD_OP 
DIV_MOD 
DIV_MOD_U 
MUL 
CLZ 
CLO 
EXT 
INS 
BLTZ 
BGEZ 
BLTZAL 
BGEZAL 
BGEZALL 
MFC1 
CFC1 
MFHC1 
MTC1 
CTC1 
MTHC1 
BC1 
PS 
ROUND_L_S 
TRUNC_L_S 
CEIL_L_S 
FLOOR_L_S 
ROUND_W_S 
TRUNC_W_S 
CEIL_W_S 
FLOOR_W_S 
CVT_D_S 
CVT_W_S 
CVT_L_S 
CVT_PS_S 
ADD_D 
SUB_D 
MUL_D 
DIV_D 
SQRT_D 
ABS_D 
MOV_D 
NEG_D 
ROUND_L_D 
TRUNC_L_D 
CEIL_L_D 
FLOOR_L_D 
ROUND_W_D 
TRUNC_W_D 
CEIL_W_D 
FLOOR_W_D 
MIN 
MINA 
MAX 
MAXA 
CVT_S_D 
CVT_W_D 
CVT_L_D 
C_F_D 
C_UN_D 
C_EQ_D 
C_UEQ_D 
C_OLT_D 
C_ULT_D 
C_OLE_D 
C_ULE_D 
CVT_S_W 
CVT_D_W 
CVT_S_L 
CVT_D_L 
BC1EQZ 
BC1NEZ 
CMP_AF 
CMP_UN 
CMP_EQ 
CMP_UEQ 
CMP_LT 
CMP_ULT 
CMP_LE 
CMP_ULE 
CMP_SAF 
CMP_SUN 
CMP_SEQ 
CMP_SUEQ 
CMP_SSLT 
CMP_SSULT 
CMP_SLE 
CMP_SULE 
CMP_AT 
CMP_OR 
CMP_UNE 
CMP_NE 
CMP_UGE 
CMP_OGE 
CMP_UGT 
CMP_OGT 
CMP_SAT 
CMP_SOR 
CMP_SUNE 
CMP_SNE 
CMP_SUGE 
CMP_SOGE 
CMP_SUGT 
CMP_SOGT 
SEL 
SELEQZ_C 
SELNEZ_C 
MADD_D 
NULLSF 
SLL 
MOVCI 
SRL 
SRA 
SLLV 
SRLV 
SRAV 
JR 
JALR 
MOVZ 
MOVN 
BREAK 
MFHI 
CLZ_R6 
CLO_R6 
MFLO 
DSLLV 
DSRLV 
DSRAV 
MULT 
MULTU 
DIV 
DIVU 
DMULT 
DMULTU 
DDIV 
DDIVU 
ADD 
ADDU 
SUB 
SUBU 
AND 
OR 
XOR 
NOR 
SLT 
SLTU 
DADD 
DADDU 
DSUB 
DSUBU 
TGE 
TGEU 
TLT 
TLTU 
TEQ 
SELEQZ_S 
TNE 
SELNEZ_S 
DSLL 
DSRL 
DSRA 
DSLL32 
DSRL32 
DSRA32 
MUL_MUH 
MUL_MUH_U 
D_MUL_MUH 
D_MUL_MUH_U 
MUL_OP 
MUH_OP 
DIV_OP 
MOD_OP 
DIV_MOD 
DIV_MOD_U 
D_DIV_MOD 
D_DIV_MOD_U 
MUL 
CLZ 
CLO 
EXT 
DEXTM 
DEXTU 
DEXT 
INS 
DINSM 
DINSU 
DINS 
DSBH 
BLTZ 
BGEZ 
BLTZAL 
BGEZAL 
BGEZALL 
DAHI 
DATI 
MFC1 
DMFC1 
CFC1 
MFHC1 
MTC1 
DMTC1 
CTC1 
MTHC1 
BC1 
PS 
ROUND_L_S 
TRUNC_L_S 
CEIL_L_S 
FLOOR_L_S 
ROUND_W_S 
TRUNC_W_S 
CEIL_W_S 
FLOOR_W_S 
CVT_D_S 
CVT_W_S 
CVT_L_S 
CVT_PS_S 
ADD_D 
SUB_D 
MUL_D 
DIV_D 
SQRT_D 
ABS_D 
MOV_D 
NEG_D 
ROUND_L_D 
TRUNC_L_D 
CEIL_L_D 
FLOOR_L_D 
ROUND_W_D 
TRUNC_W_D 
CEIL_W_D 
FLOOR_W_D 
MIN 
MINA 
MAX 
MAXA 
CVT_S_D 
CVT_W_D 
CVT_L_D 
C_F_D 
C_UN_D 
C_EQ_D 
C_UEQ_D 
C_OLT_D 
C_ULT_D 
C_OLE_D 
C_ULE_D 
CVT_S_W 
CVT_D_W 
CVT_S_L 
CVT_D_L 
BC1EQZ 
BC1NEZ 
CMP_AF 
CMP_UN 
CMP_EQ 
CMP_UEQ 
CMP_LT 
CMP_ULT 
CMP_LE 
CMP_ULE 
CMP_SAF 
CMP_SUN 
CMP_SEQ 
CMP_SUEQ 
CMP_SSLT 
CMP_SSULT 
CMP_SLE 
CMP_SULE 
CMP_AT 
CMP_OR 
CMP_UNE 
CMP_NE 
CMP_UGE 
CMP_OGE 
CMP_UGT 
CMP_OGT 
CMP_SAT 
CMP_SOR 
CMP_SUNE 
CMP_SNE 
CMP_SUGE 
CMP_SOGE 
CMP_SUGT 
CMP_SOGT 
SEL 
SELEQZ_C 
SELNEZ_C 
MADD_D 
NULLSF 

Definition at line 370 of file constants-mips.h.

370  {
371  // SPECIAL Encoding of Function Field.
372  SLL = ((0 << 3) + 0),
373  MOVCI = ((0 << 3) + 1),
374  SRL = ((0 << 3) + 2),
375  SRA = ((0 << 3) + 3),
376  SLLV = ((0 << 3) + 4),
377  SRLV = ((0 << 3) + 6),
378  SRAV = ((0 << 3) + 7),
379 
380  JR = ((1 << 3) + 0),
381  JALR = ((1 << 3) + 1),
382  MOVZ = ((1 << 3) + 2),
383  MOVN = ((1 << 3) + 3),
384  BREAK = ((1 << 3) + 5),
385 
386  MFHI = ((2 << 3) + 0),
387  CLZ_R6 = ((2 << 3) + 0),
388  CLO_R6 = ((2 << 3) + 1),
389  MFLO = ((2 << 3) + 2),
390 
391  MULT = ((3 << 3) + 0),
392  MULTU = ((3 << 3) + 1),
393  DIV = ((3 << 3) + 2),
394  DIVU = ((3 << 3) + 3),
395 
396  ADD = ((4 << 3) + 0),
397  ADDU = ((4 << 3) + 1),
398  SUB = ((4 << 3) + 2),
399  SUBU = ((4 << 3) + 3),
400  AND = ((4 << 3) + 4),
401  OR = ((4 << 3) + 5),
402  XOR = ((4 << 3) + 6),
403  NOR = ((4 << 3) + 7),
404 
405  SLT = ((5 << 3) + 2),
406  SLTU = ((5 << 3) + 3),
407 
408  TGE = ((6 << 3) + 0),
409  TGEU = ((6 << 3) + 1),
410  TLT = ((6 << 3) + 2),
411  TLTU = ((6 << 3) + 3),
412  TEQ = ((6 << 3) + 4),
413  SELEQZ_S = ((6 << 3) + 5),
414  TNE = ((6 << 3) + 6),
415  SELNEZ_S = ((6 << 3) + 7),
416 
417  // Multiply integers in r6.
418  MUL_MUH = ((3 << 3) + 0), // MUL, MUH.
419  MUL_MUH_U = ((3 << 3) + 1), // MUL_U, MUH_U.
420 
421  MUL_OP = ((0 << 3) + 2),
422  MUH_OP = ((0 << 3) + 3),
423  DIV_OP = ((0 << 3) + 2),
424  MOD_OP = ((0 << 3) + 3),
425 
426  DIV_MOD = ((3 << 3) + 2),
427  DIV_MOD_U = ((3 << 3) + 3),
428 
429  // SPECIAL2 Encoding of Function Field.
430  MUL = ((0 << 3) + 2),
431  CLZ = ((4 << 3) + 0),
432  CLO = ((4 << 3) + 1),
433 
434  // SPECIAL3 Encoding of Function Field.
435  EXT = ((0 << 3) + 0),
436  INS = ((0 << 3) + 4),
437 
438  // REGIMM encoding of rt Field.
439  BLTZ = ((0 << 3) + 0) << 16,
440  BGEZ = ((0 << 3) + 1) << 16,
441  BLTZAL = ((2 << 3) + 0) << 16,
442  BGEZAL = ((2 << 3) + 1) << 16,
443  BGEZALL = ((2 << 3) + 3) << 16,
444 
445  // COP1 Encoding of rs Field.
446  MFC1 = ((0 << 3) + 0) << 21,
447  CFC1 = ((0 << 3) + 2) << 21,
448  MFHC1 = ((0 << 3) + 3) << 21,
449  MTC1 = ((0 << 3) + 4) << 21,
450  CTC1 = ((0 << 3) + 6) << 21,
451  MTHC1 = ((0 << 3) + 7) << 21,
452  BC1 = ((1 << 3) + 0) << 21,
453  S = ((2 << 3) + 0) << 21,
454  D = ((2 << 3) + 1) << 21,
455  W = ((2 << 3) + 4) << 21,
456  L = ((2 << 3) + 5) << 21,
457  PS = ((2 << 3) + 6) << 21,
458  // COP1 Encoding of Function Field When rs=S.
459  ROUND_L_S = ((1 << 3) + 0),
460  TRUNC_L_S = ((1 << 3) + 1),
461  CEIL_L_S = ((1 << 3) + 2),
462  FLOOR_L_S = ((1 << 3) + 3),
463  ROUND_W_S = ((1 << 3) + 4),
464  TRUNC_W_S = ((1 << 3) + 5),
465  CEIL_W_S = ((1 << 3) + 6),
466  FLOOR_W_S = ((1 << 3) + 7),
467  CVT_D_S = ((4 << 3) + 1),
468  CVT_W_S = ((4 << 3) + 4),
469  CVT_L_S = ((4 << 3) + 5),
470  CVT_PS_S = ((4 << 3) + 6),
471  // COP1 Encoding of Function Field When rs=D.
472  ADD_D = ((0 << 3) + 0),
473  SUB_D = ((0 << 3) + 1),
474  MUL_D = ((0 << 3) + 2),
475  DIV_D = ((0 << 3) + 3),
476  SQRT_D = ((0 << 3) + 4),
477  ABS_D = ((0 << 3) + 5),
478  MOV_D = ((0 << 3) + 6),
479  NEG_D = ((0 << 3) + 7),
480  ROUND_L_D = ((1 << 3) + 0),
481  TRUNC_L_D = ((1 << 3) + 1),
482  CEIL_L_D = ((1 << 3) + 2),
483  FLOOR_L_D = ((1 << 3) + 3),
484  ROUND_W_D = ((1 << 3) + 4),
485  TRUNC_W_D = ((1 << 3) + 5),
486  CEIL_W_D = ((1 << 3) + 6),
487  FLOOR_W_D = ((1 << 3) + 7),
488  MIN = ((3 << 3) + 4),
489  MINA = ((3 << 3) + 5),
490  MAX = ((3 << 3) + 6),
491  MAXA = ((3 << 3) + 7),
492  CVT_S_D = ((4 << 3) + 0),
493  CVT_W_D = ((4 << 3) + 4),
494  CVT_L_D = ((4 << 3) + 5),
495  C_F_D = ((6 << 3) + 0),
496  C_UN_D = ((6 << 3) + 1),
497  C_EQ_D = ((6 << 3) + 2),
498  C_UEQ_D = ((6 << 3) + 3),
499  C_OLT_D = ((6 << 3) + 4),
500  C_ULT_D = ((6 << 3) + 5),
501  C_OLE_D = ((6 << 3) + 6),
502  C_ULE_D = ((6 << 3) + 7),
503  // COP1 Encoding of Function Field When rs=W or L.
504  CVT_S_W = ((4 << 3) + 0),
505  CVT_D_W = ((4 << 3) + 1),
506  CVT_S_L = ((4 << 3) + 0),
507  CVT_D_L = ((4 << 3) + 1),
508  BC1EQZ = ((2 << 2) + 1) << 21,
509  BC1NEZ = ((3 << 2) + 1) << 21,
510  // COP1 CMP positive predicates Bit 5..4 = 00.
511  CMP_AF = ((0 << 3) + 0),
512  CMP_UN = ((0 << 3) + 1),
513  CMP_EQ = ((0 << 3) + 2),
514  CMP_UEQ = ((0 << 3) + 3),
515  CMP_LT = ((0 << 3) + 4),
516  CMP_ULT = ((0 << 3) + 5),
517  CMP_LE = ((0 << 3) + 6),
518  CMP_ULE = ((0 << 3) + 7),
519  CMP_SAF = ((1 << 3) + 0),
520  CMP_SUN = ((1 << 3) + 1),
521  CMP_SEQ = ((1 << 3) + 2),
522  CMP_SUEQ = ((1 << 3) + 3),
523  CMP_SSLT = ((1 << 3) + 4),
524  CMP_SSULT = ((1 << 3) + 5),
525  CMP_SLE = ((1 << 3) + 6),
526  CMP_SULE = ((1 << 3) + 7),
527  // COP1 CMP negative predicates Bit 5..4 = 01.
528  CMP_AT = ((2 << 3) + 0), // Reserved, not implemented.
529  CMP_OR = ((2 << 3) + 1),
530  CMP_UNE = ((2 << 3) + 2),
531  CMP_NE = ((2 << 3) + 3),
532  CMP_UGE = ((2 << 3) + 4), // Reserved, not implemented.
533  CMP_OGE = ((2 << 3) + 5), // Reserved, not implemented.
534  CMP_UGT = ((2 << 3) + 6), // Reserved, not implemented.
535  CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented.
536  CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented.
537  CMP_SOR = ((3 << 3) + 1),
538  CMP_SUNE = ((3 << 3) + 2),
539  CMP_SNE = ((3 << 3) + 3),
540  CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented.
541  CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented.
542  CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented.
543  CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented.
544 
545  SEL = ((2 << 3) + 0),
546  SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers.
547  SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers.
548  // COP1 Encoding of Function Field When rs=PS.
549  // COP1X Encoding of Function Field.
550  MADD_D = ((4 << 3) + 1),
551 
552  NULLSF = 0
553 };

◆ SecondaryField [2/2]

Enumerator
SLL 
MOVCI 
SRL 
SRA 
SLLV 
SRLV 
SRAV 
JR 
JALR 
MOVZ 
MOVN 
BREAK 
MFHI 
CLZ_R6 
CLO_R6 
MFLO 
MULT 
MULTU 
DIV 
DIVU 
ADD 
ADDU 
SUB 
SUBU 
AND 
OR 
XOR 
NOR 
SLT 
SLTU 
TGE 
TGEU 
TLT 
TLTU 
TEQ 
SELEQZ_S 
TNE 
SELNEZ_S 
MUL_MUH 
MUL_MUH_U 
MUL_OP 
MUH_OP 
DIV_OP 
MOD_OP 
DIV_MOD 
DIV_MOD_U 
MUL 
CLZ 
CLO 
EXT 
INS 
BLTZ 
BGEZ 
BLTZAL 
BGEZAL 
BGEZALL 
MFC1 
CFC1 
MFHC1 
MTC1 
CTC1 
MTHC1 
BC1 
PS 
ROUND_L_S 
TRUNC_L_S 
CEIL_L_S 
FLOOR_L_S 
ROUND_W_S 
TRUNC_W_S 
CEIL_W_S 
FLOOR_W_S 
CVT_D_S 
CVT_W_S 
CVT_L_S 
CVT_PS_S 
ADD_D 
SUB_D 
MUL_D 
DIV_D 
SQRT_D 
ABS_D 
MOV_D 
NEG_D 
ROUND_L_D 
TRUNC_L_D 
CEIL_L_D 
FLOOR_L_D 
ROUND_W_D 
TRUNC_W_D 
CEIL_W_D 
FLOOR_W_D 
MIN 
MINA 
MAX 
MAXA 
CVT_S_D 
CVT_W_D 
CVT_L_D 
C_F_D 
C_UN_D 
C_EQ_D 
C_UEQ_D 
C_OLT_D 
C_ULT_D 
C_OLE_D 
C_ULE_D 
CVT_S_W 
CVT_D_W 
CVT_S_L 
CVT_D_L 
BC1EQZ 
BC1NEZ 
CMP_AF 
CMP_UN 
CMP_EQ 
CMP_UEQ 
CMP_LT 
CMP_ULT 
CMP_LE 
CMP_ULE 
CMP_SAF 
CMP_SUN 
CMP_SEQ 
CMP_SUEQ 
CMP_SSLT 
CMP_SSULT 
CMP_SLE 
CMP_SULE 
CMP_AT 
CMP_OR 
CMP_UNE 
CMP_NE 
CMP_UGE 
CMP_OGE 
CMP_UGT 
CMP_OGT 
CMP_SAT 
CMP_SOR 
CMP_SUNE 
CMP_SNE 
CMP_SUGE 
CMP_SOGE 
CMP_SUGT 
CMP_SOGT 
SEL 
SELEQZ_C 
SELNEZ_C 
MADD_D 
NULLSF 
SLL 
MOVCI 
SRL 
SRA 
SLLV 
SRLV 
SRAV 
JR 
JALR 
MOVZ 
MOVN 
BREAK 
MFHI 
CLZ_R6 
CLO_R6 
MFLO 
DSLLV 
DSRLV 
DSRAV 
MULT 
MULTU 
DIV 
DIVU 
DMULT 
DMULTU 
DDIV 
DDIVU 
ADD 
ADDU 
SUB 
SUBU 
AND 
OR 
XOR 
NOR 
SLT 
SLTU 
DADD 
DADDU 
DSUB 
DSUBU 
TGE 
TGEU 
TLT 
TLTU 
TEQ 
SELEQZ_S 
TNE 
SELNEZ_S 
DSLL 
DSRL 
DSRA 
DSLL32 
DSRL32 
DSRA32 
MUL_MUH 
MUL_MUH_U 
D_MUL_MUH 
D_MUL_MUH_U 
MUL_OP 
MUH_OP 
DIV_OP 
MOD_OP 
DIV_MOD 
DIV_MOD_U 
D_DIV_MOD 
D_DIV_MOD_U 
MUL 
CLZ 
CLO 
EXT 
DEXTM 
DEXTU 
DEXT 
INS 
DINSM 
DINSU 
DINS 
DSBH 
BLTZ 
BGEZ 
BLTZAL 
BGEZAL 
BGEZALL 
DAHI 
DATI 
MFC1 
DMFC1 
CFC1 
MFHC1 
MTC1 
DMTC1 
CTC1 
MTHC1 
BC1 
PS 
ROUND_L_S 
TRUNC_L_S 
CEIL_L_S 
FLOOR_L_S 
ROUND_W_S 
TRUNC_W_S 
CEIL_W_S 
FLOOR_W_S 
CVT_D_S 
CVT_W_S 
CVT_L_S 
CVT_PS_S 
ADD_D 
SUB_D 
MUL_D 
DIV_D 
SQRT_D 
ABS_D 
MOV_D 
NEG_D 
ROUND_L_D 
TRUNC_L_D 
CEIL_L_D 
FLOOR_L_D 
ROUND_W_D 
TRUNC_W_D 
CEIL_W_D 
FLOOR_W_D 
MIN 
MINA 
MAX 
MAXA 
CVT_S_D 
CVT_W_D 
CVT_L_D 
C_F_D 
C_UN_D 
C_EQ_D 
C_UEQ_D 
C_OLT_D 
C_ULT_D 
C_OLE_D 
C_ULE_D 
CVT_S_W 
CVT_D_W 
CVT_S_L 
CVT_D_L 
BC1EQZ 
BC1NEZ 
CMP_AF 
CMP_UN 
CMP_EQ 
CMP_UEQ 
CMP_LT 
CMP_ULT 
CMP_LE 
CMP_ULE 
CMP_SAF 
CMP_SUN 
CMP_SEQ 
CMP_SUEQ 
CMP_SSLT 
CMP_SSULT 
CMP_SLE 
CMP_SULE 
CMP_AT 
CMP_OR 
CMP_UNE 
CMP_NE 
CMP_UGE 
CMP_OGE 
CMP_UGT 
CMP_OGT 
CMP_SAT 
CMP_SOR 
CMP_SUNE 
CMP_SNE 
CMP_SUGE 
CMP_SOGE 
CMP_SUGT 
CMP_SOGT 
SEL 
SELEQZ_C 
SELNEZ_C 
MADD_D 
NULLSF 

Definition at line 347 of file constants-mips64.h.

347  {
348  // SPECIAL Encoding of Function Field.
349  SLL = ((0 << 3) + 0),
350  MOVCI = ((0 << 3) + 1),
351  SRL = ((0 << 3) + 2),
352  SRA = ((0 << 3) + 3),
353  SLLV = ((0 << 3) + 4),
354  SRLV = ((0 << 3) + 6),
355  SRAV = ((0 << 3) + 7),
356 
357  JR = ((1 << 3) + 0),
358  JALR = ((1 << 3) + 1),
359  MOVZ = ((1 << 3) + 2),
360  MOVN = ((1 << 3) + 3),
361  BREAK = ((1 << 3) + 5),
362 
363  MFHI = ((2 << 3) + 0),
364  CLZ_R6 = ((2 << 3) + 0),
365  CLO_R6 = ((2 << 3) + 1),
366  MFLO = ((2 << 3) + 2),
367  DSLLV = ((2 << 3) + 4),
368  DSRLV = ((2 << 3) + 6),
369  DSRAV = ((2 << 3) + 7),
370 
371  MULT = ((3 << 3) + 0),
372  MULTU = ((3 << 3) + 1),
373  DIV = ((3 << 3) + 2),
374  DIVU = ((3 << 3) + 3),
375  DMULT = ((3 << 3) + 4),
376  DMULTU = ((3 << 3) + 5),
377  DDIV = ((3 << 3) + 6),
378  DDIVU = ((3 << 3) + 7),
379 
380  ADD = ((4 << 3) + 0),
381  ADDU = ((4 << 3) + 1),
382  SUB = ((4 << 3) + 2),
383  SUBU = ((4 << 3) + 3),
384  AND = ((4 << 3) + 4),
385  OR = ((4 << 3) + 5),
386  XOR = ((4 << 3) + 6),
387  NOR = ((4 << 3) + 7),
388 
389  SLT = ((5 << 3) + 2),
390  SLTU = ((5 << 3) + 3),
391  DADD = ((5 << 3) + 4),
392  DADDU = ((5 << 3) + 5),
393  DSUB = ((5 << 3) + 6),
394  DSUBU = ((5 << 3) + 7),
395 
396  TGE = ((6 << 3) + 0),
397  TGEU = ((6 << 3) + 1),
398  TLT = ((6 << 3) + 2),
399  TLTU = ((6 << 3) + 3),
400  TEQ = ((6 << 3) + 4),
401  SELEQZ_S = ((6 << 3) + 5),
402  TNE = ((6 << 3) + 6),
403  SELNEZ_S = ((6 << 3) + 7),
404 
405  DSLL = ((7 << 3) + 0),
406  DSRL = ((7 << 3) + 2),
407  DSRA = ((7 << 3) + 3),
408  DSLL32 = ((7 << 3) + 4),
409  DSRL32 = ((7 << 3) + 6),
410  DSRA32 = ((7 << 3) + 7),
411 
412  // Multiply integers in r6.
413  MUL_MUH = ((3 << 3) + 0), // MUL, MUH.
414  MUL_MUH_U = ((3 << 3) + 1), // MUL_U, MUH_U.
415  D_MUL_MUH = ((7 << 2) + 0), // DMUL, DMUH.
416  D_MUL_MUH_U = ((7 << 2) + 1), // DMUL_U, DMUH_U.
417 
418  MUL_OP = ((0 << 3) + 2),
419  MUH_OP = ((0 << 3) + 3),
420  DIV_OP = ((0 << 3) + 2),
421  MOD_OP = ((0 << 3) + 3),
422 
423  DIV_MOD = ((3 << 3) + 2),
424  DIV_MOD_U = ((3 << 3) + 3),
425  D_DIV_MOD = ((3 << 3) + 6),
426  D_DIV_MOD_U = ((3 << 3) + 7),
427 
428  // drotr in special4?
429 
430  // SPECIAL2 Encoding of Function Field.
431  MUL = ((0 << 3) + 2),
432  CLZ = ((4 << 3) + 0),
433  CLO = ((4 << 3) + 1),
434 
435  // SPECIAL3 Encoding of Function Field.
436  EXT = ((0 << 3) + 0),
437  DEXTM = ((0 << 3) + 1),
438  DEXTU = ((0 << 3) + 2),
439  DEXT = ((0 << 3) + 3),
440  INS = ((0 << 3) + 4),
441  DINSM = ((0 << 3) + 5),
442  DINSU = ((0 << 3) + 6),
443  DINS = ((0 << 3) + 7),
444 
445  DSBH = ((4 << 3) + 4),
446 
447  // REGIMM encoding of rt Field.
448  BLTZ = ((0 << 3) + 0) << 16,
449  BGEZ = ((0 << 3) + 1) << 16,
450  BLTZAL = ((2 << 3) + 0) << 16,
451  BGEZAL = ((2 << 3) + 1) << 16,
452  BGEZALL = ((2 << 3) + 3) << 16,
453  DAHI = ((0 << 3) + 6) << 16,
454  DATI = ((3 << 3) + 6) << 16,
455 
456  // COP1 Encoding of rs Field.
457  MFC1 = ((0 << 3) + 0) << 21,
458  DMFC1 = ((0 << 3) + 1) << 21,
459  CFC1 = ((0 << 3) + 2) << 21,
460  MFHC1 = ((0 << 3) + 3) << 21,
461  MTC1 = ((0 << 3) + 4) << 21,
462  DMTC1 = ((0 << 3) + 5) << 21,
463  CTC1 = ((0 << 3) + 6) << 21,
464  MTHC1 = ((0 << 3) + 7) << 21,
465  BC1 = ((1 << 3) + 0) << 21,
466  S = ((2 << 3) + 0) << 21,
467  D = ((2 << 3) + 1) << 21,
468  W = ((2 << 3) + 4) << 21,
469  L = ((2 << 3) + 5) << 21,
470  PS = ((2 << 3) + 6) << 21,
471  // COP1 Encoding of Function Field When rs=S.
472  ROUND_L_S = ((1 << 3) + 0),
473  TRUNC_L_S = ((1 << 3) + 1),
474  CEIL_L_S = ((1 << 3) + 2),
475  FLOOR_L_S = ((1 << 3) + 3),
476  ROUND_W_S = ((1 << 3) + 4),
477  TRUNC_W_S = ((1 << 3) + 5),
478  CEIL_W_S = ((1 << 3) + 6),
479  FLOOR_W_S = ((1 << 3) + 7),
480  CVT_D_S = ((4 << 3) + 1),
481  CVT_W_S = ((4 << 3) + 4),
482  CVT_L_S = ((4 << 3) + 5),
483  CVT_PS_S = ((4 << 3) + 6),
484  // COP1 Encoding of Function Field When rs=D.
485  ADD_D = ((0 << 3) + 0),
486  SUB_D = ((0 << 3) + 1),
487  MUL_D = ((0 << 3) + 2),
488  DIV_D = ((0 << 3) + 3),
489  SQRT_D = ((0 << 3) + 4),
490  ABS_D = ((0 << 3) + 5),
491  MOV_D = ((0 << 3) + 6),
492  NEG_D = ((0 << 3) + 7),
493  ROUND_L_D = ((1 << 3) + 0),
494  TRUNC_L_D = ((1 << 3) + 1),
495  CEIL_L_D = ((1 << 3) + 2),
496  FLOOR_L_D = ((1 << 3) + 3),
497  ROUND_W_D = ((1 << 3) + 4),
498  TRUNC_W_D = ((1 << 3) + 5),
499  CEIL_W_D = ((1 << 3) + 6),
500  FLOOR_W_D = ((1 << 3) + 7),
501  MIN = ((3 << 3) + 4),
502  MINA = ((3 << 3) + 5),
503  MAX = ((3 << 3) + 6),
504  MAXA = ((3 << 3) + 7),
505  CVT_S_D = ((4 << 3) + 0),
506  CVT_W_D = ((4 << 3) + 4),
507  CVT_L_D = ((4 << 3) + 5),
508  C_F_D = ((6 << 3) + 0),
509  C_UN_D = ((6 << 3) + 1),
510  C_EQ_D = ((6 << 3) + 2),
511  C_UEQ_D = ((6 << 3) + 3),
512  C_OLT_D = ((6 << 3) + 4),
513  C_ULT_D = ((6 << 3) + 5),
514  C_OLE_D = ((6 << 3) + 6),
515  C_ULE_D = ((6 << 3) + 7),
516  // COP1 Encoding of Function Field When rs=W or L.
517  CVT_S_W = ((4 << 3) + 0),
518  CVT_D_W = ((4 << 3) + 1),
519  CVT_S_L = ((4 << 3) + 0),
520  CVT_D_L = ((4 << 3) + 1),
521  BC1EQZ = ((2 << 2) + 1) << 21,
522  BC1NEZ = ((3 << 2) + 1) << 21,
523  // COP1 CMP positive predicates Bit 5..4 = 00.
524  CMP_AF = ((0 << 3) + 0),
525  CMP_UN = ((0 << 3) + 1),
526  CMP_EQ = ((0 << 3) + 2),
527  CMP_UEQ = ((0 << 3) + 3),
528  CMP_LT = ((0 << 3) + 4),
529  CMP_ULT = ((0 << 3) + 5),
530  CMP_LE = ((0 << 3) + 6),
531  CMP_ULE = ((0 << 3) + 7),
532  CMP_SAF = ((1 << 3) + 0),
533  CMP_SUN = ((1 << 3) + 1),
534  CMP_SEQ = ((1 << 3) + 2),
535  CMP_SUEQ = ((1 << 3) + 3),
536  CMP_SSLT = ((1 << 3) + 4),
537  CMP_SSULT = ((1 << 3) + 5),
538  CMP_SLE = ((1 << 3) + 6),
539  CMP_SULE = ((1 << 3) + 7),
540  // COP1 CMP negative predicates Bit 5..4 = 01.
541  CMP_AT = ((2 << 3) + 0), // Reserved, not implemented.
542  CMP_OR = ((2 << 3) + 1),
543  CMP_UNE = ((2 << 3) + 2),
544  CMP_NE = ((2 << 3) + 3),
545  CMP_UGE = ((2 << 3) + 4), // Reserved, not implemented.
546  CMP_OGE = ((2 << 3) + 5), // Reserved, not implemented.
547  CMP_UGT = ((2 << 3) + 6), // Reserved, not implemented.
548  CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented.
549  CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented.
550  CMP_SOR = ((3 << 3) + 1),
551  CMP_SUNE = ((3 << 3) + 2),
552  CMP_SNE = ((3 << 3) + 3),
553  CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented.
554  CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented.
555  CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented.
556  CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented.
557 
558  SEL = ((2 << 3) + 0),
559  SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers.
560  SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers.
561 
562  // COP1 Encoding of Function Field When rs=PS.
563  // COP1X Encoding of Function Field.
564  MADD_D = ((4 << 3) + 1),
565 
566  NULLSF = 0
567 };

◆ SemiSpaceId

Enumerator
kFromSpace 
kToSpace 

Definition at line 1976 of file spaces.h.

1976 { kFromSpace = 0, kToSpace = 1 };

◆ SeqStringSetCharCheckIndexType

Enumerator
kIndexIsSmi 
kIndexIsInteger32 

Definition at line 130 of file macro-assembler-arm64.h.

◆ SetPropertyMode

Enumerator
SET_PROPERTY 
DEFINE_PROPERTY 

Definition at line 1550 of file objects.h.

1550  {
1551  SET_PROPERTY,
1553 };
@ DEFINE_PROPERTY
Definition: objects.h:1552

◆ Shift

Enumerator
NO_SHIFT 
LSL 
LSR 
ASR 
ROR 

Definition at line 332 of file constants-arm64.h.

332  {
333  NO_SHIFT = -1,
334  LSL = 0x0,
335  LSR = 0x1,
336  ASR = 0x2,
337  ROR = 0x3
338 };

◆ ShiftOp

Enumerator
LSL 
LSR 
ASR 
ROR 
RRX 
kNumberOfShifts 

Definition at line 228 of file constants-arm.h.

228  {
229  LSL = 0 << 5, // Logical shift left.
230  LSR = 1 << 5, // Logical shift right.
231  ASR = 2 << 5, // Arithmetic shift right.
232  ROR = 3 << 5, // Rotate right.
233 
234  // RRX is encoded as ROR with shift_imm == 0.
235  // Use a special code to make the distinction. The RRX ShiftOp is only used
236  // as an argument, and will never actually be encoded. The Assembler will
237  // detect it and emit the correct ROR shift operand with shift_imm == 0.
238  RRX = -1,
239  kNumberOfShifts = 4
240 };

◆ Signedness

Enumerator
kSigned 
kUnsigned 

Definition at line 772 of file globals.h.

772 { kSigned, kUnsigned };

◆ SimpleTransitionFlag

Enumerator
SIMPLE_TRANSITION 
FULL_TRANSITION 

Definition at line 277 of file objects.h.

277  {
280 };
@ FULL_TRANSITION
Definition: objects.h:279
@ SIMPLE_TRANSITION
Definition: objects.h:278

◆ SkipListRebuildingMode

Enumerator
REBUILD_SKIP_LIST 
IGNORE_SKIP_LIST 

Definition at line 3271 of file mark-compact.cc.

◆ SmiCheck [1/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 40 of file macro-assembler-arm.h.

◆ SmiCheck [2/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 116 of file macro-assembler-arm64.h.

◆ SmiCheck [3/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 21 of file macro-assembler-ia32.h.

◆ SmiCheck [4/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 73 of file macro-assembler-mips.h.

◆ SmiCheck [5/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 79 of file macro-assembler-mips64.h.

◆ SmiCheck [6/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 32 of file macro-assembler-x64.h.

◆ SmiCheck [7/7]

Enumerator
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 
INLINE_SMI_CHECK 
OMIT_SMI_CHECK 

Definition at line 21 of file macro-assembler-x87.h.

◆ SmiCheckType

Enumerator
DONT_DO_SMI_CHECK 
DO_SMI_CHECK 

Definition at line 639 of file globals.h.

639  {
642 };
@ DONT_DO_SMI_CHECK
Definition: globals.h:640
@ DO_SMI_CHECK
Definition: globals.h:641

◆ SmiOperationConstraint

Enumerator
PRESERVE_SOURCE_REGISTER 
BAILOUT_ON_NO_OVERFLOW 
BAILOUT_ON_OVERFLOW 
NUMBER_OF_CONSTRAINTS 

Definition at line 38 of file macro-assembler-x64.h.

◆ SoftwareInterruptCodes [1/3]

Enumerator
kCallRtRedirected 
kBreakpoint 
kStopCode 
call_rt_redirected 
call_rt_redirected 

Definition at line 333 of file constants-arm.h.

333  {
334  // transition to C code
335  kCallRtRedirected= 0x10,
336  // break point
337  kBreakpoint= 0x20,
338  // stop
339  kStopCode = 1 << 23
340 };

◆ SoftwareInterruptCodes [2/3]

Enumerator
kCallRtRedirected 
kBreakpoint 
kStopCode 
call_rt_redirected 
call_rt_redirected 

Definition at line 231 of file constants-mips.h.

231  {
232  // Transition to C code.
233  call_rt_redirected = 0xfffff
234 };

◆ SoftwareInterruptCodes [3/3]

Enumerator
kCallRtRedirected 
kBreakpoint 
kStopCode 
call_rt_redirected 
call_rt_redirected 

Definition at line 193 of file constants-mips64.h.

193  {
194  // Transition to C code.
195  call_rt_redirected = 0xfffff
196 };

◆ SRegister

Enumerator
CPSR 
SPSR 

Definition at line 221 of file constants-arm.h.

221  {
222  CPSR = 0 << 22,
223  SPSR = 1 << 22
224 };

◆ SRegisterField

Enumerator
CPSR_c 
CPSR_x 
CPSR_s 
CPSR_f 
SPSR_c 
SPSR_x 
SPSR_s 
SPSR_f 

Definition at line 244 of file constants-arm.h.

244  {
245  CPSR_c = CPSR | 1 << 16,
246  CPSR_x = CPSR | 1 << 17,
247  CPSR_s = CPSR | 1 << 18,
248  CPSR_f = CPSR | 1 << 19,
249  SPSR_c = SPSR | 1 << 16,
250  SPSR_x = SPSR | 1 << 17,
251  SPSR_s = SPSR | 1 << 18,
252  SPSR_f = SPSR | 1 << 19
253 };

◆ StackArgumentsAccessorReceiverMode

Enumerator
ARGUMENTS_CONTAIN_RECEIVER 
ARGUMENTS_DONT_CONTAIN_RECEIVER 

Definition at line 48 of file codegen-x64.h.

◆ StateTag

Enumerator
JS 
GC 
COMPILER 
OTHER 
EXTERNAL 
IDLE 

Definition at line 556 of file globals.h.

556  {
557  JS,
558  GC,
559  COMPILER,
560  OTHER,
561  EXTERNAL,
562  IDLE
563 };

◆ StatusFlags

Enumerator
NoFlag 
NFlag 
ZFlag 
CFlag 
VFlag 
NZFlag 
NCFlag 
NVFlag 
ZCFlag 
ZVFlag 
CVFlag 
NZCFlag 
NZVFlag 
NCVFlag 
ZCVFlag 
NZCVFlag 
FPEqualFlag 
FPLessThanFlag 
FPGreaterThanFlag 
FPUnorderedFlag 

Definition at line 305 of file constants-arm64.h.

305  {
306  NoFlag = 0,
307 
308  // Derive the flag combinations from the system register bit descriptions.
309  NFlag = N_mask,
310  ZFlag = Z_mask,
311  CFlag = C_mask,
312  VFlag = V_mask,
313  NZFlag = NFlag | ZFlag,
314  NCFlag = NFlag | CFlag,
315  NVFlag = NFlag | VFlag,
316  ZCFlag = ZFlag | CFlag,
317  ZVFlag = ZFlag | VFlag,
318  CVFlag = CFlag | VFlag,
319  NZCFlag = NFlag | ZFlag | CFlag,
320  NZVFlag = NFlag | ZFlag | VFlag,
321  NCVFlag = NFlag | CFlag | VFlag,
322  ZCVFlag = ZFlag | CFlag | VFlag,
323  NZCVFlag = NFlag | ZFlag | CFlag | VFlag,
324 
325  // Floating-point comparison results.
330 };

◆ StepAction

Enumerator
StepNone 
StepOut 
StepNext 
StepIn 
StepMin 
StepInMin 

Definition at line 32 of file debug.h.

32  {
33  StepNone = -1, // Stepping not prepared.
34  StepOut = 0, // Step out of the current function.
35  StepNext = 1, // Step to the next statement in the current function.
36  StepIn = 2, // Step into new functions invoked or the next statement
37  // in the current function.
38  StepMin = 3, // Perform a minimum step in the current function.
39  StepInMin = 4 // Step into new functions invoked or perform a minimum step
40  // in the current function.
41 };
@ StepMin
Definition: debug.h:38
@ StepNext
Definition: debug.h:35
@ StepNone
Definition: debug.h:33
@ StepInMin
Definition: debug.h:39
@ StepIn
Definition: debug.h:36
@ StepOut
Definition: debug.h:34

◆ StoreBufferEvent

Enumerator
kStoreBufferFullEvent 
kStoreBufferStartScanningPagesEvent 
kStoreBufferScanningPageEvent 

Definition at line 493 of file globals.h.

◆ StoreFieldOrKeyedMode

Enumerator
INITIALIZING_STORE 
STORE_TO_INITIALIZED_ENTRY 

Definition at line 6796 of file hydrogen-instructions.h.

6796  {
6797  // The entry could be either previously initialized or not.
6799  // At the time of this store it is guaranteed that the entry is already
6800  // initialized.
6802 };

◆ StoreMode

Enumerator
ALLOW_AS_CONSTANT 
FORCE_FIELD 

Definition at line 239 of file objects.h.

239  {
242 };
@ ALLOW_AS_CONSTANT
Definition: objects.h:240

◆ StrictMode

Enumerator
SLOPPY 
STRICT 

Definition at line 219 of file globals.h.

219 { SLOPPY, STRICT };

◆ StringAddFlags

Enumerator
STRING_ADD_CHECK_NONE 
STRING_ADD_CHECK_LEFT 
STRING_ADD_CHECK_RIGHT 
STRING_ADD_CHECK_BOTH 

Definition at line 1210 of file code-stubs.h.

1210  {
1211  // Omit both parameter checks.
1213  // Check left parameter.
1214  STRING_ADD_CHECK_LEFT = 1 << 0,
1215  // Check right parameter.
1216  STRING_ADD_CHECK_RIGHT = 1 << 1,
1217  // Check both parameters.
1219 };
@ STRING_ADD_CHECK_LEFT
Definition: code-stubs.h:1214
@ STRING_ADD_CHECK_NONE
Definition: code-stubs.h:1212
@ STRING_ADD_CHECK_BOTH
Definition: code-stubs.h:1218
@ STRING_ADD_CHECK_RIGHT
Definition: code-stubs.h:1216

◆ StringIndexFlags

Enumerator
STRING_INDEX_IS_NUMBER 
STRING_INDEX_IS_ARRAY_INDEX 

Definition at line 1588 of file code-stubs.h.

1588  {
1589  // Accepts smis or heap numbers.
1591 
1592  // Accepts smis or heap numbers that are valid array indices
1593  // (ECMA-262 15.4). Invalid indices are reported as being out of
1594  // range.
1596 };
@ STRING_INDEX_IS_NUMBER
Definition: code-stubs.h:1590
@ STRING_INDEX_IS_ARRAY_INDEX
Definition: code-stubs.h:1595

◆ StringRepresentationTag

Enumerator
kSeqStringTag 
kConsStringTag 
kExternalStringTag 
kSlicedStringTag 

Definition at line 562 of file objects.h.

562  {
563  kSeqStringTag = 0x0,
564  kConsStringTag = 0x1,
565  kExternalStringTag = 0x2,
566  kSlicedStringTag = 0x3
567 };

◆ StubFunctionMode

Enumerator
NOT_JS_FUNCTION_STUB_MODE 
JS_FUNCTION_STUB_MODE 

Definition at line 350 of file code-stubs.h.

◆ SweepingMode

Enumerator
SWEEP_ONLY 
SWEEP_AND_VISIT_LIVE_OBJECTS 

Definition at line 3268 of file mark-compact.cc.

◆ SystemHint

Enumerator
NOP 
YIELD 
WFE 
WFI 
SEV 
SEVL 

Definition at line 352 of file constants-arm64.h.

352  {
353  NOP = 0,
354  YIELD = 1,
355  WFE = 2,
356  WFI = 3,
357  SEV = 4,
358  SEVL = 5
359 };

◆ SystemHintOp

Enumerator
SystemHintFixed 
SystemHintFMask 
SystemHintMask 
HINT 

Definition at line 667 of file constants-arm64.h.

667  {
668  SystemHintFixed = 0xD503201F,
669  SystemHintFMask = 0xFFFFF01F,
670  SystemHintMask = 0xFFFFF01F,
671  HINT = SystemHintFixed | 0x00000000
672 };

◆ SystemOp

Enumerator
SystemFixed 
SystemFMask 

Definition at line 654 of file constants-arm64.h.

654  {
655  SystemFixed = 0xD5000000,
656  SystemFMask = 0xFFC00000
657 };

◆ SystemRegister

Enumerator
NZCV 
FPCR 

Definition at line 378 of file constants-arm64.h.

378  {
379  NZCV = ((0x1 << SysO0_offset) |
380  (0x3 << SysOp1_offset) |
381  (0x4 << CRn_offset) |
382  (0x2 << CRm_offset) |
383  (0x0 << SysOp2_offset)) >> ImmSystemRegister_offset,
384  FPCR = ((0x1 << SysO0_offset) |
385  (0x3 << SysOp1_offset) |
386  (0x4 << CRn_offset) |
387  (0x4 << CRm_offset) |
388  (0x0 << SysOp2_offset)) >> ImmSystemRegister_offset
389 };

◆ SystemSysRegOp

Enumerator
SystemSysRegFixed 
SystemSysRegFMask 
SystemSysRegMask 
MRS 
MSR 

Definition at line 659 of file constants-arm64.h.

659  {
660  SystemSysRegFixed = 0xD5100000,
661  SystemSysRegFMask = 0xFFD00000,
662  SystemSysRegMask = 0xFFF00000,
663  MRS = SystemSysRegFixed | 0x00200000,
664  MSR = SystemSysRegFixed | 0x00000000
665 };

◆ TaggingMode [1/3]

Enumerator
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 

Definition at line 31 of file macro-assembler-arm.h.

31  {
32  // Tag the result.
33  TAG_RESULT,
34  // Don't tag
36 };

◆ TaggingMode [2/3]

Enumerator
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 

Definition at line 38 of file macro-assembler-mips.h.

38  {
39  // Tag the result.
40  TAG_RESULT,
41  // Don't tag
43 };

◆ TaggingMode [3/3]

Enumerator
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 
TAG_RESULT 
DONT_TAG_RESULT 

Definition at line 38 of file macro-assembler-mips64.h.

38  {
39  // Tag the result.
40  TAG_RESULT,
41  // Don't tag
43 };

◆ TargetAddressStorageMode [1/2]

Enumerator
CAN_INLINE_TARGET_ADDRESS 
NEVER_INLINE_TARGET_ADDRESS 
CAN_INLINE_TARGET_ADDRESS 
NEVER_INLINE_TARGET_ADDRESS 

Definition at line 68 of file macro-assembler-arm.h.

◆ TargetAddressStorageMode [2/2]

Enumerator
CAN_INLINE_TARGET_ADDRESS 
NEVER_INLINE_TARGET_ADDRESS 
CAN_INLINE_TARGET_ADDRESS 
NEVER_INLINE_TARGET_ADDRESS 

Definition at line 122 of file macro-assembler-arm64.h.

◆ TestBranchOp

Enumerator
TestBranchFixed 
TestBranchFMask 
TestBranchMask 
TBZ 
TBNZ 

Definition at line 633 of file constants-arm64.h.

633  {
634  TestBranchFixed = 0x36000000,
635  TestBranchFMask = 0x7E000000,
636  TestBranchMask = 0x7F000000,
637  TBZ = TestBranchFixed | 0x00000000,
638  TBNZ = TestBranchFixed | 0x01000000
639 };

◆ TransitionFlag

Enumerator
INSERT_TRANSITION 
OMIT_TRANSITION 

Definition at line 262 of file objects.h.

262  {
265 };
@ INSERT_TRANSITION
Definition: objects.h:263
@ OMIT_TRANSITION
Definition: objects.h:264

◆ TypeCode

Enumerator
UNCLASSIFIED 
C_BUILTIN 
BUILTIN 
RUNTIME_FUNCTION 
IC_UTILITY 
STATS_COUNTER 
TOP_ADDRESS 
ACCESSOR 
STUB_CACHE_TABLE 
RUNTIME_ENTRY 
LAZY_DEOPTIMIZATION 

Definition at line 19 of file serialize.h.

19  {
20  UNCLASSIFIED, // One-of-a-kind references.
21  C_BUILTIN,
22  BUILTIN,
24  IC_UTILITY,
27  ACCESSOR,
31 };
#define RUNTIME_FUNCTION(Name)
Definition: arguments.h:296
#define BUILTIN(name)
Definition: builtins.cc:122
@ LAZY_DEOPTIMIZATION
Definition: serialize.h:30
@ STUB_CACHE_TABLE
Definition: serialize.h:28
#define RUNTIME_ENTRY(name, nargs, ressize)

◆ TypedArraySetResultCodes

Enumerator
TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE 
TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING 
TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING 
TYPED_ARRAY_SET_NON_TYPED_ARRAY 

Definition at line 420 of file runtime-typedarray.cc.

420  {
421  // Set from typed array of the same type.
422  // This is processed by TypedArraySetFastCases
424  // Set from typed array of the different type, overlapping in memory.
426  // Set from typed array of the different type, non-overlapping.
428  // Set from non-typed array.
430 };
@ TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE
@ TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING
@ TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING

◆ TypeofState [1/4]

Enumerator
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 

Definition at line 15 of file codegen-arm.h.

@ NOT_INSIDE_TYPEOF
Definition: codegen.h:46
@ INSIDE_TYPEOF
Definition: codegen.h:46

◆ TypeofState [2/4]

Enumerator
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 

Definition at line 17 of file codegen-mips.h.

◆ TypeofState [3/4]

Enumerator
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 

Definition at line 17 of file codegen-mips64.h.

◆ TypeofState [4/4]

Enumerator
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 
INSIDE_TYPEOF 
NOT_INSIDE_TYPEOF 

Definition at line 15 of file codegen-x64.h.

◆ UnallocatedOp

Enumerator
UnallocatedFixed 
UnallocatedFMask 

Definition at line 1245 of file constants-arm64.h.

1245  {
1246  UnallocatedFixed = 0x00000000,
1247  UnallocatedFMask = 0x00000000
1248 };

◆ UnconditionalBranchOp

Enumerator
UnconditionalBranchFixed 
UnconditionalBranchFMask 
UnconditionalBranchMask 
BL 

Definition at line 601 of file constants-arm64.h.

601  {
602  UnconditionalBranchFixed = 0x14000000,
603  UnconditionalBranchFMask = 0x7C000000,
604  UnconditionalBranchMask = 0xFC000000,
605  B = UnconditionalBranchFixed | 0x00000000,
606  BL = UnconditionalBranchFixed | 0x80000000
607 };

◆ UnconditionalBranchToRegisterOp

Enumerator
UnconditionalBranchToRegisterFixed 
UnconditionalBranchToRegisterFMask 
UnconditionalBranchToRegisterMask 
BR 
BLR 
RET 

Definition at line 610 of file constants-arm64.h.

◆ UnimplementedOp

Enumerator
UnimplementedFixed 
UnimplementedFMask 

Definition at line 1240 of file constants-arm64.h.

1240  {
1241  UnimplementedFixed = 0x00000000,
1242  UnimplementedFMask = 0x00000000
1243 };

◆ UntagMode

Enumerator
kNotSpeculativeUntag 
kSpeculativeUntag 

Definition at line 126 of file macro-assembler-arm64.h.

◆ VariableMode

Enumerator
VAR 
CONST_LEGACY 
LET 
CONST 
MODULE 
INTERNAL 
TEMPORARY 
DYNAMIC 
DYNAMIC_GLOBAL 
DYNAMIC_LOCAL 

Definition at line 667 of file globals.h.

667  {
668  // User declared variables:
669  VAR, // declared via 'var', and 'function' declarations
670 
671  CONST_LEGACY, // declared via legacy 'const' declarations
672 
673  LET, // declared via 'let' declarations (first lexical)
674 
675  CONST, // declared via 'const' declarations
676 
677  MODULE, // declared via 'module' declaration (last lexical)
678 
679  // Variables introduced by the compiler:
680  INTERNAL, // like VAR, but not user-visible (may or may not
681  // be in a context)
682 
683  TEMPORARY, // temporary variables (not user-visible), stack-allocated
684  // unless the scope as a whole has forced context allocation
685 
686  DYNAMIC, // always require dynamic lookup (we don't know
687  // the declaration)
688 
689  DYNAMIC_GLOBAL, // requires dynamic lookup, but we know that the
690  // variable is global unless it has been shadowed
691  // by an eval-introduced variable
692 
693  DYNAMIC_LOCAL // requires dynamic lookup, but we know that the
694  // variable is local and where it is unless it
695  // has been shadowed by an eval-introduced
696  // variable
697 };
@ DYNAMIC_GLOBAL
Definition: globals.h:689
@ DYNAMIC_LOCAL
Definition: globals.h:693
@ CONST_LEGACY
Definition: globals.h:671

◆ VFPConversionMode

Enumerator
kFPSCRRounding 
kDefaultRoundToZero 

Definition at line 354 of file constants-arm.h.

354  {
355  kFPSCRRounding = 0,
357 };

◆ VFPRegPrecision

Enumerator
kSinglePrecision 
kDoublePrecision 

Definition at line 347 of file constants-arm.h.

347  {
348  kSinglePrecision = 0,
349  kDoublePrecision = 1
350 };

◆ VFPRoundingMode

Enumerator
RN 
RP 
RM 
RZ 
kRoundToNearest 
kRoundToPlusInf 
kRoundToMinusInf 
kRoundToZero 

Definition at line 376 of file constants-arm.h.

376  {
377  RN = 0 << 22, // Round to Nearest.
378  RP = 1 << 22, // Round towards Plus Infinity.
379  RM = 2 << 22, // Round towards Minus Infinity.
380  RZ = 3 << 22, // Round towards zero.
381 
382  // Aliases.
386  kRoundToZero = RZ
387 };

◆ VisitMode

Enumerator
VISIT_ALL 
VISIT_ALL_IN_SCAVENGE 
VISIT_ALL_IN_SWEEP_NEWSPACE 
VISIT_ONLY_STRONG 

Definition at line 393 of file globals.h.

393  {
394  VISIT_ALL,
398 };
@ VISIT_ONLY_STRONG
Definition: globals.h:397
@ VISIT_ALL_IN_SWEEP_NEWSPACE
Definition: globals.h:396
@ VISIT_ALL_IN_SCAVENGE
Definition: globals.h:395

◆ WriteBarrierMode

Enumerator
SKIP_WRITE_BARRIER 
UPDATE_WRITE_BARRIER 

Definition at line 235 of file objects.h.

Function Documentation

◆ AbortIncrementalMarkingAndCollectGarbage()

static bool v8::internal::AbortIncrementalMarkingAndCollectGarbage ( Heap heap,
AllocationSpace  space,
const char *  gc_reason = NULL 
)
static

Definition at line 911 of file heap.cc.

912  {
913  heap->mark_compact_collector()->SetFlags(Heap::kAbortIncrementalMarkingMask);
914  bool result = heap->CollectGarbage(space, gc_reason);
915  heap->mark_compact_collector()->SetFlags(Heap::kNoGCFlags);
916  return result;
917 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi space(in MBytes)

References v8::internal::Heap::CollectGarbage(), v8::internal::Heap::kAbortIncrementalMarkingMask, v8::internal::Heap::kNoGCFlags, v8::internal::Heap::mark_compact_collector(), v8::internal::MarkCompactCollector::SetFlags(), and space().

Referenced by v8::internal::Heap::ReserveSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Abs()

template<typename T >
T v8::internal::Abs ( T  a)

Definition at line 153 of file utils.h.

153  {
154  return a < 0 ? -a : a;
155 }

Referenced by WhichPowerOf2Abs().

+ Here is the caller graph for this function:

◆ AbsMinus1()

static int32_t v8::internal::AbsMinus1 ( int32_t  a)
static

Definition at line 1938 of file hydrogen-instructions.cc.

1938 { return a < 0 ? -(a + 1) : (a - 1); }

◆ ACCESSORS() [1/8]

v8::internal::ACCESSORS ( AccessorInfo  ,
expected_receiver_type  ,
Object  ,
kExpectedReceiverTypeOffset   
)

◆ ACCESSORS() [2/8]

kSerializedDataOffset v8::internal::ACCESSORS ( DeclaredAccessorInfo  ,
descriptor  ,
DeclaredAccessorDescriptor  ,
kDescriptorOffset   
)

◆ ACCESSORS() [3/8]

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset v8::internal::ACCESSORS ( FunctionTemplateInfo  ,
access_check_info  ,
Object  ,
kAccessCheckInfoOffset   
)

◆ ACCESSORS() [4/8]

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset v8::internal::ACCESSORS ( FunctionTemplateInfo  ,
instance_template  ,
Object  ,
kInstanceTemplateOffset   
)

◆ ACCESSORS() [5/8]

kSerializedDataOffset kPrototypeTemplateOffset v8::internal::ACCESSORS ( FunctionTemplateInfo  ,
named_property_handler  ,
Object  ,
kNamedPropertyHandlerOffset   
)

◆ ACCESSORS() [6/8]

v8::internal::ACCESSORS ( JSFunction  ,
prototype_or_initial_map  ,
Object  ,
kPrototypeOrInitialMapOffset   
)

Definition at line 5901 of file objects-inl.h.

5905  {
5906  return Map::cast(prototype_or_initial_map());
5907 }

◆ ACCESSORS() [7/8]

kFeedbackVectorOffset v8::internal::ACCESSORS ( SharedFunctionInfo  ,
instance_class_name  ,
Object  ,
kInstanceClassNameOffset   
)

◆ ACCESSORS() [8/8]

v8::internal::ACCESSORS ( SharedFunctionInfo  ,
optimized_code_map  ,
Object  ,
kOptimizedCodeMapOffset   
)

◆ ACCESSORS_TO_SMI() [1/2]

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset v8::internal::ACCESSORS_TO_SMI ( AllocationSite  ,
pretenure_create_count  ,
kPretenureCreateCountOffset   
)

◆ ACCESSORS_TO_SMI() [2/2]

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset kDependentCodeOffset v8::internal::ACCESSORS_TO_SMI ( Script  ,
eval_from_instructions_offset  ,
kEvalFrominstructionsOffsetOffset   
)

Definition at line 5368 of file objects-inl.h.

5375  {
5376  return BooleanBit::get(flags(), kCompilationTypeBit) ?
5377  COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
5378 }

References v8::internal::anonymous_namespace{flags.cc}::flags, and v8::internal::BooleanBit::get().

+ Here is the call graph for this function:

◆ AddClass()

static void v8::internal::AddClass ( const int elmv,
int  elmc,
ZoneList< CharacterRange > *  ranges,
Zone zone 
)
static

Definition at line 5201 of file jsregexp.cc.

5204  {
5205  elmc--;
5206  DCHECK(elmv[elmc] == 0x10000);
5207  for (int i = 0; i < elmc; i += 2) {
5208  DCHECK(elmv[i] < elmv[i + 1]);
5209  ranges->Add(CharacterRange(elmv[i], elmv[i + 1] - 1), zone);
5210  }
5211 }
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::List< T, AllocationPolicy >::Add(), and DCHECK.

Referenced by v8::internal::CharacterRange::AddClassEscape().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddClassNegated()

static void v8::internal::AddClassNegated ( const int elmv,
int  elmc,
ZoneList< CharacterRange > *  ranges,
Zone zone 
)
static

Definition at line 5214 of file jsregexp.cc.

5217  {
5218  elmc--;
5219  DCHECK(elmv[elmc] == 0x10000);
5220  DCHECK(elmv[0] != 0x0000);
5221  DCHECK(elmv[elmc-1] != String::kMaxUtf16CodeUnit);
5222  uc16 last = 0x0000;
5223  for (int i = 0; i < elmc; i += 2) {
5224  DCHECK(last <= elmv[i] - 1);
5225  DCHECK(elmv[i] < elmv[i + 1]);
5226  ranges->Add(CharacterRange(last, elmv[i] - 1), zone);
5227  last = elmv[i + 1];
5228  }
5229  ranges->Add(CharacterRange(last, String::kMaxUtf16CodeUnit), zone);
5230 }
uint16_t uc16
Definition: globals.h:184

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, and v8::internal::String::kMaxUtf16CodeUnit.

Referenced by v8::internal::CharacterRange::AddClassEscape().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddCounter()

static void v8::internal::AddCounter ( v8::Isolate isolate,
v8::Local< v8::Object object,
StatsCounter counter,
const char *  name 
)
static

Definition at line 22 of file statistics-extension.cc.

25  {
26  if (counter->Enabled()) {
27  object->Set(v8::String::NewFromUtf8(isolate, name),
28  v8::Number::New(isolate, *counter->GetInternalPointer()));
29  }
30 }
static Local< Number > New(Isolate *isolate, double value)
Definition: api.cc:6268
static Local< String > NewFromUtf8(Isolate *isolate, const char *data, NewStringType type=kNormalString, int length=-1)
Allocates a new string from UTF-8 data.
Definition: api.cc:5447
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name

References v8::internal::StatsCounter::Enabled(), v8::internal::StatsCounter::GetInternalPointer(), name, v8::Number::New(), and v8::String::NewFromUtf8().

+ Here is the call graph for this function:

◆ AddIsolateIdIfNeeded()

static void v8::internal::AddIsolateIdIfNeeded ( OStream os,
Isolate isolate 
)
static

Definition at line 1788 of file log.cc.

1789  {
1790  if (FLAG_logfile_per_isolate) os << "isolate-" << isolate << "-";
1791 }

Referenced by PrepareLogFileName().

+ Here is the caller graph for this function:

◆ AddIsSafe()

static bool v8::internal::AddIsSafe ( int  x,
int  y 
)
static

Definition at line 599 of file types.cc.

599  {
600  return x >= 0 ?
601  y <= std::numeric_limits<int>::max() - x :
603 }
static int min(int a, int b)
Definition: liveedit.cc:273

Referenced by v8::internal::TypeImpl< Config >::Union().

+ Here is the caller graph for this function:

◆ AddMissingElementsTransitions()

static Handle<Map> v8::internal::AddMissingElementsTransitions ( Handle< Map map,
ElementsKind  to_kind 
)
static

Definition at line 3294 of file objects.cc.

3295  {
3296  DCHECK(IsTransitionElementsKind(map->elements_kind()));
3297 
3298  Handle<Map> current_map = map;
3299 
3300  ElementsKind kind = map->elements_kind();
3301  if (!map->is_prototype_map()) {
3302  while (kind != to_kind && !IsTerminalElementsKind(kind)) {
3303  kind = GetNextTransitionElementsKind(kind);
3304  current_map =
3305  Map::CopyAsElementsKind(current_map, kind, INSERT_TRANSITION);
3306  }
3307  }
3308 
3309  // In case we are exiting the fast elements kind system, just add the map in
3310  // the end.
3311  if (kind != to_kind) {
3312  current_map = Map::CopyAsElementsKind(
3313  current_map, to_kind, INSERT_TRANSITION);
3314  }
3315 
3316  DCHECK(current_map->elements_kind() == to_kind);
3317  return current_map;
3318 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
bool IsTransitionElementsKind(ElementsKind kind)
ElementsKind GetNextTransitionElementsKind(ElementsKind kind)
bool IsTerminalElementsKind(ElementsKind kind)

Referenced by v8::internal::Map::AsElementsKind().

+ Here is the caller graph for this function:

◆ AddNumber()

static void v8::internal::AddNumber ( v8::Isolate isolate,
v8::Local< v8::Object object,
intptr_t  value,
const char *  name 
)
static

Definition at line 32 of file statistics-extension.cc.

35  {
36  object->Set(v8::String::NewFromUtf8(isolate, name),
37  v8::Number::New(isolate, static_cast<double>(value)));
38 }

References name, v8::Number::New(), and v8::String::NewFromUtf8().

Referenced by v8::internal::StatisticsExtension::GetCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddNumber64()

static void v8::internal::AddNumber64 ( v8::Isolate isolate,
v8::Local< v8::Object object,
int64_t  value,
const char *  name 
)
static

Definition at line 41 of file statistics-extension.cc.

44  {
45  object->Set(v8::String::NewFromUtf8(isolate, name),
46  v8::Number::New(isolate, static_cast<double>(value)));
47 }

References name, v8::Number::New(), and v8::String::NewFromUtf8().

Referenced by v8::internal::StatisticsExtension::GetCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddOneReceiverMapIfMissing()

static bool v8::internal::AddOneReceiverMapIfMissing ( MapHandleList receiver_maps,
Handle< Map new_receiver_map 
)
static

Definition at line 635 of file ic.cc.

636  {
637  DCHECK(!new_receiver_map.is_null());
638  for (int current = 0; current < receiver_maps->length(); ++current) {
639  if (!receiver_maps->at(current).is_null() &&
640  receiver_maps->at(current).is_identical_to(new_receiver_map)) {
641  return false;
642  }
643  }
644  receiver_maps->Add(new_receiver_map);
645  return true;
646 }
bool is_null() const
Definition: handles.h:124

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), DCHECK, and v8::internal::Handle< T >::is_null().

Referenced by v8::internal::KeyedLoadIC::LoadElementStub(), and v8::internal::KeyedStoreIC::StoreElementStub().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddRange()

ContainedInLattice v8::internal::AddRange ( ContainedInLattice  containment,
const int ranges,
int  ranges_length,
Interval  new_range 
)

Definition at line 99 of file jsregexp.cc.

102  {
103  DCHECK((ranges_length & 1) == 1);
104  DCHECK(ranges[ranges_length - 1] == String::kMaxUtf16CodeUnit + 1);
105  if (containment == kLatticeUnknown) return containment;
106  bool inside = false;
107  int last = 0;
108  for (int i = 0; i < ranges_length; inside = !inside, last = ranges[i], i++) {
109  // Consider the range from last to ranges[i].
110  // We haven't got to the new range yet.
111  if (ranges[i] <= new_range.from()) continue;
112  // New range is wholly inside last-ranges[i]. Note that new_range.to() is
113  // inclusive, but the values in ranges are not.
114  if (last <= new_range.from() && new_range.to() < ranges[i]) {
115  return Combine(containment, inside ? kLatticeIn : kLatticeOut);
116  }
117  return kLatticeUnknown;
118  }
119  return containment;
120 }
ContainedInLattice Combine(ContainedInLattice a, ContainedInLattice b)
Definition: jsregexp.h:1238

References Combine(), DCHECK, v8::internal::Interval::from(), kLatticeIn, kLatticeOut, kLatticeUnknown, v8::internal::String::kMaxUtf16CodeUnit, and v8::internal::Interval::to().

Referenced by v8::internal::AddressToTraceMap::MoveObject(), and v8::internal::BoyerMoorePositionInfo::SetInterval().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddRangeOrEscape()

static void v8::internal::AddRangeOrEscape ( ZoneList< CharacterRange > *  ranges,
uc16  char_class,
CharacterRange  range,
Zone zone 
)
inlinestatic

Definition at line 4799 of file parser.cc.

4802  {
4803  if (char_class != kNoCharClass) {
4804  CharacterRange::AddClassEscape(char_class, ranges, zone);
4805  } else {
4806  ranges->Add(range, zone);
4807  }
4808 }
static const uc16 kNoCharClass
Definition: parser.cc:4794

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::CharacterRange::AddClassEscape(), and kNoCharClass.

+ Here is the call graph for this function:

◆ AddressesMatch()

static bool v8::internal::AddressesMatch ( void *  key1,
void *  key2 
)
static

Definition at line 364 of file heap-snapshot-generator.cc.

364  {
365  return key1 == key2;
366 }

◆ AddToWeakNativeContextList()

static void v8::internal::AddToWeakNativeContextList ( Context context)
static

Definition at line 709 of file bootstrapper.cc.

709  {
710  DCHECK(context->IsNativeContext());
711  Heap* heap = context->GetIsolate()->heap();
712 #ifdef DEBUG
713  { // NOLINT
714  DCHECK(context->get(Context::NEXT_CONTEXT_LINK)->IsUndefined());
715  // Check that context is not in the list yet.
716  for (Object* current = heap->native_contexts_list();
717  !current->IsUndefined();
718  current = Context::cast(current)->get(Context::NEXT_CONTEXT_LINK)) {
719  DCHECK(current != context);
720  }
721  }
722 #endif
723  context->set(Context::NEXT_CONTEXT_LINK, heap->native_contexts_list());
724  heap->set_native_contexts_list(context);
725 }
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References DCHECK, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetIsolate(), v8::internal::Isolate::heap(), v8::internal::Context::IsNativeContext(), v8::internal::Heap::native_contexts_list(), v8::internal::FixedArray::set(), and v8::internal::Heap::set_native_contexts_list().

+ Here is the call graph for this function:

◆ AddWeakObjectToCodeDependency()

static void v8::internal::AddWeakObjectToCodeDependency ( Isolate isolate,
Handle< Object object,
Handle< Code code 
)
static

Definition at line 168 of file lithium-codegen.cc.

170  {
171  Heap* heap = isolate->heap();
172  heap->EnsureWeakObjectToCodeTable();
173  Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(object));
174  dep = DependentCode::Insert(dep, DependentCode::kWeakCodeGroup, code);
175  heap->AddWeakObjectToCodeDependency(object, dep);
176 }

References v8::internal::Heap::AddWeakObjectToCodeDependency(), v8::internal::Heap::EnsureWeakObjectToCodeTable(), v8::internal::Isolate::heap(), and v8::internal::Heap::LookupWeakObjectToCodeDependency().

+ Here is the call graph for this function:

◆ AddWithoutOverflow()

static int32_t v8::internal::AddWithoutOverflow ( Representation  r,
int32_t  a,
int32_t  b,
bool overflow 
)
static

Definition at line 157 of file hydrogen-instructions.cc.

160  {
161  int64_t result = static_cast<int64_t>(a) + static_cast<int64_t>(b);
162  return ConvertAndSetOverflow(r, result, overflow);
163 }
static int32_t ConvertAndSetOverflow(Representation r, int64_t result, bool *overflow)

References ConvertAndSetOverflow(), and overflow.

+ Here is the call graph for this function:

◆ AdjustmentPowerOfTen()

static DiyFp v8::internal::AdjustmentPowerOfTen ( int  exponent)
static

Definition at line 211 of file strtod.cc.

211  {
212  DCHECK(0 < exponent);
213  DCHECK(exponent < PowersOfTenCache::kDecimalExponentDistance);
214  // Simply hardcode the remaining powers for the given decimal exponent
215  // distance.
216  DCHECK(PowersOfTenCache::kDecimalExponentDistance == 8);
217  switch (exponent) {
218  case 1: return DiyFp(V8_2PART_UINT64_C(0xa0000000, 00000000), -60);
219  case 2: return DiyFp(V8_2PART_UINT64_C(0xc8000000, 00000000), -57);
220  case 3: return DiyFp(V8_2PART_UINT64_C(0xfa000000, 00000000), -54);
221  case 4: return DiyFp(V8_2PART_UINT64_C(0x9c400000, 00000000), -50);
222  case 5: return DiyFp(V8_2PART_UINT64_C(0xc3500000, 00000000), -47);
223  case 6: return DiyFp(V8_2PART_UINT64_C(0xf4240000, 00000000), -44);
224  case 7: return DiyFp(V8_2PART_UINT64_C(0x98968000, 00000000), -40);
225  default:
226  UNREACHABLE();
227  return DiyFp(0, 0);
228  }
229 }
#define UNREACHABLE()
Definition: logging.h:30
#define V8_2PART_UINT64_C(a, b)
Definition: macros.h:376

References DCHECK, v8::internal::PowersOfTenCache::kDecimalExponentDistance, UNREACHABLE, and V8_2PART_UINT64_C.

Referenced by DiyFpStrtod().

+ Here is the caller graph for this function:

◆ AdvanceToNonspace()

template<class Iterator , class EndMark >
bool v8::internal::AdvanceToNonspace ( UnicodeCache unicode_cache,
Iterator *  current,
EndMark  end 
)
inline

Definition at line 117 of file conversions-inl.h.

119  {
120  while (*current != end) {
121  if (!unicode_cache->IsWhiteSpaceOrLineTerminator(**current)) return true;
122  ++*current;
123  }
124  return false;
125 }

References v8::internal::UnicodeCache::IsWhiteSpaceOrLineTerminator().

Referenced by InternalStringToDouble(), InternalStringToInt(), and InternalStringToIntDouble().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ALIAS_REGISTER() [1/18]

v8::internal::ALIAS_REGISTER ( FPRegister  ,
crankshaft_fp_scratch  ,
d29   
)

◆ ALIAS_REGISTER() [2/18]

v8::internal::ALIAS_REGISTER ( FPRegister  ,
fp_scratch  ,
d30   
)

◆ ALIAS_REGISTER() [3/18]

v8::internal::ALIAS_REGISTER ( FPRegister  ,
fp_scratch1  ,
d30   
)

◆ ALIAS_REGISTER() [4/18]

v8::internal::ALIAS_REGISTER ( FPRegister  ,
fp_scratch2  ,
d31   
)

◆ ALIAS_REGISTER() [5/18]

v8::internal::ALIAS_REGISTER ( FPRegister  ,
fp_zero  ,
d15   
)

◆ ALIAS_REGISTER() [6/18]

v8::internal::ALIAS_REGISTER ( Register  ,
cp  ,
x27   
)

◆ ALIAS_REGISTER() [7/18]

v8::internal::ALIAS_REGISTER ( Register  ,
fp  ,
x29   
)

◆ ALIAS_REGISTER() [8/18]

v8::internal::ALIAS_REGISTER ( Register  ,
ip0  ,
x16   
)

◆ ALIAS_REGISTER() [9/18]

v8::internal::ALIAS_REGISTER ( Register  ,
ip1  ,
x17   
)

◆ ALIAS_REGISTER() [10/18]

v8::internal::ALIAS_REGISTER ( Register  ,
jssp  ,
x28   
)

◆ ALIAS_REGISTER() [11/18]

v8::internal::ALIAS_REGISTER ( Register  ,
lr  ,
x30   
)

◆ ALIAS_REGISTER() [12/18]

v8::internal::ALIAS_REGISTER ( Register  ,
root  ,
x26   
)

◆ ALIAS_REGISTER() [13/18]

v8::internal::ALIAS_REGISTER ( Register  ,
rr  ,
x26   
)

◆ ALIAS_REGISTER() [14/18]

v8::internal::ALIAS_REGISTER ( Register  ,
wip0  ,
w16   
)

◆ ALIAS_REGISTER() [15/18]

v8::internal::ALIAS_REGISTER ( Register  ,
wip1  ,
w17   
)

◆ ALIAS_REGISTER() [16/18]

v8::internal::ALIAS_REGISTER ( Register  ,
wjssp  ,
w28   
)

◆ ALIAS_REGISTER() [17/18]

v8::internal::ALIAS_REGISTER ( Register  ,
wzr  ,
w31   
)

◆ ALIAS_REGISTER() [18/18]

v8::internal::ALIAS_REGISTER ( Register  ,
xzr  ,
x31   
)

◆ AlignedAlloc()

void * v8::internal::AlignedAlloc ( size_t  size,
size_t  alignment 
)

Definition at line 86 of file allocation.cc.

86  {
87  DCHECK_LE(V8_ALIGNOF(void*), alignment);
89  void* ptr;
90 #if V8_OS_WIN
91  ptr = _aligned_malloc(size, alignment);
92 #elif V8_LIBC_BIONIC
93  // posix_memalign is not exposed in some Android versions, so we fall back to
94  // memalign. See http://code.google.com/p/android/issues/detail?id=35391.
95  ptr = memalign(alignment, size);
96 #else
97  if (posix_memalign(&ptr, alignment, size)) ptr = NULL;
98 #endif
99  if (ptr == NULL) FatalProcessOutOfMemory("AlignedAlloc");
100  return ptr;
101 }
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK_LE(v1, v2)
Definition: logging.h:210
bool IsPowerOfTwo32(uint32_t value)
Definition: bits.h:77
void FatalProcessOutOfMemory(const char *message)
#define V8_ALIGNOF(type)
Definition: v8config.h:416

References DCHECK, DCHECK_LE, FatalProcessOutOfMemory(), v8::base::bits::IsPowerOfTwo32(), NULL, size, and V8_ALIGNOF.

Referenced by v8::internal::ProfilerEventsProcessor::operator new().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AlignedFree()

void v8::internal::AlignedFree ( void *  ptr)

Definition at line 104 of file allocation.cc.

104  {
105 #if V8_OS_WIN
106  _aligned_free(ptr);
107 #elif V8_LIBC_BIONIC
108  // Using free is not correct in general, but for V8_LIBC_BIONIC it is.
109  free(ptr);
110 #else
111  free(ptr);
112 #endif
113 }

Referenced by v8::internal::ProfilerEventsProcessor::operator delete().

+ Here is the caller graph for this function:

◆ AllocateCodeChunk()

static MemoryChunk* v8::internal::AllocateCodeChunk ( MemoryAllocator allocator)
static

Definition at line 20 of file deoptimizer.cc.

20  {
21  return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(),
22  base::OS::CommitPageSize(),
23 #if defined(__native_client__)
24  // The Native Client port of V8 uses an interpreter,
25  // so code pages don't need PROT_EXEC.
27 #else
28  EXECUTABLE,
29 #endif
30  NULL);
31 }

References v8::internal::MemoryAllocator::AllocateChunk(), v8::base::OS::CommitPageSize(), EXECUTABLE, v8::internal::Deoptimizer::GetMaxDeoptTableSize(), NOT_EXECUTABLE, and NULL.

Referenced by v8::internal::DeoptimizerData::DeoptimizerData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AllocateFrameCopy()

static StackFrame* v8::internal::AllocateFrameCopy ( StackFrame frame,
Zone zone 
)
static

Definition at line 1617 of file frames.cc.

1617  {
1618 #define FRAME_TYPE_CASE(type, field) \
1619  case StackFrame::type: { \
1620  field##_Wrapper* wrapper = \
1621  new(zone) field##_Wrapper(*(reinterpret_cast<field*>(frame))); \
1622  return &wrapper->frame_; \
1623  }
1624 
1625  switch (frame->type()) {
1627  default: UNREACHABLE();
1628  }
1629 #undef FRAME_TYPE_CASE
1630  return NULL;
1631 }
#define FRAME_TYPE_CASE(type, field)
#define STACK_FRAME_TYPE_LIST(V)
Definition: frames.h:136

References FRAME_TYPE_CASE, NULL, STACK_FRAME_TYPE_LIST, and UNREACHABLE.

Referenced by CreateStackMap().

+ Here is the caller graph for this function:

◆ AllocationSpaceName()

const char * v8::internal::AllocationSpaceName ( AllocationSpace  space)

Definition at line 691 of file mark-compact.cc.

691  {
692  switch (space) {
693  case NEW_SPACE:
694  return "NEW_SPACE";
695  case OLD_POINTER_SPACE:
696  return "OLD_POINTER_SPACE";
697  case OLD_DATA_SPACE:
698  return "OLD_DATA_SPACE";
699  case CODE_SPACE:
700  return "CODE_SPACE";
701  case MAP_SPACE:
702  return "MAP_SPACE";
703  case CELL_SPACE:
704  return "CELL_SPACE";
705  case PROPERTY_CELL_SPACE:
706  return "PROPERTY_CELL_SPACE";
707  case LO_SPACE:
708  return "LO_SPACE";
709  default:
710  UNREACHABLE();
711  }
712 
713  return NULL;
714 }

References CELL_SPACE, CODE_SPACE, LO_SPACE, MAP_SPACE, NEW_SPACE, NULL, OLD_DATA_SPACE, OLD_POINTER_SPACE, PROPERTY_CELL_SPACE, space(), and UNREACHABLE.

Referenced by v8::internal::MarkCompactCollector::CollectEvacuationCandidates(), v8::DumpHeapConstants(), FreeListFragmentation(), v8::internal::MarkCompactCollector::SweepSpace(), and TraceFragmentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AllowAccessToFunction()

static bool v8::internal::AllowAccessToFunction ( Context current_context,
JSFunction function 
)
inlinestatic

Definition at line 1198 of file accessors.cc.

1199  {
1200  return current_context->HasSameSecurityTokenAs(function->context());
1201 }

References v8::internal::Context::HasSameSecurityTokenAs().

Referenced by FindCaller(), and v8::internal::FrameFunctionIterator::next().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AnWord()

static bool v8::internal::AnWord ( String str)
static

Definition at line 940 of file objects.cc.

940  {
941  if (str->length() == 0) return false; // A nothing.
942  int c0 = str->Get(0);
943  int c1 = str->length() > 1 ? str->Get(1) : 0;
944  if (c0 == 'U') {
945  if (c1 > 'Z') {
946  return true; // An Umpire, but a UTF8String, a U.
947  }
948  } else if (c0 == 'A' || c0 == 'E' || c0 == 'I' || c0 == 'O') {
949  return true; // An Ape, an ABCBook.
950  } else if ((c1 == 0 || (c1 >= 'A' && c1 <= 'Z')) &&
951  (c0 == 'F' || c0 == 'H' || c0 == 'M' || c0 == 'N' || c0 == 'R' ||
952  c0 == 'S' || c0 == 'X')) {
953  return true; // An MP3File, an M.
954  }
955  return false;
956 }

References v8::internal::String::length().

Referenced by v8::internal::JSObject::JSObjectShortPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApiParameterOperand()

Operand v8::internal::ApiParameterOperand ( int  index)

◆ AppendChars()

int v8::internal::AppendChars ( const char *  filename,
const char *  str,
int  size,
bool  verbose 
)

Definition at line 273 of file utils.cc.

276  {
277  FILE* f = base::OS::FOpen(filename, "ab");
278  if (f == NULL) {
279  if (verbose) {
280  base::OS::PrintError("Cannot open file %s for writing.\n", filename);
281  }
282  return 0;
283  }
284  int written = WriteCharsToFile(str, size, f);
285  fclose(f);
286  return written;
287 }
int WriteCharsToFile(const char *str, int size, FILE *f)
Definition: utils.cc:259
static FILE * FOpen(const char *path, const char *mode)
Definition: d8.cc:1056

References v8::base::OS::FOpen(), NULL, v8::base::OS::PrintError(), size, and WriteCharsToFile().

+ Here is the call graph for this function:

◆ AppendCodeCreateHeader()

static void v8::internal::AppendCodeCreateHeader ( Log::MessageBuilder *  msg,
Logger::LogEventsAndTags  tag,
Code code 
)
static

Definition at line 1163 of file log.cc.

1165  {
1166  DCHECK(msg);
1167  msg->Append("%s,%s,%d,",
1168  kLogEventsNames[Logger::CODE_CREATION_EVENT],
1169  kLogEventsNames[tag],
1170  code->kind());
1171  msg->AppendAddress(code->address());
1172  msg->Append(",%d,", code->ExecutableSize());
1173 }
static const char *const kLogEventsNames[Logger::NUMBER_OF_LOG_EVENTS]
Definition: log.cc:30

References v8::internal::HeapObject::address(), DCHECK, v8::internal::Code::ExecutableSize(), v8::internal::Code::kind(), and kLogEventsNames.

Referenced by v8::internal::Logger::CodeCreateEvent(), and v8::internal::Logger::RegExpCodeCreateEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AppendUniqueCallbacks()

template<class T >
static int v8::internal::AppendUniqueCallbacks ( NeanderArray callbacks,
Handle< typename T::Array >  array,
int  valid_descriptors 
)
static

Definition at line 3099 of file objects.cc.

3101  {
3102  int nof_callbacks = callbacks->length();
3103 
3104  Isolate* isolate = array->GetIsolate();
3105  // Ensure the keys are unique names before writing them into the
3106  // instance descriptor. Since it may cause a GC, it has to be done before we
3107  // temporarily put the heap in an invalid state while appending descriptors.
3108  for (int i = 0; i < nof_callbacks; ++i) {
3109  Handle<AccessorInfo> entry(AccessorInfo::cast(callbacks->get(i)));
3110  if (entry->name()->IsUniqueName()) continue;
3111  Handle<String> key =
3112  isolate->factory()->InternalizeString(
3113  Handle<String>(String::cast(entry->name())));
3114  entry->set_name(*key);
3115  }
3116 
3117  // Fill in new callback descriptors. Process the callbacks from
3118  // back to front so that the last callback with a given name takes
3119  // precedence over previously added callbacks with that name.
3120  for (int i = nof_callbacks - 1; i >= 0; i--) {
3121  Handle<AccessorInfo> entry(AccessorInfo::cast(callbacks->get(i)));
3122  Handle<Name> key(Name::cast(entry->name()));
3123  // Check if a descriptor with this name already exists before writing.
3124  if (!T::Contains(key, entry, valid_descriptors, array)) {
3125  T::Insert(key, entry, valid_descriptors, array);
3126  valid_descriptors++;
3127  }
3128  }
3129 
3130  return valid_descriptors;
3131 }

References v8::internal::Isolate::factory(), v8::NeanderArray::get(), and v8::NeanderArray::length().

+ Here is the call graph for this function:

◆ ArchiveSpacePerThread()

static int v8::internal::ArchiveSpacePerThread ( )
static

Definition at line 171 of file v8threads.cc.

References v8::internal::HandleScopeImplementer::ArchiveSpacePerThread(), v8::internal::Debug::ArchiveSpacePerThread(), v8::internal::Isolate::ArchiveSpacePerThread(), and v8::internal::RegExpStack::ArchiveSpacePerThread().

Referenced by v8::internal::ThreadState::AllocateSpace(), v8::internal::HandleScopeImplementer::ArchiveThread(), v8::internal::HandleScopeImplementer::Iterate(), and v8::internal::HandleScopeImplementer::RestoreThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AreAliased() [1/2]

bool v8::internal::AreAliased ( const CPURegister reg1,
const CPURegister reg2,
const CPURegister reg3 = NoReg,
const CPURegister reg4 = NoReg,
const CPURegister reg5 = NoReg,
const CPURegister reg6 = NoReg,
const CPURegister reg7 = NoReg,
const CPURegister reg8 = NoReg 
)

Referenced by v8::internal::MacroAssembler::Ldnp(), v8::internal::LCodeGen::PrepareKeyedExternalArrayOperand(), v8::internal::RecordWriteStub::RegisterAllocation::RegisterAllocation(), and v8::internal::RecordWriteStub::RegisterAllocation::Save().

+ Here is the caller graph for this function:

◆ AreAliased() [2/2]

bool v8::internal::AreAliased ( Register  reg1,
Register  reg2,
Register  reg3 = no_reg,
Register  reg4 = no_reg,
Register  reg5 = no_reg,
Register  reg6 = no_reg,
Register  reg7 = no_reg,
Register  reg8 = no_reg 
)

◆ AreDigits()

static bool v8::internal::AreDigits ( const uint8_t *  s,
int  from,
int  to 
)
static

Definition at line 116 of file runtime-numbers.cc.

116  {
117  for (int i = from; i < to; i++) {
118  if (s[i] < '0' || s[i] > '9') return false;
119  }
120 
121  return true;
122 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file

References to().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AreSameSizeAndType()

bool v8::internal::AreSameSizeAndType ( const CPURegister reg1,
const CPURegister reg2,
const CPURegister reg3 = NoCPUReg,
const CPURegister reg4 = NoCPUReg,
const CPURegister reg5 = NoCPUReg,
const CPURegister reg6 = NoCPUReg,
const CPURegister reg7 = NoCPUReg,
const CPURegister reg8 = NoCPUReg 
)

Referenced by v8::internal::CPURegList::CPURegList(), v8::internal::Assembler::LoadPairNonTemporalOpFor(), v8::internal::Assembler::LoadPairOpFor(), v8::internal::Assembler::StorePairNonTemporalOpFor(), and v8::internal::Assembler::StorePairOpFor().

+ Here is the caller graph for this function:

◆ AreStringTypes()

static bool v8::internal::AreStringTypes ( SmallMapList *  types)
static

Definition at line 6414 of file hydrogen.cc.

6414  {
6415  for (int i = 0; i < types->length(); i++) {
6416  if (types->at(i)->instance_type() >= FIRST_NONSTRING_TYPE) return false;
6417  }
6418  return true;
6419 }

References FIRST_NONSTRING_TYPE.

Referenced by v8::internal::HOptimizedGraphBuilder::BuildNamedAccess().

+ Here is the caller graph for this function:

◆ ArgumentsForInlinedFunction()

static Handle<Object> v8::internal::ArgumentsForInlinedFunction ( JavaScriptFrame frame,
Handle< JSFunction inlined_function,
int  inlined_frame_index 
)
static

Definition at line 1061 of file accessors.cc.

1064  {
1065  Isolate* isolate = inlined_function->GetIsolate();
1066  Factory* factory = isolate->factory();
1067  SlotRefValueBuilder slot_refs(
1068  frame,
1069  inlined_frame_index,
1070  inlined_function->shared()->formal_parameter_count());
1071 
1072  int args_count = slot_refs.args_length();
1073  Handle<JSObject> arguments =
1074  factory->NewArgumentsObject(inlined_function, args_count);
1075  Handle<FixedArray> array = factory->NewFixedArray(args_count);
1076  slot_refs.Prepare(isolate);
1077  for (int i = 0; i < args_count; ++i) {
1078  Handle<Object> value = slot_refs.GetNext(isolate, 0);
1079  array->set(i, *value);
1080  }
1081  slot_refs.Finish(isolate);
1082  arguments->set_elements(*array);
1083 
1084  // Return the freshly allocated arguments object.
1085  return arguments;
1086 }

References v8::internal::Isolate::factory().

Referenced by GetFunctionArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ArgumentsOffsetWithoutFrame() [1/4]

static int v8::internal::ArgumentsOffsetWithoutFrame ( int  index)
static

Definition at line 573 of file lithium-codegen-arm.cc.

573  {
574  DCHECK(index < 0);
575  return -(index + 1) * kPointerSize;
576 }

References DCHECK, and kPointerSize.

Referenced by v8::internal::LCodeGen::ToHighMemOperand(), and v8::internal::LCodeGen::ToMemOperand().

+ Here is the caller graph for this function:

◆ ArgumentsOffsetWithoutFrame() [2/4]

static int64_t v8::internal::ArgumentsOffsetWithoutFrame ( int  index)
static

Definition at line 1251 of file lithium-codegen-arm64.cc.

1251  {
1252  DCHECK(index < 0);
1253  return -(index + 1) * kPointerSize;
1254 }

References DCHECK, and kPointerSize.

◆ ArgumentsOffsetWithoutFrame() [3/4]

static int v8::internal::ArgumentsOffsetWithoutFrame ( int  index)
static

Definition at line 568 of file lithium-codegen-mips.cc.

568  {
569  DCHECK(index < 0);
570  return -(index + 1) * kPointerSize;
571 }

References DCHECK, and kPointerSize.

◆ ArgumentsOffsetWithoutFrame() [4/4]

static int v8::internal::ArgumentsOffsetWithoutFrame ( int  index)
static

Definition at line 515 of file lithium-codegen-mips64.cc.

515  {
516  DCHECK(index < 0);
517  return -(index + 1) * kPointerSize;
518 }

References DCHECK, and kPointerSize.

◆ ArithmeticShiftRight()

int v8::internal::ArithmeticShiftRight ( int  x,
int  s 
)
inline

Definition at line 90 of file utils.h.

90  {
91  return x >> s;
92 }

Referenced by RUNTIME_FUNCTION(), and v8::internal::ParserTraits::ShortcutNumericLiteralBinaryExpression().

+ Here is the caller graph for this function:

◆ ArrayConstructInitializeElements()

MUST_USE_RESULT MaybeHandle< Object > v8::internal::ArrayConstructInitializeElements ( Handle< JSArray array,
Arguments args 
)

Definition at line 1828 of file elements.cc.

1829  {
1830  // Optimize the case where there is one argument and the argument is a
1831  // small smi.
1832  if (args->length() == 1) {
1833  Handle<Object> obj = args->at<Object>(0);
1834  if (obj->IsSmi()) {
1835  int len = Handle<Smi>::cast(obj)->value();
1836  if (len > 0 && len < JSObject::kInitialMaxFastElementArray) {
1837  ElementsKind elements_kind = array->GetElementsKind();
1838  JSArray::Initialize(array, len, len);
1839 
1840  if (!IsFastHoleyElementsKind(elements_kind)) {
1841  elements_kind = GetHoleyElementsKind(elements_kind);
1842  JSObject::TransitionElementsKind(array, elements_kind);
1843  }
1844  return array;
1845  } else if (len == 0) {
1846  JSArray::Initialize(array, JSArray::kPreallocatedArrayElements);
1847  return array;
1848  }
1849  }
1850 
1851  // Take the argument as the length.
1852  JSArray::Initialize(array, 0);
1853 
1854  return JSArray::SetElementsLength(array, obj);
1855  }
1856 
1857  // Optimize the case where there are no parameters passed.
1858  if (args->length() == 0) {
1859  JSArray::Initialize(array, JSArray::kPreallocatedArrayElements);
1860  return array;
1861  }
1862 
1863  Factory* factory = array->GetIsolate()->factory();
1864 
1865  // Set length and elements on the array.
1866  int number_of_elements = args->length();
1867  JSObject::EnsureCanContainElements(
1868  array, args, 0, number_of_elements, ALLOW_CONVERTED_DOUBLE_ELEMENTS);
1869 
1870  // Allocate an appropriately typed elements array.
1871  ElementsKind elements_kind = array->GetElementsKind();
1872  Handle<FixedArrayBase> elms;
1873  if (IsFastDoubleElementsKind(elements_kind)) {
1874  elms = Handle<FixedArrayBase>::cast(
1875  factory->NewFixedDoubleArray(number_of_elements));
1876  } else {
1877  elms = Handle<FixedArrayBase>::cast(
1878  factory->NewFixedArrayWithHoles(number_of_elements));
1879  }
1880 
1881  // Fill in the content
1882  switch (array->GetElementsKind()) {
1884  case FAST_SMI_ELEMENTS: {
1885  Handle<FixedArray> smi_elms = Handle<FixedArray>::cast(elms);
1886  for (int index = 0; index < number_of_elements; index++) {
1887  smi_elms->set(index, (*args)[index], SKIP_WRITE_BARRIER);
1888  }
1889  break;
1890  }
1891  case FAST_HOLEY_ELEMENTS:
1892  case FAST_ELEMENTS: {
1893  DisallowHeapAllocation no_gc;
1894  WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc);
1895  Handle<FixedArray> object_elms = Handle<FixedArray>::cast(elms);
1896  for (int index = 0; index < number_of_elements; index++) {
1897  object_elms->set(index, (*args)[index], mode);
1898  }
1899  break;
1900  }
1902  case FAST_DOUBLE_ELEMENTS: {
1903  Handle<FixedDoubleArray> double_elms =
1904  Handle<FixedDoubleArray>::cast(elms);
1905  for (int index = 0; index < number_of_elements; index++) {
1906  double_elms->set(index, (*args)[index]->Number());
1907  }
1908  break;
1909  }
1910  default:
1911  UNREACHABLE();
1912  break;
1913  }
1914 
1915  array->set_elements(*elms);
1916  array->set_length(Smi::FromInt(number_of_elements));
1917  return array;
1918 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
bool IsFastHoleyElementsKind(ElementsKind kind)
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
Definition: assert-scope.h:110
bool IsFastDoubleElementsKind(ElementsKind kind)
ElementsKind GetHoleyElementsKind(ElementsKind packed_kind)

References ALLOW_CONVERTED_DOUBLE_ELEMENTS, v8::internal::Handle< T >::cast(), v8::internal::JSObject::EnsureCanContainElements(), FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, v8::internal::Smi::FromInt(), GetHoleyElementsKind(), v8::internal::JSArray::Initialize(), IsFastDoubleElementsKind(), IsFastHoleyElementsKind(), v8::internal::JSObject::kInitialMaxFastElementArray, v8::internal::JSArray::kPreallocatedArrayElements, mode(), v8::internal::JSArray::SetElementsLength(), SKIP_WRITE_BARRIER, v8::internal::JSObject::TransitionElementsKind(), and UNREACHABLE.

Referenced by ArrayConstructorCommon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ArrayConstructorCommon()

static Object* v8::internal::ArrayConstructorCommon ( Isolate isolate,
Handle< JSFunction constructor,
Handle< AllocationSite site,
Arguments caller_args 
)
static

Definition at line 8779 of file runtime.cc.

8782  {
8783  Factory* factory = isolate->factory();
8784 
8785  bool holey = false;
8786  bool can_use_type_feedback = true;
8787  if (caller_args->length() == 1) {
8788  Handle<Object> argument_one = caller_args->at<Object>(0);
8789  if (argument_one->IsSmi()) {
8790  int value = Handle<Smi>::cast(argument_one)->value();
8791  if (value < 0 || value >= JSObject::kInitialMaxFastElementArray) {
8792  // the array is a dictionary in this case.
8793  can_use_type_feedback = false;
8794  } else if (value != 0) {
8795  holey = true;
8796  }
8797  } else {
8798  // Non-smi length argument produces a dictionary
8799  can_use_type_feedback = false;
8800  }
8801  }
8802 
8803  Handle<JSArray> array;
8804  if (!site.is_null() && can_use_type_feedback) {
8805  ElementsKind to_kind = site->GetElementsKind();
8806  if (holey && !IsFastHoleyElementsKind(to_kind)) {
8807  to_kind = GetHoleyElementsKind(to_kind);
8808  // Update the allocation site info to reflect the advice alteration.
8809  site->SetElementsKind(to_kind);
8810  }
8811 
8812  // We should allocate with an initial map that reflects the allocation site
8813  // advice. Therefore we use AllocateJSObjectFromMap instead of passing
8814  // the constructor.
8815  Handle<Map> initial_map(constructor->initial_map(), isolate);
8816  if (to_kind != initial_map->elements_kind()) {
8817  initial_map = Map::AsElementsKind(initial_map, to_kind);
8818  }
8819 
8820  // If we don't care to track arrays of to_kind ElementsKind, then
8821  // don't emit a memento for them.
8822  Handle<AllocationSite> allocation_site;
8823  if (AllocationSite::GetMode(to_kind) == TRACK_ALLOCATION_SITE) {
8824  allocation_site = site;
8825  }
8826 
8827  array = Handle<JSArray>::cast(factory->NewJSObjectFromMap(
8828  initial_map, NOT_TENURED, true, allocation_site));
8829  } else {
8830  array = Handle<JSArray>::cast(factory->NewJSObject(constructor));
8831 
8832  // We might need to transition to holey
8833  ElementsKind kind = constructor->initial_map()->elements_kind();
8834  if (holey && !IsFastHoleyElementsKind(kind)) {
8835  kind = GetHoleyElementsKind(kind);
8836  JSObject::TransitionElementsKind(array, kind);
8837  }
8838  }
8839 
8840  factory->NewJSArrayStorage(array, 0, 0, DONT_INITIALIZE_ARRAY_ELEMENTS);
8841 
8842  ElementsKind old_kind = array->GetElementsKind();
8844  isolate, ArrayConstructInitializeElements(array, caller_args));
8845  if (!site.is_null() &&
8846  (old_kind != array->GetElementsKind() || !can_use_type_feedback)) {
8847  // The arguments passed in caused a transition. This kind of complexity
8848  // can't be dealt with in the inlined hydrogen array constructor case.
8849  // We must mark the allocationsite as un-inlinable.
8850  site->SetDoNotInlineCall();
8851  }
8852  return *array;
8853 }
#define RETURN_FAILURE_ON_EXCEPTION(isolate, call)
Definition: isolate.h:162
MaybeHandle< Object > ArrayConstructInitializeElements(Handle< JSArray > array, Arguments *args)
Definition: elements.cc:1828

References ArrayConstructInitializeElements(), v8::internal::Map::AsElementsKind(), v8::internal::Handle< T >::cast(), DONT_INITIALIZE_ARRAY_ELEMENTS, v8::internal::Isolate::factory(), GetHoleyElementsKind(), v8::internal::AllocationSite::GetMode(), v8::internal::Handle< T >::is_null(), IsFastHoleyElementsKind(), v8::internal::JSObject::kInitialMaxFastElementArray, NOT_TENURED, RETURN_FAILURE_ON_EXCEPTION, TRACK_ALLOCATION_SITE, and v8::internal::JSObject::TransitionElementsKind().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ArrayNativeCode() [1/2]

void v8::internal::ArrayNativeCode ( MacroAssembler masm,
bool  construct_call,
Label *  call_generic_code 
)

◆ ArrayNativeCode() [2/2]

void v8::internal::ArrayNativeCode ( MacroAssembler masm,
Label *  call_generic_code 
)

◆ ArrayPrototypeHasNoElements()

static bool v8::internal::ArrayPrototypeHasNoElements ( Heap heap,
Context native_context,
JSObject array_proto 
)
static

Definition at line 185 of file builtins.cc.

187  {
189  // This method depends on non writability of Object and Array prototype
190  // fields.
191  if (array_proto->elements() != heap->empty_fixed_array()) return false;
192  // Object.prototype
193  PrototypeIterator iter(heap->isolate(), array_proto);
194  if (iter.IsAtEnd()) {
195  return false;
196  }
197  array_proto = JSObject::cast(iter.GetCurrent());
198  if (array_proto != native_context->initial_object_prototype()) return false;
199  if (array_proto->elements() != heap->empty_fixed_array()) return false;
200  iter.Advance();
201  return iter.IsAtEnd();
202 }

References v8::internal::PrototypeIterator::Advance(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::PrototypeIterator::IsAtEnd(), and v8::internal::Heap::isolate().

Referenced by BUILTIN(), and IsJSArrayFastElementMovingAllowed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsciiAlphaToLower()

int v8::internal::AsciiAlphaToLower ( uc32  c)
inline

Definition at line 17 of file char-predicates-inl.h.

17  {
18  return c | 0x20;
19 }

Referenced by IsHexDigit(), IsRegExpWord(), and v8::internal::DateParser::BASE_EMBEDDED< Char >::ReadWord().

+ Here is the caller graph for this function:

◆ AsciiRangeMask()

static uintptr_t v8::internal::AsciiRangeMask ( uintptr_t  w,
char  m,
char  n 
)
inlinestatic

Definition at line 930 of file runtime-strings.cc.

930  {
931  // Use strict inequalities since in edge cases the function could be
932  // further simplified.
933  DCHECK(0 < m && m < n);
934  // Has high bit set in every w byte less than n.
935  uintptr_t tmp1 = kOneInEveryByte * (0x7F + n) - w;
936  // Has high bit set in every w byte greater than m.
937  uintptr_t tmp2 = w + kOneInEveryByte * (0x7F - m);
938  return (tmp1 & tmp2 & (kOneInEveryByte * 0x80));
939 }
static const uintptr_t kOneInEveryByte

References DCHECK, and kOneInEveryByte.

Referenced by FastAsciiConvert().

+ Here is the caller graph for this function:

◆ BackRefMatchesNoCase() [1/2]

static bool v8::internal::BackRefMatchesNoCase ( Canonicalize interp_canonicalize,
int  from,
int  current,
int  len,
Vector< const uc16 subject 
)
static

Definition at line 24 of file interpreter-irregexp.cc.

28  {
29  for (int i = 0; i < len; i++) {
30  unibrow::uchar old_char = subject[from++];
31  unibrow::uchar new_char = subject[current++];
32  if (old_char == new_char) continue;
33  unibrow::uchar old_string[1] = { old_char };
34  unibrow::uchar new_string[1] = { new_char };
35  interp_canonicalize->get(old_char, '\0', old_string);
36  interp_canonicalize->get(new_char, '\0', new_string);
37  if (old_string[0] != new_string[0]) {
38  return false;
39  }
40  }
41  return true;
42 }
unsigned int uchar
Definition: unicode.h:17

References unibrow::Mapping< T, size >::get().

Referenced by RawMatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BackRefMatchesNoCase() [2/2]

static bool v8::internal::BackRefMatchesNoCase ( Canonicalize interp_canonicalize,
int  from,
int  current,
int  len,
Vector< const uint8_t >  subject 
)
static

Definition at line 45 of file interpreter-irregexp.cc.

49  {
50  for (int i = 0; i < len; i++) {
51  unsigned int old_char = subject[from++];
52  unsigned int new_char = subject[current++];
53  if (old_char == new_char) continue;
54  // Convert both characters to lower case.
55  old_char |= 0x20;
56  new_char |= 0x20;
57  if (old_char != new_char) return false;
58  // Not letters in the ASCII range and Latin-1 range.
59  if (!(old_char - 'a' <= 'z' - 'a') &&
60  !(old_char - 224 <= 254 - 224 && old_char != 247)) {
61  return false;
62  }
63  }
64  return true;
65 }

◆ BeginPerformSplice()

static void v8::internal::BeginPerformSplice ( Handle< JSArray object)
static

Definition at line 11141 of file objects.cc.

11141  {
11142  Isolate* isolate = object->GetIsolate();
11143  HandleScope scope(isolate);
11144  Handle<Object> args[] = { object };
11145 
11146  Execution::Call(isolate,
11147  Handle<JSFunction>(isolate->observers_begin_perform_splice()),
11148  isolate->factory()->undefined_value(),
11149  arraysize(args),
11150  args).Assert();
11151 }
#define arraysize(array)
Definition: macros.h:86

References arraysize, and v8::internal::Isolate::factory().

Referenced by v8::internal::JSObject::SetElement(), and v8::internal::JSArray::SetElementsLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Between()

static bool v8::internal::Between ( uint32_t  character,
uint32_t  from,
uint32_t  to 
)
inlinestatic

Definition at line 417 of file factory.cc.

417  {
418  // This makes uses of the the unsigned wraparound.
419  return character - from <= to - from;
420 }

References to().

Referenced by MakeOrFindTwoCharacterString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BiggestPowerTen()

static void v8::internal::BiggestPowerTen ( uint32_t  number,
int  number_bits,
uint32_t power,
int exponent 
)
static

Definition at line 220 of file fast-dtoa.cc.

223  {
224  switch (number_bits) {
225  case 32:
226  case 31:
227  case 30:
228  if (kTen9 <= number) {
229  *power = kTen9;
230  *exponent = 9;
231  break;
232  } // else fallthrough
233  case 29:
234  case 28:
235  case 27:
236  if (kTen8 <= number) {
237  *power = kTen8;
238  *exponent = 8;
239  break;
240  } // else fallthrough
241  case 26:
242  case 25:
243  case 24:
244  if (kTen7 <= number) {
245  *power = kTen7;
246  *exponent = 7;
247  break;
248  } // else fallthrough
249  case 23:
250  case 22:
251  case 21:
252  case 20:
253  if (kTen6 <= number) {
254  *power = kTen6;
255  *exponent = 6;
256  break;
257  } // else fallthrough
258  case 19:
259  case 18:
260  case 17:
261  if (kTen5 <= number) {
262  *power = kTen5;
263  *exponent = 5;
264  break;
265  } // else fallthrough
266  case 16:
267  case 15:
268  case 14:
269  if (kTen4 <= number) {
270  *power = kTen4;
271  *exponent = 4;
272  break;
273  } // else fallthrough
274  case 13:
275  case 12:
276  case 11:
277  case 10:
278  if (1000 <= number) {
279  *power = 1000;
280  *exponent = 3;
281  break;
282  } // else fallthrough
283  case 9:
284  case 8:
285  case 7:
286  if (100 <= number) {
287  *power = 100;
288  *exponent = 2;
289  break;
290  } // else fallthrough
291  case 6:
292  case 5:
293  case 4:
294  if (10 <= number) {
295  *power = 10;
296  *exponent = 1;
297  break;
298  } // else fallthrough
299  case 3:
300  case 2:
301  case 1:
302  if (1 <= number) {
303  *power = 1;
304  *exponent = 0;
305  break;
306  } // else fallthrough
307  case 0:
308  *power = 0;
309  *exponent = -1;
310  break;
311  default:
312  // Following assignments are here to silence compiler warnings.
313  *power = 0;
314  *exponent = 0;
315  UNREACHABLE();
316  }
317 }
static const uint32_t kTen5
Definition: fast-dtoa.cc:209
static const uint32_t kTen6
Definition: fast-dtoa.cc:210
static const uint32_t kTen4
Definition: fast-dtoa.cc:208
static const uint32_t kTen8
Definition: fast-dtoa.cc:212
static const uint32_t kTen7
Definition: fast-dtoa.cc:211
static const uint32_t kTen9
Definition: fast-dtoa.cc:213

References kTen4, kTen5, kTen6, kTen7, kTen8, kTen9, and UNREACHABLE.

Referenced by DigitGen(), and DigitGenCounted().

+ Here is the caller graph for this function:

◆ BignumDtoa()

void v8::internal::BignumDtoa ( double  v,
BignumDtoaMode  mode,
int  requested_digits,
Vector< char >  buffer,
int length,
int decimal_point 
)

Definition at line 69 of file bignum-dtoa.cc.

70  {
71  DCHECK(v > 0);
72  DCHECK(!Double(v).IsSpecial());
73  uint64_t significand = Double(v).Significand();
74  bool is_even = (significand & 1) == 0;
75  int exponent = Double(v).Exponent();
76  int normalized_exponent = NormalizedExponent(significand, exponent);
77  // estimated_power might be too low by 1.
78  int estimated_power = EstimatePower(normalized_exponent);
79 
80  // Shortcut for Fixed.
81  // The requested digits correspond to the digits after the point. If the
82  // number is much too small, then there is no need in trying to get any
83  // digits.
84  if (mode == BIGNUM_DTOA_FIXED && -estimated_power - 1 > requested_digits) {
85  buffer[0] = '\0';
86  *length = 0;
87  // Set decimal-point to -requested_digits. This is what Gay does.
88  // Note that it should not have any effect anyways since the string is
89  // empty.
90  *decimal_point = -requested_digits;
91  return;
92  }
93 
94  Bignum numerator;
95  Bignum denominator;
96  Bignum delta_minus;
97  Bignum delta_plus;
98  // Make sure the bignum can grow large enough. The smallest double equals
99  // 4e-324. In this case the denominator needs fewer than 324*4 binary digits.
100  // The maximum double is 1.7976931348623157e308 which needs fewer than
101  // 308*4 binary digits.
102  DCHECK(Bignum::kMaxSignificantBits >= 324*4);
103  bool need_boundary_deltas = (mode == BIGNUM_DTOA_SHORTEST);
104  InitialScaledStartValues(v, estimated_power, need_boundary_deltas,
105  &numerator, &denominator,
106  &delta_minus, &delta_plus);
107  // We now have v = (numerator / denominator) * 10^estimated_power.
108  FixupMultiply10(estimated_power, is_even, decimal_point,
109  &numerator, &denominator,
110  &delta_minus, &delta_plus);
111  // We now have v = (numerator / denominator) * 10^(decimal_point-1), and
112  // 1 <= (numerator + delta_plus) / denominator < 10
113  switch (mode) {
115  GenerateShortestDigits(&numerator, &denominator,
116  &delta_minus, &delta_plus,
117  is_even, buffer, length);
118  break;
119  case BIGNUM_DTOA_FIXED:
120  BignumToFixed(requested_digits, decimal_point,
121  &numerator, &denominator,
122  buffer, length);
123  break;
125  GenerateCountedDigits(requested_digits, decimal_point,
126  &numerator, &denominator,
127  buffer, length);
128  break;
129  default:
130  UNREACHABLE();
131  }
132  buffer[*length] = '\0';
133 }
static void InitialScaledStartValues(double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
Definition: bignum-dtoa.cc:573
static void BignumToFixed(int requested_digits, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
Definition: bignum-dtoa.cc:289
static void GenerateCountedDigits(int count, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
Definition: bignum-dtoa.cc:247
static void GenerateShortestDigits(Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus, bool is_even, Vector< char > buffer, int *length)
Definition: bignum-dtoa.cc:149
static int NormalizedExponent(uint64_t significand, int exponent)
Definition: bignum-dtoa.cc:19
static int EstimatePower(int exponent)
Definition: bignum-dtoa.cc:348
static void FixupMultiply10(int estimated_power, bool is_even, int *decimal_point, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
Definition: bignum-dtoa.cc:607

References BIGNUM_DTOA_FIXED, BIGNUM_DTOA_PRECISION, BIGNUM_DTOA_SHORTEST, BignumToFixed(), DCHECK, EstimatePower(), v8::internal::Double::Exponent(), FixupMultiply10(), GenerateCountedDigits(), GenerateShortestDigits(), InitialScaledStartValues(), v8::internal::Bignum::kMaxSignificantBits, mode(), NormalizedExponent(), v8::internal::Double::Significand(), and UNREACHABLE.

Referenced by DoubleToAscii().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BignumStrtod()

static double v8::internal::BignumStrtod ( Vector< const char >  buffer,
int  exponent,
double  guess 
)
static

Definition at line 352 of file strtod.cc.

354  {
355  if (guess == V8_INFINITY) {
356  return guess;
357  }
358 
359  DiyFp upper_boundary = Double(guess).UpperBoundary();
360 
361  DCHECK(buffer.length() + exponent <= kMaxDecimalPower + 1);
362  DCHECK(buffer.length() + exponent > kMinDecimalPower);
364  // Make sure that the Bignum will be able to hold all our numbers.
365  // Our Bignum implementation has a separate field for exponents. Shifts will
366  // consume at most one bigit (< 64 bits).
367  // ln(10) == 3.3219...
368  DCHECK(((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits);
369  Bignum input;
370  Bignum boundary;
371  input.AssignDecimalString(buffer);
372  boundary.AssignUInt64(upper_boundary.f());
373  if (exponent >= 0) {
374  input.MultiplyByPowerOfTen(exponent);
375  } else {
376  boundary.MultiplyByPowerOfTen(-exponent);
377  }
378  if (upper_boundary.e() > 0) {
379  boundary.ShiftLeft(upper_boundary.e());
380  } else {
381  input.ShiftLeft(-upper_boundary.e());
382  }
383  int comparison = Bignum::Compare(input, boundary);
384  if (comparison < 0) {
385  return guess;
386  } else if (comparison > 0) {
387  return Double(guess).NextDouble();
388  } else if ((Double(guess).Significand() & 1) == 0) {
389  // Round towards even.
390  return guess;
391  } else {
392  return Double(guess).NextDouble();
393  }
394 }
int length() const
Definition: vector.h:41
#define V8_INFINITY
Definition: globals.h:25
int Compare(const T &a, const T &b)
Definition: utils.h:96
static const int kMaxSignificantDecimalDigits
Definition: strtod.cc:71
static const int kMaxDecimalPower
Definition: strtod.cc:33
static const int kMinDecimalPower
Definition: strtod.cc:34

References v8::internal::Bignum::AssignDecimalString(), v8::internal::Bignum::AssignUInt64(), v8::internal::Bignum::Compare(), DCHECK, v8::internal::DiyFp::e(), v8::internal::DiyFp::f(), kMaxDecimalPower, v8::internal::Bignum::kMaxSignificantBits, kMaxSignificantDecimalDigits, kMinDecimalPower, v8::internal::Vector< T >::length(), v8::internal::Bignum::MultiplyByPowerOfTen(), v8::internal::Double::NextDouble(), v8::internal::Bignum::ShiftLeft(), v8::internal::Double::UpperBoundary(), and V8_INFINITY.

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BignumToFixed()

static void v8::internal::BignumToFixed ( int  requested_digits,
int decimal_point,
Bignum numerator,
Bignum denominator,
Vector< char >  buffer,
int length 
)
static

Definition at line 289 of file bignum-dtoa.cc.

291  {
292  // Note that we have to look at more than just the requested_digits, since
293  // a number could be rounded up. Example: v=0.5 with requested_digits=0.
294  // Even though the power of v equals 0 we can't just stop here.
295  if (-(*decimal_point) > requested_digits) {
296  // The number is definitively too small.
297  // Ex: 0.001 with requested_digits == 1.
298  // Set decimal-point to -requested_digits. This is what Gay does.
299  // Note that it should not have any effect anyways since the string is
300  // empty.
301  *decimal_point = -requested_digits;
302  *length = 0;
303  return;
304  } else if (-(*decimal_point) == requested_digits) {
305  // We only need to verify if the number rounds down or up.
306  // Ex: 0.04 and 0.06 with requested_digits == 1.
307  DCHECK(*decimal_point == -requested_digits);
308  // Initially the fraction lies in range (1, 10]. Multiply the denominator
309  // by 10 so that we can compare more easily.
310  denominator->Times10();
311  if (Bignum::PlusCompare(*numerator, *numerator, *denominator) >= 0) {
312  // If the fraction is >= 0.5 then we have to include the rounded
313  // digit.
314  buffer[0] = '1';
315  *length = 1;
316  (*decimal_point)++;
317  } else {
318  // Note that we caught most of similar cases earlier.
319  *length = 0;
320  }
321  return;
322  } else {
323  // The requested digits correspond to the digits after the point.
324  // The variable 'needed_digits' includes the digits before the point.
325  int needed_digits = (*decimal_point) + requested_digits;
326  GenerateCountedDigits(needed_digits, decimal_point,
327  numerator, denominator,
328  buffer, length);
329  }
330 }

References DCHECK, GenerateCountedDigits(), v8::internal::Bignum::PlusCompare(), and v8::internal::Bignum::Times10().

Referenced by BignumDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BinarySearch()

template<SearchMode search_mode, typename T >
int v8::internal::BinarySearch ( T array,
Name name,
int  low,
int  high,
int  valid_entries 
)

Definition at line 2762 of file objects-inl.h.

2762  {
2763  uint32_t hash = name->Hash();
2764  int limit = high;
2765 
2766  DCHECK(low <= high);
2767 
2768  while (low != high) {
2769  int mid = (low + high) / 2;
2770  Name* mid_name = array->GetSortedKey(mid);
2771  uint32_t mid_hash = mid_name->Hash();
2772 
2773  if (mid_hash >= hash) {
2774  high = mid;
2775  } else {
2776  low = mid + 1;
2777  }
2778  }
2779 
2780  for (; low <= limit; ++low) {
2781  int sort_index = array->GetSortedKeyIndex(low);
2782  Name* entry = array->GetKey(sort_index);
2783  if (entry->Hash() != hash) break;
2784  if (entry->Equals(name)) {
2785  if (search_mode == ALL_ENTRIES || sort_index < valid_entries) {
2786  return sort_index;
2787  }
2788  return T::kNotFound;
2789  }
2790  }
2791 
2792  return T::kNotFound;
2793 }

References ALL_ENTRIES, DCHECK, v8::internal::Name::Equals(), v8::internal::Name::Hash(), and name.

+ Here is the call graph for this function:

◆ BitSize()

template<typename S >
static int v8::internal::BitSize ( S  value)
static

Definition at line 22 of file bignum.cc.

22  {
23  return 8 * sizeof(value);
24 }

Referenced by v8::internal::Bignum::AssignUInt16().

+ Here is the caller graph for this function:

◆ BOOL_ACCESSORS() [1/7]

kFeedbackVectorOffset kHiddenPrototypeBit v8::internal::BOOL_ACCESSORS ( FunctionTemplateInfo  ,
flag  ,
needs_access_check  ,
kNeedsAccessCheckBit   
)

◆ BOOL_ACCESSORS() [2/7]

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit v8::internal::BOOL_ACCESSORS ( FunctionTemplateInfo  ,
flag  ,
remove_prototype  ,
kRemovePrototypeBit   
)

◆ BOOL_ACCESSORS() [3/7]

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit v8::internal::BOOL_ACCESSORS ( SharedFunctionInfo  ,
compiler_hints  ,
allows_lazy_compilation  ,
kAllowLazyCompilation   
)

◆ BOOL_ACCESSORS() [4/7]

v8::internal::BOOL_ACCESSORS ( SharedFunctionInfo  ,
compiler_hints  ,
inline_builtin  ,
kInlineBuiltin   
)

◆ BOOL_ACCESSORS() [5/7]

kNameShouldPrintAsAnonymous v8::internal::BOOL_ACCESSORS ( SharedFunctionInfo  ,
compiler_hints  ,
is_concise_method  ,
kIsConciseMethod   
)

Definition at line 5593 of file objects-inl.h.

5601  {
5602  Object* src = this->source();
5603  if (!src->IsString()) return true;
5604  String* src_str = String::cast(src);
5605  if (!StringShape(src_str).IsExternal()) return true;
5606  if (src_str->IsOneByteRepresentation()) {
5607  return ExternalOneByteString::cast(src)->resource() != NULL;
5608  } else if (src_str->IsTwoByteRepresentation()) {
5609  return ExternalTwoByteString::cast(src)->resource() != NULL;
5610  }
5611  return true;
5612 }

References v8::internal::String::IsOneByteRepresentation(), v8::internal::String::IsTwoByteRepresentation(), and NULL.

+ Here is the call graph for this function:

◆ BOOL_ACCESSORS() [6/7]

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext v8::internal::BOOL_ACCESSORS ( SharedFunctionInfo  ,
compiler_hints  ,
uses_arguments  ,
kUsesArguments   
)

◆ BOOL_ACCESSORS() [7/7]

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit v8::internal::BOOL_ACCESSORS ( SharedFunctionInfo  ,
start_position_and_type  ,
is_expression  ,
kIsExpressionBit   
)

◆ BOOL_GETTER()

kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset kProfilerTicksOffset v8::internal::BOOL_GETTER ( SharedFunctionInfo  ,
compiler_hints  ,
optimization_disabled  ,
kOptimizationDisabled   
)

Definition at line 5534 of file objects-inl.h.

5540  {
5541  set_compiler_hints(BooleanBit::set(compiler_hints(),
5542  kOptimizationDisabled,
5543  disable));
5544  // If disabling optimizations we reflect that in the code object so
5545  // it will not be counted as optimizable code.
5546  if ((code()->kind() == Code::FUNCTION) && disable) {
5547  code()->set_optimizable(false);
5548  }
5549 }
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit compiler_hints
Definition: objects-inl.h:5439

References v8::internal::SharedFunctionInfo::compiler_hints(), v8::internal::SharedFunctionInfo::kind(), v8::internal::SharedFunctionInfo::kOptimizationDisabled, v8::internal::BooleanBit::set(), and v8::internal::SharedFunctionInfo::set_compiler_hints().

+ Here is the call graph for this function:

◆ BoundsCheckKeyMatch()

static bool v8::internal::BoundsCheckKeyMatch ( void *  key1,
void *  key2 
)
static

Definition at line 295 of file hydrogen-bce.cc.

295  {
296  BoundsCheckKey* k1 = static_cast<BoundsCheckKey*>(key1);
297  BoundsCheckKey* k2 = static_cast<BoundsCheckKey*>(key2);
298  return k1->IndexBase() == k2->IndexBase() && k1->Length() == k2->Length();
299 }

References v8::internal::BoundsCheckKey::IndexBase(), and v8::internal::BoundsCheckKey::Length().

+ Here is the call graph for this function:

◆ BranchCondition() [1/4]

static Condition v8::internal::BranchCondition ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2631 of file lithium-codegen-arm.cc.

2631  {
2632  InstanceType from = instr->from();
2633  InstanceType to = instr->to();
2634  if (from == to) return eq;
2635  if (to == LAST_TYPE) return hs;
2636  if (from == FIRST_TYPE) return ls;
2637  UNREACHABLE();
2638  return eq;
2639 }

References eq, FIRST_TYPE, hs, LAST_TYPE, ls, to(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ BranchCondition() [2/4]

static Condition v8::internal::BranchCondition ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 3000 of file lithium-codegen-arm64.cc.

3000  {
3001  InstanceType from = instr->from();
3002  InstanceType to = instr->to();
3003  if (from == to) return eq;
3004  if (to == LAST_TYPE) return hs;
3005  if (from == FIRST_TYPE) return ls;
3006  UNREACHABLE();
3007  return eq;
3008 }

References eq, FIRST_TYPE, hs, LAST_TYPE, ls, to(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ BranchCondition() [3/4]

static Condition v8::internal::BranchCondition ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2534 of file lithium-codegen-mips.cc.

2534  {
2535  InstanceType from = instr->from();
2536  InstanceType to = instr->to();
2537  if (from == to) return eq;
2538  if (to == LAST_TYPE) return hs;
2539  if (from == FIRST_TYPE) return ls;
2540  UNREACHABLE();
2541  return eq;
2542 }

References eq, FIRST_TYPE, hs, LAST_TYPE, ls, to(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ BranchCondition() [4/4]

static Condition v8::internal::BranchCondition ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2504 of file lithium-codegen-mips64.cc.

2504  {
2505  InstanceType from = instr->from();
2506  InstanceType to = instr->to();
2507  if (from == to) return eq;
2508  if (to == LAST_TYPE) return hs;
2509  if (from == FIRST_TYPE) return ls;
2510  UNREACHABLE();
2511  return eq;
2512 }

References eq, FIRST_TYPE, hs, LAST_TYPE, ls, to(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ BUILTIN() [1/15]

v8::internal::BUILTIN ( ArrayConcat  )

Definition at line 920 of file builtins.cc.

920  {
921  HandleScope scope(isolate);
922 
923  int n_arguments = args.length();
924  int result_len = 0;
925  ElementsKind elements_kind = GetInitialFastElementsKind();
926  bool has_double = false;
927  {
929  Heap* heap = isolate->heap();
930  Context* native_context = isolate->context()->native_context();
931  JSObject* array_proto =
932  JSObject::cast(native_context->array_function()->prototype());
933  if (!ArrayPrototypeHasNoElements(heap, native_context, array_proto)) {
934  AllowHeapAllocation allow_allocation;
935  return CallJsBuiltin(isolate, "ArrayConcatJS", args);
936  }
937 
938  // Iterate through all the arguments performing checks
939  // and calculating total length.
940  bool is_holey = false;
941  for (int i = 0; i < n_arguments; i++) {
942  Object* arg = args[i];
943  PrototypeIterator iter(isolate, arg);
944  if (!arg->IsJSArray() || !JSArray::cast(arg)->HasFastElements() ||
945  iter.GetCurrent() != array_proto) {
946  AllowHeapAllocation allow_allocation;
947  return CallJsBuiltin(isolate, "ArrayConcatJS", args);
948  }
949  int len = Smi::cast(JSArray::cast(arg)->length())->value();
950 
951  // We shouldn't overflow when adding another len.
952  const int kHalfOfMaxInt = 1 << (kBitsPerInt - 2);
953  STATIC_ASSERT(FixedArray::kMaxLength < kHalfOfMaxInt);
954  USE(kHalfOfMaxInt);
955  result_len += len;
956  DCHECK(result_len >= 0);
957 
958  if (result_len > FixedDoubleArray::kMaxLength) {
959  AllowHeapAllocation allow_allocation;
960  return CallJsBuiltin(isolate, "ArrayConcatJS", args);
961  }
962 
963  ElementsKind arg_kind = JSArray::cast(arg)->map()->elements_kind();
964  has_double = has_double || IsFastDoubleElementsKind(arg_kind);
965  is_holey = is_holey || IsFastHoleyElementsKind(arg_kind);
966  if (IsMoreGeneralElementsKindTransition(elements_kind, arg_kind)) {
967  elements_kind = arg_kind;
968  }
969  }
970  if (is_holey) elements_kind = GetHoleyElementsKind(elements_kind);
971  }
972 
973  // If a double array is concatted into a fast elements array, the fast
974  // elements array needs to be initialized to contain proper holes, since
975  // boxing doubles may cause incremental marking.
977  has_double && IsFastObjectElementsKind(elements_kind)
979  Handle<JSArray> result_array =
980  isolate->factory()->NewJSArray(elements_kind,
981  result_len,
982  result_len,
983  mode);
984  if (result_len == 0) return *result_array;
985 
986  int j = 0;
987  Handle<FixedArrayBase> storage(result_array->elements(), isolate);
988  ElementsAccessor* accessor = ElementsAccessor::ForKind(elements_kind);
989  for (int i = 0; i < n_arguments; i++) {
990  // It is crucial to keep |array| in a raw pointer form to avoid performance
991  // degradation.
992  JSArray* array = JSArray::cast(args[i]);
993  int len = Smi::cast(array->length())->value();
994  if (len > 0) {
995  ElementsKind from_kind = array->GetElementsKind();
996  accessor->CopyElements(array, 0, from_kind, storage, j, len);
997  j += len;
998  }
999  }
1000 
1001  DCHECK(j == result_len);
1002 
1003  return *result_array;
1004 }
void USE(T)
Definition: macros.h:322
#define STATIC_ASSERT(test)
Definition: macros.h:311
static bool ArrayPrototypeHasNoElements(Heap *heap, Context *native_context, JSObject *array_proto)
Definition: builtins.cc:185
const int kBitsPerInt
Definition: globals.h:165
bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind, ElementsKind to_kind)
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, true > AllowHeapAllocation
Definition: assert-scope.h:114
static MUST_USE_RESULT Object * CallJsBuiltin(Isolate *isolate, const char *name, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
Definition: builtins.cc:280
ElementsKind GetInitialFastElementsKind()
Definition: elements-kind.h:78
ArrayStorageAllocationMode
Definition: heap.h:511
bool IsFastObjectElementsKind(ElementsKind kind)

References ArrayPrototypeHasNoElements(), CallJsBuiltin(), v8::internal::ElementsAccessor::CopyElements(), DCHECK, DONT_INITIALIZE_ARRAY_ELEMENTS, v8::internal::ElementsAccessor::ForKind(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::JSObject::GetElementsKind(), GetHoleyElementsKind(), GetInitialFastElementsKind(), INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, IsFastDoubleElementsKind(), IsFastHoleyElementsKind(), IsFastObjectElementsKind(), IsMoreGeneralElementsKindTransition(), kBitsPerInt, v8::internal::FixedArray::kMaxLength, v8::internal::FixedDoubleArray::kMaxLength, mode(), v8::internal::Context::native_context(), STATIC_ASSERT(), and USE().

+ Here is the call graph for this function:

◆ BUILTIN() [2/15]

v8::internal::BUILTIN ( ArrayPop  )

Definition at line 418 of file builtins.cc.

418  {
419  HandleScope scope(isolate);
420  Handle<Object> receiver = args.receiver();
421  MaybeHandle<FixedArrayBase> maybe_elms_obj =
422  EnsureJSArrayWithWritableFastElements(isolate, receiver, NULL, 0);
423  Handle<FixedArrayBase> elms_obj;
424  if (!maybe_elms_obj.ToHandle(&elms_obj)) {
425  return CallJsBuiltin(isolate, "ArrayPop", args);
426  }
427 
428  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
429  DCHECK(!array->map()->is_observed());
430 
431  int len = Smi::cast(array->length())->value();
432  if (len == 0) return isolate->heap()->undefined_value();
433 
434  ElementsAccessor* accessor = array->GetElementsAccessor();
435  int new_length = len - 1;
436  Handle<Object> element =
437  accessor->Get(array, array, new_length, elms_obj).ToHandleChecked();
438  if (element->IsTheHole()) {
439  return CallJsBuiltin(isolate, "ArrayPop", args);
440  }
442  isolate,
443  accessor->SetLength(array, handle(Smi::FromInt(new_length), isolate)));
444  return *element;
445 }
Handle< T > handle(T *t, Isolate *isolate)
Definition: handles.h:146
static MUST_USE_RESULT MaybeHandle< FixedArrayBase > EnsureJSArrayWithWritableFastElements(Isolate *isolate, Handle< Object > receiver, Arguments *args, int first_added_arg)
Definition: builtins.cc:207

References CallJsBuiltin(), v8::internal::Handle< T >::cast(), DCHECK, EnsureJSArrayWithWritableFastElements(), v8::internal::Smi::FromInt(), v8::internal::ElementsAccessor::Get(), handle(), NULL, RETURN_FAILURE_ON_EXCEPTION, and v8::internal::ElementsAccessor::SetLength().

+ Here is the call graph for this function:

◆ BUILTIN() [3/15]

v8::internal::BUILTIN ( ArrayPush  )

Definition at line 308 of file builtins.cc.

308  {
309  HandleScope scope(isolate);
310  Handle<Object> receiver = args.receiver();
311  MaybeHandle<FixedArrayBase> maybe_elms_obj =
312  EnsureJSArrayWithWritableFastElements(isolate, receiver, &args, 1);
313  Handle<FixedArrayBase> elms_obj;
314  if (!maybe_elms_obj.ToHandle(&elms_obj)) {
315  return CallJsBuiltin(isolate, "ArrayPush", args);
316  }
317 
318  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
319  int len = Smi::cast(array->length())->value();
320  int to_add = args.length() - 1;
321  if (to_add > 0 && JSArray::WouldChangeReadOnlyLength(array, len + to_add)) {
322  return CallJsBuiltin(isolate, "ArrayPush", args);
323  }
324  DCHECK(!array->map()->is_observed());
325 
326  ElementsKind kind = array->GetElementsKind();
327 
328  if (IsFastSmiOrObjectElementsKind(kind)) {
329  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
330  if (to_add == 0) {
331  return Smi::FromInt(len);
332  }
333  // Currently fixed arrays cannot grow too big, so
334  // we should never hit this case.
335  DCHECK(to_add <= (Smi::kMaxValue - len));
336 
337  int new_length = len + to_add;
338 
339  if (new_length > elms->length()) {
340  // New backing storage is needed.
341  int capacity = new_length + (new_length >> 1) + 16;
342  Handle<FixedArray> new_elms =
343  isolate->factory()->NewUninitializedFixedArray(capacity);
344 
345  ElementsAccessor* accessor = array->GetElementsAccessor();
346  accessor->CopyElements(
347  elms_obj, 0, kind, new_elms, 0,
348  ElementsAccessor::kCopyToEndAndInitializeToHole);
349 
350  elms = new_elms;
351  }
352 
353  // Add the provided values.
355  WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc);
356  for (int index = 0; index < to_add; index++) {
357  elms->set(index + len, args[index + 1], mode);
358  }
359 
360  if (*elms != array->elements()) {
361  array->set_elements(*elms);
362  }
363 
364  // Set the length.
365  array->set_length(Smi::FromInt(new_length));
366  return Smi::FromInt(new_length);
367  } else {
368  int elms_len = elms_obj->length();
369  if (to_add == 0) {
370  return Smi::FromInt(len);
371  }
372  // Currently fixed arrays cannot grow too big, so
373  // we should never hit this case.
374  DCHECK(to_add <= (Smi::kMaxValue - len));
375 
376  int new_length = len + to_add;
377 
378  Handle<FixedDoubleArray> new_elms;
379 
380  if (new_length > elms_len) {
381  // New backing storage is needed.
382  int capacity = new_length + (new_length >> 1) + 16;
383  // Create new backing store; since capacity > 0, we can
384  // safely cast to FixedDoubleArray.
385  new_elms = Handle<FixedDoubleArray>::cast(
386  isolate->factory()->NewFixedDoubleArray(capacity));
387 
388  ElementsAccessor* accessor = array->GetElementsAccessor();
389  accessor->CopyElements(
390  elms_obj, 0, kind, new_elms, 0,
391  ElementsAccessor::kCopyToEndAndInitializeToHole);
392 
393  } else {
394  // to_add is > 0 and new_length <= elms_len, so elms_obj cannot be the
395  // empty_fixed_array.
396  new_elms = Handle<FixedDoubleArray>::cast(elms_obj);
397  }
398 
399  // Add the provided values.
401  int index;
402  for (index = 0; index < to_add; index++) {
403  Object* arg = args[index + 1];
404  new_elms->set(index + len, arg->Number());
405  }
406 
407  if (*new_elms != array->elements()) {
408  array->set_elements(*new_elms);
409  }
410 
411  // Set the length.
412  array->set_length(Smi::FromInt(new_length));
413  return Smi::FromInt(new_length);
414  }
415 }
bool IsFastSmiOrObjectElementsKind(ElementsKind kind)

References CallJsBuiltin(), v8::internal::Handle< T >::cast(), v8::internal::ElementsAccessor::CopyElements(), DCHECK, EnsureJSArrayWithWritableFastElements(), v8::internal::Smi::FromInt(), IsFastSmiOrObjectElementsKind(), v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::Smi::kMaxValue, mode(), v8::internal::Object::Number(), and v8::internal::JSArray::WouldChangeReadOnlyLength().

+ Here is the call graph for this function:

◆ BUILTIN() [4/15]

v8::internal::BUILTIN ( ArrayShift  )

Definition at line 448 of file builtins.cc.

448  {
449  HandleScope scope(isolate);
450  Heap* heap = isolate->heap();
451  Handle<Object> receiver = args.receiver();
452  MaybeHandle<FixedArrayBase> maybe_elms_obj =
453  EnsureJSArrayWithWritableFastElements(isolate, receiver, NULL, 0);
454  Handle<FixedArrayBase> elms_obj;
455  if (!maybe_elms_obj.ToHandle(&elms_obj) ||
457  *Handle<JSArray>::cast(receiver))) {
458  return CallJsBuiltin(isolate, "ArrayShift", args);
459  }
460  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
461  DCHECK(!array->map()->is_observed());
462 
463  int len = Smi::cast(array->length())->value();
464  if (len == 0) return heap->undefined_value();
465 
466  // Get first element
467  ElementsAccessor* accessor = array->GetElementsAccessor();
468  Handle<Object> first =
469  accessor->Get(array, array, 0, elms_obj).ToHandleChecked();
470  if (first->IsTheHole()) {
471  return CallJsBuiltin(isolate, "ArrayShift", args);
472  }
473 
474  if (heap->CanMoveObjectStart(*elms_obj)) {
475  array->set_elements(heap->LeftTrimFixedArray(*elms_obj, 1));
476  } else {
477  // Shift the elements.
478  if (elms_obj->IsFixedArray()) {
479  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
481  heap->MoveElements(*elms, 0, 1, len - 1);
482  elms->set(len - 1, heap->the_hole_value());
483  } else {
484  Handle<FixedDoubleArray> elms = Handle<FixedDoubleArray>::cast(elms_obj);
485  MoveDoubleElements(*elms, 0, *elms, 1, len - 1);
486  elms->set_the_hole(len - 1);
487  }
488  }
489 
490  // Set the length.
491  array->set_length(Smi::FromInt(len - 1));
492 
493  return *first;
494 }
static void MoveDoubleElements(FixedDoubleArray *dst, int dst_index, FixedDoubleArray *src, int src_index, int len)
Definition: builtins.cc:177
static bool IsJSArrayFastElementMovingAllowed(Heap *heap, JSArray *receiver)
Definition: builtins.cc:267

References CallJsBuiltin(), v8::internal::Heap::CanMoveObjectStart(), v8::internal::Handle< T >::cast(), DCHECK, EnsureJSArrayWithWritableFastElements(), v8::internal::Smi::FromInt(), v8::internal::ElementsAccessor::Get(), IsJSArrayFastElementMovingAllowed(), v8::internal::Heap::LeftTrimFixedArray(), MoveDoubleElements(), v8::internal::Heap::MoveElements(), and NULL.

+ Here is the call graph for this function:

◆ BUILTIN() [5/15]

v8::internal::BUILTIN ( ArraySlice  )

Definition at line 562 of file builtins.cc.

562  {
563  HandleScope scope(isolate);
564  Heap* heap = isolate->heap();
565  Handle<Object> receiver = args.receiver();
566  int len = -1;
567  int relative_start = 0;
568  int relative_end = 0;
569  {
571  if (receiver->IsJSArray()) {
572  JSArray* array = JSArray::cast(*receiver);
573  if (!IsJSArrayFastElementMovingAllowed(heap, array)) {
574  AllowHeapAllocation allow_allocation;
575  return CallJsBuiltin(isolate, "ArraySlice", args);
576  }
577 
578  if (!array->HasFastElements()) {
579  AllowHeapAllocation allow_allocation;
580  return CallJsBuiltin(isolate, "ArraySlice", args);
581  }
582 
583  len = Smi::cast(array->length())->value();
584  } else {
585  // Array.slice(arguments, ...) is quite a common idiom (notably more
586  // than 50% of invocations in Web apps). Treat it in C++ as well.
587  Map* arguments_map =
588  isolate->context()->native_context()->sloppy_arguments_map();
589 
590  bool is_arguments_object_with_fast_elements =
591  receiver->IsJSObject() &&
592  JSObject::cast(*receiver)->map() == arguments_map;
593  if (!is_arguments_object_with_fast_elements) {
594  AllowHeapAllocation allow_allocation;
595  return CallJsBuiltin(isolate, "ArraySlice", args);
596  }
597  JSObject* object = JSObject::cast(*receiver);
598 
599  if (!object->HasFastElements()) {
600  AllowHeapAllocation allow_allocation;
601  return CallJsBuiltin(isolate, "ArraySlice", args);
602  }
603 
604  Object* len_obj = object->InObjectPropertyAt(Heap::kArgumentsLengthIndex);
605  if (!len_obj->IsSmi()) {
606  AllowHeapAllocation allow_allocation;
607  return CallJsBuiltin(isolate, "ArraySlice", args);
608  }
609  len = Smi::cast(len_obj)->value();
610  if (len > object->elements()->length()) {
611  AllowHeapAllocation allow_allocation;
612  return CallJsBuiltin(isolate, "ArraySlice", args);
613  }
614  }
615 
616  DCHECK(len >= 0);
617  int n_arguments = args.length() - 1;
618 
619  // Note carefully choosen defaults---if argument is missing,
620  // it's undefined which gets converted to 0 for relative_start
621  // and to len for relative_end.
622  relative_start = 0;
623  relative_end = len;
624  if (n_arguments > 0) {
625  Object* arg1 = args[1];
626  if (arg1->IsSmi()) {
627  relative_start = Smi::cast(arg1)->value();
628  } else if (arg1->IsHeapNumber()) {
629  double start = HeapNumber::cast(arg1)->value();
630  if (start < kMinInt || start > kMaxInt) {
631  AllowHeapAllocation allow_allocation;
632  return CallJsBuiltin(isolate, "ArraySlice", args);
633  }
634  relative_start = std::isnan(start) ? 0 : static_cast<int>(start);
635  } else if (!arg1->IsUndefined()) {
636  AllowHeapAllocation allow_allocation;
637  return CallJsBuiltin(isolate, "ArraySlice", args);
638  }
639  if (n_arguments > 1) {
640  Object* arg2 = args[2];
641  if (arg2->IsSmi()) {
642  relative_end = Smi::cast(arg2)->value();
643  } else if (arg2->IsHeapNumber()) {
644  double end = HeapNumber::cast(arg2)->value();
645  if (end < kMinInt || end > kMaxInt) {
646  AllowHeapAllocation allow_allocation;
647  return CallJsBuiltin(isolate, "ArraySlice", args);
648  }
649  relative_end = std::isnan(end) ? 0 : static_cast<int>(end);
650  } else if (!arg2->IsUndefined()) {
651  AllowHeapAllocation allow_allocation;
652  return CallJsBuiltin(isolate, "ArraySlice", args);
653  }
654  }
655  }
656  }
657 
658  // ECMAScript 232, 3rd Edition, Section 15.4.4.10, step 6.
659  int k = (relative_start < 0) ? Max(len + relative_start, 0)
660  : Min(relative_start, len);
661 
662  // ECMAScript 232, 3rd Edition, Section 15.4.4.10, step 8.
663  int final = (relative_end < 0) ? Max(len + relative_end, 0)
664  : Min(relative_end, len);
665 
666  // Calculate the length of result array.
667  int result_len = Max(final - k, 0);
668 
669  Handle<JSObject> object = Handle<JSObject>::cast(receiver);
670  Handle<FixedArrayBase> elms(object->elements(), isolate);
671 
672  ElementsKind kind = object->GetElementsKind();
673  if (IsHoleyElementsKind(kind)) {
675  bool packed = true;
676  ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
677  for (int i = k; i < final; i++) {
678  if (!accessor->HasElement(object, object, i, elms)) {
679  packed = false;
680  break;
681  }
682  }
683  if (packed) {
684  kind = GetPackedElementsKind(kind);
685  } else if (!receiver->IsJSArray()) {
686  AllowHeapAllocation allow_allocation;
687  return CallJsBuiltin(isolate, "ArraySlice", args);
688  }
689  }
690 
691  Handle<JSArray> result_array =
692  isolate->factory()->NewJSArray(kind, result_len, result_len);
693 
695  if (result_len == 0) return *result_array;
696 
697  ElementsAccessor* accessor = object->GetElementsAccessor();
698  accessor->CopyElements(
699  elms, k, kind, handle(result_array->elements(), isolate), 0, result_len);
700  return *result_array;
701 }
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
ElementsKind GetPackedElementsKind(ElementsKind holey_kind)
bool IsHoleyElementsKind(ElementsKind kind)
const int kMaxInt
Definition: globals.h:109
int isnan(double x)

References CallJsBuiltin(), v8::internal::Handle< T >::cast(), v8::internal::ElementsAccessor::CopyElements(), DCHECK, v8::internal::ElementsAccessor::ForKind(), GetPackedElementsKind(), handle(), v8::internal::ElementsAccessor::HasElement(), v8::internal::JSObject::HasFastElements(), IsHoleyElementsKind(), IsJSArrayFastElementMovingAllowed(), v8::internal::Heap::kArgumentsLengthIndex, kMaxInt, Max(), and Min().

+ Here is the call graph for this function:

◆ BUILTIN() [6/15]

v8::internal::BUILTIN ( ArraySplice  )

Definition at line 704 of file builtins.cc.

704  {
705  HandleScope scope(isolate);
706  Heap* heap = isolate->heap();
707  Handle<Object> receiver = args.receiver();
708  MaybeHandle<FixedArrayBase> maybe_elms_obj =
709  EnsureJSArrayWithWritableFastElements(isolate, receiver, &args, 3);
710  Handle<FixedArrayBase> elms_obj;
711  if (!maybe_elms_obj.ToHandle(&elms_obj) ||
713  *Handle<JSArray>::cast(receiver))) {
714  return CallJsBuiltin(isolate, "ArraySplice", args);
715  }
716  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
717  DCHECK(!array->map()->is_observed());
718 
719  int len = Smi::cast(array->length())->value();
720 
721  int n_arguments = args.length() - 1;
722 
723  int relative_start = 0;
724  if (n_arguments > 0) {
726  Object* arg1 = args[1];
727  if (arg1->IsSmi()) {
728  relative_start = Smi::cast(arg1)->value();
729  } else if (arg1->IsHeapNumber()) {
730  double start = HeapNumber::cast(arg1)->value();
731  if (start < kMinInt || start > kMaxInt) {
732  AllowHeapAllocation allow_allocation;
733  return CallJsBuiltin(isolate, "ArraySplice", args);
734  }
735  relative_start = std::isnan(start) ? 0 : static_cast<int>(start);
736  } else if (!arg1->IsUndefined()) {
737  AllowHeapAllocation allow_allocation;
738  return CallJsBuiltin(isolate, "ArraySplice", args);
739  }
740  }
741  int actual_start = (relative_start < 0) ? Max(len + relative_start, 0)
742  : Min(relative_start, len);
743 
744  // SpiderMonkey, TraceMonkey and JSC treat the case where no delete count is
745  // given as a request to delete all the elements from the start.
746  // And it differs from the case of undefined delete count.
747  // This does not follow ECMA-262, but we do the same for
748  // compatibility.
749  int actual_delete_count;
750  if (n_arguments == 1) {
751  DCHECK(len - actual_start >= 0);
752  actual_delete_count = len - actual_start;
753  } else {
754  int value = 0; // ToInteger(undefined) == 0
755  if (n_arguments > 1) {
757  Object* arg2 = args[2];
758  if (arg2->IsSmi()) {
759  value = Smi::cast(arg2)->value();
760  } else {
761  AllowHeapAllocation allow_allocation;
762  return CallJsBuiltin(isolate, "ArraySplice", args);
763  }
764  }
765  actual_delete_count = Min(Max(value, 0), len - actual_start);
766  }
767 
768  ElementsKind elements_kind = array->GetElementsKind();
769 
770  int item_count = (n_arguments > 1) ? (n_arguments - 2) : 0;
771  int new_length = len - actual_delete_count + item_count;
772 
773  // For double mode we do not support changing the length.
774  if (new_length > len && IsFastDoubleElementsKind(elements_kind)) {
775  return CallJsBuiltin(isolate, "ArraySplice", args);
776  }
777 
778  if (new_length == 0) {
779  Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(
780  elms_obj, elements_kind, actual_delete_count);
781  array->set_elements(heap->empty_fixed_array());
782  array->set_length(Smi::FromInt(0));
783  return *result;
784  }
785 
786  Handle<JSArray> result_array =
787  isolate->factory()->NewJSArray(elements_kind,
788  actual_delete_count,
789  actual_delete_count);
790 
791  if (actual_delete_count > 0) {
793  ElementsAccessor* accessor = array->GetElementsAccessor();
794  accessor->CopyElements(
795  elms_obj, actual_start, elements_kind,
796  handle(result_array->elements(), isolate), 0, actual_delete_count);
797  }
798 
799  bool elms_changed = false;
800  if (item_count < actual_delete_count) {
801  // Shrink the array.
802  const bool trim_array = !heap->lo_space()->Contains(*elms_obj) &&
803  ((actual_start + item_count) <
804  (len - actual_delete_count - actual_start));
805  if (trim_array) {
806  const int delta = actual_delete_count - item_count;
807 
808  if (elms_obj->IsFixedDoubleArray()) {
809  Handle<FixedDoubleArray> elms =
810  Handle<FixedDoubleArray>::cast(elms_obj);
811  MoveDoubleElements(*elms, delta, *elms, 0, actual_start);
812  } else {
813  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
815  heap->MoveElements(*elms, delta, 0, actual_start);
816  }
817 
818  if (heap->CanMoveObjectStart(*elms_obj)) {
819  // On the fast path we move the start of the object in memory.
820  elms_obj = handle(heap->LeftTrimFixedArray(*elms_obj, delta));
821  } else {
822  // This is the slow path. We are going to move the elements to the left
823  // by copying them. For trimmed values we store the hole.
824  if (elms_obj->IsFixedDoubleArray()) {
825  Handle<FixedDoubleArray> elms =
826  Handle<FixedDoubleArray>::cast(elms_obj);
827  MoveDoubleElements(*elms, 0, *elms, delta, len - delta);
828  elms->FillWithHoles(len - delta, len);
829  } else {
830  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
832  heap->MoveElements(*elms, 0, delta, len - delta);
833  elms->FillWithHoles(len - delta, len);
834  }
835  }
836  elms_changed = true;
837  } else {
838  if (elms_obj->IsFixedDoubleArray()) {
839  Handle<FixedDoubleArray> elms =
840  Handle<FixedDoubleArray>::cast(elms_obj);
841  MoveDoubleElements(*elms, actual_start + item_count,
842  *elms, actual_start + actual_delete_count,
843  (len - actual_delete_count - actual_start));
844  elms->FillWithHoles(new_length, len);
845  } else {
846  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
848  heap->MoveElements(*elms, actual_start + item_count,
849  actual_start + actual_delete_count,
850  (len - actual_delete_count - actual_start));
851  elms->FillWithHoles(new_length, len);
852  }
853  }
854  } else if (item_count > actual_delete_count) {
855  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
856  // Currently fixed arrays cannot grow too big, so
857  // we should never hit this case.
858  DCHECK((item_count - actual_delete_count) <= (Smi::kMaxValue - len));
859 
860  // Check if array need to grow.
861  if (new_length > elms->length()) {
862  // New backing storage is needed.
863  int capacity = new_length + (new_length >> 1) + 16;
864  Handle<FixedArray> new_elms =
865  isolate->factory()->NewUninitializedFixedArray(capacity);
866 
868 
869  ElementsKind kind = array->GetElementsKind();
870  ElementsAccessor* accessor = array->GetElementsAccessor();
871  if (actual_start > 0) {
872  // Copy the part before actual_start as is.
873  accessor->CopyElements(
874  elms, 0, kind, new_elms, 0, actual_start);
875  }
876  accessor->CopyElements(
877  elms, actual_start + actual_delete_count, kind,
878  new_elms, actual_start + item_count,
879  ElementsAccessor::kCopyToEndAndInitializeToHole);
880 
881  elms_obj = new_elms;
882  elms_changed = true;
883  } else {
885  heap->MoveElements(*elms, actual_start + item_count,
886  actual_start + actual_delete_count,
887  (len - actual_delete_count - actual_start));
888  }
889  }
890 
891  if (IsFastDoubleElementsKind(elements_kind)) {
892  Handle<FixedDoubleArray> elms = Handle<FixedDoubleArray>::cast(elms_obj);
893  for (int k = actual_start; k < actual_start + item_count; k++) {
894  Object* arg = args[3 + k - actual_start];
895  if (arg->IsSmi()) {
896  elms->set(k, Smi::cast(arg)->value());
897  } else {
898  elms->set(k, HeapNumber::cast(arg)->value());
899  }
900  }
901  } else {
902  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
904  WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc);
905  for (int k = actual_start; k < actual_start + item_count; k++) {
906  elms->set(k, args[3 + k - actual_start], mode);
907  }
908  }
909 
910  if (elms_changed) {
911  array->set_elements(*elms_obj);
912  }
913  // Set the length.
914  array->set_length(Smi::FromInt(new_length));
915 
916  return *result_array;
917 }

References CallJsBuiltin(), v8::internal::Heap::CanMoveObjectStart(), v8::internal::Handle< T >::cast(), v8::internal::LargeObjectSpace::Contains(), v8::internal::ElementsAccessor::CopyElements(), DCHECK, EnsureJSArrayWithWritableFastElements(), v8::internal::Smi::FromInt(), handle(), IsFastDoubleElementsKind(), IsJSArrayFastElementMovingAllowed(), v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, kMaxInt, v8::internal::Smi::kMaxValue, v8::internal::Heap::LeftTrimFixedArray(), v8::internal::Heap::lo_space(), Max(), Min(), mode(), MoveDoubleElements(), and v8::internal::Heap::MoveElements().

+ Here is the call graph for this function:

◆ BUILTIN() [7/15]

v8::internal::BUILTIN ( ArrayUnshift  )

Definition at line 497 of file builtins.cc.

497  {
498  HandleScope scope(isolate);
499  Heap* heap = isolate->heap();
500  Handle<Object> receiver = args.receiver();
501  MaybeHandle<FixedArrayBase> maybe_elms_obj =
502  EnsureJSArrayWithWritableFastElements(isolate, receiver, NULL, 0);
503  Handle<FixedArrayBase> elms_obj;
504  if (!maybe_elms_obj.ToHandle(&elms_obj) ||
506  *Handle<JSArray>::cast(receiver))) {
507  return CallJsBuiltin(isolate, "ArrayUnshift", args);
508  }
509  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
510  DCHECK(!array->map()->is_observed());
511  if (!array->HasFastSmiOrObjectElements()) {
512  return CallJsBuiltin(isolate, "ArrayUnshift", args);
513  }
514  int len = Smi::cast(array->length())->value();
515  int to_add = args.length() - 1;
516  int new_length = len + to_add;
517  // Currently fixed arrays cannot grow too big, so
518  // we should never hit this case.
519  DCHECK(to_add <= (Smi::kMaxValue - len));
520 
521  if (to_add > 0 && JSArray::WouldChangeReadOnlyLength(array, len + to_add)) {
522  return CallJsBuiltin(isolate, "ArrayUnshift", args);
523  }
524 
525  Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj);
526 
527  JSObject::EnsureCanContainElements(array, &args, 1, to_add,
529 
530  if (new_length > elms->length()) {
531  // New backing storage is needed.
532  int capacity = new_length + (new_length >> 1) + 16;
533  Handle<FixedArray> new_elms =
534  isolate->factory()->NewUninitializedFixedArray(capacity);
535 
536  ElementsKind kind = array->GetElementsKind();
537  ElementsAccessor* accessor = array->GetElementsAccessor();
538  accessor->CopyElements(
539  elms, 0, kind, new_elms, to_add,
540  ElementsAccessor::kCopyToEndAndInitializeToHole);
541 
542  elms = new_elms;
543  array->set_elements(*elms);
544  } else {
546  heap->MoveElements(*elms, to_add, 0, len);
547  }
548 
549  // Add the provided values.
551  WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc);
552  for (int i = 0; i < to_add; i++) {
553  elms->set(i, args[i + 1], mode);
554  }
555 
556  // Set the length.
557  array->set_length(Smi::FromInt(new_length));
558  return Smi::FromInt(new_length);
559 }

References CallJsBuiltin(), v8::internal::Handle< T >::cast(), v8::internal::ElementsAccessor::CopyElements(), DCHECK, DONT_ALLOW_DOUBLE_ELEMENTS, v8::internal::JSObject::EnsureCanContainElements(), EnsureJSArrayWithWritableFastElements(), v8::internal::Smi::FromInt(), IsJSArrayFastElementMovingAllowed(), v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::Smi::kMaxValue, mode(), v8::internal::Heap::MoveElements(), NULL, and v8::internal::JSArray::WouldChangeReadOnlyLength().

+ Here is the call graph for this function:

◆ BUILTIN() [8/15]

v8::internal::BUILTIN ( EmptyFunction  )

Definition at line 172 of file builtins.cc.

172  {
173  return isolate->heap()->undefined_value();
174 }

◆ BUILTIN() [9/15]

v8::internal::BUILTIN ( GeneratorPoisonPill  )

Definition at line 1019 of file builtins.cc.

1019  {
1020  HandleScope scope(isolate);
1022  isolate,
1023  NewTypeError("generator_poison_pill", HandleVector<Object>(NULL, 0)));
1024 }
#define THROW_NEW_ERROR_RETURN_FAILURE(isolate, call)
Definition: isolate.h:146

References NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ BUILTIN() [10/15]

v8::internal::BUILTIN ( HandleApiCall  )

Definition at line 1161 of file builtins.cc.

1161  {
1162  return HandleApiCallHelper<false>(args, isolate);
1163 }

◆ BUILTIN() [11/15]

v8::internal::BUILTIN ( HandleApiCallAsConstructor  )

Definition at line 1237 of file builtins.cc.

1237  {
1238  return HandleApiCallAsFunctionOrConstructor(isolate, true, args);
1239 }
static MUST_USE_RESULT Object * HandleApiCallAsFunctionOrConstructor(Isolate *isolate, bool is_construct_call, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
Definition: builtins.cc:1174

References HandleApiCallAsFunctionOrConstructor().

+ Here is the call graph for this function:

◆ BUILTIN() [12/15]

v8::internal::BUILTIN ( HandleApiCallAsFunction  )

Definition at line 1230 of file builtins.cc.

1230  {
1231  return HandleApiCallAsFunctionOrConstructor(isolate, false, args);
1232 }

References HandleApiCallAsFunctionOrConstructor().

+ Here is the call graph for this function:

◆ BUILTIN() [13/15]

v8::internal::BUILTIN ( HandleApiCallConstruct  )

Definition at line 1166 of file builtins.cc.

1166  {
1167  return HandleApiCallHelper<true>(args, isolate);
1168 }

◆ BUILTIN() [14/15]

v8::internal::BUILTIN ( Illegal  )

Definition at line 166 of file builtins.cc.

166  {
167  UNREACHABLE();
168  return isolate->heap()->undefined_value(); // Make compiler happy.
169 }

References UNREACHABLE.

◆ BUILTIN() [15/15]

v8::internal::BUILTIN ( StrictModePoisonPill  )

Definition at line 1011 of file builtins.cc.

1011  {
1012  HandleScope scope(isolate);
1014  isolate,
1015  NewTypeError("strict_poison_pill", HandleVector<Object>(NULL, 0)));
1016 }

References NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ CacheInitialJSArrayMaps()

Handle< Object > v8::internal::CacheInitialJSArrayMaps ( Handle< Context native_context,
Handle< Map initial_map 
)

Definition at line 9355 of file objects.cc.

9356  {
9357  // Replace all of the cached initial array maps in the native context with
9358  // the appropriate transitioned elements kind maps.
9359  Factory* factory = native_context->GetIsolate()->factory();
9360  Handle<FixedArray> maps = factory->NewFixedArrayWithHoles(
9362 
9363  Handle<Map> current_map = initial_map;
9364  ElementsKind kind = current_map->elements_kind();
9366  maps->set(kind, *current_map);
9367  for (int i = GetSequenceIndexFromFastElementsKind(kind) + 1;
9368  i < kFastElementsKindCount; ++i) {
9369  Handle<Map> new_map;
9371  if (current_map->HasElementsTransition()) {
9372  new_map = handle(current_map->elements_transition_map());
9373  DCHECK(new_map->elements_kind() == next_kind);
9374  } else {
9375  new_map = Map::CopyAsElementsKind(
9376  current_map, next_kind, INSERT_TRANSITION);
9377  }
9378  maps->set(next_kind, *new_map);
9379  current_map = new_map;
9380  }
9381  native_context->set_js_array_maps(*maps);
9382  return initial_map;
9383 }
ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_number)
const int kElementsKindCount
Definition: elements-kind.h:66
int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind)
const int kFastElementsKindCount
Definition: elements-kind.h:67

References v8::internal::Map::CopyAsElementsKind(), DCHECK, GetFastElementsKindFromSequenceIndex(), GetInitialFastElementsKind(), GetSequenceIndexFromFastElementsKind(), handle(), INSERT_TRANSITION, kElementsKindCount, kFastElementsKindCount, and TENURED.

Referenced by v8::internal::JSFunction::SetInstancePrototype().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcLSPairDataSize()

LSDataSize v8::internal::CalcLSPairDataSize ( LoadStorePairOp  op)

Referenced by v8::internal::Instruction::SizeLSPair().

+ Here is the caller graph for this function:

◆ CalculateLineEndsImpl()

template<typename SourceChar >
static void v8::internal::CalculateLineEndsImpl ( Isolate isolate,
List< int > *  line_ends,
Vector< const SourceChar >  src,
bool  include_ending_line 
)
static

Definition at line 8460 of file objects.cc.

8463  {
8464  const int src_len = src.length();
8465  StringSearch<uint8_t, SourceChar> search(isolate, STATIC_CHAR_VECTOR("\n"));
8466 
8467  // Find and record line ends.
8468  int position = 0;
8469  while (position != -1 && position < src_len) {
8470  position = search.Search(src, position);
8471  if (position != -1) {
8472  line_ends->Add(position);
8473  position++;
8474  } else if (include_ending_line) {
8475  // Even if the last line misses a line end, it is counted.
8476  line_ends->Add(src_len);
8477  return;
8478  }
8479  }
8480 }
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Definition: list-inl.h:17
#define STATIC_CHAR_VECTOR(x)
Definition: vector.h:154

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::Vector< T >::length(), v8::internal::StringSearch< PatternChar, SubjectChar >::Search(), and STATIC_CHAR_VECTOR.

Referenced by v8::internal::String::CalculateLineEnds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CallJsBuiltin()

static MUST_USE_RESULT Object* v8::internal::CallJsBuiltin ( Isolate isolate,
const char *  name,
BuiltinArguments< NO_EXTRA_ARGUMENTS args 
)
static

Definition at line 280 of file builtins.cc.

283  {
284  HandleScope handleScope(isolate);
285 
286  Handle<Object> js_builtin = Object::GetProperty(
287  isolate,
288  handle(isolate->native_context()->builtins(), isolate),
289  name).ToHandleChecked();
290  Handle<JSFunction> function = Handle<JSFunction>::cast(js_builtin);
291  int argc = args.length() - 1;
292  ScopedVector<Handle<Object> > argv(argc);
293  for (int i = 0; i < argc; ++i) {
294  argv[i] = args.at<Object>(i + 1);
295  }
296  Handle<Object> result;
298  isolate, result,
299  Execution::Call(isolate,
300  function,
301  args.receiver(),
302  argc,
303  argv.start()));
304  return *result;
305 }
#define ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call)
Definition: isolate.h:131

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Vector< T >::at(), v8::internal::Handle< T >::cast(), v8::internal::Object::GetProperty(), handle(), name, v8::internal::Isolate::native_context(), and v8::internal::Vector< T >::start().

Referenced by BUILTIN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanBeZero()

bool v8::internal::CanBeZero ( HValue right)

Definition at line 10159 of file hydrogen.cc.

10159  {
10160  if (right->IsConstant()) {
10161  HConstant* right_const = HConstant::cast(right);
10162  if (right_const->HasInteger32Value() &&
10163  (right_const->Integer32Value() & 0x1f) != 0) {
10164  return false;
10165  }
10166  }
10167  return true;
10168 }

Referenced by v8::internal::HGraphBuilder::BuildBinaryOperation(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CanBeMinusZero().

+ Here is the caller graph for this function:

◆ CanInlinePropertyAccess()

static bool v8::internal::CanInlinePropertyAccess ( Type type)
static

Definition at line 5462 of file hydrogen.cc.

5462  {
5463  if (type->Is(Type::NumberOrString())) return true;
5464  if (!type->IsClass()) return false;
5465  Handle<Map> map = type->AsClass()->Map();
5466  return map->IsJSObjectMap() &&
5467  !map->is_dictionary_map() &&
5468  !map->has_named_interceptor();
5469 }

References v8::internal::TypeImpl< Config >::AsClass(), v8::internal::TypeImpl< Config >::Is(), v8::internal::TypeImpl< Config >::IsClass(), and map.

Referenced by v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic(), ComputeReceiverTypes(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible(), and v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanTransitionToMoreGeneralFastElementsKind()

bool v8::internal::CanTransitionToMoreGeneralFastElementsKind ( ElementsKind  elements_kind,
bool  allow_only_packed 
)
inline

Definition at line 246 of file elements-kind.h.

248  {
249  return IsFastElementsKind(elements_kind) &&
250  (elements_kind != TERMINAL_FAST_ELEMENTS_KIND &&
251  (!allow_only_packed || elements_kind != FAST_ELEMENTS));
252 }
bool IsFastElementsKind(ElementsKind kind)

References FAST_ELEMENTS, IsFastElementsKind(), and TERMINAL_FAST_ELEMENTS_KIND.

Referenced by v8::internal::Map::FindTransitionedMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CFunctionArgumentOperand()

MemOperand v8::internal::CFunctionArgumentOperand ( int  index)
inline

Definition at line 118 of file macro-assembler-mips.h.

118  {
119  DCHECK(index > kCArgSlotCount);
120  // Argument 5 takes the slot just past the four Arg-slots.
121  int offset = (index - 5) * kPointerSize + kCArgsSlotsSize;
122  return MemOperand(sp, offset);
123 }
const Register sp
const int kCArgsSlotsSize
const int kCArgSlotCount

References DCHECK, kCArgSlotCount, kCArgsSlotsSize, kPointerSize, and sp.

◆ CharCompare()

template<typename PatternChar , typename SubjectChar >
bool v8::internal::CharCompare ( const PatternChar *  pattern,
const SubjectChar *  subject,
int  length 
)
inline

Definition at line 230 of file string-search.h.

232  {
233  DCHECK(length > 0);
234  int pos = 0;
235  do {
236  if (pattern[pos] != subject[pos]) {
237  return false;
238  }
239  pos++;
240  } while (pos < length);
241  return true;
242 }

References DCHECK.

Referenced by v8::internal::StringSearch< PatternChar, SubjectChar >::LinearSearch().

+ Here is the caller graph for this function:

◆ CheckActivation()

static bool v8::internal::CheckActivation ( Handle< JSArray shared_info_array,
Handle< JSArray result,
StackFrame frame,
LiveEdit::FunctionPatchabilityStatus  status 
)
static

Definition at line 1519 of file liveedit.cc.

1522  {
1523  if (!frame->is_java_script()) return false;
1524 
1525  Handle<JSFunction> function(JavaScriptFrame::cast(frame)->function());
1526 
1527  Isolate* isolate = shared_info_array->GetIsolate();
1528  int len = GetArrayLength(shared_info_array);
1529  for (int i = 0; i < len; i++) {
1530  HandleScope scope(isolate);
1531  Handle<Object> element =
1532  Object::GetElement(isolate, shared_info_array, i).ToHandleChecked();
1533  Handle<JSValue> jsvalue = Handle<JSValue>::cast(element);
1534  Handle<SharedFunctionInfo> shared =
1536 
1537  if (function->shared() == *shared || IsInlined(*function, *shared)) {
1538  SetElementSloppy(result, i, Handle<Smi>(Smi::FromInt(status), isolate));
1539  return true;
1540  }
1541  }
1542  return false;
1543 }
static int GetArrayLength(Handle< JSArray > array)
Definition: liveedit.cc:601
static Handle< SharedFunctionInfo > UnwrapSharedFunctionInfoFromJSValue(Handle< JSValue > jsValue)
Definition: liveedit.cc:593
static bool IsInlined(JSFunction *function, SharedFunctionInfo *candidate)
Definition: liveedit.cc:1125
void SetElementSloppy(Handle< JSObject > object, uint32_t index, Handle< Object > value)
Definition: liveedit.cc:25

References v8::internal::Handle< T >::cast(), v8::internal::JavaScriptFrame::cast(), v8::internal::Smi::FromInt(), v8::internal::JavaScriptFrame::function(), GetArrayLength(), v8::internal::Object::GetElement(), IsInlined(), SetElementSloppy(), and UnwrapSharedFunctionInfoFromJSValue().

Referenced by v8::internal::MultipleFunctionTarget::MatchActivation(), and v8::internal::InactiveThreadActivationsChecker::VisitThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckAndDeclareArrowParameter()

bool v8::internal::CheckAndDeclareArrowParameter ( ParserTraits traits,
Expression expression,
Scope scope,
int num_params,
Scanner::Location dupe_loc 
)

Definition at line 3374 of file parser.cc.

3376  {
3377  // Case for empty parameter lists:
3378  // () => ...
3379  if (expression == NULL) return true;
3380 
3381  // Too many parentheses around expression:
3382  // (( ... )) => ...
3383  if (expression->parenthesization_level() > 1) return false;
3384 
3385  // Case for a single parameter:
3386  // (foo) => ...
3387  // foo => ...
3388  if (expression->IsVariableProxy()) {
3389  if (expression->AsVariableProxy()->is_this()) return false;
3390 
3391  const AstRawString* raw_name = expression->AsVariableProxy()->raw_name();
3392  if (traits->IsEvalOrArguments(raw_name) ||
3393  traits->IsFutureStrictReserved(raw_name))
3394  return false;
3395 
3396  if (scope->IsDeclared(raw_name)) {
3397  *dupe_loc = Scanner::Location(
3398  expression->position(), expression->position() + raw_name->length());
3399  return false;
3400  }
3401 
3402  scope->DeclareParameter(raw_name, VAR);
3403  ++(*num_params);
3404  return true;
3405  }
3406 
3407  // Case for more than one parameter:
3408  // (foo, bar [, ...]) => ...
3409  if (expression->IsBinaryOperation()) {
3410  BinaryOperation* binop = expression->AsBinaryOperation();
3411  if (binop->op() != Token::COMMA || binop->left()->is_parenthesized() ||
3412  binop->right()->is_parenthesized())
3413  return false;
3414 
3415  return CheckAndDeclareArrowParameter(traits, binop->left(), scope,
3416  num_params, dupe_loc) &&
3417  CheckAndDeclareArrowParameter(traits, binop->right(), scope,
3418  num_params, dupe_loc);
3419  }
3420 
3421  // Any other kind of expression is not a valid parameter list.
3422  return false;
3423 }
#define COMMA
bool CheckAndDeclareArrowParameter(ParserTraits *traits, Expression *expression, Scope *scope, int *num_params, Scanner::Location *dupe_loc)
Definition: parser.cc:3374

References COMMA, v8::internal::Scope::DeclareParameter(), v8::internal::Scope::IsDeclared(), v8::internal::ParserTraits::IsEvalOrArguments(), v8::internal::ParserTraits::IsFutureStrictReserved(), v8::internal::AstRawString::length(), NULL, v8::internal::Expression::parenthesization_level(), v8::internal::AstNode::position(), and VAR.

Referenced by v8::internal::ParserTraits::DeclareArrowParametersFromExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckArrayAbuse()

void v8::internal::CheckArrayAbuse ( Handle< JSObject obj,
const char *  op,
uint32_t  key,
bool  allow_appending 
)

Definition at line 496 of file elements.cc.

497  {
498  DisallowHeapAllocation no_allocation;
499  Object* raw_length = NULL;
500  const char* elements_type = "array";
501  if (obj->IsJSArray()) {
502  JSArray* array = JSArray::cast(*obj);
503  raw_length = array->length();
504  } else {
505  raw_length = Smi::FromInt(obj->elements()->length());
506  elements_type = "object";
507  }
508 
509  if (raw_length->IsNumber()) {
510  double n = raw_length->Number();
511  if (FastI2D(FastD2UI(n)) == n) {
512  int32_t int32_length = DoubleToInt32(n);
513  uint32_t compare_length = static_cast<uint32_t>(int32_length);
514  if (allow_appending) compare_length++;
515  if (key >= compare_length) {
516  PrintF("[OOB %s %s (%s length = %d, element accessed = %d) in ",
517  elements_type, op, elements_type,
518  static_cast<int>(int32_length),
519  static_cast<int>(key));
520  TraceTopFrame(obj->GetIsolate());
521  PrintF("]\n");
522  }
523  } else {
524  PrintF("[%s elements length not integer value in ", elements_type);
525  TraceTopFrame(obj->GetIsolate());
526  PrintF("]\n");
527  }
528  } else {
529  PrintF("[%s elements length not a number in ", elements_type);
530  TraceTopFrame(obj->GetIsolate());
531  PrintF("]\n");
532  }
533 }
int int32_t
Definition: unicode.cc:24
unsigned int FastD2UI(double x)
double FastI2D(int x)
Definition: conversions.h:64
void PrintF(const char *format,...)
Definition: utils.cc:80
int32_t DoubleToInt32(double x)
static void TraceTopFrame(Isolate *isolate)
Definition: elements.cc:476

References DoubleToInt32(), FastD2UI(), FastI2D(), v8::internal::Smi::FromInt(), NULL, v8::internal::Object::Number(), PrintF(), and TraceTopFrame().

Referenced by v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::Get(), and v8::internal::JSObject::SetElementWithoutInterceptor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckedCast()

template<typename To >
static To* v8::internal::CheckedCast ( void *  from)
inlinestatic

Definition at line 236 of file objects.cc.

236  {
237  uintptr_t temp = reinterpret_cast<uintptr_t>(from);
238  DCHECK(temp % sizeof(To) == 0);
239  return reinterpret_cast<To*>(temp);
240 }

References DCHECK.

◆ CheckEquivalent()

static bool v8::internal::CheckEquivalent ( Map first,
Map second 
)
static

Definition at line 9037 of file objects.cc.

9037  {
9038  return
9039  first->constructor() == second->constructor() &&
9040  first->prototype() == second->prototype() &&
9041  first->instance_type() == second->instance_type() &&
9042  first->bit_field() == second->bit_field() &&
9043  first->bit_field2() == second->bit_field2() &&
9044  first->is_frozen() == second->is_frozen() &&
9045  first->has_instance_call_handler() == second->has_instance_call_handler();
9046 }

References v8::internal::Map::bit_field(), v8::internal::Map::bit_field2(), v8::internal::Map::has_instance_call_handler(), v8::internal::Map::instance_type(), and v8::internal::Map::is_frozen().

Referenced by v8::internal::Map::EquivalentToForNormalization(), and v8::internal::Map::EquivalentToForTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckExecutionState()

static bool v8::internal::CheckExecutionState ( Isolate isolate,
int  break_id 
)
static

Definition at line 5663 of file runtime.cc.

5663  {
5664  return !isolate->debug()->debug_context().is_null() &&
5665  isolate->debug()->break_id() != 0 &&
5666  isolate->debug()->break_id() == break_id;
5667 }

References v8::internal::Debug::break_id(), v8::internal::Isolate::debug(), and v8::internal::Debug::debug_context().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckForName()

static bool v8::internal::CheckForName ( Handle< Name name,
Handle< String property_name,
int  offset,
int object_offset 
)
inlinestatic

Definition at line 70 of file accessors.cc.

73  {
74  if (Name::Equals(name, property_name)) {
75  *object_offset = offset;
76  return true;
77  }
78  return false;
79 }

References v8::internal::Name::Equals(), and name.

Referenced by v8::internal::Accessors::IsJSObjectFieldAccessor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearMarkbitsInNewSpace()

static void v8::internal::ClearMarkbitsInNewSpace ( NewSpace space)
static

Definition at line 507 of file mark-compact.cc.

507  {
508  NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd());
509 
510  while (it.has_next()) {
511  Bitmap::Clear(it.next());
512  }
513 }

References v8::internal::Bitmap::Clear(), and space().

Referenced by v8::internal::MarkCompactCollector::ClearMarkbits().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearMarkbitsInPagedSpace()

static void v8::internal::ClearMarkbitsInPagedSpace ( PagedSpace space)
static

Definition at line 498 of file mark-compact.cc.

498  {
499  PageIterator it(space);
500 
501  while (it.has_next()) {
502  Bitmap::Clear(it.next());
503  }
504 }

References v8::internal::Bitmap::Clear(), and space().

Referenced by v8::internal::MarkCompactCollector::ClearMarkbits().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearWeakList()

template<class T >
static void v8::internal::ClearWeakList ( Heap heap,
Object list 
)
static

Definition at line 240 of file objects-visiting.cc.

240  {
241  Object* undefined = heap->undefined_value();
242  while (list != undefined) {
243  T* candidate = reinterpret_cast<T*>(list);
244  list = WeakListVisitor<T>::WeakNext(candidate);
245  WeakListVisitor<T>::SetWeakNext(candidate, undefined);
246  }
247 }
#define T(name, string, precedence)
Definition: token.cc:25

References T.

◆ ClearWrapperCacheWeakCallback()

static void v8::internal::ClearWrapperCacheWeakCallback ( const v8::WeakCallbackData< v8::Value, void > &  data)
static

Definition at line 9723 of file objects.cc.

9724  {
9725  Object** location = reinterpret_cast<Object**>(data.GetParameter());
9726  JSValue* wrapper = JSValue::cast(*location);
9727  Script::cast(wrapper->value())->ClearWrapperCache();
9728 }
P * GetParameter() const
Definition: v8.h:423

References v8::WeakCallbackData< T, P >::GetParameter().

+ Here is the call graph for this function:

◆ ClobberDoubleRegisters()

double v8::internal::ClobberDoubleRegisters ( double  x1,
double  x2,
double  x3,
double  x4 
)

Definition at line 97 of file arguments.cc.

97  {
98  // TODO(ulan): This clobbers only subset of registers depending on compiler,
99  // Rewrite this in assembly to really clobber all registers.
100  // GCC for ia32 uses the FPU and does not touch XMM registers.
101  return x1 * 1.01 + x2 * 2.02 + x3 * 3.03 + x4 * 4.04;
102 }

◆ CloneCodeObject()

static Code* v8::internal::CloneCodeObject ( HeapObject code)
static

Definition at line 1705 of file serialize.cc.

1705  {
1706  Address copy = new byte[code->Size()];
1707  MemCopy(copy, code->address(), code->Size());
1708  return Code::cast(HeapObject::FromAddress(copy));
1709 }
byte * Address
Definition: globals.h:101
void MemCopy(void *dest, const void *src, size_t size)
Definition: utils.h:350

References v8::internal::HeapObject::address(), v8::internal::HeapObject::FromAddress(), MemCopy(), and v8::internal::HeapObject::Size().

Referenced by v8::internal::Serializer::ObjectSerializer::OutputRawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CodeGenerationFromStringsAllowed()

bool v8::internal::CodeGenerationFromStringsAllowed ( Isolate isolate,
Handle< Context context 
)

Definition at line 334 of file runtime-compiler.cc.

335  {
336  DCHECK(context->allow_code_gen_from_strings()->IsFalse());
337  // Check with callback if set.
339  isolate->allow_code_gen_callback();
340  if (callback == NULL) {
341  // No callback set and code generation disallowed.
342  return false;
343  } else {
344  // Callback set. Let it decide if code generation is allowed.
345  VMState<EXTERNAL> state(isolate);
346  return callback(v8::Utils::ToLocal(context));
347  }
348 }
static Local< Context > ToLocal(v8::internal::Handle< v8::internal::Context > obj)
bool(* AllowCodeGenerationFromStringsCallback)(Local< Context > context)
Callback to check if code generation from strings is allowed.
Definition: v8.h:4192

References DCHECK, NULL, and v8::Utils::ToLocal().

Referenced by CompileGlobalEval(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CodeListContains()

static bool v8::internal::CodeListContains ( Object head,
Code code 
)
static

Definition at line 11512 of file objects.cc.

11512  {
11513  while (!head->IsUndefined()) {
11514  if (head == code) return true;
11515  head = Code::cast(head)->next_code_link();
11516  }
11517  return false;
11518 }

Referenced by v8::internal::DependentCode::Contains().

+ Here is the caller graph for this function:

◆ CollectActiveFunctionsFromThread()

static void v8::internal::CollectActiveFunctionsFromThread ( Isolate isolate,
ThreadLocalTop *  top,
List< Handle< JSFunction > > *  active_functions,
Object active_code_marker 
)
static

Definition at line 1704 of file debug.cc.

1708  {
1709  // Find all non-optimized code functions with activation frames
1710  // on the stack. This includes functions which have optimized
1711  // activations (including inlined functions) on the stack as the
1712  // non-optimized code is needed for the lazy deoptimization.
1713  for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) {
1714  JavaScriptFrame* frame = it.frame();
1715  if (frame->is_optimized()) {
1716  List<JSFunction*> functions(FLAG_max_inlining_levels + 1);
1717  frame->GetFunctions(&functions);
1718  for (int i = 0; i < functions.length(); i++) {
1719  JSFunction* function = functions[i];
1720  active_functions->Add(Handle<JSFunction>(function));
1721  function->shared()->code()->set_gc_metadata(active_code_marker);
1722  }
1723  } else if (frame->function()->IsJSFunction()) {
1724  JSFunction* function = frame->function();
1725  DCHECK(frame->LookupCode()->kind() == Code::FUNCTION);
1726  active_functions->Add(Handle<JSFunction>(function));
1727  function->shared()->code()->set_gc_metadata(active_code_marker);
1728  }
1729  }
1730 }

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, v8::internal::JavaScriptFrame::function(), and v8::internal::JavaScriptFrame::GetFunctions().

Referenced by v8::internal::Debug::PrepareForBreakPoints(), and v8::internal::ActiveFunctionsCollector::VisitThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CollectElementIndices()

static void v8::internal::CollectElementIndices ( Handle< JSObject object,
uint32_t  range,
List< uint32_t > *  indices 
)
static

Definition at line 4836 of file runtime.cc.

4837  {
4838  Isolate* isolate = object->GetIsolate();
4839  ElementsKind kind = object->GetElementsKind();
4840  switch (kind) {
4841  case FAST_SMI_ELEMENTS:
4842  case FAST_ELEMENTS:
4844  case FAST_HOLEY_ELEMENTS: {
4845  Handle<FixedArray> elements(FixedArray::cast(object->elements()));
4846  uint32_t length = static_cast<uint32_t>(elements->length());
4847  if (range < length) length = range;
4848  for (uint32_t i = 0; i < length; i++) {
4849  if (!elements->get(i)->IsTheHole()) {
4850  indices->Add(i);
4851  }
4852  }
4853  break;
4854  }
4856  case FAST_DOUBLE_ELEMENTS: {
4857  if (object->elements()->IsFixedArray()) {
4858  DCHECK(object->elements()->length() == 0);
4859  break;
4860  }
4861  Handle<FixedDoubleArray> elements(
4862  FixedDoubleArray::cast(object->elements()));
4863  uint32_t length = static_cast<uint32_t>(elements->length());
4864  if (range < length) length = range;
4865  for (uint32_t i = 0; i < length; i++) {
4866  if (!elements->is_the_hole(i)) {
4867  indices->Add(i);
4868  }
4869  }
4870  break;
4871  }
4872  case DICTIONARY_ELEMENTS: {
4873  Handle<SeededNumberDictionary> dict(
4874  SeededNumberDictionary::cast(object->elements()));
4875  uint32_t capacity = dict->Capacity();
4876  for (uint32_t j = 0; j < capacity; j++) {
4877  HandleScope loop_scope(isolate);
4878  Handle<Object> k(dict->KeyAt(j), isolate);
4879  if (dict->IsKey(*k)) {
4880  DCHECK(k->IsNumber());
4881  uint32_t index = static_cast<uint32_t>(k->Number());
4882  if (index < range) {
4883  indices->Add(index);
4884  }
4885  }
4886  }
4887  break;
4888  }
4889 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
4890  case TYPE##_ELEMENTS: \
4891  case EXTERNAL_##TYPE##_ELEMENTS:
4892 
4894 #undef TYPED_ARRAY_CASE
4895  {
4896  uint32_t length = static_cast<uint32_t>(
4897  FixedArrayBase::cast(object->elements())->length());
4898  if (range <= length) {
4899  length = range;
4900  // We will add all indices, so we might as well clear it first
4901  // and avoid duplicates.
4902  indices->Clear();
4903  }
4904  for (uint32_t i = 0; i < length; i++) {
4905  indices->Add(i);
4906  }
4907  if (length == range) return; // All indices accounted for already.
4908  break;
4909  }
4911  MaybeHandle<Object> length_obj =
4912  Object::GetProperty(object, isolate->factory()->length_string());
4913  double length_num = length_obj.ToHandleChecked()->Number();
4914  uint32_t length = static_cast<uint32_t>(DoubleToInt32(length_num));
4915  ElementsAccessor* accessor = object->GetElementsAccessor();
4916  for (uint32_t i = 0; i < length; i++) {
4917  if (accessor->HasElement(object, object, i)) {
4918  indices->Add(i);
4919  }
4920  }
4921  break;
4922  }
4923  }
4924 
4925  PrototypeIterator iter(isolate, object);
4926  if (!iter.IsAtEnd()) {
4927  // The prototype will usually have no inherited element indices,
4928  // but we have to check.
4930  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)), range,
4931  indices);
4932  }
4933 }
static void CollectElementIndices(Handle< JSObject > object, uint32_t range, List< uint32_t > *indices)
Definition: runtime.cc:4836
#define TYPED_ARRAYS(V)
Definition: objects.h:4433
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, DICTIONARY_ELEMENTS, DoubleToInt32(), v8::internal::Isolate::factory(), FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::Object::GetProperty(), v8::internal::ElementsAccessor::HasElement(), v8::internal::PrototypeIterator::IsAtEnd(), SLOPPY_ARGUMENTS_ELEMENTS, TYPED_ARRAY_CASE, and TYPED_ARRAYS.

Referenced by IterateElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Combine()

ContainedInLattice v8::internal::Combine ( ContainedInLattice  a,
ContainedInLattice  b 
)
inline

Definition at line 1238 of file jsregexp.h.

1238  {
1239  return static_cast<ContainedInLattice>(a | b);
1240 }

Referenced by AddRange(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::IsSubtypeOf().

+ Here is the caller graph for this function:

◆ CommonStubCacheChecks()

static Code::Flags v8::internal::CommonStubCacheChecks ( Name name,
Map map,
Code::Flags  flags 
)
static

Definition at line 25 of file stub-cache.cc.

26  {
27  flags = Code::RemoveTypeAndHolderFromFlags(flags);
28 
29  // Validate that the name does not move on scavenge, and that we
30  // can use identity checks instead of structural equality checks.
31  DCHECK(!name->GetHeap()->InNewSpace(name));
32  DCHECK(name->IsUniqueName());
33 
34  // The state bits are not important to the hash function because the stub
35  // cache only contains handlers. Make sure that the bits are the least
36  // significant so they will be the ones masked out.
37  DCHECK_EQ(Code::HANDLER, Code::ExtractKindFromFlags(flags));
38  STATIC_ASSERT((Code::ICStateField::kMask & 1) == 1);
39 
40  // Make sure that the code type and cache holder are not included in the hash.
41  DCHECK(Code::ExtractTypeFromFlags(flags) == 0);
42  DCHECK(Code::ExtractCacheHolderFromFlags(flags) == 0);
43 
44  return flags;
45 }
#define DCHECK_EQ(v1, v2)
Definition: logging.h:206

References DCHECK, DCHECK_EQ, v8::internal::Code::ExtractCacheHolderFromFlags(), v8::internal::Code::ExtractKindFromFlags(), v8::internal::Code::ExtractTypeFromFlags(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::BitFieldBase< T, shift, size, U >::kMask, name, v8::internal::Code::RemoveTypeAndHolderFromFlags(), and STATIC_ASSERT().

Referenced by v8::internal::StubCache::Get(), and v8::internal::StubCache::Set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CommuteCondition()

Condition v8::internal::CommuteCondition ( Condition  cond)
inline

Definition at line 93 of file constants-arm.h.

93  {
94  switch (cond) {
95  case lo:
96  return hi;
97  case hi:
98  return lo;
99  case hs:
100  return ls;
101  case ls:
102  return hs;
103  case lt:
104  return gt;
105  case gt:
106  return lt;
107  case ge:
108  return le;
109  case le:
110  return ge;
111  default:
112  return cond;
113  }
114 }

References ge, gt, hi, hs, le, lo, ls, and lt.

◆ Compare()

template<typename T >
int v8::internal::Compare ( const T a,
const T b 
)

Definition at line 96 of file utils.h.

96  {
97  if (a == b)
98  return 0;
99  else if (a < b)
100  return -1;
101  else
102  return 1;
103 }

Referenced by v8::internal::SplayTree< Config, AllocationPolicy >::FindGreatestLessThan(), v8::internal::SplayTree< Config, AllocationPolicy >::FindInternal(), v8::internal::SplayTree< Config, AllocationPolicy >::FindLeastGreaterThan(), v8::internal::SplayTree< Config, AllocationPolicy >::Insert(), and v8::internal::SplayTree< Config, AllocationPolicy >::Splay().

+ Here is the caller graph for this function:

◆ CompareChars()

template<typename lchar , typename rchar >
int v8::internal::CompareChars ( const lchar *  lhs,
const rchar *  rhs,
int  chars 
)
inline

Definition at line 705 of file utils.h.

705  {
706  DCHECK(sizeof(lchar) <= 2);
707  DCHECK(sizeof(rchar) <= 2);
708  if (sizeof(lchar) == 1) {
709  if (sizeof(rchar) == 1) {
710  return CompareCharsUnsigned(reinterpret_cast<const uint8_t*>(lhs),
711  reinterpret_cast<const uint8_t*>(rhs),
712  chars);
713  } else {
714  return CompareCharsUnsigned(reinterpret_cast<const uint8_t*>(lhs),
715  reinterpret_cast<const uint16_t*>(rhs),
716  chars);
717  }
718  } else {
719  if (sizeof(rchar) == 1) {
720  return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(lhs),
721  reinterpret_cast<const uint8_t*>(rhs),
722  chars);
723  } else {
724  return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(lhs),
725  reinterpret_cast<const uint16_t*>(rhs),
726  chars);
727  }
728  }
729 }
unsigned short uint16_t
Definition: unicode.cc:23
int CompareCharsUnsigned(const lchar *lhs, const rchar *rhs, int chars)
Definition: utils.h:686

References CompareCharsUnsigned(), and DCHECK.

Referenced by CompareRawStringContents(), v8::internal::String::IsOneByteEqualTo(), v8::internal::String::IsTwoByteEqualTo(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompareCharsUnsigned()

template<typename lchar , typename rchar >
int v8::internal::CompareCharsUnsigned ( const lchar *  lhs,
const rchar *  rhs,
int  chars 
)
inline

Definition at line 686 of file utils.h.

688  {
689  const lchar* limit = lhs + chars;
690  if (sizeof(*lhs) == sizeof(char) && sizeof(*rhs) == sizeof(char)) {
691  // memcmp compares byte-by-byte, yielding wrong results for two-byte
692  // strings on little-endian systems.
693  return memcmp(lhs, rhs, chars);
694  }
695  while (lhs < limit) {
696  int r = static_cast<int>(*lhs) - static_cast<int>(*rhs);
697  if (r != 0) return r;
698  ++lhs;
699  ++rhs;
700  }
701  return 0;
702 }

Referenced by CompareChars().

+ Here is the caller graph for this function:

◆ CompareInverseRanges()

static bool v8::internal::CompareInverseRanges ( ZoneList< CharacterRange > *  ranges,
const int special_class,
int  length 
)
static

Definition at line 4746 of file jsregexp.cc.

4748  {
4749  length--; // Remove final 0x10000.
4750  DCHECK(special_class[length] == 0x10000);
4751  DCHECK(ranges->length() != 0);
4752  DCHECK(length != 0);
4753  DCHECK(special_class[0] != 0);
4754  if (ranges->length() != (length >> 1) + 1) {
4755  return false;
4756  }
4757  CharacterRange range = ranges->at(0);
4758  if (range.from() != 0) {
4759  return false;
4760  }
4761  for (int i = 0; i < length; i += 2) {
4762  if (special_class[i] != (range.to() + 1)) {
4763  return false;
4764  }
4765  range = ranges->at((i >> 1) + 1);
4766  if (special_class[i+1] != range.from()) {
4767  return false;
4768  }
4769  }
4770  if (range.to() != 0xffff) {
4771  return false;
4772  }
4773  return true;
4774 }

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, v8::internal::CharacterRange::from(), and v8::internal::CharacterRange::to().

+ Here is the call graph for this function:

◆ ComparePointers()

static bool v8::internal::ComparePointers ( void *  key1,
void *  key2 
)
static

Definition at line 2794 of file spaces.cc.

2794 { return key1 == key2; }

◆ CompareRangeByFrom()

static int v8::internal::CompareRangeByFrom ( const CharacterRange a,
const CharacterRange b 
)
static

Definition at line 5977 of file jsregexp.cc.

5978  {
5979  return Compare<uc16>(a->from(), b->from());
5980 }

References v8::internal::CharacterRange::from().

Referenced by v8::internal::DispatchTableConstructor::AddInverse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompareRanges()

static bool v8::internal::CompareRanges ( ZoneList< CharacterRange > *  ranges,
const int special_class,
int  length 
)
static

Definition at line 4777 of file jsregexp.cc.

4779  {
4780  length--; // Remove final 0x10000.
4781  DCHECK(special_class[length] == 0x10000);
4782  if (ranges->length() * 2 != length) {
4783  return false;
4784  }
4785  for (int i = 0; i < length; i += 2) {
4786  CharacterRange range = ranges->at(i >> 1);
4787  if (range.from() != special_class[i] ||
4788  range.to() != special_class[i + 1] - 1) {
4789  return false;
4790  }
4791  }
4792  return true;
4793 }

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, v8::internal::CharacterRange::from(), and v8::internal::CharacterRange::to().

+ Here is the call graph for this function:

◆ CompareRawStringContents()

template<typename Char >
static bool v8::internal::CompareRawStringContents ( const Char *const  a,
const Char *const  b,
int  length 
)
inlinestatic

Definition at line 8519 of file objects.cc.

8521  {
8522  return CompareChars(a, b, length) == 0;
8523 }
int CompareChars(const lchar *lhs, const rchar *rhs, int chars)
Definition: utils.h:705

References CompareChars().

Referenced by v8::internal::RawStringComparator< uint16_t, uint16_t >::compare(), v8::internal::RawStringComparator< uint8_t, uint8_t >::compare(), and v8::internal::String::SlowEquals().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompareSubstrings()

static bool v8::internal::CompareSubstrings ( Handle< String s1,
int  pos1,
Handle< String s2,
int  pos2,
int  len 
)
static

Definition at line 244 of file liveedit.cc.

245  {
246  for (int i = 0; i < len; i++) {
247  if (s1->Get(i + pos1) != s2->Get(i + pos2)) {
248  return false;
249  }
250  }
251  return true;
252 }
const SwVfpRegister s1
const SwVfpRegister s2

References s1, and s2.

Referenced by v8::internal::LineArrayCompareInput::Equals().

+ Here is the caller graph for this function:

◆ compareUInt32()

static int v8::internal::compareUInt32 ( const uint32_t ap,
const uint32_t bp 
)
static

Definition at line 4829 of file runtime.cc.

4829  {
4830  uint32_t a = *ap;
4831  uint32_t b = *bp;
4832  return (a == b) ? 0 : (a < b) ? -1 : 1;
4833 }

Referenced by IterateElements().

+ Here is the caller graph for this function:

◆ CompileGlobalEval()

static ObjectPair v8::internal::CompileGlobalEval ( Isolate isolate,
Handle< String source,
Handle< Object receiver,
StrictMode  strict_mode,
int  scope_position 
)
static

Definition at line 384 of file runtime-compiler.cc.

387  {
388  Handle<Context> context = Handle<Context>(isolate->context());
389  Handle<Context> native_context = Handle<Context>(context->native_context());
390 
391  // Check if native context allows code generation from
392  // strings. Throw an exception if it doesn't.
393  if (native_context->allow_code_gen_from_strings()->IsFalse() &&
394  !CodeGenerationFromStringsAllowed(isolate, native_context)) {
395  Handle<Object> error_message =
396  native_context->ErrorMessageForCodeGenerationFromStrings();
397  Handle<Object> error;
398  MaybeHandle<Object> maybe_error = isolate->factory()->NewEvalError(
399  "code_gen_from_strings", HandleVector<Object>(&error_message, 1));
400  if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
401  return MakePair(isolate->heap()->exception(), NULL);
402  }
403 
404  // Deal with a normal eval call with a string argument. Compile it
405  // and return the compiled function bound in the local context.
406  static const ParseRestriction restriction = NO_PARSE_RESTRICTION;
407  Handle<JSFunction> compiled;
409  isolate, compiled,
410  Compiler::GetFunctionFromEval(source, context, strict_mode, restriction,
411  scope_position),
412  MakePair(isolate->heap()->exception(), NULL));
413  return MakePair(*compiled, *receiver);
414 }
#define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value)
Definition: isolate.h:123
bool CodeGenerationFromStringsAllowed(Isolate *isolate, Handle< Context > context)
static ObjectPair MakePair(Object *x, Object *y)

References ASSIGN_RETURN_ON_EXCEPTION_VALUE, CodeGenerationFromStringsAllowed(), v8::internal::Isolate::context(), v8::internal::Isolate::factory(), v8::internal::Compiler::GetFunctionFromEval(), v8::internal::Isolate::heap(), MakePair(), NO_PARSE_RESTRICTION, NULL, and v8::internal::Isolate::Throw().

Referenced by RUNTIME_FUNCTION_RETURN_PAIR().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompileOptimizedPrologue()

static bool v8::internal::CompileOptimizedPrologue ( CompilationInfo info)
static

Definition at line 730 of file compiler.cc.

730  {
731  if (!Parser::Parse(info)) return false;
732  if (!Rewriter::Rewrite(info)) return false;
733  if (!Scope::Analyze(info)) return false;
734  DCHECK(info->scope() != NULL);
735  return true;
736 }
static void Parse(Handle< JSFunction > function, CompilationInfoWithZone *info)
Definition: js-inlining.cc:56

References v8::internal::Scope::Analyze(), DCHECK, NULL, v8::internal::Parser::Parse(), v8::internal::Rewriter::Rewrite(), and v8::internal::CompilationInfo::scope().

Referenced by GetOptimizedCodeLater(), and GetOptimizedCodeNow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompileToplevel()

static Handle<SharedFunctionInfo> v8::internal::CompileToplevel ( CompilationInfo info)
static

Definition at line 984 of file compiler.cc.

984  {
985  Isolate* isolate = info->isolate();
986  PostponeInterruptsScope postpone(isolate);
987  DCHECK(!isolate->native_context().is_null());
988  Handle<Script> script = info->script();
989 
990  // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile?
991  FixedArray* array = isolate->native_context()->embedder_data();
992  script->set_context_data(array->get(0));
993 
994  isolate->debug()->OnBeforeCompile(script);
995 
996  DCHECK(info->is_eval() || info->is_global());
997 
998  info->MarkAsToplevel();
999 
1000  Handle<SharedFunctionInfo> result;
1001 
1002  { VMState<COMPILER> state(info->isolate());
1003  if (info->function() == NULL) {
1004  // Parse the script if needed (if it's already parsed, function() is
1005  // non-NULL).
1006  bool parse_allow_lazy =
1007  (info->compile_options() == ScriptCompiler::kConsumeParserCache ||
1008  String::cast(script->source())->length() >
1009  FLAG_min_preparse_length) &&
1010  !Compiler::DebuggerWantsEagerCompilation(info);
1011 
1012  if (!parse_allow_lazy &&
1013  (info->compile_options() == ScriptCompiler::kProduceParserCache ||
1014  info->compile_options() == ScriptCompiler::kConsumeParserCache)) {
1015  // We are going to parse eagerly, but we either 1) have cached data
1016  // produced by lazy parsing or 2) are asked to generate cached data.
1017  // Eager parsing cannot benefit from cached data, and producing cached
1018  // data while parsing eagerly is not implemented.
1019  info->SetCachedData(NULL, ScriptCompiler::kNoCompileOptions);
1020  }
1021  if (!Parser::Parse(info, parse_allow_lazy)) {
1022  return Handle<SharedFunctionInfo>::null();
1023  }
1024  }
1025 
1026  FunctionLiteral* lit = info->function();
1027  LiveEditFunctionTracker live_edit_tracker(isolate, lit);
1028 
1029  // Measure how long it takes to do the compilation; only take the
1030  // rest of the function into account to avoid overlap with the
1031  // parsing statistics.
1032  HistogramTimer* rate = info->is_eval()
1033  ? info->isolate()->counters()->compile_eval()
1034  : info->isolate()->counters()->compile();
1035  HistogramTimerScope timer(rate);
1036 
1037  // Compile the code.
1038  if (!CompileUnoptimizedCode(info)) {
1039  return Handle<SharedFunctionInfo>::null();
1040  }
1041 
1042  // Allocate function.
1043  DCHECK(!info->code().is_null());
1044  result = isolate->factory()->NewSharedFunctionInfo(
1045  lit->name(), lit->materialized_literal_count(), lit->kind(),
1046  info->code(), ScopeInfo::Create(info->scope(), info->zone()),
1047  info->feedback_vector());
1048 
1049  DCHECK_EQ(RelocInfo::kNoPosition, lit->function_token_position());
1050  SetFunctionInfo(result, lit, true, script);
1051 
1052  Handle<String> script_name = script->name()->IsString()
1053  ? Handle<String>(String::cast(script->name()))
1054  : isolate->factory()->empty_string();
1055  Logger::LogEventsAndTags log_tag = info->is_eval()
1056  ? Logger::EVAL_TAG
1057  : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script);
1058 
1059  PROFILE(isolate, CodeCreateEvent(
1060  log_tag, *info->code(), *result, info, *script_name));
1061  GDBJIT(AddCode(script_name, script, info->code(), info));
1062 
1063  // Hint to the runtime system used when allocating space for initial
1064  // property space by setting the expected number of properties for
1065  // the instances of the function.
1067  lit->expected_property_count());
1068 
1069  if (!script.is_null())
1070  script->set_compilation_state(Script::COMPILATION_STATE_COMPILED);
1071 
1072  live_edit_tracker.RecordFunctionInfo(result, lit, info->zone());
1073  }
1074 
1075  isolate->debug()->OnAfterCompile(script);
1076 
1077  return result;
1078 }
#define PROFILE(IsolateGetter, Call)
Definition: cpu-profiler.h:181
#define GDBJIT(action)
Definition: gdb-jit.h:51
static void SetFunctionInfo(Handle< SharedFunctionInfo > function_info, FunctionLiteral *lit, bool is_toplevel, Handle< Script > script)
Definition: compiler.cc:569
void SetExpectedNofPropertiesFromEstimate(Handle< SharedFunctionInfo > shared, int estimate)
Definition: compiler.cc:542
static bool CompileUnoptimizedCode(CompilationInfo *info)
Definition: compiler.cc:632

References v8::internal::CompilationInfo::code(), v8::internal::Script::COMPILATION_STATE_COMPILED, v8::internal::CompilationInfo::compile_options(), CompileUnoptimizedCode(), v8::internal::Isolate::counters(), v8::internal::ScopeInfo::Create(), DCHECK, DCHECK_EQ, v8::internal::Isolate::debug(), v8::internal::Compiler::DebuggerWantsEagerCompilation(), v8::internal::Isolate::factory(), v8::internal::CompilationInfo::feedback_vector(), v8::internal::CompilationInfo::function(), GDBJIT, v8::internal::FixedArray::get(), v8::internal::CompilationInfo::is_eval(), v8::internal::CompilationInfo::is_global(), v8::internal::Handle< T >::is_null(), v8::internal::CompilationInfo::isolate(), v8::ScriptCompiler::kConsumeParserCache, v8::ScriptCompiler::kNoCompileOptions, v8::internal::RelocInfo::kNoPosition, v8::ScriptCompiler::kProduceParserCache, v8::internal::CompilationInfo::MarkAsToplevel(), v8::internal::Isolate::native_context(), NULL, v8::internal::Handle< T >::null(), v8::internal::Debug::OnAfterCompile(), v8::internal::Debug::OnBeforeCompile(), v8::internal::Parser::Parse(), PROFILE, v8::internal::LiveEditFunctionTracker::RecordFunctionInfo(), v8::internal::CompilationInfo::scope(), v8::internal::CompilationInfo::script(), v8::internal::CompilationInfo::SetCachedData(), SetExpectedNofPropertiesFromEstimate(), SetFunctionInfo(), and v8::internal::CompilationInfo::zone().

Referenced by v8::internal::Compiler::CompileScript(), v8::internal::Compiler::CompileStreamedScript(), and v8::internal::Compiler::GetFunctionFromEval().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompileUnoptimizedCode()

static bool v8::internal::CompileUnoptimizedCode ( CompilationInfo info)
static

Definition at line 632 of file compiler.cc.

632  {
633  DCHECK(AllowCompilation::IsAllowed(info->isolate()));
634  DCHECK(info->function() != NULL);
635  if (!Rewriter::Rewrite(info)) return false;
636  if (!Scope::Analyze(info)) return false;
637  DCHECK(info->scope() != NULL);
638 
639  if (!FullCodeGenerator::MakeCode(info)) {
640  Isolate* isolate = info->isolate();
641  if (!isolate->has_pending_exception()) isolate->StackOverflow();
642  return false;
643  }
644  return true;
645 }

References v8::internal::Scope::Analyze(), DCHECK, v8::internal::CompilationInfo::function(), v8::internal::Isolate::has_pending_exception(), v8::internal::CompilationInfo::isolate(), v8::internal::FullCodeGenerator::MakeCode(), NULL, v8::internal::Rewriter::Rewrite(), v8::internal::CompilationInfo::scope(), and v8::internal::Isolate::StackOverflow().

Referenced by v8::internal::Compiler::CompileForLiveEdit(), CompileToplevel(), and GetUnoptimizedCodeCommon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeCodeOffsetFromPcOffset()

static int v8::internal::ComputeCodeOffsetFromPcOffset ( Code code,
int  pc_offset 
)
static

Definition at line 1737 of file debug.cc.

1737  {
1738  DCHECK_EQ(code->kind(), Code::FUNCTION);
1739  DCHECK(!code->has_debug_break_slots());
1740  DCHECK_LE(0, pc_offset);
1741  DCHECK_LT(pc_offset, code->instruction_end() - code->instruction_start());
1742 
1743  int mask = RelocInfo::ModeMask(RelocInfo::CONST_POOL) |
1744  RelocInfo::ModeMask(RelocInfo::VENEER_POOL);
1745  byte *pc = code->instruction_start() + pc_offset;
1746  int code_offset = pc_offset;
1747  for (RelocIterator it(code, mask); !it.done(); it.next()) {
1748  RelocInfo* info = it.rinfo();
1749  if (info->pc() >= pc) break;
1750  DCHECK(RelocInfo::IsConstPool(info->rmode()));
1751  code_offset -= static_cast<int>(info->data());
1752  DCHECK_LE(0, code_offset);
1753  }
1754 
1755  return code_offset;
1756 }
#define DCHECK_LT(v1, v2)
Definition: logging.h:209
const Register pc

References v8::internal::RelocInfo::CONST_POOL, v8::internal::RelocInfo::data(), DCHECK, DCHECK_EQ, DCHECK_LE, DCHECK_LT, v8::internal::RelocIterator::done(), v8::internal::Code::has_debug_break_slots(), v8::internal::Code::instruction_end(), v8::internal::Code::instruction_start(), v8::internal::RelocInfo::IsConstPool(), v8::internal::Code::kind(), v8::internal::RelocInfo::ModeMask(), pc, v8::internal::RelocInfo::pc(), v8::internal::RelocInfo::rmode(), and v8::internal::RelocInfo::VENEER_POOL.

Referenced by v8::internal::Debug::PrepareForBreakPoints(), and RedirectActivationsToRecompiledCodeOnThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeCompareCondition() [1/3]

static Condition v8::internal::ComputeCompareCondition ( Token::Value  op)
static

Definition at line 2587 of file lithium-codegen-arm.cc.

2587  {
2588  switch (op) {
2589  case Token::EQ_STRICT:
2590  case Token::EQ:
2591  return eq;
2592  case Token::LT:
2593  return lt;
2594  case Token::GT:
2595  return gt;
2596  case Token::LTE:
2597  return le;
2598  case Token::GTE:
2599  return ge;
2600  default:
2601  UNREACHABLE();
2602  return kNoCondition;
2603  }
2604 }

References eq, EQ, ge, gt, kNoCondition, le, lt, and UNREACHABLE.

◆ ComputeCompareCondition() [2/3]

static Condition v8::internal::ComputeCompareCondition ( Token::Value  op)
static

Definition at line 2492 of file lithium-codegen-mips.cc.

2492  {
2493  switch (op) {
2494  case Token::EQ_STRICT:
2495  case Token::EQ:
2496  return eq;
2497  case Token::LT:
2498  return lt;
2499  case Token::GT:
2500  return gt;
2501  case Token::LTE:
2502  return le;
2503  case Token::GTE:
2504  return ge;
2505  default:
2506  UNREACHABLE();
2507  return kNoCondition;
2508  }
2509 }

References eq, EQ, ge, gt, kNoCondition, le, lt, and UNREACHABLE.

◆ ComputeCompareCondition() [3/3]

static Condition v8::internal::ComputeCompareCondition ( Token::Value  op)
static

Definition at line 2462 of file lithium-codegen-mips64.cc.

2462  {
2463  switch (op) {
2464  case Token::EQ_STRICT:
2465  case Token::EQ:
2466  return eq;
2467  case Token::LT:
2468  return lt;
2469  case Token::GT:
2470  return gt;
2471  case Token::LTE:
2472  return le;
2473  case Token::GTE:
2474  return ge;
2475  default:
2476  UNREACHABLE();
2477  return kNoCondition;
2478  }
2479 }

References eq, EQ, ge, gt, kNoCondition, le, lt, and UNREACHABLE.

◆ ComputeIntegerHash()

uint32_t v8::internal::ComputeIntegerHash ( uint32_t  key,
uint32_t  seed 
)
inline

Definition at line 249 of file utils.h.

249  {
250  uint32_t hash = key;
251  hash = hash ^ seed;
252  hash = ~hash + (hash << 15); // hash = (hash << 15) - hash - 1;
253  hash = hash ^ (hash >> 12);
254  hash = hash + (hash << 2);
255  hash = hash ^ (hash >> 4);
256  hash = hash * 2057; // hash = (hash + (hash << 3)) + (hash << 11);
257  hash = hash ^ (hash >> 16);
258  return hash;
259 }

Referenced by ComputePointerHash(), v8::internal::HeapObjectsMap::GenerateId(), v8::internal::InnerPointerToCodeCache::GetCacheEntry(), v8::internal::CodeEntry::GetCallUid(), v8::internal::HeapEntriesMap::Hash(), v8::internal::ScriptCache::Hash(), v8::internal::UnseededNumberDictionaryShape::Hash(), v8::internal::UnseededNumberDictionaryShape::HashForObject(), v8::internal::NativeObjectsExplorer::InfoHash(), v8::internal::compiler::NodeCacheHash(), v8::internal::SeededNumberDictionaryShape::SeededHash(), v8::internal::SeededNumberDictionaryShape::SeededHashForObject(), and SnapshotObjectIdHash().

+ Here is the caller graph for this function:

◆ ComputeLongHash()

uint32_t v8::internal::ComputeLongHash ( uint64_t  key)
inline

Definition at line 262 of file utils.h.

262  {
263  uint64_t hash = key;
264  hash = ~hash + (hash << 18); // hash = (hash << 18) - hash - 1;
265  hash = hash ^ (hash >> 31);
266  hash = hash * 21; // hash = (hash + (hash << 2)) + (hash << 4);
267  hash = hash ^ (hash >> 11);
268  hash = hash + (hash << 6);
269  hash = hash ^ (hash >> 22);
270  return static_cast<uint32_t>(hash);
271 }

Referenced by v8::internal::Object::GetHash(), and v8::internal::compiler::NodeCacheHash().

+ Here is the caller graph for this function:

◆ ComputeMarker()

static const char* v8::internal::ComputeMarker ( Code code)
static

Definition at line 50 of file log.cc.

50  {
51  switch (code->kind()) {
52  case Code::FUNCTION: return code->optimizable() ? "~" : "";
53  case Code::OPTIMIZED_FUNCTION: return "*";
54  default: return "";
55  }
56 }

References v8::internal::Code::kind(), and v8::internal::Code::optimizable().

Referenced by v8::internal::Logger::CodeCreateEvent(), and v8::internal::CodeEventLogger::CodeCreateEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeObjectLiteralMap()

static Handle<Map> v8::internal::ComputeObjectLiteralMap ( Handle< Context context,
Handle< FixedArray constant_properties,
bool is_result_from_cache 
)
static

Definition at line 71 of file runtime.cc.

73  {
74  Isolate* isolate = context->GetIsolate();
75  int properties_length = constant_properties->length();
76  int number_of_properties = properties_length / 2;
77  // Check that there are only internal strings and array indices among keys.
78  int number_of_string_keys = 0;
79  for (int p = 0; p != properties_length; p += 2) {
80  Object* key = constant_properties->get(p);
81  uint32_t element_index = 0;
82  if (key->IsInternalizedString()) {
83  number_of_string_keys++;
84  } else if (key->ToArrayIndex(&element_index)) {
85  // An index key does not require space in the property backing store.
86  number_of_properties--;
87  } else {
88  // Bail out as a non-internalized-string non-index key makes caching
89  // impossible.
90  // DCHECK to make sure that the if condition after the loop is false.
91  DCHECK(number_of_string_keys != number_of_properties);
92  break;
93  }
94  }
95  // If we only have internalized strings and array indices among keys then we
96  // can use the map cache in the native context.
97  const int kMaxKeys = 10;
98  if ((number_of_string_keys == number_of_properties) &&
99  (number_of_string_keys < kMaxKeys)) {
100  // Create the fixed array with the key.
101  Handle<FixedArray> keys =
102  isolate->factory()->NewFixedArray(number_of_string_keys);
103  if (number_of_string_keys > 0) {
104  int index = 0;
105  for (int p = 0; p < properties_length; p += 2) {
106  Object* key = constant_properties->get(p);
107  if (key->IsInternalizedString()) {
108  keys->set(index++, key);
109  }
110  }
111  DCHECK(index == number_of_string_keys);
112  }
113  *is_result_from_cache = true;
114  return isolate->factory()->ObjectLiteralMapFromCache(context, keys);
115  }
116  *is_result_from_cache = false;
117  return Map::Create(isolate, number_of_properties);
118 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_BOOL(profile_deserialization

References v8::internal::Map::Create(), DCHECK, v8::internal::Isolate::factory(), keys(), and v8::internal::Object::ToArrayIndex().

Referenced by CreateObjectLiteralBoilerplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputePcOffsetFromCodeOffset()

static int v8::internal::ComputePcOffsetFromCodeOffset ( Code code,
int  code_offset 
)
static

Definition at line 1760 of file debug.cc.

1760  {
1761  DCHECK_EQ(code->kind(), Code::FUNCTION);
1762 
1763  int mask = RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) |
1764  RelocInfo::ModeMask(RelocInfo::CONST_POOL) |
1765  RelocInfo::ModeMask(RelocInfo::VENEER_POOL);
1766  int reloc = 0;
1767  for (RelocIterator it(code, mask); !it.done(); it.next()) {
1768  RelocInfo* info = it.rinfo();
1769  if (info->pc() - code->instruction_start() - reloc >= code_offset) break;
1770  if (RelocInfo::IsDebugBreakSlot(info->rmode())) {
1771  reloc += Assembler::kDebugBreakSlotLength;
1772  } else {
1773  DCHECK(RelocInfo::IsConstPool(info->rmode()));
1774  reloc += static_cast<int>(info->data());
1775  }
1776  }
1777 
1778  int pc_offset = code_offset + reloc;
1779 
1780  DCHECK_LT(code->instruction_start() + pc_offset, code->instruction_end());
1781 
1782  return pc_offset;
1783 }

References v8::internal::RelocInfo::CONST_POOL, v8::internal::RelocInfo::data(), DCHECK, DCHECK_EQ, DCHECK_LT, v8::internal::RelocInfo::DEBUG_BREAK_SLOT, v8::internal::RelocIterator::done(), v8::internal::Code::instruction_end(), v8::internal::Code::instruction_start(), v8::internal::RelocInfo::IsConstPool(), v8::internal::RelocInfo::IsDebugBreakSlot(), v8::internal::Assembler::kDebugBreakSlotLength, v8::internal::Code::kind(), v8::internal::RelocInfo::ModeMask(), v8::internal::RelocInfo::pc(), v8::internal::RelocInfo::rmode(), and v8::internal::RelocInfo::VENEER_POOL.

Referenced by RecompileAndRelocateSuspendedGenerators(), and RedirectActivationsToRecompiledCodeOnThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputePointerHash()

uint32_t v8::internal::ComputePointerHash ( void *  ptr)
inline

Definition at line 274 of file utils.h.

274  {
275  return ComputeIntegerHash(
276  static_cast<uint32_t>(reinterpret_cast<intptr_t>(ptr)),
278 }
static const uint32_t kZeroHashSeed
Definition: utils.h:245
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
Definition: utils.h:249

References ComputeIntegerHash(), and kZeroHashSeed.

Referenced by v8::internal::HeapObjectsMap::FindEntry(), v8::internal::CodeAddressMap::NameMap::FindEntry(), v8::internal::HeapObjectsMap::FindOrAddEntry(), v8::internal::CodeAddressMap::NameMap::FindOrCreateEntry(), v8::internal::HeapObjectsMap::FindUntrackedObjects(), Hash(), v8::internal::HeapObjectsMap::MoveObject(), v8::internal::compiler::NodeCacheHash(), and v8::internal::HeapObjectsMap::RemoveDeadEntries().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeReceiverForNonGlobal()

static Object* v8::internal::ComputeReceiverForNonGlobal ( Isolate isolate,
JSObject holder 
)
static

Definition at line 4114 of file runtime.cc.

4114  {
4115  DCHECK(!holder->IsGlobalObject());
4116  Context* top = isolate->context();
4117  // Get the context extension function.
4118  JSFunction* context_extension_function =
4119  top->native_context()->context_extension_function();
4120  // If the holder isn't a context extension object, we just return it
4121  // as the receiver. This allows arguments objects to be used as
4122  // receivers, but only if they are put in the context scope chain
4123  // explicitly via a with-statement.
4124  Object* constructor = holder->map()->constructor();
4125  if (constructor != context_extension_function) return holder;
4126  // Fall back to using the global object as the implicit receiver if
4127  // the property turns out to be a local variable allocated in a
4128  // context extension object - introduced via eval.
4129  return isolate->heap()->undefined_value();
4130 }

References v8::internal::Isolate::context(), DCHECK, v8::internal::Isolate::heap(), v8::internal::HeapObject::map(), and v8::internal::Context::native_context().

Referenced by LoadLookupSlotHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeReceiverTypes()

static bool v8::internal::ComputeReceiverTypes ( Expression expr,
HValue receiver,
SmallMapList **  t,
Zone zone 
)
static

Definition at line 6397 of file hydrogen.cc.

6400  {
6401  SmallMapList* types = expr->GetReceiverTypes();
6402  *t = types;
6403  bool monomorphic = expr->IsMonomorphic();
6404  if (types != NULL && receiver->HasMonomorphicJSObjectType()) {
6405  Map* root_map = receiver->GetMonomorphicJSObjectMap()->FindRootMap();
6406  types->FilterForPossibleTransitions(root_map);
6407  monomorphic = types->length() == 1;
6408  }
6409  return monomorphic &&
6410  CanInlinePropertyAccess(IC::MapToType<Type>(types->first(), zone));
6411 }
static bool CanInlinePropertyAccess(Type *type)
Definition: hydrogen.cc:5462

References CanInlinePropertyAccess(), v8::internal::HValue::GetMonomorphicJSObjectMap(), v8::internal::Expression::GetReceiverTypes(), v8::internal::HValue::HasMonomorphicJSObjectType(), v8::internal::Expression::IsMonomorphic(), NULL, and v8::internal::HGraphBuilder::zone().

Referenced by v8::internal::HOptimizedGraphBuilder::BuildNamedAccess(), and v8::internal::HOptimizedGraphBuilder::HandleKeyedElementAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeTypeInfoCountDelta()

static void v8::internal::ComputeTypeInfoCountDelta ( IC::State  old_state,
IC::State  new_state,
int polymorphic_delta,
int generic_delta 
)
static

Definition at line 355 of file ic.cc.

357  {
358  switch (old_state) {
359  case UNINITIALIZED:
360  case PREMONOMORPHIC:
361  if (new_state == UNINITIALIZED || new_state == PREMONOMORPHIC) break;
362  if (new_state == MONOMORPHIC || new_state == POLYMORPHIC) {
363  *polymorphic_delta = 1;
364  } else if (new_state == MEGAMORPHIC || new_state == GENERIC) {
365  *generic_delta = 1;
366  }
367  break;
368  case MONOMORPHIC:
369  case POLYMORPHIC:
370  if (new_state == MONOMORPHIC || new_state == POLYMORPHIC) break;
371  *polymorphic_delta = -1;
372  if (new_state == MEGAMORPHIC || new_state == GENERIC) {
373  *generic_delta = 1;
374  }
375  break;
376  case MEGAMORPHIC:
377  case GENERIC:
378  if (new_state == MEGAMORPHIC || new_state == GENERIC) break;
379  *generic_delta = -1;
380  if (new_state == MONOMORPHIC || new_state == POLYMORPHIC) {
381  *polymorphic_delta = 1;
382  }
383  break;
384  case PROTOTYPE_FAILURE:
385  case DEBUG_STUB:
386  case DEFAULT:
387  UNREACHABLE();
388  }
389 }

References DEBUG_STUB, DEFAULT, GENERIC, MEGAMORPHIC, MONOMORPHIC, POLYMORPHIC, PREMONOMORPHIC, PROTOTYPE_FAILURE, UNINITIALIZED, and UNREACHABLE.

Referenced by v8::internal::IC::OnTypeFeedbackChanged().

+ Here is the caller graph for this function:

◆ ConcatStringContent()

template<typename SinkChar , typename StringType >
Handle<String> v8::internal::ConcatStringContent ( Handle< StringType >  result,
Handle< String first,
Handle< String second 
)

Definition at line 460 of file factory.cc.

462  {
463  DisallowHeapAllocation pointer_stays_valid;
464  SinkChar* sink = result->GetChars();
465  String::WriteToFlat(*first, sink, 0, first->length());
466  String::WriteToFlat(*second, sink + first->length(), 0, second->length());
467  return result;
468 }

References v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:

◆ ConstantIsObject()

bool v8::internal::ConstantIsObject ( HConstant *  constant,
Isolate isolate 
)

Definition at line 3224 of file hydrogen-instructions.cc.

3224  {
3225  if (constant->HasNumberValue()) return false;
3226  if (constant->GetUnique().IsKnownGlobal(isolate->heap()->null_value())) {
3227  return true;
3228  }
3229  if (constant->IsUndetectable()) return false;
3230  InstanceType type = constant->GetInstanceType();
3231  return (FIRST_NONCALLABLE_SPEC_OBJECT_TYPE <= type) &&
3233 }

References FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, v8::internal::Isolate::heap(), and LAST_NONCALLABLE_SPEC_OBJECT_TYPE.

+ Here is the call graph for this function:

◆ ContainsLabel()

static bool v8::internal::ContainsLabel ( ZoneList< const AstRawString * > *  labels,
const AstRawString label 
)
static

Definition at line 2386 of file parser.cc.

2387  {
2388  DCHECK(label != NULL);
2389  if (labels != NULL) {
2390  for (int i = labels->length(); i-- > 0; ) {
2391  if (labels->at(i) == label) {
2392  return true;
2393  }
2394  }
2395  }
2396  return false;
2397 }

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, and NULL.

Referenced by v8::internal::Parser::LookupBreakTarget(), v8::internal::Parser::LookupContinueTarget(), v8::internal::Parser::ParseBreakStatement(), v8::internal::Parser::ParseExpressionOrLabelledStatement(), and v8::internal::Parser::TargetStackContainsLabel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ContainsMap()

static bool v8::internal::ContainsMap ( MapHandleList maps,
Handle< Map map 
)
static

Definition at line 3196 of file objects.cc.

3196  {
3197  DCHECK(!map.is_null());
3198  for (int i = 0; i < maps->length(); ++i) {
3199  if (!maps->at(i).is_null() && maps->at(i).is_identical_to(map)) return true;
3200  }
3201  return false;
3202 }

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, v8::internal::Handle< T >::is_null(), and v8::internal::HeapObject::map().

Referenced by v8::internal::Map::FindTransitionedMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ContainsOnlyValidKeys()

static bool v8::internal::ContainsOnlyValidKeys ( Handle< FixedArray array)
static

Definition at line 5677 of file objects.cc.

5677  {
5678  int len = array->length();
5679  for (int i = 0; i < len; i++) {
5680  Object* e = array->get(i);
5681  if (!(e->IsString() || e->IsNumber())) return false;
5682  }
5683  return true;
5684 }

Referenced by v8::internal::JSReceiver::GetKeys().

+ Here is the caller graph for this function:

◆ ContextMemOperand()

MemOperand v8::internal::ContextMemOperand ( Register  context,
int  index 
)
inline

Definition at line 2269 of file macro-assembler-arm64.h.

2269  {
2270  return MemOperand(context, Context::SlotOffset(index));
2271 }

References v8::internal::Context::SlotOffset().

Referenced by GlobalObjectMemOperand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ContextOperand()

Operand v8::internal::ContextOperand ( Register  context,
int  index 
)
inline

Definition at line 1601 of file macro-assembler-arm.h.

1601  {
1602  return MemOperand(context, Context::SlotOffset(index));
1603 }

References v8::internal::Context::SlotOffset().

Referenced by v8::internal::LCodeGen::GeneratePrologue(), and GlobalObjectOperand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ContextsHaveSameOrigin()

static bool v8::internal::ContextsHaveSameOrigin ( Handle< Context context1,
Handle< Context context2 
)
static

Definition at line 8715 of file runtime.cc.

8716  {
8717  return context1->security_token() == context2->security_token();
8718 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ ConvertAndSetOverflow()

static int32_t v8::internal::ConvertAndSetOverflow ( Representation  r,
int64_t  result,
bool overflow 
)
static

Definition at line 131 of file hydrogen-instructions.cc.

133  {
134  if (r.IsSmi()) {
135  if (result > Smi::kMaxValue) {
136  *overflow = true;
137  return Smi::kMaxValue;
138  }
139  if (result < Smi::kMinValue) {
140  *overflow = true;
141  return Smi::kMinValue;
142  }
143  } else {
144  if (result > kMaxInt) {
145  *overflow = true;
146  return kMaxInt;
147  }
148  if (result < kMinInt) {
149  *overflow = true;
150  return kMinInt;
151  }
152  }
153  return static_cast<int32_t>(result);
154 }
const int kMinInt
Definition: globals.h:110

References v8::internal::Representation::IsSmi(), kMaxInt, v8::internal::Smi::kMaxValue, kMinInt, v8::internal::Smi::kMinValue, and overflow.

Referenced by AddWithoutOverflow(), MulWithoutOverflow(), and SubWithoutOverflow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertCase()

template<class Converter >
static MUST_USE_RESULT Object* v8::internal::ConvertCase ( Handle< String s,
Isolate isolate,
unibrow::Mapping< Converter, 128 > *  mapping 
)
static

Definition at line 1036 of file runtime-strings.cc.

1038  {
1039  s = String::Flatten(s);
1040  int length = s->length();
1041  // Assume that the string is not empty; we need this assumption later
1042  if (length == 0) return *s;
1043 
1044  // Simpler handling of ASCII strings.
1045  //
1046  // NOTE: This assumes that the upper/lower case of an ASCII
1047  // character is also ASCII. This is currently the case, but it
1048  // might break in the future if we implement more context and locale
1049  // dependent upper/lower conversions.
1050  if (s->IsOneByteRepresentationUnderneath()) {
1051  // Same length as input.
1052  Handle<SeqOneByteString> result =
1053  isolate->factory()->NewRawOneByteString(length).ToHandleChecked();
1054  DisallowHeapAllocation no_gc;
1055  String::FlatContent flat_content = s->GetFlatContent();
1056  DCHECK(flat_content.IsFlat());
1057  bool has_changed_character = false;
1058  bool is_ascii = FastAsciiConvert<Converter>(
1059  reinterpret_cast<char*>(result->GetChars()),
1060  reinterpret_cast<const char*>(flat_content.ToOneByteVector().start()),
1061  length, &has_changed_character);
1062  // If not ASCII, we discard the result and take the 2 byte path.
1063  if (is_ascii) return has_changed_character ? *result : *s;
1064  }
1065 
1066  Handle<SeqString> result; // Same length as input.
1067  if (s->IsOneByteRepresentation()) {
1068  result = isolate->factory()->NewRawOneByteString(length).ToHandleChecked();
1069  } else {
1070  result = isolate->factory()->NewRawTwoByteString(length).ToHandleChecked();
1071  }
1072 
1073  Object* answer = ConvertCaseHelper(isolate, *s, *result, length, mapping);
1074  if (answer->IsException() || answer->IsString()) return answer;
1075 
1076  DCHECK(answer->IsSmi());
1077  length = Smi::cast(answer)->value();
1078  if (s->IsOneByteRepresentation() && length > 0) {
1080  isolate, result, isolate->factory()->NewRawOneByteString(length));
1081  } else {
1082  if (length < 0) length = -length;
1084  isolate, result, isolate->factory()->NewRawTwoByteString(length));
1085  }
1086  return ConvertCaseHelper(isolate, *s, *result, length, mapping);
1087 }
static MUST_USE_RESULT Object * ConvertCaseHelper(Isolate *isolate, String *string, SeqString *result, int result_length, unibrow::Mapping< Converter, 128 > *mapping)

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, ConvertCaseHelper(), DCHECK, v8::internal::Isolate::factory(), v8::internal::String::Flatten(), v8::internal::String::FlatContent::IsFlat(), and v8::internal::String::FlatContent::ToOneByteVector().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertCaseHelper()

template<class Converter >
static MUST_USE_RESULT Object* v8::internal::ConvertCaseHelper ( Isolate isolate,
String string,
SeqString result,
int  result_length,
unibrow::Mapping< Converter, 128 > *  mapping 
)
static

Definition at line 822 of file runtime-strings.cc.

824  {
826  // We try this twice, once with the assumption that the result is no longer
827  // than the input and, if that assumption breaks, again with the exact
828  // length. This may not be pretty, but it is nicer than what was here before
829  // and I hereby claim my vaffel-is.
830  //
831  // NOTE: This assumes that the upper/lower case of an ASCII
832  // character is also ASCII. This is currently the case, but it
833  // might break in the future if we implement more context and locale
834  // dependent upper/lower conversions.
835  bool has_changed_character = false;
836 
837  // Convert all characters to upper case, assuming that they will fit
838  // in the buffer
839  Access<ConsStringIteratorOp> op(isolate->runtime_state()->string_iterator());
840  StringCharacterStream stream(string, op.value());
841  unibrow::uchar chars[Converter::kMaxWidth];
842  // We can assume that the string is not empty
843  uc32 current = stream.GetNext();
844  bool ignore_overflow = Converter::kIsToLower || result->IsSeqTwoByteString();
845  for (int i = 0; i < result_length;) {
846  bool has_next = stream.HasMore();
847  uc32 next = has_next ? stream.GetNext() : 0;
848  int char_length = mapping->get(current, next, chars);
849  if (char_length == 0) {
850  // The case conversion of this character is the character itself.
851  result->Set(i, current);
852  i++;
853  } else if (char_length == 1 &&
854  (ignore_overflow || !ToUpperOverflows(current))) {
855  // Common case: converting the letter resulted in one character.
856  DCHECK(static_cast<uc32>(chars[0]) != current);
857  result->Set(i, chars[0]);
858  has_changed_character = true;
859  i++;
860  } else if (result_length == string->length()) {
861  bool overflows = ToUpperOverflows(current);
862  // We've assumed that the result would be as long as the
863  // input but here is a character that converts to several
864  // characters. No matter, we calculate the exact length
865  // of the result and try the whole thing again.
866  //
867  // Note that this leaves room for optimization. We could just
868  // memcpy what we already have to the result string. Also,
869  // the result string is the last object allocated we could
870  // "realloc" it and probably, in the vast majority of cases,
871  // extend the existing string to be able to hold the full
872  // result.
873  int next_length = 0;
874  if (has_next) {
875  next_length = mapping->get(next, 0, chars);
876  if (next_length == 0) next_length = 1;
877  }
878  int current_length = i + char_length + next_length;
879  while (stream.HasMore()) {
880  current = stream.GetNext();
881  overflows |= ToUpperOverflows(current);
882  // NOTE: we use 0 as the next character here because, while
883  // the next character may affect what a character converts to,
884  // it does not in any case affect the length of what it convert
885  // to.
886  int char_length = mapping->get(current, 0, chars);
887  if (char_length == 0) char_length = 1;
888  current_length += char_length;
889  if (current_length > String::kMaxLength) {
890  AllowHeapAllocation allocate_error_and_return;
892  NewInvalidStringLengthError());
893  }
894  }
895  // Try again with the real length. Return signed if we need
896  // to allocate a two-byte string for to uppercase.
897  return (overflows && !ignore_overflow) ? Smi::FromInt(-current_length)
898  : Smi::FromInt(current_length);
899  } else {
900  for (int j = 0; j < char_length; j++) {
901  result->Set(i, chars[j]);
902  i++;
903  }
904  has_changed_character = true;
905  }
906  current = next;
907  }
908  if (has_changed_character) {
909  return result;
910  } else {
911  // If we didn't actually change anything in doing the conversion
912  // we simple return the result and let the converted string
913  // become garbage; there is no reason to keep two identical strings
914  // alive.
915  return string;
916  }
917 }
int get(uchar c, uchar n, uchar *result)
Definition: unicode-inl.h:27
static bool ToUpperOverflows(uc32 character)
int32_t uc32
Definition: globals.h:185

References DCHECK, v8::internal::Smi::FromInt(), unibrow::Mapping< T, size >::get(), v8::internal::StringCharacterStream::GetNext(), v8::internal::StringCharacterStream::HasMore(), v8::internal::String::kMaxLength, v8::internal::String::length(), v8::internal::Isolate::runtime_state(), v8::internal::String::Set(), v8::internal::RuntimeState::string_iterator(), THROW_NEW_ERROR_RETURN_FAILURE, ToUpperOverflows(), and v8::internal::Access< T >::value().

Referenced by ConvertCase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyBytes() [1/2]

template<typename T >
void v8::internal::CopyBytes ( T dst,
const T src,
size_t  num_bytes 
)
inline

Definition at line 1161 of file utils.h.

1161  {
1162  STATIC_ASSERT(sizeof(T) == 1);
1163  DCHECK(Min(dst, const_cast<T*>(src)) + num_bytes <=
1164  Max(dst, const_cast<T*>(src)));
1165  if (num_bytes == 0) return;
1166 
1167  // Use block copying MemCopy if the segment we're copying is
1168  // enough to justify the extra call/setup overhead.
1169  static const int kBlockCopyLimit = kMinComplexMemCopy;
1170 
1171  if (num_bytes < static_cast<size_t>(kBlockCopyLimit)) {
1172  do {
1173  num_bytes--;
1174  *dst++ = *src++;
1175  } while (num_bytes > 0);
1176  } else {
1177  MemCopy(dst, src, num_bytes);
1178  }
1179 }
T Min(T a, T b)
Definition: utils.h:146
const int kMinComplexMemCopy
Definition: utils.h:356
T Max(T a, T b)
Definition: utils.h:139

References DCHECK, kMinComplexMemCopy, Max(), MemCopy(), Min(), STATIC_ASSERT(), and T.

+ Here is the call graph for this function:

◆ CopyBytes() [2/2]

template<int n>
void v8::internal::CopyBytes ( uint8_t *  target,
uint8_t *  source 
)
inline

Definition at line 552 of file runtime-typedarray.cc.

552  {
553  for (int i = 0; i < n; i++) {
554  *(target++) = *(source++);
555  }
556 }

Referenced by v8::internal::Heap::CopyCode(), v8::internal::Code::CopyFrom(), v8::internal::CodeAgingHelper::CopyYoungSequenceTo(), v8::internal::Deoptimizer::EnsureCodeForDeoptimizationEntry(), RUNTIME_FUNCTION(), v8::internal::ScriptData::ScriptData(), and v8::internal::SerializedCodeData::SerializedCodeData().

+ Here is the caller graph for this function:

◆ CopyCachedOneByteCharsToArray()

static int v8::internal::CopyCachedOneByteCharsToArray ( Heap heap,
const uint8_t *  chars,
FixedArray elements,
int  length 
)
static

Definition at line 737 of file runtime-strings.cc.

738  {
740  FixedArray* one_byte_cache = heap->single_character_string_cache();
741  Object* undefined = heap->undefined_value();
742  int i;
743  WriteBarrierMode mode = elements->GetWriteBarrierMode(no_gc);
744  for (i = 0; i < length; ++i) {
745  Object* value = one_byte_cache->get(chars[i]);
746  if (value == undefined) break;
747  elements->set(i, value, mode);
748  }
749  if (i < length) {
750  DCHECK(Smi::FromInt(0) == 0);
751  memset(elements->data_start() + i, 0, kPointerSize * (length - i));
752  }
753 #ifdef DEBUG
754  for (int j = 0; j < length; ++j) {
755  Object* element = elements->get(j);
756  DCHECK(element == Smi::FromInt(0) ||
757  (element->IsString() && String::cast(element)->LooksValid()));
758  }
759 #endif
760  return i;
761 }

References v8::internal::FixedArray::data_start(), DCHECK, v8::internal::Smi::FromInt(), v8::internal::FixedArray::get(), v8::internal::HeapObject::GetWriteBarrierMode(), kPointerSize, mode(), and v8::internal::FixedArray::set().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyChars()

template<typename sourcechar , typename sinkchar >
void v8::internal::CopyChars ( sinkchar *  dest,
const sourcechar *  src,
int  chars 
)

Definition at line 1258 of file utils.h.

1258  {
1259  DCHECK(sizeof(sourcechar) <= 2);
1260  DCHECK(sizeof(sinkchar) <= 2);
1261  if (sizeof(sinkchar) == 1) {
1262  if (sizeof(sourcechar) == 1) {
1263  CopyCharsUnsigned(reinterpret_cast<uint8_t*>(dest),
1264  reinterpret_cast<const uint8_t*>(src),
1265  chars);
1266  } else {
1267  CopyCharsUnsigned(reinterpret_cast<uint8_t*>(dest),
1268  reinterpret_cast<const uint16_t*>(src),
1269  chars);
1270  }
1271  } else {
1272  if (sizeof(sourcechar) == 1) {
1273  CopyCharsUnsigned(reinterpret_cast<uint16_t*>(dest),
1274  reinterpret_cast<const uint8_t*>(src),
1275  chars);
1276  } else {
1277  CopyCharsUnsigned(reinterpret_cast<uint16_t*>(dest),
1278  reinterpret_cast<const uint16_t*>(src),
1279  chars);
1280  }
1281  }
1282 }
void CopyCharsUnsigned(sinkchar *dest, const sourcechar *src, int chars)
Definition: utils.h:1285

References CopyCharsUnsigned(), and DCHECK.

Referenced by v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyCharsUnsigned()

template<typename sourcechar , typename sinkchar >
void v8::internal::CopyCharsUnsigned ( sinkchar *  dest,
const sourcechar *  src,
int  chars 
)

Definition at line 1285 of file utils.h.

1285  {
1286  sinkchar* limit = dest + chars;
1287  if ((sizeof(*dest) == sizeof(*src)) &&
1288  (chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest)))) {
1289  MemCopy(dest, src, chars * sizeof(*dest));
1290  } else {
1291  while (dest < limit) *dest++ = static_cast<sinkchar>(*src++);
1292  }
1293 }

References kMinComplexMemCopy, and MemCopy().

Referenced by CopyChars().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyDictionaryToDoubleElements()

static void v8::internal::CopyDictionaryToDoubleElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 441 of file elements.cc.

445  {
446  DisallowHeapAllocation no_allocation;
447  SeededNumberDictionary* from = SeededNumberDictionary::cast(from_base);
448  int copy_size = raw_copy_size;
449  if (copy_size < 0) {
450  DCHECK(copy_size == ElementsAccessor::kCopyToEnd ||
451  copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
452  copy_size = from->max_number_key() + 1 - from_start;
453  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
454  for (int i = to_start + copy_size; i < to_base->length(); ++i) {
455  FixedDoubleArray::cast(to_base)->set_the_hole(i);
456  }
457  }
458  }
459  if (copy_size == 0) return;
460  FixedDoubleArray* to = FixedDoubleArray::cast(to_base);
461  uint32_t to_length = to->length();
462  if (to_start + copy_size > to_length) {
463  copy_size = to_length - to_start;
464  }
465  for (int i = 0; i < copy_size; i++) {
466  int entry = from->FindEntry(i + from_start);
467  if (entry != SeededNumberDictionary::kNotFound) {
468  to->set(i + to_start, from->ValueAt(entry)->Number());
469  } else {
470  to->set_the_hole(i + to_start);
471  }
472  }
473 }

References DCHECK, v8::internal::HashTable< Derived, Shape, Key >::FindEntry(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::HashTable< Derived, Shape, Key >::kNotFound, v8::internal::FixedArrayBase::length(), v8::internal::SeededNumberDictionary::max_number_key(), v8::internal::Object::Number(), to(), and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

Referenced by v8::internal::FastDoubleElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyDictionaryToObjectElements()

static void v8::internal::CopyDictionaryToObjectElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
ElementsKind  to_kind,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 200 of file elements.cc.

202  {
203  DisallowHeapAllocation no_allocation;
204  SeededNumberDictionary* from = SeededNumberDictionary::cast(from_base);
205  int copy_size = raw_copy_size;
206  Heap* heap = from->GetHeap();
207  if (raw_copy_size < 0) {
208  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
209  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
210  copy_size = from->max_number_key() + 1 - from_start;
211  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
212  int start = to_start + copy_size;
213  int length = to_base->length() - start;
214  if (length > 0) {
215  Heap* heap = from->GetHeap();
216  MemsetPointer(FixedArray::cast(to_base)->data_start() + start,
217  heap->the_hole_value(), length);
218  }
219  }
220  }
221  DCHECK(to_base != from_base);
223  if (copy_size == 0) return;
224  FixedArray* to = FixedArray::cast(to_base);
225  uint32_t to_length = to->length();
226  if (to_start + copy_size > to_length) {
227  copy_size = to_length - to_start;
228  }
229  for (int i = 0; i < copy_size; i++) {
230  int entry = from->FindEntry(i + from_start);
231  if (entry != SeededNumberDictionary::kNotFound) {
232  Object* value = from->ValueAt(entry);
233  DCHECK(!value->IsTheHole());
234  to->set(i + to_start, value, SKIP_WRITE_BARRIER);
235  } else {
236  to->set_the_hole(i + to_start);
237  }
238  }
239  if (IsFastObjectElementsKind(to_kind)) {
240  if (!heap->InNewSpace(to)) {
241  heap->RecordWrites(to->address(),
242  to->OffsetOfElementAt(to_start),
243  copy_size);
244  }
245  heap->incremental_marking()->RecordWrites(to);
246  }
247 }
void MemsetPointer(T **dest, U *value, int counter)
Definition: utils.h:1183

References DCHECK, v8::internal::HashTable< Derived, Shape, Key >::FindEntry(), v8::internal::HeapObject::GetHeap(), v8::internal::Heap::incremental_marking(), v8::internal::Heap::InNewSpace(), IsFastObjectElementsKind(), IsFastSmiOrObjectElementsKind(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::HashTable< Derived, Shape, Key >::kNotFound, v8::internal::FixedArrayBase::length(), v8::internal::SeededNumberDictionary::max_number_key(), MemsetPointer(), v8::internal::IncrementalMarking::RecordWrites(), SKIP_WRITE_BARRIER, to(), and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

Referenced by v8::internal::FastSmiOrObjectElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyDoubleToDoubleElements()

static void v8::internal::CopyDoubleToDoubleElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 301 of file elements.cc.

304  {
305  DisallowHeapAllocation no_allocation;
306  int copy_size = raw_copy_size;
307  if (raw_copy_size < 0) {
308  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
309  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
310  copy_size = Min(from_base->length() - from_start,
311  to_base->length() - to_start);
312  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
313  for (int i = to_start + copy_size; i < to_base->length(); ++i) {
314  FixedDoubleArray::cast(to_base)->set_the_hole(i);
315  }
316  }
317  }
318  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
319  (copy_size + static_cast<int>(from_start)) <= from_base->length());
320  if (copy_size == 0) return;
321  FixedDoubleArray* from = FixedDoubleArray::cast(from_base);
322  FixedDoubleArray* to = FixedDoubleArray::cast(to_base);
323  Address to_address = to->address() + FixedDoubleArray::kHeaderSize;
324  Address from_address = from->address() + FixedDoubleArray::kHeaderSize;
325  to_address += kDoubleSize * to_start;
326  from_address += kDoubleSize * from_start;
327  int words_per_double = (kDoubleSize / kPointerSize);
328  CopyWords(reinterpret_cast<Object**>(to_address),
329  reinterpret_cast<Object**>(from_address),
330  static_cast<size_t>(words_per_double * copy_size));
331 }
const int kDoubleSize
Definition: globals.h:127
void CopyWords(T *dst, const T *src, size_t num_words)
Definition: utils.h:1112

References v8::internal::HeapObject::address(), CopyWords(), DCHECK, v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, kDoubleSize, v8::internal::FixedArrayBase::kHeaderSize, kPointerSize, v8::internal::FixedArrayBase::length(), Min(), and to().

Referenced by v8::internal::FastDoubleElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyDoubleToObjectElements()

static void v8::internal::CopyDoubleToObjectElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
ElementsKind  to_kind,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 253 of file elements.cc.

257  {
259  int copy_size = raw_copy_size;
260  if (raw_copy_size < 0) {
261  DisallowHeapAllocation no_allocation;
262  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
263  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
264  copy_size = Min(from_base->length() - from_start,
265  to_base->length() - to_start);
266  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
267  // Also initialize the area that will be copied over since HeapNumber
268  // allocation below can cause an incremental marking step, requiring all
269  // existing heap objects to be propertly initialized.
270  int start = to_start;
271  int length = to_base->length() - start;
272  if (length > 0) {
273  Heap* heap = from_base->GetHeap();
274  MemsetPointer(FixedArray::cast(to_base)->data_start() + start,
275  heap->the_hole_value(), length);
276  }
277  }
278  }
279  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
280  (copy_size + static_cast<int>(from_start)) <= from_base->length());
281  if (copy_size == 0) return;
282 
283  // From here on, the code below could actually allocate. Therefore the raw
284  // values are wrapped into handles.
285  Isolate* isolate = from_base->GetIsolate();
286  Handle<FixedDoubleArray> from(FixedDoubleArray::cast(from_base), isolate);
287  Handle<FixedArray> to(FixedArray::cast(to_base), isolate);
288  for (int i = 0; i < copy_size; ++i) {
289  HandleScope scope(isolate);
290  if (IsFastSmiElementsKind(to_kind)) {
291  UNIMPLEMENTED();
292  } else {
294  Handle<Object> value = FixedDoubleArray::get(from, i + from_start);
295  to->set(i + to_start, *value, UPDATE_WRITE_BARRIER);
296  }
297  }
298 }
#define UNIMPLEMENTED()
Definition: logging.h:28
bool IsFastSmiElementsKind(ElementsKind kind)

References DCHECK, v8::internal::FixedDoubleArray::get(), v8::internal::HeapObject::GetHeap(), v8::internal::HeapObject::GetIsolate(), IsFastObjectElementsKind(), IsFastSmiElementsKind(), IsFastSmiOrObjectElementsKind(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::FixedArrayBase::length(), MemsetPointer(), Min(), to(), UNIMPLEMENTED, and UPDATE_WRITE_BARRIER.

Referenced by v8::internal::FastSmiOrObjectElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyFastElementsToDictionary()

static Handle<SeededNumberDictionary> v8::internal::CopyFastElementsToDictionary ( Handle< FixedArrayBase array,
int  length,
Handle< SeededNumberDictionary dictionary 
)
static

Definition at line 4429 of file objects.cc.

4432  {
4433  Isolate* isolate = array->GetIsolate();
4434  Factory* factory = isolate->factory();
4435  bool has_double_elements = array->IsFixedDoubleArray();
4436  for (int i = 0; i < length; i++) {
4437  Handle<Object> value;
4438  if (has_double_elements) {
4439  Handle<FixedDoubleArray> double_array =
4440  Handle<FixedDoubleArray>::cast(array);
4441  if (double_array->is_the_hole(i)) {
4442  value = factory->the_hole_value();
4443  } else {
4444  value = factory->NewHeapNumber(double_array->get_scalar(i));
4445  }
4446  } else {
4447  value = handle(Handle<FixedArray>::cast(array)->get(i), isolate);
4448  }
4449  if (!value->IsTheHole()) {
4450  PropertyDetails details = PropertyDetails(NONE, NORMAL, 0);
4451  dictionary =
4452  SeededNumberDictionary::AddNumberEntry(dictionary, i, value, details);
4453  }
4454  }
4455  return dictionary;
4456 }
@ NONE

References v8::internal::SeededNumberDictionary::AddNumberEntry(), v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), handle(), NONE, and NORMAL.

Referenced by v8::internal::JSObject::Freeze(), and v8::internal::JSObject::NormalizeElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyObjectToDoubleElements()

static void v8::internal::CopyObjectToDoubleElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 407 of file elements.cc.

410  {
411  DisallowHeapAllocation no_allocation;
412  int copy_size = raw_copy_size;
413  if (raw_copy_size < 0) {
414  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
415  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
416  copy_size = from_base->length() - from_start;
417  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
418  for (int i = to_start + copy_size; i < to_base->length(); ++i) {
419  FixedDoubleArray::cast(to_base)->set_the_hole(i);
420  }
421  }
422  }
423  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
424  (copy_size + static_cast<int>(from_start)) <= from_base->length());
425  if (copy_size == 0) return;
426  FixedArray* from = FixedArray::cast(from_base);
427  FixedDoubleArray* to = FixedDoubleArray::cast(to_base);
428  Object* the_hole = from->GetHeap()->the_hole_value();
429  for (uint32_t from_end = from_start + copy_size;
430  from_start < from_end; from_start++, to_start++) {
431  Object* hole_or_object = from->get(from_start);
432  if (hole_or_object == the_hole) {
433  to->set_the_hole(to_start);
434  } else {
435  to->set(to_start, hole_or_object->Number());
436  }
437  }
438 }

References DCHECK, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetHeap(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::FixedArrayBase::length(), v8::internal::Object::Number(), and to().

Referenced by v8::internal::FastDoubleElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyObjectToObjectElements()

static void v8::internal::CopyObjectToObjectElements ( FixedArrayBase from_base,
ElementsKind  from_kind,
uint32_t  from_start,
FixedArrayBase to_base,
ElementsKind  to_kind,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 150 of file elements.cc.

155  {
156  DCHECK(to_base->map() !=
157  from_base->GetIsolate()->heap()->fixed_cow_array_map());
158  DisallowHeapAllocation no_allocation;
159  int copy_size = raw_copy_size;
160  if (raw_copy_size < 0) {
161  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
162  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
163  copy_size = Min(from_base->length() - from_start,
164  to_base->length() - to_start);
165  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
166  int start = to_start + copy_size;
167  int length = to_base->length() - start;
168  if (length > 0) {
169  Heap* heap = from_base->GetHeap();
170  MemsetPointer(FixedArray::cast(to_base)->data_start() + start,
171  heap->the_hole_value(), length);
172  }
173  }
174  }
175  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
176  (copy_size + static_cast<int>(from_start)) <= from_base->length());
177  if (copy_size == 0) return;
178  FixedArray* from = FixedArray::cast(from_base);
179  FixedArray* to = FixedArray::cast(to_base);
182  Address to_address = to->address() + FixedArray::kHeaderSize;
183  Address from_address = from->address() + FixedArray::kHeaderSize;
184  CopyWords(reinterpret_cast<Object**>(to_address) + to_start,
185  reinterpret_cast<Object**>(from_address) + from_start,
186  static_cast<size_t>(copy_size));
187  if (IsFastObjectElementsKind(from_kind) &&
188  IsFastObjectElementsKind(to_kind)) {
189  Heap* heap = from->GetHeap();
190  if (!heap->InNewSpace(to)) {
191  heap->RecordWrites(to->address(),
192  to->OffsetOfElementAt(to_start),
193  copy_size);
194  }
195  heap->incremental_marking()->RecordWrites(to);
196  }
197 }

References v8::internal::HeapObject::address(), CopyWords(), DCHECK, v8::internal::HeapObject::GetHeap(), v8::internal::HeapObject::GetIsolate(), v8::internal::Isolate::heap(), v8::internal::Heap::incremental_marking(), v8::internal::Heap::InNewSpace(), IsFastObjectElementsKind(), IsFastSmiOrObjectElementsKind(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::FixedArrayBase::kHeaderSize, v8::internal::FixedArrayBase::length(), v8::internal::HeapObject::map(), MemsetPointer(), Min(), v8::internal::IncrementalMarking::RecordWrites(), and to().

Referenced by v8::internal::FastSmiOrObjectElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyPackedSmiToDoubleElements()

static void v8::internal::CopyPackedSmiToDoubleElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
uint32_t  to_start,
int  packed_size,
int  raw_copy_size 
)
static

Definition at line 368 of file elements.cc.

372  {
373  DisallowHeapAllocation no_allocation;
374  int copy_size = raw_copy_size;
375  uint32_t to_end;
376  if (raw_copy_size < 0) {
377  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
378  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
379  copy_size = packed_size - from_start;
380  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
381  to_end = to_base->length();
382  for (uint32_t i = to_start + copy_size; i < to_end; ++i) {
383  FixedDoubleArray::cast(to_base)->set_the_hole(i);
384  }
385  } else {
386  to_end = to_start + static_cast<uint32_t>(copy_size);
387  }
388  } else {
389  to_end = to_start + static_cast<uint32_t>(copy_size);
390  }
391  DCHECK(static_cast<int>(to_end) <= to_base->length());
392  DCHECK(packed_size >= 0 && packed_size <= copy_size);
393  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
394  (copy_size + static_cast<int>(from_start)) <= from_base->length());
395  if (copy_size == 0) return;
396  FixedArray* from = FixedArray::cast(from_base);
397  FixedDoubleArray* to = FixedDoubleArray::cast(to_base);
398  for (uint32_t from_end = from_start + static_cast<uint32_t>(packed_size);
399  from_start < from_end; from_start++, to_start++) {
400  Object* smi = from->get(from_start);
401  DCHECK(!smi->IsTheHole());
402  to->set(to_start, Smi::cast(smi)->value());
403  }
404 }

References DCHECK, v8::internal::FixedArray::get(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::FixedArrayBase::length(), and to().

Referenced by v8::internal::FastDoubleElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopySmiToDoubleElements()

static void v8::internal::CopySmiToDoubleElements ( FixedArrayBase from_base,
uint32_t  from_start,
FixedArrayBase to_base,
uint32_t  to_start,
int  raw_copy_size 
)
static

Definition at line 334 of file elements.cc.

337  {
338  DisallowHeapAllocation no_allocation;
339  int copy_size = raw_copy_size;
340  if (raw_copy_size < 0) {
341  DCHECK(raw_copy_size == ElementsAccessor::kCopyToEnd ||
342  raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
343  copy_size = from_base->length() - from_start;
344  if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
345  for (int i = to_start + copy_size; i < to_base->length(); ++i) {
346  FixedDoubleArray::cast(to_base)->set_the_hole(i);
347  }
348  }
349  }
350  DCHECK((copy_size + static_cast<int>(to_start)) <= to_base->length() &&
351  (copy_size + static_cast<int>(from_start)) <= from_base->length());
352  if (copy_size == 0) return;
353  FixedArray* from = FixedArray::cast(from_base);
354  FixedDoubleArray* to = FixedDoubleArray::cast(to_base);
355  Object* the_hole = from->GetHeap()->the_hole_value();
356  for (uint32_t from_end = from_start + static_cast<uint32_t>(copy_size);
357  from_start < from_end; from_start++, to_start++) {
358  Object* hole_or_smi = from->get(from_start);
359  if (hole_or_smi == the_hole) {
360  to->set_the_hole(to_start);
361  } else {
362  to->set(to_start, Smi::cast(hole_or_smi)->value());
363  }
364  }
365 }

References DCHECK, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetHeap(), v8::internal::ElementsAccessor::kCopyToEnd, v8::internal::ElementsAccessor::kCopyToEndAndInitializeToHole, v8::internal::FixedArrayBase::length(), and to().

Referenced by v8::internal::FastDoubleElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyWords()

template<typename T >
void v8::internal::CopyWords ( T dst,
const T src,
size_t  num_words 
)
inline

Definition at line 1112 of file utils.h.

1112  {
1113  STATIC_ASSERT(sizeof(T) == kPointerSize);
1114  // TODO(mvstanton): disabled because mac builds are bogus failing on this
1115  // assert. They are doing a signed comparison. Investigate in
1116  // the morning.
1117  // DCHECK(Min(dst, const_cast<T*>(src)) + num_words <=
1118  // Max(dst, const_cast<T*>(src)));
1119  DCHECK(num_words > 0);
1120 
1121  // Use block copying MemCopy if the segment we're copying is
1122  // enough to justify the extra call/setup overhead.
1123  static const size_t kBlockCopyLimit = 16;
1124 
1125  if (num_words < kBlockCopyLimit) {
1126  do {
1127  num_words--;
1128  *dst++ = *src++;
1129  } while (num_words > 0);
1130  } else {
1131  MemCopy(dst, src, num_words * kPointerSize);
1132  }
1133 }

References DCHECK, kPointerSize, MemCopy(), STATIC_ASSERT(), and T.

Referenced by v8::internal::Heap::CopyBlock(), CopyDoubleToDoubleElements(), and CopyObjectToObjectElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CountLeadingSignBits()

int v8::internal::CountLeadingSignBits ( int64_t  value,
int  width 
)

◆ CountLeadingZeros()

int v8::internal::CountLeadingZeros ( uint64_t  value,
int  width 
)

◆ CountSetBits()

int v8::internal::CountSetBits ( uint64_t  value,
int  width 
)

Referenced by v8::internal::CPURegList::Count(), v8::internal::MacroAssembler::DecodeField(), v8::internal::MacroAssembler::TestAndBranchIfAllClear(), and v8::internal::MacroAssembler::TestAndBranchIfAnySet().

+ Here is the caller graph for this function:

◆ CountTotalHolesSize()

static intptr_t v8::internal::CountTotalHolesSize ( Heap heap)
static

Definition at line 12 of file gc-tracer.cc.

12  {
13  intptr_t holes_size = 0;
14  OldSpaces spaces(heap);
15  for (OldSpace* space = spaces.next(); space != NULL; space = spaces.next()) {
16  holes_size += space->Waste() + space->Available();
17  }
18  return holes_size;
19 }

References NULL, and space().

Referenced by v8::internal::GCTracer::Start(), and v8::internal::GCTracer::Stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CountTrailingZeros()

int v8::internal::CountTrailingZeros ( uint64_t  value,
int  width 
)

Referenced by v8::internal::MacroAssembler::Claim(), v8::internal::MacroAssembler::ClaimBySMI(), v8::internal::MacroAssembler::Drop(), and v8::internal::MacroAssembler::DropBySMI().

+ Here is the caller graph for this function:

◆ CreateArrayLiteralImpl()

static MaybeHandle<JSObject> v8::internal::CreateArrayLiteralImpl ( Isolate isolate,
Handle< FixedArray literals,
int  literals_index,
Handle< FixedArray elements,
int  flags 
)
static

Definition at line 423 of file runtime.cc.

427  {
429  literals_index >= 0 && literals_index < literals->length(), JSObject);
430  Handle<AllocationSite> site;
432  isolate, site,
433  GetLiteralAllocationSite(isolate, literals, literals_index, elements),
434  JSObject);
435 
436  bool enable_mementos = (flags & ArrayLiteral::kDisableMementos) == 0;
437  Handle<JSObject> boilerplate(JSObject::cast(site->transition_info()));
438  AllocationSiteUsageContext usage_context(isolate, site, enable_mementos);
439  usage_context.EnterNewScope();
440  JSObject::DeepCopyHints hints = (flags & ArrayLiteral::kShallowElements) == 0
441  ? JSObject::kNoHints
442  : JSObject::kObjectIsShallow;
443  MaybeHandle<JSObject> copy =
444  JSObject::DeepCopy(boilerplate, &usage_context, hints);
445  usage_context.ExitScope(site, boilerplate);
446  return copy;
447 }
enable harmony numeric literals(0o77, 0b11)") DEFINE_BOOL(harmony_object_literals
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T)
Definition: isolate.h:135
static MUST_USE_RESULT MaybeHandle< AllocationSite > GetLiteralAllocationSite(Isolate *isolate, Handle< FixedArray > literals, int literals_index, Handle< FixedArray > elements)
Definition: runtime.cc:392
#define RUNTIME_ASSERT_HANDLIFIED(value, T)
Definition: runtime-utils.h:15

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::JSObject::DeepCopy(), v8::internal::AllocationSiteUsageContext::EnterNewScope(), v8::internal::AllocationSiteUsageContext::ExitScope(), v8::internal::anonymous_namespace{flags.cc}::flags, GetLiteralAllocationSite(), v8::internal::JSObject::kNoHints, v8::internal::JSObject::kObjectIsShallow, literals(), and RUNTIME_ASSERT_HANDLIFIED.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateCache()

static FixedArray* v8::internal::CreateCache ( int  size,
Handle< JSFunction factory_function 
)
static

Definition at line 2152 of file bootstrapper.cc.

2152  {
2153  Factory* factory = factory_function->GetIsolate()->factory();
2154  // Caches are supposed to live for a long time, allocate in old space.
2155  int array_size = JSFunctionResultCache::kEntriesIndex + 2 * size;
2156  // Cannot use cast as object is not fully initialized yet.
2157  JSFunctionResultCache* cache = reinterpret_cast<JSFunctionResultCache*>(
2158  *factory->NewFixedArrayWithHoles(array_size, TENURED));
2159  cache->set(JSFunctionResultCache::kFactoryIndex, *factory_function);
2160  cache->MakeZeroSize();
2161  return cache;
2162 }

References v8::internal::JSFunctionResultCache::MakeZeroSize(), v8::internal::FixedArray::set(), size, and TENURED.

+ Here is the call graph for this function:

◆ CreateExpFunction()

UnaryMathFunction v8::internal::CreateExpFunction ( )

◆ CreateExponentialRepresentation()

static char* v8::internal::CreateExponentialRepresentation ( char *  decimal_rep,
int  exponent,
bool  negative,
int  significant_digits 
)
static

Definition at line 267 of file conversions.cc.

270  {
271  bool negative_exponent = false;
272  if (exponent < 0) {
273  negative_exponent = true;
274  exponent = -exponent;
275  }
276 
277  // Leave room in the result for appending a minus, for a period, the
278  // letter 'e', a minus or a plus depending on the exponent, and a
279  // three digit exponent.
280  unsigned result_size = significant_digits + 7;
281  SimpleStringBuilder builder(result_size + 1);
282 
283  if (negative) builder.AddCharacter('-');
284  builder.AddCharacter(decimal_rep[0]);
285  if (significant_digits != 1) {
286  builder.AddCharacter('.');
287  builder.AddString(decimal_rep + 1);
288  int rep_length = StrLength(decimal_rep);
289  builder.AddPadding('0', significant_digits - rep_length);
290  }
291 
292  builder.AddCharacter('e');
293  builder.AddCharacter(negative_exponent ? '-' : '+');
294  builder.AddDecimalInteger(exponent);
295  return builder.Finalize();
296 }
int StrLength(const char *string)
Definition: vector.h:147

References v8::internal::SimpleStringBuilder::AddCharacter(), v8::internal::SimpleStringBuilder::AddDecimalInteger(), v8::internal::SimpleStringBuilder::AddPadding(), v8::internal::SimpleStringBuilder::AddString(), v8::internal::SimpleStringBuilder::Finalize(), negative, and StrLength().

Referenced by DoubleToExponentialCString(), and DoubleToPrecisionCString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateLiteralBoilerplate()

static MUST_USE_RESULT MaybeHandle< Object > v8::internal::CreateLiteralBoilerplate ( Isolate isolate,
Handle< FixedArray literals,
Handle< FixedArray constant_properties 
)
static

Definition at line 321 of file runtime.cc.

322  {
323  Handle<FixedArray> elements = CompileTimeValue::GetElements(array);
324  const bool kHasNoFunctionLiteral = false;
325  switch (CompileTimeValue::GetLiteralType(array)) {
326  case CompileTimeValue::OBJECT_LITERAL_FAST_ELEMENTS:
327  return CreateObjectLiteralBoilerplate(isolate, literals, elements, true,
328  kHasNoFunctionLiteral);
329  case CompileTimeValue::OBJECT_LITERAL_SLOW_ELEMENTS:
330  return CreateObjectLiteralBoilerplate(isolate, literals, elements, false,
331  kHasNoFunctionLiteral);
332  case CompileTimeValue::ARRAY_LITERAL:
333  return Runtime::CreateArrayLiteralBoilerplate(isolate, literals,
334  elements);
335  default:
336  UNREACHABLE();
337  return MaybeHandle<Object>();
338  }
339 }
static MUST_USE_RESULT MaybeHandle< Object > CreateObjectLiteralBoilerplate(Isolate *isolate, Handle< FixedArray > literals, Handle< FixedArray > constant_properties, bool should_have_fast_elements, bool has_function_literal)
Definition: runtime.cc:126

References v8::internal::CompileTimeValue::ARRAY_LITERAL, v8::internal::Runtime::CreateArrayLiteralBoilerplate(), CreateObjectLiteralBoilerplate(), v8::internal::CompileTimeValue::GetElements(), v8::internal::CompileTimeValue::GetLiteralType(), literals(), v8::internal::CompileTimeValue::OBJECT_LITERAL_FAST_ELEMENTS, v8::internal::CompileTimeValue::OBJECT_LITERAL_SLOW_ELEMENTS, and UNREACHABLE.

Referenced by v8::internal::Runtime::CreateArrayLiteralBoilerplate(), and CreateObjectLiteralBoilerplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateObjectLiteralBoilerplate()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::CreateObjectLiteralBoilerplate ( Isolate isolate,
Handle< FixedArray literals,
Handle< FixedArray constant_properties,
bool  should_have_fast_elements,
bool  has_function_literal 
)
static

Definition at line 126 of file runtime.cc.

129  {
130  // Get the native context from the literals array. This is the
131  // context in which the function was created and we use the object
132  // function from this context to create the object literal. We do
133  // not use the object function from the current native context
134  // because this might be the object function from another context
135  // which we should not have access to.
136  Handle<Context> context =
137  Handle<Context>(JSFunction::NativeContextFromLiterals(*literals));
138 
139  // In case we have function literals, we want the object to be in
140  // slow properties mode for now. We don't go in the map cache because
141  // maps with constant functions can't be shared if the functions are
142  // not the same (which is the common case).
143  bool is_result_from_cache = false;
144  Handle<Map> map = has_function_literal
145  ? Handle<Map>(context->object_function()->initial_map())
146  : ComputeObjectLiteralMap(context, constant_properties,
147  &is_result_from_cache);
148 
149  PretenureFlag pretenure_flag =
150  isolate->heap()->InNewSpace(*literals) ? NOT_TENURED : TENURED;
151 
152  Handle<JSObject> boilerplate =
153  isolate->factory()->NewJSObjectFromMap(map, pretenure_flag);
154 
155  // Normalize the elements of the boilerplate to save space if needed.
156  if (!should_have_fast_elements) JSObject::NormalizeElements(boilerplate);
157 
158  // Add the constant properties to the boilerplate.
159  int length = constant_properties->length();
160  bool should_transform =
161  !is_result_from_cache && boilerplate->HasFastProperties();
162  bool should_normalize = should_transform || has_function_literal;
163  if (should_normalize) {
164  // TODO(verwaest): We might not want to ever normalize here.
165  JSObject::NormalizeProperties(boilerplate, KEEP_INOBJECT_PROPERTIES,
166  length / 2);
167  }
168  // TODO(verwaest): Support tracking representations in the boilerplate.
169  for (int index = 0; index < length; index += 2) {
170  Handle<Object> key(constant_properties->get(index + 0), isolate);
171  Handle<Object> value(constant_properties->get(index + 1), isolate);
172  if (value->IsFixedArray()) {
173  // The value contains the constant_properties of a
174  // simple object or array literal.
175  Handle<FixedArray> array = Handle<FixedArray>::cast(value);
177  isolate, value, CreateLiteralBoilerplate(isolate, literals, array),
178  Object);
179  }
180  MaybeHandle<Object> maybe_result;
181  uint32_t element_index = 0;
182  if (key->IsInternalizedString()) {
183  if (Handle<String>::cast(key)->AsArrayIndex(&element_index)) {
184  // Array index as string (uint32).
185  if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate);
186  maybe_result =
187  JSObject::SetOwnElement(boilerplate, element_index, value, SLOPPY);
188  } else {
189  Handle<String> name(String::cast(*key));
190  DCHECK(!name->AsArrayIndex(&element_index));
191  maybe_result = JSObject::SetOwnPropertyIgnoreAttributes(
192  boilerplate, name, value, NONE);
193  }
194  } else if (key->ToArrayIndex(&element_index)) {
195  // Array index (uint32).
196  if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate);
197  maybe_result =
198  JSObject::SetOwnElement(boilerplate, element_index, value, SLOPPY);
199  } else {
200  // Non-uint32 number.
201  DCHECK(key->IsNumber());
202  double num = key->Number();
203  char arr[100];
204  Vector<char> buffer(arr, arraysize(arr));
205  const char* str = DoubleToCString(num, buffer);
206  Handle<String> name = isolate->factory()->NewStringFromAsciiChecked(str);
207  maybe_result = JSObject::SetOwnPropertyIgnoreAttributes(boilerplate, name,
208  value, NONE);
209  }
210  // If setting the property on the boilerplate throws an
211  // exception, the exception is converted to an empty handle in
212  // the handle based operations. In that case, we need to
213  // convert back to an exception.
214  RETURN_ON_EXCEPTION(isolate, maybe_result, Object);
215  }
216 
217  // Transform to fast properties if necessary. For object literals with
218  // containing function literals we defer this operation until after all
219  // computed properties have been assigned so that we can generate
220  // constant function properties.
221  if (should_transform && !has_function_literal) {
222  JSObject::MigrateSlowToFast(boilerplate,
223  boilerplate->map()->unused_property_fields());
224  }
225 
226  return boilerplate;
227 }
#define RETURN_ON_EXCEPTION(isolate, call, T)
Definition: isolate.h:165
static Handle< Map > ComputeObjectLiteralMap(Handle< Context > context, Handle< FixedArray > constant_properties, bool *is_result_from_cache)
Definition: runtime.cc:71
static MUST_USE_RESULT MaybeHandle< Object > CreateLiteralBoilerplate(Isolate *isolate, Handle< FixedArray > literals, Handle< FixedArray > constant_properties)
Definition: runtime.cc:321
const char * DoubleToCString(double v, Vector< char > buffer)
Definition: conversions.cc:121

References arraysize, ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Handle< T >::cast(), ComputeObjectLiteralMap(), CreateLiteralBoilerplate(), DCHECK, DoubleToCString(), v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), handle(), v8::internal::Isolate::heap(), v8::internal::Heap::InNewSpace(), KEEP_INOBJECT_PROPERTIES, literals(), map, v8::internal::JSObject::MigrateSlowToFast(), name, v8::internal::JSFunction::NativeContextFromLiterals(), NONE, v8::internal::JSObject::NormalizeElements(), v8::internal::JSObject::NormalizeProperties(), NOT_TENURED, RETURN_ON_EXCEPTION, v8::internal::JSObject::SetOwnElement(), v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), SLOPPY, and TENURED.

Referenced by CreateLiteralBoilerplate(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateRegExpErrorObjectAndThrow()

static void v8::internal::CreateRegExpErrorObjectAndThrow ( Handle< JSRegExp re,
Handle< String error_message,
Isolate isolate 
)
static

Definition at line 374 of file jsregexp.cc.

376  {
377  Factory* factory = isolate->factory();
378  Handle<FixedArray> elements = factory->NewFixedArray(2);
379  elements->set(0, re->Pattern());
380  elements->set(1, *error_message);
381  Handle<JSArray> array = factory->NewJSArrayWithElements(elements);
382  Handle<Object> error;
383  MaybeHandle<Object> maybe_error =
384  factory->NewSyntaxError("malformed_regexp", array);
385  if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
386 }

References v8::internal::Isolate::factory(), and v8::internal::Isolate::Throw().

Referenced by v8::internal::RegExpImpl::CompileIrregexp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateScriptCopy()

static Handle<Script> v8::internal::CreateScriptCopy ( Handle< Script original)
static

Definition at line 1448 of file liveedit.cc.

1448  {
1449  Isolate* isolate = original->GetIsolate();
1450 
1451  Handle<String> original_source(String::cast(original->source()));
1452  Handle<Script> copy = isolate->factory()->NewScript(original_source);
1453 
1454  copy->set_name(original->name());
1455  copy->set_line_offset(original->line_offset());
1456  copy->set_column_offset(original->column_offset());
1457  copy->set_type(original->type());
1458  copy->set_context_data(original->context_data());
1459  copy->set_eval_from_shared(original->eval_from_shared());
1460  copy->set_eval_from_instructions_offset(
1461  original->eval_from_instructions_offset());
1462 
1463  // Copy all the flags, but clear compilation state.
1464  copy->set_flags(original->flags());
1465  copy->set_compilation_state(Script::COMPILATION_STATE_INITIAL);
1466 
1467  return copy;
1468 }

References v8::internal::Script::COMPILATION_STATE_INITIAL, and v8::internal::Isolate::factory().

Referenced by v8::internal::LiveEdit::ChangeScriptSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateSqrtFunction()

UnaryMathFunction v8::internal::CreateSqrtFunction ( )

◆ CreateStackMap()

Vector< StackFrame * > v8::internal::CreateStackMap ( Isolate isolate,
Zone zone 
)

Definition at line 1634 of file frames.cc.

1634  {
1635  ZoneList<StackFrame*> list(10, zone);
1636  for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1637  StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1638  list.Add(frame, zone);
1639  }
1640  return list.ToVector();
1641 }
HANDLE HANDLE LPSTACKFRAME64 StackFrame
static StackFrame * AllocateFrameCopy(StackFrame *frame, Zone *zone)
Definition: frames.cc:1617

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::StackFrameIterator::Advance(), AllocateFrameCopy(), and v8::internal::List< T, AllocationPolicy >::ToVector().

Referenced by DropActivationsInActiveThreadImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CStringEquals()

bool v8::internal::CStringEquals ( const char *  s1,
const char *  s2 
)
inline

Definition at line 31 of file utils.h.

31  {
32  return (s1 == s2) || (s1 != NULL && s2 != NULL && strcmp(s1, s2) == 0);
33 }

References NULL, s1, and s2.

Referenced by v8::internal::Deoptimizer::Reason::operator==().

+ Here is the caller graph for this function:

◆ CStrVector()

Vector<const char> v8::internal::CStrVector ( const char *  data)
inline

Definition at line 158 of file vector.h.

158  {
159  return Vector<const char>(data, StrLength(data));
160 }

References StrLength().

Referenced by v8::internal::PreParser::CheckInOrOf(), v8::internal::Parser::CheckInOrOf(), v8::internal::RegExpImpl::CompileIrregexp(), v8::Shell::CreateEvaluationContext(), v8::internal::LCodeGen::GeneratePrologue(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::InternalizeUtf8String(), v8::internal::CompleteParserRecorder::LogMessage(), v8::internal::Parser::ParseImportDeclaration(), v8::internal::Parser::ParseModule(), v8::internal::JSFunction::PassesFilter(), RUNTIME_FUNCTION(), and v8::internal::Parser::ThrowPendingError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CutOutRange()

static void v8::internal::CutOutRange ( RegExpMacroAssembler masm,
ZoneList< int > *  ranges,
int  start_index,
int  end_index,
int  cut_index,
Label *  even_label,
Label *  odd_label 
)
static

Definition at line 1862 of file jsregexp.cc.

1868  {
1869  bool odd = (((cut_index - start_index) & 1) == 1);
1870  Label* in_range_label = odd ? odd_label : even_label;
1871  Label dummy;
1873  ranges->at(cut_index),
1874  ranges->at(cut_index + 1) - 1,
1875  &dummy,
1876  in_range_label,
1877  &dummy);
1878  DCHECK(!dummy.is_linked());
1879  // Cut out the single range by rewriting the array. This creates a new
1880  // range that is a merger of the two ranges on either side of the one we
1881  // are cutting out. The oddity of the labels is preserved.
1882  for (int j = cut_index; j > start_index; j--) {
1883  ranges->at(j) = ranges->at(j - 1);
1884  }
1885  for (int j = cut_index + 1; j < end_index; j++) {
1886  ranges->at(j) = ranges->at(j + 1);
1887  }
1888 }
T & at(int i) const
Definition: list.h:69
static void EmitDoubleBoundaryTest(RegExpMacroAssembler *masm, int first, int last, Label *fall_through, Label *in_range, Label *out_of_range)
Definition: jsregexp.cc:1778

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, and EmitDoubleBoundaryTest().

Referenced by GenerateBranches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DataViewConvertValue()

template<typename T >
static T v8::internal::DataViewConvertValue ( double  value)
static

◆ DataViewConvertValue< double >()

template<>
double v8::internal::DataViewConvertValue< double > ( double  value)

Definition at line 726 of file runtime-typedarray.cc.

726  {
727  return value;
728 }

◆ DataViewConvertValue< float >()

template<>
float v8::internal::DataViewConvertValue< float > ( double  value)

Definition at line 720 of file runtime-typedarray.cc.

720  {
721  return static_cast<float>(value);
722 }

◆ DataViewConvertValue< int16_t >()

template<>
int16_t v8::internal::DataViewConvertValue< int16_t > ( double  value)

Definition at line 690 of file runtime-typedarray.cc.

690  {
691  return static_cast<int16_t>(DoubleToInt32(value));
692 }
signed short int16_t
Definition: unicode.cc:22

References DoubleToInt32().

+ Here is the call graph for this function:

◆ DataViewConvertValue< int32_t >()

template<>
int32_t v8::internal::DataViewConvertValue< int32_t > ( double  value)

Definition at line 696 of file runtime-typedarray.cc.

696  {
697  return DoubleToInt32(value);
698 }

References DoubleToInt32().

+ Here is the call graph for this function:

◆ DataViewConvertValue< int8_t >()

template<>
int8_t v8::internal::DataViewConvertValue< int8_t > ( double  value)

Definition at line 684 of file runtime-typedarray.cc.

684  {
685  return static_cast<int8_t>(DoubleToInt32(value));
686 }

References DoubleToInt32().

+ Here is the call graph for this function:

◆ DataViewConvertValue< uint16_t >()

template<>
uint16_t v8::internal::DataViewConvertValue< uint16_t > ( double  value)

Definition at line 708 of file runtime-typedarray.cc.

708  {
709  return static_cast<uint16_t>(DoubleToUint32(value));
710 }
uint32_t DoubleToUint32(double x)
Definition: conversions.h:93

References DoubleToUint32().

+ Here is the call graph for this function:

◆ DataViewConvertValue< uint32_t >()

template<>
uint32_t v8::internal::DataViewConvertValue< uint32_t > ( double  value)

Definition at line 714 of file runtime-typedarray.cc.

714  {
715  return DoubleToUint32(value);
716 }

References DoubleToUint32().

+ Here is the call graph for this function:

◆ DataViewConvertValue< uint8_t >()

template<>
uint8_t v8::internal::DataViewConvertValue< uint8_t > ( double  value)

Definition at line 702 of file runtime-typedarray.cc.

702  {
703  return static_cast<uint8_t>(DoubleToUint32(value));
704 }

References DoubleToUint32().

+ Here is the call graph for this function:

◆ DataViewGetValue()

template<typename T >
static bool v8::internal::DataViewGetValue ( Isolate isolate,
Handle< JSDataView data_view,
Handle< Object byte_offset_obj,
bool  is_little_endian,
T result 
)
inlinestatic

Definition at line 569 of file runtime-typedarray.cc.

572  {
573  size_t byte_offset = 0;
574  if (!TryNumberToSize(isolate, *byte_offset_obj, &byte_offset)) {
575  return false;
576  }
577  Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(data_view->buffer()));
578 
579  size_t data_view_byte_offset =
580  NumberToSize(isolate, data_view->byte_offset());
581  size_t data_view_byte_length =
582  NumberToSize(isolate, data_view->byte_length());
583  if (byte_offset + sizeof(T) > data_view_byte_length ||
584  byte_offset + sizeof(T) < byte_offset) { // overflow
585  return false;
586  }
587 
588  union Value {
589  T data;
590  uint8_t bytes[sizeof(T)];
591  };
592 
593  Value value;
594  size_t buffer_offset = data_view_byte_offset + byte_offset;
595  DCHECK(NumberToSize(isolate, buffer->byte_length()) >=
596  buffer_offset + sizeof(T));
597  uint8_t* source =
598  static_cast<uint8_t*>(buffer->backing_store()) + buffer_offset;
599  if (NeedToFlipBytes(is_little_endian)) {
600  FlipBytes<sizeof(T)>(value.bytes, source);
601  } else {
602  CopyBytes<sizeof(T)>(value.bytes, source);
603  }
604  *result = value.data;
605  return true;
606 }
static bool NeedToFlipBytes(bool is_little_endian)
size_t NumberToSize(Isolate *isolate, Object *number)
Definition: conversions.h:233
bool TryNumberToSize(Isolate *isolate, Object *number, size_t *result)
Definition: conversions.h:207

References DCHECK, NeedToFlipBytes(), NumberToSize(), T, and TryNumberToSize().

+ Here is the call graph for this function:

◆ DataViewSetValue()

template<typename T >
static bool v8::internal::DataViewSetValue ( Isolate isolate,
Handle< JSDataView data_view,
Handle< Object byte_offset_obj,
bool  is_little_endian,
T  data 
)
static

Definition at line 610 of file runtime-typedarray.cc.

612  {
613  size_t byte_offset = 0;
614  if (!TryNumberToSize(isolate, *byte_offset_obj, &byte_offset)) {
615  return false;
616  }
617  Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(data_view->buffer()));
618 
619  size_t data_view_byte_offset =
620  NumberToSize(isolate, data_view->byte_offset());
621  size_t data_view_byte_length =
622  NumberToSize(isolate, data_view->byte_length());
623  if (byte_offset + sizeof(T) > data_view_byte_length ||
624  byte_offset + sizeof(T) < byte_offset) { // overflow
625  return false;
626  }
627 
628  union Value {
629  T data;
630  uint8_t bytes[sizeof(T)];
631  };
632 
633  Value value;
634  value.data = data;
635  size_t buffer_offset = data_view_byte_offset + byte_offset;
636  DCHECK(NumberToSize(isolate, buffer->byte_length()) >=
637  buffer_offset + sizeof(T));
638  uint8_t* target =
639  static_cast<uint8_t*>(buffer->backing_store()) + buffer_offset;
640  if (NeedToFlipBytes(is_little_endian)) {
641  FlipBytes<sizeof(T)>(target, value.bytes);
642  } else {
643  CopyBytes<sizeof(T)>(target, value.bytes);
644  }
645  return true;
646 }

References DCHECK, NeedToFlipBytes(), NumberToSize(), T, and TryNumberToSize().

+ Here is the call graph for this function:

◆ DebugBreakForIC()

static Handle<Code> v8::internal::DebugBreakForIC ( Handle< Code code,
RelocInfo::Mode  mode 
)
static

Definition at line 439 of file debug.cc.

439  {
440  Isolate* isolate = code->GetIsolate();
441 
442  // Find the builtin debug break function matching the calling convention
443  // used by the call site.
444  if (code->is_inline_cache_stub()) {
445  switch (code->kind()) {
446  case Code::CALL_IC:
447  return isolate->builtins()->CallICStub_DebugBreak();
448 
449  case Code::LOAD_IC:
450  return isolate->builtins()->LoadIC_DebugBreak();
451 
452  case Code::STORE_IC:
453  return isolate->builtins()->StoreIC_DebugBreak();
454 
455  case Code::KEYED_LOAD_IC:
456  return isolate->builtins()->KeyedLoadIC_DebugBreak();
457 
458  case Code::KEYED_STORE_IC:
459  return isolate->builtins()->KeyedStoreIC_DebugBreak();
460 
461  case Code::COMPARE_NIL_IC:
462  return isolate->builtins()->CompareNilIC_DebugBreak();
463 
464  default:
465  UNREACHABLE();
466  }
467  }
468  if (RelocInfo::IsConstructCall(mode)) {
469  if (code->has_function_cache()) {
470  return isolate->builtins()->CallConstructStub_Recording_DebugBreak();
471  } else {
472  return isolate->builtins()->CallConstructStub_DebugBreak();
473  }
474  }
475  if (code->kind() == Code::STUB) {
476  DCHECK(CodeStub::GetMajorKey(*code) == CodeStub::CallFunction);
477  return isolate->builtins()->CallFunctionStub_DebugBreak();
478  }
479 
480  UNREACHABLE();
481  return Handle<Code>::null();
482 }

References v8::internal::Isolate::builtins(), DCHECK, v8::internal::RelocInfo::IsConstructCall(), mode(), v8::internal::Handle< T >::null(), STUB, and UNREACHABLE.

Referenced by v8::internal::BreakLocationIterator::SetDebugBreakAtIC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DebugConstructedBy()

static int v8::internal::DebugConstructedBy ( HeapIterator *  iterator,
JSFunction constructor,
int  max_references,
FixedArray instances,
int  instances_size 
)
static

Definition at line 7793 of file runtime.cc.

7795  {
7796  DisallowHeapAllocation no_allocation;
7797 
7798  // Iterate the heap.
7799  int count = 0;
7800  HeapObject* heap_obj = NULL;
7801  while (((heap_obj = iterator->next()) != NULL) &&
7802  (max_references == 0 || count < max_references)) {
7803  // Only look at all JSObjects.
7804  if (heap_obj->IsJSObject()) {
7805  JSObject* obj = JSObject::cast(heap_obj);
7806  if (obj->map()->constructor() == constructor) {
7807  // Valid reference found add to instance array if supplied an update
7808  // count.
7809  if (instances != NULL && count < instances_size) {
7810  instances->set(count, obj);
7811  }
7812  count++;
7813  }
7814  }
7815  }
7816 
7817  // Return the number of referencing objects found.
7818  return count;
7819 }

References v8::internal::HeapObject::map(), NULL, and v8::internal::FixedArray::set().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DebugEvaluate()

static MaybeHandle<Object> v8::internal::DebugEvaluate ( Isolate isolate,
Handle< Context context,
Handle< Object context_extension,
Handle< Object receiver,
Handle< String source 
)
static

Definition at line 7457 of file runtime.cc.

7461  {
7462  if (context_extension->IsJSObject()) {
7463  Handle<JSObject> extension = Handle<JSObject>::cast(context_extension);
7464  Handle<JSFunction> closure(context->closure(), isolate);
7465  context = isolate->factory()->NewWithContext(closure, context, extension);
7466  }
7467 
7468  Handle<JSFunction> eval_fun;
7470  isolate, eval_fun, Compiler::GetFunctionFromEval(source, context, SLOPPY,
7472  RelocInfo::kNoPosition),
7473  Object);
7474 
7475  Handle<Object> result;
7477  isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL),
7478  Object);
7479 
7480  // Skip the global proxy as it has no properties and always delegates to the
7481  // real global object.
7482  if (result->IsJSGlobalProxy()) {
7483  PrototypeIterator iter(isolate, result);
7484  // TODO(verwaest): This will crash when the global proxy is detached.
7485  result = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
7486  }
7487 
7488  // Clear the oneshot breakpoints so that the debugger does not step further.
7489  isolate->debug()->ClearStepping();
7490  return result;
7491 }

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Handle< T >::cast(), v8::internal::Debug::ClearStepping(), v8::internal::Isolate::debug(), v8::internal::Isolate::factory(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::Compiler::GetFunctionFromEval(), v8::internal::RelocInfo::kNoPosition, NO_PARSE_RESTRICTION, NULL, and SLOPPY.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DebugGetProperty()

static Handle<Object> v8::internal::DebugGetProperty ( LookupIterator *  it,
bool has_caught = NULL 
)
static

Definition at line 5472 of file runtime.cc.

5473  {
5474  for (; it->IsFound(); it->Next()) {
5475  switch (it->state()) {
5476  case LookupIterator::NOT_FOUND:
5477  case LookupIterator::TRANSITION:
5478  UNREACHABLE();
5479  case LookupIterator::ACCESS_CHECK:
5480  // Ignore access checks.
5481  break;
5482  case LookupIterator::INTERCEPTOR:
5483  case LookupIterator::JSPROXY:
5484  return it->isolate()->factory()->undefined_value();
5485  case LookupIterator::ACCESSOR: {
5486  Handle<Object> accessors = it->GetAccessors();
5487  if (!accessors->IsAccessorInfo()) {
5488  return it->isolate()->factory()->undefined_value();
5489  }
5490  MaybeHandle<Object> maybe_result = JSObject::GetPropertyWithAccessor(
5491  it->GetReceiver(), it->name(), it->GetHolder<JSObject>(),
5492  accessors);
5493  Handle<Object> result;
5494  if (!maybe_result.ToHandle(&result)) {
5495  result = handle(it->isolate()->pending_exception(), it->isolate());
5496  it->isolate()->clear_pending_exception();
5497  if (has_caught != NULL) *has_caught = true;
5498  }
5499  return result;
5500  }
5501 
5502  case LookupIterator::DATA:
5503  return it->GetDataValue();
5504  }
5505  }
5506 
5507  return it->isolate()->factory()->undefined_value();
5508 }

References ACCESSOR, v8::internal::Object::GetPropertyWithAccessor(), handle(), NULL, and UNREACHABLE.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DebugReferencedBy()

static int v8::internal::DebugReferencedBy ( HeapIterator *  iterator,
JSObject target,
Object instance_filter,
int  max_references,
FixedArray instances,
int  instances_size,
JSFunction arguments_function 
)
static

Definition at line 7675 of file runtime.cc.

7678  {
7679  Isolate* isolate = target->GetIsolate();
7680  SealHandleScope shs(isolate);
7681  DisallowHeapAllocation no_allocation;
7682 
7683  // Iterate the heap.
7684  int count = 0;
7685  JSObject* last = NULL;
7686  HeapObject* heap_obj = NULL;
7687  while (((heap_obj = iterator->next()) != NULL) &&
7688  (max_references == 0 || count < max_references)) {
7689  // Only look at all JSObjects.
7690  if (heap_obj->IsJSObject()) {
7691  // Skip context extension objects and argument arrays as these are
7692  // checked in the context of functions using them.
7693  JSObject* obj = JSObject::cast(heap_obj);
7694  if (obj->IsJSContextExtensionObject() ||
7695  obj->map()->constructor() == arguments_function) {
7696  continue;
7697  }
7698 
7699  // Check if the JS object has a reference to the object looked for.
7700  if (obj->ReferencesObject(target)) {
7701  // Check instance filter if supplied. This is normally used to avoid
7702  // references from mirror objects (see Runtime_IsInPrototypeChain).
7703  if (!instance_filter->IsUndefined()) {
7704  for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd();
7705  iter.Advance()) {
7706  if (iter.GetCurrent() == instance_filter) {
7707  obj = NULL; // Don't add this object.
7708  break;
7709  }
7710  }
7711  }
7712 
7713  if (obj != NULL) {
7714  // Valid reference found add to instance array if supplied an update
7715  // count.
7716  if (instances != NULL && count < instances_size) {
7717  instances->set(count, obj);
7718  }
7719  last = obj;
7720  count++;
7721  }
7722  }
7723  }
7724  }
7725 
7726  // Check for circular reference only. This can happen when the object is only
7727  // referenced from mirrors and has a circular reference in which case the
7728  // object is not really alive and would have been garbage collected if not
7729  // referenced from the mirror.
7730  if (count == 1 && last == target) {
7731  count = 0;
7732  }
7733 
7734  // Return the number of referencing objects found.
7735  return count;
7736 }

References v8::internal::HeapObject::GetIsolate(), v8::internal::PrototypeIterator::IsAtEnd(), v8::internal::HeapObject::map(), NULL, v8::internal::JSObject::ReferencesObject(), and v8::internal::FixedArray::set().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dec()

OStream & v8::internal::dec ( OStream os)

Definition at line 122 of file ostreams.cc.

122  { // NOLINT(runtime/references)
123  return os.dec();
124 }

References v8::internal::OStream::dec().

+ Here is the call graph for this function:

◆ DECLARE_RUNTIME_FUNCTION() [1/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( BinaryOpIC_Miss  )

◆ DECLARE_RUNTIME_FUNCTION() [2/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( BinaryOpIC_MissWithAllocationSite  )

◆ DECLARE_RUNTIME_FUNCTION() [3/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( CompareNilIC_Miss  )

◆ DECLARE_RUNTIME_FUNCTION() [4/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( Debug_Break  )

◆ DECLARE_RUNTIME_FUNCTION() [5/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( ElementsTransitionAndStoreIC_Miss  )

◆ DECLARE_RUNTIME_FUNCTION() [6/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( KeyedLoadIC_MissFromStubFailure  )

◆ DECLARE_RUNTIME_FUNCTION() [7/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( KeyedStoreIC_MissFromStubFailure  )

◆ DECLARE_RUNTIME_FUNCTION() [8/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( LoadElementWithInterceptor  )

◆ DECLARE_RUNTIME_FUNCTION() [9/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( LoadPropertyWithInterceptor  )

◆ DECLARE_RUNTIME_FUNCTION() [10/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( LoadPropertyWithInterceptorOnly  )

◆ DECLARE_RUNTIME_FUNCTION() [11/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( StoreCallbackProperty  )

◆ DECLARE_RUNTIME_FUNCTION() [12/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( StoreIC_MissFromStubFailure  )

◆ DECLARE_RUNTIME_FUNCTION() [13/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( StorePropertyWithInterceptor  )

◆ DECLARE_RUNTIME_FUNCTION() [14/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( ToBooleanIC_Miss  )

◆ DECLARE_RUNTIME_FUNCTION() [15/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( UnaryOpIC_Miss  )

◆ DECLARE_RUNTIME_FUNCTION() [16/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( VectorKeyedLoadIC_MissFromStubFailure  )

◆ DECLARE_RUNTIME_FUNCTION() [17/17]

v8::internal::DECLARE_RUNTIME_FUNCTION ( VectorLoadIC_MissFromStubFailure  )

◆ DeclareGlobals()

static Object* v8::internal::DeclareGlobals ( Isolate isolate,
Handle< GlobalObject global,
Handle< String name,
Handle< Object value,
PropertyAttributes  attr,
bool  is_var,
bool  is_const,
bool  is_function 
)
static

Definition at line 1038 of file runtime.cc.

1041  {
1042  // Do the lookup own properties only, see ES5 erratum.
1043  LookupIterator it(global, name, LookupIterator::HIDDEN_SKIP_INTERCEPTOR);
1044  Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
1045  if (!maybe.has_value) return isolate->heap()->exception();
1046 
1047  if (it.IsFound()) {
1048  PropertyAttributes old_attributes = maybe.value;
1049  // The name was declared before; check for conflicting re-declarations.
1050  if (is_const) return ThrowRedeclarationError(isolate, name);
1051 
1052  // Skip var re-declarations.
1053  if (is_var) return isolate->heap()->undefined_value();
1054 
1055  DCHECK(is_function);
1056  if ((old_attributes & DONT_DELETE) != 0) {
1057  // Only allow reconfiguring globals to functions in user code (no
1058  // natives, which are marked as read-only).
1059  DCHECK((attr & READ_ONLY) == 0);
1060 
1061  // Check whether we can reconfigure the existing property into a
1062  // function.
1063  PropertyDetails old_details = it.property_details();
1064  // TODO(verwaest): CALLBACKS invalidly includes ExecutableAccessInfo,
1065  // which are actually data properties, not accessor properties.
1066  if (old_details.IsReadOnly() || old_details.IsDontEnum() ||
1067  old_details.type() == CALLBACKS) {
1068  return ThrowRedeclarationError(isolate, name);
1069  }
1070  // If the existing property is not configurable, keep its attributes. Do
1071  attr = old_attributes;
1072  }
1073  }
1074 
1075  // Define or redefine own property.
1076  RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes(
1077  global, name, value, attr));
1078 
1079  return isolate->heap()->undefined_value();
1080 }
static Object * ThrowRedeclarationError(Isolate *isolate, Handle< String > name)
Definition: runtime.cc:1029
Maybe< T > maybe(T t)
Definition: v8.h:902
PropertyAttributes
@ DONT_DELETE
@ READ_ONLY

References CALLBACKS, DCHECK, DONT_DELETE, v8::internal::JSReceiver::GetPropertyAttributes(), v8::internal::Isolate::heap(), v8::maybe(), name, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), and ThrowRedeclarationError().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DecodeConstantPoolLength()

int v8::internal::DecodeConstantPoolLength ( int  instr)
inline

Definition at line 25 of file constants-arm.h.

25  {
27  return ((instr >> 4) & 0xfff0) | (instr & 0xf);
28 }
const int kConstantPoolMarkerMask
Definition: constants-arm.h:18
const int kConstantPoolMarker
Definition: constants-arm.h:19

References DCHECK, kConstantPoolMarker, and kConstantPoolMarkerMask.

◆ DecodeSlotType()

static SlotsBuffer::SlotType v8::internal::DecodeSlotType ( SlotsBuffer::ObjectSlot  slot)
inlinestatic

Definition at line 4497 of file mark-compact.cc.

4498  {
4499  return static_cast<SlotsBuffer::SlotType>(reinterpret_cast<intptr_t>(slot));
4500 }

Referenced by v8::internal::SlotsBuffer::UpdateSlots(), and v8::internal::SlotsBuffer::UpdateSlotsWithFilter().

+ Here is the caller graph for this function:

◆ DEFINE_DOUBLE() [1/5]

v8::internal::DEFINE_DOUBLE ( kFP64DefaultNaN  ,
0x7ff8000000000000UL   
)

◆ DEFINE_DOUBLE() [2/5]

v8::internal::DEFINE_DOUBLE ( kFP64NegativeInfinity  ,
0xfff0000000000000UL   
)

◆ DEFINE_DOUBLE() [3/5]

v8::internal::DEFINE_DOUBLE ( kFP64PositiveInfinity  ,
0x7ff0000000000000UL   
)

◆ DEFINE_DOUBLE() [4/5]

v8::internal::DEFINE_DOUBLE ( kFP64QuietNaN  ,
0x7ff800007fc00001   
)

◆ DEFINE_DOUBLE() [5/5]

v8::internal::DEFINE_DOUBLE ( kFP64SignallingNaN  ,
0x7ff000007f800001   
)

◆ DEFINE_FLOAT() [1/5]

v8::internal::DEFINE_FLOAT ( kFP32DefaultNaN  ,
0x7fc00000   
)

◆ DEFINE_FLOAT() [2/5]

v8::internal::DEFINE_FLOAT ( kFP32NegativeInfinity  ,
0xff800000   
)

◆ DEFINE_FLOAT() [3/5]

v8::internal::DEFINE_FLOAT ( kFP32PositiveInfinity  ,
0x7f800000   
)

◆ DEFINE_FLOAT() [4/5]

v8::internal::DEFINE_FLOAT ( kFP32QuietNaN  ,
0x7fc00001   
)

◆ DEFINE_FLOAT() [5/5]

v8::internal::DEFINE_FLOAT ( kFP32SignallingNaN  ,
0x7f800001   
)

◆ DEFINE_NEW_H_BITWISE_INSTR()

v8::internal::DEFINE_NEW_H_BITWISE_INSTR ( HSar  ,
c_left->  NumberValueAsInteger32) >>(c_right->NumberValueAsInteger32() &0x1f 
)

◆ DehoistArrayIndex()

static void v8::internal::DehoistArrayIndex ( ArrayInstructionInterface array_operation)
static

Definition at line 11 of file hydrogen-dehoist.cc.

11  {
12  HValue* index = array_operation->GetKey()->ActualValue();
13  if (!index->representation().IsSmiOrInteger32()) return;
14  if (!index->IsAdd() && !index->IsSub()) return;
15 
16  HConstant* constant;
17  HValue* subexpression;
18  HBinaryOperation* binary_operation = HBinaryOperation::cast(index);
19  if (binary_operation->left()->IsConstant() && index->IsAdd()) {
20  subexpression = binary_operation->right();
21  constant = HConstant::cast(binary_operation->left());
22  } else if (binary_operation->right()->IsConstant()) {
23  subexpression = binary_operation->left();
24  constant = HConstant::cast(binary_operation->right());
25  } else {
26  return;
27  }
28 
29  if (!constant->HasInteger32Value()) return;
30  int32_t sign = binary_operation->IsSub() ? -1 : 1;
31  int32_t value = constant->Integer32Value() * sign;
32  if (value < 0) return;
33 
34  // Multiply value by elements size, bailing out on overflow.
35  int32_t elements_kind_size =
36  1 << ElementsKindToShiftSize(array_operation->elements_kind());
37  v8::base::internal::CheckedNumeric<int32_t> multiply_result = value;
38  multiply_result = multiply_result * elements_kind_size;
39  if (!multiply_result.IsValid()) return;
40  value = multiply_result.ValueOrDie();
41 
42  // Ensure that the array operation can add value to existing base offset
43  // without overflowing.
44  if (!array_operation->TryIncreaseBaseOffset(value)) return;
45 
46  array_operation->SetKey(subexpression);
47  if (binary_operation->HasNoUses()) {
48  binary_operation->DeleteAndReplaceWith(NULL);
49  }
50 
51  array_operation->SetDehoisted(true);
52 }
int ElementsKindToShiftSize(ElementsKind elements_kind)

References v8::internal::HValue::ActualValue(), v8::internal::HValue::cast(), v8::internal::HValue::DeleteAndReplaceWith(), v8::internal::ArrayInstructionInterface::elements_kind(), ElementsKindToShiftSize(), v8::internal::ArrayInstructionInterface::GetKey(), v8::internal::HValue::HasNoUses(), v8::internal::Representation::IsSmiOrInteger32(), v8::base::internal::CheckedNumeric< T >::IsValid(), v8::internal::HBinaryOperation::left(), NULL, v8::internal::HValue::representation(), v8::internal::HBinaryOperation::right(), v8::internal::ArrayInstructionInterface::SetDehoisted(), v8::internal::ArrayInstructionInterface::SetKey(), sign, v8::internal::ArrayInstructionInterface::TryIncreaseBaseOffset(), and v8::base::internal::CheckedNumeric< T >::ValueOrDie().

Referenced by v8::internal::HDehoistIndexComputationsPhase::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteArray()

template<typename T >
void v8::internal::DeleteArray ( T array)

Definition at line 68 of file allocation.h.

68  {
69  delete[] array;
70 }

Referenced by v8::internal::StringsStorage::AddOrDisposeString(), v8::internal::Log::Close(), v8::internal::Logger::DebugEvent(), v8::StartupDataDecompressor::Decompress(), v8::internal::ArrayDeallocator< T >::Delete(), v8::internal::HandleScopeImplementer::DeleteExtensions(), v8::internal::Vector< T >::Dispose(), DoubleToFixedCString(), v8::internal::RegExpStack::EnsureCapacity(), v8::internal::HandleScopeImplementer::Free(), v8::internal::RegExpStack::ThreadLocal::Free(), v8::internal::StringsStorage::GetVFormatted(), v8::internal::RelocInfoBuffer::Grow(), ReadCharsFromFile(), ReadLine(), v8::internal::CodeAddressMap::NameMap::Remove(), v8::internal::RegExpStack::Reset(), v8::internal::HandleScopeImplementer::ReturnBlock(), RUNTIME_FUNCTION(), v8::internal::anonymous_namespace{flags.cc}::Flag::set_string_value(), v8::internal::V8HeapExplorer::TagGlobalObjects(), v8::internal::NewSpace::TearDown(), v8::internal::AssemblerBase::~AssemblerBase(), v8::internal::BacktrackStack::~BacktrackStack(), v8::internal::CompilationSubCache::~CompilationSubCache(), v8::internal::Differencer::~Differencer(), v8::internal::ExternalReferenceDecoder::~ExternalReferenceDecoder(), v8::internal::HandleScopeImplementer::~HandleScopeImplementer(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::~HeapStringAllocator(), v8::internal::CodeAddressMap::NameMap::~NameMap(), v8::internal::OptimizingCompilerThread::~OptimizingCompilerThread(), v8::internal::RelocInfoBuffer::~RelocInfoBuffer(), v8::internal::ScopedVector< T >::~ScopedVector(), v8::internal::ScriptData::~ScriptData(), v8::StartupDataDecompressor::~StartupDataDecompressor(), v8::internal::StringsStorage::~StringsStorage(), v8::String::Utf8Value::~Utf8Value(), and v8::String::Value::~Value().

+ Here is the caller graph for this function:

◆ DeleteCodeEntry()

static void v8::internal::DeleteCodeEntry ( CodeEntry **  entry_ptr)
static

Definition at line 441 of file profile-generator.cc.

441  {
442  delete *entry_ptr;
443 }

Referenced by v8::internal::CpuProfilesCollection::~CpuProfilesCollection().

+ Here is the caller graph for this function:

◆ DeleteCpuProfile()

static void v8::internal::DeleteCpuProfile ( CpuProfile **  profile_ptr)
static

Definition at line 446 of file profile-generator.cc.

446  {
447  delete *profile_ptr;
448 }

Referenced by v8::internal::CpuProfilesCollection::~CpuProfilesCollection().

+ Here is the caller graph for this function:

◆ DeleteHeapSnapshot()

static void v8::internal::DeleteHeapSnapshot ( HeapSnapshot **  snapshot_ptr)
static

Definition at line 23 of file heap-profiler.cc.

23  {
24  delete *snapshot_ptr;
25 }

Referenced by v8::internal::HeapProfiler::DeleteAllSnapshots(), and v8::internal::HeapProfiler::~HeapProfiler().

+ Here is the caller graph for this function:

◆ DeleteNativeObjectAt()

template<class T >
void v8::internal::DeleteNativeObjectAt ( const v8::WeakCallbackData< v8::Value, void > &  data,
int  index 
)

Definition at line 733 of file i18n.cc.

734  {
736  delete reinterpret_cast<T*>(obj->GetAlignedPointerFromInternalField(index));
737 }
static Handle< T > Cast(Handle< S > that)
Definition: v8.h:277
A light-weight stack-allocated object handle.
Definition: v8.h:334
Local< T > GetValue() const
Definition: v8.h:422

References v8::Handle< T >::Cast(), v8::WeakCallbackData< T, P >::GetValue(), and T.

+ Here is the call graph for this function:

◆ DeoptimizeDependentFunctions()

static void v8::internal::DeoptimizeDependentFunctions ( SharedFunctionInfo function_info)
static

Definition at line 1174 of file liveedit.cc.

1174  {
1175  DisallowHeapAllocation no_allocation;
1176  DependentFunctionMarker marker(function_info);
1177  // TODO(titzer): need to traverse all optimized code to find OSR code here.
1178  Deoptimizer::VisitAllOptimizedFunctions(function_info->GetIsolate(), &marker);
1179 
1180  if (marker.found_) {
1181  // Only go through with the deoptimization if something was found.
1182  Deoptimizer::DeoptimizeMarkedCode(function_info->GetIsolate());
1183  }
1184 }

References v8::internal::Deoptimizer::DeoptimizeMarkedCode(), v8::internal::DependentFunctionMarker::found_, v8::internal::HeapObject::GetIsolate(), and v8::internal::Deoptimizer::VisitAllOptimizedFunctions().

Referenced by v8::internal::LiveEdit::FunctionSourceUpdated(), and v8::internal::LiveEdit::ReplaceFunctionCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DestroyGlobalHandle()

static void v8::internal::DestroyGlobalHandle ( const v8::WeakCallbackData< v8::Value, void > &  data)
static

Definition at line 740 of file i18n.cc.

741  {
742  GlobalHandles::Destroy(reinterpret_cast<Object**>(data.GetParameter()));
743 }

References v8::internal::GlobalHandles::Destroy(), and v8::WeakCallbackData< T, P >::GetParameter().

Referenced by v8::internal::BreakIterator::DeleteBreakIterator(), v8::internal::Collator::DeleteCollator(), v8::internal::DateFormat::DeleteDateFormat(), and v8::internal::NumberFormat::DeleteNumberFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeterminedAlready()

static bool v8::internal::DeterminedAlready ( QuickCheckDetails quick_check,
int  offset 
)
static

Definition at line 3182 of file jsregexp.cc.

3182  {
3183  if (quick_check == NULL) return false;
3184  if (offset >= quick_check->characters()) return false;
3185  return quick_check->positions(offset)->determines_perfectly;
3186 }

References v8::internal::QuickCheckDetails::characters(), v8::internal::QuickCheckDetails::Position::determines_perfectly, NULL, and v8::internal::QuickCheckDetails::positions().

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DigitGen()

static bool v8::internal::DigitGen ( DiyFp  low,
DiyFp  w,
DiyFp  high,
Vector< char >  buffer,
int length,
int kappa 
)
static

Definition at line 362 of file fast-dtoa.cc.

367  {
368  DCHECK(low.e() == w.e() && w.e() == high.e());
369  DCHECK(low.f() + 1 <= high.f() - 1);
371  // low, w and high are imprecise, but by less than one ulp (unit in the last
372  // place).
373  // If we remove (resp. add) 1 ulp from low (resp. high) we are certain that
374  // the new numbers are outside of the interval we want the final
375  // representation to lie in.
376  // Inversely adding (resp. removing) 1 ulp from low (resp. high) would yield
377  // numbers that are certain to lie in the interval. We will use this fact
378  // later on.
379  // We will now start by generating the digits within the uncertain
380  // interval. Later we will weed out representations that lie outside the safe
381  // interval and thus _might_ lie outside the correct interval.
382  uint64_t unit = 1;
383  DiyFp too_low = DiyFp(low.f() - unit, low.e());
384  DiyFp too_high = DiyFp(high.f() + unit, high.e());
385  // too_low and too_high are guaranteed to lie outside the interval we want the
386  // generated number in.
387  DiyFp unsafe_interval = DiyFp::Minus(too_high, too_low);
388  // We now cut the input number into two parts: the integral digits and the
389  // fractionals. We will not write any decimal separator though, but adapt
390  // kappa instead.
391  // Reminder: we are currently computing the digits (stored inside the buffer)
392  // such that: too_low < buffer * 10^kappa < too_high
393  // We use too_high for the digit_generation and stop as soon as possible.
394  // If we stop early we effectively round down.
395  DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
396  // Division by one is a shift.
397  uint32_t integrals = static_cast<uint32_t>(too_high.f() >> -one.e());
398  // Modulo by one is an and.
399  uint64_t fractionals = too_high.f() & (one.f() - 1);
400  uint32_t divisor;
401  int divisor_exponent;
402  BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
403  &divisor, &divisor_exponent);
404  *kappa = divisor_exponent + 1;
405  *length = 0;
406  // Loop invariant: buffer = too_high / 10^kappa (integer division)
407  // The invariant holds for the first iteration: kappa has been initialized
408  // with the divisor exponent + 1. And the divisor is the biggest power of ten
409  // that is smaller than integrals.
410  while (*kappa > 0) {
411  int digit = integrals / divisor;
412  buffer[*length] = '0' + digit;
413  (*length)++;
414  integrals %= divisor;
415  (*kappa)--;
416  // Note that kappa now equals the exponent of the divisor and that the
417  // invariant thus holds again.
418  uint64_t rest =
419  (static_cast<uint64_t>(integrals) << -one.e()) + fractionals;
420  // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
421  // Reminder: unsafe_interval.e() == one.e()
422  if (rest < unsafe_interval.f()) {
423  // Rounding down (by not emitting the remaining digits) yields a number
424  // that lies within the unsafe interval.
425  return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(),
426  unsafe_interval.f(), rest,
427  static_cast<uint64_t>(divisor) << -one.e(), unit);
428  }
429  divisor /= 10;
430  }
431 
432  // The integrals have been generated. We are at the point of the decimal
433  // separator. In the following loop we simply multiply the remaining digits by
434  // 10 and divide by one. We just need to pay attention to multiply associated
435  // data (like the interval or 'unit'), too.
436  // Note that the multiplication by 10 does not overflow, because w.e >= -60
437  // and thus one.e >= -60.
438  DCHECK(one.e() >= -60);
439  DCHECK(fractionals < one.f());
440  DCHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
441  while (true) {
442  fractionals *= 10;
443  unit *= 10;
444  unsafe_interval.set_f(unsafe_interval.f() * 10);
445  // Integer division by one.
446  int digit = static_cast<int>(fractionals >> -one.e());
447  buffer[*length] = '0' + digit;
448  (*length)++;
449  fractionals &= one.f() - 1; // Modulo by one.
450  (*kappa)--;
451  if (fractionals < unsafe_interval.f()) {
452  return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit,
453  unsafe_interval.f(), fractionals, one.f(), unit);
454  }
455  }
456 }
static const int kMinimalTargetExponent
Definition: fast-dtoa.cc:24
static bool RoundWeed(Vector< char > buffer, int length, uint64_t distance_too_high_w, uint64_t unsafe_interval, uint64_t rest, uint64_t ten_kappa, uint64_t unit)
Definition: fast-dtoa.cc:43
static void BiggestPowerTen(uint32_t number, int number_bits, uint32_t *power, int *exponent)
Definition: fast-dtoa.cc:220
static const int kMaximalTargetExponent
Definition: fast-dtoa.cc:25

References BiggestPowerTen(), DCHECK, v8::internal::DiyFp::e(), v8::internal::DiyFp::f(), kMaximalTargetExponent, kMinimalTargetExponent, v8::internal::DiyFp::kSignificandSize, v8::internal::DiyFp::Minus(), RoundWeed(), v8::internal::DiyFp::set_f(), and V8_2PART_UINT64_C.

Referenced by Grisu3().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DigitGenCounted()

static bool v8::internal::DigitGenCounted ( DiyFp  w,
int  requested_digits,
Vector< char >  buffer,
int length,
int kappa 
)
static

Definition at line 488 of file fast-dtoa.cc.

492  {
496  // w is assumed to have an error less than 1 unit. Whenever w is scaled we
497  // also scale its error.
498  uint64_t w_error = 1;
499  // We cut the input number into two parts: the integral digits and the
500  // fractional digits. We don't emit any decimal separator, but adapt kappa
501  // instead. Example: instead of writing "1.2" we put "12" into the buffer and
502  // increase kappa by 1.
503  DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
504  // Division by one is a shift.
505  uint32_t integrals = static_cast<uint32_t>(w.f() >> -one.e());
506  // Modulo by one is an and.
507  uint64_t fractionals = w.f() & (one.f() - 1);
508  uint32_t divisor;
509  int divisor_exponent;
510  BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
511  &divisor, &divisor_exponent);
512  *kappa = divisor_exponent + 1;
513  *length = 0;
514 
515  // Loop invariant: buffer = w / 10^kappa (integer division)
516  // The invariant holds for the first iteration: kappa has been initialized
517  // with the divisor exponent + 1. And the divisor is the biggest power of ten
518  // that is smaller than 'integrals'.
519  while (*kappa > 0) {
520  int digit = integrals / divisor;
521  buffer[*length] = '0' + digit;
522  (*length)++;
523  requested_digits--;
524  integrals %= divisor;
525  (*kappa)--;
526  // Note that kappa now equals the exponent of the divisor and that the
527  // invariant thus holds again.
528  if (requested_digits == 0) break;
529  divisor /= 10;
530  }
531 
532  if (requested_digits == 0) {
533  uint64_t rest =
534  (static_cast<uint64_t>(integrals) << -one.e()) + fractionals;
535  return RoundWeedCounted(buffer, *length, rest,
536  static_cast<uint64_t>(divisor) << -one.e(), w_error,
537  kappa);
538  }
539 
540  // The integrals have been generated. We are at the point of the decimal
541  // separator. In the following loop we simply multiply the remaining digits by
542  // 10 and divide by one. We just need to pay attention to multiply associated
543  // data (the 'unit'), too.
544  // Note that the multiplication by 10 does not overflow, because w.e >= -60
545  // and thus one.e >= -60.
546  DCHECK(one.e() >= -60);
547  DCHECK(fractionals < one.f());
548  DCHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
549  while (requested_digits > 0 && fractionals > w_error) {
550  fractionals *= 10;
551  w_error *= 10;
552  // Integer division by one.
553  int digit = static_cast<int>(fractionals >> -one.e());
554  buffer[*length] = '0' + digit;
555  (*length)++;
556  requested_digits--;
557  fractionals &= one.f() - 1; // Modulo by one.
558  (*kappa)--;
559  }
560  if (requested_digits != 0) return false;
561  return RoundWeedCounted(buffer, *length, fractionals, one.f(), w_error,
562  kappa);
563 }
static bool RoundWeedCounted(Vector< char > buffer, int length, uint64_t rest, uint64_t ten_kappa, uint64_t unit, int *kappa)
Definition: fast-dtoa.cc:163

References BiggestPowerTen(), DCHECK, v8::internal::DiyFp::e(), v8::internal::DiyFp::f(), kMaximalTargetExponent, kMinimalTargetExponent, v8::internal::DiyFp::kSignificandSize, RoundWeedCounted(), and V8_2PART_UINT64_C.

Referenced by Grisu3Counted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiscoverGreyObjectsInNewSpace()

static void v8::internal::DiscoverGreyObjectsInNewSpace ( Heap heap,
MarkingDeque marking_deque 
)
static

Definition at line 2019 of file mark-compact.cc.

2020  {
2021  NewSpace* space = heap->new_space();
2022  NewSpacePageIterator it(space->bottom(), space->top());
2023  while (it.has_next()) {
2024  NewSpacePage* page = it.next();
2025  DiscoverGreyObjectsOnPage(marking_deque, page);
2026  if (marking_deque->IsFull()) return;
2027  }
2028 }
static void DiscoverGreyObjectsOnPage(MarkingDeque *marking_deque, MemoryChunk *p)

References DiscoverGreyObjectsOnPage(), v8::internal::MarkingDeque::IsFull(), v8::internal::Heap::new_space(), and space().

Referenced by v8::internal::MarkCompactCollector::RefillMarkingDeque().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiscoverGreyObjectsInSpace()

static void v8::internal::DiscoverGreyObjectsInSpace ( Heap heap,
MarkingDeque marking_deque,
PagedSpace space 
)
static

Definition at line 2008 of file mark-compact.cc.

2009  {
2010  PageIterator it(space);
2011  while (it.has_next()) {
2012  Page* p = it.next();
2013  DiscoverGreyObjectsOnPage(marking_deque, p);
2014  if (marking_deque->IsFull()) return;
2015  }
2016 }

References DiscoverGreyObjectsOnPage(), v8::internal::MarkingDeque::IsFull(), and space().

Referenced by v8::internal::MarkCompactCollector::RefillMarkingDeque().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiscoverGreyObjectsOnPage()

static void v8::internal::DiscoverGreyObjectsOnPage ( MarkingDeque marking_deque,
MemoryChunk p 
)
static

Definition at line 1901 of file mark-compact.cc.

1902  {
1903  DCHECK(!marking_deque->IsFull());
1904  DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0);
1905  DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0);
1906  DCHECK(strcmp(Marking::kGreyBitPattern, "11") == 0);
1907  DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0);
1908 
1909  for (MarkBitCellIterator it(p); !it.Done(); it.Advance()) {
1910  Address cell_base = it.CurrentCellBase();
1911  MarkBit::CellType* cell = it.CurrentCell();
1912 
1913  const MarkBit::CellType current_cell = *cell;
1914  if (current_cell == 0) continue;
1915 
1916  MarkBit::CellType grey_objects;
1917  if (it.HasNext()) {
1918  const MarkBit::CellType next_cell = *(cell + 1);
1919  grey_objects = current_cell & ((current_cell >> 1) |
1920  (next_cell << (Bitmap::kBitsPerCell - 1)));
1921  } else {
1922  grey_objects = current_cell & (current_cell >> 1);
1923  }
1924 
1925  int offset = 0;
1926  while (grey_objects != 0) {
1927  int trailing_zeros = base::bits::CountTrailingZeros32(grey_objects);
1928  grey_objects >>= trailing_zeros;
1929  offset += trailing_zeros;
1930  MarkBit markbit(cell, 1 << offset, false);
1931  DCHECK(Marking::IsGrey(markbit));
1932  Marking::GreyToBlack(markbit);
1933  Address addr = cell_base + offset * kPointerSize;
1934  HeapObject* object = HeapObject::FromAddress(addr);
1935  MemoryChunk::IncrementLiveBytesFromGC(object->address(), object->Size());
1936  marking_deque->PushBlack(object);
1937  if (marking_deque->IsFull()) return;
1938  offset += 2;
1939  grey_objects >>= 2;
1940  }
1941 
1942  grey_objects >>= (Bitmap::kBitsPerCell - 1);
1943  }
1944 }
uint32_t CountTrailingZeros32(uint32_t value)
Definition: bits.h:59

References v8::internal::HeapObject::address(), v8::base::bits::CountTrailingZeros32(), DCHECK, v8::internal::HeapObject::FromAddress(), v8::internal::MemoryChunk::IncrementLiveBytesFromGC(), v8::internal::MarkingDeque::IsFull(), v8::internal::Bitmap::kBitsPerCell, v8::internal::Marking::kBlackBitPattern, v8::internal::Marking::kGreyBitPattern, v8::internal::Marking::kImpossibleBitPattern, kPointerSize, v8::internal::Marking::kWhiteBitPattern, and v8::internal::HeapObject::Size().

Referenced by DiscoverGreyObjectsInNewSpace(), and DiscoverGreyObjectsInSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiscoverGreyObjectsWithIterator()

template<class T >
static void v8::internal::DiscoverGreyObjectsWithIterator ( Heap heap,
MarkingDeque marking_deque,
T it 
)
static

Definition at line 1878 of file mark-compact.cc.

1880  {
1881  // The caller should ensure that the marking stack is initially not full,
1882  // so that we don't waste effort pointlessly scanning for objects.
1883  DCHECK(!marking_deque->IsFull());
1884 
1885  Map* filler_map = heap->one_pointer_filler_map();
1886  for (HeapObject* object = it->Next(); object != NULL; object = it->Next()) {
1887  MarkBit markbit = Marking::MarkBitFrom(object);
1888  if ((object->map() != filler_map) && Marking::IsGrey(markbit)) {
1889  Marking::GreyToBlack(markbit);
1890  MemoryChunk::IncrementLiveBytesFromGC(object->address(), object->Size());
1891  marking_deque->PushBlack(object);
1892  if (marking_deque->IsFull()) return;
1893  }
1894  }
1895 }

References DCHECK, v8::internal::MemoryChunk::IncrementLiveBytesFromGC(), v8::internal::MarkingDeque::IsFull(), and NULL.

Referenced by v8::internal::MarkCompactCollector::RefillMarkingDeque().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisposeOptimizedCompileJob()

static void v8::internal::DisposeOptimizedCompileJob ( OptimizedCompileJob job,
bool  restore_function_code 
)
static

Definition at line 115 of file optimizing-compiler-thread.cc.

116  {
117  // The recompile job is allocated in the CompilationInfo's zone.
118  CompilationInfo* info = job->info();
119  if (restore_function_code) {
120  if (info->is_osr()) {
121  if (!job->IsWaitingForInstall()) {
122  // Remove stack check that guards OSR entry on original code.
123  Handle<Code> code = info->unoptimized_code();
124  uint32_t offset = code->TranslateAstIdToPcOffset(info->osr_ast_id());
125  BackEdgeTable::RemoveStackCheck(code, offset);
126  }
127  } else {
128  Handle<JSFunction> function = info->closure();
129  function->ReplaceCode(function->shared()->code());
130  }
131  }
132  delete info;
133 }

References v8::internal::CompilationInfo::closure(), v8::internal::OptimizedCompileJob::info(), v8::internal::CompilationInfo::is_osr(), v8::internal::OptimizedCompileJob::IsWaitingForInstall(), v8::internal::CompilationInfo::osr_ast_id(), v8::internal::BackEdgeTable::RemoveStackCheck(), and v8::internal::CompilationInfo::unoptimized_code().

Referenced by v8::internal::OptimizingCompilerThread::AddToOsrBuffer(), v8::internal::OptimizingCompilerThread::FlushInputQueue(), v8::internal::OptimizingCompilerThread::FlushOsrBuffer(), v8::internal::OptimizingCompilerThread::FlushOutputQueue(), and v8::internal::OptimizingCompilerThread::InstallOptimizedFunctions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiyFpStrtod()

static bool v8::internal::DiyFpStrtod ( Vector< const char >  buffer,
int  exponent,
double *  result 
)
static

Definition at line 235 of file strtod.cc.

237  {
238  DiyFp input;
239  int remaining_decimals;
240  ReadDiyFp(buffer, &input, &remaining_decimals);
241  // Since we may have dropped some digits the input is not accurate.
242  // If remaining_decimals is different than 0 than the error is at most
243  // .5 ulp (unit in the last place).
244  // We don't want to deal with fractions and therefore keep a common
245  // denominator.
246  const int kDenominatorLog = 3;
247  const int kDenominator = 1 << kDenominatorLog;
248  // Move the remaining decimals into the exponent.
249  exponent += remaining_decimals;
250  int64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
251 
252  int old_e = input.e();
253  input.Normalize();
254  error <<= old_e - input.e();
255 
256  DCHECK(exponent <= PowersOfTenCache::kMaxDecimalExponent);
257  if (exponent < PowersOfTenCache::kMinDecimalExponent) {
258  *result = 0.0;
259  return true;
260  }
261  DiyFp cached_power;
262  int cached_decimal_exponent;
263  PowersOfTenCache::GetCachedPowerForDecimalExponent(exponent,
264  &cached_power,
265  &cached_decimal_exponent);
266 
267  if (cached_decimal_exponent != exponent) {
268  int adjustment_exponent = exponent - cached_decimal_exponent;
269  DiyFp adjustment_power = AdjustmentPowerOfTen(adjustment_exponent);
270  input.Multiply(adjustment_power);
271  if (kMaxUint64DecimalDigits - buffer.length() >= adjustment_exponent) {
272  // The product of input with the adjustment power fits into a 64 bit
273  // integer.
274  DCHECK(DiyFp::kSignificandSize == 64);
275  } else {
276  // The adjustment power is exact. There is hence only an error of 0.5.
277  error += kDenominator / 2;
278  }
279  }
280 
281  input.Multiply(cached_power);
282  // The error introduced by a multiplication of a*b equals
283  // error_a + error_b + error_a*error_b/2^64 + 0.5
284  // Substituting a with 'input' and b with 'cached_power' we have
285  // error_b = 0.5 (all cached powers have an error of less than 0.5 ulp),
286  // error_ab = 0 or 1 / kDenominator > error_a*error_b/ 2^64
287  int error_b = kDenominator / 2;
288  int error_ab = (error == 0 ? 0 : 1); // We round up to 1.
289  int fixed_error = kDenominator / 2;
290  error += error_b + error_ab + fixed_error;
291 
292  old_e = input.e();
293  input.Normalize();
294  error <<= old_e - input.e();
295 
296  // See if the double's significand changes if we add/subtract the error.
297  int order_of_magnitude = DiyFp::kSignificandSize + input.e();
298  int effective_significand_size =
299  Double::SignificandSizeForOrderOfMagnitude(order_of_magnitude);
300  int precision_digits_count =
301  DiyFp::kSignificandSize - effective_significand_size;
302  if (precision_digits_count + kDenominatorLog >= DiyFp::kSignificandSize) {
303  // This can only happen for very small denormals. In this case the
304  // half-way multiplied by the denominator exceeds the range of an uint64.
305  // Simply shift everything to the right.
306  int shift_amount = (precision_digits_count + kDenominatorLog) -
307  DiyFp::kSignificandSize + 1;
308  input.set_f(input.f() >> shift_amount);
309  input.set_e(input.e() + shift_amount);
310  // We add 1 for the lost precision of error, and kDenominator for
311  // the lost precision of input.f().
312  error = (error >> shift_amount) + 1 + kDenominator;
313  precision_digits_count -= shift_amount;
314  }
315  // We use uint64_ts now. This only works if the DiyFp uses uint64_ts too.
316  DCHECK(DiyFp::kSignificandSize == 64);
317  DCHECK(precision_digits_count < 64);
318  uint64_t one64 = 1;
319  uint64_t precision_bits_mask = (one64 << precision_digits_count) - 1;
320  uint64_t precision_bits = input.f() & precision_bits_mask;
321  uint64_t half_way = one64 << (precision_digits_count - 1);
322  precision_bits *= kDenominator;
323  half_way *= kDenominator;
324  DiyFp rounded_input(input.f() >> precision_digits_count,
325  input.e() + precision_digits_count);
326  if (precision_bits >= half_way + error) {
327  rounded_input.set_f(rounded_input.f() + 1);
328  }
329  // If the last_bits are too close to the half-way case than we are too
330  // inaccurate and round down. In this case we return false so that we can
331  // fall back to a more precise algorithm.
332 
333  *result = Double(rounded_input).value();
334  if (half_way - error < precision_bits && precision_bits < half_way + error) {
335  // Too imprecise. The caller will have to fall back to a slower version.
336  // However the returned number is guaranteed to be either the correct
337  // double, or the next-lower double.
338  return false;
339  } else {
340  return true;
341  }
342 }
static void ReadDiyFp(Vector< const char > buffer, DiyFp *result, int *remaining_decimals)
Definition: strtod.cc:134
static const int kMaxUint64DecimalDigits
Definition: strtod.cc:25
static DiyFp AdjustmentPowerOfTen(int exponent)
Definition: strtod.cc:211

References AdjustmentPowerOfTen(), DCHECK, v8::internal::DiyFp::e(), v8::internal::DiyFp::f(), v8::internal::PowersOfTenCache::GetCachedPowerForDecimalExponent(), v8::internal::PowersOfTenCache::kMaxDecimalExponent, kMaxUint64DecimalDigits, v8::internal::PowersOfTenCache::kMinDecimalExponent, v8::internal::DiyFp::kSignificandSize, v8::internal::Vector< T >::length(), v8::internal::DiyFp::Multiply(), v8::internal::DiyFp::Normalize(), ReadDiyFp(), v8::internal::DiyFp::set_e(), v8::internal::DiyFp::set_f(), v8::internal::Double::SignificandSizeForOrderOfMagnitude(), and v8::internal::Double::value().

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGenerateCode()

template<class Stub >
static Handle<Code> v8::internal::DoGenerateCode ( Stub *  stub)
static

Definition at line 256 of file code-stubs-hydrogen.cc.

256  {
257  Isolate* isolate = stub->isolate();
258  CodeStubDescriptor descriptor(stub);
259 
260  // If we are uninitialized we can use a light-weight stub to enter
261  // the runtime that is significantly faster than using the standard
262  // stub-failure deopt mechanism.
263  if (stub->IsUninitialized() && descriptor.has_miss_handler()) {
264  DCHECK(!descriptor.stack_parameter_count().is_valid());
265  return stub->GenerateLightweightMissCode(descriptor.miss_handler());
266  }
267  base::ElapsedTimer timer;
268  if (FLAG_profile_hydrogen_code_stub_compilation) {
269  timer.Start();
270  }
271  CodeStubGraphBuilder<Stub> builder(isolate, stub);
272  LChunk* chunk = OptimizeGraph(builder.CreateGraph());
273  // TODO(yangguo) remove this once the code serializer handles code stubs.
274  if (FLAG_serialize_toplevel) chunk->info()->PrepareForSerializing();
275  Handle<Code> code = chunk->Codegen();
276  if (FLAG_profile_hydrogen_code_stub_compilation) {
277  OFStream os(stdout);
278  os << "[Lazy compilation of " << stub << " took "
279  << timer.Elapsed().InMillisecondsF() << " ms]" << endl;
280  }
281  return code;
282 }
OStream & endl(OStream &os)
Definition: ostreams.cc:112
static LChunk * OptimizeGraph(HGraph *graph)

References v8::internal::LChunk::Codegen(), v8::internal::HGraphBuilder::CreateGraph(), DCHECK, endl(), v8::internal::CodeStubDescriptor::has_miss_handler(), v8::internal::LChunk::info(), v8::internal::Register::is_valid(), v8::internal::CodeStubDescriptor::miss_handler(), OptimizeGraph(), v8::internal::CompilationInfo::PrepareForSerializing(), and v8::internal::CodeStubDescriptor::stack_parameter_count().

+ Here is the call graph for this function:

◆ DoReportStatistics()

static void v8::internal::DoReportStatistics ( Isolate isolate,
HistogramInfo info,
const char *  description 
)
static

Definition at line 1870 of file spaces.cc.

1871  {
1872  LOG(isolate, HeapSampleBeginEvent("NewSpace", description));
1873  // Lump all the string types together.
1874  int string_number = 0;
1875  int string_bytes = 0;
1876 #define INCREMENT(type, size, name, camel_name) \
1877  string_number += info[type].number(); \
1878  string_bytes += info[type].bytes();
1880 #undef INCREMENT
1881  if (string_number > 0) {
1882  LOG(isolate,
1883  HeapSampleItemEvent("STRING_TYPE", string_number, string_bytes));
1884  }
1885 
1886  // Then do the other types.
1887  for (int i = FIRST_NONSTRING_TYPE; i <= LAST_TYPE; ++i) {
1888  if (info[i].number() > 0) {
1889  LOG(isolate, HeapSampleItemEvent(info[i].name(), info[i].number(),
1890  info[i].bytes()));
1891  }
1892  }
1893  LOG(isolate, HeapSampleEndEvent("NewSpace", description));
1894 }
#define LOG(isolate, Call)
Definition: log.h:69
#define STRING_TYPE_LIST(V)
Definition: objects.h:457
#define INCREMENT(type, size, name, camel_name)

References FIRST_NONSTRING_TYPE, INCREMENT, LAST_TYPE, LOG, name, and STRING_TYPE_LIST.

Referenced by v8::internal::NewSpace::ReportStatistics().

+ Here is the caller graph for this function:

◆ double_to_rawbits()

static uint64_t v8::internal::double_to_rawbits ( double  value)
inlinestatic

Definition at line 34 of file utils-arm64.h.

34  {
35  uint64_t bits = 0;
36  memcpy(&bits, &value, 8);
37  return bits;
38 }

Referenced by IsSignallingNaN(), v8::internal::MacroAssembler::Ldr(), and ToQuietNaN().

+ Here is the caller graph for this function:

◆ double_to_uint64()

uint64_t v8::internal::double_to_uint64 ( double  d)
inline

Definition at line 14 of file double.h.

14 { return bit_cast<uint64_t>(d); }

Referenced by v8::internal::Object::GetHash(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ DoubleStrtod()

static bool v8::internal::DoubleStrtod ( Vector< const char >  trimmed,
int  exponent,
double *  result 
)
static

Definition at line 155 of file strtod.cc.

157  {
158 #if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 || defined(USE_SIMULATOR)) && \
159  !defined(_MSC_VER)
160  // On x86 the floating-point stack can be 64 or 80 bits wide. If it is
161  // 80 bits wide (as is the case on Linux) then double-rounding occurs and the
162  // result is not accurate.
163  // We know that Windows32 with MSVC, unlike with MinGW32, uses 64 bits and is
164  // therefore accurate.
165  // Note that the ARM and MIPS simulators are compiled for 32bits. They
166  // therefore exhibit the same problem.
167  return false;
168 #endif
169  if (trimmed.length() <= kMaxExactDoubleIntegerDecimalDigits) {
170  int read_digits;
171  // The trimmed input fits into a double.
172  // If the 10^exponent (resp. 10^-exponent) fits into a double too then we
173  // can compute the result-double simply by multiplying (resp. dividing) the
174  // two numbers.
175  // This is possible because IEEE guarantees that floating-point operations
176  // return the best possible approximation.
177  if (exponent < 0 && -exponent < kExactPowersOfTenSize) {
178  // 10^-exponent fits into a double.
179  *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
180  DCHECK(read_digits == trimmed.length());
181  *result /= exact_powers_of_ten[-exponent];
182  return true;
183  }
184  if (0 <= exponent && exponent < kExactPowersOfTenSize) {
185  // 10^exponent fits into a double.
186  *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
187  DCHECK(read_digits == trimmed.length());
188  *result *= exact_powers_of_ten[exponent];
189  return true;
190  }
191  int remaining_digits =
193  if ((0 <= exponent) &&
194  (exponent - remaining_digits < kExactPowersOfTenSize)) {
195  // The trimmed string was short and we can multiply it with
196  // 10^remaining_digits. As a result the remaining exponent now fits
197  // into a double too.
198  *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
199  DCHECK(read_digits == trimmed.length());
200  *result *= exact_powers_of_ten[remaining_digits];
201  *result *= exact_powers_of_ten[exponent - remaining_digits];
202  return true;
203  }
204  }
205  return false;
206 }
static const int kExactPowersOfTenSize
Definition: strtod.cc:66
static const double exact_powers_of_ten[]
Definition: strtod.cc:40
static uint64_t ReadUint64(Vector< const char > buffer, int *number_of_read_digits)
Definition: strtod.cc:116
static const int kMaxExactDoubleIntegerDecimalDigits
Definition: strtod.cc:23

References DCHECK, exact_powers_of_ten, kExactPowersOfTenSize, kMaxExactDoubleIntegerDecimalDigits, v8::internal::Vector< T >::length(), and ReadUint64().

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToAscii()

void v8::internal::DoubleToAscii ( double  v,
DtoaMode  mode,
int  requested_digits,
Vector< char >  buffer,
int sign,
int length,
int point 
)

Definition at line 33 of file dtoa.cc.

34  {
35  DCHECK(!Double(v).IsSpecial());
36  DCHECK(mode == DTOA_SHORTEST || requested_digits >= 0);
37 
38  if (Double(v).Sign() < 0) {
39  *sign = 1;
40  v = -v;
41  } else {
42  *sign = 0;
43  }
44 
45  if (v == 0) {
46  buffer[0] = '0';
47  buffer[1] = '\0';
48  *length = 1;
49  *point = 1;
50  return;
51  }
52 
53  if (mode == DTOA_PRECISION && requested_digits == 0) {
54  buffer[0] = '\0';
55  *length = 0;
56  return;
57  }
58 
59  bool fast_worked;
60  switch (mode) {
61  case DTOA_SHORTEST:
62  fast_worked = FastDtoa(v, FAST_DTOA_SHORTEST, 0, buffer, length, point);
63  break;
64  case DTOA_FIXED:
65  fast_worked = FastFixedDtoa(v, requested_digits, buffer, length, point);
66  break;
67  case DTOA_PRECISION:
68  fast_worked = FastDtoa(v, FAST_DTOA_PRECISION, requested_digits,
69  buffer, length, point);
70  break;
71  default:
72  UNREACHABLE();
73  fast_worked = false;
74  }
75  if (fast_worked) return;
76 
77  // If the fast dtoa didn't succeed use the slower bignum version.
79  BignumDtoa(v, bignum_mode, requested_digits, buffer, length, point);
80  buffer[*length] = '\0';
81 }
bool FastFixedDtoa(double v, int fractional_count, Vector< char > buffer, int *length, int *decimal_point)
Definition: fixed-dtoa.cc:289
static BignumDtoaMode DtoaToBignumDtoaMode(DtoaMode dtoa_mode)
Definition: dtoa.cc:21
bool FastDtoa(double v, FastDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
Definition: fast-dtoa.cc:686
void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
Definition: bignum-dtoa.cc:69

References BignumDtoa(), DCHECK, DTOA_FIXED, DTOA_PRECISION, DTOA_SHORTEST, DtoaToBignumDtoaMode(), FAST_DTOA_PRECISION, FAST_DTOA_SHORTEST, FastDtoa(), FastFixedDtoa(), mode(), sign, and UNREACHABLE.

Referenced by DoubleToCString(), DoubleToExponentialCString(), DoubleToFixedCString(), and DoubleToPrecisionCString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToBoolean()

bool v8::internal::DoubleToBoolean ( double  d)

Definition at line 397 of file utils.cc.

397  {
398  // NaN, +0, and -0 should return the false object
399 #if __BYTE_ORDER == __LITTLE_ENDIAN
400  union IeeeDoubleLittleEndianArchType u;
401 #elif __BYTE_ORDER == __BIG_ENDIAN
402  union IeeeDoubleBigEndianArchType u;
403 #endif
404  u.d = d;
405  if (u.bits.exp == 2047) {
406  // Detect NaN for IEEE double precision floating point.
407  if ((u.bits.man_low | u.bits.man_high) != 0) return false;
408  }
409  if (u.bits.exp == 0) {
410  // Detect +0, and -0 for IEEE double precision floating point.
411  if ((u.bits.man_low | u.bits.man_high) == 0) return false;
412  }
413  return true;
414 }

References v8::internal::IeeeDoubleLittleEndianArchType::bits, v8::internal::IeeeDoubleLittleEndianArchType::d, v8::internal::IeeeDoubleLittleEndianArchType::exp, v8::internal::IeeeDoubleLittleEndianArchType::man_high, and v8::internal::IeeeDoubleLittleEndianArchType::man_low.

Referenced by v8::internal::AstValue::BooleanValue().

+ Here is the caller graph for this function:

◆ DoubleToCString()

const char * v8::internal::DoubleToCString ( double  v,
Vector< char >  buffer 
)

Definition at line 121 of file conversions.cc.

121  {
122  switch (fpclassify(v)) {
123  case FP_NAN: return "NaN";
124  case FP_INFINITE: return (v < 0.0 ? "-Infinity" : "Infinity");
125  case FP_ZERO: return "0";
126  default: {
127  SimpleStringBuilder builder(buffer.start(), buffer.length());
128  int decimal_point;
129  int sign;
130  const int kV8DtoaBufferCapacity = kBase10MaximalLength + 1;
131  char decimal_rep[kV8DtoaBufferCapacity];
132  int length;
133 
135  Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
136  &sign, &length, &decimal_point);
137 
138  if (sign) builder.AddCharacter('-');
139 
140  if (length <= decimal_point && decimal_point <= 21) {
141  // ECMA-262 section 9.8.1 step 6.
142  builder.AddString(decimal_rep);
143  builder.AddPadding('0', decimal_point - length);
144 
145  } else if (0 < decimal_point && decimal_point <= 21) {
146  // ECMA-262 section 9.8.1 step 7.
147  builder.AddSubstring(decimal_rep, decimal_point);
148  builder.AddCharacter('.');
149  builder.AddString(decimal_rep + decimal_point);
150 
151  } else if (decimal_point <= 0 && decimal_point > -6) {
152  // ECMA-262 section 9.8.1 step 8.
153  builder.AddString("0.");
154  builder.AddPadding('0', -decimal_point);
155  builder.AddString(decimal_rep);
156 
157  } else {
158  // ECMA-262 section 9.8.1 step 9 and 10 combined.
159  builder.AddCharacter(decimal_rep[0]);
160  if (length != 1) {
161  builder.AddCharacter('.');
162  builder.AddString(decimal_rep + 1);
163  }
164  builder.AddCharacter('e');
165  builder.AddCharacter((decimal_point >= 0) ? '+' : '-');
166  int exponent = decimal_point - 1;
167  if (exponent < 0) exponent = -exponent;
168  builder.AddDecimalInteger(exponent);
169  }
170  return builder.Finalize();
171  }
172  }
173 }
T * start() const
Definition: vector.h:47
const int kBase10MaximalLength
Definition: dtoa.h:27
void DoubleToAscii(double v, DtoaMode mode, int requested_digits, Vector< char > buffer, int *sign, int *length, int *point)
Definition: dtoa.cc:33
@ FP_INFINITE
Definition: win32-math.h:21
@ FP_ZERO
Definition: win32-math.h:22
@ FP_NAN
Definition: win32-math.h:20
int fpclassify(double x)

References v8::internal::SimpleStringBuilder::AddCharacter(), v8::internal::SimpleStringBuilder::AddDecimalInteger(), v8::internal::SimpleStringBuilder::AddPadding(), v8::internal::SimpleStringBuilder::AddString(), v8::internal::SimpleStringBuilder::AddSubstring(), DoubleToAscii(), DTOA_SHORTEST, v8::internal::SimpleStringBuilder::Finalize(), FP_INFINITE, FP_NAN, FP_ZERO, kBase10MaximalLength, v8::internal::Vector< T >::length(), sign, and v8::internal::Vector< T >::start().

Referenced by v8::internal::DuplicateFinder::AddNumber(), CreateObjectLiteralBoilerplate(), DoubleToFixedCString(), v8::internal::ParserTraits::GetNumberAsSymbol(), and IntToCString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToExponentialCString()

char * v8::internal::DoubleToExponentialCString ( double  value,
int  f 
)

Definition at line 299 of file conversions.cc.

299  {
300  const int kMaxDigitsAfterPoint = 20;
301  // f might be -1 to signal that f was undefined in JavaScript.
302  DCHECK(f >= -1 && f <= kMaxDigitsAfterPoint);
303 
304  bool negative = false;
305  if (value < 0) {
306  value = -value;
307  negative = true;
308  }
309 
310  // Find a sufficiently precise decimal representation of n.
311  int decimal_point;
312  int sign;
313  // f corresponds to the digits after the point. There is always one digit
314  // before the point. The number of requested_digits equals hence f + 1.
315  // And we have to add one character for the null-terminator.
316  const int kV8DtoaBufferCapacity = kMaxDigitsAfterPoint + 1 + 1;
317  // Make sure that the buffer is big enough, even if we fall back to the
318  // shortest representation (which happens when f equals -1).
319  DCHECK(kBase10MaximalLength <= kMaxDigitsAfterPoint + 1);
320  char decimal_rep[kV8DtoaBufferCapacity];
321  int decimal_rep_length;
322 
323  if (f == -1) {
324  DoubleToAscii(value, DTOA_SHORTEST, 0,
325  Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
326  &sign, &decimal_rep_length, &decimal_point);
327  f = decimal_rep_length - 1;
328  } else {
329  DoubleToAscii(value, DTOA_PRECISION, f + 1,
330  Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
331  &sign, &decimal_rep_length, &decimal_point);
332  }
333  DCHECK(decimal_rep_length > 0);
334  DCHECK(decimal_rep_length <= f + 1);
335 
336  int exponent = decimal_point - 1;
337  char* result =
338  CreateExponentialRepresentation(decimal_rep, exponent, negative, f+1);
339 
340  return result;
341 }
static char * CreateExponentialRepresentation(char *decimal_rep, int exponent, bool negative, int significant_digits)
Definition: conversions.cc:267

References CreateExponentialRepresentation(), DCHECK, DoubleToAscii(), DTOA_PRECISION, DTOA_SHORTEST, kBase10MaximalLength, negative, and sign.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToFixedCString()

char * v8::internal::DoubleToFixedCString ( double  value,
int  f 
)

Definition at line 196 of file conversions.cc.

196  {
197  const int kMaxDigitsBeforePoint = 21;
198  const double kFirstNonFixed = 1e21;
199  const int kMaxDigitsAfterPoint = 20;
200  DCHECK(f >= 0);
201  DCHECK(f <= kMaxDigitsAfterPoint);
202 
203  bool negative = false;
204  double abs_value = value;
205  if (value < 0) {
206  abs_value = -value;
207  negative = true;
208  }
209 
210  // If abs_value has more than kMaxDigitsBeforePoint digits before the point
211  // use the non-fixed conversion routine.
212  if (abs_value >= kFirstNonFixed) {
213  char arr[100];
214  Vector<char> buffer(arr, arraysize(arr));
215  return StrDup(DoubleToCString(value, buffer));
216  }
217 
218  // Find a sufficiently precise decimal representation of n.
219  int decimal_point;
220  int sign;
221  // Add space for the '\0' byte.
222  const int kDecimalRepCapacity =
223  kMaxDigitsBeforePoint + kMaxDigitsAfterPoint + 1;
224  char decimal_rep[kDecimalRepCapacity];
225  int decimal_rep_length;
226  DoubleToAscii(value, DTOA_FIXED, f,
227  Vector<char>(decimal_rep, kDecimalRepCapacity),
228  &sign, &decimal_rep_length, &decimal_point);
229 
230  // Create a representation that is padded with zeros if needed.
231  int zero_prefix_length = 0;
232  int zero_postfix_length = 0;
233 
234  if (decimal_point <= 0) {
235  zero_prefix_length = -decimal_point + 1;
236  decimal_point = 1;
237  }
238 
239  if (zero_prefix_length + decimal_rep_length < decimal_point + f) {
240  zero_postfix_length = decimal_point + f - decimal_rep_length -
241  zero_prefix_length;
242  }
243 
244  unsigned rep_length =
245  zero_prefix_length + decimal_rep_length + zero_postfix_length;
246  SimpleStringBuilder rep_builder(rep_length + 1);
247  rep_builder.AddPadding('0', zero_prefix_length);
248  rep_builder.AddString(decimal_rep);
249  rep_builder.AddPadding('0', zero_postfix_length);
250  char* rep = rep_builder.Finalize();
251 
252  // Create the result string by appending a minus and putting in a
253  // decimal point if needed.
254  unsigned result_size = decimal_point + f + 2;
255  SimpleStringBuilder builder(result_size + 1);
256  if (negative) builder.AddCharacter('-');
257  builder.AddSubstring(rep, decimal_point);
258  if (f > 0) {
259  builder.AddCharacter('.');
260  builder.AddSubstring(rep + decimal_point, f);
261  }
262  DeleteArray(rep);
263  return builder.Finalize();
264 }
void DeleteArray(T *array)
Definition: allocation.h:68
char * StrDup(const char *str)
Definition: allocation.cc:67

References v8::internal::SimpleStringBuilder::AddCharacter(), v8::internal::SimpleStringBuilder::AddPadding(), v8::internal::SimpleStringBuilder::AddString(), v8::internal::SimpleStringBuilder::AddSubstring(), arraysize, DCHECK, DeleteArray(), DoubleToAscii(), DoubleToCString(), DTOA_FIXED, v8::internal::SimpleStringBuilder::Finalize(), negative, sign, and StrDup().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToFloat32()

float v8::internal::DoubleToFloat32 ( double  x)
inline

Definition at line 70 of file conversions-inl.h.

70  {
71  // TODO(yanggou): This static_cast is implementation-defined behaviour in C++,
72  // so we may need to do the conversion manually instead to match the spec.
73  volatile float f = static_cast<float>(x);
74  return f;
75 }

Referenced by v8::internal::compiler::RepresentationChanger::GetFloat32RepresentationFor(), RUNTIME_FUNCTION(), and v8::internal::compiler::TEST_F().

+ Here is the caller graph for this function:

◆ DoubleToInt32()

int32_t v8::internal::DoubleToInt32 ( double  x)
inline

Definition at line 85 of file conversions-inl.h.

85  {
86  int32_t i = FastD2I(x);
87  if (FastI2D(i) == x) return i;
88  Double d(x);
89  int exponent = d.Exponent();
90  if (exponent < 0) {
91  if (exponent <= -Double::kSignificandSize) return 0;
92  return d.Sign() * static_cast<int32_t>(d.Significand() >> -exponent);
93  } else {
94  if (exponent > 31) return 0;
95  return d.Sign() * static_cast<int32_t>(d.Significand() << exponent);
96  }
97 }
int FastD2I(double x)
Definition: conversions.h:57

References v8::internal::Double::Exponent(), FastD2I(), FastI2D(), v8::internal::Double::kSignificandSize, v8::internal::Double::Sign(), and v8::internal::Double::Significand().

Referenced by v8::internal::ParserTraits::BuildUnaryExpression(), CheckArrayAbuse(), CollectElementIndices(), DataViewConvertValue< int16_t >(), DataViewConvertValue< int32_t >(), DataViewConvertValue< int8_t >(), DoubleToUint32(), ExternalArrayIntSetter(), v8::internal::FixedTypedArray< Traits >::from_double(), NumberToInt32(), RUNTIME_FUNCTION(), v8::internal::ParserTraits::ShortcutNumericLiteralBinaryExpression(), and v8::internal::compiler::TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToInteger()

double v8::internal::DoubleToInteger ( double  x)
inline

Definition at line 78 of file conversions-inl.h.

78  {
79  if (std::isnan(x)) return 0;
80  if (!std::isfinite(x) || x == 0) return x;
81  return (x >= 0) ? std::floor(x) : std::ceil(x);
82 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ DoubleToPrecisionCString()

char * v8::internal::DoubleToPrecisionCString ( double  value,
int  p 
)

Definition at line 344 of file conversions.cc.

344  {
345  const int kMinimalDigits = 1;
346  const int kMaximalDigits = 21;
347  DCHECK(p >= kMinimalDigits && p <= kMaximalDigits);
348  USE(kMinimalDigits);
349 
350  bool negative = false;
351  if (value < 0) {
352  value = -value;
353  negative = true;
354  }
355 
356  // Find a sufficiently precise decimal representation of n.
357  int decimal_point;
358  int sign;
359  // Add one for the terminating null character.
360  const int kV8DtoaBufferCapacity = kMaximalDigits + 1;
361  char decimal_rep[kV8DtoaBufferCapacity];
362  int decimal_rep_length;
363 
364  DoubleToAscii(value, DTOA_PRECISION, p,
365  Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
366  &sign, &decimal_rep_length, &decimal_point);
367  DCHECK(decimal_rep_length <= p);
368 
369  int exponent = decimal_point - 1;
370 
371  char* result = NULL;
372 
373  if (exponent < -6 || exponent >= p) {
374  result =
375  CreateExponentialRepresentation(decimal_rep, exponent, negative, p);
376  } else {
377  // Use fixed notation.
378  //
379  // Leave room in the result for appending a minus, a period and in
380  // the case where decimal_point is not positive for a zero in
381  // front of the period.
382  unsigned result_size = (decimal_point <= 0)
383  ? -decimal_point + p + 3
384  : p + 2;
385  SimpleStringBuilder builder(result_size + 1);
386  if (negative) builder.AddCharacter('-');
387  if (decimal_point <= 0) {
388  builder.AddString("0.");
389  builder.AddPadding('0', -decimal_point);
390  builder.AddString(decimal_rep);
391  builder.AddPadding('0', p - decimal_rep_length);
392  } else {
393  const int m = Min(decimal_rep_length, decimal_point);
394  builder.AddSubstring(decimal_rep, m);
395  builder.AddPadding('0', decimal_point - decimal_rep_length);
396  if (decimal_point < p) {
397  builder.AddCharacter('.');
398  const int extra = negative ? 2 : 1;
399  if (decimal_rep_length > decimal_point) {
400  const int len = StrLength(decimal_rep + decimal_point);
401  const int n = Min(len, p - (builder.position() - extra));
402  builder.AddSubstring(decimal_rep + decimal_point, n);
403  }
404  builder.AddPadding('0', extra + (p - builder.position()));
405  }
406  }
407  result = builder.Finalize();
408  }
409 
410  return result;
411 }

References v8::internal::SimpleStringBuilder::AddCharacter(), v8::internal::SimpleStringBuilder::AddPadding(), v8::internal::SimpleStringBuilder::AddString(), v8::internal::SimpleStringBuilder::AddSubstring(), CreateExponentialRepresentation(), DCHECK, DoubleToAscii(), DTOA_PRECISION, v8::internal::SimpleStringBuilder::Finalize(), Min(), negative, NULL, v8::internal::SimpleStringBuilder::position(), sign, StrLength(), and USE().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToRadixCString()

char * v8::internal::DoubleToRadixCString ( double  value,
int  radix 
)

Definition at line 414 of file conversions.cc.

414  {
415  DCHECK(radix >= 2 && radix <= 36);
416 
417  // Character array used for conversion.
418  static const char chars[] = "0123456789abcdefghijklmnopqrstuvwxyz";
419 
420  // Buffer for the integer part of the result. 1024 chars is enough
421  // for max integer value in radix 2. We need room for a sign too.
422  static const int kBufferSize = 1100;
423  char integer_buffer[kBufferSize];
424  integer_buffer[kBufferSize - 1] = '\0';
425 
426  // Buffer for the decimal part of the result. We only generate up
427  // to kBufferSize - 1 chars for the decimal part.
428  char decimal_buffer[kBufferSize];
429  decimal_buffer[kBufferSize - 1] = '\0';
430 
431  // Make sure the value is positive.
432  bool is_negative = value < 0.0;
433  if (is_negative) value = -value;
434 
435  // Get the integer part and the decimal part.
436  double integer_part = std::floor(value);
437  double decimal_part = value - integer_part;
438 
439  // Convert the integer part starting from the back. Always generate
440  // at least one digit.
441  int integer_pos = kBufferSize - 2;
442  do {
443  double remainder = std::fmod(integer_part, radix);
444  integer_buffer[integer_pos--] = chars[static_cast<int>(remainder)];
445  integer_part -= remainder;
446  integer_part /= radix;
447  } while (integer_part >= 1.0);
448  // Sanity check.
449  DCHECK(integer_pos > 0);
450  // Add sign if needed.
451  if (is_negative) integer_buffer[integer_pos--] = '-';
452 
453  // Convert the decimal part. Repeatedly multiply by the radix to
454  // generate the next char. Never generate more than kBufferSize - 1
455  // chars.
456  //
457  // TODO(1093998): We will often generate a full decimal_buffer of
458  // chars because hitting zero will often not happen. The right
459  // solution would be to continue until the string representation can
460  // be read back and yield the original value. To implement this
461  // efficiently, we probably have to modify dtoa.
462  int decimal_pos = 0;
463  while ((decimal_part > 0.0) && (decimal_pos < kBufferSize - 1)) {
464  decimal_part *= radix;
465  decimal_buffer[decimal_pos++] =
466  chars[static_cast<int>(std::floor(decimal_part))];
467  decimal_part -= std::floor(decimal_part);
468  }
469  decimal_buffer[decimal_pos] = '\0';
470 
471  // Compute the result size.
472  int integer_part_size = kBufferSize - 2 - integer_pos;
473  // Make room for zero termination.
474  unsigned result_size = integer_part_size + decimal_pos;
475  // If the number has a decimal part, leave room for the period.
476  if (decimal_pos > 0) result_size++;
477  // Allocate result and fill in the parts.
478  SimpleStringBuilder builder(result_size + 1);
479  builder.AddSubstring(integer_buffer + integer_pos + 1, integer_part_size);
480  if (decimal_pos > 0) builder.AddCharacter('.');
481  builder.AddSubstring(decimal_buffer, decimal_pos);
482  return builder.Finalize();
483 }

References v8::internal::SimpleStringBuilder::AddCharacter(), v8::internal::SimpleStringBuilder::AddSubstring(), DCHECK, v8::internal::SimpleStringBuilder::Finalize(), and v8::base::anonymous_namespace{semaphore-unittest.cc}::kBufferSize.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoubleToUint32()

uint32_t v8::internal::DoubleToUint32 ( double  x)
inline

Definition at line 93 of file conversions.h.

93  {
94  return static_cast<uint32_t>(DoubleToInt32(x));
95 }

References DoubleToInt32().

Referenced by DataViewConvertValue< uint16_t >(), DataViewConvertValue< uint32_t >(), DataViewConvertValue< uint8_t >(), NumberToUint32(), v8::internal::ExternalUint32Array::SetValue(), v8::internal::ParserTraits::ShortcutNumericLiteralBinaryExpression(), and v8::internal::compiler::TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DropActivationsInActiveThread()

static const char* v8::internal::DropActivationsInActiveThread ( Handle< JSArray shared_info_array,
Handle< JSArray result,
bool  do_drop 
)
static

Definition at line 1865 of file liveedit.cc.

1866  {
1867  MultipleFunctionTarget target(shared_info_array, result);
1868 
1869  const char* message = DropActivationsInActiveThreadImpl(
1870  shared_info_array->GetIsolate(), target, do_drop);
1871  if (message) {
1872  return message;
1873  }
1874 
1875  Isolate* isolate = shared_info_array->GetIsolate();
1876  int array_len = GetArrayLength(shared_info_array);
1877 
1878  // Replace "blocked on active" with "replaced on active" status.
1879  for (int i = 0; i < array_len; i++) {
1880  Handle<Object> obj =
1881  Object::GetElement(isolate, result, i).ToHandleChecked();
1882  if (*obj == Smi::FromInt(LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) {
1883  Handle<Object> replaced(
1884  Smi::FromInt(LiveEdit::FUNCTION_REPLACED_ON_ACTIVE_STACK), isolate);
1885  SetElementSloppy(result, i, replaced);
1886  }
1887  }
1888  return NULL;
1889 }
static const char * DropActivationsInActiveThreadImpl(Isolate *isolate, TARGET &target, bool do_drop)
Definition: liveedit.cc:1759

References DropActivationsInActiveThreadImpl(), v8::internal::Smi::FromInt(), v8::internal::LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK, v8::internal::LiveEdit::FUNCTION_REPLACED_ON_ACTIVE_STACK, GetArrayLength(), v8::internal::Object::GetElement(), NULL, and SetElementSloppy().

Referenced by v8::internal::LiveEdit::CheckAndDropActivations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DropActivationsInActiveThreadImpl()

template<typename TARGET >
static const char* v8::internal::DropActivationsInActiveThreadImpl ( Isolate isolate,
TARGET &  target,
bool  do_drop 
)
static

Definition at line 1759 of file liveedit.cc.

1762  {
1763  Debug* debug = isolate->debug();
1764  Zone zone(isolate);
1765  Vector<StackFrame*> frames = CreateStackMap(isolate, &zone);
1766 
1767 
1768  int top_frame_index = -1;
1769  int frame_index = 0;
1770  for (; frame_index < frames.length(); frame_index++) {
1771  StackFrame* frame = frames[frame_index];
1772  if (frame->id() == debug->break_frame_id()) {
1773  top_frame_index = frame_index;
1774  break;
1775  }
1776  if (target.MatchActivation(
1777  frame, LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE)) {
1778  // We are still above break_frame. It is not a target frame,
1779  // it is a problem.
1780  return "Debugger mark-up on stack is not found";
1781  }
1782  }
1783 
1784  if (top_frame_index == -1) {
1785  // We haven't found break frame, but no function is blocking us anyway.
1786  return target.GetNotFoundMessage();
1787  }
1788 
1789  bool target_frame_found = false;
1790  int bottom_js_frame_index = top_frame_index;
1791  bool non_droppable_frame_found = false;
1792  LiveEdit::FunctionPatchabilityStatus non_droppable_reason;
1793 
1794  for (; frame_index < frames.length(); frame_index++) {
1795  StackFrame* frame = frames[frame_index];
1796  if (frame->is_exit()) {
1797  non_droppable_frame_found = true;
1798  non_droppable_reason = LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE;
1799  break;
1800  }
1801  if (frame->is_java_script() &&
1802  JavaScriptFrame::cast(frame)->function()->shared()->is_generator()) {
1803  non_droppable_frame_found = true;
1804  non_droppable_reason = LiveEdit::FUNCTION_BLOCKED_UNDER_GENERATOR;
1805  break;
1806  }
1807  if (target.MatchActivation(
1808  frame, LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) {
1809  target_frame_found = true;
1810  bottom_js_frame_index = frame_index;
1811  }
1812  }
1813 
1814  if (non_droppable_frame_found) {
1815  // There is a C or generator frame on stack. We can't drop C frames, and we
1816  // can't restart generators. Check that there are no target frames below
1817  // them.
1818  for (; frame_index < frames.length(); frame_index++) {
1819  StackFrame* frame = frames[frame_index];
1820  if (frame->is_java_script()) {
1821  if (target.MatchActivation(frame, non_droppable_reason)) {
1822  // Fail.
1823  return NULL;
1824  }
1825  }
1826  }
1827  }
1828 
1829  if (!do_drop) {
1830  // We are in check-only mode.
1831  return NULL;
1832  }
1833 
1834  if (!target_frame_found) {
1835  // Nothing to drop.
1836  return target.GetNotFoundMessage();
1837  }
1838 
1839  LiveEdit::FrameDropMode drop_mode = LiveEdit::FRAMES_UNTOUCHED;
1840  Object** restarter_frame_function_pointer = NULL;
1841  const char* error_message = DropFrames(frames, top_frame_index,
1842  bottom_js_frame_index, &drop_mode,
1843  &restarter_frame_function_pointer);
1844 
1845  if (error_message != NULL) {
1846  return error_message;
1847  }
1848 
1849  // Adjust break_frame after some frames has been dropped.
1850  StackFrame::Id new_id = StackFrame::NO_ID;
1851  for (int i = bottom_js_frame_index + 1; i < frames.length(); i++) {
1852  if (frames[i]->type() == StackFrame::JAVA_SCRIPT) {
1853  new_id = frames[i]->id();
1854  break;
1855  }
1856  }
1857  debug->FramesHaveBeenDropped(
1858  new_id, drop_mode, restarter_frame_function_pointer);
1859  return NULL;
1860 }
static const char * DropFrames(Vector< StackFrame * > frames, int top_frame_index, int bottom_js_frame_index, LiveEdit::FrameDropMode *mode, Object ***restarter_frame_function_pointer)
Definition: liveedit.cc:1603
Vector< StackFrame * > CreateStackMap(Isolate *isolate, Zone *zone)
Definition: frames.cc:1634

References v8::internal::Debug::break_frame_id(), v8::internal::JavaScriptFrame::cast(), CreateStackMap(), v8::internal::Isolate::debug(), DropFrames(), v8::internal::LiveEdit::FRAMES_UNTOUCHED, v8::internal::Debug::FramesHaveBeenDropped(), v8::internal::JavaScriptFrame::function(), v8::internal::LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK, v8::internal::LiveEdit::FUNCTION_BLOCKED_UNDER_GENERATOR, v8::internal::LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE, v8::internal::Vector< T >::length(), and NULL.

Referenced by DropActivationsInActiveThread(), and v8::internal::LiveEdit::RestartFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DropFrames()

static const char* v8::internal::DropFrames ( Vector< StackFrame * >  frames,
int  top_frame_index,
int  bottom_js_frame_index,
LiveEdit::FrameDropMode mode,
Object ***  restarter_frame_function_pointer 
)
static

Definition at line 1603 of file liveedit.cc.

1607  {
1608  if (!LiveEdit::kFrameDropperSupported) {
1609  return "Stack manipulations are not supported in this architecture.";
1610  }
1611 
1612  StackFrame* pre_top_frame = frames[top_frame_index - 1];
1613  StackFrame* top_frame = frames[top_frame_index];
1614  StackFrame* bottom_js_frame = frames[bottom_js_frame_index];
1615 
1616  DCHECK(bottom_js_frame->is_java_script());
1617 
1618  // Check the nature of the top frame.
1619  Isolate* isolate = bottom_js_frame->isolate();
1620  Code* pre_top_frame_code = pre_top_frame->LookupCode();
1621  bool frame_has_padding = true;
1622  if (pre_top_frame_code->is_inline_cache_stub() &&
1623  pre_top_frame_code->is_debug_stub()) {
1624  // OK, we can drop inline cache calls.
1625  *mode = LiveEdit::FRAME_DROPPED_IN_IC_CALL;
1626  } else if (pre_top_frame_code ==
1627  isolate->builtins()->builtin(Builtins::kSlot_DebugBreak)) {
1628  // OK, we can drop debug break slot.
1629  *mode = LiveEdit::FRAME_DROPPED_IN_DEBUG_SLOT_CALL;
1630  } else if (pre_top_frame_code ==
1631  isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit)) {
1632  // OK, we can drop our own code.
1633  pre_top_frame = frames[top_frame_index - 2];
1634  top_frame = frames[top_frame_index - 1];
1635  *mode = LiveEdit::CURRENTLY_SET_MODE;
1636  frame_has_padding = false;
1637  } else if (pre_top_frame_code ==
1638  isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) {
1639  *mode = LiveEdit::FRAME_DROPPED_IN_RETURN_CALL;
1640  } else if (pre_top_frame_code->kind() == Code::STUB &&
1641  CodeStub::GetMajorKey(pre_top_frame_code) == CodeStub::CEntry) {
1642  // Entry from our unit tests on 'debugger' statement.
1643  // It's fine, we support this case.
1644  *mode = LiveEdit::FRAME_DROPPED_IN_DIRECT_CALL;
1645  // We don't have a padding from 'debugger' statement call.
1646  // Here the stub is CEntry, it's not debug-only and can't be padded.
1647  // If anyone would complain, a proxy padded stub could be added.
1648  frame_has_padding = false;
1649  } else if (pre_top_frame->type() == StackFrame::ARGUMENTS_ADAPTOR) {
1650  // This must be adaptor that remain from the frame dropping that
1651  // is still on stack. A frame dropper frame must be above it.
1652  DCHECK(frames[top_frame_index - 2]->LookupCode() ==
1653  isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit));
1654  pre_top_frame = frames[top_frame_index - 3];
1655  top_frame = frames[top_frame_index - 2];
1656  *mode = LiveEdit::CURRENTLY_SET_MODE;
1657  frame_has_padding = false;
1658  } else {
1659  return "Unknown structure of stack above changing function";
1660  }
1661 
1662  Address unused_stack_top = top_frame->sp();
1663  int new_frame_size = LiveEdit::kFrameDropperFrameSize * kPointerSize;
1664  Address unused_stack_bottom = bottom_js_frame->fp()
1665  - new_frame_size + kPointerSize; // Bigger address end is exclusive.
1666 
1667  Address* top_frame_pc_address = top_frame->pc_address();
1668 
1669  // top_frame may be damaged below this point. Do not used it.
1670  DCHECK(!(top_frame = NULL));
1671 
1672  if (unused_stack_top > unused_stack_bottom) {
1673  if (frame_has_padding) {
1674  int shortage_bytes =
1675  static_cast<int>(unused_stack_top - unused_stack_bottom);
1676 
1677  Address padding_start = pre_top_frame->fp() -
1678  LiveEdit::kFrameDropperFrameSize * kPointerSize;
1679 
1680  Address padding_pointer = padding_start;
1681  Smi* padding_object = Smi::FromInt(LiveEdit::kFramePaddingValue);
1682  while (Memory::Object_at(padding_pointer) == padding_object) {
1683  padding_pointer -= kPointerSize;
1684  }
1685  int padding_counter =
1686  Smi::cast(Memory::Object_at(padding_pointer))->value();
1687  if (padding_counter * kPointerSize < shortage_bytes) {
1688  return "Not enough space for frame dropper frame "
1689  "(even with padding frame)";
1690  }
1691  Memory::Object_at(padding_pointer) =
1692  Smi::FromInt(padding_counter - shortage_bytes / kPointerSize);
1693 
1694  StackFrame* pre_pre_frame = frames[top_frame_index - 2];
1695 
1696  MemMove(padding_start + kPointerSize - shortage_bytes,
1697  padding_start + kPointerSize,
1698  LiveEdit::kFrameDropperFrameSize * kPointerSize);
1699 
1700  pre_top_frame->UpdateFp(pre_top_frame->fp() - shortage_bytes);
1701  pre_pre_frame->SetCallerFp(pre_top_frame->fp());
1702  unused_stack_top -= shortage_bytes;
1703 
1704  STATIC_ASSERT(sizeof(Address) == kPointerSize);
1705  top_frame_pc_address -= shortage_bytes / kPointerSize;
1706  } else {
1707  return "Not enough space for frame dropper frame";
1708  }
1709  }
1710 
1711  // Committing now. After this point we should return only NULL value.
1712 
1713  FixTryCatchHandler(pre_top_frame, bottom_js_frame);
1714  // Make sure FixTryCatchHandler is idempotent.
1715  DCHECK(!FixTryCatchHandler(pre_top_frame, bottom_js_frame));
1716 
1717  Handle<Code> code = isolate->builtins()->FrameDropper_LiveEdit();
1718  *top_frame_pc_address = code->entry();
1719  pre_top_frame->SetCallerFp(bottom_js_frame->fp());
1720 
1721  *restarter_frame_function_pointer =
1722  SetUpFrameDropperFrame(bottom_js_frame, code);
1723 
1724  DCHECK((**restarter_frame_function_pointer)->IsJSFunction());
1725 
1726  for (Address a = unused_stack_top;
1727  a < unused_stack_bottom;
1728  a += kPointerSize) {
1729  Memory::Object_at(a) = Smi::FromInt(0);
1730  }
1731 
1732  return NULL;
1733 }
static bool FixTryCatchHandler(StackFrame *top_frame, StackFrame *bottom_frame)
Definition: liveedit.cc:1548
void MemMove(void *dest, const void *src, size_t size)
Definition: utils.h:353
static Object ** SetUpFrameDropperFrame(StackFrame *bottom_js_frame, Handle< Code > code)
Definition: liveedit.cc:1580

References v8::internal::compiler::ARGUMENTS_ADAPTOR, v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::LiveEdit::CURRENTLY_SET_MODE, DCHECK, FixTryCatchHandler(), v8::internal::LiveEdit::FRAME_DROPPED_IN_DEBUG_SLOT_CALL, v8::internal::LiveEdit::FRAME_DROPPED_IN_DIRECT_CALL, v8::internal::LiveEdit::FRAME_DROPPED_IN_IC_CALL, v8::internal::LiveEdit::FRAME_DROPPED_IN_RETURN_CALL, v8::internal::Smi::FromInt(), v8::internal::Code::is_debug_stub(), v8::internal::Code::is_inline_cache_stub(), v8::internal::LiveEdit::kFrameDropperFrameSize, v8::internal::LiveEdit::kFrameDropperSupported, v8::internal::LiveEdit::kFramePaddingValue, v8::internal::Code::kind(), kPointerSize, MemMove(), mode(), NULL, v8::internal::Memory::Object_at(), SetUpFrameDropperFrame(), STATIC_ASSERT(), and STUB.

Referenced by DropActivationsInActiveThreadImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DtoaToBignumDtoaMode()

static BignumDtoaMode v8::internal::DtoaToBignumDtoaMode ( DtoaMode  dtoa_mode)
static

Definition at line 21 of file dtoa.cc.

21  {
22  switch (dtoa_mode) {
24  case DTOA_FIXED: return BIGNUM_DTOA_FIXED;
26  default:
27  UNREACHABLE();
28  return BIGNUM_DTOA_SHORTEST; // To silence compiler.
29  }
30 }

References BIGNUM_DTOA_FIXED, BIGNUM_DTOA_PRECISION, BIGNUM_DTOA_SHORTEST, DTOA_FIXED, DTOA_PRECISION, DTOA_SHORTEST, and UNREACHABLE.

Referenced by DoubleToAscii().

+ Here is the caller graph for this function:

◆ EffectiveAge()

static Code::Age v8::internal::EffectiveAge ( Code::Age  age)
static

Definition at line 10463 of file objects.cc.

10463  {
10464  if (age == Code::kNotExecutedCodeAge) {
10465  // Treat that's never been executed as old immediately.
10466  age = Code::kIsOldCodeAge;
10467  } else if (age == Code::kExecutedOnceCodeAge) {
10468  // Pre-age code that has only been executed once.
10469  age = Code::kPreAgedCodeAge;
10470  }
10471  return age;
10472 }

References v8::internal::Code::kExecutedOnceCodeAge, v8::internal::Code::kIsOldCodeAge, v8::internal::Code::kNotExecutedCodeAge, and v8::internal::Code::kPreAgedCodeAge.

Referenced by v8::internal::Code::GetAge(), and v8::internal::Code::MakeOlder().

+ Here is the caller graph for this function:

◆ ElementsKindForArray()

static ElementsKind v8::internal::ElementsKindForArray ( FixedArrayBase array)
inlinestatic

Definition at line 1039 of file elements.cc.

1039  {
1040  switch (array->map()->instance_type()) {
1041  case FIXED_ARRAY_TYPE:
1042  if (array->IsDictionary()) {
1043  return DICTIONARY_ELEMENTS;
1044  } else {
1045  return FAST_HOLEY_ELEMENTS;
1046  }
1049 
1050 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
1051  case EXTERNAL_##TYPE##_ARRAY_TYPE: \
1052  return EXTERNAL_##TYPE##_ELEMENTS; \
1053  case FIXED_##TYPE##_ARRAY_TYPE: \
1054  return TYPE##_ELEMENTS;
1055 
1057 #undef TYPED_ARRAY_CASE
1058 
1059  default:
1060  UNREACHABLE();
1061  }
1062  return FAST_HOLEY_ELEMENTS;
1063 }
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References DICTIONARY_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FIXED_ARRAY_TYPE, FIXED_DOUBLE_ARRAY_TYPE, v8::internal::Map::instance_type(), v8::internal::HeapObject::map(), TYPED_ARRAY_CASE, TYPED_ARRAYS, and UNREACHABLE.

Referenced by v8::internal::FastSmiOrObjectElementsAccessor< FastElementsAccessorSubclass, KindTraits >::CopyElementsImpl(), and v8::internal::ElementsAccessor::ForArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ElementsKindToShiftSize()

int v8::internal::ElementsKindToShiftSize ( ElementsKind  elements_kind)

Definition at line 16 of file elements-kind.cc.

16  {
17  switch (elements_kind) {
21  case UINT8_ELEMENTS:
22  case INT8_ELEMENTS:
24  return 0;
27  case UINT16_ELEMENTS:
28  case INT16_ELEMENTS:
29  return 1;
33  case UINT32_ELEMENTS:
34  case INT32_ELEMENTS:
35  case FLOAT32_ELEMENTS:
36  return 2;
40  case FLOAT64_ELEMENTS:
41  return 3;
42  case FAST_SMI_ELEMENTS:
43  case FAST_ELEMENTS:
48  return kPointerSizeLog2;
49  }
50  UNREACHABLE();
51  return 0;
52 }
const int kPointerSizeLog2
Definition: globals.h:147

References DICTIONARY_ELEMENTS, EXTERNAL_FLOAT32_ELEMENTS, EXTERNAL_FLOAT64_ELEMENTS, EXTERNAL_INT16_ELEMENTS, EXTERNAL_INT32_ELEMENTS, EXTERNAL_INT8_ELEMENTS, EXTERNAL_UINT16_ELEMENTS, EXTERNAL_UINT32_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, FLOAT32_ELEMENTS, FLOAT64_ELEMENTS, INT16_ELEMENTS, INT32_ELEMENTS, INT8_ELEMENTS, kPointerSizeLog2, SLOPPY_ARGUMENTS_ELEMENTS, UINT16_ELEMENTS, UINT32_ELEMENTS, UINT8_CLAMPED_ELEMENTS, UINT8_ELEMENTS, and UNREACHABLE.

Referenced by v8::internal::HGraphBuilder::BuildGrowElementsCapacity(), DehoistArrayIndex(), v8::internal::LCodeGen::DoLoadKeyedExternalArray(), v8::internal::LCodeGen::DoLoadKeyedFixedDoubleArray(), v8::internal::LCodeGen::DoStoreKeyedExternalArray(), v8::internal::LCodeGen::DoStoreKeyedFixedDoubleArray(), v8::internal::LCodeGen::PrepareKeyedArrayOperand(), and v8::internal::LCodeGen::PrepareKeyedExternalArrayOperand().

+ Here is the caller graph for this function:

◆ ElementsKindToString()

const char * v8::internal::ElementsKindToString ( ElementsKind  kind)

Definition at line 62 of file elements-kind.cc.

62  {
63  ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
64  return accessor->name();
65 }

References v8::internal::ElementsAccessor::ForKind(), and v8::internal::ElementsAccessor::name().

Referenced by v8::internal::ArrayConstructorStubBase::BasePrintName(), v8::internal::AllocationSite::DigestTransitionFeedback(), and v8::internal::JSObject::PrintElementsTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitAtomLetter()

static bool v8::internal::EmitAtomLetter ( Isolate isolate,
RegExpCompiler compiler,
uc16  c,
Label *  on_failure,
int  cp_offset,
bool  check,
bool  preloaded 
)
inlinestatic

Definition at line 1717 of file jsregexp.cc.

1723  {
1724  RegExpMacroAssembler* macro_assembler = compiler->macro_assembler();
1725  bool one_byte = compiler->one_byte();
1727  int length = GetCaseIndependentLetters(isolate, c, one_byte, chars);
1728  if (length <= 1) return false;
1729  // We may not need to check against the end of the input string
1730  // if this character lies before a character that matched.
1731  if (!preloaded) {
1732  macro_assembler->LoadCurrentCharacter(cp_offset, on_failure, check);
1733  }
1734  Label ok;
1736  switch (length) {
1737  case 2: {
1738  if (ShortCutEmitCharacterPair(macro_assembler, one_byte, chars[0],
1739  chars[1], on_failure)) {
1740  } else {
1741  macro_assembler->CheckCharacter(chars[0], &ok);
1742  macro_assembler->CheckNotCharacter(chars[1], on_failure);
1743  macro_assembler->Bind(&ok);
1744  }
1745  break;
1746  }
1747  case 4:
1748  macro_assembler->CheckCharacter(chars[3], &ok);
1749  // Fall through!
1750  case 3:
1751  macro_assembler->CheckCharacter(chars[0], &ok);
1752  macro_assembler->CheckCharacter(chars[1], &ok);
1753  macro_assembler->CheckNotCharacter(chars[2], on_failure);
1754  macro_assembler->Bind(&ok);
1755  break;
1756  default:
1757  UNREACHABLE();
1758  break;
1759  }
1760  return true;
1761 }
static int GetCaseIndependentLetters(Isolate *isolate, uc16 character, bool one_byte_subject, unibrow::uchar *letters)
Definition: jsregexp.cc:1590
static bool ShortCutEmitCharacterPair(RegExpMacroAssembler *macro_assembler, bool one_byte, uc16 c1, uc16 c2, Label *on_failure)
Definition: jsregexp.cc:1670
static const int kMaxWidth
Definition: unicode.h:245

References v8::internal::RegExpMacroAssembler::Bind(), v8::internal::RegExpMacroAssembler::CheckCharacter(), v8::internal::RegExpMacroAssembler::CheckNotCharacter(), v8::internal::Trace::cp_offset(), DCHECK, GetCaseIndependentLetters(), unibrow::Ecma262UnCanonicalize::kMaxWidth, v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), v8::internal::RegExpCompiler::macro_assembler(), v8::internal::RegExpCompiler::one_byte(), ShortCutEmitCharacterPair(), and UNREACHABLE.

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitAtomNonLetter()

static bool v8::internal::EmitAtomNonLetter ( Isolate isolate,
RegExpCompiler compiler,
uc16  c,
Label *  on_failure,
int  cp_offset,
bool  check,
bool  preloaded 
)
inlinestatic

Definition at line 1636 of file jsregexp.cc.

1642  {
1643  RegExpMacroAssembler* macro_assembler = compiler->macro_assembler();
1644  bool one_byte = compiler->one_byte();
1646  int length = GetCaseIndependentLetters(isolate, c, one_byte, chars);
1647  if (length < 1) {
1648  // This can't match. Must be an one-byte subject and a non-one-byte
1649  // character. We do not need to do anything since the one-byte pass
1650  // already handled this.
1651  return false; // Bounds not checked.
1652  }
1653  bool checked = false;
1654  // We handle the length > 1 case in a later pass.
1655  if (length == 1) {
1656  if (one_byte && c > String::kMaxOneByteCharCodeU) {
1657  // Can't match - see above.
1658  return false; // Bounds not checked.
1659  }
1660  if (!preloaded) {
1661  macro_assembler->LoadCurrentCharacter(cp_offset, on_failure, check);
1662  checked = check;
1663  }
1664  macro_assembler->CheckNotCharacter(c, on_failure);
1665  }
1666  return checked;
1667 }

References v8::internal::RegExpMacroAssembler::CheckNotCharacter(), v8::internal::Trace::cp_offset(), GetCaseIndependentLetters(), v8::internal::String::kMaxOneByteCharCodeU, unibrow::Ecma262UnCanonicalize::kMaxWidth, v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), v8::internal::RegExpCompiler::macro_assembler(), and v8::internal::RegExpCompiler::one_byte().

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitBoundaryTest()

static void v8::internal::EmitBoundaryTest ( RegExpMacroAssembler masm,
int  border,
Label *  fall_through,
Label *  above_or_equal,
Label *  below 
)
static

Definition at line 1764 of file jsregexp.cc.

1768  {
1769  if (below != fall_through) {
1770  masm->CheckCharacterLT(border, below);
1771  if (above_or_equal != fall_through) masm->GoTo(above_or_equal);
1772  } else {
1773  masm->CheckCharacterGT(border - 1, above_or_equal);
1774  }
1775 }

References below, v8::internal::RegExpMacroAssembler::CheckCharacterGT(), v8::internal::RegExpMacroAssembler::CheckCharacterLT(), and v8::internal::RegExpMacroAssembler::GoTo().

Referenced by GenerateBranches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitCharClass()

static void v8::internal::EmitCharClass ( RegExpMacroAssembler macro_assembler,
RegExpCharacterClass *  cc,
bool  one_byte,
Label *  on_failure,
int  cp_offset,
bool  check_offset,
bool  preloaded,
Zone zone 
)
static

Definition at line 2115 of file jsregexp.cc.

2118  {
2119  ZoneList<CharacterRange>* ranges = cc->ranges(zone);
2120  if (!CharacterRange::IsCanonical(ranges)) {
2122  }
2123 
2124  int max_char;
2125  if (one_byte) {
2126  max_char = String::kMaxOneByteCharCode;
2127  } else {
2128  max_char = String::kMaxUtf16CodeUnit;
2129  }
2130 
2131  int range_count = ranges->length();
2132 
2133  int last_valid_range = range_count - 1;
2134  while (last_valid_range >= 0) {
2135  CharacterRange& range = ranges->at(last_valid_range);
2136  if (range.from() <= max_char) {
2137  break;
2138  }
2139  last_valid_range--;
2140  }
2141 
2142  if (last_valid_range < 0) {
2143  if (!cc->is_negated()) {
2144  macro_assembler->GoTo(on_failure);
2145  }
2146  if (check_offset) {
2147  macro_assembler->CheckPosition(cp_offset, on_failure);
2148  }
2149  return;
2150  }
2151 
2152  if (last_valid_range == 0 &&
2153  ranges->at(0).IsEverything(max_char)) {
2154  if (cc->is_negated()) {
2155  macro_assembler->GoTo(on_failure);
2156  } else {
2157  // This is a common case hit by non-anchored expressions.
2158  if (check_offset) {
2159  macro_assembler->CheckPosition(cp_offset, on_failure);
2160  }
2161  }
2162  return;
2163  }
2164  if (last_valid_range == 0 &&
2165  !cc->is_negated() &&
2166  ranges->at(0).IsEverything(max_char)) {
2167  // This is a common case hit by non-anchored expressions.
2168  if (check_offset) {
2169  macro_assembler->CheckPosition(cp_offset, on_failure);
2170  }
2171  return;
2172  }
2173 
2174  if (!preloaded) {
2175  macro_assembler->LoadCurrentCharacter(cp_offset, on_failure, check_offset);
2176  }
2177 
2178  if (cc->is_standard(zone) &&
2179  macro_assembler->CheckSpecialCharacterClass(cc->standard_type(),
2180  on_failure)) {
2181  return;
2182  }
2183 
2184 
2185  // A new list with ascending entries. Each entry is a code unit
2186  // where there is a boundary between code units that are part of
2187  // the class and code units that are not. Normally we insert an
2188  // entry at zero which goes to the failure label, but if there
2189  // was already one there we fall through for success on that entry.
2190  // Subsequent entries have alternating meaning (success/failure).
2191  ZoneList<int>* range_boundaries =
2192  new(zone) ZoneList<int>(last_valid_range, zone);
2193 
2194  bool zeroth_entry_is_failure = !cc->is_negated();
2195 
2196  for (int i = 0; i <= last_valid_range; i++) {
2197  CharacterRange& range = ranges->at(i);
2198  if (range.from() == 0) {
2199  DCHECK_EQ(i, 0);
2200  zeroth_entry_is_failure = !zeroth_entry_is_failure;
2201  } else {
2202  range_boundaries->Add(range.from(), zone);
2203  }
2204  range_boundaries->Add(range.to() + 1, zone);
2205  }
2206  int end_index = range_boundaries->length() - 1;
2207  if (range_boundaries->at(end_index) > max_char) {
2208  end_index--;
2209  }
2210 
2211  Label fall_through;
2212  GenerateBranches(macro_assembler,
2213  range_boundaries,
2214  0, // start_index.
2215  end_index,
2216  0, // min_char.
2217  max_char,
2218  &fall_through,
2219  zeroth_entry_is_failure ? &fall_through : on_failure,
2220  zeroth_entry_is_failure ? on_failure : &fall_through);
2221  macro_assembler->Bind(&fall_through);
2222 }
static void GenerateBranches(RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, uc16 min_char, uc16 max_char, Label *fall_through, Label *even_label, Label *odd_label)
Definition: jsregexp.cc:1963
unibrow::Mapping< unibrow::Ecma262Canonicalize > Canonicalize

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), v8::internal::RegExpMacroAssembler::Bind(), v8::internal::CharacterRange::Canonicalize(), cc, v8::internal::RegExpMacroAssembler::CheckPosition(), v8::internal::RegExpMacroAssembler::CheckSpecialCharacterClass(), v8::internal::Trace::cp_offset(), DCHECK_EQ, v8::internal::CharacterRange::from(), GenerateBranches(), v8::internal::RegExpMacroAssembler::GoTo(), v8::internal::CharacterRange::IsCanonical(), v8::internal::String::kMaxOneByteCharCode, v8::internal::String::kMaxUtf16CodeUnit, v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), and v8::internal::CharacterRange::to().

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitDoubleBoundaryTest()

static void v8::internal::EmitDoubleBoundaryTest ( RegExpMacroAssembler masm,
int  first,
int  last,
Label *  fall_through,
Label *  in_range,
Label *  out_of_range 
)
static

Definition at line 1778 of file jsregexp.cc.

1783  {
1784  if (in_range == fall_through) {
1785  if (first == last) {
1786  masm->CheckNotCharacter(first, out_of_range);
1787  } else {
1788  masm->CheckCharacterNotInRange(first, last, out_of_range);
1789  }
1790  } else {
1791  if (first == last) {
1792  masm->CheckCharacter(first, in_range);
1793  } else {
1794  masm->CheckCharacterInRange(first, last, in_range);
1795  }
1796  if (out_of_range != fall_through) masm->GoTo(out_of_range);
1797  }
1798 }

References v8::internal::RegExpMacroAssembler::CheckCharacter(), v8::internal::RegExpMacroAssembler::CheckCharacterInRange(), v8::internal::RegExpMacroAssembler::CheckCharacterNotInRange(), v8::internal::RegExpMacroAssembler::CheckNotCharacter(), and v8::internal::RegExpMacroAssembler::GoTo().

Referenced by CutOutRange(), and GenerateBranches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitHat()

static void v8::internal::EmitHat ( RegExpCompiler compiler,
RegExpNode on_success,
Trace trace 
)
static

Definition at line 3012 of file jsregexp.cc.

3014  {
3015  RegExpMacroAssembler* assembler = compiler->macro_assembler();
3016  // We will be loading the previous character into the current character
3017  // register.
3018  Trace new_trace(*trace);
3019  new_trace.InvalidateCurrentCharacter();
3020 
3021  Label ok;
3022  if (new_trace.cp_offset() == 0) {
3023  // The start of input counts as a newline in this context, so skip to
3024  // ok if we are at the start.
3025  assembler->CheckAtStart(&ok);
3026  }
3027  // We already checked that we are not at the start of input so it must be
3028  // OK to load the previous character.
3029  assembler->LoadCurrentCharacter(new_trace.cp_offset() -1,
3030  new_trace.backtrack(),
3031  false);
3032  if (!assembler->CheckSpecialCharacterClass('n',
3033  new_trace.backtrack())) {
3034  // Newline means \n, \r, 0x2028 or 0x2029.
3035  if (!compiler->one_byte()) {
3036  assembler->CheckCharacterAfterAnd(0x2028, 0xfffe, &ok);
3037  }
3038  assembler->CheckCharacter('\n', &ok);
3039  assembler->CheckNotCharacter('\r', new_trace.backtrack());
3040  }
3041  assembler->Bind(&ok);
3042  on_success->Emit(compiler, &new_trace);
3043 }
static void Trace(const char *msg,...)
Definition: scheduler.cc:21

References v8::internal::Trace::backtrack(), v8::internal::RegExpMacroAssembler::Bind(), v8::internal::RegExpMacroAssembler::CheckAtStart(), v8::internal::RegExpMacroAssembler::CheckCharacter(), v8::internal::RegExpMacroAssembler::CheckCharacterAfterAnd(), v8::internal::RegExpMacroAssembler::CheckNotCharacter(), v8::internal::RegExpMacroAssembler::CheckSpecialCharacterClass(), v8::internal::Trace::cp_offset(), v8::internal::RegExpNode::Emit(), v8::internal::Trace::InvalidateCurrentCharacter(), v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), v8::internal::RegExpCompiler::macro_assembler(), and v8::internal::RegExpCompiler::one_byte().

Referenced by v8::internal::AssertionNode::Emit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitSimpleCharacter()

static bool v8::internal::EmitSimpleCharacter ( Isolate isolate,
RegExpCompiler compiler,
uc16  c,
Label *  on_failure,
int  cp_offset,
bool  check,
bool  preloaded 
)
inlinestatic

Definition at line 1613 of file jsregexp.cc.

1619  {
1620  RegExpMacroAssembler* assembler = compiler->macro_assembler();
1621  bool bound_checked = false;
1622  if (!preloaded) {
1623  assembler->LoadCurrentCharacter(
1624  cp_offset,
1625  on_failure,
1626  check);
1627  bound_checked = true;
1628  }
1629  assembler->CheckNotCharacter(c, on_failure);
1630  return bound_checked;
1631 }

References v8::internal::RegExpMacroAssembler::CheckNotCharacter(), v8::internal::Trace::cp_offset(), v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), and v8::internal::RegExpCompiler::macro_assembler().

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitUseLookupTable()

static void v8::internal::EmitUseLookupTable ( RegExpMacroAssembler masm,
ZoneList< int > *  ranges,
int  start_index,
int  end_index,
int  min_char,
Label *  fall_through,
Label *  even_label,
Label *  odd_label 
)
static

Definition at line 1803 of file jsregexp.cc.

1811  {
1812  static const int kSize = RegExpMacroAssembler::kTableSize;
1813  static const int kMask = RegExpMacroAssembler::kTableMask;
1814 
1815  int base = (min_char & ~kMask);
1816  USE(base);
1817 
1818  // Assert that everything is on one kTableSize page.
1819  for (int i = start_index; i <= end_index; i++) {
1820  DCHECK_EQ(ranges->at(i) & ~kMask, base);
1821  }
1822  DCHECK(start_index == 0 || (ranges->at(start_index - 1) & ~kMask) <= base);
1823 
1824  char templ[kSize];
1825  Label* on_bit_set;
1826  Label* on_bit_clear;
1827  int bit;
1828  if (even_label == fall_through) {
1829  on_bit_set = odd_label;
1830  on_bit_clear = even_label;
1831  bit = 1;
1832  } else {
1833  on_bit_set = even_label;
1834  on_bit_clear = odd_label;
1835  bit = 0;
1836  }
1837  for (int i = 0; i < (ranges->at(start_index) & kMask) && i < kSize; i++) {
1838  templ[i] = bit;
1839  }
1840  int j = 0;
1841  bit ^= 1;
1842  for (int i = start_index; i < end_index; i++) {
1843  for (j = (ranges->at(i) & kMask); j < (ranges->at(i + 1) & kMask); j++) {
1844  templ[j] = bit;
1845  }
1846  bit ^= 1;
1847  }
1848  for (int i = j; i < kSize; i++) {
1849  templ[i] = bit;
1850  }
1851  Factory* factory = masm->zone()->isolate()->factory();
1852  // TODO(erikcorry): Cache these.
1853  Handle<ByteArray> ba = factory->NewByteArray(kSize, TENURED);
1854  for (int i = 0; i < kSize; i++) {
1855  ba->set(i, templ[i]);
1856  }
1857  masm->CheckBitInTable(ba, on_bit_set);
1858  if (on_bit_clear != fall_through) masm->GoTo(on_bit_clear);
1859 }

References v8::internal::List< T, AllocationPolicy >::at(), v8::internal::RegExpMacroAssembler::CheckBitInTable(), DCHECK, DCHECK_EQ, v8::internal::Isolate::factory(), v8::internal::RegExpMacroAssembler::GoTo(), v8::internal::Zone::isolate(), v8::internal::RegExpMacroAssembler::kTableMask, v8::internal::RegExpMacroAssembler::kTableSize, TENURED, USE(), and v8::internal::RegExpMacroAssembler::zone().

Referenced by GenerateBranches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EmitWordCheck()

static void v8::internal::EmitWordCheck ( RegExpMacroAssembler assembler,
Label *  word,
Label *  non_word,
bool  fall_through_on_word 
)
static

Definition at line 2986 of file jsregexp.cc.

2989  {
2990  if (assembler->CheckSpecialCharacterClass(
2991  fall_through_on_word ? 'w' : 'W',
2992  fall_through_on_word ? non_word : word)) {
2993  // Optimized implementation available.
2994  return;
2995  }
2996  assembler->CheckCharacterGT('z', non_word);
2997  assembler->CheckCharacterLT('0', non_word);
2998  assembler->CheckCharacterGT('a' - 1, word);
2999  assembler->CheckCharacterLT('9' + 1, word);
3000  assembler->CheckCharacterLT('A', non_word);
3001  assembler->CheckCharacterLT('Z' + 1, word);
3002  if (fall_through_on_word) {
3003  assembler->CheckNotCharacter('_', non_word);
3004  } else {
3005  assembler->CheckCharacter('_', word);
3006  }
3007 }

References v8::internal::RegExpMacroAssembler::CheckCharacter(), v8::internal::RegExpMacroAssembler::CheckCharacterGT(), v8::internal::RegExpMacroAssembler::CheckCharacterLT(), v8::internal::RegExpMacroAssembler::CheckNotCharacter(), and v8::internal::RegExpMacroAssembler::CheckSpecialCharacterClass().

Referenced by v8::internal::AssertionNode::BacktrackIfPrevious(), and v8::internal::AssertionNode::EmitBoundaryCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EncodeConstantPoolLength()

int v8::internal::EncodeConstantPoolLength ( int  length)
inline

Definition at line 21 of file constants-arm.h.

21  {
22  DCHECK((length & kConstantPoolLengthMaxMask) == length);
23  return ((length & 0xfff0) << 4) | (length & 0xf);
24 }
const int kConstantPoolLengthMaxMask
Definition: constants-arm.h:20

References DCHECK, and kConstantPoolLengthMaxMask.

◆ EncodeExternal()

static uint32_t v8::internal::EncodeExternal ( TypeCode  type,
uint16_t  id 
)
static

Definition at line 35 of file serialize.cc.

35  {
36  return static_cast<uint32_t>(type) << 16 | id;
37 }

Referenced by v8::internal::ExternalReferenceTable::Add().

+ Here is the caller graph for this function:

◆ endl()

OStream & v8::internal::endl ( OStream os)

Definition at line 112 of file ostreams.cc.

112  { // NOLINT(runtime/references)
113  return flush(os.put('\n'));
114 }
OStream & flush(OStream &os)
Definition: ostreams.cc:107

References flush(), and v8::internal::OStream::put().

Referenced by DoGenerateCode(), v8::internal::compiler::Pipeline::GenerateCode(), v8::internal::Deoptimizer::GetOutputInfo(), v8::internal::HDeadCodeEliminationPhase::PrintLive(), RUNTIME_FUNCTION(), v8::internal::HydrogenCodeStub::TraceTransition(), and v8::internal::BinaryOpIC::Transition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EndPerformSplice()

static void v8::internal::EndPerformSplice ( Handle< JSArray object)
static

Definition at line 11154 of file objects.cc.

11154  {
11155  Isolate* isolate = object->GetIsolate();
11156  HandleScope scope(isolate);
11157  Handle<Object> args[] = { object };
11158 
11159  Execution::Call(isolate,
11160  Handle<JSFunction>(isolate->observers_end_perform_splice()),
11161  isolate->factory()->undefined_value(),
11162  arraysize(args),
11163  args).Assert();
11164 }

References arraysize, and v8::internal::Isolate::factory().

Referenced by v8::internal::JSObject::SetElement(), and v8::internal::JSArray::SetElementsLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnqueueSpliceRecord()

static void v8::internal::EnqueueSpliceRecord ( Handle< JSArray object,
uint32_t  index,
Handle< JSArray deleted,
uint32_t  add_count 
)
static

Definition at line 11120 of file objects.cc.

11123  {
11124  Isolate* isolate = object->GetIsolate();
11125  HandleScope scope(isolate);
11126  Handle<Object> index_object = isolate->factory()->NewNumberFromUint(index);
11127  Handle<Object> add_count_object =
11128  isolate->factory()->NewNumberFromUint(add_count);
11129 
11130  Handle<Object> args[] =
11131  { object, index_object, deleted, add_count_object };
11132 
11133  Execution::Call(isolate,
11134  Handle<JSFunction>(isolate->observers_enqueue_splice()),
11135  isolate->factory()->undefined_value(),
11136  arraysize(args),
11137  args).Assert();
11138 }

References arraysize, and v8::internal::Isolate::factory().

Referenced by v8::internal::JSObject::SetElement(), and v8::internal::JSArray::SetElementsLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureDoubleAligned()

static HeapObject* v8::internal::EnsureDoubleAligned ( Heap heap,
HeapObject object,
int  size 
)
static

Definition at line 1799 of file heap.cc.

1800  {
1801  if ((OffsetFrom(object->address()) & kDoubleAlignmentMask) != 0) {
1802  heap->CreateFillerObjectAt(object->address(), kPointerSize);
1803  return HeapObject::FromAddress(object->address() + kPointerSize);
1804  } else {
1805  heap->CreateFillerObjectAt(object->address() + size - kPointerSize,
1806  kPointerSize);
1807  return object;
1808  }
1809 }
intptr_t OffsetFrom(T x)
Definition: macros.h:383
const intptr_t kDoubleAlignmentMask
Definition: globals.h:235

References v8::internal::HeapObject::address(), v8::internal::Heap::CreateFillerObjectAt(), v8::internal::HeapObject::FromAddress(), kDoubleAlignmentMask, kPointerSize, OffsetFrom(), and size.

Referenced by v8::internal::Heap::AllocateConstantPoolArray(), v8::internal::Heap::AllocateExtendedConstantPoolArray(), v8::internal::Heap::AllocateFixedTypedArray(), v8::internal::Heap::AllocateRawFixedDoubleArray(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::PromoteObject(), and v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::SemiSpaceCopyObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureFunctionHasDebugBreakSlots()

static void v8::internal::EnsureFunctionHasDebugBreakSlots ( Handle< JSFunction function)
static

Definition at line 1874 of file debug.cc.

1874  {
1875  if (function->code()->kind() == Code::FUNCTION &&
1876  function->code()->has_debug_break_slots()) {
1877  // Nothing to do. Function code already had debug break slots.
1878  return;
1879  }
1880  // Make sure that the shared full code is compiled with debug
1881  // break slots.
1882  if (!function->shared()->code()->has_debug_break_slots()) {
1883  MaybeHandle<Code> code = Compiler::GetDebugCode(function);
1884  // Recompilation can fail. In that case leave the code as it was.
1885  if (!code.is_null()) function->ReplaceCode(*code.ToHandleChecked());
1886  } else {
1887  // Simply use shared code if it has debug break slots.
1888  function->ReplaceCode(function->shared()->code());
1889  }
1890 }

References v8::internal::Compiler::GetDebugCode(), and v8::internal::MaybeHandle< T >::is_null().

Referenced by v8::internal::Debug::PrepareForBreakPoints(), and RecompileAndRelocateSuspendedGenerators().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureHasTransitionArray()

static void v8::internal::EnsureHasTransitionArray ( Handle< Map map)
static

Definition at line 5088 of file objects-inl.h.

5088  {
5089  Handle<TransitionArray> transitions;
5090  if (!map->HasTransitionArray()) {
5091  transitions = TransitionArray::Allocate(map->GetIsolate(), 0);
5092  transitions->set_back_pointer_storage(map->GetBackPointer());
5093  } else if (!map->transitions()->IsFullTransitionArray()) {
5094  transitions = TransitionArray::ExtendToFullTransitionArray(map);
5095  } else {
5096  return;
5097  }
5098  map->set_transitions(*transitions);
5099 }

References v8::internal::TransitionArray::Allocate(), v8::internal::TransitionArray::ExtendToFullTransitionArray(), and map.

Referenced by v8::internal::Map::SetPrototypeTransitions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureJSArrayWithWritableFastElements()

static MUST_USE_RESULT MaybeHandle<FixedArrayBase> v8::internal::EnsureJSArrayWithWritableFastElements ( Isolate isolate,
Handle< Object receiver,
Arguments args,
int  first_added_arg 
)
inlinestatic

Definition at line 207 of file builtins.cc.

211  {
212  if (!receiver->IsJSArray()) return MaybeHandle<FixedArrayBase>();
213  Handle<JSArray> array = Handle<JSArray>::cast(receiver);
214  // If there may be elements accessors in the prototype chain, the fast path
215  // cannot be used if there arguments to add to the array.
216  if (args != NULL && array->map()->DictionaryElementsInPrototypeChainOnly()) {
217  return MaybeHandle<FixedArrayBase>();
218  }
219  if (array->map()->is_observed()) return MaybeHandle<FixedArrayBase>();
220  if (!array->map()->is_extensible()) return MaybeHandle<FixedArrayBase>();
221  Handle<FixedArrayBase> elms(array->elements(), isolate);
222  Heap* heap = isolate->heap();
223  Map* map = elms->map();
224  if (map == heap->fixed_array_map()) {
225  if (args == NULL || array->HasFastObjectElements()) return elms;
226  } else if (map == heap->fixed_cow_array_map()) {
227  elms = JSObject::EnsureWritableFastElements(array);
228  if (args == NULL || array->HasFastObjectElements()) return elms;
229  } else if (map == heap->fixed_double_array_map()) {
230  if (args == NULL) return elms;
231  } else {
232  return MaybeHandle<FixedArrayBase>();
233  }
234 
235  // Need to ensure that the arguments passed in args can be contained in
236  // the array.
237  int args_length = args->length();
238  if (first_added_arg >= args_length) return handle(array->elements(), isolate);
239 
240  ElementsKind origin_kind = array->map()->elements_kind();
241  DCHECK(!IsFastObjectElementsKind(origin_kind));
242  ElementsKind target_kind = origin_kind;
243  {
245  int arg_count = args->length() - first_added_arg;
246  Object** arguments = args->arguments() - first_added_arg - (arg_count - 1);
247  for (int i = 0; i < arg_count; i++) {
248  Object* arg = arguments[i];
249  if (arg->IsHeapObject()) {
250  if (arg->IsHeapNumber()) {
251  target_kind = FAST_DOUBLE_ELEMENTS;
252  } else {
253  target_kind = FAST_ELEMENTS;
254  break;
255  }
256  }
257  }
258  }
259  if (target_kind != origin_kind) {
260  JSObject::TransitionElementsKind(array, target_kind);
261  return handle(array->elements(), isolate);
262  }
263  return elms;
264 }

References v8::internal::Handle< T >::cast(), DCHECK, v8::internal::JSObject::EnsureWritableFastElements(), FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, handle(), v8::internal::Isolate::heap(), IsFastObjectElementsKind(), map, NULL, and v8::internal::JSObject::TransitionElementsKind().

Referenced by BUILTIN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnumerateCompiledFunctions()

static int v8::internal::EnumerateCompiledFunctions ( Heap heap,
Handle< SharedFunctionInfo > *  sfis,
Handle< Code > *  code_objects 
)
static

Definition at line 1592 of file log.cc.

1594  {
1595  HeapIterator iterator(heap);
1596  DisallowHeapAllocation no_gc;
1597  int compiled_funcs_count = 0;
1598 
1599  // Iterate the heap to find shared function info objects and record
1600  // the unoptimized code for them.
1601  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1602  if (!obj->IsSharedFunctionInfo()) continue;
1603  SharedFunctionInfo* sfi = SharedFunctionInfo::cast(obj);
1604  if (sfi->is_compiled()
1605  && (!sfi->script()->IsScript()
1606  || Script::cast(sfi->script())->HasValidSource())) {
1607  if (sfis != NULL) {
1608  sfis[compiled_funcs_count] = Handle<SharedFunctionInfo>(sfi);
1609  }
1610  if (code_objects != NULL) {
1611  code_objects[compiled_funcs_count] = Handle<Code>(sfi->code());
1612  }
1613  ++compiled_funcs_count;
1614  }
1615  }
1616 
1617  // Iterate all optimized functions in all contexts.
1618  EnumerateOptimizedFunctionsVisitor visitor(sfis,
1619  code_objects,
1620  &compiled_funcs_count);
1621  Deoptimizer::VisitAllOptimizedFunctions(heap->isolate(), &visitor);
1622 
1623  return compiled_funcs_count;
1624 }

References v8::internal::SharedFunctionInfo::is_compiled(), v8::internal::Heap::isolate(), NULL, and v8::internal::Deoptimizer::VisitAllOptimizedFunctions().

Referenced by v8::internal::Logger::LogCompiledFunctions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EqualNames()

static bool v8::internal::EqualNames ( const char *  a,
const char *  b 
)
static

Definition at line 314 of file flags.cc.

314  {
315  for (int i = 0; NormalizeChar(a[i]) == NormalizeChar(b[i]); i++) {
316  if (a[i] == '\0') {
317  return true;
318  }
319  }
320  return false;
321 }
char NormalizeChar(char ch)
Definition: flags.cc:258

References NormalizeChar().

Referenced by FindFlag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EstimateElementCount()

static uint32_t v8::internal::EstimateElementCount ( Handle< JSArray array)
static

Definition at line 4722 of file runtime.cc.

4722  {
4723  uint32_t length = static_cast<uint32_t>(array->length()->Number());
4724  int element_count = 0;
4725  switch (array->GetElementsKind()) {
4726  case FAST_SMI_ELEMENTS:
4728  case FAST_ELEMENTS:
4729  case FAST_HOLEY_ELEMENTS: {
4730  // Fast elements can't have lengths that are not representable by
4731  // a 32-bit signed integer.
4732  DCHECK(static_cast<int32_t>(FixedArray::kMaxLength) >= 0);
4733  int fast_length = static_cast<int>(length);
4734  Handle<FixedArray> elements(FixedArray::cast(array->elements()));
4735  for (int i = 0; i < fast_length; i++) {
4736  if (!elements->get(i)->IsTheHole()) element_count++;
4737  }
4738  break;
4739  }
4740  case FAST_DOUBLE_ELEMENTS:
4742  // Fast elements can't have lengths that are not representable by
4743  // a 32-bit signed integer.
4744  DCHECK(static_cast<int32_t>(FixedDoubleArray::kMaxLength) >= 0);
4745  int fast_length = static_cast<int>(length);
4746  if (array->elements()->IsFixedArray()) {
4747  DCHECK(FixedArray::cast(array->elements())->length() == 0);
4748  break;
4749  }
4750  Handle<FixedDoubleArray> elements(
4751  FixedDoubleArray::cast(array->elements()));
4752  for (int i = 0; i < fast_length; i++) {
4753  if (!elements->is_the_hole(i)) element_count++;
4754  }
4755  break;
4756  }
4757  case DICTIONARY_ELEMENTS: {
4758  Handle<SeededNumberDictionary> dictionary(
4759  SeededNumberDictionary::cast(array->elements()));
4760  int capacity = dictionary->Capacity();
4761  for (int i = 0; i < capacity; i++) {
4762  Handle<Object> key(dictionary->KeyAt(i), array->GetIsolate());
4763  if (dictionary->IsKey(*key)) {
4764  element_count++;
4765  }
4766  }
4767  break;
4768  }
4770 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
4771  case EXTERNAL_##TYPE##_ELEMENTS: \
4772  case TYPE##_ELEMENTS:
4773 
4775 #undef TYPED_ARRAY_CASE
4776  // External arrays are always dense.
4777  return length;
4778  }
4779  // As an estimate, we assume that the prototype doesn't contain any
4780  // inherited elements.
4781  return element_count;
4782 }

References DCHECK, DICTIONARY_ELEMENTS, FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, v8::internal::FixedArray::kMaxLength, v8::internal::FixedDoubleArray::kMaxLength, SLOPPY_ARGUMENTS_ELEMENTS, TYPED_ARRAY_CASE, and TYPED_ARRAYS.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ EstimatePower()

static int v8::internal::EstimatePower ( int  exponent)
static

Definition at line 348 of file bignum-dtoa.cc.

348  {
349  // This function estimates log10 of v where v = f*2^e (with e == exponent).
350  // Note that 10^floor(log10(v)) <= v, but v <= 10^ceil(log10(v)).
351  // Note that f is bounded by its container size. Let p = 53 (the double's
352  // significand size). Then 2^(p-1) <= f < 2^p.
353  //
354  // Given that log10(v) == log2(v)/log2(10) and e+(len(f)-1) is quite close
355  // to log2(v) the function is simplified to (e+(len(f)-1)/log2(10)).
356  // The computed number undershoots by less than 0.631 (when we compute log3
357  // and not log10).
358  //
359  // Optimization: since we only need an approximated result this computation
360  // can be performed on 64 bit integers. On x86/x64 architecture the speedup is
361  // not really measurable, though.
362  //
363  // Since we want to avoid overshooting we decrement by 1e10 so that
364  // floating-point imprecisions don't affect us.
365  //
366  // Explanation for v's boundary m+: the computation takes advantage of
367  // the fact that 2^(p-1) <= f < 2^p. Boundaries still satisfy this requirement
368  // (even for denormals where the delta can be much more important).
369 
370  const double k1Log10 = 0.30102999566398114; // 1/lg(10)
371 
372  // For doubles len(f) == 53 (don't forget the hidden bit).
373  const int kSignificandSize = 53;
374  double estimate =
375  std::ceil((exponent + kSignificandSize - 1) * k1Log10 - 1e-10);
376  return static_cast<int>(estimate);
377 }

Referenced by BignumDtoa().

+ Here is the caller graph for this function:

◆ EvalComparison()

bool v8::internal::EvalComparison ( Token::Value  op,
double  op1,
double  op2 
)

Definition at line 1488 of file assembler.cc.

1488  {
1489  DCHECK(Token::IsCompareOp(op));
1490  switch (op) {
1491  case Token::EQ:
1492  case Token::EQ_STRICT: return (op1 == op2);
1493  case Token::NE: return (op1 != op2);
1494  case Token::LT: return (op1 < op2);
1495  case Token::GT: return (op1 > op2);
1496  case Token::LTE: return (op1 <= op2);
1497  case Token::GTE: return (op1 >= op2);
1498  default:
1499  UNREACHABLE();
1500  return false;
1501  }
1502 }

References DCHECK, EQ, v8::internal::Token::IsCompareOp(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ ExternalArrayIntSetter()

template<typename ExternalArrayClass , typename ValueType >
static Handle<Object> v8::internal::ExternalArrayIntSetter ( Isolate isolate,
Handle< ExternalArrayClass >  receiver,
uint32_t  index,
Handle< Object value 
)
static

Definition at line 14447 of file objects.cc.

14451  {
14452  ValueType cast_value = 0;
14453  if (index < static_cast<uint32_t>(receiver->length())) {
14454  if (value->IsSmi()) {
14455  int int_value = Handle<Smi>::cast(value)->value();
14456  cast_value = static_cast<ValueType>(int_value);
14457  } else if (value->IsHeapNumber()) {
14458  double double_value = Handle<HeapNumber>::cast(value)->value();
14459  cast_value = static_cast<ValueType>(DoubleToInt32(double_value));
14460  } else {
14461  // Clamp undefined to zero (default). All other types have been
14462  // converted to a number type further up in the call chain.
14463  DCHECK(value->IsUndefined());
14464  }
14465  receiver->set(index, cast_value);
14466  }
14467  return isolate->factory()->NewNumberFromInt(cast_value);
14468 }

References v8::internal::Handle< T >::cast(), DCHECK, DoubleToInt32(), and v8::internal::Isolate::factory().

+ Here is the call graph for this function:

◆ ExternalArrayOpRequiresTemp() [1/3]

static bool v8::internal::ExternalArrayOpRequiresTemp ( Representation  key_representation,
ElementsKind  elements_kind 
)
inlinestatic

Definition at line 1697 of file lithium-ia32.h.

1699  {
1700  // Operations that require the key to be divided by two to be converted into
1701  // an index cannot fold the scale operation into a load and need an extra
1702  // temp register to do the work.
1703  return key_representation.IsSmi() &&
1704  (elements_kind == EXTERNAL_INT8_ELEMENTS ||
1705  elements_kind == EXTERNAL_UINT8_ELEMENTS ||
1706  elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
1707  elements_kind == UINT8_ELEMENTS ||
1708  elements_kind == INT8_ELEMENTS ||
1709  elements_kind == UINT8_CLAMPED_ELEMENTS);
1710 }

References EXTERNAL_INT8_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, INT8_ELEMENTS, v8::internal::Representation::IsSmi(), UINT8_CLAMPED_ELEMENTS, and UINT8_ELEMENTS.

+ Here is the call graph for this function:

◆ ExternalArrayOpRequiresTemp() [2/3]

static bool v8::internal::ExternalArrayOpRequiresTemp ( Representation  key_representation,
ElementsKind  elements_kind 
)
inlinestatic

Definition at line 1652 of file lithium-x64.h.

1654  {
1655  // Operations that require the key to be divided by two to be converted into
1656  // an index cannot fold the scale operation into a load and need an extra
1657  // temp register to do the work.
1658  return SmiValuesAre31Bits() && key_representation.IsSmi() &&
1659  (elements_kind == EXTERNAL_INT8_ELEMENTS ||
1660  elements_kind == EXTERNAL_UINT8_ELEMENTS ||
1661  elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
1662  elements_kind == UINT8_ELEMENTS ||
1663  elements_kind == INT8_ELEMENTS ||
1664  elements_kind == UINT8_CLAMPED_ELEMENTS);
1665 }
static bool SmiValuesAre31Bits()
Definition: v8.h:5807

References EXTERNAL_INT8_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, INT8_ELEMENTS, v8::internal::Representation::IsSmi(), SmiValuesAre31Bits(), UINT8_CLAMPED_ELEMENTS, and UINT8_ELEMENTS.

+ Here is the call graph for this function:

◆ ExternalArrayOpRequiresTemp() [3/3]

static bool v8::internal::ExternalArrayOpRequiresTemp ( Representation  key_representation,
ElementsKind  elements_kind 
)
inlinestatic

Definition at line 1707 of file lithium-x87.h.

1709  {
1710  // Operations that require the key to be divided by two to be converted into
1711  // an index cannot fold the scale operation into a load and need an extra
1712  // temp register to do the work.
1713  return key_representation.IsSmi() &&
1714  (elements_kind == EXTERNAL_INT8_ELEMENTS ||
1715  elements_kind == EXTERNAL_UINT8_ELEMENTS ||
1716  elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
1717  elements_kind == UINT8_ELEMENTS ||
1718  elements_kind == INT8_ELEMENTS ||
1719  elements_kind == UINT8_CLAMPED_ELEMENTS);
1720 }

References EXTERNAL_INT8_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, INT8_ELEMENTS, v8::internal::Representation::IsSmi(), UINT8_CLAMPED_ELEMENTS, and UINT8_ELEMENTS.

+ Here is the call graph for this function:

◆ fast_exp()

double v8::internal::fast_exp ( double  input)

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ fast_sqrt()

double v8::internal::fast_sqrt ( double  input)

Referenced by power_helper(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ FastAsciiConvert()

template<class Converter >
static bool v8::internal::FastAsciiConvert ( char *  dst,
const char *  src,
int  length,
bool changed_out 
)
static

Definition at line 963 of file runtime-strings.cc.

964  {
965 #ifdef DEBUG
966  char* saved_dst = dst;
967  const char* saved_src = src;
968 #endif
970  // We rely on the distance between upper and lower case letters
971  // being a known power of 2.
972  DCHECK('a' - 'A' == (1 << 5));
973  // Boundaries for the range of input characters than require conversion.
974  static const char lo = Converter::kIsToLower ? 'A' - 1 : 'a' - 1;
975  static const char hi = Converter::kIsToLower ? 'Z' + 1 : 'z' + 1;
976  bool changed = false;
977  uintptr_t or_acc = 0;
978  const char* const limit = src + length;
979 
980  // dst is newly allocated and always aligned.
981  DCHECK(IsAligned(reinterpret_cast<intptr_t>(dst), sizeof(uintptr_t)));
982  // Only attempt processing one word at a time if src is also aligned.
983  if (IsAligned(reinterpret_cast<intptr_t>(src), sizeof(uintptr_t))) {
984  // Process the prefix of the input that requires no conversion one aligned
985  // (machine) word at a time.
986  while (src <= limit - sizeof(uintptr_t)) {
987  const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
988  or_acc |= w;
989  if (AsciiRangeMask(w, lo, hi) != 0) {
990  changed = true;
991  break;
992  }
993  *reinterpret_cast<uintptr_t*>(dst) = w;
994  src += sizeof(uintptr_t);
995  dst += sizeof(uintptr_t);
996  }
997  // Process the remainder of the input performing conversion when
998  // required one word at a time.
999  while (src <= limit - sizeof(uintptr_t)) {
1000  const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
1001  or_acc |= w;
1002  uintptr_t m = AsciiRangeMask(w, lo, hi);
1003  // The mask has high (7th) bit set in every byte that needs
1004  // conversion and we know that the distance between cases is
1005  // 1 << 5.
1006  *reinterpret_cast<uintptr_t*>(dst) = w ^ (m >> 2);
1007  src += sizeof(uintptr_t);
1008  dst += sizeof(uintptr_t);
1009  }
1010  }
1011  // Process the last few bytes of the input (or the whole input if
1012  // unaligned access is not supported).
1013  while (src < limit) {
1014  char c = *src;
1015  or_acc |= c;
1016  if (lo < c && c < hi) {
1017  c ^= (1 << 5);
1018  changed = true;
1019  }
1020  *dst = c;
1021  ++src;
1022  ++dst;
1023  }
1024 
1025  if ((or_acc & kAsciiMask) != 0) return false;
1026 
1027  DCHECK(CheckFastAsciiConvert(saved_dst, saved_src, length, changed,
1028  Converter::kIsToLower));
1029 
1030  *changed_out = changed;
1031  return true;
1032 }
static const uintptr_t kAsciiMask
static uintptr_t AsciiRangeMask(uintptr_t w, char m, char n)
bool IsAligned(T value, U alignment)
Definition: utils.h:123

References AsciiRangeMask(), DCHECK, hi, IsAligned(), kAsciiMask, and lo.

+ Here is the call graph for this function:

◆ FastD2I()

int v8::internal::FastD2I ( double  x)
inline

Definition at line 57 of file conversions.h.

57  {
58  return static_cast<int32_t>(x);
59 }

Referenced by DoubleToInt32(), IsInt32Double(), IsSmiDouble(), v8::internal::TypeImpl< Config >::BitsetType::Lub(), RUNTIME_FUNCTION(), v8::internal::Object::ToInt32(), v8::internal::Object::ToSmi(), and TryConvertKey().

+ Here is the caller graph for this function:

◆ FastD2IChecked()

int v8::internal::FastD2IChecked ( double  x)
inline

Definition at line 46 of file conversions.h.

46  {
47  if (!(x >= INT_MIN)) return INT_MIN; // Negation to catch NaNs.
48  if (x > INT_MAX) return INT_MAX;
49  return static_cast<int>(x);
50 }

Referenced by v8::internal::Isolate::CaptureSimpleStackTrace(), RUNTIME_FUNCTION(), and v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::SetLengthWithoutNormalize().

+ Here is the caller graph for this function:

◆ FastD2UI()

unsigned int v8::internal::FastD2UI ( double  x)
inline

Definition at line 40 of file conversions-inl.h.

40  {
41  // There is no unsigned version of lrint, so there is no fast path
42  // in this function as there is in FastD2I. Using lrint doesn't work
43  // for values of 2^31 and above.
44 
45  // Convert "small enough" doubles to uint32_t by fixing the 32
46  // least significant non-fractional bits in the low 32 bits of the
47  // double, and reading them from there.
48  const double k2Pow52 = 4503599627370496.0;
49  bool negative = x < 0;
50  if (negative) {
51  x = -x;
52  }
53  if (x < k2Pow52) {
54  x += k2Pow52;
55  uint32_t result;
56 #ifndef V8_TARGET_BIG_ENDIAN
57  Address mantissa_ptr = reinterpret_cast<Address>(&x);
58 #else
59  Address mantissa_ptr = reinterpret_cast<Address>(&x) + kIntSize;
60 #endif
61  // Copy least significant 32 bits of mantissa.
62  memcpy(&result, mantissa_ptr, sizeof(result));
63  return negative ? ~result + 1 : result;
64  }
65  // Large number (outside uint32 range), Infinity or NaN.
66  return 0x80000000u; // Return integer indefinite.
67 }
const int kIntSize
Definition: globals.h:124

References kIntSize, and negative.

Referenced by CheckArrayAbuse(), v8::Value::IsUint32(), IsUint32Double(), v8::internal::TypeImpl< Config >::BitsetType::Lub(), and v8::internal::Object::ToUint32().

+ Here is the caller graph for this function:

◆ FastDtoa()

bool v8::internal::FastDtoa ( double  v,
FastDtoaMode  mode,
int  requested_digits,
Vector< char >  buffer,
int length,
int decimal_point 
)

Definition at line 686 of file fast-dtoa.cc.

691  {
692  DCHECK(v > 0);
693  DCHECK(!Double(v).IsSpecial());
694 
695  bool result = false;
696  int decimal_exponent = 0;
697  switch (mode) {
698  case FAST_DTOA_SHORTEST:
699  result = Grisu3(v, buffer, length, &decimal_exponent);
700  break;
701  case FAST_DTOA_PRECISION:
702  result = Grisu3Counted(v, requested_digits,
703  buffer, length, &decimal_exponent);
704  break;
705  default:
706  UNREACHABLE();
707  }
708  if (result) {
709  *decimal_point = *length + decimal_exponent;
710  buffer[*length] = '\0';
711  }
712  return result;
713 }
static bool Grisu3Counted(double v, int requested_digits, Vector< char > buffer, int *length, int *decimal_exponent)
Definition: fast-dtoa.cc:642
static bool Grisu3(double v, Vector< char > buffer, int *length, int *decimal_exponent)
Definition: fast-dtoa.cc:577

References DCHECK, FAST_DTOA_PRECISION, FAST_DTOA_SHORTEST, Grisu3(), Grisu3Counted(), mode(), and UNREACHABLE.

Referenced by DoubleToAscii().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FastFixedDtoa()

bool v8::internal::FastFixedDtoa ( double  v,
int  fractional_count,
Vector< char >  buffer,
int length,
int decimal_point 
)

Definition at line 289 of file fixed-dtoa.cc.

293  {
294  const uint32_t kMaxUInt32 = 0xFFFFFFFF;
295  uint64_t significand = Double(v).Significand();
296  int exponent = Double(v).Exponent();
297  // v = significand * 2^exponent (with significand a 53bit integer).
298  // If the exponent is larger than 20 (i.e. we may have a 73bit number) then we
299  // don't know how to compute the representation. 2^73 ~= 9.5*10^21.
300  // If necessary this limit could probably be increased, but we don't need
301  // more.
302  if (exponent > 20) return false;
303  if (fractional_count > 20) return false;
304  *length = 0;
305  // At most kDoubleSignificandSize bits of the significand are non-zero.
306  // Given a 64 bit integer we have 11 0s followed by 53 potentially non-zero
307  // bits: 0..11*..0xxx..53*..xx
308  if (exponent + kDoubleSignificandSize > 64) {
309  // The exponent must be > 11.
310  //
311  // We know that v = significand * 2^exponent.
312  // And the exponent > 11.
313  // We simplify the task by dividing v by 10^17.
314  // The quotient delivers the first digits, and the remainder fits into a 64
315  // bit number.
316  // Dividing by 10^17 is equivalent to dividing by 5^17*2^17.
317  const uint64_t kFive17 = V8_2PART_UINT64_C(0xB1, A2BC2EC5); // 5^17
318  uint64_t divisor = kFive17;
319  int divisor_power = 17;
320  uint64_t dividend = significand;
321  uint32_t quotient;
322  uint64_t remainder;
323  // Let v = f * 2^e with f == significand and e == exponent.
324  // Then need q (quotient) and r (remainder) as follows:
325  // v = q * 10^17 + r
326  // f * 2^e = q * 10^17 + r
327  // f * 2^e = q * 5^17 * 2^17 + r
328  // If e > 17 then
329  // f * 2^(e-17) = q * 5^17 + r/2^17
330  // else
331  // f = q * 5^17 * 2^(17-e) + r/2^e
332  if (exponent > divisor_power) {
333  // We only allow exponents of up to 20 and therefore (17 - e) <= 3
334  dividend <<= exponent - divisor_power;
335  quotient = static_cast<uint32_t>(dividend / divisor);
336  remainder = (dividend % divisor) << divisor_power;
337  } else {
338  divisor <<= divisor_power - exponent;
339  quotient = static_cast<uint32_t>(dividend / divisor);
340  remainder = (dividend % divisor) << exponent;
341  }
342  FillDigits32(quotient, buffer, length);
343  FillDigits64FixedLength(remainder, divisor_power, buffer, length);
344  *decimal_point = *length;
345  } else if (exponent >= 0) {
346  // 0 <= exponent <= 11
347  significand <<= exponent;
348  FillDigits64(significand, buffer, length);
349  *decimal_point = *length;
350  } else if (exponent > -kDoubleSignificandSize) {
351  // We have to cut the number.
352  uint64_t integrals = significand >> -exponent;
353  uint64_t fractionals = significand - (integrals << -exponent);
354  if (integrals > kMaxUInt32) {
355  FillDigits64(integrals, buffer, length);
356  } else {
357  FillDigits32(static_cast<uint32_t>(integrals), buffer, length);
358  }
359  *decimal_point = *length;
360  FillFractionals(fractionals, exponent, fractional_count,
361  buffer, length, decimal_point);
362  } else if (exponent < -128) {
363  // This configuration (with at most 20 digits) means that all digits must be
364  // 0.
365  DCHECK(fractional_count <= 20);
366  buffer[0] = '\0';
367  *length = 0;
368  *decimal_point = -fractional_count;
369  } else {
370  *decimal_point = 0;
371  FillFractionals(significand, exponent, fractional_count,
372  buffer, length, decimal_point);
373  }
374  TrimZeros(buffer, length, decimal_point);
375  buffer[*length] = '\0';
376  if ((*length) == 0) {
377  // The string is empty and the decimal_point thus has no importance. Mimick
378  // Gay's dtoa and and set it to -fractional_count.
379  *decimal_point = -fractional_count;
380  }
381  return true;
382 }
static void FillDigits64(uint64_t number, Vector< char > buffer, int *length)
Definition: fixed-dtoa.cc:150
static void FillDigits64FixedLength(uint64_t number, int requested_length, Vector< char > buffer, int *length)
Definition: fixed-dtoa.cc:135
static void FillDigits32(uint32_t number, Vector< char > buffer, int *length)
Definition: fixed-dtoa.cc:112
const uint32_t kMaxUInt32
Definition: globals.h:120
static const int kDoubleSignificandSize
Definition: fixed-dtoa.cc:99
static void FillFractionals(uint64_t fractionals, int exponent, int fractional_count, Vector< char > buffer, int *length, int *decimal_point)
Definition: fixed-dtoa.cc:212
static void TrimZeros(Vector< char > buffer, int *length, int *decimal_point)
Definition: fixed-dtoa.cc:271

References DCHECK, v8::internal::Double::Exponent(), FillDigits32(), FillDigits64(), FillDigits64FixedLength(), FillFractionals(), kDoubleSignificandSize, kMaxUInt32, v8::internal::Double::Significand(), TrimZeros(), and V8_2PART_UINT64_C.

Referenced by DoubleToAscii().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FastI2D()

double v8::internal::FastI2D ( int  x)
inline

Definition at line 64 of file conversions.h.

64  {
65  // There is no rounding involved in converting an integer to a
66  // double, so this code should compile to a few instructions without
67  // any FPU pipeline stalls.
68  return static_cast<double>(x);
69 }

Referenced by CheckArrayAbuse(), DoubleToInt32(), IsInt32Double(), IsSmiDouble(), RUNTIME_FUNCTION(), v8::internal::compiler::TEST_F(), v8::internal::Object::ToInt32(), and v8::internal::Object::ToSmi().

+ Here is the caller graph for this function:

◆ FastSmiToObjectElementsKind()

ElementsKind v8::internal::FastSmiToObjectElementsKind ( ElementsKind  from_kind)
inline

Definition at line 216 of file elements-kind.h.

216  {
217  DCHECK(IsFastSmiElementsKind(from_kind));
218  return (from_kind == FAST_SMI_ELEMENTS)
219  ? FAST_ELEMENTS
221 }

References DCHECK, FAST_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_SMI_ELEMENTS, and IsFastSmiElementsKind().

+ Here is the call graph for this function:

◆ FastUI2D()

double v8::internal::FastUI2D ( unsigned  x)
inline

Definition at line 72 of file conversions.h.

72  {
73  // There is no rounding involved in converting an unsigned integer to a
74  // double, so this code should compile to a few instructions without
75  // any FPU pipeline stalls.
76  return static_cast<double>(x);
77 }

Referenced by v8::Value::IsUint32(), IsUint32Double(), v8::internal::compiler::TEST_F(), and v8::internal::Object::ToUint32().

+ Here is the caller graph for this function:

◆ FatalProcessOutOfMemory()

void v8::internal::FatalProcessOutOfMemory ( const char *  message)

Referenced by AlignedAlloc(), v8::internal::Malloced::FatalProcessOutOfMemory(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Initialize(), and v8::internal::Malloced::New().

+ Here is the caller graph for this function:

◆ FieldMemOperand()

◆ FieldOperand() [1/2]

Operand v8::internal::FieldOperand ( Register  object,
int  offset 
)
inline

Definition at line 1053 of file macro-assembler-ia32.h.

1053  {
1054  return Operand(object, offset - kHeapObjectTag);
1055 }

References kHeapObjectTag.

Referenced by FixedArrayElementOperand().

+ Here is the caller graph for this function:

◆ FieldOperand() [2/2]

Operand v8::internal::FieldOperand ( Register  object,
Register  index,
ScaleFactor  scale,
int  offset 
)
inline

Definition at line 1059 of file macro-assembler-ia32.h.

1062  {
1063  return Operand(object, index, scale, offset - kHeapObjectTag);
1064 }

References kHeapObjectTag.

◆ FillCache()

static void v8::internal::FillCache ( Isolate isolate,
Handle< Code code 
)
static

Definition at line 163 of file ic-compiler.cc.

163  {
164  Handle<UnseededNumberDictionary> dictionary = UnseededNumberDictionary::Set(
165  isolate->factory()->non_monomorphic_cache(), code->flags(), code);
166  isolate->heap()->public_set_non_monomorphic_cache(*dictionary);
167 }

References v8::internal::Isolate::factory(), v8::internal::Isolate::heap(), v8::internal::Heap::public_set_non_monomorphic_cache(), and v8::internal::UnseededNumberDictionary::Set().

Referenced by v8::internal::PropertyICCompiler::ComputeLoad(), and v8::internal::PropertyICCompiler::ComputeStore().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FillDigits32()

static void v8::internal::FillDigits32 ( uint32_t  number,
Vector< char >  buffer,
int length 
)
static

Definition at line 112 of file fixed-dtoa.cc.

112  {
113  int number_length = 0;
114  // We fill the digits in reverse order and exchange them afterwards.
115  while (number != 0) {
116  int digit = number % 10;
117  number /= 10;
118  buffer[(*length) + number_length] = '0' + digit;
119  number_length++;
120  }
121  // Exchange the digits.
122  int i = *length;
123  int j = *length + number_length - 1;
124  while (i < j) {
125  char tmp = buffer[i];
126  buffer[i] = buffer[j];
127  buffer[j] = tmp;
128  i++;
129  j--;
130  }
131  *length += number_length;
132 }

Referenced by FastFixedDtoa(), and FillDigits64().

+ Here is the caller graph for this function:

◆ FillDigits32FixedLength()

static void v8::internal::FillDigits32FixedLength ( uint32_t  number,
int  requested_length,
Vector< char >  buffer,
int length 
)
static

Definition at line 102 of file fixed-dtoa.cc.

103  {
104  for (int i = requested_length - 1; i >= 0; --i) {
105  buffer[(*length) + i] = '0' + number % 10;
106  number /= 10;
107  }
108  *length += requested_length;
109 }

Referenced by FillDigits64(), and FillDigits64FixedLength().

+ Here is the caller graph for this function:

◆ FillDigits64()

static void v8::internal::FillDigits64 ( uint64_t  number,
Vector< char >  buffer,
int length 
)
static

Definition at line 150 of file fixed-dtoa.cc.

150  {
151  const uint32_t kTen7 = 10000000;
152  // For efficiency cut the number into 3 uint32_t parts, and print those.
153  uint32_t part2 = static_cast<uint32_t>(number % kTen7);
154  number /= kTen7;
155  uint32_t part1 = static_cast<uint32_t>(number % kTen7);
156  uint32_t part0 = static_cast<uint32_t>(number / kTen7);
157 
158  if (part0 != 0) {
159  FillDigits32(part0, buffer, length);
160  FillDigits32FixedLength(part1, 7, buffer, length);
161  FillDigits32FixedLength(part2, 7, buffer, length);
162  } else if (part1 != 0) {
163  FillDigits32(part1, buffer, length);
164  FillDigits32FixedLength(part2, 7, buffer, length);
165  } else {
166  FillDigits32(part2, buffer, length);
167  }
168 }
static void FillDigits32FixedLength(uint32_t number, int requested_length, Vector< char > buffer, int *length)
Definition: fixed-dtoa.cc:102

References FillDigits32(), FillDigits32FixedLength(), and kTen7.

Referenced by FastFixedDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FillDigits64FixedLength()

static void v8::internal::FillDigits64FixedLength ( uint64_t  number,
int  requested_length,
Vector< char >  buffer,
int length 
)
static

Definition at line 135 of file fixed-dtoa.cc.

136  {
137  const uint32_t kTen7 = 10000000;
138  // For efficiency cut the number into 3 uint32_t parts, and print those.
139  uint32_t part2 = static_cast<uint32_t>(number % kTen7);
140  number /= kTen7;
141  uint32_t part1 = static_cast<uint32_t>(number % kTen7);
142  uint32_t part0 = static_cast<uint32_t>(number / kTen7);
143 
144  FillDigits32FixedLength(part0, 3, buffer, length);
145  FillDigits32FixedLength(part1, 7, buffer, length);
146  FillDigits32FixedLength(part2, 7, buffer, length);
147 }

References FillDigits32FixedLength(), and kTen7.

Referenced by FastFixedDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FillFractionals()

static void v8::internal::FillFractionals ( uint64_t  fractionals,
int  exponent,
int  fractional_count,
Vector< char >  buffer,
int length,
int decimal_point 
)
static

Definition at line 212 of file fixed-dtoa.cc.

214  {
215  DCHECK(-128 <= exponent && exponent <= 0);
216  // 'fractionals' is a fixed-point number, with binary point at bit
217  // (-exponent). Inside the function the non-converted remainder of fractionals
218  // is a fixed-point number, with binary point at bit 'point'.
219  if (-exponent <= 64) {
220  // One 64 bit number is sufficient.
221  DCHECK(fractionals >> 56 == 0);
222  int point = -exponent;
223  for (int i = 0; i < fractional_count; ++i) {
224  if (fractionals == 0) break;
225  // Instead of multiplying by 10 we multiply by 5 and adjust the point
226  // location. This way the fractionals variable will not overflow.
227  // Invariant at the beginning of the loop: fractionals < 2^point.
228  // Initially we have: point <= 64 and fractionals < 2^56
229  // After each iteration the point is decremented by one.
230  // Note that 5^3 = 125 < 128 = 2^7.
231  // Therefore three iterations of this loop will not overflow fractionals
232  // (even without the subtraction at the end of the loop body). At this
233  // time point will satisfy point <= 61 and therefore fractionals < 2^point
234  // and any further multiplication of fractionals by 5 will not overflow.
235  fractionals *= 5;
236  point--;
237  int digit = static_cast<int>(fractionals >> point);
238  buffer[*length] = '0' + digit;
239  (*length)++;
240  fractionals -= static_cast<uint64_t>(digit) << point;
241  }
242  // If the first bit after the point is set we have to round up.
243  if (((fractionals >> (point - 1)) & 1) == 1) {
244  RoundUp(buffer, length, decimal_point);
245  }
246  } else { // We need 128 bits.
247  DCHECK(64 < -exponent && -exponent <= 128);
248  UInt128 fractionals128 = UInt128(fractionals, 0);
249  fractionals128.Shift(-exponent - 64);
250  int point = 128;
251  for (int i = 0; i < fractional_count; ++i) {
252  if (fractionals128.IsZero()) break;
253  // As before: instead of multiplying by 10 we multiply by 5 and adjust the
254  // point location.
255  // This multiplication will not overflow for the same reasons as before.
256  fractionals128.Multiply(5);
257  point--;
258  int digit = fractionals128.DivModPowerOf2(point);
259  buffer[*length] = '0' + digit;
260  (*length)++;
261  }
262  if (fractionals128.BitAt(point - 1) == 1) {
263  RoundUp(buffer, length, decimal_point);
264  }
265  }
266 }
T RoundUp(T x, intptr_t m)
Definition: macros.h:407

References v8::internal::UInt128::BitAt(), DCHECK, v8::internal::UInt128::DivModPowerOf2(), v8::internal::UInt128::IsZero(), v8::internal::UInt128::Multiply(), RoundUp(), and v8::internal::UInt128::Shift().

Referenced by FastFixedDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FilterKey()

static bool v8::internal::FilterKey ( Object key,
PropertyAttributes  filter 
)
static

Definition at line 5628 of file objects.cc.

5628  {
5629  if ((filter & SYMBOLIC) && key->IsSymbol()) {
5630  return true;
5631  }
5632 
5633  if ((filter & PRIVATE_SYMBOL) &&
5634  key->IsSymbol() && Symbol::cast(key)->is_private()) {
5635  return true;
5636  }
5637 
5638  if ((filter & STRING) && !key->IsSymbol()) {
5639  return true;
5640  }
5641 
5642  return false;
5643 }
@ SYMBOLIC
@ PRIVATE_SYMBOL
@ STRING

References PRIVATE_SYMBOL, STRING, and SYMBOLIC.

Referenced by v8::internal::JSObject::GetOwnPropertyNames(), v8::internal::Map::NumberOfDescribedProperties(), and v8::internal::Dictionary< Derived, Shape, Key >::NumberOfElementsFilterAttributes().

+ Here is the caller graph for this function:

◆ FilterOutCodeCreateEvent()

static bool v8::internal::FilterOutCodeCreateEvent ( Logger::LogEventsAndTags  tag)
static

Definition at line 173 of file cpu-profiler.cc.

173  {
174  return FLAG_prof_browser_mode
175  && (tag != Logger::CALLBACK_TAG
176  && tag != Logger::FUNCTION_TAG
177  && tag != Logger::LAZY_COMPILE_TAG
178  && tag != Logger::REG_EXP_TAG
179  && tag != Logger::SCRIPT_TAG);
180 }

Referenced by v8::internal::CpuProfiler::CallbackEvent(), v8::internal::CpuProfiler::CodeCreateEvent(), v8::internal::CpuProfiler::GetterCallbackEvent(), v8::internal::CpuProfiler::RegExpCodeCreateEvent(), and v8::internal::CpuProfiler::SetterCallbackEvent().

+ Here is the caller graph for this function:

◆ FindAllCanReadHolder()

static bool v8::internal::FindAllCanReadHolder ( LookupIterator *  it)
static

Definition at line 574 of file objects.cc.

574  {
575  for (; it->IsFound(); it->Next()) {
576  if (it->state() == LookupIterator::ACCESSOR) {
577  Handle<Object> accessors = it->GetAccessors();
578  if (accessors->IsAccessorInfo()) {
579  if (AccessorInfo::cast(*accessors)->all_can_read()) return true;
580  }
581  }
582  }
583  return false;
584 }

References ACCESSOR.

Referenced by v8::internal::JSObject::GetPropertyAttributesWithFailedAccessCheck(), and v8::internal::JSObject::GetPropertyWithFailedAccessCheck().

+ Here is the caller graph for this function:

◆ FindAllCanWriteHolder()

static bool v8::internal::FindAllCanWriteHolder ( LookupIterator *  it)
static

Definition at line 613 of file objects.cc.

613  {
614  for (; it->IsFound(); it->Next()) {
615  if (it->state() == LookupIterator::ACCESSOR) {
616  Handle<Object> accessors = it->GetAccessors();
617  if (accessors->IsAccessorInfo()) {
618  if (AccessorInfo::cast(*accessors)->all_can_write()) return true;
619  }
620  }
621  }
622  return false;
623 }

References ACCESSOR.

Referenced by v8::internal::JSObject::SetPropertyWithFailedAccessCheck().

+ Here is the caller graph for this function:

◆ FindCaller()

MaybeHandle<JSFunction> v8::internal::FindCaller ( Isolate isolate,
Handle< JSFunction function 
)

Definition at line 1256 of file accessors.cc.

1257  {
1258  DisallowHeapAllocation no_allocation;
1259  FrameFunctionIterator it(isolate, no_allocation);
1260  if (function->shared()->native()) {
1261  return MaybeHandle<JSFunction>();
1262  }
1263  // Find the function from the frames.
1264  if (!it.Find(*function)) {
1265  // No frame corresponding to the given function found. Return null.
1266  return MaybeHandle<JSFunction>();
1267  }
1268  // Find previously called non-toplevel function.
1269  JSFunction* caller;
1270  do {
1271  caller = it.next();
1272  if (caller == NULL) return MaybeHandle<JSFunction>();
1273  } while (caller->shared()->is_toplevel());
1274 
1275  // If caller is a built-in function and caller's caller is also built-in,
1276  // use that instead.
1277  JSFunction* potential_caller = caller;
1278  while (potential_caller != NULL && potential_caller->IsBuiltin()) {
1279  caller = potential_caller;
1280  potential_caller = it.next();
1281  }
1282  if (!caller->shared()->native() && potential_caller != NULL) {
1283  caller = potential_caller;
1284  }
1285  // If caller is bound, return null. This is compatible with JSC, and
1286  // allows us to make bound functions use the strict function map
1287  // and its associated throwing caller and arguments.
1288  if (caller->shared()->bound()) {
1289  return MaybeHandle<JSFunction>();
1290  }
1291  // Censor if the caller is not a sloppy mode function.
1292  // Change from ES5, which used to throw, see:
1293  // https://bugs.ecmascript.org/show_bug.cgi?id=310
1294  if (caller->shared()->strict_mode() == STRICT) {
1295  return MaybeHandle<JSFunction>();
1296  }
1297  // Don't return caller from another security context.
1298  if (!AllowAccessToFunction(isolate->context(), caller)) {
1299  return MaybeHandle<JSFunction>();
1300  }
1301  return Handle<JSFunction>(caller);
1302 }
static bool AllowAccessToFunction(Context *current_context, JSFunction *function)
Definition: accessors.cc:1198

References AllowAccessToFunction(), v8::internal::Isolate::context(), v8::internal::FrameFunctionIterator::Find(), v8::internal::JSFunction::IsBuiltin(), v8::internal::FrameFunctionIterator::next(), NULL, and STRICT.

+ Here is the call graph for this function:

◆ FindClosestElementsTransition()

static Map* v8::internal::FindClosestElementsTransition ( Map map,
ElementsKind  to_kind 
)
static

Definition at line 3235 of file objects.cc.

3235  {
3236  Map* current_map = map;
3237  int target_kind =
3238  IsFastElementsKind(to_kind) || IsExternalArrayElementsKind(to_kind)
3239  ? to_kind
3241 
3242  // Support for legacy API: SetIndexedPropertiesTo{External,Pixel}Data
3243  // allows to change elements from arbitrary kind to any ExternalArray
3244  // elements kind. Satisfy its requirements, checking whether we already
3245  // have the cached transition.
3246  if (IsExternalArrayElementsKind(to_kind) &&
3247  !IsFixedTypedArrayElementsKind(map->elements_kind())) {
3248  if (map->HasElementsTransition()) {
3249  Map* next_map = map->elements_transition_map();
3250  if (next_map->elements_kind() == to_kind) return next_map;
3251  }
3252  return map;
3253  }
3254 
3255  ElementsKind kind = map->elements_kind();
3256  while (kind != target_kind) {
3257  kind = GetNextTransitionElementsKind(kind);
3258  if (!current_map->HasElementsTransition()) return current_map;
3259  current_map = current_map->elements_transition_map();
3260  }
3261 
3262  if (to_kind != kind && current_map->HasElementsTransition()) {
3263  DCHECK(to_kind == DICTIONARY_ELEMENTS);
3264  Map* next_map = current_map->elements_transition_map();
3265  if (next_map->elements_kind() == to_kind) return next_map;
3266  }
3267 
3268  DCHECK(current_map->elements_kind() == target_kind);
3269  return current_map;
3270 }
bool IsExternalArrayElementsKind(ElementsKind kind)
Definition: elements-kind.h:95
bool IsFixedTypedArrayElementsKind(ElementsKind kind)

References IsExternalArrayElementsKind(), IsFastElementsKind(), and v8::internal::HeapObject::map().

Referenced by v8::internal::Map::AsElementsKind(), and v8::internal::Map::LookupElementsTransitionMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindFlag()

static Flag* v8::internal::FindFlag ( const char *  name)
static

Definition at line 324 of file flags.cc.

324  {
325  for (size_t i = 0; i < num_flags; ++i) {
326  if (EqualNames(name, flags[i].name()))
327  return &flags[i];
328  }
329  return NULL;
330 }
static bool EqualNames(const char *a, const char *b)
Definition: flags.cc:314

References EqualNames(), v8::internal::anonymous_namespace{flags.cc}::flags, name, NULL, and v8::internal::anonymous_namespace{flags.cc}::num_flags.

Referenced by v8::internal::FlagList::SetFlagsFromCommandLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindFunctionInFrame()

static int v8::internal::FindFunctionInFrame ( JavaScriptFrame frame,
Handle< JSFunction function 
)
static

Definition at line 1089 of file accessors.cc.

1090  {
1091  DisallowHeapAllocation no_allocation;
1092  List<JSFunction*> functions(2);
1093  frame->GetFunctions(&functions);
1094  for (int i = functions.length() - 1; i >= 0; i--) {
1095  if (functions[i] == *function) return i;
1096  }
1097  return -1;
1098 }

References v8::internal::JavaScriptFrame::GetFunctions().

Referenced by GetFunctionArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindHidden()

static Object* v8::internal::FindHidden ( Heap heap,
Object object,
FunctionTemplateInfo type 
)
inlinestatic

Definition at line 1034 of file builtins.cc.

1036  {
1037  for (PrototypeIterator iter(heap->isolate(), object,
1038  PrototypeIterator::START_AT_RECEIVER);
1039  !iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN); iter.Advance()) {
1040  if (type->IsTemplateFor(iter.GetCurrent())) {
1041  return iter.GetCurrent();
1042  }
1043  }
1044  return heap->null_value();
1045 }

References v8::internal::PrototypeIterator::END_AT_NON_HIDDEN, v8::internal::PrototypeIterator::IsAtEnd(), v8::internal::Heap::isolate(), v8::internal::FunctionTemplateInfo::IsTemplateFor(), and v8::internal::PrototypeIterator::START_AT_RECEIVER.

Referenced by TypeCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindIndexedNonNativeFrame()

static int v8::internal::FindIndexedNonNativeFrame ( JavaScriptFrameIterator *  it,
int  index 
)
static

Definition at line 5803 of file runtime.cc.

5803  {
5804  int count = -1;
5805  for (; !it->done(); it->Advance()) {
5806  List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
5807  it->frame()->Summarize(&frames);
5808  for (int i = frames.length() - 1; i >= 0; i--) {
5809  // Omit functions from native scripts.
5810  if (frames[i].function()->IsFromNativeScript()) continue;
5811  if (++count == index) return i;
5812  }
5813  }
5814  return -1;
5815 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ FindInstanceOf()

template<class C >
static C* v8::internal::FindInstanceOf ( Isolate isolate,
Object obj 
)
static

Definition at line 60 of file accessors.cc.

60  {
61  for (PrototypeIterator iter(isolate, obj,
62  PrototypeIterator::START_AT_RECEIVER);
63  !iter.IsAtEnd(); iter.Advance()) {
64  if (Is<C>(iter.GetCurrent())) return C::cast(iter.GetCurrent());
65  }
66  return NULL;
67 }

References v8::internal::PrototypeIterator::IsAtEnd(), NULL, and v8::internal::PrototypeIterator::START_AT_RECEIVER.

+ Here is the call graph for this function:

◆ FindOneByteStringIndices()

void v8::internal::FindOneByteStringIndices ( Vector< const uint8_t >  subject,
char  pattern,
ZoneList< int > *  indices,
unsigned int  limit,
Zone zone 
)

Definition at line 282 of file runtime-regexp.cc.

284  {
285  DCHECK(limit > 0);
286  // Collect indices of pattern in subject using memchr.
287  // Stop after finding at most limit values.
288  const uint8_t* subject_start = subject.start();
289  const uint8_t* subject_end = subject_start + subject.length();
290  const uint8_t* pos = subject_start;
291  while (limit > 0) {
292  pos = reinterpret_cast<const uint8_t*>(
293  memchr(pos, pattern, subject_end - pos));
294  if (pos == NULL) return;
295  indices->Add(static_cast<int>(pos - subject_start), zone);
296  pos++;
297  limit--;
298  }
299 }

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, v8::internal::Vector< T >::length(), NULL, and v8::internal::Vector< T >::start().

Referenced by FindStringIndicesDispatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindSavedContextForFrame()

static SaveContext* v8::internal::FindSavedContextForFrame ( Isolate isolate,
JavaScriptFrame frame 
)
static

Definition at line 5790 of file runtime.cc.

5791  {
5792  SaveContext* save = isolate->save_context();
5793  while (save != NULL && !save->IsBelowFrame(frame)) {
5794  save = save->prev();
5795  }
5796  DCHECK(save != NULL);
5797  return save;
5798 }

References DCHECK, and NULL.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ FindSharedFunctionInfosForScript()

static int v8::internal::FindSharedFunctionInfosForScript ( HeapIterator *  iterator,
Script script,
FixedArray buffer 
)
static

Definition at line 7937 of file runtime.cc.

7939  {
7940  DisallowHeapAllocation no_allocation;
7941  int counter = 0;
7942  int buffer_size = buffer->length();
7943  for (HeapObject* obj = iterator->next(); obj != NULL;
7944  obj = iterator->next()) {
7945  DCHECK(obj != NULL);
7946  if (!obj->IsSharedFunctionInfo()) {
7947  continue;
7948  }
7949  SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
7950  if (shared->script() != script) {
7951  continue;
7952  }
7953  if (counter < buffer_size) {
7954  buffer->set(counter, shared);
7955  }
7956  counter++;
7957  }
7958  return counter;
7959 }

References DCHECK, v8::internal::FixedArrayBase::length(), NULL, and v8::internal::FixedArray::set().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindStringIndices()

template<typename SubjectChar , typename PatternChar >
void v8::internal::FindStringIndices ( Isolate isolate,
Vector< const SubjectChar >  subject,
Vector< const PatternChar >  pattern,
ZoneList< int > *  indices,
unsigned int  limit,
Zone zone 
)

Definition at line 318 of file runtime-regexp.cc.

320  {
321  DCHECK(limit > 0);
322  // Collect indices of pattern in subject.
323  // Stop after finding at most limit values.
324  int pattern_length = pattern.length();
325  int index = 0;
326  StringSearch<PatternChar, SubjectChar> search(isolate, pattern);
327  while (limit > 0) {
328  index = search.Search(subject, index);
329  if (index < 0) return;
330  indices->Add(index, zone);
331  index += pattern_length;
332  limit--;
333  }
334 }

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, v8::internal::Vector< T >::length(), and v8::internal::StringSearch< PatternChar, SubjectChar >::Search().

Referenced by FindStringIndicesDispatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindStringIndicesDispatch()

void v8::internal::FindStringIndicesDispatch ( Isolate isolate,
String subject,
String pattern,
ZoneList< int > *  indices,
unsigned int  limit,
Zone zone 
)

Definition at line 337 of file runtime-regexp.cc.

339  {
340  {
342  String::FlatContent subject_content = subject->GetFlatContent();
343  String::FlatContent pattern_content = pattern->GetFlatContent();
344  DCHECK(subject_content.IsFlat());
345  DCHECK(pattern_content.IsFlat());
346  if (subject_content.IsOneByte()) {
347  Vector<const uint8_t> subject_vector = subject_content.ToOneByteVector();
348  if (pattern_content.IsOneByte()) {
349  Vector<const uint8_t> pattern_vector =
350  pattern_content.ToOneByteVector();
351  if (pattern_vector.length() == 1) {
352  FindOneByteStringIndices(subject_vector, pattern_vector[0], indices,
353  limit, zone);
354  } else {
355  FindStringIndices(isolate, subject_vector, pattern_vector, indices,
356  limit, zone);
357  }
358  } else {
359  FindStringIndices(isolate, subject_vector,
360  pattern_content.ToUC16Vector(), indices, limit, zone);
361  }
362  } else {
363  Vector<const uc16> subject_vector = subject_content.ToUC16Vector();
364  if (pattern_content.IsOneByte()) {
365  Vector<const uint8_t> pattern_vector =
366  pattern_content.ToOneByteVector();
367  if (pattern_vector.length() == 1) {
368  FindTwoByteStringIndices(subject_vector, pattern_vector[0], indices,
369  limit, zone);
370  } else {
371  FindStringIndices(isolate, subject_vector, pattern_vector, indices,
372  limit, zone);
373  }
374  } else {
375  Vector<const uc16> pattern_vector = pattern_content.ToUC16Vector();
376  if (pattern_vector.length() == 1) {
377  FindTwoByteStringIndices(subject_vector, pattern_vector[0], indices,
378  limit, zone);
379  } else {
380  FindStringIndices(isolate, subject_vector, pattern_vector, indices,
381  limit, zone);
382  }
383  }
384  }
385  }
386 }
void FindTwoByteStringIndices(const Vector< const uc16 > subject, uc16 pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
void FindOneByteStringIndices(Vector< const uint8_t > subject, char pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)
void FindStringIndices(Isolate *isolate, Vector< const SubjectChar > subject, Vector< const PatternChar > pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)

References DCHECK, FindOneByteStringIndices(), FindStringIndices(), FindTwoByteStringIndices(), v8::internal::String::GetFlatContent(), v8::internal::String::FlatContent::IsFlat(), v8::internal::String::FlatContent::IsOneByte(), v8::internal::Vector< T >::length(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().

Referenced by RUNTIME_FUNCTION(), and StringReplaceGlobalAtomRegExpWithString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindTwoByteStringIndices()

void v8::internal::FindTwoByteStringIndices ( const Vector< const uc16 subject,
uc16  pattern,
ZoneList< int > *  indices,
unsigned int  limit,
Zone zone 
)

Definition at line 302 of file runtime-regexp.cc.

304  {
305  DCHECK(limit > 0);
306  const uc16* subject_start = subject.start();
307  const uc16* subject_end = subject_start + subject.length();
308  for (const uc16* pos = subject_start; pos < subject_end && limit > 0; pos++) {
309  if (*pos == pattern) {
310  indices->Add(static_cast<int>(pos - subject_start), zone);
311  limit--;
312  }
313  }
314 }

References v8::internal::List< T, AllocationPolicy >::Add(), DCHECK, v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().

Referenced by FindStringIndicesDispatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FixedArrayElementOperand()

Operand v8::internal::FixedArrayElementOperand ( Register  array,
Register  index_as_smi,
int  additional_offset = 0 
)
inline

Definition at line 1067 of file macro-assembler-ia32.h.

1069  {
1070  int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize;
1071  return FieldOperand(array, index_as_smi, times_half_pointer_size, offset);
1072 }
Operand FieldOperand(Register object, Register index, ScaleFactor scale, int offset)

References FieldOperand(), v8::internal::FixedArrayBase::kHeaderSize, kPointerSize, and times_half_pointer_size.

+ Here is the call graph for this function:

◆ FixedToExternalElementsKind()

static ElementsKind v8::internal::FixedToExternalElementsKind ( ElementsKind  elements_kind)
static

Definition at line 16277 of file objects.cc.

16277  {
16278  switch (elements_kind) {
16279 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
16280  case TYPE##_ELEMENTS: return EXTERNAL_##TYPE##_ELEMENTS;
16281 
16283 #undef TYPED_ARRAY_CASE
16284 
16285  default:
16286  UNREACHABLE();
16288  }
16289 }
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND, TYPED_ARRAY_CASE, TYPED_ARRAYS, and UNREACHABLE.

Referenced by v8::internal::JSTypedArray::MaterializeArrayBuffer().

+ Here is the caller graph for this function:

◆ FixTryCatchHandler()

static bool v8::internal::FixTryCatchHandler ( StackFrame top_frame,
StackFrame bottom_frame 
)
static

Definition at line 1548 of file liveedit.cc.

1549  {
1550  Address* pointer_address =
1551  &Memory::Address_at(top_frame->isolate()->get_address_from_id(
1552  Isolate::kHandlerAddress));
1553 
1554  while (*pointer_address < top_frame->sp()) {
1555  pointer_address = &Memory::Address_at(*pointer_address);
1556  }
1557  Address* above_frame_address = pointer_address;
1558  while (*pointer_address < bottom_frame->fp()) {
1559  pointer_address = &Memory::Address_at(*pointer_address);
1560  }
1561  bool change = *above_frame_address != *pointer_address;
1562  *above_frame_address = *pointer_address;
1563  return change;
1564 }
const Register fp

References v8::internal::Memory::Address_at(), fp, and sp.

Referenced by DropFrames().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FixupMultiply10()

static void v8::internal::FixupMultiply10 ( int  estimated_power,
bool  is_even,
int decimal_point,
Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus 
)
static

Definition at line 607 of file bignum-dtoa.cc.

610  {
611  bool in_range;
612  if (is_even) {
613  // For IEEE doubles half-way cases (in decimal system numbers ending with 5)
614  // are rounded to the closest floating-point number with even significand.
615  in_range = Bignum::PlusCompare(*numerator, *delta_plus, *denominator) >= 0;
616  } else {
617  in_range = Bignum::PlusCompare(*numerator, *delta_plus, *denominator) > 0;
618  }
619  if (in_range) {
620  // Since numerator + delta_plus >= denominator we already have
621  // 1 <= numerator/denominator < 10. Simply update the estimated_power.
622  *decimal_point = estimated_power + 1;
623  } else {
624  *decimal_point = estimated_power;
625  numerator->Times10();
626  if (Bignum::Equal(*delta_minus, *delta_plus)) {
627  delta_minus->Times10();
628  delta_plus->AssignBignum(*delta_minus);
629  } else {
630  delta_minus->Times10();
631  delta_plus->Times10();
632  }
633  }
634 }

References v8::internal::Bignum::AssignBignum(), v8::internal::Bignum::Equal(), v8::internal::Bignum::PlusCompare(), and v8::internal::Bignum::Times10().

Referenced by BignumDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FlipBytes()

template<int n>
void v8::internal::FlipBytes ( uint8_t *  target,
uint8_t *  source 
)
inline

Definition at line 560 of file runtime-typedarray.cc.

560  {
561  source = source + (n - 1);
562  for (int i = 0; i < n; i++) {
563  *(target++) = *(source--);
564  }
565 }

◆ float_to_rawbits()

static uint32_t v8::internal::float_to_rawbits ( float  value)
inlinestatic

Definition at line 27 of file utils-arm64.h.

27  {
28  uint32_t bits = 0;
29  memcpy(&bits, &value, 4);
30  return bits;
31 }

Referenced by v8::internal::MacroAssembler::Fmov(), IsSignallingNaN(), and ToQuietNaN().

+ Here is the caller graph for this function:

◆ Floor()

double v8::internal::Floor ( double  x)
inline

Definition at line 159 of file utils.h.

159  {
160 #ifdef _MSC_VER
161  if (x == 0) return x; // Fix for issue 3477.
162 #endif
163  return std::floor(x);
164 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ Flush() [1/2]

void v8::internal::Flush ( )
inline

Definition at line 1048 of file utils.h.

1048  {
1049  Flush(stdout);
1050 }
void Flush()
Definition: utils.h:1048

References Flush().

+ Here is the call graph for this function:

◆ Flush() [2/2]

void v8::internal::Flush ( FILE *  out)

Definition at line 124 of file utils.cc.

124  {
125  fflush(out);
126 }

Referenced by Flush().

+ Here is the caller graph for this function:

◆ flush()

OStream & v8::internal::flush ( OStream os)

Definition at line 107 of file ostreams.cc.

107  { // NOLINT(runtime/references)
108  return os.flush();
109 }

References v8::internal::OStream::flush().

Referenced by endl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ForFixedTypedArray()

static void v8::internal::ForFixedTypedArray ( ExternalArrayType  array_type,
int element_size,
ElementsKind element_kind 
)
static

Definition at line 3380 of file heap.cc.

3381  {
3382  switch (array_type) {
3383 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
3384  case kExternal##Type##Array: \
3385  *element_size = size; \
3386  *element_kind = TYPE##_ELEMENTS; \
3387  return;
3388 
3390 #undef TYPED_ARRAY_CASE
3391 
3392  default:
3393  *element_size = 0; // Bogus
3394  *element_kind = UINT8_ELEMENTS; // Bogus
3395  UNREACHABLE();
3396  }
3397 }
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References TYPED_ARRAY_CASE, TYPED_ARRAYS, UINT8_ELEMENTS, and UNREACHABLE.

Referenced by v8::internal::Heap::AllocateFixedTypedArray().

+ Here is the caller graph for this function:

◆ Free()

template<MarkCompactCollector::SweepingParallelism mode>
static intptr_t v8::internal::Free ( PagedSpace space,
FreeList free_list,
Address  start,
int  size 
)
static

Definition at line 3278 of file mark-compact.cc.

3279  {
3280  if (mode == MarkCompactCollector::SWEEP_ON_MAIN_THREAD) {
3281  DCHECK(free_list == NULL);
3282  return space->Free(start, size);
3283  } else {
3284  // TODO(hpayer): account for wasted bytes in concurrent sweeping too.
3285  return size - free_list->Free(start, size);
3286  }
3287 }

References DCHECK, v8::internal::FreeList::Free(), mode(), NULL, size, space(), and v8::internal::MarkCompactCollector::SWEEP_ON_MAIN_THREAD.

Referenced by v8::internal::HandleScopeImplementer::FreeThreadResources().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreeListFragmentation()

static int v8::internal::FreeListFragmentation ( PagedSpace space,
Page p 
)
static

Definition at line 720 of file mark-compact.cc.

720  {
721  // If page was not swept then there are no free list items on it.
722  if (!p->WasSwept()) {
723  if (FLAG_trace_fragmentation) {
724  PrintF("%p [%s]: %d bytes live (unswept)\n", reinterpret_cast<void*>(p),
725  AllocationSpaceName(space->identity()), p->LiveBytes());
726  }
727  return 0;
728  }
729 
730  PagedSpace::SizeStats sizes;
731  space->ObtainFreeListStatistics(p, &sizes);
732 
733  intptr_t ratio;
734  intptr_t ratio_threshold;
735  intptr_t area_size = space->AreaSize();
736  if (space->identity() == CODE_SPACE) {
737  ratio = (sizes.medium_size_ * 10 + sizes.large_size_ * 2) * 100 / area_size;
738  ratio_threshold = 10;
739  } else {
740  ratio = (sizes.small_size_ * 5 + sizes.medium_size_) * 100 / area_size;
741  ratio_threshold = 15;
742  }
743 
744  if (FLAG_trace_fragmentation) {
745  PrintF("%p [%s]: %d (%.2f%%) %d (%.2f%%) %d (%.2f%%) %d (%.2f%%) %s\n",
746  reinterpret_cast<void*>(p), AllocationSpaceName(space->identity()),
747  static_cast<int>(sizes.small_size_),
748  static_cast<double>(sizes.small_size_ * 100) / area_size,
749  static_cast<int>(sizes.medium_size_),
750  static_cast<double>(sizes.medium_size_ * 100) / area_size,
751  static_cast<int>(sizes.large_size_),
752  static_cast<double>(sizes.large_size_ * 100) / area_size,
753  static_cast<int>(sizes.huge_size_),
754  static_cast<double>(sizes.huge_size_ * 100) / area_size,
755  (ratio > ratio_threshold) ? "[fragmented]" : "");
756  }
757 
758  if (FLAG_always_compact && sizes.Total() != area_size) {
759  return 1;
760  }
761 
762  if (ratio <= ratio_threshold) return 0; // Not fragmented.
763 
764  return static_cast<int>(ratio - ratio_threshold);
765 }
const char * AllocationSpaceName(AllocationSpace space)

References AllocationSpaceName(), CODE_SPACE, v8::internal::PagedSpace::SizeStats::huge_size_, v8::internal::PagedSpace::SizeStats::large_size_, v8::internal::MemoryChunk::LiveBytes(), v8::internal::PagedSpace::SizeStats::medium_size_, PrintF(), v8::internal::PagedSpace::SizeStats::small_size_, space(), v8::internal::PagedSpace::SizeStats::Total(), and v8::internal::Page::WasSwept().

Referenced by v8::internal::MarkCompactCollector::CollectEvacuationCandidates().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreezeDictionary()

template<typename Dictionary >
static void v8::internal::FreezeDictionary ( Dictionary dictionary)
static

Definition at line 5215 of file objects.cc.

5215  {
5216  int capacity = dictionary->Capacity();
5217  for (int i = 0; i < capacity; i++) {
5218  Object* k = dictionary->KeyAt(i);
5219  if (dictionary->IsKey(k) &&
5220  !(k->IsSymbol() && Symbol::cast(k)->is_private())) {
5221  PropertyDetails details = dictionary->DetailsAt(i);
5222  int attrs = DONT_DELETE;
5223  // READ_ONLY is an invalid attribute for JS setters/getters.
5224  if (details.type() == CALLBACKS) {
5225  Object* v = dictionary->ValueAt(i);
5226  if (v->IsPropertyCell()) v = PropertyCell::cast(v)->value();
5227  if (!v->IsAccessorPair()) attrs |= READ_ONLY;
5228  } else {
5229  attrs |= READ_ONLY;
5230  }
5231  details = details.CopyAddAttributes(
5232  static_cast<PropertyAttributes>(attrs));
5233  dictionary->DetailsAtPut(i, details);
5234  }
5235  }
5236 }

References CALLBACKS, v8::internal::HashTable< Derived, Shape, Key >::Capacity(), v8::internal::Dictionary< Derived, Shape, Key >::DetailsAt(), v8::internal::Dictionary< Derived, Shape, Key >::DetailsAtPut(), DONT_DELETE, v8::internal::HashTable< Derived, Shape, Key >::IsKey(), v8::internal::HashTable< Derived, Shape, Key >::KeyAt(), READ_ONLY, and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

Referenced by v8::internal::JSObject::Freeze().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FUNCTION_CAST()

template<typename F >
F v8::internal::FUNCTION_CAST ( Address  addr)

Definition at line 202 of file globals.h.

202  {
203  return reinterpret_cast<F>(reinterpret_cast<intptr_t>(addr));
204 }

References F.

◆ FusedMultiplyAdd() [1/2]

double v8::internal::FusedMultiplyAdd ( double  op1,
double  op2,
double  a 
)
inline

Definition at line 103 of file utils-arm64.h.

103  {
104  return fma(op1, op2, a);
105 }

◆ FusedMultiplyAdd() [2/2]

float v8::internal::FusedMultiplyAdd ( float  op1,
float  op2,
float  a 
)
inline

Definition at line 108 of file utils-arm64.h.

108  {
109  return fmaf(op1, op2, a);
110 }

◆ GCFunctionName()

static const char* v8::internal::GCFunctionName ( )
static

Definition at line 73 of file bootstrapper.cc.

73  {
74  bool flag_given = FLAG_expose_gc_as != NULL && strlen(FLAG_expose_gc_as) != 0;
75  return flag_given ? FLAG_expose_gc_as : "gc";
76 }

References NULL.

◆ GcSafeMapOfCodeSpaceObject()

static Map* v8::internal::GcSafeMapOfCodeSpaceObject ( HeapObject object)
static

Definition at line 1437 of file frames.cc.

1437  {
1438  MapWord map_word = object->map_word();
1439  return map_word.IsForwardingAddress() ?
1440  map_word.ToForwardingAddress()->map() : map_word.ToMap();
1441 }

References v8::internal::HeapObject::map_word().

Referenced by GcSafeSizeOfCodeSpaceObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GcSafeSizeOfCodeSpaceObject()

static int v8::internal::GcSafeSizeOfCodeSpaceObject ( HeapObject object)
static

Definition at line 1444 of file frames.cc.

1444  {
1445  return object->SizeFromMap(GcSafeMapOfCodeSpaceObject(object));
1446 }
static Map * GcSafeMapOfCodeSpaceObject(HeapObject *object)
Definition: frames.cc:1437

References GcSafeMapOfCodeSpaceObject().

Referenced by v8::internal::InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Generate_CallConstructStub_DebugBreak()

static void v8::internal::Generate_CallConstructStub_DebugBreak ( MacroAssembler masm)
static

Definition at line 1397 of file builtins.cc.

1397  {
1398  DebugCodegen::GenerateCallConstructStubDebugBreak(masm);
1399 }

References v8::internal::DebugCodegen::GenerateCallConstructStubDebugBreak().

+ Here is the call graph for this function:

◆ Generate_CallConstructStub_Recording_DebugBreak()

static void v8::internal::Generate_CallConstructStub_Recording_DebugBreak ( MacroAssembler masm)
static

Definition at line 1402 of file builtins.cc.

1403  {
1404  DebugCodegen::GenerateCallConstructStubRecordDebugBreak(masm);
1405 }

References v8::internal::DebugCodegen::GenerateCallConstructStubRecordDebugBreak().

+ Here is the call graph for this function:

◆ Generate_CallFunctionStub_DebugBreak()

static void v8::internal::Generate_CallFunctionStub_DebugBreak ( MacroAssembler masm)
static

Definition at line 1392 of file builtins.cc.

1392  {
1393  DebugCodegen::GenerateCallFunctionStubDebugBreak(masm);
1394 }

References v8::internal::DebugCodegen::GenerateCallFunctionStubDebugBreak().

+ Here is the call graph for this function:

◆ Generate_CallICStub_DebugBreak()

static void v8::internal::Generate_CallICStub_DebugBreak ( MacroAssembler masm)
static

Definition at line 1357 of file builtins.cc.

1357  {
1358  DebugCodegen::GenerateCallICStubDebugBreak(masm);
1359 }

References v8::internal::DebugCodegen::GenerateCallICStubDebugBreak().

+ Here is the call graph for this function:

◆ Generate_CompareNilIC_DebugBreak()

static void v8::internal::Generate_CompareNilIC_DebugBreak ( MacroAssembler masm)
static

Definition at line 1382 of file builtins.cc.

1382  {
1383  DebugCodegen::GenerateCompareNilICDebugBreak(masm);
1384 }

References v8::internal::DebugCodegen::GenerateCompareNilICDebugBreak().

+ Here is the call graph for this function:

◆ Generate_FrameDropper_LiveEdit()

static void v8::internal::Generate_FrameDropper_LiveEdit ( MacroAssembler masm)
static

Definition at line 1418 of file builtins.cc.

1418  {
1419  DebugCodegen::GenerateFrameDropperLiveEdit(masm);
1420 }

References v8::internal::DebugCodegen::GenerateFrameDropperLiveEdit().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_DebugBreak()

static void v8::internal::Generate_KeyedLoadIC_DebugBreak ( MacroAssembler masm)
static

Definition at line 1372 of file builtins.cc.

1372  {
1373  DebugCodegen::GenerateKeyedLoadICDebugBreak(masm);
1374 }

References v8::internal::DebugCodegen::GenerateKeyedLoadICDebugBreak().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_Generic()

static void v8::internal::Generate_KeyedLoadIC_Generic ( MacroAssembler masm)
static

Definition at line 1277 of file builtins.cc.

1277  {
1278  KeyedLoadIC::GenerateGeneric(masm);
1279 }

References v8::internal::KeyedLoadIC::GenerateGeneric().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_Initialize()

static void v8::internal::Generate_KeyedLoadIC_Initialize ( MacroAssembler masm)
static

Definition at line 1262 of file builtins.cc.

1262  {
1263  KeyedLoadIC::GenerateInitialize(masm);
1264 }

References v8::internal::KeyedLoadIC::GenerateInitialize().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_Miss()

static void v8::internal::Generate_KeyedLoadIC_Miss ( MacroAssembler masm)
static

Definition at line 1272 of file builtins.cc.

1272  {
1273  KeyedLoadIC::GenerateMiss(masm);
1274 }

References v8::internal::KeyedLoadIC::GenerateMiss().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_PreMonomorphic()

static void v8::internal::Generate_KeyedLoadIC_PreMonomorphic ( MacroAssembler masm)
static

Definition at line 1287 of file builtins.cc.

1287  {
1288  KeyedLoadIC::GeneratePreMonomorphic(masm);
1289 }

References v8::internal::KeyedLoadIC::GeneratePreMonomorphic().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_Slow()

static void v8::internal::Generate_KeyedLoadIC_Slow ( MacroAssembler masm)
static

Definition at line 1267 of file builtins.cc.

1267  {
1268  KeyedLoadIC::GenerateRuntimeGetProperty(masm);
1269 }

References v8::internal::KeyedLoadIC::GenerateRuntimeGetProperty().

+ Here is the call graph for this function:

◆ Generate_KeyedLoadIC_String()

static void v8::internal::Generate_KeyedLoadIC_String ( MacroAssembler masm)
static

Definition at line 1282 of file builtins.cc.

1282  {
1283  KeyedLoadIC::GenerateString(masm);
1284 }

References v8::internal::KeyedLoadIC::GenerateString().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_DebugBreak()

static void v8::internal::Generate_KeyedStoreIC_DebugBreak ( MacroAssembler masm)
static

Definition at line 1377 of file builtins.cc.

1377  {
1378  DebugCodegen::GenerateKeyedStoreICDebugBreak(masm);
1379 }

References v8::internal::DebugCodegen::GenerateKeyedStoreICDebugBreak().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Generic()

static void v8::internal::Generate_KeyedStoreIC_Generic ( MacroAssembler masm)
static

Definition at line 1317 of file builtins.cc.

1317  {
1318  KeyedStoreIC::GenerateGeneric(masm, SLOPPY);
1319 }

References v8::internal::KeyedStoreIC::GenerateGeneric(), and SLOPPY.

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Generic_Strict()

static void v8::internal::Generate_KeyedStoreIC_Generic_Strict ( MacroAssembler masm)
static

Definition at line 1322 of file builtins.cc.

1322  {
1323  KeyedStoreIC::GenerateGeneric(masm, STRICT);
1324 }

References v8::internal::KeyedStoreIC::GenerateGeneric(), and STRICT.

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Initialize()

static void v8::internal::Generate_KeyedStoreIC_Initialize ( MacroAssembler masm)
static

Definition at line 1332 of file builtins.cc.

1332  {
1333  KeyedStoreIC::GenerateInitialize(masm);
1334 }

References v8::internal::KeyedStoreIC::GenerateInitialize().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Initialize_Strict()

static void v8::internal::Generate_KeyedStoreIC_Initialize_Strict ( MacroAssembler masm)
static

Definition at line 1337 of file builtins.cc.

1337  {
1338  KeyedStoreIC::GenerateInitialize(masm);
1339 }

References v8::internal::KeyedStoreIC::GenerateInitialize().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Miss()

static void v8::internal::Generate_KeyedStoreIC_Miss ( MacroAssembler masm)
static

Definition at line 1327 of file builtins.cc.

1327  {
1328  KeyedStoreIC::GenerateMiss(masm);
1329 }

References v8::internal::KeyedStoreIC::GenerateMiss().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_PreMonomorphic()

static void v8::internal::Generate_KeyedStoreIC_PreMonomorphic ( MacroAssembler masm)
static

Definition at line 1342 of file builtins.cc.

1342  {
1343  KeyedStoreIC::GeneratePreMonomorphic(masm);
1344 }

References v8::internal::KeyedStoreIC::GeneratePreMonomorphic().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_PreMonomorphic_Strict()

static void v8::internal::Generate_KeyedStoreIC_PreMonomorphic_Strict ( MacroAssembler masm)
static

Definition at line 1347 of file builtins.cc.

1347  {
1348  KeyedStoreIC::GeneratePreMonomorphic(masm);
1349 }

References v8::internal::KeyedStoreIC::GeneratePreMonomorphic().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_SloppyArguments()

static void v8::internal::Generate_KeyedStoreIC_SloppyArguments ( MacroAssembler masm)
static

Definition at line 1352 of file builtins.cc.

1352  {
1353  KeyedStoreIC::GenerateSloppyArguments(masm);
1354 }

References v8::internal::KeyedStoreIC::GenerateSloppyArguments().

+ Here is the call graph for this function:

◆ Generate_KeyedStoreIC_Slow()

static void v8::internal::Generate_KeyedStoreIC_Slow ( MacroAssembler masm)
static

Definition at line 1307 of file builtins.cc.

1307  {
1308  ElementHandlerCompiler::GenerateStoreSlow(masm);
1309 }

References v8::internal::ElementHandlerCompiler::GenerateStoreSlow().

+ Here is the call graph for this function:

◆ Generate_LoadIC_DebugBreak()

static void v8::internal::Generate_LoadIC_DebugBreak ( MacroAssembler masm)
static

Definition at line 1362 of file builtins.cc.

1362  {
1363  DebugCodegen::GenerateLoadICDebugBreak(masm);
1364 }

References v8::internal::DebugCodegen::GenerateLoadICDebugBreak().

+ Here is the call graph for this function:

◆ Generate_LoadIC_Getter_ForDeopt()

static void v8::internal::Generate_LoadIC_Getter_ForDeopt ( MacroAssembler masm)
static

Definition at line 1252 of file builtins.cc.

1252  {
1253  NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt(masm);
1254 }

References v8::internal::NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt().

+ Here is the call graph for this function:

◆ Generate_LoadIC_Miss()

static void v8::internal::Generate_LoadIC_Miss ( MacroAssembler masm)
static

Definition at line 1242 of file builtins.cc.

1242  {
1243  LoadIC::GenerateMiss(masm);
1244 }

References v8::internal::LoadIC::GenerateMiss().

+ Here is the call graph for this function:

◆ Generate_LoadIC_Normal()

static void v8::internal::Generate_LoadIC_Normal ( MacroAssembler masm)
static

Definition at line 1247 of file builtins.cc.

1247  {
1248  LoadIC::GenerateNormal(masm);
1249 }

References v8::internal::LoadIC::GenerateNormal().

+ Here is the call graph for this function:

◆ Generate_LoadIC_Slow()

static void v8::internal::Generate_LoadIC_Slow ( MacroAssembler masm)
static

Definition at line 1257 of file builtins.cc.

1257  {
1258  LoadIC::GenerateRuntimeGetProperty(masm);
1259 }

References v8::internal::LoadIC::GenerateRuntimeGetProperty().

+ Here is the call graph for this function:

◆ Generate_PlainReturn_LiveEdit()

static void v8::internal::Generate_PlainReturn_LiveEdit ( MacroAssembler masm)
static

Definition at line 1413 of file builtins.cc.

1413  {
1414  DebugCodegen::GeneratePlainReturnLiveEdit(masm);
1415 }

References v8::internal::DebugCodegen::GeneratePlainReturnLiveEdit().

+ Here is the call graph for this function:

◆ Generate_Return_DebugBreak()

static void v8::internal::Generate_Return_DebugBreak ( MacroAssembler masm)
static

Definition at line 1387 of file builtins.cc.

1387  {
1388  DebugCodegen::GenerateReturnDebugBreak(masm);
1389 }

References v8::internal::DebugCodegen::GenerateReturnDebugBreak().

+ Here is the call graph for this function:

◆ Generate_Slot_DebugBreak()

static void v8::internal::Generate_Slot_DebugBreak ( MacroAssembler masm)
static

Definition at line 1408 of file builtins.cc.

1408  {
1409  DebugCodegen::GenerateSlotDebugBreak(masm);
1410 }

References v8::internal::DebugCodegen::GenerateSlotDebugBreak().

+ Here is the call graph for this function:

◆ Generate_StoreIC_DebugBreak()

static void v8::internal::Generate_StoreIC_DebugBreak ( MacroAssembler masm)
static

Definition at line 1367 of file builtins.cc.

1367  {
1368  DebugCodegen::GenerateStoreICDebugBreak(masm);
1369 }

References v8::internal::DebugCodegen::GenerateStoreICDebugBreak().

+ Here is the call graph for this function:

◆ Generate_StoreIC_Miss()

static void v8::internal::Generate_StoreIC_Miss ( MacroAssembler masm)
static

Definition at line 1292 of file builtins.cc.

1292  {
1293  StoreIC::GenerateMiss(masm);
1294 }

References v8::internal::StoreIC::GenerateMiss().

+ Here is the call graph for this function:

◆ Generate_StoreIC_Normal()

static void v8::internal::Generate_StoreIC_Normal ( MacroAssembler masm)
static

Definition at line 1297 of file builtins.cc.

1297  {
1298  StoreIC::GenerateNormal(masm);
1299 }

References v8::internal::StoreIC::GenerateNormal().

+ Here is the call graph for this function:

◆ Generate_StoreIC_Setter_ForDeopt()

static void v8::internal::Generate_StoreIC_Setter_ForDeopt ( MacroAssembler masm)
static

Definition at line 1312 of file builtins.cc.

1312  {
1313  NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm);
1314 }

References v8::internal::NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt().

+ Here is the call graph for this function:

◆ Generate_StoreIC_Slow()

static void v8::internal::Generate_StoreIC_Slow ( MacroAssembler masm)
static

Definition at line 1302 of file builtins.cc.

1302  {
1303  NamedStoreHandlerCompiler::GenerateSlow(masm);
1304 }

References v8::internal::NamedStoreHandlerCompiler::GenerateSlow().

+ Here is the call graph for this function:

◆ GenerateBranches()

static void v8::internal::GenerateBranches ( RegExpMacroAssembler masm,
ZoneList< int > *  ranges,
int  start_index,
int  end_index,
uc16  min_char,
uc16  max_char,
Label *  fall_through,
Label *  even_label,
Label *  odd_label 
)
static

Definition at line 1963 of file jsregexp.cc.

1971  {
1972  int first = ranges->at(start_index);
1973  int last = ranges->at(end_index) - 1;
1974 
1975  DCHECK_LT(min_char, first);
1976 
1977  // Just need to test if the character is before or on-or-after
1978  // a particular character.
1979  if (start_index == end_index) {
1980  EmitBoundaryTest(masm, first, fall_through, even_label, odd_label);
1981  return;
1982  }
1983 
1984  // Another almost trivial case: There is one interval in the middle that is
1985  // different from the end intervals.
1986  if (start_index + 1 == end_index) {
1988  masm, first, last, fall_through, even_label, odd_label);
1989  return;
1990  }
1991 
1992  // It's not worth using table lookup if there are very few intervals in the
1993  // character class.
1994  if (end_index - start_index <= 6) {
1995  // It is faster to test for individual characters, so we look for those
1996  // first, then try arbitrary ranges in the second round.
1997  static int kNoCutIndex = -1;
1998  int cut = kNoCutIndex;
1999  for (int i = start_index; i < end_index; i++) {
2000  if (ranges->at(i) == ranges->at(i + 1) - 1) {
2001  cut = i;
2002  break;
2003  }
2004  }
2005  if (cut == kNoCutIndex) cut = start_index;
2006  CutOutRange(
2007  masm, ranges, start_index, end_index, cut, even_label, odd_label);
2008  DCHECK_GE(end_index - start_index, 2);
2009  GenerateBranches(masm,
2010  ranges,
2011  start_index + 1,
2012  end_index - 1,
2013  min_char,
2014  max_char,
2015  fall_through,
2016  even_label,
2017  odd_label);
2018  return;
2019  }
2020 
2021  // If there are a lot of intervals in the regexp, then we will use tables to
2022  // determine whether the character is inside or outside the character class.
2023  static const int kBits = RegExpMacroAssembler::kTableSizeBits;
2024 
2025  if ((max_char >> kBits) == (min_char >> kBits)) {
2026  EmitUseLookupTable(masm,
2027  ranges,
2028  start_index,
2029  end_index,
2030  min_char,
2031  fall_through,
2032  even_label,
2033  odd_label);
2034  return;
2035  }
2036 
2037  if ((min_char >> kBits) != (first >> kBits)) {
2038  masm->CheckCharacterLT(first, odd_label);
2039  GenerateBranches(masm,
2040  ranges,
2041  start_index + 1,
2042  end_index,
2043  first,
2044  max_char,
2045  fall_through,
2046  odd_label,
2047  even_label);
2048  return;
2049  }
2050 
2051  int new_start_index = 0;
2052  int new_end_index = 0;
2053  int border = 0;
2054 
2055  SplitSearchSpace(ranges,
2056  start_index,
2057  end_index,
2058  &new_start_index,
2059  &new_end_index,
2060  &border);
2061 
2062  Label handle_rest;
2063  Label* above = &handle_rest;
2064  if (border == last + 1) {
2065  // We didn't find any section that started after the limit, so everything
2066  // above the border is one of the terminal labels.
2067  above = (end_index & 1) != (start_index & 1) ? odd_label : even_label;
2068  DCHECK(new_end_index == end_index - 1);
2069  }
2070 
2071  DCHECK_LE(start_index, new_end_index);
2072  DCHECK_LE(new_start_index, end_index);
2073  DCHECK_LT(start_index, new_start_index);
2074  DCHECK_LT(new_end_index, end_index);
2075  DCHECK(new_end_index + 1 == new_start_index ||
2076  (new_end_index + 2 == new_start_index &&
2077  border == ranges->at(new_end_index + 1)));
2078  DCHECK_LT(min_char, border - 1);
2079  DCHECK_LT(border, max_char);
2080  DCHECK_LT(ranges->at(new_end_index), border);
2081  DCHECK(border < ranges->at(new_start_index) ||
2082  (border == ranges->at(new_start_index) &&
2083  new_start_index == end_index &&
2084  new_end_index == end_index - 1 &&
2085  border == last + 1));
2086  DCHECK(new_start_index == 0 || border >= ranges->at(new_start_index - 1));
2087 
2088  masm->CheckCharacterGT(border - 1, above);
2089  Label dummy;
2090  GenerateBranches(masm,
2091  ranges,
2092  start_index,
2093  new_end_index,
2094  min_char,
2095  border - 1,
2096  &dummy,
2097  even_label,
2098  odd_label);
2099  if (handle_rest.is_linked()) {
2100  masm->Bind(&handle_rest);
2101  bool flip = (new_start_index & 1) != (start_index & 1);
2102  GenerateBranches(masm,
2103  ranges,
2104  new_start_index,
2105  end_index,
2106  border,
2107  max_char,
2108  &dummy,
2109  flip ? odd_label : even_label,
2110  flip ? even_label : odd_label);
2111  }
2112 }
#define DCHECK_GE(v1, v2)
Definition: logging.h:208
static void EmitUseLookupTable(RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, int min_char, Label *fall_through, Label *even_label, Label *odd_label)
Definition: jsregexp.cc:1803
static void SplitSearchSpace(ZoneList< int > *ranges, int start_index, int end_index, int *new_start_index, int *new_end_index, int *border)
Definition: jsregexp.cc:1893
static void EmitBoundaryTest(RegExpMacroAssembler *masm, int border, Label *fall_through, Label *above_or_equal, Label *below)
Definition: jsregexp.cc:1764
static void CutOutRange(RegExpMacroAssembler *masm, ZoneList< int > *ranges, int start_index, int end_index, int cut_index, Label *even_label, Label *odd_label)
Definition: jsregexp.cc:1862

References above, v8::internal::List< T, AllocationPolicy >::at(), v8::internal::RegExpMacroAssembler::Bind(), v8::internal::RegExpMacroAssembler::CheckCharacterGT(), v8::internal::RegExpMacroAssembler::CheckCharacterLT(), CutOutRange(), DCHECK, DCHECK_GE, DCHECK_LE, DCHECK_LT, EmitBoundaryTest(), EmitDoubleBoundaryTest(), EmitUseLookupTable(), v8::internal::RegExpMacroAssembler::kTableSizeBits, and SplitSearchSpace().

Referenced by EmitCharClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateCountedDigits()

static void v8::internal::GenerateCountedDigits ( int  count,
int decimal_point,
Bignum numerator,
Bignum denominator,
Vector< char >  buffer,
int length 
)
static

Definition at line 247 of file bignum-dtoa.cc.

249  {
250  DCHECK(count >= 0);
251  for (int i = 0; i < count - 1; ++i) {
252  uint16_t digit;
253  digit = numerator->DivideModuloIntBignum(*denominator);
254  DCHECK(digit <= 9); // digit is a uint16_t and therefore always positive.
255  // digit = numerator / denominator (integer division).
256  // numerator = numerator % denominator.
257  buffer[i] = digit + '0';
258  // Prepare for next iteration.
259  numerator->Times10();
260  }
261  // Generate the last digit.
262  uint16_t digit;
263  digit = numerator->DivideModuloIntBignum(*denominator);
264  if (Bignum::PlusCompare(*numerator, *numerator, *denominator) >= 0) {
265  digit++;
266  }
267  buffer[count - 1] = digit + '0';
268  // Correct bad digits (in case we had a sequence of '9's). Propagate the
269  // carry until we hat a non-'9' or til we reach the first digit.
270  for (int i = count - 1; i > 0; --i) {
271  if (buffer[i] != '0' + 10) break;
272  buffer[i] = '0';
273  buffer[i - 1]++;
274  }
275  if (buffer[0] == '0' + 10) {
276  // Propagate a carry past the top place.
277  buffer[0] = '1';
278  (*decimal_point)++;
279  }
280  *length = count;
281 }

References DCHECK, v8::internal::Bignum::DivideModuloIntBignum(), v8::internal::Bignum::PlusCompare(), and v8::internal::Bignum::Times10().

Referenced by BignumDtoa(), and BignumToFixed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateIdentityHash()

static Smi* v8::internal::GenerateIdentityHash ( Isolate isolate)
static

Definition at line 4519 of file objects.cc.

4519  {
4520  int hash_value;
4521  int attempts = 0;
4522  do {
4523  // Generate a random 32-bit hash value but limit range to fit
4524  // within a smi.
4525  hash_value = isolate->random_number_generator()->NextInt() & Smi::kMaxValue;
4526  attempts++;
4527  } while (hash_value == 0 && attempts < 30);
4528  hash_value = hash_value != 0 ? hash_value : 1; // never return 0
4529 
4530  return Smi::FromInt(hash_value);
4531 }

References v8::internal::Smi::FromInt(), v8::internal::Smi::kMaxValue, and v8::internal::Isolate::random_number_generator().

Referenced by v8::internal::JSObject::GetOrCreateIdentityHash(), and GetOrCreateIdentityHashHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateShortestDigits()

static void v8::internal::GenerateShortestDigits ( Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus,
bool  is_even,
Vector< char >  buffer,
int length 
)
static

Definition at line 149 of file bignum-dtoa.cc.

152  {
153  // Small optimization: if delta_minus and delta_plus are the same just reuse
154  // one of the two bignums.
155  if (Bignum::Equal(*delta_minus, *delta_plus)) {
156  delta_plus = delta_minus;
157  }
158  *length = 0;
159  while (true) {
160  uint16_t digit;
161  digit = numerator->DivideModuloIntBignum(*denominator);
162  DCHECK(digit <= 9); // digit is a uint16_t and therefore always positive.
163  // digit = numerator / denominator (integer division).
164  // numerator = numerator % denominator.
165  buffer[(*length)++] = digit + '0';
166 
167  // Can we stop already?
168  // If the remainder of the division is less than the distance to the lower
169  // boundary we can stop. In this case we simply round down (discarding the
170  // remainder).
171  // Similarly we test if we can round up (using the upper boundary).
172  bool in_delta_room_minus;
173  bool in_delta_room_plus;
174  if (is_even) {
175  in_delta_room_minus = Bignum::LessEqual(*numerator, *delta_minus);
176  } else {
177  in_delta_room_minus = Bignum::Less(*numerator, *delta_minus);
178  }
179  if (is_even) {
180  in_delta_room_plus =
181  Bignum::PlusCompare(*numerator, *delta_plus, *denominator) >= 0;
182  } else {
183  in_delta_room_plus =
184  Bignum::PlusCompare(*numerator, *delta_plus, *denominator) > 0;
185  }
186  if (!in_delta_room_minus && !in_delta_room_plus) {
187  // Prepare for next iteration.
188  numerator->Times10();
189  delta_minus->Times10();
190  // We optimized delta_plus to be equal to delta_minus (if they share the
191  // same value). So don't multiply delta_plus if they point to the same
192  // object.
193  if (delta_minus != delta_plus) {
194  delta_plus->Times10();
195  }
196  } else if (in_delta_room_minus && in_delta_room_plus) {
197  // Let's see if 2*numerator < denominator.
198  // If yes, then the next digit would be < 5 and we can round down.
199  int compare = Bignum::PlusCompare(*numerator, *numerator, *denominator);
200  if (compare < 0) {
201  // Remaining digits are less than .5. -> Round down (== do nothing).
202  } else if (compare > 0) {
203  // Remaining digits are more than .5 of denominator. -> Round up.
204  // Note that the last digit could not be a '9' as otherwise the whole
205  // loop would have stopped earlier.
206  // We still have an assert here in case the preconditions were not
207  // satisfied.
208  DCHECK(buffer[(*length) - 1] != '9');
209  buffer[(*length) - 1]++;
210  } else {
211  // Halfway case.
212  // TODO(floitsch): need a way to solve half-way cases.
213  // For now let's round towards even (since this is what Gay seems to
214  // do).
215 
216  if ((buffer[(*length) - 1] - '0') % 2 == 0) {
217  // Round down => Do nothing.
218  } else {
219  DCHECK(buffer[(*length) - 1] != '9');
220  buffer[(*length) - 1]++;
221  }
222  }
223  return;
224  } else if (in_delta_room_minus) {
225  // Round down (== do nothing).
226  return;
227  } else { // in_delta_room_plus
228  // Round up.
229  // Note again that the last digit could not be '9' since this would have
230  // stopped the loop earlier.
231  // We still have an DCHECK here, in case the preconditions were not
232  // satisfied.
233  DCHECK(buffer[(*length) -1] != '9');
234  buffer[(*length) - 1]++;
235  return;
236  }
237  }
238 }

References DCHECK, v8::internal::Bignum::DivideModuloIntBignum(), v8::internal::Bignum::Equal(), v8::internal::Bignum::Less(), v8::internal::Bignum::LessEqual(), v8::internal::Bignum::PlusCompare(), and v8::internal::Bignum::Times10().

Referenced by BignumDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAccessCheckInfo()

static AccessCheckInfo* v8::internal::GetAccessCheckInfo ( Isolate isolate,
Handle< JSObject receiver 
)
inlinestatic

Definition at line 621 of file isolate.cc.

622  {
623  JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
624  if (!constructor->shared()->IsApiFunction()) return NULL;
625 
626  Object* data_obj =
627  constructor->shared()->get_api_func_data()->access_check_info();
628  if (data_obj == isolate->heap()->undefined_value()) return NULL;
629 
630  return AccessCheckInfo::cast(data_obj);
631 }

References v8::internal::Isolate::heap(), and NULL.

Referenced by v8::internal::Isolate::MayIndexedAccess(), v8::internal::Isolate::MayNamedAccess(), and v8::internal::Isolate::ReportFailedAccessCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAllocatableRegisterThatIsNotOneOf()

Register v8::internal::GetAllocatableRegisterThatIsNotOneOf ( Register  reg1,
Register  reg2 = NoReg,
Register  reg3 = NoReg,
Register  reg4 = NoReg 
)

◆ GetArrayLength()

static int v8::internal::GetArrayLength ( Handle< JSArray array)
static

Definition at line 601 of file liveedit.cc.

601  {
602  Object* length = array->length();
603  CHECK(length->IsSmi());
604  return Smi::cast(length)->value();
605 }
#define CHECK(condition)
Definition: logging.h:36

References CHECK.

Referenced by CheckActivation(), v8::internal::LiveEdit::CheckAndDropActivations(), DropActivationsInActiveThread(), TranslatePosition(), and v8::internal::LiveEdit::WrapSharedFunctionInfos().

+ Here is the caller graph for this function:

◆ GetBailoutReason()

const char * v8::internal::GetBailoutReason ( BailoutReason  reason)

Definition at line 11 of file bailout-reason.cc.

11  {
12  DCHECK(reason < kLastErrorMessage);
13 #define ERROR_MESSAGES_TEXTS(C, T) T,
14  static const char* error_messages_[] = {
16 #undef ERROR_MESSAGES_TEXTS
17  return error_messages_[reason];
18 }
#define ERROR_MESSAGES_TEXTS(C, T)

References DCHECK, ERROR_MESSAGES_LIST, and ERROR_MESSAGES_TEXTS.

Referenced by v8::internal::CpuProfiler::CodeCreateEvent(), v8::internal::CpuProfiler::CodeDisableOptEvent(), v8::internal::Logger::CodeDisableOptEvent(), v8::internal::SharedFunctionInfo::DisableOptimization(), v8::internal::Compiler::GetConcurrentlyOptimizedCode(), GetOptimizedCodeNow(), OptimizeGraph(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ GetCallerArguments()

static SmartArrayPointer<Handle<Object> > v8::internal::GetCallerArguments ( Isolate isolate,
int  prefix_argc,
int total_argc 
)
static

Definition at line 3506 of file runtime.cc.

3508  {
3509  // Find frame containing arguments passed to the caller.
3510  JavaScriptFrameIterator it(isolate);
3511  JavaScriptFrame* frame = it.frame();
3512  List<JSFunction*> functions(2);
3513  frame->GetFunctions(&functions);
3514  if (functions.length() > 1) {
3515  int inlined_jsframe_index = functions.length() - 1;
3516  JSFunction* inlined_function = functions[inlined_jsframe_index];
3517  SlotRefValueBuilder slot_refs(
3518  frame, inlined_jsframe_index,
3519  inlined_function->shared()->formal_parameter_count());
3520 
3521  int args_count = slot_refs.args_length();
3522 
3523  *total_argc = prefix_argc + args_count;
3524  SmartArrayPointer<Handle<Object> > param_data(
3525  NewArray<Handle<Object> >(*total_argc));
3526  slot_refs.Prepare(isolate);
3527  for (int i = 0; i < args_count; i++) {
3528  Handle<Object> val = slot_refs.GetNext(isolate, 0);
3529  param_data[prefix_argc + i] = val;
3530  }
3531  slot_refs.Finish(isolate);
3532 
3533  return param_data;
3534  } else {
3535  it.AdvanceToArgumentsFrame();
3536  frame = it.frame();
3537  int args_count = frame->ComputeParametersCount();
3538 
3539  *total_argc = prefix_argc + args_count;
3540  SmartArrayPointer<Handle<Object> > param_data(
3541  NewArray<Handle<Object> >(*total_argc));
3542  for (int i = 0; i < args_count; i++) {
3543  Handle<Object> val = Handle<Object>(frame->GetParameter(i), isolate);
3544  param_data[prefix_argc + i] = val;
3545  }
3546  return param_data;
3547  }
3548 }
T * NewArray(size_t size)
Definition: allocation.h:60

References v8::internal::JavaScriptFrame::ComputeParametersCount(), v8::internal::JavaScriptFrame::GetFunctions(), v8::internal::JavaScriptFrame::GetParameter(), and NewArray().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCaseIndependentLetters()

static int v8::internal::GetCaseIndependentLetters ( Isolate isolate,
uc16  character,
bool  one_byte_subject,
unibrow::uchar letters 
)
static

Definition at line 1590 of file jsregexp.cc.

1592  {
1593  int length =
1594  isolate->jsregexp_uncanonicalize()->get(character, '\0', letters);
1595  // Unibrow returns 0 or 1 for characters where case independence is
1596  // trivial.
1597  if (length == 0) {
1598  letters[0] = character;
1599  length = 1;
1600  }
1601  if (!one_byte_subject || character <= String::kMaxOneByteCharCode) {
1602  return length;
1603  }
1604 
1605  // The standard requires that non-ASCII characters cannot have ASCII
1606  // character codes in their equivalence class.
1607  // TODO(dcarney): issue 3550 this is not actually true for Latin1 anymore,
1608  // is it? For example, \u00C5 is equivalent to \u212B.
1609  return 0;
1610 }

References unibrow::Mapping< T, size >::get(), v8::internal::Isolate::jsregexp_uncanonicalize(), and v8::internal::String::kMaxOneByteCharCode.

Referenced by EmitAtomLetter(), EmitAtomNonLetter(), v8::internal::TextNode::FillInBMInfo(), and v8::internal::TextNode::GetQuickCheckDetails().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCharAt()

static Handle<Object> v8::internal::GetCharAt ( Handle< String string,
uint32_t  index 
)
static

Definition at line 1840 of file runtime.cc.

1840  {
1841  if (index < static_cast<uint32_t>(string->length())) {
1842  Factory* factory = string->GetIsolate()->factory();
1843  return factory->LookupSingleCharacterStringFromCode(
1844  String::Flatten(string)->Get(index));
1845  }
1846  return Execution::CharAt(string, index);
1847 }

References v8::internal::String::Flatten().

Referenced by v8::internal::Runtime::GetElementOrCharAt(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCharVector()

template<>
Vector< const uc16 > v8::internal::GetCharVector ( Handle< String string)

Definition at line 23 of file runtime-uri.cc.

23  {
24  String::FlatContent flat = string->GetFlatContent();
25  DCHECK(flat.IsOneByte());
26  return flat.ToOneByteVector();
27 }

References DCHECK, v8::internal::String::FlatContent::IsOneByte(), and v8::internal::String::FlatContent::ToOneByteVector().

+ Here is the call graph for this function:

◆ GetCodeFromOptimizedCodeMap()

static MUST_USE_RESULT MaybeHandle<Code> v8::internal::GetCodeFromOptimizedCodeMap ( Handle< JSFunction function,
BailoutId  osr_ast_id 
)
static

Definition at line 682 of file compiler.cc.

683  {
684  if (FLAG_cache_optimized_code) {
685  Handle<SharedFunctionInfo> shared(function->shared());
686  // Bound functions are not cached.
687  if (shared->bound()) return MaybeHandle<Code>();
689  int index = shared->SearchOptimizedCodeMap(
690  function->context()->native_context(), osr_ast_id);
691  if (index > 0) {
692  if (FLAG_trace_opt) {
693  PrintF("[found optimized code for ");
694  function->ShortPrint();
695  if (!osr_ast_id.IsNone()) {
696  PrintF(" at OSR AST id %d", osr_ast_id.ToInt());
697  }
698  PrintF("]\n");
699  }
700  FixedArray* literals = shared->GetLiteralsFromOptimizedCodeMap(index);
701  if (literals != NULL) function->set_literals(literals);
702  return Handle<Code>(shared->GetCodeFromOptimizedCodeMap(index));
703  }
704  }
705  return MaybeHandle<Code>();
706 }

References v8::internal::BailoutId::IsNone(), literals(), NULL, PrintF(), and v8::internal::BailoutId::ToInt().

Referenced by v8::internal::Compiler::GetOptimizedCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCurrentStackPosition()

DISABLE_ASAN uintptr_t v8::internal::GetCurrentStackPosition ( )
inline

Definition at line 1460 of file utils.h.

1460  {
1461  // Takes the address of the limit variable in order to find out where
1462  // the top of stack is right now.
1463  uintptr_t limit = reinterpret_cast<uintptr_t>(&limit);
1464  return limit;
1465 }

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::HasOverflowed(), v8::internal::ParserBase< Traits >::INLINE(), and v8::TryCatch::TryCatch().

+ Here is the caller graph for this function:

◆ GetDebugEventContext()

static v8::Handle<v8::Context> v8::internal::GetDebugEventContext ( Isolate isolate)
static

Definition at line 52 of file debug.cc.

52  {
53  Handle<Context> context = isolate->debug()->debugger_entry()->GetContext();
54  // Isolate::context() may have been NULL when "script collected" event
55  // occured.
56  if (context.is_null()) return v8::Local<v8::Context>();
57  Handle<Context> native_context(context->native_context());
58  return v8::Utils::ToLocal(native_context);
59 }

References v8::internal::Isolate::debug(), v8::internal::Debug::debugger_entry(), v8::internal::Handle< T >::is_null(), and v8::Utils::ToLocal().

Referenced by v8::internal::MessageImpl::GetEventContext(), and v8::internal::EventDetailsImpl::GetEventContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDeclaredAccessorProperty()

static Handle<Object> v8::internal::GetDeclaredAccessorProperty ( Handle< Object receiver,
Handle< DeclaredAccessorInfo info,
Isolate isolate 
)
static

Definition at line 329 of file objects.cc.

332  {
334  char* current = reinterpret_cast<char*>(*receiver);
335  DeclaredAccessorDescriptorIterator iterator(info->descriptor());
336  while (true) {
337  const DeclaredAccessorDescriptorData* data = iterator.Next();
338  switch (data->type) {
340  DCHECK(iterator.Complete());
341  current = *CheckedCast<char*>(current);
342  return handle(*CheckedCast<Object*>(current), isolate);
343  }
345  DCHECK(!iterator.Complete());
346  current = *reinterpret_cast<char**>(current);
347  break;
349  DCHECK(!iterator.Complete());
350  current += data->pointer_shift_descriptor.byte_offset;
351  break;
353  DCHECK(!iterator.Complete());
354  Object* object = CheckedCast<Object>(current);
355  int field = data->object_dereference_descriptor.internal_field;
356  Object* smi = JSObject::cast(object)->GetInternalField(field);
357  DCHECK(smi->IsSmi());
358  current = reinterpret_cast<char*>(smi);
359  break;
360  }
362  DCHECK(iterator.Complete());
363  return PerformCompare(data->bitmask_compare_descriptor,
364  current,
365  isolate);
367  DCHECK(iterator.Complete());
368  return PerformCompare(data->pointer_compare_descriptor,
369  current,
370  isolate);
372  DCHECK(iterator.Complete());
373  return GetPrimitiveValue(data->primitive_value_descriptor,
374  current,
375  isolate);
376  }
377  }
378  UNREACHABLE();
379  return isolate->factory()->undefined_value();
380 }
static Handle< Object > GetPrimitiveValue(const PrimitiveValueDescriptor &descriptor, char *ptr, Isolate *isolate)
Definition: objects.cc:282
static Handle< Object > PerformCompare(const PointerCompareDescriptor &descriptor, char *ptr, Isolate *isolate)
Definition: objects.cc:272

References v8::internal::DeclaredAccessorDescriptorData::bitmask_compare_descriptor, v8::internal::PointerShiftDescriptor::byte_offset, v8::internal::DeclaredAccessorDescriptorIterator::Complete(), DCHECK, v8::internal::Isolate::factory(), GetPrimitiveValue(), handle(), v8::internal::ObjectDerefenceDescriptor::internal_field, kDescriptorBitmaskCompare, kDescriptorObjectDereference, kDescriptorPointerCompare, kDescriptorPointerDereference, kDescriptorPointerShift, kDescriptorPrimitiveValue, kDescriptorReturnObject, v8::internal::DeclaredAccessorDescriptorIterator::Next(), v8::internal::DeclaredAccessorDescriptorData::object_dereference_descriptor, PerformCompare(), v8::internal::DeclaredAccessorDescriptorData::pointer_compare_descriptor, v8::internal::DeclaredAccessorDescriptorData::pointer_shift_descriptor, v8::internal::DeclaredAccessorDescriptorData::primitive_value_descriptor, v8::internal::DeclaredAccessorDescriptorData::type, and UNREACHABLE.

Referenced by v8::internal::JSObject::GetElementWithCallback(), and v8::internal::Object::GetPropertyWithAccessor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDefaultHeaderSizeForElementsKind()

int v8::internal::GetDefaultHeaderSizeForElementsKind ( ElementsKind  elements_kind)

Definition at line 55 of file elements-kind.cc.

55  {
56  STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize);
57  return IsExternalArrayElementsKind(elements_kind)
58  ? 0 : (FixedArray::kHeaderSize - kHeapObjectTag);
59 }

References IsExternalArrayElementsKind(), v8::internal::FixedArrayBase::kHeaderSize, kHeapObjectTag, and STATIC_ASSERT().

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HLoadKeyed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEnumPropertyKeys()

static Handle<FixedArray> v8::internal::GetEnumPropertyKeys ( Handle< JSObject object,
bool  cache_result 
)
static

Definition at line 5699 of file objects.cc.

5700  {
5701  Isolate* isolate = object->GetIsolate();
5702  if (object->HasFastProperties()) {
5703  int own_property_count = object->map()->EnumLength();
5704  // If the enum length of the given map is set to kInvalidEnumCache, this
5705  // means that the map itself has never used the present enum cache. The
5706  // first step to using the cache is to set the enum length of the map by
5707  // counting the number of own descriptors that are not DONT_ENUM or
5708  // SYMBOLIC.
5709  if (own_property_count == kInvalidEnumCacheSentinel) {
5710  own_property_count = object->map()->NumberOfDescribedProperties(
5712  } else {
5713  DCHECK(own_property_count == object->map()->NumberOfDescribedProperties(
5715  }
5716 
5717  if (object->map()->instance_descriptors()->HasEnumCache()) {
5718  DescriptorArray* desc = object->map()->instance_descriptors();
5719  Handle<FixedArray> keys(desc->GetEnumCache(), isolate);
5720 
5721  // In case the number of properties required in the enum are actually
5722  // present, we can reuse the enum cache. Otherwise, this means that the
5723  // enum cache was generated for a previous (smaller) version of the
5724  // Descriptor Array. In that case we regenerate the enum cache.
5725  if (own_property_count <= keys->length()) {
5726  if (cache_result) object->map()->SetEnumLength(own_property_count);
5727  isolate->counters()->enum_cache_hits()->Increment();
5728  return ReduceFixedArrayTo(keys, own_property_count);
5729  }
5730  }
5731 
5732  Handle<Map> map(object->map());
5733 
5734  if (map->instance_descriptors()->IsEmpty()) {
5735  isolate->counters()->enum_cache_hits()->Increment();
5736  if (cache_result) map->SetEnumLength(0);
5737  return isolate->factory()->empty_fixed_array();
5738  }
5739 
5740  isolate->counters()->enum_cache_misses()->Increment();
5741 
5742  Handle<FixedArray> storage = isolate->factory()->NewFixedArray(
5743  own_property_count);
5744  Handle<FixedArray> indices = isolate->factory()->NewFixedArray(
5745  own_property_count);
5746 
5747  Handle<DescriptorArray> descs =
5748  Handle<DescriptorArray>(object->map()->instance_descriptors(), isolate);
5749 
5750  int size = map->NumberOfOwnDescriptors();
5751  int index = 0;
5752 
5753  for (int i = 0; i < size; i++) {
5754  PropertyDetails details = descs->GetDetails(i);
5755  Object* key = descs->GetKey(i);
5756  if (!(details.IsDontEnum() || key->IsSymbol())) {
5757  storage->set(index, key);
5758  if (!indices.is_null()) {
5759  if (details.type() != FIELD) {
5760  indices = Handle<FixedArray>();
5761  } else {
5762  FieldIndex field_index = FieldIndex::ForDescriptor(*map, i);
5763  int load_by_field_index = field_index.GetLoadByFieldIndex();
5764  indices->set(index, Smi::FromInt(load_by_field_index));
5765  }
5766  }
5767  index++;
5768  }
5769  }
5770  DCHECK(index == storage->length());
5771 
5772  Handle<FixedArray> bridge_storage =
5773  isolate->factory()->NewFixedArray(
5774  DescriptorArray::kEnumCacheBridgeLength);
5775  DescriptorArray* desc = object->map()->instance_descriptors();
5776  desc->SetEnumCache(*bridge_storage,
5777  *storage,
5778  indices.is_null() ? Object::cast(Smi::FromInt(0))
5779  : Object::cast(*indices));
5780  if (cache_result) {
5781  object->map()->SetEnumLength(own_property_count);
5782  }
5783  return storage;
5784  } else {
5785  Handle<NameDictionary> dictionary(object->property_dictionary());
5786  int length = dictionary->NumberOfEnumElements();
5787  if (length == 0) {
5788  return Handle<FixedArray>(isolate->heap()->empty_fixed_array());
5789  }
5790  Handle<FixedArray> storage = isolate->factory()->NewFixedArray(length);
5791  dictionary->CopyEnumKeysTo(*storage);
5792  return storage;
5793  }
5794 }
static const int kInvalidEnumCacheSentinel
static Handle< FixedArray > ReduceFixedArrayTo(Handle< FixedArray > array, int length)
Definition: objects.cc:5687
@ DONT_SHOW

References v8::internal::Isolate::counters(), DCHECK, DONT_SHOW, v8::internal::Isolate::factory(), FIELD, v8::internal::Smi::FromInt(), v8::internal::DescriptorArray::GetEnumCache(), v8::internal::Isolate::heap(), v8::internal::Handle< T >::is_null(), v8::internal::DescriptorArray::kEnumCacheBridgeLength, keys(), kInvalidEnumCacheSentinel, v8::internal::HeapObject::map(), v8::internal::Map::NumberOfOwnDescriptors(), OWN_DESCRIPTORS, ReduceFixedArrayTo(), v8::internal::DescriptorArray::SetEnumCache(), v8::internal::Map::SetEnumLength(), and size.

Referenced by v8::internal::JSReceiver::GetKeys().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFastElementsKindFromSequenceIndex()

ElementsKind v8::internal::GetFastElementsKindFromSequenceIndex ( int  sequence_number)

Definition at line 98 of file elements-kind.cc.

98  {
99  DCHECK(sequence_number >= 0 &&
100  sequence_number < kFastElementsKindCount);
101  return fast_elements_kind_sequence.Get()[sequence_number];
102 }
static base::LazyInstance< ElementsKind *, InitializeFastElementsKindSequence >::type fast_elements_kind_sequence

References DCHECK, fast_elements_kind_sequence, and kFastElementsKindCount.

Referenced by CacheInitialJSArrayMaps(), and GetNextTransitionElementsKind().

+ Here is the caller graph for this function:

◆ GetFunctionArguments()

Handle<Object> v8::internal::GetFunctionArguments ( Isolate isolate,
Handle< JSFunction function 
)

Definition at line 1101 of file accessors.cc.

1102  {
1103  if (function->shared()->native()) return isolate->factory()->null_value();
1104 
1105  // Find the top invocation of the function by traversing frames.
1106  for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) {
1107  JavaScriptFrame* frame = it.frame();
1108  int function_index = FindFunctionInFrame(frame, function);
1109  if (function_index < 0) continue;
1110 
1111  if (function_index > 0) {
1112  // The function in question was inlined. Inlined functions have the
1113  // correct number of arguments and no allocated arguments object, so
1114  // we can construct a fresh one by interpreting the function's
1115  // deoptimization input data.
1116  return ArgumentsForInlinedFunction(frame, function, function_index);
1117  }
1118 
1119  if (!frame->is_optimized()) {
1120  // If there is an arguments variable in the stack, we return that.
1121  Handle<ScopeInfo> scope_info(function->shared()->scope_info());
1122  int index = scope_info->StackSlotIndex(
1123  isolate->heap()->arguments_string());
1124  if (index >= 0) {
1125  Handle<Object> arguments(frame->GetExpression(index), isolate);
1126  if (!arguments->IsArgumentsMarker()) return arguments;
1127  }
1128  }
1129 
1130  // If there is no arguments variable in the stack or we have an
1131  // optimized frame, we find the frame that holds the actual arguments
1132  // passed to the function.
1133  it.AdvanceToArgumentsFrame();
1134  frame = it.frame();
1135 
1136  // Get the number of arguments and construct an arguments object
1137  // mirror for the right frame.
1138  const int length = frame->ComputeParametersCount();
1139  Handle<JSObject> arguments = isolate->factory()->NewArgumentsObject(
1140  function, length);
1141  Handle<FixedArray> array = isolate->factory()->NewFixedArray(length);
1142 
1143  // Copy the parameters to the arguments object.
1144  DCHECK(array->length() == length);
1145  for (int i = 0; i < length; i++) array->set(i, frame->GetParameter(i));
1146  arguments->set_elements(*array);
1147 
1148  // Return the freshly allocated arguments object.
1149  return arguments;
1150  }
1151 
1152  // No frame corresponding to the given function found. Return null.
1153  return isolate->factory()->null_value();
1154 }
static Handle< Object > ArgumentsForInlinedFunction(JavaScriptFrame *frame, Handle< JSFunction > inlined_function, int inlined_frame_index)
Definition: accessors.cc:1061
static int FindFunctionInFrame(JavaScriptFrame *frame, Handle< JSFunction > function)
Definition: accessors.cc:1089

References ArgumentsForInlinedFunction(), v8::internal::JavaScriptFrame::ComputeParametersCount(), DCHECK, v8::internal::Isolate::factory(), FindFunctionInFrame(), v8::internal::StandardFrame::GetExpression(), v8::internal::JavaScriptFrame::GetParameter(), and v8::internal::Isolate::heap().

Referenced by v8::internal::Accessors::FunctionGetArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFunctionPrototype()

static Handle<Object> v8::internal::GetFunctionPrototype ( Isolate isolate,
Handle< JSFunction function 
)
static

Definition at line 885 of file accessors.cc.

886  {
887  if (!function->has_prototype()) {
888  Handle<Object> proto = isolate->factory()->NewFunctionPrototype(function);
889  JSFunction::SetPrototype(function, proto);
890  }
891  return Handle<Object>(function->prototype(), isolate);
892 }

References v8::internal::Isolate::factory(), and v8::internal::JSFunction::SetPrototype().

Referenced by v8::internal::Accessors::FunctionGetPrototype().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGrowStoreMode()

static KeyedAccessStoreMode v8::internal::GetGrowStoreMode ( KeyedAccessStoreMode  store_mode)
inlinestatic

Definition at line 199 of file objects.h.

200  {
201  if (store_mode < STORE_AND_GROW_NO_TRANSITION) {
202  store_mode = static_cast<KeyedAccessStoreMode>(
203  static_cast<int>(store_mode) + kGrowICDelta);
204  }
205  return store_mode;
206 }
static const int kGrowICDelta
Definition: objects.h:185
KeyedAccessStoreMode
Definition: objects.h:153

References kGrowICDelta, and STORE_AND_GROW_NO_TRANSITION.

◆ GetHoleyElementsKind()

ElementsKind v8::internal::GetHoleyElementsKind ( ElementsKind  packed_kind)
inline

◆ GetICCounts()

static void v8::internal::GetICCounts ( Code shared_code,
int ic_with_type_info_count,
int ic_generic_count,
int ic_total_count,
int type_info_percentage,
int generic_percentage 
)
static

Definition at line 60 of file runtime-profiler.cc.

62  {
63  *ic_total_count = 0;
64  *ic_generic_count = 0;
65  *ic_with_type_info_count = 0;
66  Object* raw_info = shared_code->type_feedback_info();
67  if (raw_info->IsTypeFeedbackInfo()) {
68  TypeFeedbackInfo* info = TypeFeedbackInfo::cast(raw_info);
69  *ic_with_type_info_count = info->ic_with_type_info_count();
70  *ic_generic_count = info->ic_generic_count();
71  *ic_total_count = info->ic_total_count();
72  }
73  if (*ic_total_count > 0) {
74  *type_info_percentage = 100 * *ic_with_type_info_count / *ic_total_count;
75  *generic_percentage = 100 * *ic_generic_count / *ic_total_count;
76  } else {
77  *type_info_percentage = 100; // Compared against lower bound.
78  *generic_percentage = 0; // Compared against upper bound.
79  }
80 }

References v8::internal::TypeFeedbackInfo::ic_generic_count(), v8::internal::TypeFeedbackInfo::ic_total_count(), v8::internal::TypeFeedbackInfo::ic_with_type_info_count(), and v8::internal::Code::type_feedback_info().

Referenced by v8::internal::RuntimeProfiler::Optimize(), and v8::internal::RuntimeProfiler::OptimizeNow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInitialFastElementsKind()

ElementsKind v8::internal::GetInitialFastElementsKind ( )
inline

Definition at line 78 of file elements-kind.h.

78 { return FAST_SMI_ELEMENTS; }

References FAST_SMI_ELEMENTS.

Referenced by v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeStub(), BUILTIN(), CacheInitialJSArrayMaps(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicElementAccess(), v8::internal::AllocationSite::Initialize(), and v8::internal::Isolate::IsFastArrayConstructorPrototypeChainIntact().

+ Here is the caller graph for this function:

◆ GetInternalPointer()

static int* v8::internal::GetInternalPointer ( StatsCounter counter)
static

Definition at line 40 of file serialize.cc.

40  {
41  // All counters refer to dummy_counter, if deserializing happens without
42  // setting up counters.
43  static int dummy_counter = 0;
44  return counter->Enabled() ? counter->GetInternalPointer() : &dummy_counter;
45 }

References v8::internal::StatsCounter::Enabled(), and v8::internal::StatsCounter::GetInternalPointer().

Referenced by v8::internal::ExternalReferenceTable::PopulateTable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLiteralAllocationSite()

static MUST_USE_RESULT MaybeHandle<AllocationSite> v8::internal::GetLiteralAllocationSite ( Isolate isolate,
Handle< FixedArray literals,
int  literals_index,
Handle< FixedArray elements 
)
static

Definition at line 392 of file runtime.cc.

394  {
395  // Check if boilerplate exists. If not, create it first.
396  Handle<Object> literal_site(literals->get(literals_index), isolate);
397  Handle<AllocationSite> site;
398  if (*literal_site == isolate->heap()->undefined_value()) {
399  DCHECK(*elements != isolate->heap()->empty_fixed_array());
400  Handle<Object> boilerplate;
402  isolate, boilerplate,
403  Runtime::CreateArrayLiteralBoilerplate(isolate, literals, elements),
404  AllocationSite);
405 
406  AllocationSiteCreationContext creation_context(isolate);
407  site = creation_context.EnterNewScope();
408  if (JSObject::DeepWalk(Handle<JSObject>::cast(boilerplate),
409  &creation_context).is_null()) {
410  return Handle<AllocationSite>::null();
411  }
412  creation_context.ExitScope(site, Handle<JSObject>::cast(boilerplate));
413 
414  literals->set(literals_index, *site);
415  } else {
416  site = Handle<AllocationSite>::cast(literal_site);
417  }
418 
419  return site;
420 }

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Handle< T >::cast(), v8::internal::Runtime::CreateArrayLiteralBoilerplate(), DCHECK, v8::internal::JSObject::DeepWalk(), v8::internal::AllocationSiteCreationContext::EnterNewScope(), v8::internal::AllocationSiteCreationContext::ExitScope(), v8::internal::Isolate::heap(), literals(), and v8::internal::Handle< T >::null().

Referenced by CreateArrayLiteralImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMemoryUsedByList()

template<typename T , class P >
size_t v8::internal::GetMemoryUsedByList ( const List< T, P > &  list)

Definition at line 184 of file list.h.

184  {
185  return list.length() * sizeof(T) + sizeof(list);
186 }

References T.

Referenced by v8::internal::HeapProfiler::GetMemorySizeUsedByProfiler(), v8::internal::HeapObjectsMap::GetUsedMemorySize(), and v8::internal::HeapSnapshot::RawSnapshotSize().

+ Here is the caller graph for this function:

◆ GetMinInobjectSlack()

static void v8::internal::GetMinInobjectSlack ( Map map,
void *  data 
)
static

Definition at line 9963 of file objects.cc.

9963  {
9964  int slack = map->unused_property_fields();
9965  if (*reinterpret_cast<int*>(data) > slack) {
9966  *reinterpret_cast<int*>(data) = slack;
9967  }
9968 }

References map.

Referenced by v8::internal::JSFunction::CompleteInobjectSlackTracking().

+ Here is the caller graph for this function:

◆ GetNextMoreGeneralFastElementsKind()

ElementsKind v8::internal::GetNextMoreGeneralFastElementsKind ( ElementsKind  elements_kind,
bool  allow_only_packed 
)

Definition at line 131 of file elements-kind.cc.

132  {
133  DCHECK(IsFastElementsKind(elements_kind));
134  DCHECK(elements_kind != TERMINAL_FAST_ELEMENTS_KIND);
135  while (true) {
136  elements_kind = GetNextTransitionElementsKind(elements_kind);
137  if (!IsFastHoleyElementsKind(elements_kind) || !allow_only_packed) {
138  return elements_kind;
139  }
140  }
141  UNREACHABLE();
143 }

References DCHECK, GetNextTransitionElementsKind(), IsFastElementsKind(), IsFastHoleyElementsKind(), TERMINAL_FAST_ELEMENTS_KIND, and UNREACHABLE.

Referenced by v8::internal::Map::FindTransitionedMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNextTransitionElementsKind()

ElementsKind v8::internal::GetNextTransitionElementsKind ( ElementsKind  kind)

Definition at line 116 of file elements-kind.cc.

116  {
117  switch (kind) {
118 #define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
119  case TYPE##_ELEMENTS: return EXTERNAL_##TYPE##_ELEMENTS;
120 
122 #undef FIXED_TYPED_ARRAY_CASE
123  default: {
124  int index = GetSequenceIndexFromFastElementsKind(kind);
125  return GetFastElementsKindFromSequenceIndex(index + 1);
126  }
127  }
128 }
#define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References FIXED_TYPED_ARRAY_CASE, GetFastElementsKindFromSequenceIndex(), GetSequenceIndexFromFastElementsKind(), and TYPED_ARRAYS.

Referenced by GetNextMoreGeneralFastElementsKind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNonTransitioningStoreMode()

static KeyedAccessStoreMode v8::internal::GetNonTransitioningStoreMode ( KeyedAccessStoreMode  store_mode)
inlinestatic

Definition at line 216 of file objects.h.

217  {
218  if (store_mode >= STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS) {
219  return store_mode;
220  }
221  if (store_mode >= STORE_AND_GROW_NO_TRANSITION) {
223  }
224  return STANDARD_STORE;
225 }

References STANDARD_STORE, STORE_AND_GROW_NO_TRANSITION, and STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS.

Referenced by v8::internal::KeyedStoreIC::StoreElementStub().

+ Here is the caller graph for this function:

◆ GetOldValue()

static bool v8::internal::GetOldValue ( Isolate isolate,
Handle< JSObject object,
uint32_t  index,
List< Handle< Object > > *  old_values,
List< uint32_t > *  indices 
)
static

Definition at line 11099 of file objects.cc.

11103  {
11104  Maybe<PropertyAttributes> maybe =
11105  JSReceiver::GetOwnElementAttribute(object, index);
11106  DCHECK(maybe.has_value);
11107  DCHECK(maybe.value != ABSENT);
11108  if (maybe.value == DONT_DELETE) return false;
11109  Handle<Object> value;
11110  if (!JSObject::GetOwnElementAccessorPair(object, index).is_null()) {
11111  value = Handle<Object>::cast(isolate->factory()->the_hole_value());
11112  } else {
11113  value = Object::GetElement(isolate, object, index).ToHandleChecked();
11114  }
11115  old_values->Add(value);
11116  indices->Add(index);
11117  return true;
11118 }
@ ABSENT

References ABSENT, v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::Handle< T >::cast(), DCHECK, DONT_DELETE, v8::internal::Isolate::factory(), v8::internal::Object::GetElement(), v8::internal::JSObject::GetOwnElementAccessorPair(), v8::internal::JSReceiver::GetOwnElementAttribute(), and v8::maybe().

Referenced by v8::internal::JSArray::SetElementsLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOptimizedCodeLater()

static bool v8::internal::GetOptimizedCodeLater ( CompilationInfo info)
static

Definition at line 770 of file compiler.cc.

770  {
771  Isolate* isolate = info->isolate();
772  if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
773  if (FLAG_trace_concurrent_recompilation) {
774  PrintF(" ** Compilation queue full, will retry optimizing ");
775  info->closure()->ShortPrint();
776  PrintF(" later.\n");
777  }
778  return false;
779  }
780 
781  CompilationHandleScope handle_scope(info);
782  if (!CompileOptimizedPrologue(info)) return false;
783  info->SaveHandles(); // Copy handles to the compilation handle scope.
784 
785  TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate());
786 
787  OptimizedCompileJob* job = new (info->zone()) OptimizedCompileJob(info);
788  OptimizedCompileJob::Status status = job->CreateGraph();
789  if (status != OptimizedCompileJob::SUCCEEDED) return false;
790  isolate->optimizing_compiler_thread()->QueueForOptimization(job);
791 
792  if (FLAG_trace_concurrent_recompilation) {
793  PrintF(" ** Queued ");
794  info->closure()->ShortPrint();
795  if (info->is_osr()) {
796  PrintF(" for concurrent OSR at %d.\n", info->osr_ast_id().ToInt());
797  } else {
798  PrintF(" for concurrent optimization.\n");
799  }
800  }
801  return true;
802 }
static bool CompileOptimizedPrologue(CompilationInfo *info)
Definition: compiler.cc:730

References v8::internal::CompilationInfo::closure(), CompileOptimizedPrologue(), v8::internal::OptimizedCompileJob::CreateGraph(), v8::internal::CompilationInfo::is_osr(), v8::internal::CompilationInfo::isolate(), v8::internal::OptimizingCompilerThread::IsQueueAvailable(), v8::internal::Isolate::optimizing_compiler_thread(), v8::internal::CompilationInfo::osr_ast_id(), PrintF(), v8::internal::OptimizingCompilerThread::QueueForOptimization(), v8::internal::CompilationInfo::SaveHandles(), v8::internal::OptimizedCompileJob::SUCCEEDED, v8::internal::BailoutId::ToInt(), and v8::internal::CompilationInfo::zone().

Referenced by v8::internal::Compiler::GetOptimizedCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOptimizedCodeNow()

static bool v8::internal::GetOptimizedCodeNow ( CompilationInfo info)
static

Definition at line 739 of file compiler.cc.

739  {
740  if (!CompileOptimizedPrologue(info)) return false;
741 
742  TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate());
743 
744  OptimizedCompileJob job(info);
745  if (job.CreateGraph() != OptimizedCompileJob::SUCCEEDED ||
746  job.OptimizeGraph() != OptimizedCompileJob::SUCCEEDED ||
747  job.GenerateCode() != OptimizedCompileJob::SUCCEEDED) {
748  if (FLAG_trace_opt) {
749  PrintF("[aborted optimizing ");
750  info->closure()->ShortPrint();
751  PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason()));
752  }
753  return false;
754  }
755 
756  // Success!
757  DCHECK(!info->isolate()->has_pending_exception());
759  RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info,
760  info->shared_info());
761  if (FLAG_trace_opt) {
762  PrintF("[completed optimizing ");
763  info->closure()->ShortPrint();
764  PrintF("]\n");
765  }
766  return true;
767 }
static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, CompilationInfo *info, Handle< SharedFunctionInfo > shared)
Definition: compiler.cc:598
const char * GetBailoutReason(BailoutReason reason)
static void InsertCodeIntoOptimizedCodeMap(CompilationInfo *info)
Definition: compiler.cc:709

References v8::internal::CompilationInfo::bailout_reason(), v8::internal::CompilationInfo::closure(), CompileOptimizedPrologue(), v8::internal::OptimizedCompileJob::CreateGraph(), DCHECK, v8::internal::OptimizedCompileJob::GenerateCode(), GetBailoutReason(), v8::internal::Isolate::has_pending_exception(), InsertCodeIntoOptimizedCodeMap(), v8::internal::CompilationInfo::isolate(), v8::internal::OptimizedCompileJob::OptimizeGraph(), PrintF(), RecordFunctionCompilation(), v8::internal::CompilationInfo::shared_info(), and v8::internal::OptimizedCompileJob::SUCCEEDED.

Referenced by v8::internal::Compiler::GetLazyCode(), and v8::internal::Compiler::GetOptimizedCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOrCreateIdentityHashHelper()

template<typename ProxyType >
static Handle<Smi> v8::internal::GetOrCreateIdentityHashHelper ( Handle< ProxyType >  proxy)
static

Definition at line 4542 of file objects.cc.

4542  {
4543  Isolate* isolate = proxy->GetIsolate();
4544 
4545  Handle<Object> maybe_hash(proxy->hash(), isolate);
4546  if (maybe_hash->IsSmi()) return Handle<Smi>::cast(maybe_hash);
4547 
4548  Handle<Smi> hash(GenerateIdentityHash(isolate), isolate);
4549  proxy->set_hash(*hash);
4550  return hash;
4551 }
static Smi * GenerateIdentityHash(Isolate *isolate)
Definition: objects.cc:4519

References v8::internal::Handle< T >::cast(), and GenerateIdentityHash().

Referenced by v8::internal::JSObject::GetOrCreateIdentityHash(), and v8::internal::JSProxy::GetOrCreateIdentityHash().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOwnProperty()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::GetOwnProperty ( Isolate isolate,
Handle< JSObject obj,
Handle< Name name 
)
static

Definition at line 757 of file runtime.cc.

759  {
760  Heap* heap = isolate->heap();
761  Factory* factory = isolate->factory();
762 
763  PropertyAttributes attrs;
764  uint32_t index = 0;
765  Handle<Object> value;
766  MaybeHandle<AccessorPair> maybe_accessors;
767  // TODO(verwaest): Unify once indexed properties can be handled by the
768  // LookupIterator.
769  if (name->AsArrayIndex(&index)) {
770  // Get attributes.
771  Maybe<PropertyAttributes> maybe =
772  JSReceiver::GetOwnElementAttribute(obj, index);
773  if (!maybe.has_value) return MaybeHandle<Object>();
774  attrs = maybe.value;
775  if (attrs == ABSENT) return factory->undefined_value();
776 
777  // Get AccessorPair if present.
778  maybe_accessors = JSObject::GetOwnElementAccessorPair(obj, index);
779 
780  // Get value if not an AccessorPair.
781  if (maybe_accessors.is_null()) {
783  isolate, value, Runtime::GetElementOrCharAt(isolate, obj, index),
784  Object);
785  }
786  } else {
787  // Get attributes.
788  LookupIterator it(obj, name, LookupIterator::HIDDEN);
789  Maybe<PropertyAttributes> maybe = JSObject::GetPropertyAttributes(&it);
790  if (!maybe.has_value) return MaybeHandle<Object>();
791  attrs = maybe.value;
792  if (attrs == ABSENT) return factory->undefined_value();
793 
794  // Get AccessorPair if present.
795  if (it.state() == LookupIterator::ACCESSOR &&
796  it.GetAccessors()->IsAccessorPair()) {
797  maybe_accessors = Handle<AccessorPair>::cast(it.GetAccessors());
798  }
799 
800  // Get value if not an AccessorPair.
801  if (maybe_accessors.is_null()) {
802  ASSIGN_RETURN_ON_EXCEPTION(isolate, value, Object::GetProperty(&it),
803  Object);
804  }
805  }
806  DCHECK(!isolate->has_pending_exception());
807  Handle<FixedArray> elms = factory->NewFixedArray(DESCRIPTOR_SIZE);
808  elms->set(ENUMERABLE_INDEX, heap->ToBoolean((attrs & DONT_ENUM) == 0));
809  elms->set(CONFIGURABLE_INDEX, heap->ToBoolean((attrs & DONT_DELETE) == 0));
810  elms->set(IS_ACCESSOR_INDEX, heap->ToBoolean(!maybe_accessors.is_null()));
811 
812  Handle<AccessorPair> accessors;
813  if (maybe_accessors.ToHandle(&accessors)) {
814  Handle<Object> getter(accessors->GetComponent(ACCESSOR_GETTER), isolate);
815  Handle<Object> setter(accessors->GetComponent(ACCESSOR_SETTER), isolate);
816  elms->set(GETTER_INDEX, *getter);
817  elms->set(SETTER_INDEX, *setter);
818  } else {
819  elms->set(WRITABLE_INDEX, heap->ToBoolean((attrs & READ_ONLY) == 0));
820  elms->set(VALUE_INDEX, *value);
821  }
822 
823  return factory->NewJSArrayWithElements(elms);
824 }
@ DONT_ENUM

References ABSENT, ACCESSOR, ACCESSOR_GETTER, ACCESSOR_SETTER, ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONFIGURABLE_INDEX, DCHECK, DESCRIPTOR_SIZE, DONT_DELETE, DONT_ENUM, ENUMERABLE_INDEX, v8::internal::Isolate::factory(), v8::internal::Runtime::GetElementOrCharAt(), v8::internal::JSObject::GetOwnElementAccessorPair(), v8::internal::JSReceiver::GetOwnElementAttribute(), v8::internal::Object::GetProperty(), v8::internal::JSReceiver::GetPropertyAttributes(), GETTER_INDEX, v8::internal::Isolate::has_pending_exception(), v8::internal::Isolate::heap(), IS_ACCESSOR_INDEX, v8::internal::MaybeHandle< T >::is_null(), v8::maybe(), name, READ_ONLY, SETTER_INDEX, v8::internal::Heap::ToBoolean(), VALUE_INDEX, and WRITABLE_INDEX.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPackedElementsKind()

ElementsKind v8::internal::GetPackedElementsKind ( ElementsKind  holey_kind)
inline

Definition at line 188 of file elements-kind.h.

188  {
189  if (holey_kind == FAST_HOLEY_SMI_ELEMENTS) {
190  return FAST_SMI_ELEMENTS;
191  }
192  if (holey_kind == FAST_HOLEY_DOUBLE_ELEMENTS) {
193  return FAST_DOUBLE_ELEMENTS;
194  }
195  if (holey_kind == FAST_HOLEY_ELEMENTS) {
196  return FAST_ELEMENTS;
197  }
198  return holey_kind;
199 }

References FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, and FAST_SMI_ELEMENTS.

Referenced by BUILTIN(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ GetPositionModeFromTag()

static RelocInfo::Mode v8::internal::GetPositionModeFromTag ( int  tag)
inlinestatic

Definition at line 581 of file assembler.cc.

581  {
583  tag == kStatementPositionTag);
584  return (tag == kNonstatementPositionTag) ?
585  RelocInfo::POSITION :
586  RelocInfo::STATEMENT_POSITION;
587 }
const int kStatementPositionTag
Definition: assembler.cc:323
const int kNonstatementPositionTag
Definition: assembler.cc:322

References DCHECK, kNonstatementPositionTag, kStatementPositionTag, v8::internal::RelocInfo::POSITION, and v8::internal::RelocInfo::STATEMENT_POSITION.

Referenced by v8::internal::RelocIterator::next().

+ Here is the caller graph for this function:

◆ GetPrimitiveValue()

static Handle<Object> v8::internal::GetPrimitiveValue ( const PrimitiveValueDescriptor descriptor,
char *  ptr,
Isolate isolate 
)
static

Definition at line 282 of file objects.cc.

285  {
286  int32_t int32_value = 0;
287  switch (descriptor.data_type) {
288  case kDescriptorInt8Type:
289  int32_value = *CheckedCast<int8_t>(ptr);
290  break;
292  int32_value = *CheckedCast<uint8_t>(ptr);
293  break;
295  int32_value = *CheckedCast<int16_t>(ptr);
296  break;
298  int32_value = *CheckedCast<uint16_t>(ptr);
299  break;
301  int32_value = *CheckedCast<int32_t>(ptr);
302  break;
303  case kDescriptorUint32Type: {
304  uint32_t value = *CheckedCast<uint32_t>(ptr);
305  AllowHeapAllocation allow_gc;
306  return isolate->factory()->NewNumberFromUint(value);
307  }
308  case kDescriptorBoolType: {
309  uint8_t byte = *CheckedCast<uint8_t>(ptr);
310  return isolate->factory()->ToBoolean(
311  byte & (0x1 << descriptor.bool_offset));
312  }
313  case kDescriptorFloatType: {
314  float value = *CheckedCast<float>(ptr);
315  AllowHeapAllocation allow_gc;
316  return isolate->factory()->NewNumber(value);
317  }
318  case kDescriptorDoubleType: {
319  double value = *CheckedCast<double>(ptr);
320  AllowHeapAllocation allow_gc;
321  return isolate->factory()->NewNumber(value);
322  }
323  }
324  AllowHeapAllocation allow_gc;
325  return isolate->factory()->NewNumberFromInt(int32_value);
326 }
@ kDescriptorInt8Type
Definition: v8.h:3939
@ kDescriptorUint16Type
Definition: v8.h:3940
@ kDescriptorDoubleType
Definition: v8.h:3942
@ kDescriptorFloatType
Definition: v8.h:3942
@ kDescriptorInt16Type
Definition: v8.h:3940
@ kDescriptorUint8Type
Definition: v8.h:3939
@ kDescriptorUint32Type
Definition: v8.h:3941
@ kDescriptorInt32Type
Definition: v8.h:3941
@ kDescriptorBoolType
Definition: v8.h:3938

References v8::internal::PrimitiveValueDescriptor::bool_offset, v8::internal::PrimitiveValueDescriptor::data_type, v8::internal::Isolate::factory(), v8::kDescriptorBoolType, v8::kDescriptorDoubleType, v8::kDescriptorFloatType, v8::kDescriptorInt16Type, v8::kDescriptorInt32Type, v8::kDescriptorInt8Type, v8::kDescriptorUint16Type, v8::kDescriptorUint32Type, and v8::kDescriptorUint8Type.

Referenced by GetDeclaredAccessorProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPrototypeSkipHiddenPrototypes()

static Handle<Object> v8::internal::GetPrototypeSkipHiddenPrototypes ( Isolate isolate,
Handle< Object receiver 
)
inlinestatic

Definition at line 670 of file runtime.cc.

671  {
672  PrototypeIterator iter(isolate, receiver);
673  while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
674  if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
675  return PrototypeIterator::GetCurrent(iter);
676  }
677  iter.Advance();
678  }
679  return PrototypeIterator::GetCurrent(iter);
680 }

References v8::internal::PrototypeIterator::Advance(), v8::internal::PrototypeIterator::END_AT_NON_HIDDEN, v8::internal::PrototypeIterator::GetCurrent(), and v8::internal::PrototypeIterator::IsAtEnd().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRegisterThatIsNotOneOf()

Register v8::internal::GetRegisterThatIsNotOneOf ( Register  reg1,
Register  reg2 = no_reg,
Register  reg3 = no_reg,
Register  reg4 = no_reg,
Register  reg5 = no_reg,
Register  reg6 = no_reg 
)

Referenced by v8::internal::RecordWriteStub::RegisterAllocation::RegisterAllocation().

+ Here is the caller graph for this function:

◆ GetSequenceIndexFromFastElementsKind()

int v8::internal::GetSequenceIndexFromFastElementsKind ( ElementsKind  elements_kind)

Definition at line 105 of file elements-kind.cc.

105  {
106  for (int i = 0; i < kFastElementsKindCount; ++i) {
107  if (fast_elements_kind_sequence.Get()[i] == elements_kind) {
108  return i;
109  }
110  }
111  UNREACHABLE();
112  return 0;
113 }

References fast_elements_kind_sequence, kFastElementsKindCount, and UNREACHABLE.

Referenced by CacheInitialJSArrayMaps(), and GetNextTransitionElementsKind().

+ Here is the caller graph for this function:

◆ GetTransitionMarkModifier()

const char* v8::internal::GetTransitionMarkModifier ( KeyedAccessStoreMode  mode)

Definition at line 56 of file ic.cc.

56  {
57  if (mode == STORE_NO_TRANSITION_HANDLE_COW) return ".COW";
59  return ".IGNORE_OOB";
60  }
61  if (IsGrowStoreMode(mode)) return ".GROW";
62  return "";
63 }
static bool IsGrowStoreMode(KeyedAccessStoreMode store_mode)
Definition: objects.h:228

References IsGrowStoreMode(), mode(), STORE_NO_TRANSITION_HANDLE_COW, and STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS.

Referenced by v8::internal::IC::TraceIC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypedArrayFun()

static JSFunction* v8::internal::GetTypedArrayFun ( ExternalArrayType  type,
Isolate isolate 
)
static

Definition at line 1719 of file factory.cc.

1720  {
1721  Context* native_context = isolate->context()->native_context();
1722  switch (type) {
1723 #define TYPED_ARRAY_FUN(Type, type, TYPE, ctype, size) \
1724  case kExternal##Type##Array: \
1725  return native_context->type##_array_fun();
1726 
1728 #undef TYPED_ARRAY_FUN
1729 
1730  default:
1731  UNREACHABLE();
1732  return NULL;
1733  }
1734 }
#define TYPED_ARRAY_FUN(Type, type, TYPE, ctype, size)

References v8::internal::Isolate::context(), v8::internal::Context::native_context(), NULL, TYPED_ARRAY_FUN, TYPED_ARRAYS, and UNREACHABLE.

+ Here is the call graph for this function:

◆ GetUnoptimizedCodeCommon()

static MUST_USE_RESULT MaybeHandle<Code> v8::internal::GetUnoptimizedCodeCommon ( CompilationInfo info)
static

Definition at line 648 of file compiler.cc.

649  {
650  VMState<COMPILER> state(info->isolate());
651  PostponeInterruptsScope postpone(info->isolate());
652 
653  // Parse and update CompilationInfo with the results.
654  if (!Parser::Parse(info)) return MaybeHandle<Code>();
655  Handle<SharedFunctionInfo> shared = info->shared_info();
656  FunctionLiteral* lit = info->function();
657  shared->set_strict_mode(lit->strict_mode());
658  SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
659  shared->set_bailout_reason(lit->dont_optimize_reason());
660  shared->set_ast_node_count(lit->ast_node_count());
661 
662  // Compile unoptimized code.
663  if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>();
664 
665  CHECK_EQ(Code::FUNCTION, info->code()->kind());
666  RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
667 
668  // Update the shared function info with the scope info. Allocating the
669  // ScopeInfo object may cause a GC.
670  Handle<ScopeInfo> scope_info = ScopeInfo::Create(info->scope(), info->zone());
671  shared->set_scope_info(*scope_info);
672 
673  // Update the code and feedback vector for the shared function info.
674  shared->ReplaceCode(*info->code());
675  if (shared->optimization_disabled()) info->code()->set_optimizable(false);
676  shared->set_feedback_vector(*info->feedback_vector());
677 
678  return info->code();
679 }
#define CHECK_EQ(expected, value)
Definition: logging.h:169

References CHECK_EQ, v8::internal::CompilationInfo::code(), CompileUnoptimizedCode(), v8::internal::ScopeInfo::Create(), v8::internal::CompilationInfo::feedback_vector(), v8::internal::CompilationInfo::function(), v8::internal::CompilationInfo::isolate(), v8::internal::Parser::Parse(), RecordFunctionCompilation(), v8::internal::CompilationInfo::scope(), SetExpectedNofPropertiesFromEstimate(), v8::internal::CompilationInfo::shared_info(), and v8::internal::CompilationInfo::zone().

Referenced by v8::internal::Compiler::GetDebugCode(), v8::internal::Compiler::GetLazyCode(), v8::internal::Compiler::GetOptimizedCode(), and v8::internal::Compiler::GetUnoptimizedCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GlobalObjectMemOperand()

MemOperand v8::internal::GlobalObjectMemOperand ( )
inline

Definition at line 2273 of file macro-assembler-arm64.h.

2273  {
2274  return ContextMemOperand(cp, Context::GLOBAL_OBJECT_INDEX);
2275 }
#define cp
MemOperand ContextMemOperand(Register context, int index)

References ContextMemOperand(), cp, and v8::internal::Context::GLOBAL_OBJECT_INDEX.

+ Here is the call graph for this function:

◆ GlobalObjectOperand()

Operand v8::internal::GlobalObjectOperand ( )
inline

Definition at line 1606 of file macro-assembler-arm.h.

1606  {
1607  return ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX);
1608 }
MemOperand ContextOperand(Register context, int index)
const Register cp

References ContextOperand(), cp, and v8::internal::Context::GLOBAL_OBJECT_INDEX.

Referenced by v8::internal::LCodeGen::GeneratePrologue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Grisu3()

static bool v8::internal::Grisu3 ( double  v,
Vector< char >  buffer,
int length,
int decimal_exponent 
)
static

Definition at line 577 of file fast-dtoa.cc.

580  {
581  DiyFp w = Double(v).AsNormalizedDiyFp();
582  // boundary_minus and boundary_plus are the boundaries between v and its
583  // closest floating-point neighbors. Any number strictly between
584  // boundary_minus and boundary_plus will round to v when convert to a double.
585  // Grisu3 will never output representations that lie exactly on a boundary.
586  DiyFp boundary_minus, boundary_plus;
587  Double(v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
588  DCHECK(boundary_plus.e() == w.e());
589  DiyFp ten_mk; // Cached power of ten: 10^-k
590  int mk; // -k
591  int ten_mk_minimal_binary_exponent =
592  kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
593  int ten_mk_maximal_binary_exponent =
594  kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
595  PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
596  ten_mk_minimal_binary_exponent,
597  ten_mk_maximal_binary_exponent,
598  &ten_mk, &mk);
599  DCHECK((kMinimalTargetExponent <= w.e() + ten_mk.e() +
600  DiyFp::kSignificandSize) &&
601  (kMaximalTargetExponent >= w.e() + ten_mk.e() +
602  DiyFp::kSignificandSize));
603  // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
604  // 64 bit significand and ten_mk is thus only precise up to 64 bits.
605 
606  // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
607  // too. The variable scaled_w (as well as scaled_boundary_minus/plus) are now
608  // off by a small amount.
609  // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.
610  // In other words: let f = scaled_w.f() and e = scaled_w.e(), then
611  // (f-1) * 2^e < w*10^k < (f+1) * 2^e
612  DiyFp scaled_w = DiyFp::Times(w, ten_mk);
613  DCHECK(scaled_w.e() ==
614  boundary_plus.e() + ten_mk.e() + DiyFp::kSignificandSize);
615  // In theory it would be possible to avoid some recomputations by computing
616  // the difference between w and boundary_minus/plus (a power of 2) and to
617  // compute scaled_boundary_minus/plus by subtracting/adding from
618  // scaled_w. However the code becomes much less readable and the speed
619  // enhancements are not terriffic.
620  DiyFp scaled_boundary_minus = DiyFp::Times(boundary_minus, ten_mk);
621  DiyFp scaled_boundary_plus = DiyFp::Times(boundary_plus, ten_mk);
622 
623  // DigitGen will generate the digits of scaled_w. Therefore we have
624  // v == (double) (scaled_w * 10^-mk).
625  // Set decimal_exponent == -mk and pass it to DigitGen. If scaled_w is not an
626  // integer than it will be updated. For instance if scaled_w == 1.23 then
627  // the buffer will be filled with "123" und the decimal_exponent will be
628  // decreased by 2.
629  int kappa;
630  bool result = DigitGen(scaled_boundary_minus, scaled_w, scaled_boundary_plus,
631  buffer, length, &kappa);
632  *decimal_exponent = -mk + kappa;
633  return result;
634 }
static bool DigitGen(DiyFp low, DiyFp w, DiyFp high, Vector< char > buffer, int *length, int *kappa)
Definition: fast-dtoa.cc:362

References v8::internal::Double::AsNormalizedDiyFp(), DCHECK, DigitGen(), v8::internal::DiyFp::e(), v8::internal::PowersOfTenCache::GetCachedPowerForBinaryExponentRange(), kMaximalTargetExponent, kMinimalTargetExponent, v8::internal::DiyFp::kSignificandSize, v8::internal::Double::NormalizedBoundaries(), and v8::internal::DiyFp::Times().

Referenced by FastDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Grisu3Counted()

static bool v8::internal::Grisu3Counted ( double  v,
int  requested_digits,
Vector< char >  buffer,
int length,
int decimal_exponent 
)
static

Definition at line 642 of file fast-dtoa.cc.

646  {
647  DiyFp w = Double(v).AsNormalizedDiyFp();
648  DiyFp ten_mk; // Cached power of ten: 10^-k
649  int mk; // -k
650  int ten_mk_minimal_binary_exponent =
651  kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
652  int ten_mk_maximal_binary_exponent =
653  kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
654  PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
655  ten_mk_minimal_binary_exponent,
656  ten_mk_maximal_binary_exponent,
657  &ten_mk, &mk);
658  DCHECK((kMinimalTargetExponent <= w.e() + ten_mk.e() +
659  DiyFp::kSignificandSize) &&
660  (kMaximalTargetExponent >= w.e() + ten_mk.e() +
661  DiyFp::kSignificandSize));
662  // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
663  // 64 bit significand and ten_mk is thus only precise up to 64 bits.
664 
665  // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
666  // too. The variable scaled_w (as well as scaled_boundary_minus/plus) are now
667  // off by a small amount.
668  // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.
669  // In other words: let f = scaled_w.f() and e = scaled_w.e(), then
670  // (f-1) * 2^e < w*10^k < (f+1) * 2^e
671  DiyFp scaled_w = DiyFp::Times(w, ten_mk);
672 
673  // We now have (double) (scaled_w * 10^-mk).
674  // DigitGen will generate the first requested_digits digits of scaled_w and
675  // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
676  // will not always be exactly the same since DigitGenCounted only produces a
677  // limited number of digits.)
678  int kappa;
679  bool result = DigitGenCounted(scaled_w, requested_digits,
680  buffer, length, &kappa);
681  *decimal_exponent = -mk + kappa;
682  return result;
683 }
static bool DigitGenCounted(DiyFp w, int requested_digits, Vector< char > buffer, int *length, int *kappa)
Definition: fast-dtoa.cc:488

References v8::internal::Double::AsNormalizedDiyFp(), DCHECK, DigitGenCounted(), v8::internal::DiyFp::e(), v8::internal::PowersOfTenCache::GetCachedPowerForBinaryExponentRange(), kMaximalTargetExponent, kMinimalTargetExponent, v8::internal::DiyFp::kSignificandSize, and v8::internal::DiyFp::Times().

Referenced by FastDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GVNFlagFromInt()

static GVNFlag v8::internal::GVNFlagFromInt ( int  i)
inlinestatic

Definition at line 362 of file hydrogen-instructions.h.

362  {
363  DCHECK(i >= 0);
365  return static_cast<GVNFlag>(i);
366 }

References DCHECK, and kNumberOfFlags.

◆ handle() [1/2]

template<class T >
Handle<T> v8::internal::handle ( T t)
inline

Definition at line 153 of file handles.h.

153  {
154  return Handle<T>(t, t->GetIsolate());
155 }

◆ handle() [2/2]

template<class T >
Handle<T> v8::internal::handle ( T t,
Isolate isolate 
)
inline

Definition at line 146 of file handles.h.

146  {
147  return Handle<T>(t, isolate);
148 }

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::Add(), v8::internal::Map::AddDependentCompilationInfo(), v8::internal::PropertyCell::AddDependentCompilationInfo(), v8::internal::ElementsAccessor::AddElementsToFixedArray(), v8::internal::PrototypeIterator::Advance(), v8::internal::PrototypeIterator::AdvanceIgnoringProxies(), v8::internal::HOptimizedGraphBuilder::array_function(), v8::internal::HeapTypeConfig::as_class(), v8::internal::HeapTypeConfig::as_struct(), v8::internal::StringTableInsertionKey::AsHandle(), v8::internal::TypeFeedbackOracle::BinaryType(), v8::ArrayBufferView::Buffer(), v8::internal::HGraphBuilder::BuildConstantMapCheck(), v8::internal::HOptimizedGraphBuilder::BuildKeyedGeneric(), v8::internal::HOptimizedGraphBuilder::BuildMonomorphicElementAccess(), v8::internal::HOptimizedGraphBuilder::BuildNamedGeneric(), v8::internal::HGraphBuilder::BuildWrapReceiver(), BUILTIN(), CacheInitialJSArrayMaps(), CallJsBuiltin(), v8::internal::Isolate::CaptureCurrentStackTrace(), v8::internal::TypeImpl< Config >::Classes(), v8::internal::Debug::ClearMirrorCache(), v8::internal::TypeFeedbackOracle::CollectReceiverTypes(), v8::internal::TypeFeedbackOracle::CompareType(), v8::internal::Debug::CompileDebuggerScript(), v8::internal::NamedStoreHandlerCompiler::CompileStoreCallback(), v8::internal::NamedLoadHandlerCompiler::ComputeLoadNonexistent(), v8::internal::TypeImpl< Config >::Constants(), CopyFastElementsToDictionary(), v8::internal::Map::CopyForFreeze(), v8::internal::DescriptorArray::CopyFrom(), v8::internal::Map::CopyGeneralizeAllRepresentations(), v8::internal::Map::CopyInstallDescriptors(), v8::internal::DescriptorArray::CopyUpToAddAttributes(), v8::internal::Map::Create(), v8::internal::Heap::CreateInitialObjects(), CreateObjectLiteralBoilerplate(), DebugGetProperty(), v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::DeleteCommon(), v8::internal::DictionaryElementsAccessor::DeleteCommon(), v8::internal::JSObject::DeleteElementWithInterceptor(), v8::internal::JSObject::DeleteNormalizedProperty(), v8::internal::JSObject::DeletePropertyWithInterceptor(), v8::internal::AllocationSite::DigestTransitionFeedback(), v8::internal::CompareNilIC::DoCompareNilSlow(), v8::internal::Assembler::emit(), v8::internal::JSFunction::EnsureHasInitialMap(), EnsureJSArrayWithWritableFastElements(), v8::internal::JSGlobalObject::EnsurePropertyCell(), v8::internal::JSArray::EnsureSize(), v8::internal::Handle< T >::EscapeFrom(), v8::Eternal< T >::Eternal(), v8::internal::PropertyHandlerCompiler::Find(), v8::internal::PropertyICCompiler::Find(), v8::internal::Code::FindAllMaps(), v8::internal::Code::FindHandlerForMap(), v8::Object::FindInstanceInPrototypeChain(), v8::internal::IC::FindTargetMaps(), v8::internal::String::Flatten(), v8::internal::Accessors::FlattenNumber(), v8::internal::JSObject::Freeze(), v8::internal::HeapTypeConfig::from_bitset(), v8::internal::NamedLoadHandlerCompiler::FrontendHeader(), v8::internal::JSObject::GeneralizeFieldRepresentation(), v8::internal::Map::GeneralizeRepresentation(), v8::internal::FixedArray::get(), v8::internal::NormalizedMapCache::Get(), v8::internal::ElementsAccessor::Get(), v8::internal::DescriptorArray::Get(), v8::internal::JSObject::GetAccessor(), v8::internal::ElementsAccessor::GetAccessorPair(), v8::internal::DictionaryElementsAccessor::GetAccessorPairImpl(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::GetAccessorsFromMap(), v8::internal::ElementsAccessor::GetAttributes(), v8::internal::compiler::RepresentationChanger::GetBitRepresentationFor(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::GetConstantFromMap(), v8::internal::Debug::GetDebugContext(), GetDeclaredAccessorProperty(), v8::internal::JSObject::GetElementWithCallback(), v8::internal::JSObject::GetElementWithInterceptor(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::GetFieldOwnerFromMap(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::GetFieldTypeFromMap(), v8::internal::IC::GetHandlerCacheHolder(), v8::internal::JSObject::GetHiddenPropertiesHashTable(), v8::internal::IC::GetICCacheHolder(), v8::internal::SloppyArgumentsElementsAccessor::GetImpl(), v8::internal::CodeCacheHashTable::GetIndex(), v8::internal::JSObject::GetKeysForIndexedInterceptor(), v8::internal::JSObject::GetKeysForNamedInterceptor(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::GetMonomorphicJSObjectMap(), v8::internal::SloppyArgumentsElementsAccessor::GetParameterMapArg(), v8::internal::Object::GetPropertyWithAccessor(), v8::internal::JSObject::GetPropertyWithInterceptor(), v8::internal::CustomArguments< T >::GetReturnValue(), v8::internal::Isolate::global_context(), v8::internal::Handle< T >::Handle(), v8::internal::TypeImpl< Config >::handle(), v8::internal::HeapTypeConfig::handle(), v8::internal::CallIC::HandleMiss(), v8::internal::ElementsAccessor::HasElement(), v8::internal::IC::IC(), v8::FunctionTemplate::InstanceTemplate(), v8::internal::AstValue::Internalize(), Invoke(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(), v8::internal::MapCache::Lookup(), v8::internal::Context::Lookup(), v8::internal::CodeCacheHashTable::Lookup(), v8::internal::BASE_EMBEDDED< Visitor >::Lookup(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes(), v8::internal::BASE_EMBEDDED< Visitor >::LookupIterator(), v8::internal::StringTable::LookupKey(), v8::internal::Debug::MakeJSObject(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::map(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::MarkDependsOnEmptyArrayProtoElements(), v8::internal::Deoptimizer::MaterializeHeapObjects(), v8::internal::Isolate::MayIndexedAccess(), v8::internal::Isolate::MayNamedAccess(), v8::internal::JSObject::MigrateSlowToFast(), v8::internal::Isolate::native_context(), v8::internal::Runtime::NeuterArrayBuffer(), NewSloppyArguments(), v8::internal::Object::NewStorageFor(), v8::internal::PropertyHandlerCompiler::NonexistentFrontendHeader(), v8::internal::JSObject::NormalizeElements(), v8::internal::TypeImpl< Config >::NowOf(), v8::internal::Debug::OnThrow(), v8::Utils::OpenHandle(), v8::internal::JSObject::OptimizeAsPrototype(), v8::internal::CallIC::PatchMegamorphic(), v8::internal::JSObject::PrepareElementsForSort(), v8::internal::JSObject::PreventExtensions(), v8::internal::MacroAssembler::Push(), v8::internal::Isolate::ReportFailedAccessCheck(), RUNTIME_FUNCTION(), v8::internal::CompilationInfo::SaveHandle(), SearchRegExpMultiple(), v8::ReturnValue< T >::Set(), v8::Eternal< T >::Set(), v8::internal::JSObject::SetElement(), v8::internal::JSObject::SetFastElement(), v8::internal::JSObject::SetFastElementsCapacityAndLength(), SetFunctionPrototype(), v8::internal::TypeFeedbackOracle::SetInfo(), v8::internal::JSFunction::SetInstancePrototype(), v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLength(), SetLocalVariableValue(), v8::internal::GlobalHandles::SetObjectGroupId(), v8::internal::JSObject::SetObserved(), v8::internal::JSObject::SetPropertyCallback(), v8::internal::JSFunction::SetPrototype(), v8::internal::ExternalUint8ClampedArray::SetValue(), v8::internal::Map::ShareDescriptor(), v8::internal::HeapTypeConfig::struct_get(), v8::internal::HeapTypeConfig::struct_get_value(), v8::internal::ToBooleanIC::ToBoolean(), v8::internal::compiler::OperandGenerator::ToConstant(), v8::internal::Object::ToObject(), v8::internal::Object::ToSmi(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::transition(), v8::internal::BinaryOpIC::Transition(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::transition_map(), v8::internal::Map::TransitionElementsTo(), v8::internal::HOptimizedGraphBuilder::TryCallApply(), v8::internal::HOptimizedGraphBuilder::TryInlineApiCall(), v8::internal::HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(), v8::internal::Map::TryUpdateInternal(), v8::internal::compiler::Typer::Visitor::TypeConstant(), v8::internal::IC::TypeToMap(), v8::internal::PolymorphicCodeCache::Update(), v8::internal::JSObject::UpdateAllocationSite(), v8::internal::CodeCache::UpdateDefaultCache(), UpdateStackLocalsFromMaterializedObject(), and v8::internal::IC::UpdateTarget().

◆ HandleApiCallAsFunctionOrConstructor()

static MUST_USE_RESULT Object* v8::internal::HandleApiCallAsFunctionOrConstructor ( Isolate isolate,
bool  is_construct_call,
BuiltinArguments< NO_EXTRA_ARGUMENTS args 
)
static

Definition at line 1174 of file builtins.cc.

1177  {
1178  // Non-functions are never called as constructors. Even if this is an object
1179  // called as a constructor the delegate call is not a construct call.
1180  DCHECK(!CalledAsConstructor(isolate));
1181  Heap* heap = isolate->heap();
1182 
1183  Handle<Object> receiver = args.receiver();
1184 
1185  // Get the object called.
1186  JSObject* obj = JSObject::cast(*receiver);
1187 
1188  // Get the invocation callback from the function descriptor that was
1189  // used to create the called object.
1190  DCHECK(obj->map()->has_instance_call_handler());
1191  JSFunction* constructor = JSFunction::cast(obj->map()->constructor());
1192  DCHECK(constructor->shared()->IsApiFunction());
1193  Object* handler =
1194  constructor->shared()->get_api_func_data()->instance_call_handler();
1195  DCHECK(!handler->IsUndefined());
1196  CallHandlerInfo* call_data = CallHandlerInfo::cast(handler);
1197  Object* callback_obj = call_data->callback();
1198  v8::FunctionCallback callback =
1199  v8::ToCData<v8::FunctionCallback>(callback_obj);
1200 
1201  // Get the data for the call and perform the callback.
1202  Object* result;
1203  {
1204  HandleScope scope(isolate);
1205  LOG(isolate, ApiObjectAccess("call non-function", obj));
1206 
1207  FunctionCallbackArguments custom(isolate,
1208  call_data->data(),
1209  constructor,
1210  obj,
1211  &args[0] - 1,
1212  args.length() - 1,
1213  is_construct_call);
1214  v8::Handle<v8::Value> value = custom.Call(callback);
1215  if (value.IsEmpty()) {
1216  result = heap->undefined_value();
1217  } else {
1218  result = *reinterpret_cast<Object**>(*value);
1219  result->VerifyApiCallResultType();
1220  }
1221  }
1222  // Check for exceptions and return result.
1224  return result;
1225 }
bool IsEmpty() const
Returns true if the handle is empty.
Definition: v8.h:228
#define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate)
Definition: isolate.h:101
void(* FunctionCallback)(const FunctionCallbackInfo< Value > &info)
Definition: v8.h:2717

References v8::internal::FunctionCallbackArguments::Call(), DCHECK, v8::internal::Map::has_instance_call_handler(), v8::internal::Isolate::heap(), v8::Handle< T >::IsEmpty(), LOG, v8::internal::HeapObject::map(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, and v8::internal::Object::VerifyApiCallResultType().

Referenced by BUILTIN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleApiCallHelper()

template<bool is_construct>
static MUST_USE_RESULT Object* v8::internal::HandleApiCallHelper ( BuiltinArguments< NEEDS_CALLED_FUNCTION args,
Isolate isolate 
)
static

Definition at line 1091 of file builtins.cc.

1092  {
1093  DCHECK(is_construct == CalledAsConstructor(isolate));
1094  Heap* heap = isolate->heap();
1095 
1096  HandleScope scope(isolate);
1097  Handle<JSFunction> function = args.called_function();
1098  DCHECK(function->shared()->IsApiFunction());
1099 
1100  Handle<FunctionTemplateInfo> fun_data(
1101  function->shared()->get_api_func_data(), isolate);
1102  if (is_construct) {
1104  isolate, fun_data,
1105  isolate->factory()->ConfigureInstance(
1106  fun_data, Handle<JSObject>::cast(args.receiver())));
1107  }
1108 
1109  SharedFunctionInfo* shared = function->shared();
1110  if (shared->strict_mode() == SLOPPY && !shared->native()) {
1111  Object* recv = args[0];
1112  DCHECK(!recv->IsNull());
1113  if (recv->IsUndefined()) args[0] = function->global_proxy();
1114  }
1115 
1116  Object* raw_holder = TypeCheck(heap, args.length(), &args[0], *fun_data);
1117 
1118  if (raw_holder->IsNull()) {
1119  // This function cannot be called with the given receiver. Abort!
1121  isolate,
1122  NewTypeError("illegal_invocation", HandleVector(&function, 1)));
1123  }
1124 
1125  Object* raw_call_data = fun_data->call_code();
1126  if (!raw_call_data->IsUndefined()) {
1127  CallHandlerInfo* call_data = CallHandlerInfo::cast(raw_call_data);
1128  Object* callback_obj = call_data->callback();
1129  v8::FunctionCallback callback =
1130  v8::ToCData<v8::FunctionCallback>(callback_obj);
1131  Object* data_obj = call_data->data();
1132  Object* result;
1133 
1134  LOG(isolate, ApiObjectAccess("call", JSObject::cast(*args.receiver())));
1135  DCHECK(raw_holder->IsJSObject());
1136 
1137  FunctionCallbackArguments custom(isolate,
1138  data_obj,
1139  *function,
1140  raw_holder,
1141  &args[0] - 1,
1142  args.length() - 1,
1143  is_construct);
1144 
1145  v8::Handle<v8::Value> value = custom.Call(callback);
1146  if (value.IsEmpty()) {
1147  result = heap->undefined_value();
1148  } else {
1149  result = *reinterpret_cast<Object**>(*value);
1150  result->VerifyApiCallResultType();
1151  }
1152 
1154  if (!is_construct || result->IsJSObject()) return result;
1155  }
1156 
1157  return *args.receiver();
1158 }
Vector< Handle< Object > > HandleVector(v8::internal::Handle< T > *elms, int length)
Definition: utils.h:1100
static Object * TypeCheck(Heap *heap, int argc, Object **argv, FunctionTemplateInfo *info)
Definition: builtins.cc:1054

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::FunctionCallbackArguments::Call(), DCHECK, v8::internal::Isolate::factory(), HandleVector(), v8::internal::Isolate::heap(), v8::Handle< T >::IsEmpty(), LOG, RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, SLOPPY, v8::internal::SharedFunctionInfo::strict_mode(), THROW_NEW_ERROR_RETURN_FAILURE, TypeCheck(), and v8::internal::Object::VerifyApiCallResultType().

+ Here is the call graph for this function:

◆ HandleObjectPointerCompare()

template<typename T >
int v8::internal::HandleObjectPointerCompare ( const Handle< T > *  a,
const Handle< T > *  b 
)

Definition at line 117 of file utils.h.

117  {
118  return Compare<T*>(*(*a), *(*b));
119 }

◆ HandleVector()

template<typename T >
Vector< Handle<Object> > v8::internal::HandleVector ( v8::internal::Handle< T > *  elms,
int  length 
)
inline

◆ HasFewDifferentCharacters()

static bool v8::internal::HasFewDifferentCharacters ( Handle< String pattern)
static

Definition at line 132 of file jsregexp.cc.

132  {
133  int length = Min(kMaxLookaheadForBoyerMoore, pattern->length());
134  if (length <= kPatternTooShortForBoyerMoore) return false;
135  const int kMod = 128;
136  bool character_found[kMod];
137  int different = 0;
138  memset(&character_found[0], 0, sizeof(character_found));
139  for (int i = 0; i < length; i++) {
140  int ch = (pattern->Get(i) & (kMod - 1));
141  if (!character_found[ch]) {
142  character_found[ch] = true;
143  different++;
144  // We declare a regexp low-alphabet if it has at least 3 times as many
145  // characters as it has different characters.
146  if (different * 3 > length) return false;
147  }
148  }
149  return true;
150 }
const int kPatternTooShortForBoyerMoore
Definition: jsregexp.cc:127
const int kMaxLookaheadForBoyerMoore
Definition: jsregexp.cc:124

References kMaxLookaheadForBoyerMoore, kPatternTooShortForBoyerMoore, and Min().

Referenced by v8::internal::RegExpImpl::Compile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Hash()

static uint32_t v8::internal::Hash ( RegisteredExtension extension)
static

Definition at line 2264 of file bootstrapper.cc.

2264  {
2265  return v8::internal::ComputePointerHash(extension);
2266 }
uint32_t ComputePointerHash(void *ptr)
Definition: utils.h:274

References ComputePointerHash().

Referenced by v8::internal::Logger::ApiNamedSecurityCheck(), v8::internal::OneByteStringKey::AsHandle(), v8::internal::SeqOneByteSubStringKey::AsHandle(), v8::internal::TwoByteStringKey::AsHandle(), v8::internal::CodeEventLogger::CodeCreateEvent(), v8::internal::HashTable< Derived, Shape, Key >::Hash(), and v8::internal::BaseShape< Key >::SeededHash().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasKey()

static bool v8::internal::HasKey ( Handle< FixedArray array,
Handle< Object key_handle 
)
static

Definition at line 126 of file elements.cc.

126  {
128  Object* key = *key_handle;
129  int len0 = array->length();
130  for (int i = 0; i < len0; i++) {
131  Object* element = array->get(i);
132  if (element->IsSmi() && element == key) return true;
133  if (element->IsString() &&
134  key->IsString() && String::cast(element)->Equals(String::cast(key))) {
135  return true;
136  }
137  }
138  return false;
139 }

Referenced by v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::AddElementsToFixedArray().

+ Here is the caller graph for this function:

◆ HasOwnPropertyImplementation()

static Object* v8::internal::HasOwnPropertyImplementation ( Isolate isolate,
Handle< JSObject object,
Handle< Name key 
)
static

Definition at line 2695 of file runtime.cc.

2697  {
2698  Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key);
2699  if (!maybe.has_value) return isolate->heap()->exception();
2700  if (maybe.value) return isolate->heap()->true_value();
2701  // Handle hidden prototypes. If there's a hidden prototype above this thing
2702  // then we have to check it for properties, because they are supposed to
2703  // look like they are on this object.
2704  PrototypeIterator iter(isolate, object);
2705  if (!iter.IsAtEnd() &&
2706  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter))
2707  ->map()
2708  ->is_hidden_prototype()) {
2709  // TODO(verwaest): The recursion is not necessary for keys that are array
2710  // indices. Removing this.
2712  isolate, Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)),
2713  key);
2714  }
2716  return isolate->heap()->false_value();
2717 }
static Object * HasOwnPropertyImplementation(Isolate *isolate, Handle< JSObject > object, Handle< Name > key)
Definition: runtime.cc:2695

References v8::internal::PrototypeIterator::GetCurrent(), v8::internal::JSReceiver::HasOwnProperty(), v8::internal::Isolate::heap(), v8::internal::PrototypeIterator::IsAtEnd(), v8::maybe(), and RETURN_FAILURE_IF_SCHEDULED_EXCEPTION.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasSourceCode()

static bool v8::internal::HasSourceCode ( Heap heap,
SharedFunctionInfo info 
)
inlinestatic

Definition at line 703 of file objects-visiting-inl.h.

703  {
704  Object* undefined = heap->undefined_value();
705  return (info->script() != undefined) &&
706  (reinterpret_cast<Script*>(info->script())->source() != undefined);
707 }

◆ Heap::RightTrimFixedArray< Heap::FROM_GC >()

◆ Heap::RightTrimFixedArray< Heap::FROM_MUTATOR >()

◆ HeapObjectTagMask()

intptr_t v8::internal::HeapObjectTagMask ( )

Definition at line 12 of file checks.cc.

12 { return kHeapObjectTagMask; }
const intptr_t kHeapObjectTagMask
Definition: v8.h:5739

References kHeapObjectTagMask.

Referenced by v8::internal::AllocationInfo::INLINE().

+ Here is the caller graph for this function:

◆ HeapSortPairs()

void v8::internal::HeapSortPairs ( FixedArray content,
FixedArray numbers,
int  len 
)

Definition at line 13293 of file objects.cc.

13293  {
13294  // In-place heap sort.
13295  DCHECK(content->length() == numbers->length());
13296 
13297  // Bottom-up max-heap construction.
13298  for (int i = 1; i < len; ++i) {
13299  int child_index = i;
13300  while (child_index > 0) {
13301  int parent_index = ((child_index + 1) >> 1) - 1;
13302  uint32_t parent_value = NumberToUint32(numbers->get(parent_index));
13303  uint32_t child_value = NumberToUint32(numbers->get(child_index));
13304  if (parent_value < child_value) {
13305  content->SwapPairs(numbers, parent_index, child_index);
13306  } else {
13307  break;
13308  }
13309  child_index = parent_index;
13310  }
13311  }
13312 
13313  // Extract elements and create sorted array.
13314  for (int i = len - 1; i > 0; --i) {
13315  // Put max element at the back of the array.
13316  content->SwapPairs(numbers, 0, i);
13317  // Sift down the new top element.
13318  int parent_index = 0;
13319  while (true) {
13320  int child_index = ((parent_index + 1) << 1) - 1;
13321  if (child_index >= i) break;
13322  uint32_t child1_value = NumberToUint32(numbers->get(child_index));
13323  uint32_t child2_value = NumberToUint32(numbers->get(child_index + 1));
13324  uint32_t parent_value = NumberToUint32(numbers->get(parent_index));
13325  if (child_index + 1 >= i || child1_value > child2_value) {
13326  if (parent_value > child1_value) break;
13327  content->SwapPairs(numbers, parent_index, child_index);
13328  parent_index = child_index;
13329  } else {
13330  if (parent_value > child2_value) break;
13331  content->SwapPairs(numbers, parent_index, child_index + 1);
13332  parent_index = child_index + 1;
13333  }
13334  }
13335  }
13336 }
uint32_t NumberToUint32(Object *number)
Definition: conversions.h:195

References DCHECK, v8::internal::FixedArray::get(), v8::internal::FixedArrayBase::length(), NumberToUint32(), and v8::internal::FixedArray::SwapPairs().

Referenced by v8::internal::FixedArray::SortPairs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hex()

OStream & v8::internal::hex ( OStream os)

Definition at line 117 of file ostreams.cc.

117  { // NOLINT(runtime/references)
118  return os.hex();
119 }

References v8::internal::OStream::hex().

+ Here is the call graph for this function:

◆ HexCharOfValue()

static char v8::internal::HexCharOfValue ( int  value)
static

Definition at line 542 of file bignum.cc.

542  {
543  DCHECK(0 <= value && value <= 16);
544  if (value < 10) return value + '0';
545  return value - 10 + 'A';
546 }

References DCHECK.

Referenced by v8::internal::Bignum::ToHexString().

+ Here is the caller graph for this function:

◆ HexCharValue()

static int v8::internal::HexCharValue ( char  c)
static

Definition at line 103 of file bignum.cc.

103  {
104  if ('0' <= c && c <= '9') return c - '0';
105  if ('a' <= c && c <= 'f') return 10 + c - 'a';
106  if ('A' <= c && c <= 'F') return 10 + c - 'A';
107  UNREACHABLE();
108  return 0; // To make compiler happy.
109 }

References UNREACHABLE.

Referenced by v8::internal::Bignum::AssignHexString().

+ Here is the caller graph for this function:

◆ HexValue()

int v8::internal::HexValue ( uc32  c)
inline

Definition at line 31 of file scanner.h.

31  {
32  c -= '0';
33  if (static_cast<unsigned>(c) <= 9) return c;
34  c = (c | 0x20) - ('a' - '0'); // detect 0x11..0x16 and 0x31..0x36.
35  if (static_cast<unsigned>(c) <= 5) return c + 10;
36  return -1;
37 }

Referenced by v8::internal::Scanner::ScanHexNumber().

+ Here is the caller graph for this function:

◆ IdToKey()

static uint32_t v8::internal::IdToKey ( TypeFeedbackId  ast_id)
static

Definition at line 35 of file type-info.cc.

35  {
36  return static_cast<uint32_t>(ast_id.ToInt());
37 }

References v8::internal::TypeFeedbackId::ToInt().

Referenced by v8::internal::TypeFeedbackOracle::GetInfo(), and v8::internal::TypeFeedbackOracle::SetInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IncreaseBy()

static int v8::internal::IncreaseBy ( int  previous,
int  increase 
)
static

Definition at line 968 of file ast.cc.

968  {
969  if (RegExpTree::kInfinity - previous < increase) {
970  return RegExpTree::kInfinity;
971  } else {
972  return previous + increase;
973  }
974 }

References v8::internal::RegExpTree::kInfinity.

◆ init_fast_sqrt_function()

void v8::internal::init_fast_sqrt_function ( )

Referenced by v8::internal::V8::InitializeOncePerProcessImpl().

+ Here is the caller graph for this function:

◆ init_memcopy_functions()

void v8::internal::init_memcopy_functions ( )

Definition at line 381 of file utils.cc.

381  {
382 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
383  MemMoveFunction generated_memmove = CreateMemMoveFunction();
384  if (generated_memmove != NULL) {
385  memmove_function = generated_memmove;
386  }
387 #elif V8_OS_POSIX && V8_HOST_ARCH_ARM
388  memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper);
389  memcopy_uint16_uint8_function =
390  CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper);
391 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS
392  memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper);
393 #endif
394 }

References NULL.

Referenced by v8::internal::V8::InitializeOncePerProcessImpl().

+ Here is the caller graph for this function:

◆ INITIALIZE_REGISTER() [1/6]

v8::internal::INITIALIZE_REGISTER ( CPURegister  ,
NoCPUReg  ,
,
,
CPURegister::kNoRegister   
)

◆ INITIALIZE_REGISTER() [2/6]

v8::internal::INITIALIZE_REGISTER ( FPRegister  ,
NoFPReg  ,
,
,
CPURegister::kNoRegister   
)

◆ INITIALIZE_REGISTER() [3/6]

v8::internal::INITIALIZE_REGISTER ( Register  ,
csp  ,
kSPRegInternalCode  ,
kXRegSizeInBits  ,
CPURegister::kRegister   
)

◆ INITIALIZE_REGISTER() [4/6]

v8::internal::INITIALIZE_REGISTER ( Register  ,
no_reg  ,
,
,
CPURegister::kNoRegister   
)

◆ INITIALIZE_REGISTER() [5/6]

v8::internal::INITIALIZE_REGISTER ( Register  ,
NoReg  ,
,
,
CPURegister::kNoRegister   
)

◆ INITIALIZE_REGISTER() [6/6]

v8::internal::INITIALIZE_REGISTER ( Register  ,
wcsp  ,
kSPRegInternalCode  ,
kWRegSizeInBits  ,
CPURegister::kRegister   
)

◆ InitializeDescriptorDispatchedCall()

static void v8::internal::InitializeDescriptorDispatchedCall ( CodeStub stub,
void **  value_out 
)
static

Definition at line 233 of file code-stubs.cc.

234  {
235  CodeStubDescriptor* descriptor_out =
236  reinterpret_cast<CodeStubDescriptor*>(value_out);
237  stub->InitializeDescriptor(descriptor_out);
238  descriptor_out->set_call_descriptor(stub->GetCallInterfaceDescriptor());
239 }

References v8::internal::CodeStubDescriptor::set_call_descriptor().

+ Here is the call graph for this function:

◆ InitializeGCOnce()

static void v8::internal::InitializeGCOnce ( )
static

Definition at line 5052 of file heap.cc.

5052  {
5054  NewSpaceScavenger::Initialize();
5055  MarkCompactCollector::Initialize();
5056 }
static void InitializeScavengingVisitorsTables()
Definition: heap.cc:2214

References v8::internal::MarkCompactCollector::Initialize(), v8::internal::StaticNewSpaceVisitor< NewSpaceScavenger >::Initialize(), and InitializeScavengingVisitorsTables().

Referenced by v8::internal::Heap::SetUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeICU()

bool v8::internal::InitializeICU ( const char *  icu_data_file)

Definition at line 41 of file icu_util.cc.

41  {
42 #if !defined(V8_I18N_SUPPORT)
43  return true;
44 #else
45 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED
46  // We expect to find the ICU data module alongside the current module.
47  HMODULE module = LoadLibraryA(ICU_UTIL_DATA_SHARED_MODULE_NAME);
48  if (!module) return false;
49 
50  FARPROC addr = GetProcAddress(module, ICU_UTIL_DATA_SYMBOL);
51  if (!addr) return false;
52 
53  UErrorCode err = U_ZERO_ERROR;
54  udata_setCommonData(reinterpret_cast<void*>(addr), &err);
55  return err == U_ZERO_ERROR;
56 #elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_STATIC
57  // Mac/Linux bundle the ICU data in.
58  return true;
59 #elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
60  if (!icu_data_file) return false;
61 
62  if (g_icu_data_ptr) return true;
63 
64  FILE* inf = fopen(icu_data_file, "rb");
65  if (!inf) return false;
66 
67  fseek(inf, 0, SEEK_END);
68  size_t size = ftell(inf);
69  rewind(inf);
70 
71  g_icu_data_ptr = new char[size];
72  if (fread(g_icu_data_ptr, 1, size, inf) != size) {
73  delete[] g_icu_data_ptr;
74  g_icu_data_ptr = NULL;
75  fclose(inf);
76  return false;
77  }
78  fclose(inf);
79 
80  atexit(free_icu_data_ptr);
81 
82  UErrorCode err = U_ZERO_ERROR;
83  udata_setCommonData(reinterpret_cast<void*>(g_icu_data_ptr), &err);
84  return err == U_ZERO_ERROR;
85 #endif
86 #endif
87 }

References NULL, and size.

Referenced by v8::V8::InitializeICU().

+ Here is the caller graph for this function:

◆ InitializeScavengingVisitorsTables()

static void v8::internal::InitializeScavengingVisitorsTables ( )
static

Definition at line 2214 of file heap.cc.

2214  {
2215  ScavengingVisitor<TRANSFER_MARKS,
2216  LOGGING_AND_PROFILING_DISABLED>::Initialize();
2217  ScavengingVisitor<IGNORE_MARKS, LOGGING_AND_PROFILING_DISABLED>::Initialize();
2218  ScavengingVisitor<TRANSFER_MARKS,
2219  LOGGING_AND_PROFILING_ENABLED>::Initialize();
2220  ScavengingVisitor<IGNORE_MARKS, LOGGING_AND_PROFILING_ENABLED>::Initialize();
2221 }

References v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::Initialize(), LOGGING_AND_PROFILING_DISABLED, LOGGING_AND_PROFILING_ENABLED, and TRANSFER_MARKS.

Referenced by InitializeGCOnce().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeVectorLoadStub()

static void v8::internal::InitializeVectorLoadStub ( Isolate isolate,
CodeStubDescriptor descriptor,
Address  deoptimization_handler 
)
static

Definition at line 617 of file code-stubs.cc.

619  {
620  DCHECK(FLAG_vector_ics);
621  descriptor->Initialize(deoptimization_handler);
622 }

References DCHECK, and v8::internal::CodeStubDescriptor::Initialize().

+ Here is the call graph for this function:

◆ InitialScaledStartValues()

static void v8::internal::InitialScaledStartValues ( double  v,
int  estimated_power,
bool  need_boundary_deltas,
Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus 
)
static

Definition at line 573 of file bignum-dtoa.cc.

579  {
580  if (Double(v).Exponent() >= 0) {
582  v, estimated_power, need_boundary_deltas,
583  numerator, denominator, delta_minus, delta_plus);
584  } else if (estimated_power >= 0) {
586  v, estimated_power, need_boundary_deltas,
587  numerator, denominator, delta_minus, delta_plus);
588  } else {
590  v, estimated_power, need_boundary_deltas,
591  numerator, denominator, delta_minus, delta_plus);
592  }
593 }
static void InitialScaledStartValuesNegativeExponentNegativePower(double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
Definition: bignum-dtoa.cc:477
static void InitialScaledStartValuesPositiveExponent(double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
Definition: bignum-dtoa.cc:381
static void InitialScaledStartValuesNegativeExponentPositivePower(double v, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
Definition: bignum-dtoa.cc:427

References InitialScaledStartValuesNegativeExponentNegativePower(), InitialScaledStartValuesNegativeExponentPositivePower(), and InitialScaledStartValuesPositiveExponent().

Referenced by BignumDtoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitialScaledStartValuesNegativeExponentNegativePower()

static void v8::internal::InitialScaledStartValuesNegativeExponentNegativePower ( double  v,
int  estimated_power,
bool  need_boundary_deltas,
Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus 
)
static

Definition at line 477 of file bignum-dtoa.cc.

480  {
481  const uint64_t kMinimalNormalizedExponent =
482  V8_2PART_UINT64_C(0x00100000, 00000000);
483  uint64_t significand = Double(v).Significand();
484  int exponent = Double(v).Exponent();
485  // Instead of multiplying the denominator with 10^estimated_power we
486  // multiply all values (numerator and deltas) by 10^-estimated_power.
487 
488  // Use numerator as temporary container for power_ten.
489  Bignum* power_ten = numerator;
490  power_ten->AssignPowerUInt16(10, -estimated_power);
491 
492  if (need_boundary_deltas) {
493  // Since power_ten == numerator we must make a copy of 10^estimated_power
494  // before we complete the computation of the numerator.
495  // delta_plus = delta_minus = 10^estimated_power
496  delta_plus->AssignBignum(*power_ten);
497  delta_minus->AssignBignum(*power_ten);
498  }
499 
500  // numerator = significand * 2 * 10^-estimated_power
501  // since v = significand * 2^exponent this is equivalent to
502  // numerator = v * 10^-estimated_power * 2 * 2^-exponent.
503  // Remember: numerator has been abused as power_ten. So no need to assign it
504  // to itself.
505  DCHECK(numerator == power_ten);
506  numerator->MultiplyByUInt64(significand);
507 
508  // denominator = 2 * 2^-exponent with exponent < 0.
509  denominator->AssignUInt16(1);
510  denominator->ShiftLeft(-exponent);
511 
512  if (need_boundary_deltas) {
513  // Introduce a common denominator so that the deltas to the boundaries are
514  // integers.
515  numerator->ShiftLeft(1);
516  denominator->ShiftLeft(1);
517  // With this shift the boundaries have their correct value, since
518  // delta_plus = 10^-estimated_power, and
519  // delta_minus = 10^-estimated_power.
520  // These assignments have been done earlier.
521 
522  // The special case where the lower boundary is twice as close.
523  // This time we have to look out for the exception too.
524  uint64_t v_bits = Double(v).AsUint64();
525  if ((v_bits & Double::kSignificandMask) == 0 &&
526  // The only exception where a significand == 0 has its boundaries at
527  // "normal" distances:
528  (v_bits & Double::kExponentMask) != kMinimalNormalizedExponent) {
529  numerator->ShiftLeft(1); // *2
530  denominator->ShiftLeft(1); // *2
531  delta_plus->ShiftLeft(1); // *2
532  }
533  }
534 }

References v8::internal::Bignum::AssignBignum(), v8::internal::Bignum::AssignPowerUInt16(), v8::internal::Bignum::AssignUInt16(), v8::internal::Double::AsUint64(), DCHECK, v8::internal::Double::Exponent(), v8::internal::Double::kExponentMask, v8::internal::Double::kSignificandMask, v8::internal::Bignum::MultiplyByUInt64(), v8::internal::Bignum::ShiftLeft(), v8::internal::Double::Significand(), and V8_2PART_UINT64_C.

Referenced by InitialScaledStartValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitialScaledStartValuesNegativeExponentPositivePower()

static void v8::internal::InitialScaledStartValuesNegativeExponentPositivePower ( double  v,
int  estimated_power,
bool  need_boundary_deltas,
Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus 
)
static

Definition at line 427 of file bignum-dtoa.cc.

430  {
431  uint64_t significand = Double(v).Significand();
432  int exponent = Double(v).Exponent();
433  // v = f * 2^e with e < 0, and with estimated_power >= 0.
434  // This means that e is close to 0 (have a look at how estimated_power is
435  // computed).
436 
437  // numerator = significand
438  // since v = significand * 2^exponent this is equivalent to
439  // numerator = v * / 2^-exponent
440  numerator->AssignUInt64(significand);
441  // denominator = 10^estimated_power * 2^-exponent (with exponent < 0)
442  denominator->AssignPowerUInt16(10, estimated_power);
443  denominator->ShiftLeft(-exponent);
444 
445  if (need_boundary_deltas) {
446  // Introduce a common denominator so that the deltas to the boundaries are
447  // integers.
448  denominator->ShiftLeft(1);
449  numerator->ShiftLeft(1);
450  // Let v = f * 2^e, then m+ - v = 1/2 * 2^e; With the common
451  // denominator (of 2) delta_plus equals 2^e.
452  // Given that the denominator already includes v's exponent the distance
453  // to the boundaries is simply 1.
454  delta_plus->AssignUInt16(1);
455  // Same for delta_minus (with adjustments below if f == 2^p-1).
456  delta_minus->AssignUInt16(1);
457 
458  // If the significand (without the hidden bit) is 0, then the lower
459  // boundary is closer than just one ulp (unit in the last place).
460  // There is only one exception: if the next lower number is a denormal
461  // then the distance is 1 ulp. Since the exponent is close to zero
462  // (otherwise estimated_power would have been negative) this cannot happen
463  // here either.
464  uint64_t v_bits = Double(v).AsUint64();
465  if ((v_bits & Double::kSignificandMask) == 0) {
466  // The lower boundary is closer at half the distance of "normal" numbers.
467  // Increase the denominator and adapt all but the delta_minus.
468  denominator->ShiftLeft(1); // *2
469  numerator->ShiftLeft(1); // *2
470  delta_plus->ShiftLeft(1); // *2
471  }
472  }
473 }

References v8::internal::Bignum::AssignPowerUInt16(), v8::internal::Bignum::AssignUInt16(), v8::internal::Bignum::AssignUInt64(), v8::internal::Double::AsUint64(), v8::internal::Double::Exponent(), v8::internal::Double::kSignificandMask, v8::internal::Bignum::ShiftLeft(), and v8::internal::Double::Significand().

Referenced by InitialScaledStartValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitialScaledStartValuesPositiveExponent()

static void v8::internal::InitialScaledStartValuesPositiveExponent ( double  v,
int  estimated_power,
bool  need_boundary_deltas,
Bignum numerator,
Bignum denominator,
Bignum delta_minus,
Bignum delta_plus 
)
static

Definition at line 381 of file bignum-dtoa.cc.

384  {
385  // A positive exponent implies a positive power.
386  DCHECK(estimated_power >= 0);
387  // Since the estimated_power is positive we simply multiply the denominator
388  // by 10^estimated_power.
389 
390  // numerator = v.
391  numerator->AssignUInt64(Double(v).Significand());
392  numerator->ShiftLeft(Double(v).Exponent());
393  // denominator = 10^estimated_power.
394  denominator->AssignPowerUInt16(10, estimated_power);
395 
396  if (need_boundary_deltas) {
397  // Introduce a common denominator so that the deltas to the boundaries are
398  // integers.
399  denominator->ShiftLeft(1);
400  numerator->ShiftLeft(1);
401  // Let v = f * 2^e, then m+ - v = 1/2 * 2^e; With the common
402  // denominator (of 2) delta_plus equals 2^e.
403  delta_plus->AssignUInt16(1);
404  delta_plus->ShiftLeft(Double(v).Exponent());
405  // Same for delta_minus (with adjustments below if f == 2^p-1).
406  delta_minus->AssignUInt16(1);
407  delta_minus->ShiftLeft(Double(v).Exponent());
408 
409  // If the significand (without the hidden bit) is 0, then the lower
410  // boundary is closer than just half a ulp (unit in the last place).
411  // There is only one exception: if the next lower number is a denormal then
412  // the distance is 1 ulp. This cannot be the case for exponent >= 0 (but we
413  // have to test it in the other function where exponent < 0).
414  uint64_t v_bits = Double(v).AsUint64();
415  if ((v_bits & Double::kSignificandMask) == 0) {
416  // The lower boundary is closer at half the distance of "normal" numbers.
417  // Increase the common denominator and adapt all but the delta_minus.
418  denominator->ShiftLeft(1); // *2
419  numerator->ShiftLeft(1); // *2
420  delta_plus->ShiftLeft(1); // *2
421  }
422  }
423 }

References v8::internal::Bignum::AssignPowerUInt16(), v8::internal::Bignum::AssignUInt16(), v8::internal::Bignum::AssignUInt64(), v8::internal::Double::AsUint64(), DCHECK, v8::internal::Double::kSignificandMask, and v8::internal::Bignum::ShiftLeft().

Referenced by InitialScaledStartValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ INLINE() [1/4]

v8::internal::INLINE ( static HeapObject EnsureDoubleAlignedHeap *heap, HeapObject *object, int size)

◆ INLINE() [2/4]

template<typename sourcechar , typename sinkchar >
v8::internal::INLINE ( static void   CopyCharsUnsignedsinkchar *dest, const sourcechar *src, int chars)

◆ INLINE() [3/4]

template<typename Char >
static v8::internal::INLINE ( Vector< const Char >   GetCharVectorHandle< String > string)
static

◆ INLINE() [4/4]

template<typename sourcechar , typename sinkchar >
v8::internal::INLINE ( void   CopyCharssinkchar *dest, const sourcechar *src, int chars)

◆ InsertCodeIntoOptimizedCodeMap()

static void v8::internal::InsertCodeIntoOptimizedCodeMap ( CompilationInfo info)
static

Definition at line 709 of file compiler.cc.

709  {
710  Handle<Code> code = info->code();
711  if (code->kind() != Code::OPTIMIZED_FUNCTION) return; // Nothing to do.
712 
713  // Context specialization folds-in the context, so no sharing can occur.
714  if (code->is_turbofanned() && info->is_context_specializing()) return;
715 
716  // Cache optimized code.
717  if (FLAG_cache_optimized_code) {
718  Handle<JSFunction> function = info->closure();
719  Handle<SharedFunctionInfo> shared(function->shared());
720  // Do not cache bound functions.
721  if (shared->bound()) return;
722  Handle<FixedArray> literals(function->literals());
723  Handle<Context> native_context(function->context()->native_context());
724  SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
725  literals, info->osr_ast_id());
726  }
727 }

References v8::internal::SharedFunctionInfo::AddToOptimizedCodeMap(), v8::internal::CompilationInfo::closure(), v8::internal::CompilationInfo::code(), v8::internal::CompilationInfo::is_context_specializing(), literals(), and v8::internal::CompilationInfo::osr_ast_id().

Referenced by v8::internal::Compiler::GetConcurrentlyOptimizedCode(), and GetOptimizedCodeNow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertIntoString()

static void v8::internal::InsertIntoString ( OStringStream os,
std::string *  string 
)
static

Definition at line 17 of file basic-block-profiler.cc.

17  {
18  string->insert(string->begin(), os->c_str(), &os->c_str()[os->size()]);
19 }

References v8::internal::OStringStream::c_str(), and v8::internal::OStringStream::size().

Referenced by v8::internal::BasicBlockProfiler::Data::SetCode(), v8::internal::BasicBlockProfiler::Data::SetFunctionName(), and v8::internal::BasicBlockProfiler::Data::SetSchedule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertionPointFound()

static bool v8::internal::InsertionPointFound ( Name key1,
Name key2 
)
static

Definition at line 42 of file transitions.cc.

42  {
43  return key1->Hash() > key2->Hash();
44 }

References v8::internal::Name::Hash().

Referenced by v8::internal::TransitionArray::CopyInsert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertionSortPairs()

static void v8::internal::InsertionSortPairs ( FixedArray content,
FixedArray numbers,
int  len 
)
static

Definition at line 13278 of file objects.cc.

13280  {
13281  for (int i = 1; i < len; i++) {
13282  int j = i;
13283  while (j > 0 &&
13284  (NumberToUint32(numbers->get(j - 1)) >
13285  NumberToUint32(numbers->get(j)))) {
13286  content->SwapPairs(numbers, j - 1, j);
13287  j--;
13288  }
13289  }
13290 }

References v8::internal::FixedArray::get(), NumberToUint32(), and v8::internal::FixedArray::SwapPairs().

Referenced by v8::internal::FixedArray::SortPairs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertRangeInCanonicalList()

static int v8::internal::InsertRangeInCanonicalList ( ZoneList< CharacterRange > *  list,
int  count,
CharacterRange  insert 
)
static

Definition at line 5442 of file jsregexp.cc.

5444  {
5445  // Inserts a range into list[0..count[, which must be sorted
5446  // by from value and non-overlapping and non-adjacent, using at most
5447  // list[0..count] for the result. Returns the number of resulting
5448  // canonicalized ranges. Inserting a range may collapse existing ranges into
5449  // fewer ranges, so the return value can be anything in the range 1..count+1.
5450  uc16 from = insert.from();
5451  uc16 to = insert.to();
5452  int start_pos = 0;
5453  int end_pos = count;
5454  for (int i = count - 1; i >= 0; i--) {
5455  CharacterRange current = list->at(i);
5456  if (current.from() > to + 1) {
5457  end_pos = i;
5458  } else if (current.to() + 1 < from) {
5459  start_pos = i + 1;
5460  break;
5461  }
5462  }
5463 
5464  // Inserted range overlaps, or is adjacent to, ranges at positions
5465  // [start_pos..end_pos[. Ranges before start_pos or at or after end_pos are
5466  // not affected by the insertion.
5467  // If start_pos == end_pos, the range must be inserted before start_pos.
5468  // if start_pos < end_pos, the entire range from start_pos to end_pos
5469  // must be merged with the insert range.
5470 
5471  if (start_pos == end_pos) {
5472  // Insert between existing ranges at position start_pos.
5473  if (start_pos < count) {
5474  MoveRanges(list, start_pos, start_pos + 1, count - start_pos);
5475  }
5476  list->at(start_pos) = insert;
5477  return count + 1;
5478  }
5479  if (start_pos + 1 == end_pos) {
5480  // Replace single existing range at position start_pos.
5481  CharacterRange to_replace = list->at(start_pos);
5482  int new_from = Min(to_replace.from(), from);
5483  int new_to = Max(to_replace.to(), to);
5484  list->at(start_pos) = CharacterRange(new_from, new_to);
5485  return count;
5486  }
5487  // Replace a number of existing ranges from start_pos to end_pos - 1.
5488  // Move the remaining ranges down.
5489 
5490  int new_from = Min(list->at(start_pos).from(), from);
5491  int new_to = Max(list->at(end_pos - 1).to(), to);
5492  if (end_pos < count) {
5493  MoveRanges(list, end_pos, start_pos + 1, count - end_pos);
5494  }
5495  list->at(start_pos) = CharacterRange(new_from, new_to);
5496  return count - (end_pos - start_pos) + 1;
5497 }
static void MoveRanges(ZoneList< CharacterRange > *list, int from, int to, int count)
Definition: jsregexp.cc:5425

References v8::internal::List< T, AllocationPolicy >::at(), v8::internal::CharacterRange::from(), Max(), Min(), MoveRanges(), v8::internal::CharacterRange::to(), and to().

Referenced by v8::internal::CharacterRange::Canonicalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallBuiltin()

static void v8::internal::InstallBuiltin ( Isolate isolate,
Handle< JSObject holder,
const char *  name,
Builtins::Name  builtin_name 
)
static

Definition at line 1374 of file runtime.cc.

1375  {
1376  Handle<String> key = isolate->factory()->InternalizeUtf8String(name);
1377  Handle<Code> code(isolate->builtins()->builtin(builtin_name));
1378  Handle<JSFunction> optimized =
1379  isolate->factory()->NewFunctionWithoutPrototype(key, code);
1380  optimized->shared()->DontAdaptArguments();
1381  JSObject::AddProperty(holder, key, optimized, NONE);
1382 }

References v8::internal::JSObject::AddProperty(), v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::Isolate::factory(), name, and NONE.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallBuiltinFunctionId()

static void v8::internal::InstallBuiltinFunctionId ( Handle< JSObject holder,
const char *  function_name,
BuiltinFunctionId  id 
)
static

Definition at line 2121 of file bootstrapper.cc.

2123  {
2124  Isolate* isolate = holder->GetIsolate();
2125  Handle<Object> function_object =
2126  Object::GetProperty(isolate, holder, function_name).ToHandleChecked();
2127  Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
2128  function->shared()->set_function_data(Smi::FromInt(id));
2129 }

◆ InstallFunction()

static Handle<JSFunction> v8::internal::InstallFunction ( Handle< JSObject target,
const char *  name,
InstanceType  type,
int  instance_size,
MaybeHandle< JSObject maybe_prototype,
Builtins::Name  call 
)
static

Definition at line 367 of file bootstrapper.cc.

372  {
373  Isolate* isolate = target->GetIsolate();
374  Factory* factory = isolate->factory();
375  Handle<String> internalized_name = factory->InternalizeUtf8String(name);
376  Handle<Code> call_code = Handle<Code>(isolate->builtins()->builtin(call));
377  Handle<JSObject> prototype;
378  Handle<JSFunction> function = maybe_prototype.ToHandle(&prototype)
379  ? factory->NewFunction(internalized_name, call_code, prototype,
380  type, instance_size)
381  : factory->NewFunctionWithoutPrototype(internalized_name, call_code);
382  PropertyAttributes attributes;
383  if (target->IsJSBuiltinsObject()) {
384  attributes =
386  } else {
387  attributes = DONT_ENUM;
388  }
389  JSObject::AddProperty(target, internalized_name, function, attributes);
390  if (target->IsJSGlobalObject()) {
391  function->shared()->set_instance_class_name(*internalized_name);
392  }
393  function->shared()->set_native(true);
394  return function;
395 }

References v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), DONT_DELETE, DONT_ENUM, v8::internal::Isolate::factory(), name, and READ_ONLY.

+ Here is the call graph for this function:

◆ InstantiateAccessorComponent()

static Handle<Object> v8::internal::InstantiateAccessorComponent ( Isolate isolate,
Handle< Object component 
)
static

Definition at line 2068 of file runtime.cc.

2069  {
2070  if (component->IsUndefined()) return isolate->factory()->undefined_value();
2071  Handle<FunctionTemplateInfo> info =
2072  Handle<FunctionTemplateInfo>::cast(component);
2073  return Utils::OpenHandle(*Utils::ToLocal(info)->GetFunction());
2074 }

References v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), v8::Utils::OpenHandle(), and v8::Utils::ToLocal().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IntegerLog2()

int v8::internal::IntegerLog2 ( uint32_t  value)
inline

Definition at line 39 of file misc-intrinsics.h.

39  {
40  int result, shift;
41 
42  shift = (value > 0xFFFF) << 4;
43  value >>= shift;
44  result = shift;
45 
46  shift = (value > 0xFF) << 3;
47  value >>= shift;
48  result |= shift;
49 
50  shift = (value > 0xF) << 2;
51  value >>= shift;
52  result |= shift;
53 
54  shift = (value > 0x3) << 1;
55  value >>= shift;
56  result |= shift;
57 
58  result |= (value >> 1);
59 
60  return result;
61 }
enable harmony numeric enable harmony object literal extensions Optimize object Array shift

References shift.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ InternalStringToDouble()

template<class Iterator , class EndMark >
double v8::internal::InternalStringToDouble ( UnicodeCache unicode_cache,
Iterator  current,
EndMark  end,
int  flags,
double  empty_string_val 
)

Definition at line 424 of file conversions-inl.h.

428  {
429  // To make sure that iterator dereferencing is valid the following
430  // convention is used:
431  // 1. Each '++current' statement is followed by check for equality to 'end'.
432  // 2. If AdvanceToNonspace returned false then current == end.
433  // 3. If 'current' becomes be equal to 'end' the function returns or goes to
434  // 'parsing_done'.
435  // 4. 'current' is not dereferenced after the 'parsing_done' label.
436  // 5. Code before 'parsing_done' may rely on 'current != end'.
437  if (!AdvanceToNonspace(unicode_cache, &current, end)) {
438  return empty_string_val;
439  }
440 
441  const bool allow_trailing_junk = (flags & ALLOW_TRAILING_JUNK) != 0;
442 
443  // The longest form of simplified number is: "-<significant digits>'.1eXXX\0".
444  const int kBufferSize = kMaxSignificantDigits + 10;
445  char buffer[kBufferSize]; // NOLINT: size is known at compile time.
446  int buffer_pos = 0;
447 
448  // Exponent will be adjusted if insignificant digits of the integer part
449  // or insignificant leading zeros of the fractional part are dropped.
450  int exponent = 0;
451  int significant_digits = 0;
452  int insignificant_digits = 0;
453  bool nonzero_digit_dropped = false;
454 
455  enum Sign {
456  NONE,
457  NEGATIVE,
458  POSITIVE
459  };
460 
461  Sign sign = NONE;
462 
463  if (*current == '+') {
464  // Ignore leading sign.
465  ++current;
466  if (current == end) return JunkStringValue();
467  sign = POSITIVE;
468  } else if (*current == '-') {
469  ++current;
470  if (current == end) return JunkStringValue();
471  sign = NEGATIVE;
472  }
473 
474  static const char kInfinityString[] = "Infinity";
475  if (*current == kInfinityString[0]) {
476  if (!SubStringEquals(&current, end, kInfinityString)) {
477  return JunkStringValue();
478  }
479 
480  if (!allow_trailing_junk &&
481  AdvanceToNonspace(unicode_cache, &current, end)) {
482  return JunkStringValue();
483  }
484 
485  DCHECK(buffer_pos == 0);
486  return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY;
487  }
488 
489  bool leading_zero = false;
490  if (*current == '0') {
491  ++current;
492  if (current == end) return SignedZero(sign == NEGATIVE);
493 
494  leading_zero = true;
495 
496  // It could be hexadecimal value.
497  if ((flags & ALLOW_HEX) && (*current == 'x' || *current == 'X')) {
498  ++current;
499  if (current == end || !isDigit(*current, 16) || sign != NONE) {
500  return JunkStringValue(); // "0x".
501  }
502 
503  return InternalStringToIntDouble<4>(unicode_cache,
504  current,
505  end,
506  false,
507  allow_trailing_junk);
508 
509  // It could be an explicit octal value.
510  } else if ((flags & ALLOW_OCTAL) && (*current == 'o' || *current == 'O')) {
511  ++current;
512  if (current == end || !isDigit(*current, 8) || sign != NONE) {
513  return JunkStringValue(); // "0o".
514  }
515 
516  return InternalStringToIntDouble<3>(unicode_cache,
517  current,
518  end,
519  false,
520  allow_trailing_junk);
521 
522  // It could be a binary value.
523  } else if ((flags & ALLOW_BINARY) && (*current == 'b' || *current == 'B')) {
524  ++current;
525  if (current == end || !isBinaryDigit(*current) || sign != NONE) {
526  return JunkStringValue(); // "0b".
527  }
528 
529  return InternalStringToIntDouble<1>(unicode_cache,
530  current,
531  end,
532  false,
533  allow_trailing_junk);
534  }
535 
536  // Ignore leading zeros in the integer part.
537  while (*current == '0') {
538  ++current;
539  if (current == end) return SignedZero(sign == NEGATIVE);
540  }
541  }
542 
543  bool octal = leading_zero && (flags & ALLOW_IMPLICIT_OCTAL) != 0;
544 
545  // Copy significant digits of the integer part (if any) to the buffer.
546  while (*current >= '0' && *current <= '9') {
547  if (significant_digits < kMaxSignificantDigits) {
548  DCHECK(buffer_pos < kBufferSize);
549  buffer[buffer_pos++] = static_cast<char>(*current);
550  significant_digits++;
551  // Will later check if it's an octal in the buffer.
552  } else {
553  insignificant_digits++; // Move the digit into the exponential part.
554  nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
555  }
556  octal = octal && *current < '8';
557  ++current;
558  if (current == end) goto parsing_done;
559  }
560 
561  if (significant_digits == 0) {
562  octal = false;
563  }
564 
565  if (*current == '.') {
566  if (octal && !allow_trailing_junk) return JunkStringValue();
567  if (octal) goto parsing_done;
568 
569  ++current;
570  if (current == end) {
571  if (significant_digits == 0 && !leading_zero) {
572  return JunkStringValue();
573  } else {
574  goto parsing_done;
575  }
576  }
577 
578  if (significant_digits == 0) {
579  // octal = false;
580  // Integer part consists of 0 or is absent. Significant digits start after
581  // leading zeros (if any).
582  while (*current == '0') {
583  ++current;
584  if (current == end) return SignedZero(sign == NEGATIVE);
585  exponent--; // Move this 0 into the exponent.
586  }
587  }
588 
589  // There is a fractional part. We don't emit a '.', but adjust the exponent
590  // instead.
591  while (*current >= '0' && *current <= '9') {
592  if (significant_digits < kMaxSignificantDigits) {
593  DCHECK(buffer_pos < kBufferSize);
594  buffer[buffer_pos++] = static_cast<char>(*current);
595  significant_digits++;
596  exponent--;
597  } else {
598  // Ignore insignificant digits in the fractional part.
599  nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
600  }
601  ++current;
602  if (current == end) goto parsing_done;
603  }
604  }
605 
606  if (!leading_zero && exponent == 0 && significant_digits == 0) {
607  // If leading_zeros is true then the string contains zeros.
608  // If exponent < 0 then string was [+-]\.0*...
609  // If significant_digits != 0 the string is not equal to 0.
610  // Otherwise there are no digits in the string.
611  return JunkStringValue();
612  }
613 
614  // Parse exponential part.
615  if (*current == 'e' || *current == 'E') {
616  if (octal) return JunkStringValue();
617  ++current;
618  if (current == end) {
619  if (allow_trailing_junk) {
620  goto parsing_done;
621  } else {
622  return JunkStringValue();
623  }
624  }
625  char sign = '+';
626  if (*current == '+' || *current == '-') {
627  sign = static_cast<char>(*current);
628  ++current;
629  if (current == end) {
630  if (allow_trailing_junk) {
631  goto parsing_done;
632  } else {
633  return JunkStringValue();
634  }
635  }
636  }
637 
638  if (current == end || *current < '0' || *current > '9') {
639  if (allow_trailing_junk) {
640  goto parsing_done;
641  } else {
642  return JunkStringValue();
643  }
644  }
645 
646  const int max_exponent = INT_MAX / 2;
647  DCHECK(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
648  int num = 0;
649  do {
650  // Check overflow.
651  int digit = *current - '0';
652  if (num >= max_exponent / 10
653  && !(num == max_exponent / 10 && digit <= max_exponent % 10)) {
654  num = max_exponent;
655  } else {
656  num = num * 10 + digit;
657  }
658  ++current;
659  } while (current != end && *current >= '0' && *current <= '9');
660 
661  exponent += (sign == '-' ? -num : num);
662  }
663 
664  if (!allow_trailing_junk &&
665  AdvanceToNonspace(unicode_cache, &current, end)) {
666  return JunkStringValue();
667  }
668 
669  parsing_done:
670  exponent += insignificant_digits;
671 
672  if (octal) {
673  return InternalStringToIntDouble<3>(unicode_cache,
674  buffer,
675  buffer + buffer_pos,
676  sign == NEGATIVE,
677  allow_trailing_junk);
678  }
679 
680  if (nonzero_digit_dropped) {
681  buffer[buffer_pos++] = '1';
682  exponent--;
683  }
684 
685  SLOW_DCHECK(buffer_pos < kBufferSize);
686  buffer[buffer_pos] = '\0';
687 
688  double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
689  return (sign == NEGATIVE) ? -converted : converted;
690 }
#define SLOW_DCHECK(condition)
Definition: checks.h:30
double JunkStringValue()
bool isDigit(int x, int radix)
Definition: conversions.h:30
double Strtod(Vector< const char > buffer, int exponent)
Definition: strtod.cc:397
bool AdvanceToNonspace(UnicodeCache *unicode_cache, Iterator *current, EndMark end)
double SignedZero(bool negative)
const int kMaxSignificantDigits
Definition: conversions.h:27
bool isBinaryDigit(int x)
Definition: conversions.h:37
bool SubStringEquals(Iterator *current, EndMark end, const char *substring)

References AdvanceToNonspace(), ALLOW_BINARY, ALLOW_HEX, ALLOW_IMPLICIT_OCTAL, ALLOW_OCTAL, ALLOW_TRAILING_JUNK, DCHECK, v8::internal::anonymous_namespace{flags.cc}::flags, isBinaryDigit(), isDigit(), JunkStringValue(), v8::base::anonymous_namespace{semaphore-unittest.cc}::kBufferSize, kMaxSignificantDigits, NONE, sign, SignedZero(), SLOW_DCHECK, Strtod(), SubStringEquals(), and V8_INFINITY.

Referenced by StringToDouble().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InternalStringToInt()

template<class Iterator , class EndMark >
double v8::internal::InternalStringToInt ( UnicodeCache unicode_cache,
Iterator  current,
EndMark  end,
int  radix 
)

Definition at line 231 of file conversions-inl.h.

234  {
235  const bool allow_trailing_junk = true;
236  const double empty_string_val = JunkStringValue();
237 
238  if (!AdvanceToNonspace(unicode_cache, &current, end)) {
239  return empty_string_val;
240  }
241 
242  bool negative = false;
243  bool leading_zero = false;
244 
245  if (*current == '+') {
246  // Ignore leading sign; skip following spaces.
247  ++current;
248  if (current == end) {
249  return JunkStringValue();
250  }
251  } else if (*current == '-') {
252  ++current;
253  if (current == end) {
254  return JunkStringValue();
255  }
256  negative = true;
257  }
258 
259  if (radix == 0) {
260  // Radix detection.
261  radix = 10;
262  if (*current == '0') {
263  ++current;
264  if (current == end) return SignedZero(negative);
265  if (*current == 'x' || *current == 'X') {
266  radix = 16;
267  ++current;
268  if (current == end) return JunkStringValue();
269  } else {
270  leading_zero = true;
271  }
272  }
273  } else if (radix == 16) {
274  if (*current == '0') {
275  // Allow "0x" prefix.
276  ++current;
277  if (current == end) return SignedZero(negative);
278  if (*current == 'x' || *current == 'X') {
279  ++current;
280  if (current == end) return JunkStringValue();
281  } else {
282  leading_zero = true;
283  }
284  }
285  }
286 
287  if (radix < 2 || radix > 36) return JunkStringValue();
288 
289  // Skip leading zeros.
290  while (*current == '0') {
291  leading_zero = true;
292  ++current;
293  if (current == end) return SignedZero(negative);
294  }
295 
296  if (!leading_zero && !isDigit(*current, radix)) {
297  return JunkStringValue();
298  }
299 
300  if (base::bits::IsPowerOfTwo32(radix)) {
301  switch (radix) {
302  case 2:
303  return InternalStringToIntDouble<1>(
304  unicode_cache, current, end, negative, allow_trailing_junk);
305  case 4:
306  return InternalStringToIntDouble<2>(
307  unicode_cache, current, end, negative, allow_trailing_junk);
308  case 8:
309  return InternalStringToIntDouble<3>(
310  unicode_cache, current, end, negative, allow_trailing_junk);
311 
312  case 16:
313  return InternalStringToIntDouble<4>(
314  unicode_cache, current, end, negative, allow_trailing_junk);
315 
316  case 32:
317  return InternalStringToIntDouble<5>(
318  unicode_cache, current, end, negative, allow_trailing_junk);
319  default:
320  UNREACHABLE();
321  }
322  }
323 
324  if (radix == 10) {
325  // Parsing with strtod.
326  const int kMaxSignificantDigits = 309; // Doubles are less than 1.8e308.
327  // The buffer may contain up to kMaxSignificantDigits + 1 digits and a zero
328  // end.
329  const int kBufferSize = kMaxSignificantDigits + 2;
330  char buffer[kBufferSize];
331  int buffer_pos = 0;
332  while (*current >= '0' && *current <= '9') {
333  if (buffer_pos <= kMaxSignificantDigits) {
334  // If the number has more than kMaxSignificantDigits it will be parsed
335  // as infinity.
336  DCHECK(buffer_pos < kBufferSize);
337  buffer[buffer_pos++] = static_cast<char>(*current);
338  }
339  ++current;
340  if (current == end) break;
341  }
342 
343  if (!allow_trailing_junk &&
344  AdvanceToNonspace(unicode_cache, &current, end)) {
345  return JunkStringValue();
346  }
347 
348  SLOW_DCHECK(buffer_pos < kBufferSize);
349  buffer[buffer_pos] = '\0';
350  Vector<const char> buffer_vector(buffer, buffer_pos);
351  return negative ? -Strtod(buffer_vector, 0) : Strtod(buffer_vector, 0);
352  }
353 
354  // The following code causes accumulating rounding error for numbers greater
355  // than ~2^56. It's explicitly allowed in the spec: "if R is not 2, 4, 8, 10,
356  // 16, or 32, then mathInt may be an implementation-dependent approximation to
357  // the mathematical integer value" (15.1.2.2).
358 
359  int lim_0 = '0' + (radix < 10 ? radix : 10);
360  int lim_a = 'a' + (radix - 10);
361  int lim_A = 'A' + (radix - 10);
362 
363  // NOTE: The code for computing the value may seem a bit complex at
364  // first glance. It is structured to use 32-bit multiply-and-add
365  // loops as long as possible to avoid loosing precision.
366 
367  double v = 0.0;
368  bool done = false;
369  do {
370  // Parse the longest part of the string starting at index j
371  // possible while keeping the multiplier, and thus the part
372  // itself, within 32 bits.
373  unsigned int part = 0, multiplier = 1;
374  while (true) {
375  int d;
376  if (*current >= '0' && *current < lim_0) {
377  d = *current - '0';
378  } else if (*current >= 'a' && *current < lim_a) {
379  d = *current - 'a' + 10;
380  } else if (*current >= 'A' && *current < lim_A) {
381  d = *current - 'A' + 10;
382  } else {
383  done = true;
384  break;
385  }
386 
387  // Update the value of the part as long as the multiplier fits
388  // in 32 bits. When we can't guarantee that the next iteration
389  // will not overflow the multiplier, we stop parsing the part
390  // by leaving the loop.
391  const unsigned int kMaximumMultiplier = 0xffffffffU / 36;
392  uint32_t m = multiplier * radix;
393  if (m > kMaximumMultiplier) break;
394  part = part * radix + d;
395  multiplier = m;
396  DCHECK(multiplier > part);
397 
398  ++current;
399  if (current == end) {
400  done = true;
401  break;
402  }
403  }
404 
405  // Update the value and skip the part in the string.
406  v = v * multiplier + part;
407  } while (!done);
408 
409  if (!allow_trailing_junk &&
410  AdvanceToNonspace(unicode_cache, &current, end)) {
411  return JunkStringValue();
412  }
413 
414  return negative ? -v : v;
415 }

References AdvanceToNonspace(), DCHECK, isDigit(), v8::base::bits::IsPowerOfTwo32(), JunkStringValue(), v8::base::anonymous_namespace{semaphore-unittest.cc}::kBufferSize, kMaxSignificantDigits, negative, SignedZero(), SLOW_DCHECK, Strtod(), and UNREACHABLE.

Referenced by StringToInt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InternalStringToIntDouble()

template<int radix_log_2, class Iterator , class EndMark >
double v8::internal::InternalStringToIntDouble ( UnicodeCache unicode_cache,
Iterator  current,
EndMark  end,
bool  negative,
bool  allow_trailing_junk 
)

Definition at line 130 of file conversions-inl.h.

134  {
135  DCHECK(current != end);
136 
137  // Skip leading 0s.
138  while (*current == '0') {
139  ++current;
140  if (current == end) return SignedZero(negative);
141  }
142 
143  int64_t number = 0;
144  int exponent = 0;
145  const int radix = (1 << radix_log_2);
146 
147  do {
148  int digit;
149  if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
150  digit = static_cast<char>(*current) - '0';
151  } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
152  digit = static_cast<char>(*current) - 'a' + 10;
153  } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
154  digit = static_cast<char>(*current) - 'A' + 10;
155  } else {
156  if (allow_trailing_junk ||
157  !AdvanceToNonspace(unicode_cache, &current, end)) {
158  break;
159  } else {
160  return JunkStringValue();
161  }
162  }
163 
164  number = number * radix + digit;
165  int overflow = static_cast<int>(number >> 53);
166  if (overflow != 0) {
167  // Overflow occurred. Need to determine which direction to round the
168  // result.
169  int overflow_bits_count = 1;
170  while (overflow > 1) {
171  overflow_bits_count++;
172  overflow >>= 1;
173  }
174 
175  int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
176  int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
177  number >>= overflow_bits_count;
178  exponent = overflow_bits_count;
179 
180  bool zero_tail = true;
181  while (true) {
182  ++current;
183  if (current == end || !isDigit(*current, radix)) break;
184  zero_tail = zero_tail && *current == '0';
185  exponent += radix_log_2;
186  }
187 
188  if (!allow_trailing_junk &&
189  AdvanceToNonspace(unicode_cache, &current, end)) {
190  return JunkStringValue();
191  }
192 
193  int middle_value = (1 << (overflow_bits_count - 1));
194  if (dropped_bits > middle_value) {
195  number++; // Rounding up.
196  } else if (dropped_bits == middle_value) {
197  // Rounding to even to consistency with decimals: half-way case rounds
198  // up if significant part is odd and down otherwise.
199  if ((number & 1) != 0 || !zero_tail) {
200  number++; // Rounding up.
201  }
202  }
203 
204  // Rounding up may cause overflow.
205  if ((number & (static_cast<int64_t>(1) << 53)) != 0) {
206  exponent++;
207  number >>= 1;
208  }
209  break;
210  }
211  ++current;
212  } while (current != end);
213 
214  DCHECK(number < ((int64_t)1 << 53));
215  DCHECK(static_cast<int64_t>(static_cast<double>(number)) == number);
216 
217  if (exponent == 0) {
218  if (negative) {
219  if (number == 0) return -0.0;
220  number = -number;
221  }
222  return static_cast<double>(number);
223  }
224 
225  DCHECK(number != 0);
226  return std::ldexp(static_cast<double>(negative ? -number : number), exponent);
227 }

References AdvanceToNonspace(), DCHECK, isDigit(), JunkStringValue(), negative, overflow, and SignedZero().

+ Here is the call graph for this function:

◆ IntToCString()

const char * v8::internal::IntToCString ( int  n,
Vector< char >  buffer 
)

Definition at line 176 of file conversions.cc.

176  {
177  bool negative = false;
178  if (n < 0) {
179  // We must not negate the most negative int.
180  if (n == kMinInt) return DoubleToCString(n, buffer);
181  negative = true;
182  n = -n;
183  }
184  // Build the string backwards from the least significant digit.
185  int i = buffer.length();
186  buffer[--i] = '\0';
187  do {
188  buffer[--i] = '0' + (n % 10);
189  n /= 10;
190  } while (n);
191  if (negative) buffer[--i] = '-';
192  return buffer.start() + i;
193 }

References DoubleToCString(), kMinInt, v8::internal::Vector< T >::length(), negative, and v8::internal::Vector< T >::start().

+ Here is the call graph for this function:

◆ IntToSmi()

template<int kSmiShiftSize>
internal::Object* v8::internal::IntToSmi ( int  value)
inline

Definition at line 5749 of file v8.h.

5749  {
5750  int smi_shift_bits = kSmiTagSize + kSmiShiftSize;
5751  uintptr_t tagged_value =
5752  (static_cast<uintptr_t>(value) << smi_shift_bits) | kSmiTag;
5753  return reinterpret_cast<internal::Object*>(tagged_value);
5754 }
const int kSmiTagSize
Definition: v8.h:5743
const int kSmiShiftSize
Definition: v8.h:5805
const int kSmiTag
Definition: v8.h:5742

References kSmiShiftSize, kSmiTag, and kSmiTagSize.

Referenced by v8::internal::Internals::IntToSmi(), and v8::ReturnValue< T >::Set().

+ Here is the caller graph for this function:

◆ InvertBranchType()

BranchType v8::internal::InvertBranchType ( BranchType  type)
inline

Definition at line 106 of file macro-assembler-arm64.h.

106  {
107  if (kBranchTypeFirstCondition <= type && type <= kBranchTypeLastCondition) {
108  return static_cast<BranchType>(
109  NegateCondition(static_cast<Condition>(type)));
110  } else {
111  return static_cast<BranchType>(type ^ 1);
112  }
113 }
Condition NegateCondition(Condition cond)
Definition: constants-arm.h:86

References kBranchTypeFirstCondition, kBranchTypeLastCondition, and NegateCondition().

Referenced by v8::internal::LCodeGen::DeoptimizeBranch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Invoke()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::Invoke ( bool  is_construct,
Handle< JSFunction function,
Handle< Object receiver,
int  argc,
Handle< Object args[] 
)
static

Definition at line 37 of file execution.cc.

42  {
43  Isolate* isolate = function->GetIsolate();
44 
45  // Entering JavaScript.
46  VMState<JS> state(isolate);
47  CHECK(AllowJavascriptExecution::IsAllowed(isolate));
48  if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) {
49  isolate->ThrowIllegalOperation();
50  isolate->ReportPendingMessages();
51  return MaybeHandle<Object>();
52  }
53 
54  // Placeholder for return value.
55  Object* value = NULL;
56 
57  typedef Object* (*JSEntryFunction)(byte* entry,
58  Object* function,
59  Object* receiver,
60  int argc,
61  Object*** args);
62 
63  Handle<Code> code = is_construct
64  ? isolate->factory()->js_construct_entry_code()
65  : isolate->factory()->js_entry_code();
66 
67  // Convert calls on global objects to be calls on the global
68  // receiver instead to avoid having a 'this' pointer which refers
69  // directly to a global object.
70  if (receiver->IsGlobalObject()) {
71  receiver = handle(Handle<GlobalObject>::cast(receiver)->global_proxy());
72  }
73 
74  // Make sure that the global object of the context we're about to
75  // make the current one is indeed a global object.
76  DCHECK(function->context()->global_object()->IsGlobalObject());
77 
78  {
79  // Save and restore context around invocation and block the
80  // allocation of handles without explicit handle scopes.
81  SaveContext save(isolate);
82  SealHandleScope shs(isolate);
83  JSEntryFunction stub_entry = FUNCTION_CAST<JSEntryFunction>(code->entry());
84 
85  // Call the function through the right JS entry stub.
86  byte* function_entry = function->code()->entry();
87  JSFunction* func = *function;
88  Object* recv = *receiver;
89  Object*** argv = reinterpret_cast<Object***>(args);
90  value =
91  CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv);
92  }
93 
94 #ifdef VERIFY_HEAP
95  value->ObjectVerify();
96 #endif
97 
98  // Update the pending exception flag and return the value.
99  bool has_exception = value->IsException();
100  DCHECK(has_exception == isolate->has_pending_exception());
101  if (has_exception) {
102  isolate->ReportPendingMessages();
103  // Reset stepping state when script exits with uncaught exception.
104  if (isolate->debug()->is_active()) {
105  isolate->debug()->ClearStepping();
106  }
107  return MaybeHandle<Object>();
108  } else {
109  isolate->clear_pending_message();
110  }
111 
112  return Handle<Object>(value, isolate);
113 }
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4)
Definition: simulator-arm.h:25

References CALL_GENERATED_CODE, CHECK, v8::internal::Isolate::clear_pending_message(), v8::internal::Debug::ClearStepping(), DCHECK, v8::internal::Isolate::debug(), v8::internal::Isolate::factory(), handle(), v8::internal::Isolate::has_pending_exception(), v8::internal::Debug::is_active(), NULL, v8::internal::Isolate::ReportPendingMessages(), and v8::internal::Isolate::ThrowIllegalOperation().

+ Here is the call graph for this function:

◆ InvokeAccessorGetterCallback()

void v8::internal::InvokeAccessorGetterCallback ( v8::Local< v8::Name property,
const v8::PropertyCallbackInfo< v8::Value > &  info,
v8::AccessorNameGetterCallback  getter 
)

Definition at line 7665 of file api.cc.

7668  {
7669  // Leaving JavaScript.
7670  Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7671  Address getter_address = reinterpret_cast<Address>(reinterpret_cast<intptr_t>(
7672  getter));
7673  VMState<EXTERNAL> state(isolate);
7674  ExternalCallbackScope call_scope(isolate, getter_address);
7675  getter(property, info);
7676 }
Isolate * GetIsolate() const
Definition: v8.h:6807

References v8::PropertyCallbackInfo< T >::GetIsolate().

+ Here is the call graph for this function:

◆ InvokeFunctionCallback()

void v8::internal::InvokeFunctionCallback ( const v8::FunctionCallbackInfo< v8::Value > &  info,
v8::FunctionCallback  callback 
)

Definition at line 7679 of file api.cc.

7680  {
7681  Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7682  Address callback_address =
7683  reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7684  VMState<EXTERNAL> state(isolate);
7685  ExternalCallbackScope call_scope(isolate, callback_address);
7686  callback(info);
7687 }
Isolate * GetIsolate() const
Definition: v8.h:6342

References v8::FunctionCallbackInfo< T >::GetIsolate().

+ Here is the call graph for this function:

◆ IrregexpRegExpTooBig()

static RegExpEngine::CompilationResult v8::internal::IrregexpRegExpTooBig ( Isolate isolate)
static

Definition at line 1066 of file jsregexp.cc.

1066  {
1067  return RegExpEngine::CompilationResult(isolate, "RegExp too big");
1068 }

Referenced by v8::internal::RegExpCompiler::Assemble(), and v8::internal::RegExpEngine::Compile().

+ Here is the caller graph for this function:

◆ Is()

template<class C >
bool v8::internal::Is ( Object obj)
inline

◆ Is< JSArray >()

template<>
bool v8::internal::Is< JSArray > ( Object obj)
inline

Definition at line 825 of file objects-inl.h.

825  {
826  return obj->IsJSArray();
827 }

◆ Is< JSFunction >()

template<>
bool v8::internal::Is< JSFunction > ( Object obj)
inline

Definition at line 780 of file objects-inl.h.

780  {
781  return obj->IsJSFunction();
782 }

◆ is_intn()

bool v8::internal::is_intn ( int64_t  x,
unsigned  n 
)
inline

Definition at line 898 of file utils.h.

898  {
899  DCHECK((0 < n) && (n < 64));
900  int64_t limit = static_cast<int64_t>(1) << (n - 1);
901  return (-limit <= x) && (x < limit);
902 }

References DCHECK.

◆ is_uintn()

bool v8::internal::is_uintn ( int64_t  x,
unsigned  n 
)
inline

Definition at line 904 of file utils.h.

904  {
905  DCHECK((0 < n) && (n < (sizeof(x) * kBitsPerByte)));
906  return !(x >> n);
907 }
const int kBitsPerByte
Definition: globals.h:162

References DCHECK, and kBitsPerByte.

◆ IsAddressAligned()

bool v8::internal::IsAddressAligned ( Address  addr,
intptr_t  alignment,
int  offset = 0 
)
inline

Definition at line 129 of file utils.h.

131  {
132  intptr_t offs = OffsetFrom(addr + offset);
133  return IsAligned(offs, alignment);
134 }

References IsAligned(), and OffsetFrom().

Referenced by v8::internal::CodeRange::AllocateRawMemory(), v8::internal::CodeRange::FreeBlock::FreeBlock(), v8::internal::CodeRange::FreeRawMemory(), v8::internal::JavaScriptFrame::GetOperandSlot(), v8::internal::Instruction::InstructionAtOffset(), v8::internal::Zone::New(), and v8::internal::NewSpace::SetUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsAligned()

template<typename T , typename U >
bool v8::internal::IsAligned ( T  value,
U  alignment 
)
inline

◆ IsAllocationInlineable()

static bool v8::internal::IsAllocationInlineable ( Handle< JSFunction constructor)
static

Definition at line 9209 of file hydrogen.cc.

9209  {
9210  return constructor->has_initial_map() &&
9211  constructor->initial_map()->instance_type() == JS_OBJECT_TYPE &&
9212  constructor->initial_map()->instance_size() < HAllocate::kMaxInlineSize &&
9213  constructor->initial_map()->InitialPropertiesLength() == 0;
9214 }

References JS_OBJECT_TYPE.

◆ IsArrowFunction()

bool v8::internal::IsArrowFunction ( FunctionKind  kind)
inline

Definition at line 793 of file globals.h.

793  {
795  return kind & FunctionKind::kArrowFunction;
796 }
bool IsValidFunctionKind(FunctionKind kind)
Definition: globals.h:784

References DCHECK, IsValidFunctionKind(), and kArrowFunction.

Referenced by v8::internal::Context::FunctionMapIndex(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::is_arrow(), and v8::internal::FastNewClosureStub::is_arrow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBinaryDigit()

bool v8::internal::isBinaryDigit ( int  x)
inline

Definition at line 37 of file conversions.h.

37  {
38  return x == '0' || x == '1';
39 }

Referenced by InternalStringToDouble().

+ Here is the caller graph for this function:

◆ IsBinaryDigit()

bool v8::internal::IsBinaryDigit ( uc32  c)
inline

Definition at line 57 of file char-predicates-inl.h.

57  {
58  // ECMA-262, 6th, 7.8.3
59  return c == '0' || c == '1';
60 }

Referenced by v8::internal::Scanner::ScanNumber().

+ Here is the caller graph for this function:

◆ IsBreakStub()

static bool v8::internal::IsBreakStub ( Code code)
static

Definition at line 90 of file debug.cc.

90  {
91  CodeStub::Major major_key = CodeStub::GetMajorKey(code);
92  return major_key == CodeStub::CallFunction;
93 }

Referenced by v8::internal::BreakLocationIterator::Next().

+ Here is the caller graph for this function:

◆ IsCarriageReturn()

bool v8::internal::IsCarriageReturn ( uc32  c)
inline

Definition at line 22 of file char-predicates-inl.h.

22  {
23  return c == 0x000D;
24 }

Referenced by v8::internal::Scanner::ScanEscape().

+ Here is the caller graph for this function:

◆ IsClassOfTest()

static bool v8::internal::IsClassOfTest ( CompareOperation *  expr)
static

Definition at line 10478 of file hydrogen.cc.

10478  {
10479  if (expr->op() != Token::EQ_STRICT) return false;
10480  CallRuntime* call = expr->left()->AsCallRuntime();
10481  if (call == NULL) return false;
10482  Literal* literal = expr->right()->AsLiteral();
10483  if (literal == NULL) return false;
10484  if (!literal->value()->IsString()) return false;
10485  if (!call->name()->IsOneByteEqualTo(STATIC_CHAR_VECTOR("_ClassOf"))) {
10486  return false;
10487  }
10488  DCHECK(call->arguments()->length() == 1);
10489  return true;
10490 }

References DCHECK, NULL, and STATIC_CHAR_VECTOR.

◆ IsCodeEquivalent()

static bool v8::internal::IsCodeEquivalent ( Code code,
Code recompiled 
)
static

Definition at line 9855 of file objects.cc.

9855  {
9856  if (code->instruction_size() != recompiled->instruction_size()) return false;
9857  ByteArray* code_relocation = code->relocation_info();
9858  ByteArray* recompiled_relocation = recompiled->relocation_info();
9859  int length = code_relocation->length();
9860  if (length != recompiled_relocation->length()) return false;
9861  int compare = memcmp(code_relocation->GetDataStartAddress(),
9862  recompiled_relocation->GetDataStartAddress(),
9863  length);
9864  return compare == 0;
9865 }

References v8::internal::ByteArray::GetDataStartAddress(), v8::internal::Code::instruction_size(), and v8::internal::FixedArrayBase::length().

Referenced by v8::internal::SharedFunctionInfo::EnableDeoptimizationSupport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsConciseMethod()

bool v8::internal::IsConciseMethod ( FunctionKind  kind)
inline

Definition at line 805 of file globals.h.

805  {
807  return kind & FunctionKind::kConciseMethod;
808 }

References DCHECK, IsValidFunctionKind(), and kConciseMethod.

Referenced by v8::internal::Context::FunctionMapIndex(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::is_concise_method(), v8::internal::FastNewClosureStub::is_concise_method(), v8::internal::Parser::ParseFunctionLiteral(), and v8::internal::PreParser::ParseFunctionLiteral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsControlChar()

static bool v8::internal::IsControlChar ( char  c)
static

Definition at line 54 of file string-stream.cc.

54  {
55  switch (c) {
56  case '0': case '1': case '2': case '3': case '4': case '5':
57  case '6': case '7': case '8': case '9': case '.': case '-':
58  return true;
59  default:
60  return false;
61  }
62 }

◆ IsDecimalDigit()

bool v8::internal::IsDecimalDigit ( uc32  c)
inline

Definition at line 39 of file char-predicates-inl.h.

39  {
40  // ECMA-262, 3rd, 7.8.3 (p 16)
41  return IsInRange(c, '0', '9');
42 }
bool IsInRange(int value, int lower_limit, int higher_limit)

References IsInRange().

Referenced by v8::internal::DateParser::BASE_EMBEDDED< Char >::IsAsciiDigit(), IsHexDigit(), IsRegExpWord(), v8::internal::Scanner::Scan(), v8::internal::Scanner::ScanDecimalDigits(), and v8::internal::Scanner::ScanNumber().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDeclaredVariableMode()

bool v8::internal::IsDeclaredVariableMode ( VariableMode  mode)
inline

Definition at line 705 of file globals.h.

705  {
706  return mode >= VAR && mode <= MODULE;
707 }

References mode(), MODULE, and VAR.

Referenced by v8::internal::Declaration::Declaration(), v8::internal::Parser::Declare(), v8::internal::Scope::DeclareLocal(), and v8::internal::Variable::IsGlobalObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDictionaryElementsKind()

bool v8::internal::IsDictionaryElementsKind ( ElementsKind  kind)
inline

Definition at line 85 of file elements-kind.h.

85  {
86  return kind == DICTIONARY_ELEMENTS;
87 }

References DICTIONARY_ELEMENTS.

Referenced by v8::internal::JSObject::AllocateStorageForMap(), v8::internal::Map::DictionaryElementsInPrototypeChainOnly(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicElementAccess(), and v8::internal::Map::has_dictionary_elements().

+ Here is the caller graph for this function:

◆ isDigit()

bool v8::internal::isDigit ( int  x,
int  radix 
)
inline

Definition at line 30 of file conversions.h.

30  {
31  return (x >= '0' && x <= '9' && x < '0' + radix)
32  || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
33  || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
34 }

Referenced by InternalStringToDouble(), InternalStringToInt(), and InternalStringToIntDouble().

+ Here is the caller graph for this function:

◆ IsDoubleOrFloatElementsKind()

bool v8::internal::IsDoubleOrFloatElementsKind ( ElementsKind  kind)
inline

Definition at line 141 of file elements-kind.h.

141  {
142  return IsFastDoubleElementsKind(kind) ||
145 }
bool IsFixedFloatElementsKind(ElementsKind kind)
bool IsExternalFloatOrDoubleElementsKind(ElementsKind kind)

References IsExternalFloatOrDoubleElementsKind(), IsFastDoubleElementsKind(), and IsFixedFloatElementsKind().

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::RequiredValueRepresentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDynamicVariableMode()

bool v8::internal::IsDynamicVariableMode ( VariableMode  mode)
inline

Definition at line 700 of file globals.h.

700  {
701  return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL;
702 }

References DYNAMIC, DYNAMIC_LOCAL, and mode().

Referenced by v8::internal::Variable::is_dynamic(), and v8::internal::Variable::IsGlobalObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsExternalArrayElementsKind()

◆ IsExternalFloatOrDoubleElementsKind()

bool v8::internal::IsExternalFloatOrDoubleElementsKind ( ElementsKind  kind)
inline

Definition at line 130 of file elements-kind.h.

130  {
131  return kind == EXTERNAL_FLOAT64_ELEMENTS ||
133 }

References EXTERNAL_FLOAT32_ELEMENTS, and EXTERNAL_FLOAT64_ELEMENTS.

Referenced by IsDoubleOrFloatElementsKind().

+ Here is the caller graph for this function:

◆ IsFastDoubleElementsKind()

bool v8::internal::IsFastDoubleElementsKind ( ElementsKind  kind)
inline

◆ IsFastElementsKind()

◆ IsFastHoleyElementsKind()

◆ IsFastLiteral()

static bool v8::internal::IsFastLiteral ( Handle< JSObject boilerplate,
int  max_depth,
int max_properties 
)
static

Definition at line 5475 of file hydrogen.cc.

5477  {
5478  if (boilerplate->map()->is_deprecated() &&
5479  !JSObject::TryMigrateInstance(boilerplate)) {
5480  return false;
5481  }
5482 
5483  DCHECK(max_depth >= 0 && *max_properties >= 0);
5484  if (max_depth == 0) return false;
5485 
5486  Isolate* isolate = boilerplate->GetIsolate();
5487  Handle<FixedArrayBase> elements(boilerplate->elements());
5488  if (elements->length() > 0 &&
5489  elements->map() != isolate->heap()->fixed_cow_array_map()) {
5490  if (boilerplate->HasFastObjectElements()) {
5491  Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements);
5492  int length = elements->length();
5493  for (int i = 0; i < length; i++) {
5494  if ((*max_properties)-- == 0) return false;
5495  Handle<Object> value(fast_elements->get(i), isolate);
5496  if (value->IsJSObject()) {
5497  Handle<JSObject> value_object = Handle<JSObject>::cast(value);
5498  if (!IsFastLiteral(value_object,
5499  max_depth - 1,
5500  max_properties)) {
5501  return false;
5502  }
5503  }
5504  }
5505  } else if (!boilerplate->HasFastDoubleElements()) {
5506  return false;
5507  }
5508  }
5509 
5510  Handle<FixedArray> properties(boilerplate->properties());
5511  if (properties->length() > 0) {
5512  return false;
5513  } else {
5514  Handle<DescriptorArray> descriptors(
5515  boilerplate->map()->instance_descriptors());
5516  int limit = boilerplate->map()->NumberOfOwnDescriptors();
5517  for (int i = 0; i < limit; i++) {
5518  PropertyDetails details = descriptors->GetDetails(i);
5519  if (details.type() != FIELD) continue;
5520  int index = descriptors->GetFieldIndex(i);
5521  if ((*max_properties)-- == 0) return false;
5522  Handle<Object> value(boilerplate->InObjectPropertyAt(index), isolate);
5523  if (value->IsJSObject()) {
5524  Handle<JSObject> value_object = Handle<JSObject>::cast(value);
5525  if (!IsFastLiteral(value_object,
5526  max_depth - 1,
5527  max_properties)) {
5528  return false;
5529  }
5530  }
5531  }
5532  }
5533  return true;
5534 }
static bool IsFastLiteral(Handle< JSObject > boilerplate, int max_depth, int *max_properties)
Definition: hydrogen.cc:5475

References v8::internal::Handle< T >::cast(), DCHECK, FIELD, v8::internal::Isolate::heap(), and v8::internal::JSObject::TryMigrateInstance().

+ Here is the call graph for this function:

◆ IsFastObjectElementsKind()

◆ IsFastPackedElementsKind()

bool v8::internal::IsFastPackedElementsKind ( ElementsKind  kind)
inline

Definition at line 181 of file elements-kind.h.

181  {
182  return kind == FAST_SMI_ELEMENTS ||
183  kind == FAST_DOUBLE_ELEMENTS ||
184  kind == FAST_ELEMENTS;
185 }

References FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, and FAST_SMI_ELEMENTS.

Referenced by v8::internal::HGraphBuilder::BuildAllocateArrayFromLength(), v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::CopyElements(), v8::internal::FastElementsAccessor< FastElementsAccessorSubclass, KindTraits >::DeleteCommon(), v8::internal::Map::FindTransitionedMap(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ IsFastSmiElementsKind()

bool v8::internal::IsFastSmiElementsKind ( ElementsKind  kind)
inline

◆ IsFastSmiOrObjectElementsKind()

◆ IsFastTransitionTarget()

static bool v8::internal::IsFastTransitionTarget ( ElementsKind  elements_kind)
inlinestatic

Definition at line 152 of file elements-kind.cc.

152  {
153  return IsFastElementsKind(elements_kind) ||
154  elements_kind == DICTIONARY_ELEMENTS;
155 }

References DICTIONARY_ELEMENTS, and IsFastElementsKind().

Referenced by IsMoreGeneralElementsKindTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsFixedFloatElementsKind()

bool v8::internal::IsFixedFloatElementsKind ( ElementsKind  kind)
inline

Definition at line 136 of file elements-kind.h.

136  {
137  return kind == FLOAT32_ELEMENTS || kind == FLOAT64_ELEMENTS;
138 }

References FLOAT32_ELEMENTS, and FLOAT64_ELEMENTS.

Referenced by IsDoubleOrFloatElementsKind().

+ Here is the caller graph for this function:

◆ IsFixedTypedArrayElementsKind()

◆ IsGeneratorFunction()

bool v8::internal::IsGeneratorFunction ( FunctionKind  kind)
inline

Definition at line 799 of file globals.h.

799  {
801  return kind & FunctionKind::kGeneratorFunction;
802 }

References DCHECK, IsValidFunctionKind(), and kGeneratorFunction.

Referenced by v8::internal::Context::FunctionMapIndex(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::is_generator(), v8::internal::FastNewClosureStub::is_generator(), v8::internal::Parser::ParseFunctionLiteral(), and v8::internal::PreParser::ParseFunctionLiteral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGrowStoreMode()

static bool v8::internal::IsGrowStoreMode ( KeyedAccessStoreMode  store_mode)
inlinestatic

Definition at line 228 of file objects.h.

228  {
229  return store_mode >= STORE_AND_GROW_NO_TRANSITION &&
231 }

References STORE_AND_GROW_NO_TRANSITION, and STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT.

Referenced by v8::internal::HGraphBuilder::BuildUncheckedMonomorphicElementAccess(), and GetTransitionMarkModifier().

+ Here is the caller graph for this function:

◆ IsHexDigit()

bool v8::internal::IsHexDigit ( uc32  c)
inline

Definition at line 45 of file char-predicates-inl.h.

45  {
46  // ECMA-262, 3rd, 7.6 (p 15)
47  return IsDecimalDigit(c) || IsInRange(AsciiAlphaToLower(c), 'a', 'f');
48 }
bool IsDecimalDigit(uc32 c)
int AsciiAlphaToLower(uc32 c)

References AsciiAlphaToLower(), IsDecimalDigit(), and IsInRange().

Referenced by v8::internal::Scanner::ScanLiteralUnicodeEscape(), and v8::internal::Scanner::ScanNumber().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsHoleyElementsKind()

bool v8::internal::IsHoleyElementsKind ( ElementsKind  kind)
inline

Definition at line 175 of file elements-kind.h.

175  {
176  return IsFastHoleyElementsKind(kind) ||
177  kind == DICTIONARY_ELEMENTS;
178 }

References DICTIONARY_ELEMENTS, and IsFastHoleyElementsKind().

Referenced by v8::internal::HGraphBuilder::BuildCheckForCapacityGrow(), v8::internal::HGraphBuilder::BuildCopyElements(), v8::internal::HOptimizedGraphBuilder::BuildInlinedCallArray(), BUILTIN(), v8::internal::AllocationSite::DigestTransitionFeedback(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HLoadKeyed(), v8::internal::JSObject::SetFastDoubleElementsCapacityAndLength(), v8::internal::JSObject::SetFastElement(), v8::internal::JSObject::SetFastElementsCapacityAndLength(), and v8::internal::HOptimizedGraphBuilder::TryBuildConsolidatedElementLoad().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsIdentityOperation()

static bool v8::internal::IsIdentityOperation ( HValue arg1,
HValue arg2,
int32_t  identity 
)
static

Definition at line 1439 of file hydrogen-instructions.cc.

1439  {
1440  return arg1->representation().IsSpecialization() &&
1441  arg2->EqualsInteger32Constant(identity);
1442 }

References v8::internal::HValue::EqualsInteger32Constant(), v8::internal::Representation::IsSpecialization(), and v8::internal::HValue::representation().

+ Here is the call graph for this function:

◆ IsImmutableVariableMode()

bool v8::internal::IsImmutableVariableMode ( VariableMode  mode)
inline

Definition at line 715 of file globals.h.

715  {
716  return (mode >= CONST && mode <= MODULE) || mode == CONST_LEGACY;
717 }

References CONST, CONST_LEGACY, mode(), and MODULE.

Referenced by v8::internal::Variable::is_const_mode(), v8::internal::Parser::ParseExportDeclaration(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInlined()

static bool v8::internal::IsInlined ( JSFunction function,
SharedFunctionInfo candidate 
)
static

Definition at line 1125 of file liveedit.cc.

1125  {
1126  DisallowHeapAllocation no_gc;
1127 
1128  if (function->code()->kind() != Code::OPTIMIZED_FUNCTION) return false;
1129 
1130  DeoptimizationInputData* data =
1131  DeoptimizationInputData::cast(function->code()->deoptimization_data());
1132 
1133  if (data == function->GetIsolate()->heap()->empty_fixed_array()) {
1134  return false;
1135  }
1136 
1137  FixedArray* literals = data->LiteralArray();
1138 
1139  int inlined_count = data->InlinedFunctionCount()->value();
1140  for (int i = 0; i < inlined_count; ++i) {
1141  JSFunction* inlined = JSFunction::cast(literals->get(i));
1142  if (inlined->shared() == candidate) return true;
1143  }
1144 
1145  return false;
1146 }

References v8::internal::HeapObject::GetIsolate(), v8::internal::Isolate::heap(), and literals().

Referenced by CheckActivation(), and v8::internal::DependentFunctionMarker::VisitFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInRange()

bool v8::internal::IsInRange ( int  value,
int  lower_limit,
int  higher_limit 
)
inline

Definition at line 32 of file char-predicates-inl.h.

32  {
33  DCHECK(lower_limit <= higher_limit);
34  return static_cast<unsigned int>(value - lower_limit) <=
35  static_cast<unsigned int>(higher_limit - lower_limit);
36 }

References DCHECK.

Referenced by IsDecimalDigit(), IsHexDigit(), IsOctalDigit(), and IsRegExpWord().

+ Here is the caller graph for this function:

◆ IsInt32Double()

static bool v8::internal::IsInt32Double ( double  value)
inlinestatic

Definition at line 169 of file conversions.h.

169  {
170  return !IsMinusZero(value) &&
171  value >= kMinInt &&
172  value <= kMaxInt &&
173  value == FastI2D(FastD2I(value));
174 }
static bool IsMinusZero(double value)
Definition: conversions.h:154

References FastD2I(), FastI2D(), IsMinusZero(), kMaxInt, and kMinInt.

Referenced by v8::Value::IsInt32(), v8::internal::TypeImpl< Config >::BitsetType::Lub(), and v8::internal::compiler::RepresentationChanger::MakeInt32Constant().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInteger32()

static bool v8::internal::IsInteger32 ( double  value)
static

Definition at line 2655 of file hydrogen-instructions.cc.

2655  {
2656  double roundtrip_value = static_cast<double>(static_cast<int32_t>(value));
2657  return bit_cast<int64_t>(roundtrip_value) == bit_cast<int64_t>(value);
2658 }

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::NeedsWriteBarrier(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::RequiredInputRepresentation().

+ Here is the caller graph for this function:

◆ IsJSArrayFastElementMovingAllowed()

static bool v8::internal::IsJSArrayFastElementMovingAllowed ( Heap heap,
JSArray receiver 
)
inlinestatic

Definition at line 267 of file builtins.cc.

268  {
269  if (!FLAG_clever_optimizations) return false;
271  Context* native_context = heap->isolate()->context()->native_context();
272  JSObject* array_proto =
273  JSObject::cast(native_context->array_function()->prototype());
274  PrototypeIterator iter(heap->isolate(), receiver);
275  return iter.GetCurrent() == array_proto &&
276  ArrayPrototypeHasNoElements(heap, native_context, array_proto);
277 }

References ArrayPrototypeHasNoElements(), v8::internal::Isolate::context(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::Heap::isolate(), and v8::internal::Context::native_context().

Referenced by BUILTIN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsJSFunctionCode()

static bool v8::internal::IsJSFunctionCode ( Code code)
static

Definition at line 1119 of file liveedit.cc.

1119  {
1120  return code->kind() == Code::FUNCTION;
1121 }

References v8::internal::Code::kind().

Referenced by v8::internal::LiveEdit::PatchFunctionPositions(), and v8::internal::LiveEdit::ReplaceFunctionCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsLexicalVariableMode()

bool v8::internal::IsLexicalVariableMode ( VariableMode  mode)
inline

Definition at line 710 of file globals.h.

710  {
711  return mode >= LET && mode <= MODULE;
712 }

References LET, mode(), and MODULE.

Referenced by v8::internal::Parser::DeclarationScope(), v8::internal::Parser::Declare(), v8::internal::Variable::IsGlobalObjectProperty(), v8::internal::Scope::MustAllocateInContext(), and v8::internal::Parser::ParseVariableDeclarations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsLineFeed()

bool v8::internal::IsLineFeed ( uc32  c)
inline

Definition at line 27 of file char-predicates-inl.h.

27  {
28  return c == 0x000A;
29 }

Referenced by v8::internal::Scanner::ScanEscape().

+ Here is the caller graph for this function:

◆ IsLiteralCompareBool()

static bool v8::internal::IsLiteralCompareBool ( Isolate isolate,
HValue left,
Token::Value  op,
HValue right 
)
static

Definition at line 10651 of file hydrogen.cc.

10654  {
10655  return op == Token::EQ_STRICT &&
10656  ((left->IsConstant() &&
10657  HConstant::cast(left)->handle(isolate)->IsBoolean()) ||
10658  (right->IsConstant() &&
10659  HConstant::cast(right)->handle(isolate)->IsBoolean()));
10660 }

References v8::internal::HGraphBuilder::isolate().

+ Here is the call graph for this function:

◆ IsLittleEndianByteOrderMark()

static bool v8::internal::IsLittleEndianByteOrderMark ( uc32  c)
inlinestatic

Definition at line 240 of file scanner.cc.

240  {
241  // The Unicode value U+FFFE is guaranteed never to be assigned as a
242  // Unicode character; this implies that in a Unicode context the
243  // 0xFF, 0xFE byte pattern can only be interpreted as the U+FEFF
244  // character expressed in little-endian byte order (since it could
245  // not be a U+FFFE character expressed in big-endian byte
246  // order). Nevertheless, we check for it to be compatible with
247  // Spidermonkey.
248  return c == 0xFFFE;
249 }

Referenced by v8::internal::Scanner::SkipWhiteSpace().

+ Here is the caller graph for this function:

◆ IsMinusZero()

static bool v8::internal::IsMinusZero ( double  value)
inlinestatic

Definition at line 154 of file conversions.h.

154  {
155  static const DoubleRepresentation minus_zero(-0.0);
156  return DoubleRepresentation(value) == minus_zero;
157 }

Referenced by IsInt32Double(), v8::internal::TypeImpl< Config >::IsInteger(), IsSmiDouble(), v8::Value::IsUint32(), IsUint32Double(), v8::internal::TypeImpl< Config >::BitsetType::Lub(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ IsMoreGeneralElementsKindTransition()

bool v8::internal::IsMoreGeneralElementsKindTransition ( ElementsKind  from_kind,
ElementsKind  to_kind 
)

Definition at line 157 of file elements-kind.cc.

158  {
159  if (IsTypedArrayElementsKind(from_kind) ||
160  IsTypedArrayElementsKind(to_kind)) {
161  switch (from_kind) {
162 #define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
163  case TYPE##_ELEMENTS: \
164  return to_kind == EXTERNAL_##TYPE##_ELEMENTS;
165 
167 #undef FIXED_TYPED_ARRAY_CASE
168  default:
169  return false;
170  }
171  }
172  if (IsFastElementsKind(from_kind) && IsFastTransitionTarget(to_kind)) {
173  switch (from_kind) {
174  case FAST_SMI_ELEMENTS:
175  return to_kind != FAST_SMI_ELEMENTS;
177  return to_kind != FAST_SMI_ELEMENTS &&
178  to_kind != FAST_HOLEY_SMI_ELEMENTS;
180  return to_kind != FAST_SMI_ELEMENTS &&
181  to_kind != FAST_HOLEY_SMI_ELEMENTS &&
182  to_kind != FAST_DOUBLE_ELEMENTS;
184  return to_kind == FAST_ELEMENTS ||
185  to_kind == FAST_HOLEY_ELEMENTS;
186  case FAST_ELEMENTS:
187  return to_kind == FAST_HOLEY_ELEMENTS;
188  case FAST_HOLEY_ELEMENTS:
189  return false;
190  default:
191  return false;
192  }
193  }
194  return false;
195 }
static bool IsTypedArrayElementsKind(ElementsKind elements_kind)
static bool IsFastTransitionTarget(ElementsKind elements_kind)

References FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, FIXED_TYPED_ARRAY_CASE, IsFastElementsKind(), IsFastTransitionTarget(), IsTypedArrayElementsKind(), and TYPED_ARRAYS.

Referenced by v8::internal::JSObject::AllocateStorageForMap(), BUILTIN(), v8::internal::Map::CopyAsElementsKind(), v8::internal::AllocationSite::DigestTransitionFeedback(), v8::internal::AllocationSite::GetMode(), v8::internal::IC::IsTransitionOfMonomorphicTarget(), v8::internal::Map::IsValidElementsTransition(), v8::internal::KeyedLoadIC::LoadElementStub(), RUNTIME_FUNCTION(), v8::internal::HOptimizedGraphBuilder::TryBuildConsolidatedElementLoad(), and v8::internal::IC::TryRemoveInvalidPrototypeDependentStub().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsNonDeoptingIntToSmiChange()

static bool v8::internal::IsNonDeoptingIntToSmiChange ( HChange *  change)
static

Definition at line 54 of file hydrogen-representation-changes.cc.

54  {
55  Representation from_rep = change->from();
56  Representation to_rep = change->to();
57  // Flags indicating Uint32 operations are set in a later Hydrogen phase.
58  DCHECK(!change->CheckFlag(HValue::kUint32));
59  return from_rep.IsInteger32() && to_rep.IsSmi() && SmiValuesAre32Bits();
60 }
static bool SmiValuesAre32Bits()
Definition: v8.h:5808

References DCHECK, v8::internal::Representation::IsInteger32(), v8::internal::Representation::IsSmi(), v8::internal::HValue::kUint32, and SmiValuesAre32Bits().

Referenced by v8::internal::HRepresentationChangesPhase::InsertRepresentationChangesForValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsOctalDigit()

bool v8::internal::IsOctalDigit ( uc32  c)
inline

Definition at line 51 of file char-predicates-inl.h.

51  {
52  // ECMA-262, 6th, 7.8.3
53  return IsInRange(c, '0', '7');
54 }

References IsInRange().

Referenced by v8::internal::Scanner::ScanNumber().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsOK()

static bool v8::internal::IsOK ( uint16_t  c)
static

Definition at line 170 of file ostreams.cc.

170 { return (IsPrint(c) || IsSpace(c)) && c != '\\'; }
static bool IsSpace(uint16_t c)
Definition: ostreams.cc:169
static bool IsPrint(uint16_t c)
Definition: ostreams.cc:168

References IsPrint(), and IsSpace().

Referenced by operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsOnInvalidatedCodeObject()

static bool v8::internal::IsOnInvalidatedCodeObject ( Address  addr)
static

Definition at line 3432 of file mark-compact.cc.

3432  {
3433  // We did not record any slots in large objects thus
3434  // we can safely go to the page from the slot address.
3435  Page* p = Page::FromAddress(addr);
3436 
3437  // First check owner's identity because old pointer and old data spaces
3438  // are swept lazily and might still have non-zero mark-bits on some
3439  // pages.
3440  if (p->owner()->identity() != CODE_SPACE) return false;
3441 
3442  // In code space only bits on evacuation candidates (but we don't record
3443  // any slots on them) and under invalidated code objects are non-zero.
3444  MarkBit mark_bit =
3445  p->markbits()->MarkBitFromIndex(Page::FastAddressToMarkbitIndex(addr));
3446 
3447  return mark_bit.Get();
3448 }

References CODE_SPACE, v8::internal::MemoryChunk::FastAddressToMarkbitIndex(), v8::internal::MemoryChunk::FromAddress(), v8::internal::MarkBit::Get(), v8::internal::Space::identity(), v8::internal::Bitmap::MarkBitFromIndex(), v8::internal::MemoryChunk::markbits(), and v8::internal::MemoryChunk::owner().

Referenced by v8::internal::SlotsBuffer::UpdateSlotsWithFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsOutOfBoundsAccess()

bool v8::internal::IsOutOfBoundsAccess ( Handle< JSObject receiver,
int  index 
)

Definition at line 1698 of file ic.cc.

1698  {
1699  if (receiver->IsJSArray()) {
1700  return JSArray::cast(*receiver)->length()->IsSmi() &&
1701  index >= Smi::cast(JSArray::cast(*receiver)->length())->value();
1702  }
1703  return index >= receiver->elements()->length();
1704 }

Referenced by v8::internal::KeyedStoreIC::GetStoreMode().

+ Here is the caller graph for this function:

◆ IsPositionAlignmentCodeCorrect()

static bool v8::internal::IsPositionAlignmentCodeCorrect ( int  alignment)
static

Definition at line 7240 of file runtime.cc.

7240  {
7241  return alignment == STATEMENT_ALIGNED || alignment == BREAK_POSITION_ALIGNED;
7242 }

References BREAK_POSITION_ALIGNED, and STATEMENT_ALIGNED.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ IsPrint()

static bool v8::internal::IsPrint ( uint16_t  c)
static

Definition at line 168 of file ostreams.cc.

168 { return 0x20 <= c && c <= 0x7e; }

Referenced by IsOK(), and operator<<().

+ Here is the caller graph for this function:

◆ IsQuietNaN()

template<typename T >
bool v8::internal::IsQuietNaN ( T  num)
inline

Definition at line 84 of file utils-arm64.h.

84  {
85  return std::isnan(num) && !IsSignallingNaN(num);
86 }
bool IsSignallingNaN(float num)
Definition: utils-arm64.h:74

References IsSignallingNaN().

+ Here is the call graph for this function:

◆ IsRegExpNewline() [1/2]

bool v8::internal::IsRegExpNewline ( uc16  c)
inline

Definition at line 70 of file char-predicates-inl.h.

70  {
71  switch (c) {
72  // CR LF LS PS
73  case 0x000A: case 0x000D: case 0x2028: case 0x2029:
74  return false;
75  default:
76  return true;
77  }
78 }

◆ IsRegExpNewline() [2/2]

bool v8::internal::IsRegExpNewline ( uc32  c)
inline

◆ IsRegExpWord() [1/2]

bool v8::internal::IsRegExpWord ( uc16  c)
inline

Definition at line 63 of file char-predicates-inl.h.

63  {
64  return IsInRange(AsciiAlphaToLower(c), 'a', 'z')
65  || IsDecimalDigit(c)
66  || (c == '_');
67 }

References AsciiAlphaToLower(), IsDecimalDigit(), and IsInRange().

+ Here is the call graph for this function:

◆ IsRegExpWord() [2/2]

bool v8::internal::IsRegExpWord ( uc32  c)
inline

◆ IsShortcutCandidate()

static bool v8::internal::IsShortcutCandidate ( int  type)
inlinestatic

Definition at line 605 of file objects.h.

605  {
606  return ((type & kShortcutTypeMask) == kShortcutTypeTag);
607 }
const uint32_t kShortcutTypeMask
Definition: objects.h:599
const uint32_t kShortcutTypeTag
Definition: objects.h:603

References kShortcutTypeMask, and kShortcutTypeTag.

Referenced by v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::EvacuateShortcutCandidate(), v8::internal::StaticVisitorBase::GetVisitorId(), and ShortCircuitConsString().

+ Here is the caller graph for this function:

◆ IsSignallingNaN() [1/2]

bool v8::internal::IsSignallingNaN ( double  num)
inline

Definition at line 65 of file utils-arm64.h.

65  {
66  uint64_t raw = double_to_rawbits(num);
67  if (std::isnan(num) && ((raw & kDQuietNanMask) == 0)) {
68  return true;
69  }
70  return false;
71 }
static uint64_t double_to_rawbits(double value)
Definition: utils-arm64.h:34
const int64_t kDQuietNanMask

References double_to_rawbits(), and kDQuietNanMask.

Referenced by IsQuietNaN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsSignallingNaN() [2/2]

bool v8::internal::IsSignallingNaN ( float  num)
inline

Definition at line 74 of file utils-arm64.h.

74  {
75  uint32_t raw = float_to_rawbits(num);
76  if (std::isnan(num) && ((raw & kSQuietNanMask) == 0)) {
77  return true;
78  }
79  return false;
80 }
static uint32_t float_to_rawbits(float value)
Definition: utils-arm64.h:27
const int64_t kSQuietNanMask

References float_to_rawbits(), and kSQuietNanMask.

+ Here is the call graph for this function:

◆ IsSimpleMapChangeTransition()

bool v8::internal::IsSimpleMapChangeTransition ( ElementsKind  from_kind,
ElementsKind  to_kind 
)
inline

Definition at line 224 of file elements-kind.h.

225  {
226  return (GetHoleyElementsKind(from_kind) == to_kind) ||
227  (IsFastSmiElementsKind(from_kind) &&
228  IsFastObjectElementsKind(to_kind));
229 }

References GetHoleyElementsKind(), IsFastObjectElementsKind(), and IsFastSmiElementsKind().

Referenced by v8::internal::HGraphBuilder::BuildTransitionElementsKind(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HTransitionElementsKind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsSloppyArgumentsElements()

bool v8::internal::IsSloppyArgumentsElements ( ElementsKind  kind)
inline

Definition at line 90 of file elements-kind.h.

90  {
91  return kind == SLOPPY_ARGUMENTS_ELEMENTS;
92 }

References SLOPPY_ARGUMENTS_ELEMENTS.

Referenced by v8::internal::ElementHandlerCompiler::CompileElementHandlers().

+ Here is the caller graph for this function:

◆ IsSmiDouble()

static bool v8::internal::IsSmiDouble ( double  value)
inlinestatic

Definition at line 160 of file conversions.h.

160  {
161  return !IsMinusZero(value) && value >= Smi::kMinValue &&
162  value <= Smi::kMaxValue && value == FastI2D(FastD2I(value));
163 }

References FastD2I(), FastI2D(), IsMinusZero(), v8::internal::Smi::kMaxValue, and v8::internal::Smi::kMinValue.

+ Here is the call graph for this function:

◆ IsSourceBreakStub()

static bool v8::internal::IsSourceBreakStub ( Code code)
static

Definition at line 82 of file debug.cc.

82  {
83  CodeStub::Major major_key = CodeStub::GetMajorKey(code);
84  return major_key == CodeStub::CallFunction;
85 }

Referenced by v8::internal::BreakLocationIterator::Next().

+ Here is the caller graph for this function:

◆ IsSpace()

static bool v8::internal::IsSpace ( uint16_t  c)
static

Definition at line 169 of file ostreams.cc.

169 { return (0x9 <= c && c <= 0xd) || c == 0x20; }

Referenced by IsOK().

+ Here is the caller graph for this function:

◆ IsSuitableForOnStackReplacement()

static bool v8::internal::IsSuitableForOnStackReplacement ( Isolate isolate,
Handle< JSFunction function,
Handle< Code current_code 
)
static

Definition at line 178 of file runtime-compiler.cc.

180  {
181  // Keep track of whether we've succeeded in optimizing.
182  if (!isolate->use_crankshaft() || !current_code->optimizable()) return false;
183  // If we are trying to do OSR when there are already optimized
184  // activations of the function, it means (a) the function is directly or
185  // indirectly recursive and (b) an optimized invocation has been
186  // deoptimized so that we are currently in an unoptimized activation.
187  // Check for optimized activations of this function.
188  for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) {
189  JavaScriptFrame* frame = it.frame();
190  if (frame->is_optimized() && frame->function() == *function) return false;
191  }
192 
193  return true;
194 }

References v8::internal::JavaScriptFrame::function(), and v8::internal::Isolate::use_crankshaft().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTerminalElementsKind()

bool v8::internal::IsTerminalElementsKind ( ElementsKind  kind)
inline

Definition at line 101 of file elements-kind.h.

101  {
102  return kind == TERMINAL_FAST_ELEMENTS_KIND ||
104 }

References IsExternalArrayElementsKind(), and TERMINAL_FAST_ELEMENTS_KIND.

+ Here is the call graph for this function:

◆ IsTransitionableFastElementsKind()

bool v8::internal::IsTransitionableFastElementsKind ( ElementsKind  from_kind)
inline

Definition at line 236 of file elements-kind.h.

236  {
237  return IsFastElementsKind(from_kind) &&
238  from_kind != TERMINAL_FAST_ELEMENTS_KIND;
239 }

References IsFastElementsKind(), and TERMINAL_FAST_ELEMENTS_KIND.

Referenced by v8::internal::Map::FindTransitionedMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTransitionElementsKind()

bool v8::internal::IsTransitionElementsKind ( ElementsKind  kind)
inline

Definition at line 119 of file elements-kind.h.

119  {
121 }

References IsFastElementsKind(), and IsFixedTypedArrayElementsKind().

+ Here is the call graph for this function:

◆ IsTransitionStoreMode()

static bool v8::internal::IsTransitionStoreMode ( KeyedAccessStoreMode  store_mode)
inlinestatic

Definition at line 209 of file objects.h.

209  {
210  return store_mode > STANDARD_STORE &&
212  store_mode != STORE_AND_GROW_NO_TRANSITION;
213 }

References STANDARD_STORE, STORE_AND_GROW_NO_TRANSITION, and STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT.

Referenced by v8::internal::KeyedStoreIC::StoreElementStub().

+ Here is the caller graph for this function:

◆ IsTypedArrayElementsKind()

static bool v8::internal::IsTypedArrayElementsKind ( ElementsKind  elements_kind)
static

Definition at line 146 of file elements-kind.cc.

146  {
147  return IsFixedTypedArrayElementsKind(elements_kind) ||
148  IsExternalArrayElementsKind(elements_kind);
149 }

References IsExternalArrayElementsKind(), and IsFixedTypedArrayElementsKind().

Referenced by IsMoreGeneralElementsKindTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTypeof()

static bool v8::internal::IsTypeof ( Expression expr)
static

Definition at line 463 of file ast.cc.

463  {
464  UnaryOperation* maybe_unary = expr->AsUnaryOperation();
465  return maybe_unary != NULL && maybe_unary->op() == Token::TYPEOF;
466 }

References NULL.

Referenced by MatchLiteralCompareTypeof().

+ Here is the caller graph for this function:

◆ IsUint32Double()

static bool v8::internal::IsUint32Double ( double  value)
inlinestatic

Definition at line 180 of file conversions.h.

180  {
181  return !IsMinusZero(value) &&
182  value >= 0 &&
183  value <= kMaxUInt32 &&
184  value == FastUI2D(FastD2UI(value));
185 }
double FastUI2D(unsigned x)
Definition: conversions.h:72

References FastD2UI(), FastUI2D(), IsMinusZero(), and kMaxUInt32.

Referenced by v8::internal::TypeImpl< Config >::BitsetType::Lub(), and v8::internal::compiler::RepresentationChanger::MakeInt32Constant().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUint32Operation()

static bool v8::internal::IsUint32Operation ( HValue instr)
static

Definition at line 28 of file hydrogen-uint32-analysis.cc.

28  {
29  return instr->IsShr() ||
30  (instr->IsLoadKeyed() && IsUnsignedLoad(HLoadKeyed::cast(instr))) ||
31  (instr->IsInteger32Constant() && instr->GetInteger32Constant() >= 0);
32 }
static bool IsUnsignedLoad(HLoadKeyed *instr)

References v8::internal::HValue::GetInteger32Constant(), v8::internal::HValue::IsInteger32Constant(), and IsUnsignedLoad().

+ Here is the call graph for this function:

◆ IsUnscavengedHeapObject()

static bool v8::internal::IsUnscavengedHeapObject ( Heap heap,
Object **  p 
)
static

Definition at line 1303 of file heap.cc.

1303  {
1304  return heap->InNewSpace(*p) &&
1305  !HeapObject::cast(*p)->map_word().IsForwardingAddress();
1306 }

References v8::internal::Heap::InNewSpace().

Referenced by v8::internal::Heap::Scavenge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUnsignedLoad()

static bool v8::internal::IsUnsignedLoad ( HLoadKeyed *  instr)
static

Definition at line 11 of file hydrogen-uint32-analysis.cc.

11  {
12  switch (instr->elements_kind()) {
17  case UINT8_ELEMENTS:
18  case UINT16_ELEMENTS:
19  case UINT32_ELEMENTS:
21  return true;
22  default:
23  return false;
24  }
25 }

References EXTERNAL_UINT16_ELEMENTS, EXTERNAL_UINT32_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, UINT16_ELEMENTS, UINT32_ELEMENTS, UINT8_CLAMPED_ELEMENTS, and UINT8_ELEMENTS.

Referenced by IsUint32Operation().

+ Here is the caller graph for this function:

◆ IsUtf8MultiCharacterFollower()

static bool v8::internal::IsUtf8MultiCharacterFollower ( byte  later_byte)
static

Definition at line 241 of file scanner-character-streams.cc.

241  {
242  return (later_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharFollower;
243 }
static const byte kUtf8MultiByteCharFollower
static const byte kUtf8MultiByteMask

References kUtf8MultiByteCharFollower, and kUtf8MultiByteMask.

Referenced by Utf8CharacterBack(), and Utf8CharacterForward().

+ Here is the caller graph for this function:

◆ IsValidAccessor()

static bool v8::internal::IsValidAccessor ( Handle< Object obj)
static

Definition at line 2062 of file runtime.cc.

2062  {
2063  return obj->IsUndefined() || obj->IsSpecFunction() || obj->IsNull();
2064 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ IsValidFunctionKind()

bool v8::internal::IsValidFunctionKind ( FunctionKind  kind)
inline

Definition at line 784 of file globals.h.

784  {
785  return kind == FunctionKind::kNormalFunction ||
790 }

References kArrowFunction, kConciseGeneratorMethod, kConciseMethod, kGeneratorFunction, and kNormalFunction.

Referenced by v8::internal::FastNewClosureStub::FastNewClosureStub(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::FunctionLiteral(), IsArrowFunction(), IsConciseMethod(), IsGeneratorFunction(), and v8::internal::SharedFunctionInfo::set_kind().

+ Here is the caller graph for this function:

◆ IsValidNonBuiltinContext()

static bool v8::internal::IsValidNonBuiltinContext ( Object context)
inlinestatic

Definition at line 697 of file objects-visiting-inl.h.

697  {
698  return context->IsContext() &&
699  !Context::cast(context)->global_object()->IsJSBuiltinsObject();
700 }

References v8::internal::Context::cast(), and v8::internal::Context::global_object().

+ Here is the call graph for this function:

◆ IsVisibleInStackTrace()

static bool v8::internal::IsVisibleInStackTrace ( JSFunction fun,
Object caller,
Object receiver,
bool seen_caller 
)
static

Definition at line 308 of file isolate.cc.

311  {
312  if ((fun == caller) && !(*seen_caller)) {
313  *seen_caller = true;
314  return false;
315  }
316  // Skip all frames until we've seen the caller.
317  if (!(*seen_caller)) return false;
318  // Also, skip non-visible built-in functions and any call with the builtins
319  // object as receiver, so as to not reveal either the builtins object or
320  // an internal function.
321  // The --builtins-in-stack-traces command line flag allows including
322  // internal call sites in the stack trace for debugging purposes.
323  if (!FLAG_builtins_in_stack_traces) {
324  if (receiver->IsJSBuiltinsObject()) return false;
325  if (fun->IsBuiltin()) {
326  return fun->shared()->native();
327  } else if (fun->IsFromNativeScript() || fun->IsFromExtensionScript()) {
328  return false;
329  }
330  }
331  return true;
332 }

References v8::internal::JSFunction::IsBuiltin(), v8::internal::JSFunction::IsFromExtensionScript(), and v8::internal::JSFunction::IsFromNativeScript().

Referenced by v8::internal::Isolate::CaptureSimpleStackTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsVoidOfLiteral()

static bool v8::internal::IsVoidOfLiteral ( Expression expr)
static

Definition at line 491 of file ast.cc.

491  {
492  UnaryOperation* maybe_unary = expr->AsUnaryOperation();
493  return maybe_unary != NULL &&
494  maybe_unary->op() == Token::VOID &&
495  maybe_unary->expression()->IsLiteral();
496 }
#define VOID

References NULL, and VOID.

Referenced by MatchLiteralCompareUndefined().

+ Here is the caller graph for this function:

◆ IterateElements()

static bool v8::internal::IterateElements ( Isolate isolate,
Handle< JSArray receiver,
ArrayConcatVisitor visitor 
)
static

A helper function that visits elements of a JSArray in numerical order.

The visitor argument called for each existing element in the array with the element index and the element's value. Afterwards it increments the base-index of the visitor by the array length. Returns false if any access threw an exception, otherwise true.

Definition at line 4946 of file runtime.cc.

4947  {
4948  uint32_t length = static_cast<uint32_t>(receiver->length()->Number());
4949  switch (receiver->GetElementsKind()) {
4950  case FAST_SMI_ELEMENTS:
4951  case FAST_ELEMENTS:
4953  case FAST_HOLEY_ELEMENTS: {
4954  // Run through the elements FixedArray and use HasElement and GetElement
4955  // to check the prototype for missing elements.
4956  Handle<FixedArray> elements(FixedArray::cast(receiver->elements()));
4957  int fast_length = static_cast<int>(length);
4958  DCHECK(fast_length <= elements->length());
4959  for (int j = 0; j < fast_length; j++) {
4960  HandleScope loop_scope(isolate);
4961  Handle<Object> element_value(elements->get(j), isolate);
4962  if (!element_value->IsTheHole()) {
4963  visitor->visit(j, element_value);
4964  } else {
4965  Maybe<bool> maybe = JSReceiver::HasElement(receiver, j);
4966  if (!maybe.has_value) return false;
4967  if (maybe.value) {
4968  // Call GetElement on receiver, not its prototype, or getters won't
4969  // have the correct receiver.
4971  isolate, element_value,
4972  Object::GetElement(isolate, receiver, j), false);
4973  visitor->visit(j, element_value);
4974  }
4975  }
4976  }
4977  break;
4978  }
4980  case FAST_DOUBLE_ELEMENTS: {
4981  // Empty array is FixedArray but not FixedDoubleArray.
4982  if (length == 0) break;
4983  // Run through the elements FixedArray and use HasElement and GetElement
4984  // to check the prototype for missing elements.
4985  if (receiver->elements()->IsFixedArray()) {
4986  DCHECK(receiver->elements()->length() == 0);
4987  break;
4988  }
4989  Handle<FixedDoubleArray> elements(
4990  FixedDoubleArray::cast(receiver->elements()));
4991  int fast_length = static_cast<int>(length);
4992  DCHECK(fast_length <= elements->length());
4993  for (int j = 0; j < fast_length; j++) {
4994  HandleScope loop_scope(isolate);
4995  if (!elements->is_the_hole(j)) {
4996  double double_value = elements->get_scalar(j);
4997  Handle<Object> element_value =
4998  isolate->factory()->NewNumber(double_value);
4999  visitor->visit(j, element_value);
5000  } else {
5001  Maybe<bool> maybe = JSReceiver::HasElement(receiver, j);
5002  if (!maybe.has_value) return false;
5003  if (maybe.value) {
5004  // Call GetElement on receiver, not its prototype, or getters won't
5005  // have the correct receiver.
5006  Handle<Object> element_value;
5008  isolate, element_value,
5009  Object::GetElement(isolate, receiver, j), false);
5010  visitor->visit(j, element_value);
5011  }
5012  }
5013  }
5014  break;
5015  }
5016  case DICTIONARY_ELEMENTS: {
5017  Handle<SeededNumberDictionary> dict(receiver->element_dictionary());
5018  List<uint32_t> indices(dict->Capacity() / 2);
5019  // Collect all indices in the object and the prototypes less
5020  // than length. This might introduce duplicates in the indices list.
5021  CollectElementIndices(receiver, length, &indices);
5022  indices.Sort(&compareUInt32);
5023  int j = 0;
5024  int n = indices.length();
5025  while (j < n) {
5026  HandleScope loop_scope(isolate);
5027  uint32_t index = indices[j];
5028  Handle<Object> element;
5030  isolate, element, Object::GetElement(isolate, receiver, index),
5031  false);
5032  visitor->visit(index, element);
5033  // Skip to next different index (i.e., omit duplicates).
5034  do {
5035  j++;
5036  } while (j < n && indices[j] == index);
5037  }
5038  break;
5039  }
5041  Handle<ExternalUint8ClampedArray> pixels(
5042  ExternalUint8ClampedArray::cast(receiver->elements()));
5043  for (uint32_t j = 0; j < length; j++) {
5044  Handle<Smi> e(Smi::FromInt(pixels->get_scalar(j)), isolate);
5045  visitor->visit(j, e);
5046  }
5047  break;
5048  }
5049  case EXTERNAL_INT8_ELEMENTS: {
5050  IterateExternalArrayElements<ExternalInt8Array, int8_t>(
5051  isolate, receiver, true, true, visitor);
5052  break;
5053  }
5054  case EXTERNAL_UINT8_ELEMENTS: {
5055  IterateExternalArrayElements<ExternalUint8Array, uint8_t>(
5056  isolate, receiver, true, true, visitor);
5057  break;
5058  }
5059  case EXTERNAL_INT16_ELEMENTS: {
5060  IterateExternalArrayElements<ExternalInt16Array, int16_t>(
5061  isolate, receiver, true, true, visitor);
5062  break;
5063  }
5064  case EXTERNAL_UINT16_ELEMENTS: {
5065  IterateExternalArrayElements<ExternalUint16Array, uint16_t>(
5066  isolate, receiver, true, true, visitor);
5067  break;
5068  }
5069  case EXTERNAL_INT32_ELEMENTS: {
5070  IterateExternalArrayElements<ExternalInt32Array, int32_t>(
5071  isolate, receiver, true, false, visitor);
5072  break;
5073  }
5074  case EXTERNAL_UINT32_ELEMENTS: {
5075  IterateExternalArrayElements<ExternalUint32Array, uint32_t>(
5076  isolate, receiver, true, false, visitor);
5077  break;
5078  }
5080  IterateExternalArrayElements<ExternalFloat32Array, float>(
5081  isolate, receiver, false, false, visitor);
5082  break;
5083  }
5085  IterateExternalArrayElements<ExternalFloat64Array, double>(
5086  isolate, receiver, false, false, visitor);
5087  break;
5088  }
5089  default:
5090  UNREACHABLE();
5091  break;
5092  }
5093  visitor->increase_index_offset(length);
5094  return true;
5095 }
static int compareUInt32(const uint32_t *ap, const uint32_t *bp)
Definition: runtime.cc:4829

References ASSIGN_RETURN_ON_EXCEPTION_VALUE, CollectElementIndices(), compareUInt32(), DCHECK, DICTIONARY_ELEMENTS, EXTERNAL_FLOAT32_ELEMENTS, EXTERNAL_FLOAT64_ELEMENTS, EXTERNAL_INT16_ELEMENTS, EXTERNAL_INT32_ELEMENTS, EXTERNAL_INT8_ELEMENTS, EXTERNAL_UINT16_ELEMENTS, EXTERNAL_UINT32_ELEMENTS, EXTERNAL_UINT8_CLAMPED_ELEMENTS, EXTERNAL_UINT8_ELEMENTS, v8::internal::Isolate::factory(), FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::Object::GetElement(), v8::internal::JSReceiver::HasElement(), v8::internal::ArrayConcatVisitor::increase_index_offset(), v8::maybe(), v8::internal::List< T, AllocationPolicy >::Sort(), UNREACHABLE, and v8::internal::ArrayConcatVisitor::visit().

Referenced by v8::internal::CompilationSubCache::IterateFunctions(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IterateExternalArrayElements()

template<class ExternalArrayClass , class ElementType >
static void v8::internal::IterateExternalArrayElements ( Isolate isolate,
Handle< JSObject receiver,
bool  elements_are_ints,
bool  elements_are_guaranteed_smis,
ArrayConcatVisitor visitor 
)
static

Definition at line 4786 of file runtime.cc.

4790  {
4791  Handle<ExternalArrayClass> array(
4792  ExternalArrayClass::cast(receiver->elements()));
4793  uint32_t len = static_cast<uint32_t>(array->length());
4794 
4795  DCHECK(visitor != NULL);
4796  if (elements_are_ints) {
4797  if (elements_are_guaranteed_smis) {
4798  for (uint32_t j = 0; j < len; j++) {
4799  HandleScope loop_scope(isolate);
4800  Handle<Smi> e(Smi::FromInt(static_cast<int>(array->get_scalar(j))),
4801  isolate);
4802  visitor->visit(j, e);
4803  }
4804  } else {
4805  for (uint32_t j = 0; j < len; j++) {
4806  HandleScope loop_scope(isolate);
4807  int64_t val = static_cast<int64_t>(array->get_scalar(j));
4808  if (Smi::IsValid(static_cast<intptr_t>(val))) {
4809  Handle<Smi> e(Smi::FromInt(static_cast<int>(val)), isolate);
4810  visitor->visit(j, e);
4811  } else {
4812  Handle<Object> e =
4813  isolate->factory()->NewNumber(static_cast<ElementType>(val));
4814  visitor->visit(j, e);
4815  }
4816  }
4817  }
4818  } else {
4819  for (uint32_t j = 0; j < len; j++) {
4820  HandleScope loop_scope(isolate);
4821  Handle<Object> e = isolate->factory()->NewNumber(array->get_scalar(j));
4822  visitor->visit(j, e);
4823  }
4824  }
4825 }

References DCHECK, v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), v8::internal::Smi::IsValid(), NULL, and v8::internal::ArrayConcatVisitor::visit().

+ Here is the call graph for this function:

◆ JoinSparseArrayWithSeparator()

template<typename Char >
static void v8::internal::JoinSparseArrayWithSeparator ( FixedArray elements,
int  elements_length,
uint32_t  array_length,
String separator,
Vector< Char >  buffer 
)
static

Definition at line 601 of file runtime-strings.cc.

605  {
607  int previous_separator_position = 0;
608  int separator_length = separator->length();
609  int cursor = 0;
610  for (int i = 0; i < elements_length; i += 2) {
611  int position = NumberToInt32(elements->get(i));
612  String* string = String::cast(elements->get(i + 1));
613  int string_length = string->length();
614  if (string->length() > 0) {
615  while (previous_separator_position < position) {
616  String::WriteToFlat<Char>(separator, &buffer[cursor], 0,
617  separator_length);
618  cursor += separator_length;
619  previous_separator_position++;
620  }
621  String::WriteToFlat<Char>(string, &buffer[cursor], 0, string_length);
622  cursor += string->length();
623  }
624  }
625  if (separator_length > 0) {
626  // Array length must be representable as a signed 32-bit number,
627  // otherwise the total string length would have been too large.
628  DCHECK(array_length <= 0x7fffffff); // Is int32_t.
629  int last_array_index = static_cast<int>(array_length - 1);
630  while (previous_separator_position < last_array_index) {
631  String::WriteToFlat<Char>(separator, &buffer[cursor], 0,
632  separator_length);
633  cursor += separator_length;
634  previous_separator_position++;
635  }
636  }
637  DCHECK(cursor <= buffer.length());
638 }
int32_t NumberToInt32(Object *number)
Definition: conversions.h:189

References DCHECK, v8::internal::FixedArray::get(), v8::internal::String::length(), v8::internal::Vector< T >::length(), and NumberToInt32().

+ Here is the call graph for this function:

◆ JSCallerSavedCode()

int v8::internal::JSCallerSavedCode ( int  n)

Definition at line 1601 of file frames.cc.

1601  {
1602  DCHECK(0 <= n && n < kNumJSCallerSaved);
1603  return caller_saved_code_data.reg_code[n];
1604 }
JSCallerSavedCodeData caller_saved_code_data
Definition: frames.cc:1589
const int kNumJSCallerSaved
Definition: frames-arm.h:30
int reg_code[kNumJSCallerSaved]
Definition: frames.cc:1586

References caller_saved_code_data, DCHECK, kNumJSCallerSaved, and v8::internal::JSCallerSavedCodeData::reg_code.

◆ JunkStringValue()

double v8::internal::JunkStringValue ( )
inline

Definition at line 27 of file conversions-inl.h.

27  {
28  return bit_cast<double, uint64_t>(kQuietNaNMask);
29 }
const uint64_t kQuietNaNMask
Definition: globals.h:179

References kQuietNaNMask.

Referenced by InternalStringToDouble(), InternalStringToInt(), and InternalStringToIntDouble().

+ Here is the caller graph for this function:

◆ KeywordOrIdentifierToken()

static Token::Value v8::internal::KeywordOrIdentifierToken ( const uint8_t *  input,
int  input_length,
bool  harmony_scoping,
bool  harmony_modules,
bool  harmony_classes 
)
static

Definition at line 975 of file scanner.cc.

979  {
980  DCHECK(input_length >= 1);
981  const int kMinLength = 2;
982  const int kMaxLength = 10;
983  if (input_length < kMinLength || input_length > kMaxLength) {
984  return Token::IDENTIFIER;
985  }
986  switch (input[0]) {
987  default:
988 #define KEYWORD_GROUP_CASE(ch) \
989  break; \
990  case ch:
991 #define KEYWORD(keyword, token) \
992  { \
993  /* 'keyword' is a char array, so sizeof(keyword) is */ \
994  /* strlen(keyword) plus 1 for the NUL char. */ \
995  const int keyword_length = sizeof(keyword) - 1; \
996  STATIC_ASSERT(keyword_length >= kMinLength); \
997  STATIC_ASSERT(keyword_length <= kMaxLength); \
998  if (input_length == keyword_length && \
999  input[1] == keyword[1] && \
1000  (keyword_length <= 2 || input[2] == keyword[2]) && \
1001  (keyword_length <= 3 || input[3] == keyword[3]) && \
1002  (keyword_length <= 4 || input[4] == keyword[4]) && \
1003  (keyword_length <= 5 || input[5] == keyword[5]) && \
1004  (keyword_length <= 6 || input[6] == keyword[6]) && \
1005  (keyword_length <= 7 || input[7] == keyword[7]) && \
1006  (keyword_length <= 8 || input[8] == keyword[8]) && \
1007  (keyword_length <= 9 || input[9] == keyword[9])) { \
1008  return token; \
1009  } \
1010  }
1012  }
1013  return Token::IDENTIFIER;
1014 }
#define KEYWORD_GROUP_CASE(ch)
#define KEYWORD(keyword, token)
#define KEYWORDS(KEYWORD_GROUP, KEYWORD)
Definition: scanner.cc:905

References DCHECK, KEYWORD, KEYWORD_GROUP_CASE, and KEYWORDS.

Referenced by v8::internal::Scanner::IdentifierIsFutureStrictReserved(), and v8::internal::Scanner::ScanIdentifierOrKeyword().

+ Here is the caller graph for this function:

◆ LabelToInt()

static int v8::internal::LabelToInt ( Label *  label)
static

Definition at line 32 of file regexp-macro-assembler-tracer.cc.

32  {
33  return static_cast<int>(reinterpret_cast<intptr_t>(label));
34 }

Referenced by v8::internal::RegExpMacroAssemblerTracer::Bind(), v8::internal::RegExpMacroAssemblerTracer::CheckAtStart(), v8::internal::RegExpMacroAssemblerTracer::CheckBitInTable(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacter(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterGT(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterInRange(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterLT(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterNotInRange(), v8::internal::RegExpMacroAssemblerTracer::CheckGreedyLoop(), v8::internal::RegExpMacroAssemblerTracer::CheckNotAtStart(), v8::internal::RegExpMacroAssemblerTracer::CheckNotBackReference(), v8::internal::RegExpMacroAssemblerTracer::CheckNotBackReferenceIgnoreCase(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacter(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckSpecialCharacterClass(), v8::internal::RegExpMacroAssemblerTracer::GoTo(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterEqPos(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterGE(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterLT(), v8::internal::RegExpMacroAssemblerTracer::LoadCurrentCharacter(), and v8::internal::RegExpMacroAssemblerTracer::PushBacktrack().

+ Here is the caller graph for this function:

◆ LabelType() [1/4]

static const char* v8::internal::LabelType ( LLabel *  label)
static

Definition at line 1064 of file lithium-codegen-arm.cc.

1064  {
1065  if (label->is_loop_header()) return " (loop header)";
1066  if (label->is_osr_entry()) return " (OSR entry)";
1067  return "";
1068 }

◆ LabelType() [2/4]

static const char* v8::internal::LabelType ( LLabel *  label)
static

Definition at line 3299 of file lithium-codegen-arm64.cc.

3299  {
3300  if (label->is_loop_header()) return " (loop header)";
3301  if (label->is_osr_entry()) return " (OSR entry)";
3302  return "";
3303 }

◆ LabelType() [3/4]

static const char* v8::internal::LabelType ( LLabel *  label)
static

Definition at line 1024 of file lithium-codegen-mips.cc.

1024  {
1025  if (label->is_loop_header()) return " (loop header)";
1026  if (label->is_osr_entry()) return " (OSR entry)";
1027  return "";
1028 }

◆ LabelType() [4/4]

static const char* v8::internal::LabelType ( LLabel *  label)
static

Definition at line 974 of file lithium-codegen-mips64.cc.

974  {
975  if (label->is_loop_header()) return " (loop header)";
976  if (label->is_osr_entry()) return " (OSR entry)";
977  return "";
978 }

◆ LargestPowerOf2Divisor()

uint64_t v8::internal::LargestPowerOf2Divisor ( uint64_t  value)

◆ lazily_initialize_fast_exp()

void v8::internal::lazily_initialize_fast_exp ( )

Definition at line 71 of file codegen.cc.

71  {
72  if (fast_exp_function == NULL) {
73  init_fast_exp_function();
74  }
75 }

References NULL.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ LinearSearch()

template<SearchMode search_mode, typename T >
int v8::internal::LinearSearch ( T array,
Name name,
int  len,
int  valid_entries 
)
inline

Definition at line 2799 of file objects-inl.h.

2799  {
2800  uint32_t hash = name->Hash();
2801  if (search_mode == ALL_ENTRIES) {
2802  for (int number = 0; number < len; number++) {
2803  int sorted_index = array->GetSortedKeyIndex(number);
2804  Name* entry = array->GetKey(sorted_index);
2805  uint32_t current_hash = entry->Hash();
2806  if (current_hash > hash) break;
2807  if (current_hash == hash && entry->Equals(name)) return sorted_index;
2808  }
2809  } else {
2810  DCHECK(len >= valid_entries);
2811  for (int number = 0; number < valid_entries; number++) {
2812  Name* entry = array->GetKey(number);
2813  uint32_t current_hash = entry->Hash();
2814  if (current_hash == hash && entry->Equals(name)) return number;
2815  }
2816  }
2817  return T::kNotFound;
2818 }

References ALL_ENTRIES, DCHECK, v8::internal::Name::Equals(), v8::internal::Name::Hash(), and name.

+ Here is the call graph for this function:

◆ ListCaptureRegisters()

static Interval v8::internal::ListCaptureRegisters ( ZoneList< RegExpTree * > *  children)
static

Definition at line 689 of file ast.cc.

689  {
690  Interval result = Interval::Empty();
691  for (int i = 0; i < children->length(); i++)
692  result = result.Union(children->at(i)->CaptureRegisters());
693  return result;
694 }

References v8::internal::List< T, AllocationPolicy >::at(), v8::internal::Interval::Empty(), and v8::internal::Interval::Union().

+ Here is the call graph for this function:

◆ Load16Aligned()

static int32_t v8::internal::Load16Aligned ( const byte pc)
static

Definition at line 127 of file interpreter-irregexp.cc.

127  {
128  DCHECK((reinterpret_cast<intptr_t>(pc) & 1) == 0);
129  return *reinterpret_cast<const uint16_t *>(pc);
130 }

References DCHECK, and pc.

Referenced by RawMatch().

+ Here is the caller graph for this function:

◆ Load32Aligned()

static int32_t v8::internal::Load32Aligned ( const byte pc)
static

Definition at line 121 of file interpreter-irregexp.cc.

121  {
122  DCHECK((reinterpret_cast<intptr_t>(pc) & 3) == 0);
123  return *reinterpret_cast<const int32_t *>(pc);
124 }

References DCHECK, and pc.

Referenced by RawMatch().

+ Here is the caller graph for this function:

◆ LoadLookupSlotHelper()

static ObjectPair v8::internal::LoadLookupSlotHelper ( Arguments  args,
Isolate isolate,
bool  throw_error 
)
static

Definition at line 4133 of file runtime.cc.

4134  {
4135  HandleScope scope(isolate);
4136  DCHECK_EQ(2, args.length());
4137 
4138  if (!args[0]->IsContext() || !args[1]->IsString()) {
4139  return MakePair(isolate->ThrowIllegalOperation(), NULL);
4140  }
4141  Handle<Context> context = args.at<Context>(0);
4142  Handle<String> name = args.at<String>(1);
4143 
4144  int index;
4145  PropertyAttributes attributes;
4147  BindingFlags binding_flags;
4148  Handle<Object> holder =
4149  context->Lookup(name, flags, &index, &attributes, &binding_flags);
4150  if (isolate->has_pending_exception()) {
4151  return MakePair(isolate->heap()->exception(), NULL);
4152  }
4153 
4154  // If the index is non-negative, the slot has been found in a context.
4155  if (index >= 0) {
4156  DCHECK(holder->IsContext());
4157  // If the "property" we were looking for is a local variable, the
4158  // receiver is the global object; see ECMA-262, 3rd., 10.1.6 and 10.2.3.
4159  Handle<Object> receiver = isolate->factory()->undefined_value();
4160  Object* value = Context::cast(*holder)->get(index);
4161  // Check for uninitialized bindings.
4162  switch (binding_flags) {
4165  if (value->IsTheHole()) {
4166  Handle<Object> error;
4167  MaybeHandle<Object> maybe_error =
4168  isolate->factory()->NewReferenceError("not_defined",
4169  HandleVector(&name, 1));
4170  if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
4171  return MakePair(isolate->heap()->exception(), NULL);
4172  }
4173  // FALLTHROUGH
4177  DCHECK(!value->IsTheHole());
4178  return MakePair(value, *receiver);
4180  if (value->IsTheHole()) {
4181  DCHECK((attributes & READ_ONLY) != 0);
4182  value = isolate->heap()->undefined_value();
4183  }
4184  return MakePair(value, *receiver);
4185  case MISSING_BINDING:
4186  UNREACHABLE();
4187  return MakePair(NULL, NULL);
4188  }
4189  }
4190 
4191  // Otherwise, if the slot was found the holder is a context extension
4192  // object, subject of a with, or a global object. We read the named
4193  // property from it.
4194  if (!holder.is_null()) {
4195  Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder);
4196 #ifdef DEBUG
4197  if (!object->IsJSProxy()) {
4198  Maybe<bool> maybe = JSReceiver::HasProperty(object, name);
4199  DCHECK(maybe.has_value);
4200  DCHECK(maybe.value);
4201  }
4202 #endif
4203  // GetProperty below can cause GC.
4204  Handle<Object> receiver_handle(
4205  object->IsGlobalObject()
4206  ? Object::cast(isolate->heap()->undefined_value())
4207  : object->IsJSProxy() ? static_cast<Object*>(*object)
4209  isolate, JSObject::cast(*object)),
4210  isolate);
4211 
4212  // No need to unhole the value here. This is taken care of by the
4213  // GetProperty function.
4214  Handle<Object> value;
4216  isolate, value, Object::GetProperty(object, name),
4217  MakePair(isolate->heap()->exception(), NULL));
4218  return MakePair(*value, *receiver_handle);
4219  }
4220 
4221  if (throw_error) {
4222  // The property doesn't exist - throw exception.
4223  Handle<Object> error;
4224  MaybeHandle<Object> maybe_error = isolate->factory()->NewReferenceError(
4225  "not_defined", HandleVector(&name, 1));
4226  if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
4227  return MakePair(isolate->heap()->exception(), NULL);
4228  } else {
4229  // The property doesn't exist - return undefined.
4230  return MakePair(isolate->heap()->undefined_value(),
4231  isolate->heap()->undefined_value());
4232  }
4233 }
static Object * ComputeReceiverForNonGlobal(Isolate *isolate, JSObject *holder)
Definition: runtime.cc:4114
ContextLookupFlags
Definition: contexts.h:15

References ASSIGN_RETURN_ON_EXCEPTION_VALUE, v8::internal::Handle< T >::cast(), v8::internal::Context::cast(), ComputeReceiverForNonGlobal(), DCHECK, DCHECK_EQ, v8::internal::Isolate::factory(), v8::internal::anonymous_namespace{flags.cc}::flags, FOLLOW_CHAINS, v8::internal::FixedArray::get(), v8::internal::Object::GetProperty(), HandleVector(), v8::internal::Isolate::has_pending_exception(), v8::internal::JSReceiver::HasProperty(), v8::internal::Isolate::heap(), IMMUTABLE_CHECK_INITIALIZED, IMMUTABLE_CHECK_INITIALIZED_HARMONY, IMMUTABLE_IS_INITIALIZED, IMMUTABLE_IS_INITIALIZED_HARMONY, v8::internal::Handle< T >::is_null(), MakePair(), v8::maybe(), MISSING_BINDING, MUTABLE_CHECK_INITIALIZED, MUTABLE_IS_INITIALIZED, name, NULL, READ_ONLY, v8::internal::Isolate::Throw(), v8::internal::Isolate::ThrowIllegalOperation(), and UNREACHABLE.

Referenced by RUNTIME_FUNCTION_RETURN_PAIR().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupForRead()

static void v8::internal::LookupForRead ( LookupIterator *  it)
static

Definition at line 219 of file ic.cc.

219  {
220  for (; it->IsFound(); it->Next()) {
221  switch (it->state()) {
222  case LookupIterator::NOT_FOUND:
223  case LookupIterator::TRANSITION:
224  UNREACHABLE();
225  case LookupIterator::JSPROXY:
226  return;
227  case LookupIterator::INTERCEPTOR: {
228  // If there is a getter, return; otherwise loop to perform the lookup.
229  Handle<JSObject> holder = it->GetHolder<JSObject>();
230  if (!holder->GetNamedInterceptor()->getter()->IsUndefined()) {
231  return;
232  }
233  break;
234  }
235  case LookupIterator::ACCESS_CHECK:
236  // PropertyHandlerCompiler::CheckPrototypes() knows how to emit
237  // access checks for global proxies.
238  if (it->GetHolder<JSObject>()->IsJSGlobalProxy() &&
239  it->HasAccess(v8::ACCESS_GET)) {
240  break;
241  }
242  return;
244  case LookupIterator::DATA:
245  return;
246  }
247  }
248 }
@ ACCESS_GET
Definition: v8.h:3520

References v8::ACCESS_GET, ACCESSOR, and UNREACHABLE.

Referenced by v8::internal::LoadIC::CompileHandler(), and v8::internal::LoadIC::Load().

+ Here is the caller graph for this function:

◆ MakeOrFindTwoCharacterString()

static Handle<String> v8::internal::MakeOrFindTwoCharacterString ( Isolate isolate,
uint16_t  c1,
uint16_t  c2 
)
inlinestatic

Definition at line 423 of file factory.cc.

425  {
426  // Numeric strings have a different hash algorithm not known by
427  // LookupTwoCharsStringIfExists, so we skip this step for such strings.
428  if (!Between(c1, '0', '9') || !Between(c2, '0', '9')) {
429  Handle<String> result;
430  if (StringTable::LookupTwoCharsStringIfExists(isolate, c1, c2).
431  ToHandle(&result)) {
432  return result;
433  }
434  }
435 
436  // Now we know the length is 2, we might as well make use of that fact
437  // when building the new string.
438  if (static_cast<unsigned>(c1 | c2) <= String::kMaxOneByteCharCodeU) {
439  // We can do this.
440  DCHECK(base::bits::IsPowerOfTwo32(String::kMaxOneByteCharCodeU +
441  1)); // because of this.
442  Handle<SeqOneByteString> str =
443  isolate->factory()->NewRawOneByteString(2).ToHandleChecked();
444  uint8_t* dest = str->GetChars();
445  dest[0] = static_cast<uint8_t>(c1);
446  dest[1] = static_cast<uint8_t>(c2);
447  return str;
448  } else {
449  Handle<SeqTwoByteString> str =
450  isolate->factory()->NewRawTwoByteString(2).ToHandleChecked();
451  uc16* dest = str->GetChars();
452  dest[0] = c1;
453  dest[1] = c2;
454  return str;
455  }
456 }
static bool Between(uint32_t character, uint32_t from, uint32_t to)
Definition: factory.cc:417

References Between(), DCHECK, v8::internal::Isolate::factory(), v8::base::bits::IsPowerOfTwo32(), v8::internal::String::kMaxOneByteCharCodeU, and v8::internal::StringTable::LookupTwoCharsStringIfExists().

+ Here is the call graph for this function:

◆ MakePair()

static ObjectPair v8::internal::MakePair ( Object x,
Object y 
)
inlinestatic

Definition at line 131 of file runtime-utils.h.

131  {
132 #if defined(V8_TARGET_LITTLE_ENDIAN)
133  return reinterpret_cast<uint32_t>(x) |
134  (reinterpret_cast<ObjectPair>(y) << 32);
135 #elif defined(V8_TARGET_BIG_ENDIAN)
136  return reinterpret_cast<uint32_t>(y) |
137  (reinterpret_cast<ObjectPair>(x) << 32);
138 #else
139 #error Unknown endianness
140 #endif
141 }
uint64_t ObjectPair

References v8::base::internal::y.

Referenced by CompileGlobalEval(), LoadLookupSlotHelper(), and RUNTIME_FUNCTION_RETURN_PAIR().

+ Here is the caller graph for this function:

◆ MarkBlackOrKeepBlack()

static void v8::internal::MarkBlackOrKeepBlack ( HeapObject heap_object,
MarkBit  mark_bit,
int  size 
)
inlinestatic

Definition at line 148 of file incremental-marking.cc.

149  {
150  DCHECK(!Marking::IsImpossible(mark_bit));
151  if (Marking::IsBlack(mark_bit)) return;
152  Marking::MarkBlack(mark_bit);
153  MemoryChunk::IncrementLiveBytesFromGC(heap_object->address(), size);
154  DCHECK(Marking::IsBlack(mark_bit));
155 }

References v8::internal::HeapObject::address(), DCHECK, v8::internal::MemoryChunk::IncrementLiveBytesFromGC(), and size.

+ Here is the call graph for this function:

◆ MarkBlackOrKeepGrey()

static void v8::internal::MarkBlackOrKeepGrey ( HeapObject heap_object,
MarkBit  mark_bit,
int  size 
)
inlinestatic

Definition at line 138 of file incremental-marking.cc.

139  {
140  DCHECK(!Marking::IsImpossible(mark_bit));
141  if (mark_bit.Get()) return;
142  mark_bit.Set();
143  MemoryChunk::IncrementLiveBytesFromGC(heap_object->address(), size);
144  DCHECK(Marking::IsBlack(mark_bit));
145 }

References v8::internal::HeapObject::address(), DCHECK, v8::internal::MarkBit::Get(), v8::internal::MemoryChunk::IncrementLiveBytesFromGC(), v8::internal::MarkBit::Set(), and size.

Referenced by v8::internal::IncrementalMarkingMarkingVisitor::INLINE(), and v8::internal::IncrementalMarkingRootMarkingVisitor::MarkObjectByPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MarkObjectGreyDoNotEnqueue()

static void v8::internal::MarkObjectGreyDoNotEnqueue ( Object obj)
static

Definition at line 125 of file incremental-marking.cc.

125  {
126  if (obj->IsHeapObject()) {
127  HeapObject* heap_obj = HeapObject::cast(obj);
128  MarkBit mark_bit = Marking::MarkBitFrom(HeapObject::cast(obj));
129  if (Marking::IsBlack(mark_bit)) {
130  MemoryChunk::IncrementLiveBytesFromGC(heap_obj->address(),
131  -heap_obj->Size());
132  }
133  Marking::AnyToGrey(mark_bit);
134  }
135 }

References v8::internal::HeapObject::address(), v8::internal::MemoryChunk::IncrementLiveBytesFromGC(), and v8::internal::HeapObject::Size().

Referenced by v8::internal::IncrementalMarking::StartMarking(), and v8::internal::IncrementalMarkingMarkingVisitor::VisitNativeContextIncremental().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MarkWordToObjectStarts()

static int v8::internal::MarkWordToObjectStarts ( uint32_t  mark_bits,
int starts 
)
inlinestatic

Definition at line 4090 of file mark-compact.cc.

4090  {
4091  int objects = 0;
4092  int offset = 0;
4093 
4094  // No consecutive 1 bits.
4095  DCHECK((mark_bits & 0x180) != 0x180);
4096  DCHECK((mark_bits & 0x18000) != 0x18000);
4097  DCHECK((mark_bits & 0x1800000) != 0x1800000);
4098 
4099  while (mark_bits != 0) {
4100  int byte = (mark_bits & 0xff);
4101  mark_bits >>= 8;
4102  if (byte != 0) {
4103  DCHECK(byte < kStartTableLines); // No consecutive 1 bits.
4104  char* table = kStartTable + byte * kStartTableEntriesPerLine;
4105  int objects_in_these_8_words = table[0];
4106  DCHECK(objects_in_these_8_words != kStartTableInvalidLine);
4107  DCHECK(objects_in_these_8_words < kStartTableEntriesPerLine);
4108  for (int i = 0; i < objects_in_these_8_words; i++) {
4109  starts[objects++] = offset + table[1 + i];
4110  }
4111  }
4112  offset += 8;
4113  }
4114  return objects;
4115 }
char kStartTable[kStartTableLines *kStartTableEntriesPerLine]
static const int kStartTableEntriesPerLine
static const int kStartTableInvalidLine
static const int kStartTableLines

References DCHECK, kStartTable, kStartTableEntriesPerLine, kStartTableInvalidLine, and kStartTableLines.

Referenced by v8::internal::MarkCompactCollector::EvacuateLiveObjectsFromPage(), and Sweep().

+ Here is the caller graph for this function:

◆ MaskToBit()

int v8::internal::MaskToBit ( uint64_t  mask)

Referenced by v8::internal::LCodeGen::DeoptimizeIfNotSmi(), v8::internal::LCodeGen::DeoptimizeIfSmi(), v8::internal::MacroAssembler::TestAndBranchIfAllClear(), and v8::internal::MacroAssembler::TestAndBranchIfAnySet().

+ Here is the caller graph for this function:

◆ MatchDoubleNegation()

static bool v8::internal::MatchDoubleNegation ( HValue instr,
HValue **  arg 
)
static

Definition at line 1391 of file hydrogen-instructions.cc.

1391  {
1392  HValue* negated;
1393  return MatchNegationViaXor(instr, &negated) &&
1394  MatchNegationViaXor(negated, arg);
1395 }
static bool MatchNegationViaXor(HValue *instr, HValue **negated)

References MatchNegationViaXor().

+ Here is the call graph for this function:

◆ MatchLeftIsOnes()

static bool v8::internal::MatchLeftIsOnes ( HValue l,
HValue r,
HValue **  negated 
)
static

Definition at line 1375 of file hydrogen-instructions.cc.

1375  {
1376  if (!l->EqualsInteger32Constant(~0)) return false;
1377  *negated = r;
1378  return true;
1379 }

References v8::internal::HValue::EqualsInteger32Constant().

Referenced by MatchNegationViaXor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MatchLiteralCompareNull()

static bool v8::internal::MatchLiteralCompareNull ( Expression left,
Token::Value  op,
Expression right,
Expression **  expr 
)
static

Definition at line 526 of file ast.cc.

529  {
530  if (left->IsNullLiteral() && Token::IsEqualityOp(op)) {
531  *expr = right;
532  return true;
533  }
534  return false;
535 }

References v8::internal::Token::IsEqualityOp(), and v8::internal::Expression::IsNullLiteral().

+ Here is the call graph for this function:

◆ MatchLiteralCompareTypeof()

static bool v8::internal::MatchLiteralCompareTypeof ( Expression left,
Token::Value  op,
Expression right,
Expression **  expr,
Handle< String > *  check 
)
static

Definition at line 470 of file ast.cc.

474  {
475  if (IsTypeof(left) && right->IsStringLiteral() && Token::IsEqualityOp(op)) {
476  *expr = left->AsUnaryOperation()->expression();
477  *check = Handle<String>::cast(right->AsLiteral()->value());
478  return true;
479  }
480  return false;
481 }
static bool IsTypeof(Expression *expr)
Definition: ast.cc:463

References v8::internal::Handle< T >::cast(), v8::internal::Token::IsEqualityOp(), v8::internal::Expression::IsStringLiteral(), and IsTypeof().

+ Here is the call graph for this function:

◆ MatchLiteralCompareUndefined()

static bool v8::internal::MatchLiteralCompareUndefined ( Expression left,
Token::Value  op,
Expression right,
Expression **  expr,
Isolate isolate 
)
static

Definition at line 501 of file ast.cc.

505  {
506  if (IsVoidOfLiteral(left) && Token::IsEqualityOp(op)) {
507  *expr = right;
508  return true;
509  }
510  if (left->IsUndefinedLiteral(isolate) && Token::IsEqualityOp(op)) {
511  *expr = right;
512  return true;
513  }
514  return false;
515 }
static bool IsVoidOfLiteral(Expression *expr)
Definition: ast.cc:491

References v8::internal::Token::IsEqualityOp(), v8::internal::Expression::IsUndefinedLiteral(), and IsVoidOfLiteral().

+ Here is the call graph for this function:

◆ MatchNegationViaXor()

static bool v8::internal::MatchNegationViaXor ( HValue instr,
HValue **  negated 
)
static

Definition at line 1382 of file hydrogen-instructions.cc.

1382  {
1383  if (!instr->IsBitwise()) return false;
1384  HBitwise* b = HBitwise::cast(instr);
1385  return (b->op() == Token::BIT_XOR) &&
1386  (MatchLeftIsOnes(b->left(), b->right(), negated) ||
1387  MatchLeftIsOnes(b->right(), b->left(), negated));
1388 }
static bool MatchLeftIsOnes(HValue *l, HValue *r, HValue **negated)

References MatchLeftIsOnes().

Referenced by MatchDoubleNegation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeArgumentsObject()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeArgumentsObject ( Isolate isolate,
Handle< JSObject target,
Handle< JSFunction function 
)
static

Definition at line 7435 of file runtime.cc.

7436  {
7437  // Do not materialize the arguments object for eval or top-level code.
7438  // Skip if "arguments" is already taken.
7439  if (!function->shared()->is_function()) return target;
7440  Maybe<bool> maybe = JSReceiver::HasOwnProperty(
7441  target, isolate->factory()->arguments_string());
7442  if (!maybe.has_value) return MaybeHandle<JSObject>();
7443  if (maybe.value) return target;
7444 
7445  // FunctionGetArguments can't throw an exception.
7446  Handle<JSObject> arguments =
7447  Handle<JSObject>::cast(Accessors::FunctionGetArguments(function));
7448  Handle<String> arguments_str = isolate->factory()->arguments_string();
7449  RETURN_ON_EXCEPTION(isolate, Runtime::DefineObjectProperty(
7450  target, arguments_str, arguments, NONE),
7451  JSObject);
7452  return target;
7453 }

References v8::internal::Handle< T >::cast(), v8::internal::Runtime::DefineObjectProperty(), v8::internal::Isolate::factory(), v8::internal::Accessors::FunctionGetArguments(), v8::internal::JSReceiver::HasOwnProperty(), v8::maybe(), NONE, and RETURN_ON_EXCEPTION.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeBlockScope()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeBlockScope ( Isolate isolate,
Handle< Context context 
)
static

Definition at line 6436 of file runtime.cc.

6437  {
6438  DCHECK(context->IsBlockContext());
6439  Handle<ScopeInfo> scope_info(ScopeInfo::cast(context->extension()));
6440 
6441  // Allocate and initialize a JSObject with all the arguments, stack locals
6442  // heap locals and extension properties of the debugged function.
6443  Handle<JSObject> block_scope =
6444  isolate->factory()->NewJSObject(isolate->object_function());
6445 
6446  // Fill all context locals.
6447  if (!ScopeInfo::CopyContextLocalsToScopeObject(scope_info, context,
6448  block_scope)) {
6449  return MaybeHandle<JSObject>();
6450  }
6451 
6452  return block_scope;
6453 }

References v8::internal::ScopeInfo::CopyContextLocalsToScopeObject(), DCHECK, and v8::internal::Isolate::factory().

Referenced by v8::internal::ScopeIterator::ScopeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeCatchScope()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeCatchScope ( Isolate isolate,
Handle< Context context 
)
static

Definition at line 6406 of file runtime.cc.

6407  {
6408  DCHECK(context->IsCatchContext());
6409  Handle<String> name(String::cast(context->extension()));
6410  Handle<Object> thrown_object(context->get(Context::THROWN_OBJECT_INDEX),
6411  isolate);
6412  Handle<JSObject> catch_scope =
6413  isolate->factory()->NewJSObject(isolate->object_function());
6414  RETURN_ON_EXCEPTION(isolate, Runtime::DefineObjectProperty(
6415  catch_scope, name, thrown_object, NONE),
6416  JSObject);
6417  return catch_scope;
6418 }

References DCHECK, v8::internal::Runtime::DefineObjectProperty(), v8::internal::Isolate::factory(), name, NONE, RETURN_ON_EXCEPTION, and v8::internal::Context::THROWN_OBJECT_INDEX.

Referenced by v8::internal::ScopeIterator::ScopeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeClosure()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeClosure ( Isolate isolate,
Handle< Context context 
)
static

Definition at line 6326 of file runtime.cc.

6327  {
6328  DCHECK(context->IsFunctionContext());
6329 
6330  Handle<SharedFunctionInfo> shared(context->closure()->shared());
6331  Handle<ScopeInfo> scope_info(shared->scope_info());
6332 
6333  // Allocate and initialize a JSObject with all the content of this function
6334  // closure.
6335  Handle<JSObject> closure_scope =
6336  isolate->factory()->NewJSObject(isolate->object_function());
6337 
6338  // Fill all context locals to the context extension.
6339  if (!ScopeInfo::CopyContextLocalsToScopeObject(scope_info, context,
6340  closure_scope)) {
6341  return MaybeHandle<JSObject>();
6342  }
6343 
6344  // Finally copy any properties from the function context extension. This will
6345  // be variables introduced by eval.
6346  if (context->has_extension()) {
6347  Handle<JSObject> ext(JSObject::cast(context->extension()));
6348  Handle<FixedArray> keys;
6350  isolate, keys, JSReceiver::GetKeys(ext, JSReceiver::INCLUDE_PROTOS),
6351  JSObject);
6352 
6353  for (int i = 0; i < keys->length(); i++) {
6354  HandleScope scope(isolate);
6355  // Names of variables introduced by eval are strings.
6356  DCHECK(keys->get(i)->IsString());
6357  Handle<String> key(String::cast(keys->get(i)));
6358  Handle<Object> value;
6360  isolate, value, Object::GetPropertyOrElement(ext, key), JSObject);
6361  RETURN_ON_EXCEPTION(isolate, Runtime::DefineObjectProperty(
6362  closure_scope, key, value, NONE),
6363  JSObject);
6364  }
6365  }
6366 
6367  return closure_scope;
6368 }

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::ScopeInfo::CopyContextLocalsToScopeObject(), DCHECK, v8::internal::Runtime::DefineObjectProperty(), v8::internal::Isolate::factory(), v8::internal::JSReceiver::GetKeys(), v8::internal::Object::GetPropertyOrElement(), v8::internal::JSReceiver::INCLUDE_PROTOS, keys(), NONE, and RETURN_ON_EXCEPTION.

Referenced by v8::internal::ScopeIterator::ScopeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeLocalContext()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeLocalContext ( Isolate isolate,
Handle< JSObject target,
Handle< JSFunction function,
JavaScriptFrame frame 
)
static

Definition at line 6173 of file runtime.cc.

6175  {
6176  HandleScope scope(isolate);
6177  Handle<SharedFunctionInfo> shared(function->shared());
6178  Handle<ScopeInfo> scope_info(shared->scope_info());
6179 
6180  if (!scope_info->HasContext()) return target;
6181 
6182  // Third fill all context locals.
6183  Handle<Context> frame_context(Context::cast(frame->context()));
6184  Handle<Context> function_context(frame_context->declaration_context());
6185  if (!ScopeInfo::CopyContextLocalsToScopeObject(scope_info, function_context,
6186  target)) {
6187  return MaybeHandle<JSObject>();
6188  }
6189 
6190  // Finally copy any properties from the function context extension.
6191  // These will be variables introduced by eval.
6192  if (function_context->closure() == *function) {
6193  if (function_context->has_extension() &&
6194  !function_context->IsNativeContext()) {
6195  Handle<JSObject> ext(JSObject::cast(function_context->extension()));
6196  Handle<FixedArray> keys;
6198  isolate, keys, JSReceiver::GetKeys(ext, JSReceiver::INCLUDE_PROTOS),
6199  JSObject);
6200 
6201  for (int i = 0; i < keys->length(); i++) {
6202  // Names of variables introduced by eval are strings.
6203  DCHECK(keys->get(i)->IsString());
6204  Handle<String> key(String::cast(keys->get(i)));
6205  Handle<Object> value;
6207  isolate, value, Object::GetPropertyOrElement(ext, key), JSObject);
6208  RETURN_ON_EXCEPTION(isolate, Runtime::SetObjectProperty(
6209  isolate, target, key, value, SLOPPY),
6210  JSObject);
6211  }
6212  }
6213  }
6214 
6215  return target;
6216 }

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Context::cast(), v8::internal::StandardFrame::context(), v8::internal::ScopeInfo::CopyContextLocalsToScopeObject(), DCHECK, v8::internal::JSReceiver::GetKeys(), v8::internal::Object::GetPropertyOrElement(), v8::internal::JSReceiver::INCLUDE_PROTOS, keys(), RETURN_ON_EXCEPTION, v8::internal::Runtime::SetObjectProperty(), and SLOPPY.

Referenced by MaterializeLocalScope().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeLocalScope()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeLocalScope ( Isolate isolate,
JavaScriptFrame frame,
int  inlined_jsframe_index 
)
static

Definition at line 6219 of file runtime.cc.

6220  {
6221  FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate);
6222  Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction()));
6223 
6224  Handle<JSObject> local_scope =
6225  isolate->factory()->NewJSObject(isolate->object_function());
6227  isolate, local_scope,
6228  MaterializeStackLocalsWithFrameInspector(isolate, local_scope, function,
6229  &frame_inspector),
6230  JSObject);
6231 
6232  return MaterializeLocalContext(isolate, local_scope, function, frame);
6233 }
static MUST_USE_RESULT MaybeHandle< JSObject > MaterializeStackLocalsWithFrameInspector(Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, FrameInspector *frame_inspector)
Definition: runtime.cc:6092
static MUST_USE_RESULT MaybeHandle< JSObject > MaterializeLocalContext(Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, JavaScriptFrame *frame)
Definition: runtime.cc:6173

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Isolate::factory(), v8::internal::FrameInspector::GetFunction(), MaterializeLocalContext(), and MaterializeStackLocalsWithFrameInspector().

Referenced by v8::internal::ScopeIterator::ScopeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeModuleScope()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeModuleScope ( Isolate isolate,
Handle< Context context 
)
static

Definition at line 6458 of file runtime.cc.

6459  {
6460  DCHECK(context->IsModuleContext());
6461  Handle<ScopeInfo> scope_info(ScopeInfo::cast(context->extension()));
6462 
6463  // Allocate and initialize a JSObject with all the members of the debugged
6464  // module.
6465  Handle<JSObject> module_scope =
6466  isolate->factory()->NewJSObject(isolate->object_function());
6467 
6468  // Fill all context locals.
6469  if (!ScopeInfo::CopyContextLocalsToScopeObject(scope_info, context,
6470  module_scope)) {
6471  return MaybeHandle<JSObject>();
6472  }
6473 
6474  return module_scope;
6475 }

References v8::internal::ScopeInfo::CopyContextLocalsToScopeObject(), DCHECK, and v8::internal::Isolate::factory().

Referenced by v8::internal::ScopeIterator::ScopeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeScopeDetails()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeScopeDetails ( Isolate isolate,
ScopeIterator it 
)
static

Definition at line 6940 of file runtime.cc.

6941  {
6942  // Calculate the size of the result.
6943  int details_size = kScopeDetailsSize;
6944  Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size);
6945 
6946  // Fill in scope details.
6947  details->set(kScopeDetailsTypeIndex, Smi::FromInt(it->Type()));
6948  Handle<JSObject> scope_object;
6949  ASSIGN_RETURN_ON_EXCEPTION(isolate, scope_object, it->ScopeObject(),
6950  JSObject);
6951  details->set(kScopeDetailsObjectIndex, *scope_object);
6952 
6953  return isolate->factory()->NewJSArrayWithElements(details);
6954 }
static const int kScopeDetailsObjectIndex
Definition: runtime.cc:6936
static const int kScopeDetailsSize
Definition: runtime.cc:6937
static const int kScopeDetailsTypeIndex
Definition: runtime.cc:6935

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), kScopeDetailsObjectIndex, kScopeDetailsSize, kScopeDetailsTypeIndex, v8::internal::ScopeIterator::ScopeObject(), and v8::internal::ScopeIterator::Type().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaterializeStackLocalsWithFrameInspector()

static MUST_USE_RESULT MaybeHandle<JSObject> v8::internal::MaterializeStackLocalsWithFrameInspector ( Isolate isolate,
Handle< JSObject target,
Handle< JSFunction function,
FrameInspector frame_inspector 
)
static

Definition at line 6092 of file runtime.cc.

6094  {
6095  Handle<SharedFunctionInfo> shared(function->shared());
6096  Handle<ScopeInfo> scope_info(shared->scope_info());
6097 
6098  // First fill all parameters.
6099  for (int i = 0; i < scope_info->ParameterCount(); ++i) {
6100  // Do not materialize the parameter if it is shadowed by a context local.
6101  Handle<String> name(scope_info->ParameterName(i));
6102  if (ParameterIsShadowedByContextLocal(scope_info, name)) continue;
6103 
6104  HandleScope scope(isolate);
6105  Handle<Object> value(i < frame_inspector->GetParametersCount()
6106  ? frame_inspector->GetParameter(i)
6107  : isolate->heap()->undefined_value(),
6108  isolate);
6109  DCHECK(!value->IsTheHole());
6110 
6111  RETURN_ON_EXCEPTION(isolate, Runtime::SetObjectProperty(
6112  isolate, target, name, value, SLOPPY),
6113  JSObject);
6114  }
6115 
6116  // Second fill all stack locals.
6117  for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
6118  if (scope_info->LocalIsSynthetic(i)) continue;
6119  Handle<String> name(scope_info->StackLocalName(i));
6120  Handle<Object> value(frame_inspector->GetExpression(i), isolate);
6121  if (value->IsTheHole()) continue;
6122 
6123  RETURN_ON_EXCEPTION(isolate, Runtime::SetObjectProperty(
6124  isolate, target, name, value, SLOPPY),
6125  JSObject);
6126  }
6127 
6128  return target;
6129 }
static bool ParameterIsShadowedByContextLocal(Handle< ScopeInfo > info, Handle< String > parameter_name)
Definition: runtime.cc:6079

References DCHECK, v8::internal::FrameInspector::GetExpression(), v8::internal::FrameInspector::GetParameter(), v8::internal::Isolate::heap(), name, ParameterIsShadowedByContextLocal(), RETURN_ON_EXCEPTION, v8::internal::Runtime::SetObjectProperty(), and SLOPPY.

Referenced by MaterializeLocalScope(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Max() [1/2]

static LifetimePosition v8::internal::Max ( LifetimePosition  a,
LifetimePosition  b 
)
inlinestatic

Definition at line 20 of file lithium-allocator.cc.

20  {
21  return a.Value() > b.Value() ? a : b;
22 }

References v8::internal::LifetimePosition::Value().

Referenced by v8::internal::Bignum::AddBignum(), v8::internal::GCTracer::AddIncrementalMarkingStep(), v8::internal::LiveRange::AddUseInterval(), v8::internal::Trace::AdvanceCurrentPositionInTrace(), v8::internal::OrderedHashTable< Derived, Iterator, entrysize >::Allocate(), BUILTIN(), v8::internal::Isolate::CaptureCurrentStackTrace(), v8::internal::Isolate::CaptureSimpleStackTrace(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::ClampToSmi(), v8::internal::Heap::CollectGarbage(), v8::internal::RegExpEngine::Compile(), v8::internal::Heap::ConfigureHeap(), CopyBytes(), v8::internal::Deoptimizer::EnsureCodeForDeoptimizationEntry(), v8::internal::Heap::FullSizeNumberStringCacheLength(), v8::internal::Map::GeneralizeRepresentation(), v8::internal::SloppyArgumentsElementsAccessor::GetCapacityImpl(), v8::internal::CompareICStub::GetICState(), v8::internal::BASE_EMBEDDED< Visitor >::GetICState(), v8::internal::RegExpImpl::GlobalCache::GlobalCache(), v8::internal::BASE_EMBEDDED< Visitor >::HasSideEffects(), v8::internal::Isolate::Init(), InsertRangeInCanonicalList(), v8::internal::TypeImpl< Config >::Max(), v8::internal::GCTracer::MaxDuration(), v8::internal::GCTracer::MaxIncrementalMarkingDuration(), v8::internal::LiteralBuffer::NewCapacity(), v8::internal::Zone::NewExpand(), v8::internal::Heap::OldGenerationAllocationLimit(), v8::internal::Scope::Scope(), v8::internal::NewSpace::Shrink(), v8::internal::IncrementalMarking::Step(), v8::internal::GCTracer::Stop(), Sweep(), v8::internal::MarkCompactCollector::SweepInParallel(), v8::internal::Map::TooManyFastProperties(), v8::internal::Interval::Union(), v8::internal::MemoryAllocator::UpdateAllocatedSpaceLimits(), v8::internal::Heap::UpdateCumulativeGCStatistics(), v8::internal::IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(), and v8::internal::Serializer::VisitPointers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Max() [2/2]

template<typename T >
T v8::internal::Max ( T  a,
T  b 
)

Definition at line 139 of file utils.h.

139  {
140  return a < b ? b : a;
141 }

◆ MayAccessPreCheck()

static MayAccessDecision v8::internal::MayAccessPreCheck ( Isolate isolate,
Handle< JSObject receiver,
v8::AccessType  type 
)
static

Definition at line 671 of file isolate.cc.

673  {
675  // During bootstrapping, callback functions are not enabled yet.
676  if (isolate->bootstrapper()->IsActive()) return YES;
677 
678  if (receiver->IsJSGlobalProxy()) {
679  Object* receiver_context = JSGlobalProxy::cast(*receiver)->native_context();
680  if (!receiver_context->IsContext()) return NO;
681 
682  // Get the native context of current top context.
683  // avoid using Isolate::native_context() because it uses Handle.
684  Context* native_context =
685  isolate->context()->global_object()->native_context();
686  if (receiver_context == native_context) return YES;
687 
688  if (Context::cast(receiver_context)->security_token() ==
689  native_context->security_token())
690  return YES;
691  }
692 
693  return UNKNOWN;
694 }

References v8::internal::Isolate::bootstrapper(), v8::internal::Context::cast(), v8::internal::Isolate::context(), v8::internal::Context::global_object(), NO, UNKNOWN, and YES.

Referenced by v8::internal::Isolate::MayIndexedAccess(), and v8::internal::Isolate::MayNamedAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaybeNull()

template<class T >
static Handle<T> v8::internal::MaybeNull ( T p)
static

Definition at line 3206 of file objects.cc.

3206  {
3207  if (p == NULL) return Handle<T>::null();
3208  return Handle<T>(p);
3209 }

References NULL, and v8::internal::Handle< T >::null().

Referenced by v8::internal::Map::FindTransitionedMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MemCopy()

void v8::internal::MemCopy ( void *  dest,
const void *  src,
size_t  size 
)
inline

Definition at line 350 of file utils.h.

350  {
351  memcpy(dest, src, size);
352 }

References size.

Referenced by v8::internal::OutputStreamWriter::AddSubstring(), v8::internal::SimpleStringBuilder::AddSubstring(), v8::internal::Heap::AllocateOneByteInternalizedString(), v8::internal::Heap::AllocateTwoByteInternalizedString(), v8::internal::CodeEventLogger::NameBuffer::AppendBytes(), v8::internal::Debug::ArchiveDebug(), v8::internal::RegExpStack::ArchiveStack(), v8::internal::HandleScopeImplementer::ArchiveThread(), v8::internal::Isolate::ArchiveThread(), v8::internal::Heap::CheckpointObjectStats(), CloneCodeObject(), CopyBytes(), CopyCharsUnsigned(), CopyWords(), v8::internal::DeclaredAccessorDescriptor::Create(), v8::internal::EmbeddedVector< T, kSize >::EmbeddedVector(), v8::internal::RegExpStack::EnsureCapacity(), v8::internal::LiteralBuffer::ExpandBuffer(), v8::internal::CompleteParserRecorder::GetScriptData(), v8::internal::RegExpImpl::IrregexpExecRaw(), v8::internal::LowLevelLogger::LowLevelLogger(), v8::Object::ObjectProtoToString(), v8::internal::EmbeddedVector< T, kSize >::operator=(), PatchPositionsInCode(), ReadLine(), v8::internal::List< T, AllocationPolicy >::Resize(), v8::internal::Debug::RestoreDebug(), v8::internal::RegExpStack::RestoreStack(), v8::internal::HandleScopeImplementer::RestoreThread(), v8::internal::Isolate::RestoreThread(), v8::internal::FlagList::SetFlagsFromString(), SplitArgument(), StrDup(), StrNDup(), WriteOneByteData(), and unibrow::Utf8Decoder< kBufferSize >::WriteUtf16().

+ Here is the caller graph for this function:

◆ MemMove()

void v8::internal::MemMove ( void *  dest,
const void *  src,
size_t  size 
)
inline

Definition at line 353 of file utils.h.

353  {
354  memmove(dest, src, size);
355 }

References size.

Referenced by v8::internal::HCheckTable::Compact(), DropFrames(), v8::internal::RelocInfoBuffer::Grow(), v8::internal::Heap::MoveBlock(), MoveDoubleElements(), v8::internal::Heap::MoveElements(), and MoveWords().

+ Here is the caller graph for this function:

◆ MemsetPointer()

template<typename T , typename U >
void v8::internal::MemsetPointer ( T **  dest,
U value,
int  counter 
)
inline

Definition at line 1183 of file utils.h.

1183  {
1184 #ifdef DEBUG
1185  T* a = NULL;
1186  U* b = NULL;
1187  a = b; // Fake assignment to check assignability.
1188  USE(a);
1189 #endif // DEBUG
1190 #if V8_HOST_ARCH_IA32
1191 #define STOS "stosl"
1192 #elif V8_HOST_ARCH_X64
1193 #if V8_HOST_ARCH_32_BIT
1194 #define STOS "addr32 stosl"
1195 #else
1196 #define STOS "stosq"
1197 #endif
1198 #endif
1199 #if defined(__native_client__)
1200  // This STOS sequence does not validate for x86_64 Native Client.
1201  // Here we #undef STOS to force use of the slower C version.
1202  // TODO(bradchen): Profile V8 and implement a faster REP STOS
1203  // here if the profile indicates it matters.
1204 #undef STOS
1205 #endif
1206 
1207 #if defined(MEMORY_SANITIZER)
1208  // MemorySanitizer does not understand inline assembly.
1209 #undef STOS
1210 #endif
1211 
1212 #if defined(__GNUC__) && defined(STOS)
1213  asm volatile(
1214  "cld;"
1215  "rep ; " STOS
1216  : "+&c" (counter), "+&D" (dest)
1217  : "a" (value)
1218  : "memory", "cc");
1219 #else
1220  for (int i = 0; i < counter; i++) {
1221  dest[i] = value;
1222  }
1223 #endif
1224 
1225 #undef STOS
1226 }

References NULL, T, U, and USE().

Referenced by v8::internal::SharedFunctionInfo::AddToOptimizedCodeMap(), v8::internal::Heap::AllocateFixedArrayWithFiller(), v8::internal::CompilationSubCache::Clear(), v8::internal::JSFunctionResultCache::Clear(), v8::internal::ConstantPoolArray::ClearPtrEntries(), CopyDictionaryToObjectElements(), CopyDoubleToObjectElements(), CopyObjectToObjectElements(), v8::internal::EternalHandles::Create(), v8::internal::compiler::StructuredGraphBuilder::NewEffectPhi(), v8::internal::compiler::StructuredGraphBuilder::NewPhi(), RUNTIME_FUNCTION(), and v8::internal::Map::ZapPrototypeTransitions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MigrateDeprecated()

static bool v8::internal::MigrateDeprecated ( Handle< Object object)
static

Definition at line 577 of file ic.cc.

577  {
578  if (!object->IsJSObject()) return false;
579  Handle<JSObject> receiver = Handle<JSObject>::cast(object);
580  if (!receiver->map()->is_deprecated()) return false;
581  JSObject::MigrateInstance(Handle<JSObject>::cast(object));
582  return true;
583 }

References v8::internal::Handle< T >::cast(), and v8::internal::JSObject::MigrateInstance().

Referenced by v8::internal::LoadIC::Load(), v8::internal::KeyedLoadIC::Load(), v8::internal::StoreIC::Store(), and v8::internal::KeyedStoreIC::Store().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ min()

◆ Min() [1/2]

static LifetimePosition v8::internal::Min ( LifetimePosition  a,
LifetimePosition  b 
)
inlinestatic

Definition at line 15 of file lithium-allocator.cc.

15  {
16  return a.Value() < b.Value() ? a : b;
17 }

References v8::internal::LifetimePosition::Value().

Referenced by v8::internal::OutputStreamWriter::AddSubstring(), v8::internal::LiveRange::AddUseInterval(), v8::internal::CodeEventLogger::NameBuffer::AppendBytes(), v8::internal::CodeEventLogger::NameBuffer::AppendString(), v8::internal::GenericStringUtf16CharacterStream::BufferSeekForward(), BUILTIN(), v8::internal::ChoiceNode::CalculatePreloadCharacters(), v8::internal::Isolate::CaptureSimpleStackTrace(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::ClampToSmi(), v8::internal::MarkCompactCollector::CollectEvacuationCandidates(), v8::internal::Bignum::Compare(), v8::internal::Heap::ConfigureHeap(), CopyBytes(), CopyDoubleToDoubleElements(), CopyDoubleToObjectElements(), CopyObjectToObjectElements(), DoubleToPrecisionCString(), v8::internal::AssertionNode::EmitBoundaryCheck(), v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch(), v8::internal::StringComparator::Equals(), v8::internal::GCIdleTimeHandler::EstimateMarkCompactTime(), v8::internal::TextNode::FillInBMInfo(), v8::internal::Heap::FreeQueuedChunks(), v8::internal::Heap::FullSizeNumberStringCacheLength(), v8::internal::BASE_EMBEDDED< Visitor >::GetICState(), v8::internal::StringsStorage::GetName(), v8::internal::StaticVisitorBase::GetVisitorIdForSize(), v8::internal::NewSpace::Grow(), HasFewDifferentCharacters(), v8::internal::Isolate::Init(), v8::internal::HOptimizedGraphBuilder::InliningAstSize(), InsertRangeInCanonicalList(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::Intersect(), v8::internal::EternalHandles::IterateAllRoots(), v8::internal::TypeImpl< Config >::Min(), v8::internal::LiteralBuffer::NewCapacity(), NewSloppyArguments(), v8::internal::Heap::OldGenerationAllocationLimit(), v8::internal::Bignum::PlusCompare(), v8::internal::FullCodeGenerator::RecordBackEdge(), v8::internal::PromotionQueue::RelocateQueueHead(), RUNTIME_FUNCTION(), v8::internal::Map::set_unused_property_fields(), v8::internal::JSArray::SetElementsLength(), v8::internal::LiveRange::SetSpillStartIndex(), v8::internal::PagedSpace::SizeOfFirstPage(), v8::internal::IncrementalMarking::SpeedUp(), v8::internal::HOptimizedGraphBuilder::TryInline(), v8::internal::Interval::Union(), v8::internal::MemoryAllocator::UpdateAllocatedSpaceLimits(), v8::internal::Heap::UpdateCumulativeGCStatistics(), v8::internal::NewSpace::UpdateInlineAllocationLimit(), and v8::internal::IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Min() [2/2]

template<typename T >
T v8::internal::Min ( T  a,
T  b 
)

Definition at line 146 of file utils.h.

146  {
147  return a < b ? a : b;
148 }

◆ ModuleGetExport()

static void v8::internal::ModuleGetExport ( v8::Local< v8::String property,
const v8::PropertyCallbackInfo< v8::Value > &  info 
)
static

Definition at line 1348 of file accessors.cc.

1350  {
1351  JSModule* instance = JSModule::cast(*v8::Utils::OpenHandle(*info.Holder()));
1352  Context* context = Context::cast(instance->context());
1353  DCHECK(context->IsModuleContext());
1354  int slot = info.Data()->Int32Value();
1355  Object* value = context->get(slot);
1356  Isolate* isolate = instance->GetIsolate();
1357  if (value->IsTheHole()) {
1358  Handle<String> name = v8::Utils::OpenHandle(*property);
1359 
1360  Handle<Object> exception;
1361  MaybeHandle<Object> maybe = isolate->factory()->NewReferenceError(
1362  "not_defined", HandleVector(&name, 1));
1363  if (!maybe.ToHandle(&exception)) {
1364  isolate->OptionalRescheduleException(false);
1365  return;
1366  }
1367 
1368  isolate->ScheduleThrow(*exception);
1369  return;
1370  }
1371  info.GetReturnValue().Set(v8::Utils::ToLocal(Handle<Object>(value, isolate)));
1372 }
Local< Value > Data() const
Definition: v8.h:6813
Local< Object > Holder() const
Definition: v8.h:6825
ReturnValue< T > GetReturnValue() const
Definition: v8.h:6831
static v8::internal::Handle< To > OpenHandle(v8::Local< From > handle)
Definition: api.h:288

References v8::internal::Context::cast(), v8::PropertyCallbackInfo< T >::Data(), DCHECK, v8::internal::Isolate::factory(), v8::internal::FixedArray::get(), v8::internal::HeapObject::GetIsolate(), v8::PropertyCallbackInfo< T >::GetReturnValue(), HandleVector(), v8::PropertyCallbackInfo< T >::Holder(), v8::internal::Context::IsModuleContext(), v8::maybe(), name, v8::Utils::OpenHandle(), v8::internal::Isolate::OptionalRescheduleException(), v8::internal::Isolate::ScheduleThrow(), and v8::Utils::ToLocal().

Referenced by v8::internal::Accessors::MakeModuleExport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ModuleSetExport()

static void v8::internal::ModuleSetExport ( v8::Local< v8::String property,
v8::Local< v8::Value value,
const v8::PropertyCallbackInfo< v8::Value > &  info 
)
static

Definition at line 1375 of file accessors.cc.

1378  {
1379  JSModule* instance = JSModule::cast(*v8::Utils::OpenHandle(*info.Holder()));
1380  Context* context = Context::cast(instance->context());
1381  DCHECK(context->IsModuleContext());
1382  int slot = info.Data()->Int32Value();
1383  Object* old_value = context->get(slot);
1384  Isolate* isolate = context->GetIsolate();
1385  if (old_value->IsTheHole()) {
1386  Handle<String> name = v8::Utils::OpenHandle(*property);
1387  Handle<Object> exception;
1388  MaybeHandle<Object> maybe = isolate->factory()->NewReferenceError(
1389  "not_defined", HandleVector(&name, 1));
1390  if (!maybe.ToHandle(&exception)) {
1391  isolate->OptionalRescheduleException(false);
1392  return;
1393  }
1394 
1395  isolate->ScheduleThrow(*exception);
1396  return;
1397  }
1398  context->set(slot, *v8::Utils::OpenHandle(*value));
1399 }

References v8::internal::Context::cast(), v8::PropertyCallbackInfo< T >::Data(), DCHECK, v8::internal::Isolate::factory(), v8::internal::FixedArray::get(), v8::internal::HeapObject::GetIsolate(), HandleVector(), v8::PropertyCallbackInfo< T >::Holder(), v8::internal::Context::IsModuleContext(), v8::maybe(), name, v8::Utils::OpenHandle(), v8::internal::Isolate::OptionalRescheduleException(), v8::internal::Isolate::ScheduleThrow(), and v8::internal::FixedArray::set().

Referenced by v8::internal::Accessors::MakeModuleExport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modulo()

double v8::internal::modulo ( double  x,
double  y 
)

Definition at line 50 of file codegen.cc.

50  {
51  return std::fmod(x, y);
52 }

References v8::base::internal::y.

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ MostSignificantBit()

int v8::internal::MostSignificantBit ( uint32_t  x)
inline

Definition at line 68 of file utils.h.

68  {
69  static const int msb4[] = {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4};
70  int nibble = 0;
71  if (x & 0xffff0000) {
72  nibble += 16;
73  x >>= 16;
74  }
75  if (x & 0xff00) {
76  nibble += 8;
77  x >>= 8;
78  }
79  if (x & 0xf0) {
80  nibble += 4;
81  x >>= 4;
82  }
83  return nibble + msb4[x];
84 }

◆ MoveDoubleElements()

static void v8::internal::MoveDoubleElements ( FixedDoubleArray dst,
int  dst_index,
FixedDoubleArray src,
int  src_index,
int  len 
)
static

Definition at line 177 of file builtins.cc.

178  {
179  if (len == 0) return;
180  MemMove(dst->data_start() + dst_index, src->data_start() + src_index,
181  len * kDoubleSize);
182 }

References v8::internal::FixedDoubleArray::data_start(), kDoubleSize, and MemMove().

Referenced by BUILTIN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveRanges()

static void v8::internal::MoveRanges ( ZoneList< CharacterRange > *  list,
int  from,
int  to,
int  count 
)
static

Definition at line 5425 of file jsregexp.cc.

5428  {
5429  // Ranges are potentially overlapping.
5430  if (from < to) {
5431  for (int i = count - 1; i >= 0; i--) {
5432  list->at(to + i) = list->at(from + i);
5433  }
5434  } else {
5435  for (int i = 0; i < count; i++) {
5436  list->at(to + i) = list->at(from + i);
5437  }
5438  }
5439 }

References v8::internal::List< T, AllocationPolicy >::at(), and to().

Referenced by InsertRangeInCanonicalList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveWords()

template<typename T >
void v8::internal::MoveWords ( T dst,
const T src,
size_t  num_words 
)
inline

Definition at line 1138 of file utils.h.

1138  {
1139  STATIC_ASSERT(sizeof(T) == kPointerSize);
1140  DCHECK(num_words > 0);
1141 
1142  // Use block copying MemCopy if the segment we're copying is
1143  // enough to justify the extra call/setup overhead.
1144  static const size_t kBlockCopyLimit = 16;
1145 
1146  if (num_words < kBlockCopyLimit &&
1147  ((dst < src) || (dst >= (src + num_words * kPointerSize)))) {
1148  T* end = dst + num_words;
1149  do {
1150  num_words--;
1151  *dst++ = *src++;
1152  } while (num_words > 0);
1153  } else {
1154  MemMove(dst, src, num_words * kPointerSize);
1155  }
1156 }

References DCHECK, kPointerSize, MemMove(), STATIC_ASSERT(), and T.

+ Here is the call graph for this function:

◆ MulWithoutOverflow()

static int32_t v8::internal::MulWithoutOverflow ( const Representation r,
int32_t  a,
int32_t  b,
bool overflow 
)
static

Definition at line 175 of file hydrogen-instructions.cc.

178  {
179  int64_t result = static_cast<int64_t>(a) * static_cast<int64_t>(b);
180  return ConvertAndSetOverflow(r, result, overflow);
181 }

References ConvertAndSetOverflow(), and overflow.

+ Here is the call graph for this function:

◆ MustRecordSlots()

static bool v8::internal::MustRecordSlots ( Heap heap)
static

Definition at line 180 of file objects-visiting.cc.

180  {
181  return heap->gc_state() == Heap::MARK_COMPACT &&
182  heap->mark_compact_collector()->is_compacting();
183 }

References v8::internal::Heap::gc_state(), v8::internal::MarkCompactCollector::is_compacting(), v8::internal::Heap::MARK_COMPACT, and v8::internal::Heap::mark_compact_collector().

Referenced by v8::internal::WeakListVisitor< Context >::DoWeakList(), v8::internal::WeakListVisitor< JSArrayBuffer >::VisitLiveObject(), and VisitWeakList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MutableCStrVector() [1/2]

Vector<char> v8::internal::MutableCStrVector ( char *  data)
inline

Definition at line 170 of file vector.h.

170  {
171  return Vector<char>(data, StrLength(data));
172 }

References StrLength().

+ Here is the call graph for this function:

◆ MutableCStrVector() [2/2]

Vector<char> v8::internal::MutableCStrVector ( char *  data,
int  max 
)
inline

Definition at line 174 of file vector.h.

174  {
175  int length = StrLength(data);
176  return Vector<char>(data, (length < max) ? length : max);
177 }

References StrLength().

+ Here is the call graph for this function:

◆ NarrowDownInput()

static void v8::internal::NarrowDownInput ( SubrangableInput input,
SubrangableOutput output 
)
static

Definition at line 280 of file liveedit.cc.

281  {
282  const int len1 = input->GetLength1();
283  const int len2 = input->GetLength2();
284 
285  int common_prefix_len;
286  int common_suffix_len;
287 
288  {
289  common_prefix_len = 0;
290  int prefix_limit = min(len1, len2);
291  while (common_prefix_len < prefix_limit &&
292  input->Equals(common_prefix_len, common_prefix_len)) {
293  common_prefix_len++;
294  }
295 
296  common_suffix_len = 0;
297  int suffix_limit = min(len1 - common_prefix_len, len2 - common_prefix_len);
298 
299  while (common_suffix_len < suffix_limit &&
300  input->Equals(len1 - common_suffix_len - 1,
301  len2 - common_suffix_len - 1)) {
302  common_suffix_len++;
303  }
304  }
305 
306  if (common_prefix_len > 0 || common_suffix_len > 0) {
307  int new_len1 = len1 - common_suffix_len - common_prefix_len;
308  int new_len2 = len2 - common_suffix_len - common_prefix_len;
309 
310  input->SetSubrange1(common_prefix_len, new_len1);
311  input->SetSubrange2(common_prefix_len, new_len2);
312 
313  output->SetSubrange1(common_prefix_len, new_len1);
314  output->SetSubrange2(common_prefix_len, new_len2);
315  }
316 }

References v8::internal::Comparator::Input::Equals(), v8::internal::Comparator::Input::GetLength1(), v8::internal::Comparator::Input::GetLength2(), min(), v8::internal::SubrangableInput::SetSubrange1(), v8::internal::SubrangableOutput::SetSubrange1(), v8::internal::SubrangableInput::SetSubrange2(), and v8::internal::SubrangableOutput::SetSubrange2().

Referenced by v8::internal::LiveEdit::CompareStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NeedsWrappingFor()

static bool v8::internal::NeedsWrappingFor ( Type type,
Handle< JSFunction target 
)
static

Definition at line 6165 of file hydrogen.cc.

6165  {
6166  return type->Is(Type::NumberOrString()) &&
6167  target->shared()->strict_mode() == SLOPPY &&
6168  !target->shared()->native();
6169 }

References v8::internal::TypeImpl< Config >::Is(), and SLOPPY.

Referenced by v8::internal::HOptimizedGraphBuilder::BuildMonomorphicAccess(), and v8::internal::HOptimizedGraphBuilder::HandlePolymorphicCallNamed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NeedToFlipBytes()

static bool v8::internal::NeedToFlipBytes ( bool  is_little_endian)
inlinestatic

Definition at line 542 of file runtime-typedarray.cc.

542  {
543 #ifdef V8_TARGET_LITTLE_ENDIAN
544  return !is_little_endian;
545 #else
546  return is_little_endian;
547 #endif
548 }

Referenced by DataViewGetValue(), and DataViewSetValue().

+ Here is the caller graph for this function:

◆ NegateCondition()

Condition v8::internal::NegateCondition ( Condition  cond)
inline

Definition at line 86 of file constants-arm.h.

86  {
87  DCHECK(cond != al);
88  return static_cast<Condition>(cond ^ ne);
89 }

References al, DCHECK, and ne.

Referenced by v8::internal::LCodeGen::DeoptimizeIf(), v8::internal::LCodeGen::EmitBranch(), v8::internal::LCodeGen::EmitBranchF(), v8::internal::BranchOnCondition::EmitInverted(), v8::internal::CompareAndBranch::EmitInverted(), v8::internal::TestAndBranch::EmitInverted(), and InvertBranchType().

+ Here is the caller graph for this function:

◆ NegateHint()

Hint v8::internal::NegateHint ( Hint  ignored)
inline

Definition at line 405 of file constants-arm.h.

405 { return no_hint; }

References no_hint.

◆ NewArray()

template<typename T >
T* v8::internal::NewArray ( size_t  size)

Definition at line 60 of file allocation.h.

60  {
61  T* result = new T[size];
62  if (result == NULL) Malloced::FatalProcessOutOfMemory();
63  return result;
64 }

References v8::internal::Malloced::FatalProcessOutOfMemory(), NULL, size, and T.

Referenced by GetCallerArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewJSObjectWithNullProto()

static Handle<JSObject> v8::internal::NewJSObjectWithNullProto ( Isolate isolate)
static

Definition at line 7494 of file runtime.cc.

7494  {
7495  Handle<JSObject> result =
7496  isolate->factory()->NewJSObject(isolate->object_function());
7497  Handle<Map> new_map = Map::Copy(Handle<Map>(result->map()));
7498  new_map->set_prototype(*isolate->factory()->null_value());
7499  JSObject::MigrateToMap(result, new_map);
7500  return result;
7501 }

References v8::internal::Map::Copy(), v8::internal::Isolate::factory(), and v8::internal::JSObject::MigrateToMap().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewRawString() [1/2]

template<typename StringType >
Handle<StringType> v8::internal::NewRawString ( Factory *  factory,
int  length,
PretenureFlag  pretenure 
)
inline

Definition at line 566 of file json-parser.h.

568  {
569  return factory->NewRawTwoByteString(length, pretenure).ToHandleChecked();
570 }

◆ NewRawString() [2/2]

template<>
Handle< SeqOneByteString > v8::internal::NewRawString ( Factory *  factory,
int  length,
PretenureFlag  pretenure 
)
inline

Definition at line 566 of file json-parser.h.

568  {
569  return factory->NewRawTwoByteString(length, pretenure).ToHandleChecked();
570 }

◆ NewSloppyArguments()

static Handle<JSObject> v8::internal::NewSloppyArguments ( Isolate isolate,
Handle< JSFunction callee,
Object **  parameters,
int  argument_count 
)
static

Definition at line 3326 of file runtime.cc.

3329  {
3330  Handle<JSObject> result =
3331  isolate->factory()->NewArgumentsObject(callee, argument_count);
3332 
3333  // Allocate the elements if needed.
3334  int parameter_count = callee->shared()->formal_parameter_count();
3335  if (argument_count > 0) {
3336  if (parameter_count > 0) {
3337  int mapped_count = Min(argument_count, parameter_count);
3338  Handle<FixedArray> parameter_map =
3339  isolate->factory()->NewFixedArray(mapped_count + 2, NOT_TENURED);
3340  parameter_map->set_map(isolate->heap()->sloppy_arguments_elements_map());
3341 
3342  Handle<Map> map = Map::Copy(handle(result->map()));
3343  map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS);
3344 
3345  result->set_map(*map);
3346  result->set_elements(*parameter_map);
3347 
3348  // Store the context and the arguments array at the beginning of the
3349  // parameter map.
3350  Handle<Context> context(isolate->context());
3351  Handle<FixedArray> arguments =
3352  isolate->factory()->NewFixedArray(argument_count, NOT_TENURED);
3353  parameter_map->set(0, *context);
3354  parameter_map->set(1, *arguments);
3355 
3356  // Loop over the actual parameters backwards.
3357  int index = argument_count - 1;
3358  while (index >= mapped_count) {
3359  // These go directly in the arguments array and have no
3360  // corresponding slot in the parameter map.
3361  arguments->set(index, *(parameters - index - 1));
3362  --index;
3363  }
3364 
3365  Handle<ScopeInfo> scope_info(callee->shared()->scope_info());
3366  while (index >= 0) {
3367  // Detect duplicate names to the right in the parameter list.
3368  Handle<String> name(scope_info->ParameterName(index));
3369  int context_local_count = scope_info->ContextLocalCount();
3370  bool duplicate = false;
3371  for (int j = index + 1; j < parameter_count; ++j) {
3372  if (scope_info->ParameterName(j) == *name) {
3373  duplicate = true;
3374  break;
3375  }
3376  }
3377 
3378  if (duplicate) {
3379  // This goes directly in the arguments array with a hole in the
3380  // parameter map.
3381  arguments->set(index, *(parameters - index - 1));
3382  parameter_map->set_the_hole(index + 2);
3383  } else {
3384  // The context index goes in the parameter map with a hole in the
3385  // arguments array.
3386  int context_index = -1;
3387  for (int j = 0; j < context_local_count; ++j) {
3388  if (scope_info->ContextLocalName(j) == *name) {
3389  context_index = j;
3390  break;
3391  }
3392  }
3393  DCHECK(context_index >= 0);
3394  arguments->set_the_hole(index);
3395  parameter_map->set(
3396  index + 2,
3397  Smi::FromInt(Context::MIN_CONTEXT_SLOTS + context_index));
3398  }
3399 
3400  --index;
3401  }
3402  } else {
3403  // If there is no aliasing, the arguments object elements are not
3404  // special in any way.
3405  Handle<FixedArray> elements =
3406  isolate->factory()->NewFixedArray(argument_count, NOT_TENURED);
3407  result->set_elements(*elements);
3408  for (int i = 0; i < argument_count; ++i) {
3409  elements->set(i, *(parameters - i - 1));
3410  }
3411  }
3412  }
3413  return result;
3414 }

References v8::internal::Isolate::context(), v8::internal::Map::Copy(), DCHECK, v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), handle(), v8::internal::Isolate::heap(), map, Min(), v8::internal::Context::MIN_CONTEXT_SLOTS, name, NOT_TENURED, and SLOPPY_ARGUMENTS_ELEMENTS.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewStrictArguments()

static Handle<JSObject> v8::internal::NewStrictArguments ( Isolate isolate,
Handle< JSFunction callee,
Object **  parameters,
int  argument_count 
)
static

Definition at line 3417 of file runtime.cc.

3420  {
3421  Handle<JSObject> result =
3422  isolate->factory()->NewArgumentsObject(callee, argument_count);
3423 
3424  if (argument_count > 0) {
3425  Handle<FixedArray> array =
3426  isolate->factory()->NewUninitializedFixedArray(argument_count);
3427  DisallowHeapAllocation no_gc;
3428  WriteBarrierMode mode = array->GetWriteBarrierMode(no_gc);
3429  for (int i = 0; i < argument_count; i++) {
3430  array->set(i, *--parameters, mode);
3431  }
3432  result->set_elements(*array);
3433  }
3434  return result;
3435 }

References v8::internal::Isolate::factory(), and mode().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeChar()

char v8::internal::NormalizeChar ( char  ch)
inline

Definition at line 258 of file flags.cc.

258  {
259  return ch == '_' ? '-' : ch;
260 }

Referenced by EqualNames(), and SplitArgument().

+ Here is the caller graph for this function:

◆ NormalizedExponent()

static int v8::internal::NormalizedExponent ( uint64_t  significand,
int  exponent 
)
static

Definition at line 19 of file bignum-dtoa.cc.

19  {
20  DCHECK(significand != 0);
21  while ((significand & Double::kHiddenBit) == 0) {
22  significand = significand << 1;
23  exponent = exponent - 1;
24  }
25  return exponent;
26 }

References DCHECK, and v8::internal::Double::kHiddenBit.

Referenced by BignumDtoa().

+ Here is the caller graph for this function:

◆ NumberCacheHash()

static int v8::internal::NumberCacheHash ( Handle< FixedArray cache,
Handle< Object number 
)
inlinestatic

Definition at line 2000 of file factory.cc.

2001  {
2002  int mask = (cache->length() >> 1) - 1;
2003  if (number->IsSmi()) {
2004  return Handle<Smi>::cast(number)->value() & mask;
2005  } else {
2006  DoubleRepresentation rep(number->Number());
2007  return
2008  (static_cast<int>(rep.bits) ^ static_cast<int>(rep.bits >> 32)) & mask;
2009  }
2010 }

References v8::internal::DoubleRepresentation::bits, and v8::internal::Handle< T >::cast().

+ Here is the call graph for this function:

◆ NumberOfBitsSet()

int v8::internal::NumberOfBitsSet ( uint32_t  x)
inline

Definition at line 1073 of file assembler.h.

1073  {
1074  unsigned int num_bits_set;
1075  for (num_bits_set = 0; x; x >>= 1) {
1076  num_bits_set += x & 1;
1077  }
1078  return num_bits_set;
1079 }

◆ NumberToInt32()

int32_t v8::internal::NumberToInt32 ( Object number)
inline

Definition at line 189 of file conversions.h.

189  {
190  if (number->IsSmi()) return Smi::cast(number)->value();
191  return DoubleToInt32(number->Number());
192 }

References DoubleToInt32(), and v8::internal::Object::Number().

Referenced by JoinSparseArrayWithSeparator(), RUNTIME_FUNCTION(), and v8::internal::JSArray::SetElementsLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NumberToSize()

size_t v8::internal::NumberToSize ( Isolate isolate,
Object number 
)
inline

Definition at line 233 of file conversions.h.

234  {
235  size_t result = 0;
236  bool is_valid = TryNumberToSize(isolate, number, &result);
237  CHECK(is_valid);
238  return result;
239 }

References CHECK, and TryNumberToSize().

Referenced by DataViewGetValue(), DataViewSetValue(), v8::internal::V8HeapExplorer::ExtractJSArrayBufferReferences(), v8::internal::Runtime::FreeArrayBuffer(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NumberToUint32()

uint32_t v8::internal::NumberToUint32 ( Object number)
inline

Definition at line 195 of file conversions.h.

195  {
196  if (number->IsSmi()) return Smi::cast(number)->value();
197  return DoubleToUint32(number->Number());
198 }

References DoubleToUint32(), and v8::internal::Object::Number().

Referenced by HeapSortPairs(), InsertionSortPairs(), PatchIncrementalMarkingRecordWriteStubs(), v8::internal::JSObject::PrepareSlowElementsForSort(), RUNTIME_FUNCTION(), v8::internal::JSArray::SetElementsLength(), and v8::internal::FixedArray::SortPairs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NumberValueAsInteger32()

c_left v8::internal::NumberValueAsInteger32 ( ) -> NumberValueAsInteger32() & 0x1f)) HInstruction* HShr::New( Zone* zone, HValue* context, HValue* left, HValue* right)

Definition at line 4387 of file hydrogen-instructions.cc.

4393  {
4394  if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) {
4395  HConstant* c_left = HConstant::cast(left);
4396  HConstant* c_right = HConstant::cast(right);
4397  if ((c_left->HasNumberValue() && c_right->HasNumberValue())) {
4398  int32_t left_val = c_left->NumberValueAsInteger32();
4399  int32_t right_val = c_right->NumberValueAsInteger32() & 0x1f;
4400  if ((right_val == 0) && (left_val < 0)) {
4401  return H_CONSTANT_DOUBLE(static_cast<uint32_t>(left_val));
4402  }
4403  return H_CONSTANT_INT(static_cast<uint32_t>(left_val) >> right_val);
4404  }
4405  }
4406  return new(zone) HShr(context, left, right);
4407 }
#define H_CONSTANT_DOUBLE(val)
#define H_CONSTANT_INT(val)

References H_CONSTANT_DOUBLE, and H_CONSTANT_INT.

◆ NumRegs()

int v8::internal::NumRegs ( RegList  reglist)

Definition at line 1582 of file frames.cc.

1582 { return base::bits::CountPopulation32(reglist); }
uint32_t CountPopulation32(uint32_t value)
Definition: bits.h:22

References v8::base::bits::CountPopulation32().

+ Here is the call graph for this function:

◆ ObjectAddressForHashing()

static uint32_t v8::internal::ObjectAddressForHashing ( Object object)
inlinestatic

Definition at line 9013 of file objects.cc.

9013  {
9014  uint32_t value = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(object));
9015  return value & MemoryChunk::kAlignmentMask;
9016 }
static const uintptr_t kAlignmentMask
Definition: api.cc:4260

References v8::internal::MemoryChunk::kAlignmentMask.

Referenced by v8::internal::Map::Hash().

+ Here is the caller graph for this function:

◆ OneByteVector() [1/2]

Vector<const uint8_t> v8::internal::OneByteVector ( const char *  data)
inline

Definition at line 166 of file vector.h.

166  {
167  return OneByteVector(data, StrLength(data));
168 }
Vector< const uint8_t > OneByteVector(const char *data)
Definition: vector.h:166

References OneByteVector(), and StrLength().

+ Here is the call graph for this function:

◆ OneByteVector() [2/2]

Vector<const uint8_t> v8::internal::OneByteVector ( const char *  data,
int  length 
)
inline

Definition at line 162 of file vector.h.

162  {
163  return Vector<const uint8_t>(reinterpret_cast<const uint8_t*>(data), length);
164 }

Referenced by v8::internal::Heap::CreateInitialObjects(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::NewStringFromAsciiChecked(), and OneByteVector().

+ Here is the caller graph for this function:

◆ operator<() [1/2]

bool v8::internal::operator< ( const FunctionSorter lhs,
const FunctionSorter rhs 
)
inline

Definition at line 7501 of file hydrogen.cc.

7501  {
7502  int diff = lhs.ticks() - rhs.ticks();
7503  if (diff != 0) return diff > 0;
7504  return lhs.size() < rhs.size();
7505 }

References v8::internal::FunctionSorter::size(), and v8::internal::FunctionSorter::ticks().

+ Here is the call graph for this function:

◆ operator<() [2/2]

bool v8::internal::operator< ( const Handle< Map > &  lhs,
const Handle< Map > &  rhs 
)
inline

Definition at line 159 of file handles.h.

159  {
160  // This is safe because maps don't move.
161  return *lhs < *rhs;
162 }

◆ operator<<() [1/25]

OStream & v8::internal::operator<< ( OStream os,
const AsReversiblyEscapedUC16 c 
)

Definition at line 181 of file ostreams.cc.

181  {
182  return PrintUC16(os, c.value, IsOK);
183 }
static bool IsOK(uint16_t c)
Definition: ostreams.cc:170
static OStream & PrintUC16(OStream &os, uint16_t c, bool(*pred)(uint16_t))
Definition: ostreams.cc:173

References IsOK(), PrintUC16(), and v8::internal::AsReversiblyEscapedUC16::value.

+ Here is the call graph for this function:

◆ operator<<() [2/25]

OStream & v8::internal::operator<< ( OStream os,
const AsUC16 c 
)

Definition at line 186 of file ostreams.cc.

186  {
187  return PrintUC16(os, c.value, IsPrint);
188 }

References IsPrint(), PrintUC16(), and v8::internal::AsUC16::value.

+ Here is the call graph for this function:

◆ operator<<() [3/25]

OStream & v8::internal::operator<< ( OStream os,
const BasicBlockProfiler p 
)

Definition at line 80 of file basic-block-profiler.cc.

80  {
81  os << "---- Start Profiling Data ----" << endl;
82  typedef BasicBlockProfiler::DataList::const_iterator iterator;
83  for (iterator i = p.data_list_.begin(); i != p.data_list_.end(); ++i) {
84  os << **i;
85  }
86  os << "---- End Profiling Data ----" << endl;
87  return os;
88 }

◆ operator<<() [4/25]

OStream & v8::internal::operator<< ( OStream os,
const BasicBlockProfiler::Data d 
)

Definition at line 91 of file basic-block-profiler.cc.

91  {
92  const char* name = "unknown function";
93  if (!d.function_name_.empty()) {
94  name = d.function_name_.c_str();
95  }
96  if (!d.schedule_.empty()) {
97  os << "schedule for " << name << endl;
98  os << d.schedule_.c_str() << endl;
99  }
100  os << "block counts for " << name << ":" << endl;
101  for (size_t i = 0; i < d.n_blocks_; ++i) {
102  os << "block " << d.block_ids_[i] << " : " << d.counts_[i] << endl;
103  }
104  os << endl;
105  if (!d.code_.empty()) {
106  os << d.code_.c_str() << endl;
107  }
108  return os;
109 }

◆ operator<<() [5/25]

OStream & v8::internal::operator<< ( OStream os,
const BinaryOpICState &  s 
)

Definition at line 311 of file ic-state.cc.

311  {
312  os << "(" << Token::Name(s.op_);
313  if (s.mode_ == OVERWRITE_LEFT)
314  os << "_ReuseLeft";
315  else if (s.mode_ == OVERWRITE_RIGHT)
316  os << "_ReuseRight";
317  if (s.CouldCreateAllocationMementos()) os << "_CreateAllocationMementos";
318  os << ":" << BinaryOpICState::KindToString(s.left_kind_) << "*";
319  if (s.fixed_right_arg_.has_value) {
320  os << s.fixed_right_arg_.value;
321  } else {
322  os << BinaryOpICState::KindToString(s.right_kind_);
323  }
324  return os << "->" << BinaryOpICState::KindToString(s.result_kind_) << ")";
325 }

◆ operator<<() [6/25]

OStream & v8::internal::operator<< ( OStream os,
const Brief v 
)

Definition at line 918 of file objects.cc.

918  {
919  if (v.value->IsSmi()) {
920  Smi::cast(v.value)->SmiPrint(os);
921  } else {
922  // TODO(svenpanne) Const-correct HeapObjectShortPrint!
923  HeapObject* obj = const_cast<HeapObject*>(HeapObject::cast(v.value));
924  obj->HeapObjectShortPrint(os);
925  }
926  return os;
927 }

References v8::internal::HeapObject::HeapObjectShortPrint(), and v8::internal::Brief::value.

+ Here is the call graph for this function:

◆ operator<<() [7/25]

OStream & v8::internal::operator<< ( OStream os,
const CallICState &  s 
)

Definition at line 31 of file ic-state.cc.

31  {
32  return os << "(args(" << s.arg_count() << "), "
33  << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION")
34  << ", ";
35 }

◆ operator<<() [8/25]

OStream & v8::internal::operator<< ( OStream os,
const ChangesOf c 
)

Definition at line 542 of file hydrogen-instructions.cc.

542  {
543  GVNFlagSet changes_flags = c.value->ChangesFlags();
544  if (changes_flags.IsEmpty()) return os;
545  os << " changes[";
546  if (changes_flags == c.value->AllSideEffectsFlagSet()) {
547  os << "*";
548  } else {
549  bool add_comma = false;
550 #define PRINT_DO(Type) \
551  if (changes_flags.Contains(k##Type)) { \
552  if (add_comma) os << ","; \
553  add_comma = true; \
554  os << #Type; \
555  }
558 #undef PRINT_DO
559  }
560  return os << "]";
561 }
#define PRINT_DO(Type)
EnumSet< GVNFlag, int32_t > GVNFlagSet

◆ operator<<() [9/25]

OStream & v8::internal::operator<< ( OStream os,
const CompareNilICStub::State s 
)

Definition at line 501 of file code-stubs.cc.

501  {
502  os << "(";
503  SimpleListPrinter p(os);
504  if (s.IsEmpty()) p.Add("None");
505  if (s.Contains(CompareNilICStub::UNDEFINED)) p.Add("Undefined");
506  if (s.Contains(CompareNilICStub::NULL_TYPE)) p.Add("Null");
507  if (s.Contains(CompareNilICStub::MONOMORPHIC_MAP)) p.Add("MonomorphicMap");
508  if (s.Contains(CompareNilICStub::GENERIC)) p.Add("Generic");
509  return os << ")";
510 }

◆ operator<<() [10/25]

OStream & v8::internal::operator<< ( OStream os,
const Descriptor d 
)

Definition at line 34 of file property.cc.

34  {
35  return os << "Descriptor " << Brief(*d.GetKey()) << " @ "
36  << Brief(*d.GetValue());
37 }

◆ operator<<() [11/25]

OStream& v8::internal::operator<< ( OStream os,
const Flag &  flag 
)

Definition at line 184 of file flags.cc.

184  { // NOLINT
185  switch (flag.type()) {
186  case Flag::TYPE_BOOL:
187  os << (*flag.bool_variable() ? "true" : "false");
188  break;
189  case Flag::TYPE_MAYBE_BOOL:
190  os << (flag.maybe_bool_variable()->has_value
191  ? (flag.maybe_bool_variable()->value ? "true" : "false")
192  : "unset");
193  break;
194  case Flag::TYPE_INT:
195  os << *flag.int_variable();
196  break;
197  case Flag::TYPE_FLOAT:
198  os << *flag.float_variable();
199  break;
200  case Flag::TYPE_STRING: {
201  const char* str = flag.string_value();
202  os << (str ? str : "NULL");
203  break;
204  }
205  case Flag::TYPE_ARGS: {
206  JSArguments args = *flag.args_variable();
207  if (args.argc > 0) {
208  os << args[0];
209  for (int i = 1; i < args.argc; i++) {
210  os << args[i];
211  }
212  }
213  break;
214  }
215  }
216  return os;
217 }
kFeedbackVectorOffset flag
Definition: objects-inl.h:5418

References flag.

◆ operator<<() [12/25]

OStream & v8::internal::operator<< ( OStream os,
const HBasicBlock &  b 
)

Definition at line 3411 of file hydrogen.cc.

3411  {
3412  return os << "B" << b.block_id();
3413 }

◆ operator<<() [13/25]

OStream & v8::internal::operator<< ( OStream os,
const HEnvironment &  env 
)

Definition at line 12170 of file hydrogen.cc.

12170  {
12171  for (int i = 0; i < env.length(); i++) {
12172  if (i == 0) os << "parameters\n";
12173  if (i == env.parameter_count()) os << "specials\n";
12174  if (i == env.parameter_count() + env.specials_count()) os << "locals\n";
12175  if (i == env.parameter_count() + env.specials_count() + env.local_count()) {
12176  os << "expressions\n";
12177  }
12178  HValue* val = env.values()->at(i);
12179  os << i << ": ";
12180  if (val != NULL) {
12181  os << val;
12182  } else {
12183  os << "NULL";
12184  }
12185  os << "\n";
12186  }
12187  return os << "\n";
12188 }

References NULL.

◆ operator<<() [14/25]

OStream & v8::internal::operator<< ( OStream os,
const HObjectAccess &  access 
)

Definition at line 4749 of file hydrogen-instructions.cc.

4749  {
4750  os << ".";
4751 
4752  switch (access.portion()) {
4753  case HObjectAccess::kArrayLengths:
4754  case HObjectAccess::kStringLengths:
4755  os << "%length";
4756  break;
4757  case HObjectAccess::kElementsPointer:
4758  os << "%elements";
4759  break;
4760  case HObjectAccess::kMaps:
4761  os << "%map";
4762  break;
4763  case HObjectAccess::kDouble: // fall through
4764  case HObjectAccess::kInobject:
4765  if (!access.name().is_null()) {
4766  os << Handle<String>::cast(access.name())->ToCString().get();
4767  }
4768  os << "[in-object]";
4769  break;
4770  case HObjectAccess::kBackingStore:
4771  if (!access.name().is_null()) {
4772  os << Handle<String>::cast(access.name())->ToCString().get();
4773  }
4774  os << "[backing-store]";
4775  break;
4776  case HObjectAccess::kExternalMemory:
4777  os << "[external-memory]";
4778  break;
4779  }
4780 
4781  return os << "@" << access.offset();
4782 }

◆ operator<<() [15/25]

OStream & v8::internal::operator<< ( OStream os,
const HSourcePosition p 
)

Definition at line 621 of file hydrogen-instructions.cc.

621  {
622  if (p.IsUnknown()) {
623  return os << "<?>";
624  } else if (FLAG_hydrogen_track_positions) {
625  return os << "<" << p.inlining_id() << ":" << p.position() << ">";
626  } else {
627  return os << "<0:" << p.raw() << ">";
628  }
629 }

References v8::internal::HSourcePosition::inlining_id(), v8::internal::HSourcePosition::IsUnknown(), v8::internal::HSourcePosition::position(), and v8::internal::HSourcePosition::raw().

+ Here is the call graph for this function:

◆ operator<<() [16/25]

OStream & v8::internal::operator<< ( OStream os,
const HType &  t 
)

Definition at line 59 of file hydrogen-types.cc.

59  {
60  // Note: The c1visualizer syntax for locals allows only a sequence of the
61  // following characters: A-Za-z0-9_-|:
62  switch (t.kind_) {
63 #define DEFINE_CASE(Name, mask) \
64  case HType::k##Name: \
65  return os << #Name;
67 #undef DEFINE_CASE
68  }
69  UNREACHABLE();
70  return os;
71 }
#define DEFINE_CASE(Name, mask)
#define HTYPE_LIST(V)

◆ operator<<() [17/25]

OStream & v8::internal::operator<< ( OStream os,
const HValue v 
)

Definition at line 531 of file hydrogen-instructions.cc.

531 { return v.PrintTo(os); }

References v8::internal::HValue::PrintTo().

+ Here is the call graph for this function:

◆ operator<<() [18/25]

OStream & v8::internal::operator<< ( OStream os,
const LookupResult &  r 
)

Definition at line 23 of file property.cc.

23  {
24  if (!r.IsFound()) return os << "Not Found\n";
25 
26  os << "LookupResult:\n";
27  if (r.IsTransition()) {
28  os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n";
29  }
30  return os;
31 }

◆ operator<<() [19/25]

OStream & v8::internal::operator<< ( OStream os,
const NameOf v 
)

Definition at line 915 of file hydrogen-instructions.cc.

915  {
916  return os << v.value->representation().Mnemonic() << v.value->id();
917 }

References v8::internal::HValue::id(), v8::internal::Representation::Mnemonic(), v8::internal::HValue::representation(), and v8::internal::NameOf::value.

+ Here is the call graph for this function:

◆ operator<<() [20/25]

OStream & v8::internal::operator<< ( OStream os,
const SourceCodeOf v 
)

Definition at line 9822 of file objects.cc.

9822  {
9823  const SharedFunctionInfo* s = v.value;
9824  // For some native functions there is no source.
9825  if (!s->HasSourceCode()) return os << "<No Source>";
9826 
9827  // Get the source for the script which this function came from.
9828  // Don't use String::cast because we don't want more assertion errors while
9829  // we are already creating a stack dump.
9830  String* script_source =
9831  reinterpret_cast<String*>(Script::cast(s->script())->source());
9832 
9833  if (!script_source->LooksValid()) return os << "<Invalid Source>";
9834 
9835  if (!s->is_toplevel()) {
9836  os << "function ";
9837  Object* name = s->name();
9838  if (name->IsString() && String::cast(name)->length() > 0) {
9839  String::cast(name)->PrintUC16(os);
9840  }
9841  }
9842 
9843  int len = s->end_position() - s->start_position();
9844  if (len <= v.max_length || v.max_length < 0) {
9845  script_source->PrintUC16(os, s->start_position(), s->end_position());
9846  return os;
9847  } else {
9848  script_source->PrintUC16(os, s->start_position(),
9849  s->start_position() + v.max_length);
9850  return os << "...\n";
9851  }
9852 }

References v8::internal::SharedFunctionInfo::end_position(), v8::internal::SharedFunctionInfo::HasSourceCode(), v8::internal::String::LooksValid(), v8::internal::SourceCodeOf::max_length, name, v8::internal::String::PrintUC16(), v8::internal::SharedFunctionInfo::start_position(), and v8::internal::SourceCodeOf::value.

+ Here is the call graph for this function:

◆ operator<<() [21/25]

OStream & v8::internal::operator<< ( OStream os,
const ToBooleanStub::Types s 
)

Definition at line 851 of file code-stubs.cc.

851  {
852  os << "(";
853  SimpleListPrinter p(os);
854  if (s.IsEmpty()) p.Add("None");
855  if (s.Contains(ToBooleanStub::UNDEFINED)) p.Add("Undefined");
856  if (s.Contains(ToBooleanStub::BOOLEAN)) p.Add("Bool");
857  if (s.Contains(ToBooleanStub::NULL_TYPE)) p.Add("Null");
858  if (s.Contains(ToBooleanStub::SMI)) p.Add("Smi");
859  if (s.Contains(ToBooleanStub::SPEC_OBJECT)) p.Add("SpecObject");
860  if (s.Contains(ToBooleanStub::STRING)) p.Add("String");
861  if (s.Contains(ToBooleanStub::SYMBOL)) p.Add("Symbol");
862  if (s.Contains(ToBooleanStub::HEAP_NUMBER)) p.Add("HeapNumber");
863  return os << ")";
864 }

References v8::internal::SimpleListPrinter::Add(), v8::internal::ToBooleanStub::BOOLEAN, v8::internal::EnumSet< E, T >::Contains(), v8::internal::ToBooleanStub::HEAP_NUMBER, v8::internal::EnumSet< E, T >::IsEmpty(), v8::internal::ToBooleanStub::NULL_TYPE, v8::internal::ToBooleanStub::SMI, v8::internal::ToBooleanStub::SPEC_OBJECT, v8::internal::ToBooleanStub::STRING, v8::internal::ToBooleanStub::SYMBOL, and v8::internal::ToBooleanStub::UNDEFINED.

+ Here is the call graph for this function:

◆ operator<<() [22/25]

OStream & v8::internal::operator<< ( OStream os,
const TrackedEffects te 
)

Definition at line 403 of file hydrogen-gvn.cc.

403  {
404  SideEffectsTracker* t = te.tracker;
405  const char* separator = "";
406  os << "[";
407  for (int bit = 0; bit < kNumberOfFlags; ++bit) {
408  GVNFlag flag = GVNFlagFromInt(bit);
409  if (te.effects.ContainsFlag(flag)) {
410  os << separator;
411  separator = ", ";
412  switch (flag) {
413 #define DECLARE_FLAG(Type) \
414  case k##Type: \
415  os << #Type; \
416  break;
419 #undef DECLARE_FLAG
420  default:
421  break;
422  }
423  }
424  }
425  for (int index = 0; index < t->num_global_vars_; ++index) {
426  if (te.effects.ContainsSpecial(t->GlobalVar(index))) {
427  os << separator << "[" << *t->global_vars_[index].handle() << "]";
428  separator = ", ";
429  }
430  }
431  for (int index = 0; index < t->num_inobject_fields_; ++index) {
432  if (te.effects.ContainsSpecial(t->InobjectField(index))) {
433  os << separator << t->inobject_fields_[index];
434  separator = ", ";
435  }
436  }
437  os << "]";
438  return os;
439 }
#define DECLARE_FLAG(Type)
static GVNFlag GVNFlagFromInt(int i)

◆ operator<<() [23/25]

OStream & v8::internal::operator<< ( OStream os,
const TypeOf t 
)

Definition at line 534 of file hydrogen-instructions.cc.

534  {
535  if (t.value->representation().IsTagged() &&
536  !t.value->type().Equals(HType::Tagged()))
537  return os;
538  return os << " type:" << t.value->type();
539 }

References v8::internal::Representation::IsTagged(), v8::internal::HValue::representation(), v8::internal::HValue::type(), and v8::internal::TypeOf::value.

+ Here is the call graph for this function:

◆ operator<<() [24/25]

std::ostream& v8::internal::operator<< ( std::ostream &  os,
const ExternalReference &  value 
)
inline

Definition at line 25 of file graph-unittest.cc.

26  {
27  OStringStream ost;
28  compiler::StaticParameterTraits<ExternalReference>::PrintTo(ost, value);
29  return os << ost.c_str();
30 }

References v8::internal::OStringStream::c_str(), and v8::internal::compiler::StaticParameterTraits< T >::PrintTo().

+ Here is the call graph for this function:

◆ operator<<() [25/25]

template<typename T >
std::ostream& v8::internal::operator<< ( std::ostream &  os,
const Unique< T > &  value 
)
inline

Definition at line 22 of file graph-unittest.cc.

22  {
23  return os << *value.handle();
24 }

References v8::internal::Unique< T >::handle().

+ Here is the call graph for this function:

◆ OptimizeGraph()

static LChunk* v8::internal::OptimizeGraph ( HGraph *  graph)
static

Definition at line 17 of file code-stubs-hydrogen.cc.

17  {
18  DisallowHeapAllocation no_allocation;
19  DisallowHandleAllocation no_handles;
21 
22  DCHECK(graph != NULL);
23  BailoutReason bailout_reason = kNoReason;
24  if (!graph->Optimize(&bailout_reason)) {
25  FATAL(GetBailoutReason(bailout_reason));
26  }
27  LChunk* chunk = LChunk::NewChunk(graph);
28  if (chunk == NULL) {
29  FATAL(GetBailoutReason(graph->info()->bailout_reason()));
30  }
31  return chunk;
32 }
#define FATAL(msg)
Definition: logging.h:26
PerThreadAssertScopeDebugOnly< HANDLE_DEREFERENCE_ASSERT, false > DisallowHandleDereference
Definition: assert-scope.h:118
PerThreadAssertScopeDebugOnly< HANDLE_ALLOCATION_ASSERT, false > DisallowHandleAllocation
Definition: assert-scope.h:102

References DCHECK, FATAL, GetBailoutReason(), v8::internal::LChunk::NewChunk(), and NULL.

Referenced by DoGenerateCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OwnPrototypeChainLength()

static int v8::internal::OwnPrototypeChainLength ( JSObject obj)
static

Definition at line 2844 of file runtime.cc.

2844  {
2845  int count = 1;
2846  for (PrototypeIterator iter(obj->GetIsolate(), obj);
2847  !iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN); iter.Advance()) {
2848  count++;
2849  }
2850  return count;
2851 }

References v8::internal::PrototypeIterator::END_AT_NON_HIDDEN, v8::internal::HeapObject::GetIsolate(), and v8::internal::PrototypeIterator::IsAtEnd().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParameterIsShadowedByContextLocal()

static bool v8::internal::ParameterIsShadowedByContextLocal ( Handle< ScopeInfo info,
Handle< String parameter_name 
)
static

Definition at line 6079 of file runtime.cc.

6080  {
6082  InitializationFlag init_flag;
6083  MaybeAssignedFlag maybe_assigned_flag;
6084  return ScopeInfo::ContextSlotIndex(info, parameter_name, &mode, &init_flag,
6085  &maybe_assigned_flag) != -1;
6086 }
InitializationFlag
Definition: globals.h:751

References v8::internal::ScopeInfo::ContextSlotIndex(), and mode().

Referenced by MaterializeStackLocalsWithFrameInspector(), and UpdateStackLocalsFromMaterializedObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseDecimalInteger()

static int v8::internal::ParseDecimalInteger ( const uint8_t *  s,
int  from,
int  to 
)
static

Definition at line 125 of file runtime-numbers.cc.

125  {
126  DCHECK(to - from < 10); // Overflow is not possible.
127  DCHECK(from < to);
128  int d = s[from] - '0';
129 
130  for (int i = from + 1; i < to; i++) {
131  d = 10 * d + (s[i] - '0');
132  }
133 
134  return d;
135 }

References DCHECK, and to().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PatchIncrementalMarkingRecordWriteStubs()

static void v8::internal::PatchIncrementalMarkingRecordWriteStubs ( Heap heap,
RecordWriteStub::Mode  mode 
)
static

Definition at line 463 of file incremental-marking.cc.

464  {
465  UnseededNumberDictionary* stubs = heap->code_stubs();
466 
467  int capacity = stubs->Capacity();
468  for (int i = 0; i < capacity; i++) {
469  Object* k = stubs->KeyAt(i);
470  if (stubs->IsKey(k)) {
471  uint32_t key = NumberToUint32(k);
472 
473  if (CodeStub::MajorKeyFromKey(key) == CodeStub::RecordWrite) {
474  Object* e = stubs->ValueAt(i);
475  if (e->IsCode()) {
476  RecordWriteStub::Patch(Code::cast(e), mode);
477  }
478  }
479  }
480  }
481 }

References v8::internal::HashTable< Derived, Shape, Key >::Capacity(), v8::internal::HashTable< Derived, Shape, Key >::IsKey(), v8::internal::HashTable< Derived, Shape, Key >::KeyAt(), mode(), NumberToUint32(), v8::internal::RecordWriteStub::Patch(), and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

Referenced by v8::internal::IncrementalMarking::Abort(), v8::internal::IncrementalMarking::Finalize(), and v8::internal::IncrementalMarking::StartMarking().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PatchInlinedSmiCode()

void v8::internal::PatchInlinedSmiCode ( Address  address,
InlinedSmiCheck  check 
)

Referenced by v8::internal::CompareIC::Clear(), v8::internal::BinaryOpIC::Transition(), and v8::internal::CompareIC::UpdateCaches().

+ Here is the caller graph for this function:

◆ PatchPositionsInCode()

static Handle<Code> v8::internal::PatchPositionsInCode ( Handle< Code code,
Handle< JSArray position_change_array 
)
static

Definition at line 1372 of file liveedit.cc.

1374  {
1375  Isolate* isolate = code->GetIsolate();
1376 
1377  RelocInfoBuffer buffer_writer(code->relocation_size(),
1378  code->instruction_start());
1379 
1380  {
1381  for (RelocIterator it(*code); !it.done(); it.next()) {
1382  RelocInfo* rinfo = it.rinfo();
1383  if (RelocInfo::IsPosition(rinfo->rmode())) {
1384  int position = static_cast<int>(rinfo->data());
1385  int new_position = TranslatePosition(position,
1386  position_change_array);
1387  if (position != new_position) {
1388  RelocInfo info_copy(rinfo->pc(), rinfo->rmode(), new_position, NULL);
1389  buffer_writer.Write(&info_copy);
1390  continue;
1391  }
1392  }
1393  if (RelocInfo::IsRealRelocMode(rinfo->rmode())) {
1394  buffer_writer.Write(it.rinfo());
1395  }
1396  }
1397  }
1398 
1399  Vector<byte> buffer = buffer_writer.GetResult();
1400 
1401  if (buffer.length() == code->relocation_size()) {
1402  // Simply patch relocation area of code.
1403  MemCopy(code->relocation_start(), buffer.start(), buffer.length());
1404  return code;
1405  } else {
1406  // Relocation info section now has different size. We cannot simply
1407  // rewrite it inside code object. Instead we have to create a new
1408  // code object.
1409  Handle<Code> result(isolate->factory()->CopyCode(code, buffer));
1410  return result;
1411  }
1412 }
static int TranslatePosition(int original_position, Handle< JSArray > position_change_array)
Definition: liveedit.cc:1262

References v8::internal::RelocInfo::data(), v8::internal::RelocIterator::done(), v8::internal::Isolate::factory(), v8::internal::RelocInfoBuffer::GetResult(), v8::internal::RelocInfo::IsPosition(), v8::internal::RelocInfo::IsRealRelocMode(), v8::internal::Vector< T >::length(), MemCopy(), NULL, v8::internal::RelocInfo::pc(), v8::internal::RelocInfo::rmode(), v8::internal::Vector< T >::start(), TranslatePosition(), and v8::internal::RelocInfoBuffer::Write().

Referenced by v8::internal::LiveEdit::PatchFunctionPositions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PerformCompare() [1/2]

static Handle<Object> v8::internal::PerformCompare ( const BitmaskCompareDescriptor descriptor,
char *  ptr,
Isolate isolate 
)
static

Definition at line 243 of file objects.cc.

245  {
246  uint32_t bitmask = descriptor.bitmask;
247  uint32_t compare_value = descriptor.compare_value;
248  uint32_t value;
249  switch (descriptor.size) {
250  case 1:
251  value = static_cast<uint32_t>(*CheckedCast<uint8_t>(ptr));
252  compare_value &= 0xff;
253  bitmask &= 0xff;
254  break;
255  case 2:
256  value = static_cast<uint32_t>(*CheckedCast<uint16_t>(ptr));
257  compare_value &= 0xffff;
258  bitmask &= 0xffff;
259  break;
260  case 4:
261  value = *CheckedCast<uint32_t>(ptr);
262  break;
263  default:
264  UNREACHABLE();
265  return isolate->factory()->undefined_value();
266  }
267  return isolate->factory()->ToBoolean(
268  (bitmask & value) == (bitmask & compare_value));
269 }

References v8::internal::BitmaskCompareDescriptor::bitmask, v8::internal::BitmaskCompareDescriptor::compare_value, v8::internal::Isolate::factory(), v8::internal::BitmaskCompareDescriptor::size, and UNREACHABLE.

Referenced by GetDeclaredAccessorProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PerformCompare() [2/2]

static Handle<Object> v8::internal::PerformCompare ( const PointerCompareDescriptor descriptor,
char *  ptr,
Isolate isolate 
)
static

Definition at line 272 of file objects.cc.

274  {
275  uintptr_t compare_value =
276  reinterpret_cast<uintptr_t>(descriptor.compare_value);
277  uintptr_t value = *CheckedCast<uintptr_t>(ptr);
278  return isolate->factory()->ToBoolean(compare_value == value);
279 }

References v8::internal::PointerCompareDescriptor::compare_value, and v8::internal::Isolate::factory().

+ Here is the call graph for this function:

◆ PointersToHereCheckForObject()

PointersToHereCheck v8::internal::PointersToHereCheckForObject ( HValue object,
HValue dominator 
)
inline

Definition at line 5811 of file hydrogen-instructions.h.

5812  {
5813  while (object->IsInnerAllocatedObject()) {
5814  object = HInnerAllocatedObject::cast(object)->base_object();
5815  }
5816  if (object == dominator &&
5817  object->IsAllocate() &&
5818  HAllocate::cast(object)->IsNewSpaceAllocation()) {
5820  }
5822 }

References kPointersToHereAreAlwaysInteresting, and kPointersToHereMaybeInteresting.

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::PointersToHereCheckForValue().

+ Here is the caller graph for this function:

◆ PointerValueCompare()

template<typename T >
int v8::internal::PointerValueCompare ( const T a,
const T b 
)

Definition at line 107 of file utils.h.

107  {
108  return Compare<T>(*a, *b);
109 }

Referenced by v8::internal::ElementCmp< T >::operator()().

+ Here is the caller graph for this function:

◆ power_double_double()

double v8::internal::power_double_double ( double  x,
double  y 
)

Definition at line 1443 of file assembler.cc.

1443  {
1444 #if defined(__MINGW64_VERSION_MAJOR) && \
1445  (!defined(__MINGW64_VERSION_RC) || __MINGW64_VERSION_RC < 1)
1446  // MinGW64 has a custom implementation for pow. This handles certain
1447  // special cases that are different.
1448  if ((x == 0.0 || std::isinf(x)) && std::isfinite(y)) {
1449  double f;
1450  if (std::modf(y, &f) != 0.0) {
1451  return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
1452  }
1453  }
1454 
1455  if (x == 2.0) {
1456  int y_int = static_cast<int>(y);
1457  if (y == y_int) {
1458  return std::ldexp(1.0, y_int);
1459  }
1460  }
1461 #endif
1462 
1463  // The checks for special cases can be dropped in ia32 because it has already
1464  // been done in generated code before bailing out here.
1465  if (std::isnan(y) || ((x == 1 || x == -1) && std::isinf(y))) {
1466  return base::OS::nan_value();
1467  }
1468  return std::pow(x, y);
1469 }

References v8::base::OS::nan_value(), V8_INFINITY, and v8::base::internal::y.

Referenced by power_helper(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ power_double_int()

double v8::internal::power_double_int ( double  x,
int  y 
)

Definition at line 1428 of file assembler.cc.

1428  {
1429  double m = (y < 0) ? 1 / x : x;
1430  unsigned n = (y < 0) ? -y : y;
1431  double p = 1;
1432  while (n != 0) {
1433  if ((n & 1) != 0) p *= m;
1434  m *= m;
1435  if ((n & 2) != 0) p *= m;
1436  m *= m;
1437  n >>= 2;
1438  }
1439  return p;
1440 }

References v8::base::internal::y.

Referenced by power_helper(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ power_helper()

double v8::internal::power_helper ( double  x,
double  y 
)

Definition at line 1408 of file assembler.cc.

1408  {
1409  int y_int = static_cast<int>(y);
1410  if (y == y_int) {
1411  return power_double_int(x, y_int); // Returns 1 if exponent is 0.
1412  }
1413  if (y == 0.5) {
1414  return (std::isinf(x)) ? V8_INFINITY
1415  : fast_sqrt(x + 0.0); // Convert -0 to +0.
1416  }
1417  if (y == -0.5) {
1418  return (std::isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
1419  }
1420  return power_double_double(x, y);
1421 }
double power_double_int(double x, int y)
Definition: assembler.cc:1428
double fast_sqrt(double input)
double power_double_double(double x, double y)
Definition: assembler.cc:1443

References fast_sqrt(), power_double_double(), power_double_int(), V8_INFINITY, and v8::base::internal::y.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrepareLogFileName()

static void v8::internal::PrepareLogFileName ( OStream os,
Isolate isolate,
const char *  file_name 
)
static

Definition at line 1794 of file log.cc.

1795  {
1796  AddIsolateIdIfNeeded(os, isolate);
1797  for (const char* p = file_name; *p; p++) {
1798  if (*p == '%') {
1799  p++;
1800  switch (*p) {
1801  case '\0':
1802  // If there's a % at the end of the string we back up
1803  // one character so we can escape the loop properly.
1804  p--;
1805  break;
1806  case 'p':
1807  os << base::OS::GetCurrentProcessId();
1808  break;
1809  case 't':
1810  // %t expands to the current time in milliseconds.
1811  os << static_cast<int64_t>(base::OS::TimeCurrentMillis());
1812  break;
1813  case '%':
1814  // %% expands (contracts really) to %.
1815  os << '%';
1816  break;
1817  default:
1818  // All other %'s expand to themselves.
1819  os << '%' << *p;
1820  break;
1821  }
1822  } else {
1823  os << *p;
1824  }
1825  }
1826 }
static void AddIsolateIdIfNeeded(OStream &os, Isolate *isolate)
Definition: log.cc:1788

References AddIsolateIdIfNeeded(), v8::base::OS::GetCurrentProcessId(), and v8::base::OS::TimeCurrentMillis().

Referenced by v8::internal::Logger::SetUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintF() [1/2]

void PRINTF_CHECKING v8::internal::PrintF ( const char *  format,
  ... 
)

Definition at line 80 of file utils.cc.

80  {
81  va_list arguments;
82  va_start(arguments, format);
83  base::OS::VPrint(format, arguments);
84  va_end(arguments);
85 }

References v8::base::OS::VPrint().

Referenced by v8::internal::IncrementalMarking::Abort(), v8::internal::compiler::Schedule::AddNode(), v8::internal::OptimizingCompilerThread::AddToOsrBuffer(), v8::internal::RegExpMacroAssemblerTracer::AdvanceCurrentPosition(), v8::internal::RegExpMacroAssemblerTracer::AdvanceRegister(), v8::internal::Scope::Analyze(), v8::internal::HEscapeAnalysisPhase::AnalyzeDataFlow(), v8::internal::RuntimeProfiler::AttemptOnStackReplacement(), v8::internal::RegExpMacroAssemblerTracer::Backtrack(), v8::internal::RegExpMacroAssemblerTracer::Bind(), v8::internal::CodeStubGraphBuilderBase::BuildGraph(), CheckArrayAbuse(), v8::internal::RegExpMacroAssemblerTracer::CheckAtStart(), v8::internal::RegExpMacroAssemblerTracer::CheckBitInTable(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacter(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterGT(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterInRange(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterLT(), v8::internal::RegExpMacroAssemblerTracer::CheckCharacterNotInRange(), v8::internal::RegExpMacroAssemblerTracer::CheckGreedyLoop(), v8::internal::RegExpMacroAssemblerTracer::CheckNotAtStart(), v8::internal::RegExpMacroAssemblerTracer::CheckNotBackReference(), v8::internal::RegExpMacroAssemblerTracer::CheckNotBackReferenceIgnoreCase(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacter(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusAnd(), v8::internal::RegExpMacroAssemblerTracer::CheckSpecialCharacterClass(), v8::internal::RegExpMacroAssemblerTracer::ClearRegisters(), v8::internal::HEscapeAnalysisPhase::CollectCapturedValues(), v8::internal::MarkCompactCollector::CollectEvacuationCandidates(), v8::internal::Heap::CollectGarbage(), v8::internal::Compiler::CompileScript(), v8::internal::HCheckTable::Copy(), v8::internal::State::Copy(), v8::internal::OptimizedCompileJob::CreateGraph(), v8::internal::Parser::Declare(), v8::internal::Heap::decrement_scan_on_scavenge_pages(), v8::internal::MessageHandler::DefaultMessageReport(), v8::internal::Isolate::Deinit(), v8::internal::Deoptimizer::DeoptimizeAll(), v8::internal::Deoptimizer::DeoptimizeGlobalObject(), v8::internal::Deoptimizer::DeoptimizeMarkedCode(), v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), v8::internal::CodeSerializer::Deserialize(), v8::internal::AllocationSite::DigestPretenuringFeedback(), v8::internal::AllocationSite::DigestTransitionFeedback(), v8::internal::SharedFunctionInfo::DisableOptimization(), v8::internal::Interface::DoAdd(), v8::internal::Deoptimizer::DoComputeAccessorStubFrame(), v8::internal::Deoptimizer::DoComputeArgumentsAdaptorFrame(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), v8::internal::Deoptimizer::DoComputeConstructStubFrame(), v8::internal::Deoptimizer::DoComputeJSFrame(), v8::internal::Deoptimizer::DoComputeOutputFrames(), v8::internal::Isolate::DoThrow(), v8::internal::Deoptimizer::DoTranslateCommand(), v8::internal::Deoptimizer::DoTranslateObject(), v8::internal::Deoptimizer::DoTranslateObjectAndSkip(), v8::internal::MarkCompactCollector::EnableCodeFlushing(), v8::internal::AllocationSiteCreationContext::EnterNewScope(), v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), v8::internal::Heap::EvaluateOldSpaceLocalPretenuring(), v8::internal::CodeFlusher::EvictCandidate(), v8::internal::SharedFunctionInfo::EvictFromOptimizedCodeMap(), v8::internal::CodeFlusher::EvictOptimizedCodeMap(), v8::internal::AllocationSiteCreationContext::ExitScope(), v8::internal::ParserTraits::ExpressionFromIdentifier(), v8::internal::RegExpMacroAssemblerTracer::Fail(), v8::internal::HeapObjectsMap::FindOrAddEntry(), v8::internal::HeapObjectsMap::FindUntrackedObjects(), v8::internal::HCheckTable::Finish(), v8::internal::State::Finish(), v8::internal::Bitmap::CellPrinter::Flush(), v8::internal::OptimizingCompilerThread::Flush(), FreeListFragmentation(), v8::internal::RegExpMacroAssemblerTracer::GetCode(), GetCodeFromOptimizedCodeMap(), v8::internal::Compiler::GetConcurrentlyOptimizedCode(), SnapshotWriter::GetFileDescriptorOrDie(), GetOptimizedCodeLater(), GetOptimizedCodeNow(), v8::internal::RegExpMacroAssemblerTracer::GoTo(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HAllocate(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicCallNamed(), v8::internal::HEscapeAnalysisPhase::HasNoEscapingUses(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HStringAdd(), v8::internal::IncrementalMarking::Hurry(), v8::internal::Heap::IdleNotification(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterEqPos(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterGE(), v8::internal::RegExpMacroAssemblerTracer::IfRegisterLT(), v8::internal::Heap::increment_scan_on_scavenge_pages(), v8::internal::Isolate::Init(), v8::internal::Snapshot::Initialize(), v8::internal::MarkCompactCollector::INLINE(), v8::internal::OptimizingCompilerThread::InstallOptimizedFunctions(), v8::internal::Interface::Interface(), v8::internal::RegExpImpl::IrregexpExec(), v8::internal::RegExpMacroAssemblerTracer::LoadCurrentCharacter(), v8::internal::Context::Lookup(), v8::internal::CodeGenerator::MakeCodePrologue(), v8::internal::JSFunction::MarkForConcurrentOptimization(), v8::internal::IncrementalMarking::MarkingComplete(), v8::internal::JSFunction::MarkInOptimizationQueue(), v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame(), v8::internal::Deoptimizer::MaterializeHeapObjects(), v8::internal::Deoptimizer::MaterializeNextHeapObject(), SnapshotWriter::MaybeWriteRawFile(), SnapshotWriter::MaybeWriteStartupBlob(), v8::internal::HCheckTable::Merge(), v8::internal::State::Merge(), v8::internal::HeapObjectsMap::MoveObject(), v8::internal::Debug::NotifyMessageHandler(), v8::internal::RuntimeProfiler::Optimize(), v8::internal::RuntimeProfiler::OptimizeNow(), v8::internal::Parser::ParseExportDeclaration(), v8::internal::Parser::ParseImportDeclaration(), v8::internal::Parser::ParseLazy(), v8::internal::Parser::ParseModuleDeclaration(), v8::internal::Parser::ParseModuleLiteral(), v8::internal::Parser::ParseModulePath(), v8::internal::Parser::ParseModuleUrl(), v8::internal::Parser::ParseModuleVariable(), v8::internal::Parser::ParseProgram(), v8::internal::compiler::Schedule::PlanNode(), v8::internal::RegExpMacroAssemblerTracer::PopCurrentPosition(), v8::internal::RegExpMacroAssemblerTracer::PopRegister(), v8::internal::AddressToTraceMap::Print(), v8::internal::GCIdleTimeAction::Print(), v8::internal::Bitmap::Print(), v8::internal::HLoadEliminationTable::Print(), v8::internal::BASE_EMBEDDED< Visitor >::print(), v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::Print(), v8::internal::GCTracer::Print(), v8::internal::HCheckTable::Print(), v8::internal::Bitmap::CellPrinter::Print(), v8::internal::Heap::PrintAlloctionsHash(), v8::internal::Isolate::PrintCurrentStackTrace(), v8::internal::Code::PrintDeoptLocation(), v8::internal::JSObject::PrintElementsTransition(), v8::internal::JavaScriptFrame::PrintFunctionAndOffset(), v8::internal::Deoptimizer::PrintFunctionName(), v8::internal::JSObject::PrintInstanceMigration(), v8::internal::JSFunction::PrintName(), v8::internal::GCTracer::PrintNVP(), v8::internal::String::PrintOn(), v8::internal::JavaScriptFrame::PrintTop(), PrintTransition(), v8::internal::Bitmap::PrintWord(), v8::internal::State::Process(), v8::internal::CodeFlusher::ProcessJSFunctionCandidates(), v8::internal::Heap::ProcessPretenuringFeedback(), v8::internal::CodeFlusher::ProcessSharedFunctionInfoCandidates(), v8::internal::RegExpMacroAssemblerTracer::PushBacktrack(), v8::internal::RegExpMacroAssemblerTracer::PushCurrentPosition(), v8::internal::RegExpMacroAssemblerTracer::PushRegister(), v8::internal::DebugSnapshotSink::Put(), RawMatch(), v8::internal::RegExpMacroAssemblerTracer::ReadCurrentPositionFromRegister(), v8::internal::RegExpMacroAssemblerTracer::ReadStackPointerFromRegister(), v8::internal::OptimizedCompileJob::RecordOptimizationStats(), RedirectActivationsToRecompiledCodeOnThread(), v8::internal::RegExpMacroAssemblerTracer::RegExpMacroAssemblerTracer(), v8::internal::NewSpace::ReportStatistics(), v8::internal::HValue::RepresentationFromUses(), v8::internal::MemoryChunk::ResetLiveBytes(), v8::internal::Scope::ResolveVariable(), v8::internal::IncrementalMarking::RestartIfNotMarking(), v8::internal::HRepresentationChangesPhase::Run(), RUNTIME_FUNCTION(), v8::internal::SharedFunctionInfo::SearchOptimizedCodeMap(), v8::internal::CodeSerializer::Serialize(), v8::internal::CodeSerializer::SerializeBuiltin(), v8::internal::CodeSerializer::SerializeCodeStub(), v8::internal::CodeSerializer::SerializeHeapObject(), v8::internal::CodeSerializer::SerializeSourceObject(), v8::internal::RegExpMacroAssemblerTracer::SetCurrentPositionFromEnd(), v8::internal::FlagList::SetFlagsFromCommandLine(), v8::internal::DependentCode::SetMarkedForDeoptimization(), v8::internal::RegExpMacroAssemblerTracer::SetRegister(), v8::internal::AllocationSiteUsageContext::ShouldCreateMemento(), v8::internal::IncrementalMarking::Start(), v8::internal::IncrementalMarking::StartMarking(), v8::internal::OptimizingCompilerThread::Stop(), v8::internal::RegExpMacroAssemblerTracer::Succeed(), v8::internal::MarkCompactCollector::SweepSpace(), v8::internal::Heap::TearDown(), TraceFragmentation(), v8::internal::IC::TraceIC(), v8::internal::HOptimizedGraphBuilder::TraceInline(), TraceTopFrame(), v8::internal::HOptimizedGraphBuilder::TryInlineApiCall(), v8::internal::compiler::JSInliner::TryInlineCall(), v8::internal::Interface::Unify(), v8::internal::CompareIC::UpdateCaches(), v8::internal::HeapObjectsMap::UpdateHeapObjectsMap(), v8::internal::HValue::UpdateRepresentation(), v8::internal::RegExpMacroAssemblerTracer::WriteCurrentPositionToRegister(), SnapshotWriter::WriteData(), and v8::internal::RegExpMacroAssemblerTracer::WriteStackPointerToRegister().

+ Here is the call graph for this function:

◆ PrintF() [2/2]

void FPRINTF_CHECKING v8::internal::PrintF ( FILE *  out,
const char *  format,
  ... 
)

Definition at line 88 of file utils.cc.

88  {
89  va_list arguments;
90  va_start(arguments, format);
91  base::OS::VFPrint(out, format, arguments);
92  va_end(arguments);
93 }

References v8::base::OS::VFPrint().

+ Here is the call graph for this function:

◆ PrintFrames()

static void v8::internal::PrintFrames ( Isolate isolate,
StringStream *  accumulator,
StackFrame::PrintMode  mode 
)
static

Definition at line 577 of file isolate.cc.

579  {
580  StackFrameIterator it(isolate);
581  for (int i = 0; !it.done(); it.Advance()) {
582  it.frame()->Print(accumulator, mode, i++);
583  }
584 }

References v8::internal::StackFrameIterator::Advance(), v8::internal::StackFrameIterator::frame(), and mode().

Referenced by v8::internal::Isolate::PrintStack().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintPID()

void PRINTF_CHECKING v8::internal::PrintPID ( const char *  format,
  ... 
)

Definition at line 96 of file utils.cc.

96  {
97  base::OS::Print("[%d] ", base::OS::GetCurrentProcessId());
98  va_list arguments;
99  va_start(arguments, format);
100  base::OS::VPrint(format, arguments);
101  va_end(arguments);
102 }

References v8::base::OS::GetCurrentProcessId(), v8::base::OS::Print(), and v8::base::OS::VPrint().

Referenced by v8::internal::IncrementalMarking::BlackToGreyAndUnshift(), v8::internal::Heap::ConfigureHeap(), v8::internal::IncrementalMarking::NotifyOfHighPromotionRate(), v8::internal::GCTracer::Print(), v8::internal::GCTracer::PrintNVP(), v8::internal::Heap::PrintShortHeapStatistics(), and v8::internal::IncrementalMarking::SpeedUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintTransition()

static void v8::internal::PrintTransition ( Isolate isolate,
Object result 
)
static

Definition at line 4385 of file runtime.cc.

4385  {
4386  // indentation
4387  {
4388  const int nmax = 80;
4389  int n = StackSize(isolate);
4390  if (n <= nmax)
4391  PrintF("%4d:%*s", n, n, "");
4392  else
4393  PrintF("%4d:%*s", n, nmax, "...");
4394  }
4395 
4396  if (result == NULL) {
4397  JavaScriptFrame::PrintTop(isolate, stdout, true, false);
4398  PrintF(" {\n");
4399  } else {
4400  // function result
4401  PrintF("} -> ");
4402  result->ShortPrint();
4403  PrintF("\n");
4404  }
4405 }
static int StackSize(Isolate *isolate)
Definition: runtime.cc:4378

References NULL, PrintF(), v8::internal::JavaScriptFrame::PrintTop(), v8::internal::Object::ShortPrint(), and StackSize().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintUC16()

static OStream& v8::internal::PrintUC16 ( OStream os,
uint16_t  c,
bool(*)(uint16_t)  pred 
)
static

Definition at line 173 of file ostreams.cc.

173  {
174  char buf[10];
175  const char* format = pred(c) ? "%c" : (c <= 0xff) ? "\\x%02x" : "\\u%04x";
176  snprintf(buf, sizeof(buf), format, c);
177  return os << buf;
178 }

Referenced by operator<<().

+ Here is the caller graph for this function:

◆ PSEUDO_SMI_ACCESSORS_HI() [1/3]

kExpectedNofPropertiesOffset kFunctionTokenPositionOffset v8::internal::PSEUDO_SMI_ACCESSORS_HI ( SharedFunctionInfo  ,
compiler_hints  ,
kCompilerHintsOffset   
)

◆ PSEUDO_SMI_ACCESSORS_HI() [2/3]

v8::internal::PSEUDO_SMI_ACCESSORS_HI ( SharedFunctionInfo  ,
formal_parameter_count  ,
kFormalParameterCountOffset   
)

◆ PSEUDO_SMI_ACCESSORS_HI() [3/3]

kExpectedNofPropertiesOffset v8::internal::PSEUDO_SMI_ACCESSORS_HI ( SharedFunctionInfo  ,
start_position_and_type  ,
kStartPositionAndTypeOffset   
)

◆ PSEUDO_SMI_ACCESSORS_LO()

kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset v8::internal::PSEUDO_SMI_ACCESSORS_LO ( SharedFunctionInfo  ,
ast_node_count  ,
kAstNodeCountOffset   
)

◆ RangeContainsLatin1Equivalents()

static bool v8::internal::RangeContainsLatin1Equivalents ( CharacterRange  range)
inlinestatic

Definition at line 2773 of file jsregexp.cc.

2773  {
2774  // TODO(dcarney): this could be a lot more efficient.
2775  return range.Contains(0x39c) ||
2776  range.Contains(0x3bc) || range.Contains(0x178);
2777 }

References v8::internal::CharacterRange::Contains().

Referenced by v8::internal::CharacterRange::AddCaseEquivalents(), and RangesContainLatin1Equivalents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RangesContainLatin1Equivalents()

static bool v8::internal::RangesContainLatin1Equivalents ( ZoneList< CharacterRange > *  ranges)
static

Definition at line 2780 of file jsregexp.cc.

2780  {
2781  for (int i = 0; i < ranges->length(); i++) {
2782  // TODO(dcarney): this could be a lot more efficient.
2783  if (RangeContainsLatin1Equivalents(ranges->at(i))) return true;
2784  }
2785  return false;
2786 }
static bool RangeContainsLatin1Equivalents(CharacterRange range)
Definition: jsregexp.cc:2773

References v8::internal::List< T, AllocationPolicy >::at(), and RangeContainsLatin1Equivalents().

Referenced by v8::internal::TextNode::FilterOneByte().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rawbits_to_double()

static double v8::internal::rawbits_to_double ( uint64_t  bits)
inlinestatic

Definition at line 48 of file utils-arm64.h.

48  {
49  double value = 0.0;
50  memcpy(&value, &bits, 8);
51  return value;
52 }

Referenced by ToQuietNaN().

+ Here is the caller graph for this function:

◆ rawbits_to_float()

static float v8::internal::rawbits_to_float ( uint32_t  bits)
inlinestatic

Definition at line 41 of file utils-arm64.h.

41  {
42  float value = 0.0;
43  memcpy(&value, &bits, 4);
44  return value;
45 }

Referenced by ToQuietNaN().

+ Here is the caller graph for this function:

◆ RawMatch()

template<typename Char >
static RegExpImpl::IrregexpResult v8::internal::RawMatch ( Isolate isolate,
const byte code_base,
Vector< const Char >  subject,
int registers,
int  current,
uint32_t  current_char 
)
static

Definition at line 159 of file interpreter-irregexp.cc.

164  {
165  const byte* pc = code_base;
166  // BacktrackStack ensures that the memory allocated for the backtracking stack
167  // is returned to the system or cached if there is no stack being cached at
168  // the moment.
169  BacktrackStack backtrack_stack;
170  int* backtrack_stack_base = backtrack_stack.data();
171  int* backtrack_sp = backtrack_stack_base;
172  int backtrack_stack_space = backtrack_stack.max_size();
173 #ifdef DEBUG
174  if (FLAG_trace_regexp_bytecodes) {
175  PrintF("\n\nStart bytecode interpreter\n\n");
176  }
177 #endif
178  while (true) {
179  int32_t insn = Load32Aligned(pc);
180  switch (insn & BYTECODE_MASK) {
181  BYTECODE(BREAK)
182  UNREACHABLE();
183  return RegExpImpl::RE_FAILURE;
184  BYTECODE(PUSH_CP)
185  if (--backtrack_stack_space < 0) {
186  return RegExpImpl::RE_EXCEPTION;
187  }
188  *backtrack_sp++ = current;
189  pc += BC_PUSH_CP_LENGTH;
190  break;
191  BYTECODE(PUSH_BT)
192  if (--backtrack_stack_space < 0) {
193  return RegExpImpl::RE_EXCEPTION;
194  }
195  *backtrack_sp++ = Load32Aligned(pc + 4);
196  pc += BC_PUSH_BT_LENGTH;
197  break;
198  BYTECODE(PUSH_REGISTER)
199  if (--backtrack_stack_space < 0) {
200  return RegExpImpl::RE_EXCEPTION;
201  }
202  *backtrack_sp++ = registers[insn >> BYTECODE_SHIFT];
203  pc += BC_PUSH_REGISTER_LENGTH;
204  break;
205  BYTECODE(SET_REGISTER)
206  registers[insn >> BYTECODE_SHIFT] = Load32Aligned(pc + 4);
207  pc += BC_SET_REGISTER_LENGTH;
208  break;
209  BYTECODE(ADVANCE_REGISTER)
210  registers[insn >> BYTECODE_SHIFT] += Load32Aligned(pc + 4);
211  pc += BC_ADVANCE_REGISTER_LENGTH;
212  break;
213  BYTECODE(SET_REGISTER_TO_CP)
214  registers[insn >> BYTECODE_SHIFT] = current + Load32Aligned(pc + 4);
215  pc += BC_SET_REGISTER_TO_CP_LENGTH;
216  break;
217  BYTECODE(SET_CP_TO_REGISTER)
218  current = registers[insn >> BYTECODE_SHIFT];
219  pc += BC_SET_CP_TO_REGISTER_LENGTH;
220  break;
221  BYTECODE(SET_REGISTER_TO_SP)
222  registers[insn >> BYTECODE_SHIFT] =
223  static_cast<int>(backtrack_sp - backtrack_stack_base);
224  pc += BC_SET_REGISTER_TO_SP_LENGTH;
225  break;
226  BYTECODE(SET_SP_TO_REGISTER)
227  backtrack_sp = backtrack_stack_base + registers[insn >> BYTECODE_SHIFT];
228  backtrack_stack_space = backtrack_stack.max_size() -
229  static_cast<int>(backtrack_sp - backtrack_stack_base);
230  pc += BC_SET_SP_TO_REGISTER_LENGTH;
231  break;
232  BYTECODE(POP_CP)
233  backtrack_stack_space++;
234  --backtrack_sp;
235  current = *backtrack_sp;
236  pc += BC_POP_CP_LENGTH;
237  break;
238  BYTECODE(POP_BT)
239  backtrack_stack_space++;
240  --backtrack_sp;
241  pc = code_base + *backtrack_sp;
242  break;
243  BYTECODE(POP_REGISTER)
244  backtrack_stack_space++;
245  --backtrack_sp;
246  registers[insn >> BYTECODE_SHIFT] = *backtrack_sp;
247  pc += BC_POP_REGISTER_LENGTH;
248  break;
249  BYTECODE(FAIL)
250  return RegExpImpl::RE_FAILURE;
251  BYTECODE(SUCCEED)
252  return RegExpImpl::RE_SUCCESS;
253  BYTECODE(ADVANCE_CP)
254  current += insn >> BYTECODE_SHIFT;
255  pc += BC_ADVANCE_CP_LENGTH;
256  break;
257  BYTECODE(GOTO)
258  pc = code_base + Load32Aligned(pc + 4);
259  break;
260  BYTECODE(ADVANCE_CP_AND_GOTO)
261  current += insn >> BYTECODE_SHIFT;
262  pc = code_base + Load32Aligned(pc + 4);
263  break;
264  BYTECODE(CHECK_GREEDY)
265  if (current == backtrack_sp[-1]) {
266  backtrack_sp--;
267  backtrack_stack_space++;
268  pc = code_base + Load32Aligned(pc + 4);
269  } else {
270  pc += BC_CHECK_GREEDY_LENGTH;
271  }
272  break;
273  BYTECODE(LOAD_CURRENT_CHAR) {
274  int pos = current + (insn >> BYTECODE_SHIFT);
275  if (pos >= subject.length()) {
276  pc = code_base + Load32Aligned(pc + 4);
277  } else {
278  current_char = subject[pos];
279  pc += BC_LOAD_CURRENT_CHAR_LENGTH;
280  }
281  break;
282  }
283  BYTECODE(LOAD_CURRENT_CHAR_UNCHECKED) {
284  int pos = current + (insn >> BYTECODE_SHIFT);
285  current_char = subject[pos];
286  pc += BC_LOAD_CURRENT_CHAR_UNCHECKED_LENGTH;
287  break;
288  }
289  BYTECODE(LOAD_2_CURRENT_CHARS) {
290  int pos = current + (insn >> BYTECODE_SHIFT);
291  if (pos + 2 > subject.length()) {
292  pc = code_base + Load32Aligned(pc + 4);
293  } else {
294  Char next = subject[pos + 1];
295  current_char =
296  (subject[pos] | (next << (kBitsPerByte * sizeof(Char))));
297  pc += BC_LOAD_2_CURRENT_CHARS_LENGTH;
298  }
299  break;
300  }
301  BYTECODE(LOAD_2_CURRENT_CHARS_UNCHECKED) {
302  int pos = current + (insn >> BYTECODE_SHIFT);
303  Char next = subject[pos + 1];
304  current_char = (subject[pos] | (next << (kBitsPerByte * sizeof(Char))));
305  pc += BC_LOAD_2_CURRENT_CHARS_UNCHECKED_LENGTH;
306  break;
307  }
308  BYTECODE(LOAD_4_CURRENT_CHARS) {
309  DCHECK(sizeof(Char) == 1);
310  int pos = current + (insn >> BYTECODE_SHIFT);
311  if (pos + 4 > subject.length()) {
312  pc = code_base + Load32Aligned(pc + 4);
313  } else {
314  Char next1 = subject[pos + 1];
315  Char next2 = subject[pos + 2];
316  Char next3 = subject[pos + 3];
317  current_char = (subject[pos] |
318  (next1 << 8) |
319  (next2 << 16) |
320  (next3 << 24));
321  pc += BC_LOAD_4_CURRENT_CHARS_LENGTH;
322  }
323  break;
324  }
325  BYTECODE(LOAD_4_CURRENT_CHARS_UNCHECKED) {
326  DCHECK(sizeof(Char) == 1);
327  int pos = current + (insn >> BYTECODE_SHIFT);
328  Char next1 = subject[pos + 1];
329  Char next2 = subject[pos + 2];
330  Char next3 = subject[pos + 3];
331  current_char = (subject[pos] |
332  (next1 << 8) |
333  (next2 << 16) |
334  (next3 << 24));
335  pc += BC_LOAD_4_CURRENT_CHARS_UNCHECKED_LENGTH;
336  break;
337  }
338  BYTECODE(CHECK_4_CHARS) {
339  uint32_t c = Load32Aligned(pc + 4);
340  if (c == current_char) {
341  pc = code_base + Load32Aligned(pc + 8);
342  } else {
343  pc += BC_CHECK_4_CHARS_LENGTH;
344  }
345  break;
346  }
347  BYTECODE(CHECK_CHAR) {
348  uint32_t c = (insn >> BYTECODE_SHIFT);
349  if (c == current_char) {
350  pc = code_base + Load32Aligned(pc + 4);
351  } else {
352  pc += BC_CHECK_CHAR_LENGTH;
353  }
354  break;
355  }
356  BYTECODE(CHECK_NOT_4_CHARS) {
357  uint32_t c = Load32Aligned(pc + 4);
358  if (c != current_char) {
359  pc = code_base + Load32Aligned(pc + 8);
360  } else {
361  pc += BC_CHECK_NOT_4_CHARS_LENGTH;
362  }
363  break;
364  }
365  BYTECODE(CHECK_NOT_CHAR) {
366  uint32_t c = (insn >> BYTECODE_SHIFT);
367  if (c != current_char) {
368  pc = code_base + Load32Aligned(pc + 4);
369  } else {
370  pc += BC_CHECK_NOT_CHAR_LENGTH;
371  }
372  break;
373  }
374  BYTECODE(AND_CHECK_4_CHARS) {
375  uint32_t c = Load32Aligned(pc + 4);
376  if (c == (current_char & Load32Aligned(pc + 8))) {
377  pc = code_base + Load32Aligned(pc + 12);
378  } else {
379  pc += BC_AND_CHECK_4_CHARS_LENGTH;
380  }
381  break;
382  }
383  BYTECODE(AND_CHECK_CHAR) {
384  uint32_t c = (insn >> BYTECODE_SHIFT);
385  if (c == (current_char & Load32Aligned(pc + 4))) {
386  pc = code_base + Load32Aligned(pc + 8);
387  } else {
388  pc += BC_AND_CHECK_CHAR_LENGTH;
389  }
390  break;
391  }
392  BYTECODE(AND_CHECK_NOT_4_CHARS) {
393  uint32_t c = Load32Aligned(pc + 4);
394  if (c != (current_char & Load32Aligned(pc + 8))) {
395  pc = code_base + Load32Aligned(pc + 12);
396  } else {
397  pc += BC_AND_CHECK_NOT_4_CHARS_LENGTH;
398  }
399  break;
400  }
401  BYTECODE(AND_CHECK_NOT_CHAR) {
402  uint32_t c = (insn >> BYTECODE_SHIFT);
403  if (c != (current_char & Load32Aligned(pc + 4))) {
404  pc = code_base + Load32Aligned(pc + 8);
405  } else {
406  pc += BC_AND_CHECK_NOT_CHAR_LENGTH;
407  }
408  break;
409  }
410  BYTECODE(MINUS_AND_CHECK_NOT_CHAR) {
411  uint32_t c = (insn >> BYTECODE_SHIFT);
412  uint32_t minus = Load16Aligned(pc + 4);
413  uint32_t mask = Load16Aligned(pc + 6);
414  if (c != ((current_char - minus) & mask)) {
415  pc = code_base + Load32Aligned(pc + 8);
416  } else {
417  pc += BC_MINUS_AND_CHECK_NOT_CHAR_LENGTH;
418  }
419  break;
420  }
421  BYTECODE(CHECK_CHAR_IN_RANGE) {
422  uint32_t from = Load16Aligned(pc + 4);
423  uint32_t to = Load16Aligned(pc + 6);
424  if (from <= current_char && current_char <= to) {
425  pc = code_base + Load32Aligned(pc + 8);
426  } else {
427  pc += BC_CHECK_CHAR_IN_RANGE_LENGTH;
428  }
429  break;
430  }
431  BYTECODE(CHECK_CHAR_NOT_IN_RANGE) {
432  uint32_t from = Load16Aligned(pc + 4);
433  uint32_t to = Load16Aligned(pc + 6);
434  if (from > current_char || current_char > to) {
435  pc = code_base + Load32Aligned(pc + 8);
436  } else {
437  pc += BC_CHECK_CHAR_NOT_IN_RANGE_LENGTH;
438  }
439  break;
440  }
441  BYTECODE(CHECK_BIT_IN_TABLE) {
442  int mask = RegExpMacroAssembler::kTableMask;
443  byte b = pc[8 + ((current_char & mask) >> kBitsPerByteLog2)];
444  int bit = (current_char & (kBitsPerByte - 1));
445  if ((b & (1 << bit)) != 0) {
446  pc = code_base + Load32Aligned(pc + 4);
447  } else {
448  pc += BC_CHECK_BIT_IN_TABLE_LENGTH;
449  }
450  break;
451  }
452  BYTECODE(CHECK_LT) {
453  uint32_t limit = (insn >> BYTECODE_SHIFT);
454  if (current_char < limit) {
455  pc = code_base + Load32Aligned(pc + 4);
456  } else {
457  pc += BC_CHECK_LT_LENGTH;
458  }
459  break;
460  }
461  BYTECODE(CHECK_GT) {
462  uint32_t limit = (insn >> BYTECODE_SHIFT);
463  if (current_char > limit) {
464  pc = code_base + Load32Aligned(pc + 4);
465  } else {
466  pc += BC_CHECK_GT_LENGTH;
467  }
468  break;
469  }
470  BYTECODE(CHECK_REGISTER_LT)
471  if (registers[insn >> BYTECODE_SHIFT] < Load32Aligned(pc + 4)) {
472  pc = code_base + Load32Aligned(pc + 8);
473  } else {
474  pc += BC_CHECK_REGISTER_LT_LENGTH;
475  }
476  break;
477  BYTECODE(CHECK_REGISTER_GE)
478  if (registers[insn >> BYTECODE_SHIFT] >= Load32Aligned(pc + 4)) {
479  pc = code_base + Load32Aligned(pc + 8);
480  } else {
481  pc += BC_CHECK_REGISTER_GE_LENGTH;
482  }
483  break;
484  BYTECODE(CHECK_REGISTER_EQ_POS)
485  if (registers[insn >> BYTECODE_SHIFT] == current) {
486  pc = code_base + Load32Aligned(pc + 4);
487  } else {
488  pc += BC_CHECK_REGISTER_EQ_POS_LENGTH;
489  }
490  break;
491  BYTECODE(CHECK_NOT_REGS_EQUAL)
492  if (registers[insn >> BYTECODE_SHIFT] ==
493  registers[Load32Aligned(pc + 4)]) {
494  pc += BC_CHECK_NOT_REGS_EQUAL_LENGTH;
495  } else {
496  pc = code_base + Load32Aligned(pc + 8);
497  }
498  break;
499  BYTECODE(CHECK_NOT_BACK_REF) {
500  int from = registers[insn >> BYTECODE_SHIFT];
501  int len = registers[(insn >> BYTECODE_SHIFT) + 1] - from;
502  if (from < 0 || len <= 0) {
503  pc += BC_CHECK_NOT_BACK_REF_LENGTH;
504  break;
505  }
506  if (current + len > subject.length()) {
507  pc = code_base + Load32Aligned(pc + 4);
508  break;
509  } else {
510  int i;
511  for (i = 0; i < len; i++) {
512  if (subject[from + i] != subject[current + i]) {
513  pc = code_base + Load32Aligned(pc + 4);
514  break;
515  }
516  }
517  if (i < len) break;
518  current += len;
519  }
520  pc += BC_CHECK_NOT_BACK_REF_LENGTH;
521  break;
522  }
523  BYTECODE(CHECK_NOT_BACK_REF_NO_CASE) {
524  int from = registers[insn >> BYTECODE_SHIFT];
525  int len = registers[(insn >> BYTECODE_SHIFT) + 1] - from;
526  if (from < 0 || len <= 0) {
527  pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH;
528  break;
529  }
530  if (current + len > subject.length()) {
531  pc = code_base + Load32Aligned(pc + 4);
532  break;
533  } else {
534  if (BackRefMatchesNoCase(isolate->interp_canonicalize_mapping(),
535  from, current, len, subject)) {
536  current += len;
537  pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH;
538  } else {
539  pc = code_base + Load32Aligned(pc + 4);
540  }
541  }
542  break;
543  }
544  BYTECODE(CHECK_AT_START)
545  if (current == 0) {
546  pc = code_base + Load32Aligned(pc + 4);
547  } else {
548  pc += BC_CHECK_AT_START_LENGTH;
549  }
550  break;
551  BYTECODE(CHECK_NOT_AT_START)
552  if (current == 0) {
553  pc += BC_CHECK_NOT_AT_START_LENGTH;
554  } else {
555  pc = code_base + Load32Aligned(pc + 4);
556  }
557  break;
558  BYTECODE(SET_CURRENT_POSITION_FROM_END) {
559  int by = static_cast<uint32_t>(insn) >> BYTECODE_SHIFT;
560  if (subject.length() - current > by) {
561  current = subject.length() - by;
562  current_char = subject[current - 1];
563  }
564  pc += BC_SET_CURRENT_POSITION_FROM_END_LENGTH;
565  break;
566  }
567  default:
568  UNREACHABLE();
569  break;
570  }
571  }
572 }
#define BYTECODE(name)
#define CHECK_LT(a, b)
Definition: logging.h:179
#define CHECK_GT(a, b)
Definition: logging.h:177
static int32_t Load16Aligned(const byte *pc)
const int BYTECODE_SHIFT
static int32_t Load32Aligned(const byte *pc)
const int kBitsPerByteLog2
Definition: globals.h:163
const int BYTECODE_MASK
static bool BackRefMatchesNoCase(Canonicalize *interp_canonicalize, int from, int current, int len, Vector< const uint8_t > subject)

References BackRefMatchesNoCase(), BREAK, BYTECODE, BYTECODE_MASK, BYTECODE_SHIFT, CHECK_GT, CHECK_LT, v8::internal::BacktrackStack::data(), DCHECK, v8::internal::Isolate::interp_canonicalize_mapping(), kBitsPerByte, kBitsPerByteLog2, v8::internal::RegExpMacroAssembler::kTableMask, v8::internal::Vector< T >::length(), Load16Aligned(), Load32Aligned(), v8::internal::BacktrackStack::max_size(), pc, PrintF(), v8::internal::RegExpImpl::RE_EXCEPTION, v8::internal::RegExpImpl::RE_FAILURE, v8::internal::RegExpImpl::RE_SUCCESS, to(), and UNREACHABLE.

Referenced by v8::internal::IrregexpInterpreter::Match().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_double_value()

static double v8::internal::read_double_value ( Address  p)
inlinestatic

Definition at line 19 of file deoptimizer.h.

19  {
20  double d;
21  memcpy(&d, p, sizeof(d));
22  return d;
23 }

Referenced by v8::internal::FrameDescription::GetDoubleFrameSlot().

+ Here is the caller graph for this function:

◆ ReadBytes()

byte * v8::internal::ReadBytes ( const char *  filename,
int size,
bool  verbose 
)

Definition at line 222 of file utils.cc.

222  {
223  char* chars = ReadCharsFromFile(filename, size, 0, verbose);
224  return reinterpret_cast<byte*>(chars);
225 }
char * ReadCharsFromFile(const char *filename, int *size, int extra_space, bool verbose)
Definition: utils.cc:211

References ReadCharsFromFile(), and size.

+ Here is the call graph for this function:

◆ ReadCharsFromFile() [1/2]

char* v8::internal::ReadCharsFromFile ( const char *  filename,
int size,
int  extra_space,
bool  verbose 
)

Definition at line 211 of file utils.cc.

214  {
215  FILE* file = base::OS::FOpen(filename, "rb");
216  char* result = ReadCharsFromFile(file, size, extra_space, verbose, filename);
217  if (file != NULL) fclose(file);
218  return result;
219 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes A file to write the raw context snapshot bytes Write V8 startup blob file(mksnapshot only)") DEFINE_BOOL(profile_hydrogen_code_stub_compilation

References file(), v8::base::OS::FOpen(), NULL, ReadCharsFromFile(), and size.

+ Here is the call graph for this function:

◆ ReadCharsFromFile() [2/2]

char* v8::internal::ReadCharsFromFile ( FILE *  file,
int size,
int  extra_space,
bool  verbose,
const char *  filename 
)

Definition at line 181 of file utils.cc.

185  {
186  if (file == NULL || fseek(file, 0, SEEK_END) != 0) {
187  if (verbose) {
188  base::OS::PrintError("Cannot read from file %s.\n", filename);
189  }
190  return NULL;
191  }
192 
193  // Get the size of the file and rewind it.
194  *size = ftell(file);
195  rewind(file);
196 
197  char* result = NewArray<char>(*size + extra_space);
198  for (int i = 0; i < *size && feof(file) == 0;) {
199  int read = static_cast<int>(fread(&result[i], 1, *size - i, file));
200  if (read != (*size - i) && ferror(file) != 0) {
201  fclose(file);
202  DeleteArray(result);
203  return NULL;
204  }
205  i += read;
206  }
207  return result;
208 }

References DeleteArray(), file(), NULL, v8::base::OS::PrintError(), and size.

Referenced by ReadBytes(), ReadCharsFromFile(), and ReadFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadDiyFp()

static void v8::internal::ReadDiyFp ( Vector< const char >  buffer,
DiyFp result,
int remaining_decimals 
)
static

Definition at line 134 of file strtod.cc.

136  {
137  int read_digits;
138  uint64_t significand = ReadUint64(buffer, &read_digits);
139  if (buffer.length() == read_digits) {
140  *result = DiyFp(significand, 0);
141  *remaining_decimals = 0;
142  } else {
143  // Round the significand.
144  if (buffer[read_digits] >= '5') {
145  significand++;
146  }
147  // Compute the binary exponent.
148  int exponent = 0;
149  *result = DiyFp(significand, exponent);
150  *remaining_decimals = buffer.length() - read_digits;
151  }
152 }

References v8::internal::Vector< T >::length(), and ReadUint64().

Referenced by DiyFpStrtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadFile() [1/2]

Vector< const char > v8::internal::ReadFile ( const char *  filename,
bool exists,
bool  verbose 
)

Definition at line 241 of file utils.cc.

243  {
244  int size;
245  char* result = ReadCharsFromFile(filename, &size, 1, verbose);
246  return SetVectorContents(result, size, exists);
247 }
static Vector< const char > SetVectorContents(char *chars, int size, bool *exists)
Definition: utils.cc:228

References ReadCharsFromFile(), SetVectorContents(), and size.

Referenced by v8::SourceGroup::Execute(), v8::Shell::Load(), and v8::Shell::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadFile() [2/2]

Vector< const char > v8::internal::ReadFile ( FILE *  file,
bool exists,
bool  verbose 
)

Definition at line 250 of file utils.cc.

252  {
253  int size;
254  char* result = ReadCharsFromFile(file, &size, 1, verbose, "");
255  return SetVectorContents(result, size, exists);
256 }

References file(), ReadCharsFromFile(), SetVectorContents(), and size.

+ Here is the call graph for this function:

◆ ReadLine()

char * v8::internal::ReadLine ( const char *  prompt)

Definition at line 129 of file utils.cc.

129  {
130  char* result = NULL;
131  char line_buf[256];
132  int offset = 0;
133  bool keep_going = true;
134  fprintf(stdout, "%s", prompt);
135  fflush(stdout);
136  while (keep_going) {
137  if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) {
138  // fgets got an error. Just give up.
139  if (result != NULL) {
140  DeleteArray(result);
141  }
142  return NULL;
143  }
144  int len = StrLength(line_buf);
145  if (len > 1 &&
146  line_buf[len - 2] == '\\' &&
147  line_buf[len - 1] == '\n') {
148  // When we read a line that ends with a "\" we remove the escape and
149  // append the remainder.
150  line_buf[len - 2] = '\n';
151  line_buf[len - 1] = 0;
152  len -= 1;
153  } else if ((len > 0) && (line_buf[len - 1] == '\n')) {
154  // Since we read a new line we are done reading the line. This
155  // will exit the loop after copying this buffer into the result.
156  keep_going = false;
157  }
158  if (result == NULL) {
159  // Allocate the initial result and make room for the terminating '\0'
160  result = NewArray<char>(len + 1);
161  } else {
162  // Allocate a new result with enough room for the new addition.
163  int new_len = offset + len + 1;
164  char* new_result = NewArray<char>(new_len);
165  // Copy the existing input into the new array and set the new
166  // array as the result.
167  MemCopy(new_result, result, offset * kCharSize);
168  DeleteArray(result);
169  result = new_result;
170  }
171  // Copy the newly read line into the result.
172  MemCopy(result + offset, line_buf, len * kCharSize);
173  offset += len;
174  }
175  DCHECK(result != NULL);
176  result[offset] = '\0';
177  return result;
178 }
const int kCharSize
Definition: globals.h:122

References DCHECK, DeleteArray(), kCharSize, MemCopy(), NULL, and StrLength().

Referenced by v8::Shell::CreateGlobalTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadUint64()

static uint64_t v8::internal::ReadUint64 ( Vector< const char >  buffer,
int number_of_read_digits 
)
static

Definition at line 116 of file strtod.cc.

117  {
118  uint64_t result = 0;
119  int i = 0;
120  while (i < buffer.length() && result <= (kMaxUint64 / 10 - 1)) {
121  int digit = buffer[i++] - '0';
122  DCHECK(0 <= digit && digit <= 9);
123  result = 10 * result + digit;
124  }
125  *number_of_read_digits = i;
126  return result;
127 }
static const uint64_t kMaxUint64
Definition: strtod.cc:37

References DCHECK, kMaxUint64, and v8::internal::Vector< T >::length().

Referenced by DoubleStrtod(), and ReadDiyFp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadUInt64()

static uint64_t v8::internal::ReadUInt64 ( Vector< const char >  buffer,
int  from,
int  digits_to_read 
)
static

Definition at line 69 of file bignum.cc.

71  {
72  uint64_t result = 0;
73  for (int i = from; i < from + digits_to_read; ++i) {
74  int digit = buffer[i] - '0';
75  DCHECK(0 <= digit && digit <= 9);
76  result = result * 10 + digit;
77  }
78  return result;
79 }

References DCHECK.

Referenced by v8::internal::Bignum::AssignDecimalString().

+ Here is the caller graph for this function:

◆ ReceiverObjectNeedsWriteBarrier()

bool v8::internal::ReceiverObjectNeedsWriteBarrier ( HValue object,
HValue value,
HValue dominator 
)
inline

Definition at line 5771 of file hydrogen-instructions.h.

5773  {
5774  while (object->IsInnerAllocatedObject()) {
5775  object = HInnerAllocatedObject::cast(object)->base_object();
5776  }
5777  if (object->IsConstant() && HConstant::cast(object)->IsCell()) {
5778  return false;
5779  }
5780  if (object->IsConstant() &&
5781  HConstant::cast(object)->HasExternalReferenceValue()) {
5782  // Stores to external references require no write barriers
5783  return false;
5784  }
5785  // We definitely need a write barrier unless the object is the allocation
5786  // dominator.
5787  if (object == dominator && object->IsAllocate()) {
5788  // Stores to new space allocations require no write barriers.
5789  if (HAllocate::cast(object)->IsNewSpaceAllocation()) {
5790  return false;
5791  }
5792  // Stores to old space allocations require no write barriers if the value is
5793  // a constant provably not in new space.
5794  if (value->IsConstant() && HConstant::cast(value)->NotInNewSpace()) {
5795  return false;
5796  }
5797  // Stores to old space allocations require no write barriers if the value is
5798  // an old space allocation.
5799  while (value->IsInnerAllocatedObject()) {
5800  value = HInnerAllocatedObject::cast(value)->base_object();
5801  }
5802  if (value->IsAllocate() &&
5803  !HAllocate::cast(value)->IsNewSpaceAllocation()) {
5804  return false;
5805  }
5806  }
5807  return true;
5808 }

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::NeedsWriteBarrier(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::NeedsWriteBarrierForMap().

+ Here is the caller graph for this function:

◆ RecompileAndRelocateSuspendedGenerators()

static void v8::internal::RecompileAndRelocateSuspendedGenerators ( const List< Handle< JSGeneratorObject > > &  generators)
static

Definition at line 1893 of file debug.cc.

1894  {
1895  for (int i = 0; i < generators.length(); i++) {
1896  Handle<JSFunction> fun(generators[i]->function());
1897 
1899 
1900  int code_offset = generators[i]->continuation();
1901  int pc_offset = ComputePcOffsetFromCodeOffset(fun->code(), code_offset);
1902  generators[i]->set_continuation(pc_offset);
1903  }
1904 }
static int ComputePcOffsetFromCodeOffset(Code *code, int code_offset)
Definition: debug.cc:1760
static void EnsureFunctionHasDebugBreakSlots(Handle< JSFunction > function)
Definition: debug.cc:1874

References ComputePcOffsetFromCodeOffset(), and EnsureFunctionHasDebugBreakSlots().

Referenced by v8::internal::Debug::PrepareForBreakPoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecordFunctionCompilation()

static void v8::internal::RecordFunctionCompilation ( Logger::LogEventsAndTags  tag,
CompilationInfo info,
Handle< SharedFunctionInfo shared 
)
static

Definition at line 598 of file compiler.cc.

600  {
601  // SharedFunctionInfo is passed separately, because if CompilationInfo
602  // was created using Script object, it will not have it.
603 
604  // Log the code generation. If source information is available include
605  // script name and line number. Check explicitly whether logging is
606  // enabled as finding the line number is not free.
607  if (info->isolate()->logger()->is_logging_code_events() ||
608  info->isolate()->cpu_profiler()->is_profiling()) {
609  Handle<Script> script = info->script();
610  Handle<Code> code = info->code();
611  if (code.is_identical_to(info->isolate()->builtins()->CompileLazy())) {
612  return;
613  }
614  int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
615  int column_num =
616  Script::GetColumnNumber(script, shared->start_position()) + 1;
617  String* script_name = script->name()->IsString()
618  ? String::cast(script->name())
619  : info->isolate()->heap()->empty_string();
620  Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
621  PROFILE(info->isolate(),
622  CodeCreateEvent(log_tag, *code, *shared, info, script_name,
623  line_num, column_num));
624  }
625 
626  GDBJIT(AddCode(Handle<String>(shared->DebugName()),
627  Handle<Script>(info->script()), Handle<Code>(info->code()),
628  info));
629 }

References v8::internal::Isolate::builtins(), v8::internal::CompilationInfo::code(), v8::internal::Isolate::cpu_profiler(), GDBJIT, v8::internal::Script::GetColumnNumber(), v8::internal::Script::GetLineNumber(), v8::internal::Isolate::heap(), v8::internal::Logger::is_logging_code_events(), v8::internal::CompilationInfo::isolate(), v8::internal::Isolate::logger(), PROFILE, and v8::internal::CompilationInfo::script().

Referenced by v8::internal::Compiler::BuildFunctionInfo(), v8::internal::Compiler::EnsureDeoptimizationSupport(), v8::internal::Compiler::GetConcurrentlyOptimizedCode(), GetOptimizedCodeNow(), and GetUnoptimizedCodeCommon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RedirectActivationsToRecompiledCodeOnThread()

static void v8::internal::RedirectActivationsToRecompiledCodeOnThread ( Isolate isolate,
ThreadLocalTop *  top 
)
static

Definition at line 1786 of file debug.cc.

1788  {
1789  for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) {
1790  JavaScriptFrame* frame = it.frame();
1791 
1792  if (frame->is_optimized() || !frame->function()->IsJSFunction()) continue;
1793 
1794  JSFunction* function = frame->function();
1795 
1796  DCHECK(frame->LookupCode()->kind() == Code::FUNCTION);
1797 
1798  Handle<Code> frame_code(frame->LookupCode());
1799  if (frame_code->has_debug_break_slots()) continue;
1800 
1801  Handle<Code> new_code(function->shared()->code());
1802  if (new_code->kind() != Code::FUNCTION ||
1803  !new_code->has_debug_break_slots()) {
1804  continue;
1805  }
1806 
1807  int old_pc_offset =
1808  static_cast<int>(frame->pc() - frame_code->instruction_start());
1809  int code_offset = ComputeCodeOffsetFromPcOffset(*frame_code, old_pc_offset);
1810  int new_pc_offset = ComputePcOffsetFromCodeOffset(*new_code, code_offset);
1811 
1812  // Compute the equivalent pc in the new code.
1813  byte* new_pc = new_code->instruction_start() + new_pc_offset;
1814 
1815  if (FLAG_trace_deopt) {
1816  PrintF("Replacing code %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) "
1817  "with %08" V8PRIxPTR " - %08" V8PRIxPTR " (%d) "
1818  "for debugging, "
1819  "changing pc from %08" V8PRIxPTR " to %08" V8PRIxPTR "\n",
1820  reinterpret_cast<intptr_t>(
1821  frame_code->instruction_start()),
1822  reinterpret_cast<intptr_t>(
1823  frame_code->instruction_start()) +
1824  frame_code->instruction_size(),
1825  frame_code->instruction_size(),
1826  reinterpret_cast<intptr_t>(new_code->instruction_start()),
1827  reinterpret_cast<intptr_t>(new_code->instruction_start()) +
1828  new_code->instruction_size(),
1829  new_code->instruction_size(),
1830  reinterpret_cast<intptr_t>(frame->pc()),
1831  reinterpret_cast<intptr_t>(new_pc));
1832  }
1833 
1834  if (FLAG_enable_ool_constant_pool) {
1835  // Update constant pool pointer for new code.
1836  frame->set_constant_pool(new_code->constant_pool());
1837  }
1838 
1839  // Patch the return address to return into the code with
1840  // debug break slots.
1841  frame->set_pc(new_pc);
1842  }
1843 }
#define V8PRIxPTR
Definition: macros.h:363
static int ComputeCodeOffsetFromPcOffset(Code *code, int pc_offset)
Definition: debug.cc:1737

References ComputeCodeOffsetFromPcOffset(), ComputePcOffsetFromCodeOffset(), DCHECK, v8::internal::JavaScriptFrame::function(), PrintF(), and V8PRIxPTR.

Referenced by v8::internal::Debug::PrepareForBreakPoints(), and v8::internal::ActiveFunctionsRedirector::VisitThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReduceFixedArrayTo()

static Handle<FixedArray> v8::internal::ReduceFixedArrayTo ( Handle< FixedArray array,
int  length 
)
static

Definition at line 5687 of file objects.cc.

5688  {
5689  DCHECK(array->length() >= length);
5690  if (array->length() == length) return array;
5691 
5692  Handle<FixedArray> new_array =
5693  array->GetIsolate()->factory()->NewFixedArray(length);
5694  for (int i = 0; i < length; ++i) new_array->set(i, array->get(i));
5695  return new_array;
5696 }

References DCHECK.

Referenced by GetEnumPropertyKeys().

+ Here is the caller graph for this function:

◆ RegExpFlagsFromString()

static JSRegExp::Flags v8::internal::RegExpFlagsFromString ( Handle< String str)
static

Definition at line 60 of file jsregexp.cc.

60  {
61  int flags = JSRegExp::NONE;
62  for (int i = 0; i < str->length(); i++) {
63  switch (str->Get(i)) {
64  case 'i':
65  flags |= JSRegExp::IGNORE_CASE;
66  break;
67  case 'g':
69  break;
70  case 'm':
71  flags |= JSRegExp::MULTILINE;
72  break;
73  case 'y':
74  if (FLAG_harmony_regexps) flags |= JSRegExp::STICKY;
75  break;
76  }
77  }
78  return JSRegExp::Flags(flags);
79 }
#define GLOBAL

References v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::JSRegExp::GLOBAL, v8::internal::JSRegExp::IGNORE_CASE, v8::internal::JSRegExp::MULTILINE, v8::internal::JSRegExp::NONE, and v8::internal::JSRegExp::STICKY.

Referenced by v8::internal::RegExpImpl::Compile().

+ Here is the caller graph for this function:

◆ REGISTER() [1/41]

v8::internal::REGISTER ( a0  ,
 
)

◆ REGISTER() [2/41]

v8::internal::REGISTER ( a1  ,
 
)

◆ REGISTER() [3/41]

v8::internal::REGISTER ( a2  ,
 
)

◆ REGISTER() [4/41]

v8::internal::REGISTER ( a3  ,
 
)

◆ REGISTER() [5/41]

v8::internal::REGISTER ( a4  ,
 
)

◆ REGISTER() [6/41]

v8::internal::REGISTER ( a5  ,
 
)

◆ REGISTER() [7/41]

v8::internal::REGISTER ( a6  ,
10   
)

◆ REGISTER() [8/41]

v8::internal::REGISTER ( a7  ,
11   
)

◆ REGISTER() [9/41]

v8::internal::REGISTER ( at  ,
 
)

◆ REGISTER() [10/41]

v8::internal::REGISTER ( fp  ,
30   
)

◆ REGISTER() [11/41]

v8::internal::REGISTER ( gp  ,
28   
)

◆ REGISTER() [12/41]

v8::internal::REGISTER ( k0  ,
26   
)

◆ REGISTER() [13/41]

v8::internal::REGISTER ( k1  ,
27   
)

◆ REGISTER() [14/41]

v8::internal::REGISTER ( no_reg  ,
1 
)

◆ REGISTER() [15/41]

v8::internal::REGISTER ( ra  ,
31   
)

◆ REGISTER() [16/41]

v8::internal::REGISTER ( s0  ,
16   
)

◆ REGISTER() [17/41]

v8::internal::REGISTER ( s1  ,
17   
)

◆ REGISTER() [18/41]

v8::internal::REGISTER ( s2  ,
18   
)

◆ REGISTER() [19/41]

v8::internal::REGISTER ( s3  ,
19   
)

◆ REGISTER() [20/41]

v8::internal::REGISTER ( s4  ,
20   
)

◆ REGISTER() [21/41]

v8::internal::REGISTER ( s5  ,
21   
)

◆ REGISTER() [22/41]

v8::internal::REGISTER ( s6  ,
22   
)

◆ REGISTER() [23/41]

v8::internal::REGISTER ( s7  ,
23   
)

◆ REGISTER() [24/41]

v8::internal::REGISTER ( sp  ,
29   
)

◆ REGISTER() [25/41]

v8::internal::REGISTER ( t0  ,
12   
)

◆ REGISTER() [26/41]

v8::internal::REGISTER ( t0  ,
 
)

◆ REGISTER() [27/41]

v8::internal::REGISTER ( t1  ,
13   
)

◆ REGISTER() [28/41]

v8::internal::REGISTER ( t1  ,
 
)

◆ REGISTER() [29/41]

v8::internal::REGISTER ( t2  ,
10   
)

◆ REGISTER() [30/41]

v8::internal::REGISTER ( t2  ,
14   
)

◆ REGISTER() [31/41]

v8::internal::REGISTER ( t3  ,
11   
)

◆ REGISTER() [32/41]

v8::internal::REGISTER ( t3  ,
15   
)

◆ REGISTER() [33/41]

v8::internal::REGISTER ( t4  ,
12   
)

◆ REGISTER() [34/41]

v8::internal::REGISTER ( t5  ,
13   
)

◆ REGISTER() [35/41]

v8::internal::REGISTER ( t6  ,
14   
)

◆ REGISTER() [36/41]

v8::internal::REGISTER ( t7  ,
15   
)

◆ REGISTER() [37/41]

v8::internal::REGISTER ( t8  ,
24   
)

◆ REGISTER() [38/41]

v8::internal::REGISTER ( t9  ,
25   
)

◆ REGISTER() [39/41]

v8::internal::REGISTER ( v0  ,
 
)

◆ REGISTER() [40/41]

v8::internal::REGISTER ( v1  ,
 
)

◆ REGISTER() [41/41]

v8::internal::REGISTER ( zero_reg  ,
 
)

◆ ReplaceAccessors()

static void v8::internal::ReplaceAccessors ( Handle< Map map,
Handle< String name,
PropertyAttributes  attributes,
Handle< AccessorPair accessor_pair 
)
static

Definition at line 692 of file bootstrapper.cc.

695  {
696  DescriptorArray* descriptors = map->instance_descriptors();
697  int idx = descriptors->SearchWithCache(*name, *map);
698  CallbacksDescriptor descriptor(name, accessor_pair, attributes);
699  descriptors->Replace(idx, &descriptor);
700 }

References map, name, and v8::internal::DescriptorArray::Replace().

+ Here is the call graph for this function:

◆ ReplaceCodeObject()

static void v8::internal::ReplaceCodeObject ( Handle< Code original,
Handle< Code substitution 
)
static

Definition at line 969 of file liveedit.cc.

970  {
971  // Perform a full GC in order to ensure that we are not in the middle of an
972  // incremental marking phase when we are replacing the code object.
973  // Since we are not in an incremental marking phase we can write pointers
974  // to code objects (that are never in new space) without worrying about
975  // write barriers.
976  Heap* heap = original->GetHeap();
977  HeapIterator iterator(heap);
978 
979  DCHECK(!heap->InNewSpace(*substitution));
980 
981  ReplacingVisitor visitor(*original, *substitution);
982 
983  // Iterate over all roots. Stack frames may have pointer into original code,
984  // so temporary replace the pointers with offset numbers
985  // in prologue/epilogue.
986  heap->IterateRoots(&visitor, VISIT_ALL);
987 
988  // Now iterate over all pointers of all objects, including code_target
989  // implicit pointers.
990  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
991  obj->Iterate(&visitor);
992  }
993 }

References DCHECK, v8::internal::Heap::InNewSpace(), v8::internal::Heap::IterateRoots(), NULL, and VISIT_ALL.

Referenced by v8::internal::LiveEdit::PatchFunctionPositions(), and v8::internal::LiveEdit::ReplaceFunctionCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReplayEnvironmentNested()

static void v8::internal::ReplayEnvironmentNested ( const ZoneList< HValue * > *  values,
HCapturedObject *  other 
)
static

Definition at line 2610 of file hydrogen-instructions.cc.

2611  {
2612  for (int i = 0; i < values->length(); ++i) {
2613  HValue* value = values->at(i);
2614  if (value->IsCapturedObject()) {
2615  if (HCapturedObject::cast(value)->capture_id() == other->capture_id()) {
2616  values->at(i) = other;
2617  } else {
2618  ReplayEnvironmentNested(HCapturedObject::cast(value)->values(), other);
2619  }
2620  }
2621  }
2622 }
static void ReplayEnvironmentNested(const ZoneList< HValue * > *values, HCapturedObject *other)

References v8::internal::List< T, AllocationPolicy >::at().

+ Here is the call graph for this function:

◆ ResolveBuiltinIdHolder()

static Handle<JSObject> v8::internal::ResolveBuiltinIdHolder ( Handle< Context native_context,
const char *  holder_expr 
)
static

Definition at line 1466 of file bootstrapper.cc.

1467  {
1468  Isolate* isolate = native_context->GetIsolate();
1469  Factory* factory = isolate->factory();
1470  Handle<GlobalObject> global(native_context->global_object());
1471  const char* period_pos = strchr(holder_expr, '.');
1472  if (period_pos == NULL) {
1473  return Handle<JSObject>::cast(
1474  Object::GetPropertyOrElement(
1475  global, factory->InternalizeUtf8String(holder_expr))
1476  .ToHandleChecked());
1477  }
1478  const char* inner = period_pos + 1;
1479  DCHECK_EQ(NULL, strchr(inner, '.'));
1480  Vector<const char> property(holder_expr,
1481  static_cast<int>(period_pos - holder_expr));
1482  Handle<String> property_string = factory->InternalizeUtf8String(property);
1483  DCHECK(!property_string.is_null());
1484  Handle<JSObject> object = Handle<JSObject>::cast(
1485  Object::GetProperty(global, property_string).ToHandleChecked());
1486  if (strcmp("prototype", inner) == 0) {
1487  Handle<JSFunction> function = Handle<JSFunction>::cast(object);
1488  return Handle<JSObject>(JSObject::cast(function->prototype()));
1489  }
1490  Handle<String> inner_string = factory->InternalizeUtf8String(inner);
1491  DCHECK(!inner_string.is_null());
1492  Handle<Object> value =
1493  Object::GetProperty(object, inner_string).ToHandleChecked();
1494  return Handle<JSObject>::cast(value);
1495 }

References DCHECK, DCHECK_EQ, v8::internal::Isolate::factory(), v8::internal::Handle< T >::is_null(), and NULL.

+ Here is the call graph for this function:

◆ RoundUp()

static void v8::internal::RoundUp ( Vector< char >  buffer,
int length,
int decimal_point 
)
static

Definition at line 171 of file fixed-dtoa.cc.

171  {
172  // An empty buffer represents 0.
173  if (*length == 0) {
174  buffer[0] = '1';
175  *decimal_point = 1;
176  *length = 1;
177  return;
178  }
179  // Round the last digit until we either have a digit that was not '9' or until
180  // we reached the first digit.
181  buffer[(*length) - 1]++;
182  for (int i = (*length) - 1; i > 0; --i) {
183  if (buffer[i] != '0' + 10) {
184  return;
185  }
186  buffer[i] = '0';
187  buffer[i - 1]++;
188  }
189  // If the first digit is now '0' + 10, we would need to set it to '0' and add
190  // a '1' in front. However we reach the first digit only if all following
191  // digits had been '9' before rounding up. Now all trailing digits are '0' and
192  // we simply switch the first digit to '1' and update the decimal-point
193  // (indicating that the point is now one digit to the right).
194  if (buffer[0] == '0' + 10) {
195  buffer[0] = '1';
196  (*decimal_point)++;
197  }
198 }

Referenced by v8::internal::MemoryAllocator::AllocateChunk(), v8::internal::CodeRange::AllocateRawMemory(), v8::internal::Code::body_size(), v8::internal::MacroAssembler::BumpSystemStackPointer(), v8::internal::MemoryAllocator::CodePageGuardStartOffset(), v8::internal::MemoryChunk::CommitArea(), v8::internal::Heap::CopyCode(), v8::internal::Zone::DeleteAll(), FillFractionals(), v8::internal::ConstantPoolArray::get_extended_section_header_offset(), v8::internal::Zone::New(), v8::internal::compiler::Instruction::New(), v8::internal::Zone::NewExpand(), v8::internal::MemoryAllocator::ReserveAlignedMemory(), v8::internal::StoreBuffer::SetUp(), v8::internal::MemoryAllocator::SetUp(), v8::internal::CodeRange::SetUp(), v8::internal::NewSpace::Shrink(), v8::internal::ByteArray::Size(), v8::internal::ConstantPoolArray::SizeFor(), v8::internal::Code::SizeFor(), v8::internal::ConstantPoolArray::SizeForExtended(), and v8::internal::PagedSpace::SizeOfFirstPage().

+ Here is the caller graph for this function:

◆ RoundWeed()

static bool v8::internal::RoundWeed ( Vector< char >  buffer,
int  length,
uint64_t  distance_too_high_w,
uint64_t  unsafe_interval,
uint64_t  rest,
uint64_t  ten_kappa,
uint64_t  unit 
)
static

Definition at line 43 of file fast-dtoa.cc.

49  {
50  uint64_t small_distance = distance_too_high_w - unit;
51  uint64_t big_distance = distance_too_high_w + unit;
52  // Let w_low = too_high - big_distance, and
53  // w_high = too_high - small_distance.
54  // Note: w_low < w < w_high
55  //
56  // The real w (* unit) must lie somewhere inside the interval
57  // ]w_low; w_high[ (often written as "(w_low; w_high)")
58 
59  // Basically the buffer currently contains a number in the unsafe interval
60  // ]too_low; too_high[ with too_low < w < too_high
61  //
62  // too_high - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
63  // ^v 1 unit ^ ^ ^ ^
64  // boundary_high --------------------- . . . .
65  // ^v 1 unit . . . .
66  // - - - - - - - - - - - - - - - - - - - + - - + - - - - - - . .
67  // . . ^ . .
68  // . big_distance . . .
69  // . . . . rest
70  // small_distance . . . .
71  // v . . . .
72  // w_high - - - - - - - - - - - - - - - - - - . . . .
73  // ^v 1 unit . . . .
74  // w ---------------------------------------- . . . .
75  // ^v 1 unit v . . .
76  // w_low - - - - - - - - - - - - - - - - - - - - - . . .
77  // . . v
78  // buffer --------------------------------------------------+-------+--------
79  // . .
80  // safe_interval .
81  // v .
82  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
83  // ^v 1 unit .
84  // boundary_low ------------------------- unsafe_interval
85  // ^v 1 unit v
86  // too_low - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
87  //
88  //
89  // Note that the value of buffer could lie anywhere inside the range too_low
90  // to too_high.
91  //
92  // boundary_low, boundary_high and w are approximations of the real boundaries
93  // and v (the input number). They are guaranteed to be precise up to one unit.
94  // In fact the error is guaranteed to be strictly less than one unit.
95  //
96  // Anything that lies outside the unsafe interval is guaranteed not to round
97  // to v when read again.
98  // Anything that lies inside the safe interval is guaranteed to round to v
99  // when read again.
100  // If the number inside the buffer lies inside the unsafe interval but not
101  // inside the safe interval then we simply do not know and bail out (returning
102  // false).
103  //
104  // Similarly we have to take into account the imprecision of 'w' when finding
105  // the closest representation of 'w'. If we have two potential
106  // representations, and one is closer to both w_low and w_high, then we know
107  // it is closer to the actual value v.
108  //
109  // By generating the digits of too_high we got the largest (closest to
110  // too_high) buffer that is still in the unsafe interval. In the case where
111  // w_high < buffer < too_high we try to decrement the buffer.
112  // This way the buffer approaches (rounds towards) w.
113  // There are 3 conditions that stop the decrementation process:
114  // 1) the buffer is already below w_high
115  // 2) decrementing the buffer would make it leave the unsafe interval
116  // 3) decrementing the buffer would yield a number below w_high and farther
117  // away than the current number. In other words:
118  // (buffer{-1} < w_high) && w_high - buffer{-1} > buffer - w_high
119  // Instead of using the buffer directly we use its distance to too_high.
120  // Conceptually rest ~= too_high - buffer
121  // We need to do the following tests in this order to avoid over- and
122  // underflows.
123  DCHECK(rest <= unsafe_interval);
124  while (rest < small_distance && // Negated condition 1
125  unsafe_interval - rest >= ten_kappa && // Negated condition 2
126  (rest + ten_kappa < small_distance || // buffer{-1} > w_high
127  small_distance - rest >= rest + ten_kappa - small_distance)) {
128  buffer[length - 1]--;
129  rest += ten_kappa;
130  }
131 
132  // We have approached w+ as much as possible. We now test if approaching w-
133  // would require changing the buffer. If yes, then we have two possible
134  // representations close to w, but we cannot decide which one is closer.
135  if (rest < big_distance &&
136  unsafe_interval - rest >= ten_kappa &&
137  (rest + ten_kappa < big_distance ||
138  big_distance - rest > rest + ten_kappa - big_distance)) {
139  return false;
140  }
141 
142  // Weeding test.
143  // The safe interval is [too_low + 2 ulp; too_high - 2 ulp]
144  // Since too_low = too_high - unsafe_interval this is equivalent to
145  // [too_high - unsafe_interval + 4 ulp; too_high - 2 ulp]
146  // Conceptually we have: rest ~= too_high - buffer
147  return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
148 }

References DCHECK.

Referenced by DigitGen().

+ Here is the caller graph for this function:

◆ RoundWeedCounted()

static bool v8::internal::RoundWeedCounted ( Vector< char >  buffer,
int  length,
uint64_t  rest,
uint64_t  ten_kappa,
uint64_t  unit,
int kappa 
)
static

Definition at line 163 of file fast-dtoa.cc.

168  {
169  DCHECK(rest < ten_kappa);
170  // The following tests are done in a specific order to avoid overflows. They
171  // will work correctly with any uint64 values of rest < ten_kappa and unit.
172  //
173  // If the unit is too big, then we don't know which way to round. For example
174  // a unit of 50 means that the real number lies within rest +/- 50. If
175  // 10^kappa == 40 then there is no way to tell which way to round.
176  if (unit >= ten_kappa) return false;
177  // Even if unit is just half the size of 10^kappa we are already completely
178  // lost. (And after the previous test we know that the expression will not
179  // over/underflow.)
180  if (ten_kappa - unit <= unit) return false;
181  // If 2 * (rest + unit) <= 10^kappa we can safely round down.
182  if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
183  return true;
184  }
185  // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
186  if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
187  // Increment the last digit recursively until we find a non '9' digit.
188  buffer[length - 1]++;
189  for (int i = length - 1; i > 0; --i) {
190  if (buffer[i] != '0' + 10) break;
191  buffer[i] = '0';
192  buffer[i - 1]++;
193  }
194  // If the first digit is now '0'+ 10 we had a buffer with all '9's. With the
195  // exception of the first digit all digits are now '0'. Simply switch the
196  // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
197  // the power (the kappa) is increased.
198  if (buffer[0] == '0' + 10) {
199  buffer[0] = '1';
200  (*kappa) += 1;
201  }
202  return true;
203  }
204  return false;
205 }

References DCHECK.

Referenced by DigitGenCounted().

+ Here is the caller graph for this function:

◆ RUNTIME_FUNCTION() [1/457]

v8::internal::RUNTIME_FUNCTION ( BinaryOpIC_Miss  )

Definition at line 2285 of file ic.cc.

2285  {
2286  TimerEventScope<TimerEventIcMiss> timer(isolate);
2287  HandleScope scope(isolate);
2288  DCHECK_EQ(2, args.length());
2289  Handle<Object> left = args.at<Object>(BinaryOpICStub::kLeft);
2290  Handle<Object> right = args.at<Object>(BinaryOpICStub::kRight);
2291  BinaryOpIC ic(isolate);
2292  Handle<Object> result;
2294  isolate, result,
2295  ic.Transition(Handle<AllocationSite>::null(), left, right));
2296  return *result;
2297 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK_EQ, v8::internal::BinaryOpICStub::kLeft, and v8::internal::BinaryOpICStub::kRight.

◆ RUNTIME_FUNCTION() [2/457]

v8::internal::RUNTIME_FUNCTION ( BinaryOpIC_MissWithAllocationSite  )

Definition at line 2300 of file ic.cc.

2300  {
2301  TimerEventScope<TimerEventIcMiss> timer(isolate);
2302  HandleScope scope(isolate);
2303  DCHECK_EQ(3, args.length());
2304  Handle<AllocationSite> allocation_site =
2305  args.at<AllocationSite>(BinaryOpWithAllocationSiteStub::kAllocationSite);
2306  Handle<Object> left = args.at<Object>(BinaryOpWithAllocationSiteStub::kLeft);
2307  Handle<Object> right =
2308  args.at<Object>(BinaryOpWithAllocationSiteStub::kRight);
2309  BinaryOpIC ic(isolate);
2310  Handle<Object> result;
2312  isolate, result, ic.Transition(allocation_site, left, right));
2313  return *result;
2314 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, and DCHECK_EQ.

◆ RUNTIME_FUNCTION() [3/457]

v8::internal::RUNTIME_FUNCTION ( CallIC_Customization_Miss  )

Definition at line 2020 of file ic.cc.

2020  {
2021  TimerEventScope<TimerEventIcMiss> timer(isolate);
2022  HandleScope scope(isolate);
2023  DCHECK(args.length() == 4);
2024  // A miss on a custom call ic always results in going megamorphic.
2025  CallIC ic(isolate);
2026  Handle<Object> function = args.at<Object>(1);
2027  Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2);
2028  Handle<Smi> slot = args.at<Smi>(3);
2029  ic.PatchMegamorphic(function, vector, slot);
2030  return *function;
2031 }

References DCHECK, and v8::internal::CallIC::PatchMegamorphic().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [4/457]

v8::internal::RUNTIME_FUNCTION ( CallIC_Miss  )

Definition at line 2006 of file ic.cc.

2006  {
2007  TimerEventScope<TimerEventIcMiss> timer(isolate);
2008  HandleScope scope(isolate);
2009  DCHECK(args.length() == 4);
2010  CallIC ic(isolate);
2011  Handle<Object> receiver = args.at<Object>(0);
2012  Handle<Object> function = args.at<Object>(1);
2013  Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2);
2014  Handle<Smi> slot = args.at<Smi>(3);
2015  ic.HandleMiss(receiver, function, vector, slot);
2016  return *function;
2017 }

References DCHECK, and v8::internal::CallIC::HandleMiss().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [5/457]

v8::internal::RUNTIME_FUNCTION ( CompareIC_Miss  )

Definition at line 2376 of file ic.cc.

2376  {
2377  TimerEventScope<TimerEventIcMiss> timer(isolate);
2378  HandleScope scope(isolate);
2379  DCHECK(args.length() == 3);
2380  CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2)));
2381  return ic.UpdateCaches(args.at<Object>(0), args.at<Object>(1));
2382 }

References DCHECK, and v8::internal::CompareIC::UpdateCaches().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [6/457]

v8::internal::RUNTIME_FUNCTION ( CompareNilIC_Miss  )

Definition at line 2438 of file ic.cc.

2438  {
2439  TimerEventScope<TimerEventIcMiss> timer(isolate);
2440  HandleScope scope(isolate);
2441  Handle<Object> object = args.at<Object>(0);
2442  CompareNilIC ic(isolate);
2443  return *ic.CompareNil(object);
2444 }

◆ RUNTIME_FUNCTION() [7/457]

v8::internal::RUNTIME_FUNCTION ( Debug_Break  )

Definition at line 979 of file debug.cc.

979  {
980  // Get the top-most JavaScript frame.
981  JavaScriptFrameIterator it(isolate);
982  isolate->debug()->Break(args, it.frame());
983  isolate->debug()->SetAfterBreakTarget(it.frame());
984  return isolate->heap()->undefined_value();
985 }

◆ RUNTIME_FUNCTION() [8/457]

v8::internal::RUNTIME_FUNCTION ( ElementsTransitionAndStoreIC_Miss  )

Definition at line 2196 of file ic.cc.

2196  {
2197  TimerEventScope<TimerEventIcMiss> timer(isolate);
2198  HandleScope scope(isolate);
2199  DCHECK(args.length() == 4);
2200  KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2201  Handle<Object> value = args.at<Object>(0);
2202  Handle<Map> map = args.at<Map>(1);
2203  Handle<Object> key = args.at<Object>(2);
2204  Handle<Object> object = args.at<Object>(3);
2205  StrictMode strict_mode = ic.strict_mode();
2206  if (object->IsJSObject()) {
2207  JSObject::TransitionElementsKind(Handle<JSObject>::cast(object),
2208  map->elements_kind());
2209  }
2210  Handle<Object> result;
2212  isolate, result,
2213  Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2214  return *result;
2215 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::EXTRA_CALL_FRAME, map, v8::internal::Runtime::SetObjectProperty(), v8::internal::StoreIC::strict_mode(), and v8::internal::JSObject::TransitionElementsKind().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [9/457]

v8::internal::RUNTIME_FUNCTION ( KeyedLoadIC_Miss  )

Definition at line 2050 of file ic.cc.

2050  {
2051  TimerEventScope<TimerEventIcMiss> timer(isolate);
2052  HandleScope scope(isolate);
2053  DCHECK(args.length() == 2);
2054  KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2055  Handle<Object> receiver = args.at<Object>(0);
2056  Handle<Object> key = args.at<Object>(1);
2057  ic.UpdateState(receiver, key);
2058  Handle<Object> result;
2059  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2060  return *result;
2061 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::KeyedLoadIC::Load(), v8::internal::IC::NO_EXTRA_FRAME, and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [10/457]

v8::internal::RUNTIME_FUNCTION ( KeyedLoadIC_MissFromStubFailure  )

Definition at line 2064 of file ic.cc.

2064  {
2065  TimerEventScope<TimerEventIcMiss> timer(isolate);
2066  HandleScope scope(isolate);
2067  DCHECK(args.length() == 2);
2068  KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate);
2069  Handle<Object> receiver = args.at<Object>(0);
2070  Handle<Object> key = args.at<Object>(1);
2071  ic.UpdateState(receiver, key);
2072  Handle<Object> result;
2073  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2074  return *result;
2075 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::EXTRA_CALL_FRAME, v8::internal::KeyedLoadIC::Load(), and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [11/457]

v8::internal::RUNTIME_FUNCTION ( KeyedStoreIC_Miss  )

Definition at line 2134 of file ic.cc.

2134  {
2135  TimerEventScope<TimerEventIcMiss> timer(isolate);
2136  HandleScope scope(isolate);
2137  DCHECK(args.length() == 3);
2138  KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2139  Handle<Object> receiver = args.at<Object>(0);
2140  Handle<Object> key = args.at<Object>(1);
2141  ic.UpdateState(receiver, key);
2142  Handle<Object> result;
2144  isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2145  return *result;
2146 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::NO_EXTRA_FRAME, v8::internal::KeyedStoreIC::Store(), and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [12/457]

v8::internal::RUNTIME_FUNCTION ( KeyedStoreIC_MissFromStubFailure  )

Definition at line 2149 of file ic.cc.

2149  {
2150  TimerEventScope<TimerEventIcMiss> timer(isolate);
2151  HandleScope scope(isolate);
2152  DCHECK(args.length() == 3);
2153  KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2154  Handle<Object> receiver = args.at<Object>(0);
2155  Handle<Object> key = args.at<Object>(1);
2156  ic.UpdateState(receiver, key);
2157  Handle<Object> result;
2159  isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2160  return *result;
2161 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::EXTRA_CALL_FRAME, v8::internal::KeyedStoreIC::Store(), and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [13/457]

v8::internal::RUNTIME_FUNCTION ( KeyedStoreIC_Slow  )

Definition at line 2180 of file ic.cc.

2180  {
2181  HandleScope scope(isolate);
2182  DCHECK(args.length() == 3);
2183  KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2184  Handle<Object> object = args.at<Object>(0);
2185  Handle<Object> key = args.at<Object>(1);
2186  Handle<Object> value = args.at<Object>(2);
2187  StrictMode strict_mode = ic.strict_mode();
2188  Handle<Object> result;
2190  isolate, result,
2191  Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2192  return *result;
2193 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::NO_EXTRA_FRAME, v8::internal::Runtime::SetObjectProperty(), and v8::internal::StoreIC::strict_mode().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [14/457]

v8::internal::RUNTIME_FUNCTION ( LoadElementWithInterceptor  )

Definition at line 2655 of file ic.cc.

2655  {
2656  HandleScope scope(isolate);
2657  Handle<JSObject> receiver = args.at<JSObject>(0);
2658  DCHECK(args.smi_at(1) >= 0);
2659  uint32_t index = args.smi_at(1);
2660  Handle<Object> result;
2662  isolate, result,
2663  JSObject::GetElementWithInterceptor(receiver, receiver, index));
2664  return *result;
2665 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, and v8::internal::JSObject::GetElementWithInterceptor().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [15/457]

v8::internal::RUNTIME_FUNCTION ( LoadIC_Miss  )

Definition at line 2035 of file ic.cc.

2035  {
2036  TimerEventScope<TimerEventIcMiss> timer(isolate);
2037  HandleScope scope(isolate);
2038  DCHECK(args.length() == 2);
2039  LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2040  Handle<Object> receiver = args.at<Object>(0);
2041  Handle<Name> key = args.at<Name>(1);
2042  ic.UpdateState(receiver, key);
2043  Handle<Object> result;
2044  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2045  return *result;
2046 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::LoadIC::Load(), v8::internal::IC::NO_EXTRA_FRAME, and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [16/457]

v8::internal::RUNTIME_FUNCTION ( LoadPropertyWithInterceptor  )

Loads a property with an interceptor performing post interceptor lookup if interceptor failed.

Definition at line 2605 of file ic.cc.

2605  {
2606  HandleScope scope(isolate);
2607  DCHECK(args.length() == NamedLoadHandlerCompiler::kInterceptorArgsLength);
2608  Handle<Name> name =
2609  args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex);
2610  Handle<JSObject> receiver =
2611  args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex);
2612  Handle<JSObject> holder =
2613  args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex);
2614 
2615  Handle<Object> result;
2616  LookupIterator it(receiver, name, holder);
2617  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
2618  JSObject::GetProperty(&it));
2619 
2620  if (it.IsFound()) return *result;
2621 
2622  return ThrowReferenceError(isolate, Name::cast(args[0]));
2623 }
static Object * ThrowReferenceError(Isolate *isolate, Name *name)
Definition: ic.cc:2585

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::Object::GetProperty(), v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsLength, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsNameIndex, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsThisIndex, name, and ThrowReferenceError().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [17/457]

v8::internal::RUNTIME_FUNCTION ( LoadPropertyWithInterceptorOnly  )

Attempts to load a property with an interceptor (which must be present), but doesn't search the prototype chain.

Returns |Heap::no_interceptor_result_sentinel()| if interceptor doesn't provide any value for the given name.

Definition at line 2545 of file ic.cc.

2545  {
2546  DCHECK(args.length() == NamedLoadHandlerCompiler::kInterceptorArgsLength);
2547  Handle<Name> name_handle =
2548  args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex);
2549  Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(
2550  NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex);
2551 
2552  // TODO(rossberg): Support symbols in the API.
2553  if (name_handle->IsSymbol())
2554  return isolate->heap()->no_interceptor_result_sentinel();
2555  Handle<String> name = Handle<String>::cast(name_handle);
2556 
2557  Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
2559  FUNCTION_CAST<v8::NamedPropertyGetterCallback>(getter_address);
2560  DCHECK(getter != NULL);
2561 
2562  Handle<JSObject> receiver =
2563  args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex);
2564  Handle<JSObject> holder =
2565  args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex);
2566  PropertyCallbackArguments callback_args(isolate, interceptor_info->data(),
2567  *receiver, *holder);
2568  {
2569  // Use the interceptor getter.
2570  HandleScope scope(isolate);
2572  callback_args.Call(getter, v8::Utils::ToLocal(name));
2574  if (!r.IsEmpty()) {
2575  Handle<Object> result = v8::Utils::OpenHandle(*r);
2576  result->VerifyApiCallResultType();
2577  return *v8::Utils::OpenHandle(*r);
2578  }
2579  }
2580 
2581  return isolate->heap()->no_interceptor_result_sentinel();
2582 }
void(* NamedPropertyGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
NamedProperty[Getter|Setter] are used as interceptors on object.
Definition: v8.h:3427

References v8::internal::Handle< T >::cast(), DCHECK, v8::Handle< T >::IsEmpty(), v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsLength, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsNameIndex, v8::internal::NamedLoadHandlerCompiler::kInterceptorArgsThisIndex, name, NULL, v8::Utils::OpenHandle(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, and v8::Utils::ToLocal().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [18/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Abort  )

Definition at line 269 of file runtime-test.cc.

269  {
270  SealHandleScope shs(isolate);
271  DCHECK(args.length() == 1);
272  CONVERT_SMI_ARG_CHECKED(message_id, 0);
273  const char* message =
274  GetBailoutReason(static_cast<BailoutReason>(message_id));
275  base::OS::PrintError("abort: %s\n", message);
276  isolate->PrintStack(stderr);
277  base::OS::Abort();
278  UNREACHABLE();
279  return NULL;
280 }
#define CONVERT_SMI_ARG_CHECKED(name, index)
Definition: runtime-utils.h:46

References v8::base::OS::Abort(), CONVERT_SMI_ARG_CHECKED, DCHECK, GetBailoutReason(), NULL, v8::base::OS::PrintError(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [19/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AbortJS  )

Definition at line 283 of file runtime-test.cc.

283  {
284  HandleScope scope(isolate);
285  DCHECK(args.length() == 1);
286  CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
287  base::OS::PrintError("abort: %s\n", message->ToCString().get());
288  isolate->PrintStack(stderr);
289  base::OS::Abort();
290  UNREACHABLE();
291  return NULL;
292 }
#define CONVERT_ARG_HANDLE_CHECKED(Type, name, index)
Definition: runtime-utils.h:28

References v8::base::OS::Abort(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, NULL, v8::base::OS::PrintError(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [20/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AddElement  )

Definition at line 2472 of file runtime.cc.

2472  {
2473  HandleScope scope(isolate);
2474  RUNTIME_ASSERT(args.length() == 4);
2475 
2476  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2479  CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3);
2481  (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
2482  // Compute attributes.
2483  PropertyAttributes attributes =
2484  static_cast<PropertyAttributes>(unchecked_attributes);
2485 
2486  uint32_t index = 0;
2487  key->ToArrayIndex(&index);
2488 
2489  Handle<Object> result;
2491  isolate, result, JSObject::SetElement(object, index, value, attributes,
2492  SLOPPY, false, DEFINE_PROPERTY));
2493  return *result;
2494 }
#define RUNTIME_ASSERT(value)
Definition: runtime-utils.h:12

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DEFINE_PROPERTY, DONT_DELETE, DONT_ENUM, READ_ONLY, RUNTIME_ASSERT, v8::internal::JSObject::SetElement(), and SLOPPY.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [21/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AddNamedProperty  )

Definition at line 2376 of file runtime.cc.

2376  {
2377  HandleScope scope(isolate);
2378  RUNTIME_ASSERT(args.length() == 4);
2379 
2380  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2381  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2383  CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3);
2385  (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
2386  // Compute attributes.
2387  PropertyAttributes attributes =
2388  static_cast<PropertyAttributes>(unchecked_attributes);
2389 
2390 #ifdef DEBUG
2391  uint32_t index = 0;
2392  DCHECK(!key->ToArrayIndex(&index));
2393  LookupIterator it(object, key, LookupIterator::OWN_SKIP_INTERCEPTOR);
2394  Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
2395  if (!maybe.has_value) return isolate->heap()->exception();
2396  RUNTIME_ASSERT(!it.IsFound());
2397 #endif
2398 
2399  Handle<Object> result;
2401  isolate, result,
2402  JSObject::SetOwnPropertyIgnoreAttributes(object, key, value, attributes));
2403  return *result;
2404 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DONT_DELETE, DONT_ENUM, v8::internal::JSReceiver::GetPropertyAttributes(), v8::maybe(), READ_ONLY, RUNTIME_ASSERT, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [22/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AddPropertyForTemplate  )

Definition at line 2407 of file runtime.cc.

2407  {
2408  HandleScope scope(isolate);
2409  RUNTIME_ASSERT(args.length() == 4);
2410 
2411  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2414  CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3);
2416  (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
2417  // Compute attributes.
2418  PropertyAttributes attributes =
2419  static_cast<PropertyAttributes>(unchecked_attributes);
2420 
2421 #ifdef DEBUG
2422  bool duplicate;
2423  if (key->IsName()) {
2424  LookupIterator it(object, Handle<Name>::cast(key),
2425  LookupIterator::OWN_SKIP_INTERCEPTOR);
2426  Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
2427  DCHECK(maybe.has_value);
2428  duplicate = it.IsFound();
2429  } else {
2430  uint32_t index = 0;
2431  RUNTIME_ASSERT(key->ToArrayIndex(&index));
2432  Maybe<bool> maybe = JSReceiver::HasOwnElement(object, index);
2433  if (!maybe.has_value) return isolate->heap()->exception();
2434  duplicate = maybe.value;
2435  }
2436  if (duplicate) {
2437  Handle<Object> args[1] = {key};
2439  isolate,
2440  NewTypeError("duplicate_template_property", HandleVector(args, 1)));
2441  }
2442 #endif
2443 
2444  Handle<Object> result;
2446  isolate, result,
2447  Runtime::DefineObjectProperty(object, key, value, attributes));
2448  return *result;
2449 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Runtime::DefineObjectProperty(), DONT_DELETE, DONT_ENUM, v8::internal::JSReceiver::GetPropertyAttributes(), HandleVector(), v8::internal::JSReceiver::HasOwnElement(), v8::maybe(), READ_ONLY, RUNTIME_ASSERT, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [23/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AllocateHeapNumber  )

Definition at line 3269 of file runtime.cc.

3269  {
3270  HandleScope scope(isolate);
3271  DCHECK(args.length() == 0);
3272  return *isolate->factory()->NewHeapNumber(0);
3273 }

References DCHECK.

◆ RUNTIME_FUNCTION() [24/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AllocateInNewSpace  )

Definition at line 4547 of file runtime.cc.

4547  {
4548  HandleScope scope(isolate);
4549  DCHECK(args.length() == 1);
4552  RUNTIME_ASSERT(size > 0);
4553  RUNTIME_ASSERT(size <= Page::kMaxRegularHeapObjectSize);
4554  return *isolate->factory()->NewFillerObject(size, false, NEW_SPACE);
4555 }

References CONVERT_SMI_ARG_CHECKED, DCHECK, IsAligned(), v8::internal::Page::kMaxRegularHeapObjectSize, kPointerSize, NEW_SPACE, RUNTIME_ASSERT, and size.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [25/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_AllocateInTargetSpace  )

Definition at line 4558 of file runtime.cc.

4558  {
4559  HandleScope scope(isolate);
4560  DCHECK(args.length() == 2);
4564  RUNTIME_ASSERT(size > 0);
4565  RUNTIME_ASSERT(size <= Page::kMaxRegularHeapObjectSize);
4566  bool double_align = AllocateDoubleAlignFlag::decode(flags);
4567  AllocationSpace space = AllocateTargetSpace::decode(flags);
4568  return *isolate->factory()->NewFillerObject(size, double_align, space);
4569 }

References CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::BitFieldBase< T, shift, size, U >::decode(), v8::internal::anonymous_namespace{flags.cc}::flags, IsAligned(), v8::internal::Page::kMaxRegularHeapObjectSize, kPointerSize, RUNTIME_ASSERT, size, and space().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [26/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Apply  )

Definition at line 3819 of file runtime.cc.

3819  {
3820  HandleScope scope(isolate);
3821  DCHECK(args.length() == 5);
3822  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, fun, 0);
3823  CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1);
3824  CONVERT_ARG_HANDLE_CHECKED(JSObject, arguments, 2);
3825  CONVERT_INT32_ARG_CHECKED(offset, 3);
3826  CONVERT_INT32_ARG_CHECKED(argc, 4);
3827  RUNTIME_ASSERT(offset >= 0);
3828  // Loose upper bound to allow fuzzing. We'll most likely run out of
3829  // stack space before hitting this limit.
3830  static int kMaxArgc = 1000000;
3831  RUNTIME_ASSERT(argc >= 0 && argc <= kMaxArgc);
3832 
3833  // If there are too many arguments, allocate argv via malloc.
3834  const int argv_small_size = 10;
3835  Handle<Object> argv_small_buffer[argv_small_size];
3836  SmartArrayPointer<Handle<Object> > argv_large_buffer;
3837  Handle<Object>* argv = argv_small_buffer;
3838  if (argc > argv_small_size) {
3839  argv = new Handle<Object>[argc];
3840  if (argv == NULL) return isolate->StackOverflow();
3841  argv_large_buffer = SmartArrayPointer<Handle<Object> >(argv);
3842  }
3843 
3844  for (int i = 0; i < argc; ++i) {
3846  isolate, argv[i], Object::GetElement(isolate, arguments, offset + i));
3847  }
3848 
3849  Handle<Object> result;
3851  isolate, result,
3852  Execution::Call(isolate, fun, receiver, argc, argv, true));
3853  return *result;
3854 }
#define CONVERT_INT32_ARG_CHECKED(name, index)
Definition: runtime-utils.h:85

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_INT32_ARG_CHECKED, DCHECK, v8::internal::Object::GetElement(), NULL, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [27/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayBufferGetByteLength  )

Definition at line 129 of file runtime-typedarray.cc.

129  {
130  SealHandleScope shs(isolate);
131  DCHECK(args.length() == 1);
132  CONVERT_ARG_CHECKED(JSArrayBuffer, holder, 0);
133  return holder->byte_length();
134 }
#define CONVERT_ARG_CHECKED(Type, name, index)
Definition: runtime-utils.h:24

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [28/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayBufferInitialize  )

Definition at line 104 of file runtime-typedarray.cc.

104  {
105  HandleScope scope(isolate);
106  DCHECK(args.length() == 2);
107  CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, holder, 0);
108  CONVERT_NUMBER_ARG_HANDLE_CHECKED(byteLength, 1);
109  if (!holder->byte_length()->IsUndefined()) {
110  // ArrayBuffer is already initialized; probably a fuzz test.
111  return *holder;
112  }
113  size_t allocated_length = 0;
114  if (!TryNumberToSize(isolate, *byteLength, &allocated_length)) {
116  isolate, NewRangeError("invalid_array_buffer_length",
117  HandleVector<Object>(NULL, 0)));
118  }
119  if (!Runtime::SetupArrayBufferAllocatingData(isolate, holder,
120  allocated_length)) {
122  isolate, NewRangeError("invalid_array_buffer_length",
123  HandleVector<Object>(NULL, 0)));
124  }
125  return *holder;
126 }
#define CONVERT_NUMBER_ARG_HANDLE_CHECKED(name, index)
Definition: runtime-utils.h:32

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, DCHECK, NULL, v8::internal::Runtime::SetupArrayBufferAllocatingData(), THROW_NEW_ERROR_RETURN_FAILURE, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [29/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayBufferIsView  )

Definition at line 160 of file runtime-typedarray.cc.

160  {
161  HandleScope scope(isolate);
162  DCHECK(args.length() == 1);
163  CONVERT_ARG_CHECKED(Object, object, 0);
164  return isolate->heap()->ToBoolean(object->IsJSArrayBufferView());
165 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [30/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayBufferNeuter  )

Definition at line 168 of file runtime-typedarray.cc.

168  {
169  HandleScope scope(isolate);
170  DCHECK(args.length() == 1);
171  CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, array_buffer, 0);
172  if (array_buffer->backing_store() == NULL) {
173  CHECK(Smi::FromInt(0) == array_buffer->byte_length());
174  return isolate->heap()->undefined_value();
175  }
176  DCHECK(!array_buffer->is_external());
177  void* backing_store = array_buffer->backing_store();
178  size_t byte_length = NumberToSize(isolate, array_buffer->byte_length());
179  array_buffer->set_is_external(true);
180  Runtime::NeuterArrayBuffer(array_buffer);
181  V8::ArrayBufferAllocator()->Free(backing_store, byte_length);
182  return isolate->heap()->undefined_value();
183 }

References v8::internal::V8::ArrayBufferAllocator(), CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::ArrayBuffer::Allocator::Free(), v8::internal::Smi::FromInt(), v8::internal::Runtime::NeuterArrayBuffer(), NULL, and NumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [31/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayBufferSliceImpl  )

Definition at line 137 of file runtime-typedarray.cc.

137  {
138  HandleScope scope(isolate);
139  DCHECK(args.length() == 3);
140  CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, source, 0);
141  CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, target, 1);
143  RUNTIME_ASSERT(!source.is_identical_to(target));
144  size_t start = 0;
145  RUNTIME_ASSERT(TryNumberToSize(isolate, *first, &start));
146  size_t target_length = NumberToSize(isolate, target->byte_length());
147 
148  if (target_length == 0) return isolate->heap()->undefined_value();
149 
150  size_t source_byte_length = NumberToSize(isolate, source->byte_length());
151  RUNTIME_ASSERT(start <= source_byte_length);
152  RUNTIME_ASSERT(source_byte_length - start >= target_length);
153  uint8_t* source_data = reinterpret_cast<uint8_t*>(source->backing_store());
154  uint8_t* target_data = reinterpret_cast<uint8_t*>(target->backing_store());
155  CopyBytes(target_data, source_data + start, target_length);
156  return isolate->heap()->undefined_value();
157 }
void CopyBytes(uint8_t *target, uint8_t *source)

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, CopyBytes(), DCHECK, NumberToSize(), RUNTIME_ASSERT, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [32/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayConcat  )

Array::concat implementation.

See ECMAScript 262, 15.4.4.4. TODO(581): Fix non-compliance for very large concatenations and update to following the ECMAScript 5 specification.

Definition at line 5104 of file runtime.cc.

5104  {
5105  HandleScope handle_scope(isolate);
5106  DCHECK(args.length() == 1);
5107 
5108  CONVERT_ARG_HANDLE_CHECKED(JSArray, arguments, 0);
5109  int argument_count = static_cast<int>(arguments->length()->Number());
5110  RUNTIME_ASSERT(arguments->HasFastObjectElements());
5111  Handle<FixedArray> elements(FixedArray::cast(arguments->elements()));
5112 
5113  // Pass 1: estimate the length and number of elements of the result.
5114  // The actual length can be larger if any of the arguments have getters
5115  // that mutate other arguments (but will otherwise be precise).
5116  // The number of elements is precise if there are no inherited elements.
5117 
5119 
5120  uint32_t estimate_result_length = 0;
5121  uint32_t estimate_nof_elements = 0;
5122  for (int i = 0; i < argument_count; i++) {
5123  HandleScope loop_scope(isolate);
5124  Handle<Object> obj(elements->get(i), isolate);
5125  uint32_t length_estimate;
5126  uint32_t element_estimate;
5127  if (obj->IsJSArray()) {
5128  Handle<JSArray> array(Handle<JSArray>::cast(obj));
5129  length_estimate = static_cast<uint32_t>(array->length()->Number());
5130  if (length_estimate != 0) {
5131  ElementsKind array_kind =
5132  GetPackedElementsKind(array->map()->elements_kind());
5133  if (IsMoreGeneralElementsKindTransition(kind, array_kind)) {
5134  kind = array_kind;
5135  }
5136  }
5137  element_estimate = EstimateElementCount(array);
5138  } else {
5139  if (obj->IsHeapObject()) {
5140  if (obj->IsNumber()) {
5142  kind = FAST_DOUBLE_ELEMENTS;
5143  }
5145  kind = FAST_ELEMENTS;
5146  }
5147  }
5148  length_estimate = 1;
5149  element_estimate = 1;
5150  }
5151  // Avoid overflows by capping at kMaxElementCount.
5152  if (JSObject::kMaxElementCount - estimate_result_length < length_estimate) {
5153  estimate_result_length = JSObject::kMaxElementCount;
5154  } else {
5155  estimate_result_length += length_estimate;
5156  }
5157  if (JSObject::kMaxElementCount - estimate_nof_elements < element_estimate) {
5158  estimate_nof_elements = JSObject::kMaxElementCount;
5159  } else {
5160  estimate_nof_elements += element_estimate;
5161  }
5162  }
5163 
5164  // If estimated number of elements is more than half of length, a
5165  // fixed array (fast case) is more time and space-efficient than a
5166  // dictionary.
5167  bool fast_case = (estimate_nof_elements * 2) >= estimate_result_length;
5168 
5169  if (fast_case && kind == FAST_DOUBLE_ELEMENTS) {
5170  Handle<FixedArrayBase> storage =
5171  isolate->factory()->NewFixedDoubleArray(estimate_result_length);
5172  int j = 0;
5173  bool failure = false;
5174  if (estimate_result_length > 0) {
5175  Handle<FixedDoubleArray> double_storage =
5176  Handle<FixedDoubleArray>::cast(storage);
5177  for (int i = 0; i < argument_count; i++) {
5178  Handle<Object> obj(elements->get(i), isolate);
5179  if (obj->IsSmi()) {
5180  double_storage->set(j, Smi::cast(*obj)->value());
5181  j++;
5182  } else if (obj->IsNumber()) {
5183  double_storage->set(j, obj->Number());
5184  j++;
5185  } else {
5186  JSArray* array = JSArray::cast(*obj);
5187  uint32_t length = static_cast<uint32_t>(array->length()->Number());
5188  switch (array->map()->elements_kind()) {
5190  case FAST_DOUBLE_ELEMENTS: {
5191  // Empty array is FixedArray but not FixedDoubleArray.
5192  if (length == 0) break;
5193  FixedDoubleArray* elements =
5194  FixedDoubleArray::cast(array->elements());
5195  for (uint32_t i = 0; i < length; i++) {
5196  if (elements->is_the_hole(i)) {
5197  // TODO(jkummerow/verwaest): We could be a bit more clever
5198  // here: Check if there are no elements/getters on the
5199  // prototype chain, and if so, allow creation of a holey
5200  // result array.
5201  // Same thing below (holey smi case).
5202  failure = true;
5203  break;
5204  }
5205  double double_value = elements->get_scalar(i);
5206  double_storage->set(j, double_value);
5207  j++;
5208  }
5209  break;
5210  }
5212  case FAST_SMI_ELEMENTS: {
5213  FixedArray* elements(FixedArray::cast(array->elements()));
5214  for (uint32_t i = 0; i < length; i++) {
5215  Object* element = elements->get(i);
5216  if (element->IsTheHole()) {
5217  failure = true;
5218  break;
5219  }
5220  int32_t int_value = Smi::cast(element)->value();
5221  double_storage->set(j, int_value);
5222  j++;
5223  }
5224  break;
5225  }
5226  case FAST_HOLEY_ELEMENTS:
5227  case FAST_ELEMENTS:
5228  DCHECK_EQ(0, length);
5229  break;
5230  default:
5231  UNREACHABLE();
5232  }
5233  }
5234  if (failure) break;
5235  }
5236  }
5237  if (!failure) {
5238  Handle<JSArray> array = isolate->factory()->NewJSArray(0);
5239  Smi* length = Smi::FromInt(j);
5240  Handle<Map> map;
5241  map = JSObject::GetElementsTransitionMap(array, kind);
5242  array->set_map(*map);
5243  array->set_length(length);
5244  array->set_elements(*storage);
5245  return *array;
5246  }
5247  // In case of failure, fall through.
5248  }
5249 
5250  Handle<FixedArray> storage;
5251  if (fast_case) {
5252  // The backing storage array must have non-existing elements to preserve
5253  // holes across concat operations.
5254  storage =
5255  isolate->factory()->NewFixedArrayWithHoles(estimate_result_length);
5256  } else {
5257  // TODO(126): move 25% pre-allocation logic into Dictionary::Allocate
5258  uint32_t at_least_space_for =
5259  estimate_nof_elements + (estimate_nof_elements >> 2);
5260  storage = Handle<FixedArray>::cast(
5261  SeededNumberDictionary::New(isolate, at_least_space_for));
5262  }
5263 
5264  ArrayConcatVisitor visitor(isolate, storage, fast_case);
5265 
5266  for (int i = 0; i < argument_count; i++) {
5267  Handle<Object> obj(elements->get(i), isolate);
5268  if (obj->IsJSArray()) {
5269  Handle<JSArray> array = Handle<JSArray>::cast(obj);
5270  if (!IterateElements(isolate, array, &visitor)) {
5271  return isolate->heap()->exception();
5272  }
5273  } else {
5274  visitor.visit(0, obj);
5275  visitor.increase_index_offset(1);
5276  }
5277  }
5278 
5279  if (visitor.exceeds_array_limit()) {
5281  isolate,
5282  NewRangeError("invalid_array_length", HandleVector<Object>(NULL, 0)));
5283  }
5284  return *visitor.ToArray();
5285 }
static bool IterateElements(Isolate *isolate, Handle< JSArray > receiver, ArrayConcatVisitor *visitor)
A helper function that visits elements of a JSArray in numerical order.
Definition: runtime.cc:4946
static uint32_t EstimateElementCount(Handle< JSArray > array)
Definition: runtime.cc:4722

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, DCHECK_EQ, v8::internal::Map::elements_kind(), EstimateElementCount(), v8::internal::ArrayConcatVisitor::exceeds_array_limit(), FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, FAST_SMI_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::FixedArray::get(), v8::internal::FixedDoubleArray::get_scalar(), v8::internal::JSObject::GetElementsTransitionMap(), GetPackedElementsKind(), v8::internal::ArrayConcatVisitor::increase_index_offset(), v8::internal::FixedDoubleArray::is_the_hole(), IsMoreGeneralElementsKindTransition(), IterateElements(), v8::internal::JSObject::kMaxElementCount, map, v8::internal::HeapObject::map(), v8::internal::Dictionary< SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t >::New(), NULL, v8::internal::Object::Number(), RUNTIME_ASSERT, THROW_NEW_ERROR_RETURN_FAILURE, v8::internal::ArrayConcatVisitor::ToArray(), UNREACHABLE, and v8::internal::ArrayConcatVisitor::visit().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [33/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ArrayConstructor  )

Definition at line 8856 of file runtime.cc.

8856  {
8857  HandleScope scope(isolate);
8858  // If we get 2 arguments then they are the stub parameters (constructor, type
8859  // info). If we get 4, then the first one is a pointer to the arguments
8860  // passed by the caller, and the last one is the length of the arguments
8861  // passed to the caller (redundant, but useful to check on the deoptimizer
8862  // with an assert).
8863  Arguments empty_args(0, NULL);
8864  bool no_caller_args = args.length() == 2;
8865  DCHECK(no_caller_args || args.length() == 4);
8866  int parameters_start = no_caller_args ? 0 : 1;
8867  Arguments* caller_args =
8868  no_caller_args ? &empty_args : reinterpret_cast<Arguments*>(args[0]);
8869  CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, parameters_start);
8870  CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1);
8871 #ifdef DEBUG
8872  if (!no_caller_args) {
8873  CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2);
8874  DCHECK(arg_count == caller_args->length());
8875  }
8876 #endif
8877 
8878  Handle<AllocationSite> site;
8879  if (!type_info.is_null() &&
8880  *type_info != isolate->heap()->undefined_value()) {
8881  site = Handle<AllocationSite>::cast(type_info);
8882  DCHECK(!site->SitePointsToLiteral());
8883  }
8884 
8885  return ArrayConstructorCommon(isolate, constructor, site, caller_args);
8886 }
static Object * ArrayConstructorCommon(Isolate *isolate, Handle< JSFunction > constructor, Handle< AllocationSite > site, Arguments *caller_args)
Definition: runtime.cc:8779

References ArrayConstructorCommon(), v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and NULL.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [34/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_BasicJSONStringify  )

Definition at line 27 of file runtime-json.cc.

27  {
28  HandleScope scope(isolate);
29  DCHECK(args.length() == 1);
31  BasicJsonStringifier stringifier(isolate);
32  Handle<Object> result;
33  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
34  stringifier.Stringify(object));
35  return *result;
36 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [35/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Booleanize  )

Definition at line 3232 of file runtime.cc.

3232  {
3233  SealHandleScope shs(isolate);
3234  DCHECK(args.length() == 2);
3235  CONVERT_ARG_CHECKED(Object, value_raw, 0);
3236  CONVERT_SMI_ARG_CHECKED(token_raw, 1);
3237  intptr_t value = reinterpret_cast<intptr_t>(value_raw);
3238  Token::Value token = static_cast<Token::Value>(token_raw);
3239  switch (token) {
3240  case Token::EQ:
3241  case Token::EQ_STRICT:
3242  return isolate->heap()->ToBoolean(value == 0);
3243  case Token::NE:
3244  case Token::NE_STRICT:
3245  return isolate->heap()->ToBoolean(value != 0);
3246  case Token::LT:
3247  return isolate->heap()->ToBoolean(value < 0);
3248  case Token::GT:
3249  return isolate->heap()->ToBoolean(value > 0);
3250  case Token::LTE:
3251  return isolate->heap()->ToBoolean(value <= 0);
3252  case Token::GTE:
3253  return isolate->heap()->ToBoolean(value >= 0);
3254  default:
3255  // This should only happen during natives fuzzing.
3256  return isolate->heap()->undefined_value();
3257  }
3258 }

References CONVERT_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and EQ.

◆ RUNTIME_FUNCTION() [36/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_BoundFunctionGetBindings  )

Definition at line 3619 of file runtime.cc.

3619  {
3620  HandleScope handles(isolate);
3621  DCHECK(args.length() == 1);
3622  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, callable, 0);
3623  if (callable->IsJSFunction()) {
3624  Handle<JSFunction> function = Handle<JSFunction>::cast(callable);
3625  if (function->shared()->bound()) {
3626  Handle<FixedArray> bindings(function->function_bindings());
3627  RUNTIME_ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map());
3628  return *isolate->factory()->NewJSArrayWithElements(bindings);
3629  }
3630  }
3631  return isolate->heap()->undefined_value();
3632 }

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [37/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Break  )

Definition at line 5464 of file runtime.cc.

5464  {
5465  SealHandleScope shs(isolate);
5466  DCHECK(args.length() == 0);
5467  isolate->stack_guard()->RequestDebugBreak();
5468  return isolate->heap()->undefined_value();
5469 }

References DCHECK.

◆ RUNTIME_FUNCTION() [38/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Call  )

Definition at line 3787 of file runtime.cc.

3787  {
3788  HandleScope scope(isolate);
3789  DCHECK(args.length() >= 2);
3790  int argc = args.length() - 2;
3791  CONVERT_ARG_CHECKED(JSReceiver, fun, argc + 1);
3792  Object* receiver = args[0];
3793 
3794  // If there are too many arguments, allocate argv via malloc.
3795  const int argv_small_size = 10;
3796  Handle<Object> argv_small_buffer[argv_small_size];
3797  SmartArrayPointer<Handle<Object> > argv_large_buffer;
3798  Handle<Object>* argv = argv_small_buffer;
3799  if (argc > argv_small_size) {
3800  argv = new Handle<Object>[argc];
3801  if (argv == NULL) return isolate->StackOverflow();
3802  argv_large_buffer = SmartArrayPointer<Handle<Object> >(argv);
3803  }
3804 
3805  for (int i = 0; i < argc; ++i) {
3806  argv[i] = Handle<Object>(args[1 + i], isolate);
3807  }
3808 
3809  Handle<JSReceiver> hfun(fun);
3810  Handle<Object> hreceiver(receiver, isolate);
3811  Handle<Object> result;
3813  isolate, result,
3814  Execution::Call(isolate, hfun, hreceiver, argc, argv, true));
3815  return *result;
3816 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_CHECKED, DCHECK, and NULL.

◆ RUNTIME_FUNCTION() [39/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ChangeBreakOnException  )

Definition at line 7343 of file runtime.cc.

7343  {
7344  HandleScope scope(isolate);
7345  DCHECK(args.length() == 2);
7346  CONVERT_NUMBER_CHECKED(uint32_t, type_arg, Uint32, args[0]);
7347  CONVERT_BOOLEAN_ARG_CHECKED(enable, 1);
7348 
7349  // If the number doesn't match an enum value, the ChangeBreakOnException
7350  // function will default to affecting caught exceptions.
7351  ExceptionBreakType type = static_cast<ExceptionBreakType>(type_arg);
7352  // Update break point state.
7353  isolate->debug()->ChangeBreakOnException(type, enable);
7354  return isolate->heap()->undefined_value();
7355 }
ExceptionBreakType
Definition: debug.h:45
#define CONVERT_BOOLEAN_ARG_CHECKED(name, index)
Definition: runtime-utils.h:39
#define CONVERT_NUMBER_CHECKED(type, name, Type, obj)
Definition: runtime-utils.h:60

References CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_NUMBER_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [40/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CharFromCode  )

Definition at line 365 of file runtime-strings.cc.

365  {
366  HandleScope handlescope(isolate);
367  DCHECK(args.length() == 1);
368  if (args[0]->IsNumber()) {
369  CONVERT_NUMBER_CHECKED(uint32_t, code, Uint32, args[0]);
370  code &= 0xffff;
371  return *isolate->factory()->LookupSingleCharacterStringFromCode(code);
372  }
373  return isolate->heap()->empty_string();
374 }

References CONVERT_NUMBER_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [41/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CheckExecutionState  )

Definition at line 5670 of file runtime.cc.

5670  {
5671  SealHandleScope shs(isolate);
5672  DCHECK(args.length() == 1);
5673  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
5674  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
5675  return isolate->heap()->true_value();
5676 }
static bool CheckExecutionState(Isolate *isolate, int break_id)
Definition: runtime.cc:5663

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, DCHECK, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [42/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CheckIsBootstrapping  )

Definition at line 3771 of file runtime.cc.

3771  {
3772  SealHandleScope shs(isolate);
3773  DCHECK(args.length() == 0);
3774  RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
3775  return isolate->heap()->undefined_value();
3776 }

References DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [43/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ClearBreakPoint  )

Definition at line 7328 of file runtime.cc.

7328  {
7329  HandleScope scope(isolate);
7330  DCHECK(args.length() == 1);
7331  CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 0);
7332 
7333  // Clear break point.
7334  isolate->debug()->ClearBreakPoint(break_point_object_arg);
7335 
7336  return isolate->heap()->undefined_value();
7337 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [44/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ClearFunctionTypeFeedback  )

Definition at line 150 of file runtime-test.cc.

150  {
151  HandleScope scope(isolate);
152  DCHECK(args.length() == 1);
153  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
154  function->shared()->ClearTypeFeedbackInfo();
155  Code* unoptimized = function->shared()->code();
156  if (unoptimized->kind() == Code::FUNCTION) {
157  unoptimized->ClearInlineCaches();
158  }
159  return isolate->heap()->undefined_value();
160 }

References v8::internal::Code::ClearInlineCaches(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Code::kind().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [45/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ClearStepping  )

Definition at line 7425 of file runtime.cc.

7425  {
7426  HandleScope scope(isolate);
7427  DCHECK(args.length() == 0);
7428  isolate->debug()->ClearStepping();
7429  return isolate->heap()->undefined_value();
7430 }

References DCHECK.

◆ RUNTIME_FUNCTION() [46/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CollectGarbage  )

Definition at line 8277 of file runtime.cc.

8277  {
8278  SealHandleScope shs(isolate);
8279  DCHECK(args.length() == 1);
8280  isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "%CollectGarbage");
8281  return isolate->heap()->undefined_value();
8282 }

References DCHECK, and v8::internal::Heap::kNoGCFlags.

◆ RUNTIME_FUNCTION() [47/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CollectStackTrace  )

Definition at line 8351 of file runtime.cc.

8351  {
8352  HandleScope scope(isolate);
8353  DCHECK(args.length() == 2);
8354  CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0);
8355  CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1);
8356 
8357  if (!isolate->bootstrapper()->IsActive()) {
8358  // Optionally capture a more detailed stack trace for the message.
8359  isolate->CaptureAndSetDetailedStackTrace(error_object);
8360  // Capture a simple stack trace for the stack property.
8361  isolate->CaptureAndSetSimpleStackTrace(error_object, caller);
8362  }
8363  return isolate->heap()->undefined_value();
8364 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [48/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CompileForOnStackReplacement  )

Definition at line 197 of file runtime-compiler.cc.

197  {
198  HandleScope scope(isolate);
199  DCHECK(args.length() == 1);
200  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
201  Handle<Code> caller_code(function->shared()->code());
202 
203  // We're not prepared to handle a function with arguments object.
204  DCHECK(!function->shared()->uses_arguments());
205 
206  RUNTIME_ASSERT(FLAG_use_osr);
207 
208  // Passing the PC in the javascript frame from the caller directly is
209  // not GC safe, so we walk the stack to get it.
210  JavaScriptFrameIterator it(isolate);
211  JavaScriptFrame* frame = it.frame();
212  if (!caller_code->contains(frame->pc())) {
213  // Code on the stack may not be the code object referenced by the shared
214  // function info. It may have been replaced to include deoptimization data.
215  caller_code = Handle<Code>(frame->LookupCode());
216  }
217 
218  uint32_t pc_offset =
219  static_cast<uint32_t>(frame->pc() - caller_code->instruction_start());
220 
221 #ifdef DEBUG
222  DCHECK_EQ(frame->function(), *function);
223  DCHECK_EQ(frame->LookupCode(), *caller_code);
224  DCHECK(caller_code->contains(frame->pc()));
225 #endif // DEBUG
226 
227 
228  BailoutId ast_id = caller_code->TranslatePcOffsetToAstId(pc_offset);
229  DCHECK(!ast_id.IsNone());
230 
231  Compiler::ConcurrencyMode mode =
232  isolate->concurrent_osr_enabled() &&
233  (function->shared()->ast_node_count() > 512)
234  ? Compiler::CONCURRENT
235  : Compiler::NOT_CONCURRENT;
236  Handle<Code> result = Handle<Code>::null();
237 
238  OptimizedCompileJob* job = NULL;
239  if (mode == Compiler::CONCURRENT) {
240  // Gate the OSR entry with a stack check.
241  BackEdgeTable::AddStackCheck(caller_code, pc_offset);
242  // Poll already queued compilation jobs.
243  OptimizingCompilerThread* thread = isolate->optimizing_compiler_thread();
244  if (thread->IsQueuedForOSR(function, ast_id)) {
245  if (FLAG_trace_osr) {
246  PrintF("[OSR - Still waiting for queued: ");
247  function->PrintName();
248  PrintF(" at AST id %d]\n", ast_id.ToInt());
249  }
250  return NULL;
251  }
252 
253  job = thread->FindReadyOSRCandidate(function, ast_id);
254  }
255 
256  if (job != NULL) {
257  if (FLAG_trace_osr) {
258  PrintF("[OSR - Found ready: ");
259  function->PrintName();
260  PrintF(" at AST id %d]\n", ast_id.ToInt());
261  }
262  result = Compiler::GetConcurrentlyOptimizedCode(job);
263  } else if (IsSuitableForOnStackReplacement(isolate, function, caller_code)) {
264  if (FLAG_trace_osr) {
265  PrintF("[OSR - Compiling: ");
266  function->PrintName();
267  PrintF(" at AST id %d]\n", ast_id.ToInt());
268  }
269  MaybeHandle<Code> maybe_result =
270  Compiler::GetOptimizedCode(function, caller_code, mode, ast_id);
271  if (maybe_result.ToHandle(&result) &&
272  result.is_identical_to(isolate->builtins()->InOptimizationQueue())) {
273  // Optimization is queued. Return to check later.
274  return NULL;
275  }
276  }
277 
278  // Revert the patched back edge table, regardless of whether OSR succeeds.
279  BackEdgeTable::Revert(isolate, *caller_code);
280 
281  // Check whether we ended up with usable optimized code.
282  if (!result.is_null() && result->kind() == Code::OPTIMIZED_FUNCTION) {
283  DeoptimizationInputData* data =
284  DeoptimizationInputData::cast(result->deoptimization_data());
285 
286  if (data->OsrPcOffset()->value() >= 0) {
287  DCHECK(BailoutId(data->OsrAstId()->value()) == ast_id);
288  if (FLAG_trace_osr) {
289  PrintF("[OSR - Entry at AST id %d, offset %d in optimized code]\n",
290  ast_id.ToInt(), data->OsrPcOffset()->value());
291  }
292  // TODO(titzer): this is a massive hack to make the deopt counts
293  // match. Fix heuristics for reenabling optimizations!
294  function->shared()->increment_deopt_count();
295 
296  // TODO(titzer): Do not install code into the function.
297  function->ReplaceCode(*result);
298  return *result;
299  }
300  }
301 
302  // Failed.
303  if (FLAG_trace_osr) {
304  PrintF("[OSR - Failed: ");
305  function->PrintName();
306  PrintF(" at AST id %d]\n", ast_id.ToInt());
307  }
308 
309  if (!function->IsOptimized()) {
310  function->ReplaceCode(function->shared()->code());
311  }
312  return NULL;
313 }
static bool IsSuitableForOnStackReplacement(Isolate *isolate, Handle< JSFunction > function, Handle< Code > current_code)

References v8::internal::BackEdgeTable::AddStackCheck(), v8::internal::Compiler::CONCURRENT, CONVERT_ARG_HANDLE_CHECKED, DCHECK, DCHECK_EQ, v8::internal::OptimizingCompilerThread::FindReadyOSRCandidate(), v8::internal::JavaScriptFrame::function(), v8::internal::Compiler::GetConcurrentlyOptimizedCode(), v8::internal::Compiler::GetOptimizedCode(), v8::internal::Handle< T >::is_null(), v8::internal::BailoutId::IsNone(), v8::internal::OptimizingCompilerThread::IsQueuedForOSR(), IsSuitableForOnStackReplacement(), mode(), v8::internal::Compiler::NOT_CONCURRENT, NULL, v8::internal::Handle< T >::null(), PrintF(), v8::internal::BackEdgeTable::Revert(), RUNTIME_ASSERT, and v8::internal::BailoutId::ToInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [49/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CompileLazy  )

Definition at line 23 of file runtime-compiler.cc.

23  {
24  HandleScope scope(isolate);
25  DCHECK(args.length() == 1);
26  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
27 #ifdef DEBUG
28  if (FLAG_trace_lazy && !function->shared()->is_compiled()) {
29  PrintF("[unoptimized: ");
30  function->PrintName();
31  PrintF("]\n");
32  }
33 #endif
34 
35  // Compile the target function.
36  DCHECK(function->shared()->allows_lazy_compilation());
37 
38  Handle<Code> code;
40  Compiler::GetLazyCode(function));
41  DCHECK(code->kind() == Code::FUNCTION ||
42  code->kind() == Code::OPTIMIZED_FUNCTION);
43  function->ReplaceCode(*code);
44  return *code;
45 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Compiler::GetLazyCode(), and PrintF().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [50/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CompileOptimized  )

Definition at line 48 of file runtime-compiler.cc.

48  {
49  HandleScope scope(isolate);
50  DCHECK(args.length() == 2);
51  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
52  CONVERT_BOOLEAN_ARG_CHECKED(concurrent, 1);
53 
54  Handle<Code> unoptimized(function->shared()->code());
55  if (!isolate->use_crankshaft() ||
56  function->shared()->optimization_disabled() ||
57  isolate->DebuggerHasBreakPoints()) {
58  // If the function is not optimizable or debugger is active continue
59  // using the code from the full compiler.
60  if (FLAG_trace_opt) {
61  PrintF("[failed to optimize ");
62  function->PrintName();
63  PrintF(": is code optimizable: %s, is debugger enabled: %s]\n",
64  function->shared()->optimization_disabled() ? "F" : "T",
65  isolate->DebuggerHasBreakPoints() ? "T" : "F");
66  }
67  function->ReplaceCode(*unoptimized);
68  return function->code();
69  }
70 
71  Compiler::ConcurrencyMode mode =
72  concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT;
73  Handle<Code> code;
74  if (Compiler::GetOptimizedCode(function, unoptimized, mode).ToHandle(&code)) {
75  function->ReplaceCode(*code);
76  } else {
77  function->ReplaceCode(function->shared()->code());
78  }
79 
80  DCHECK(function->code()->kind() == Code::FUNCTION ||
81  function->code()->kind() == Code::OPTIMIZED_FUNCTION ||
82  function->IsInOptimizationQueue());
83  return function->code();
84 }

References v8::internal::Compiler::CONCURRENT, CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, v8::internal::Compiler::GetOptimizedCode(), mode(), v8::internal::Compiler::NOT_CONCURRENT, and PrintF().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [51/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CompileString  )

Definition at line 351 of file runtime-compiler.cc.

351  {
352  HandleScope scope(isolate);
353  DCHECK(args.length() == 2);
354  CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
355  CONVERT_BOOLEAN_ARG_CHECKED(function_literal_only, 1);
356 
357  // Extract native context.
358  Handle<Context> context(isolate->native_context());
359 
360  // Check if native context allows code generation from
361  // strings. Throw an exception if it doesn't.
362  if (context->allow_code_gen_from_strings()->IsFalse() &&
363  !CodeGenerationFromStringsAllowed(isolate, context)) {
364  Handle<Object> error_message =
365  context->ErrorMessageForCodeGenerationFromStrings();
367  isolate, NewEvalError("code_gen_from_strings",
368  HandleVector<Object>(&error_message, 1)));
369  }
370 
371  // Compile source string in the native context.
372  ParseRestriction restriction = function_literal_only
375  Handle<JSFunction> fun;
377  isolate, fun,
378  Compiler::GetFunctionFromEval(source, context, SLOPPY, restriction,
379  RelocInfo::kNoPosition));
380  return *fun;
381 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CodeGenerationFromStringsAllowed(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, v8::internal::Compiler::GetFunctionFromEval(), v8::internal::RelocInfo::kNoPosition, NO_PARSE_RESTRICTION, ONLY_SINGLE_FUNCTION_LITERAL, SLOPPY, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [52/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ConstructDouble  )

Definition at line 53 of file runtime-maths.cc.

53  {
54  HandleScope scope(isolate);
55  DCHECK(args.length() == 2);
56  CONVERT_NUMBER_CHECKED(uint32_t, hi, Uint32, args[0]);
57  CONVERT_NUMBER_CHECKED(uint32_t, lo, Uint32, args[1]);
58  uint64_t result = (static_cast<uint64_t>(hi) << 32) | lo;
59  return *isolate->factory()->NewNumber(uint64_to_double(result));
60 }
double uint64_to_double(uint64_t d64)
Definition: double.h:15

References CONVERT_NUMBER_CHECKED, DCHECK, hi, lo, and uint64_to_double().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [53/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateApiFunction  )

Definition at line 962 of file runtime.cc.

962  {
963  HandleScope scope(isolate);
964  DCHECK(args.length() == 2);
965  CONVERT_ARG_HANDLE_CHECKED(FunctionTemplateInfo, data, 0);
966  CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
967  return *isolate->factory()->CreateApiFunction(data, prototype);
968 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [54/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateArrayLiteral  )

Definition at line 450 of file runtime.cc.

450  {
451  HandleScope scope(isolate);
452  DCHECK(args.length() == 4);
453  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
454  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
455  CONVERT_ARG_HANDLE_CHECKED(FixedArray, elements, 2);
457 
458  Handle<JSObject> result;
460  isolate, result, CreateArrayLiteralImpl(isolate, literals, literals_index,
461  elements, flags));
462  return *result;
463 }
static MaybeHandle< JSObject > CreateArrayLiteralImpl(Isolate *isolate, Handle< FixedArray > literals, int literals_index, Handle< FixedArray > elements, int flags)
Definition: runtime.cc:423

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, CreateArrayLiteralImpl(), DCHECK, v8::internal::anonymous_namespace{flags.cc}::flags, and literals().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [55/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateArrayLiteralStubBailout  )

Definition at line 466 of file runtime.cc.

466  {
467  HandleScope scope(isolate);
468  DCHECK(args.length() == 3);
469  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
470  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
471  CONVERT_ARG_HANDLE_CHECKED(FixedArray, elements, 2);
472 
473  Handle<JSObject> result;
475  isolate, result,
476  CreateArrayLiteralImpl(isolate, literals, literals_index, elements,
477  ArrayLiteral::kShallowElements));
478  return *result;
479 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, CreateArrayLiteralImpl(), DCHECK, and literals().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [56/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateGlobalPrivateOwnSymbol  )

Definition at line 515 of file runtime.cc.

515  {
516  HandleScope scope(isolate);
517  DCHECK(args.length() == 1);
518  CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
519  Handle<JSObject> registry = isolate->GetSymbolRegistry();
520  Handle<String> part = isolate->factory()->private_intern_string();
521  Handle<Object> privates;
523  isolate, privates, Object::GetPropertyOrElement(registry, part));
524  Handle<Object> symbol;
526  isolate, symbol, Object::GetPropertyOrElement(privates, name));
527  if (!symbol->IsSymbol()) {
528  DCHECK(symbol->IsUndefined());
529  symbol = isolate->factory()->NewPrivateSymbol();
530  Handle<Symbol>::cast(symbol)->set_name(*name);
531  Handle<Symbol>::cast(symbol)->set_is_own(true);
532  JSObject::SetProperty(Handle<JSObject>::cast(privates), name, symbol,
533  STRICT).Assert();
534  }
535  return *symbol;
536 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Object::GetPropertyOrElement(), name, v8::internal::Object::SetProperty(), and STRICT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [57/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateJSFunctionProxy  )

Definition at line 580 of file runtime.cc.

580  {
581  HandleScope scope(isolate);
582  DCHECK(args.length() == 4);
583  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 0);
584  CONVERT_ARG_HANDLE_CHECKED(Object, call_trap, 1);
585  RUNTIME_ASSERT(call_trap->IsJSFunction() || call_trap->IsJSFunctionProxy());
586  CONVERT_ARG_HANDLE_CHECKED(JSFunction, construct_trap, 2);
587  CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 3);
588  if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value();
589  return *isolate->factory()->NewJSFunctionProxy(handler, call_trap,
590  construct_trap, prototype);
591 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [58/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateJSGeneratorObject  )

Definition at line 1686 of file runtime.cc.

1686  {
1687  HandleScope scope(isolate);
1688  DCHECK(args.length() == 0);
1689 
1690  JavaScriptFrameIterator it(isolate);
1691  JavaScriptFrame* frame = it.frame();
1692  Handle<JSFunction> function(frame->function());
1693  RUNTIME_ASSERT(function->shared()->is_generator());
1694 
1695  Handle<JSGeneratorObject> generator;
1696  if (frame->IsConstructor()) {
1697  generator = handle(JSGeneratorObject::cast(frame->receiver()));
1698  } else {
1699  generator = isolate->factory()->NewJSGeneratorObject(function);
1700  }
1701  generator->set_function(*function);
1702  generator->set_context(Context::cast(frame->context()));
1703  generator->set_receiver(frame->receiver());
1704  generator->set_continuation(0);
1705  generator->set_operand_stack(isolate->heap()->empty_fixed_array());
1706  generator->set_stack_handler_index(-1);
1707 
1708  return *generator;
1709 }

References v8::internal::Context::cast(), v8::internal::StandardFrame::context(), DCHECK, v8::internal::JavaScriptFrame::function(), handle(), v8::internal::JavaScriptFrame::IsConstructor(), v8::internal::JavaScriptFrame::receiver(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [59/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateJSProxy  )

Definition at line 570 of file runtime.cc.

570  {
571  HandleScope scope(isolate);
572  DCHECK(args.length() == 2);
573  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 0);
574  CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
575  if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value();
576  return *isolate->factory()->NewJSProxy(handler, prototype);
577 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [60/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateObjectLiteral  )

Definition at line 342 of file runtime.cc.

342  {
343  HandleScope scope(isolate);
344  DCHECK(args.length() == 4);
345  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
346  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
347  CONVERT_ARG_HANDLE_CHECKED(FixedArray, constant_properties, 2);
349  bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0;
350  bool has_function_literal = (flags & ObjectLiteral::kHasFunction) != 0;
351 
352  RUNTIME_ASSERT(literals_index >= 0 && literals_index < literals->length());
353 
354  // Check if boilerplate exists. If not, create it first.
355  Handle<Object> literal_site(literals->get(literals_index), isolate);
356  Handle<AllocationSite> site;
357  Handle<JSObject> boilerplate;
358  if (*literal_site == isolate->heap()->undefined_value()) {
359  Handle<Object> raw_boilerplate;
361  isolate, raw_boilerplate,
362  CreateObjectLiteralBoilerplate(isolate, literals, constant_properties,
363  should_have_fast_elements,
364  has_function_literal));
365  boilerplate = Handle<JSObject>::cast(raw_boilerplate);
366 
367  AllocationSiteCreationContext creation_context(isolate);
368  site = creation_context.EnterNewScope();
370  isolate, JSObject::DeepWalk(boilerplate, &creation_context));
371  creation_context.ExitScope(site, boilerplate);
372 
373  // Update the functions literal and return the boilerplate.
374  literals->set(literals_index, *site);
375  } else {
376  site = Handle<AllocationSite>::cast(literal_site);
377  boilerplate =
378  Handle<JSObject>(JSObject::cast(site->transition_info()), isolate);
379  }
380 
381  AllocationSiteUsageContext usage_context(isolate, site, true);
382  usage_context.EnterNewScope();
383  MaybeHandle<Object> maybe_copy =
384  JSObject::DeepCopy(boilerplate, &usage_context);
385  usage_context.ExitScope(site, boilerplate);
386  Handle<Object> copy;
387  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, copy, maybe_copy);
388  return *copy;
389 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, CreateObjectLiteralBoilerplate(), DCHECK, v8::internal::JSObject::DeepCopy(), v8::internal::JSObject::DeepWalk(), v8::internal::AllocationSiteCreationContext::EnterNewScope(), v8::internal::AllocationSiteUsageContext::EnterNewScope(), v8::internal::AllocationSiteUsageContext::ExitScope(), v8::internal::AllocationSiteCreationContext::ExitScope(), v8::internal::anonymous_namespace{flags.cc}::flags, literals(), RETURN_FAILURE_ON_EXCEPTION, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [61/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreatePrivateOwnSymbol  )

Definition at line 504 of file runtime.cc.

504  {
505  HandleScope scope(isolate);
506  DCHECK(args.length() == 1);
508  RUNTIME_ASSERT(name->IsString() || name->IsUndefined());
509  Handle<Symbol> symbol = isolate->factory()->NewPrivateOwnSymbol();
510  if (name->IsString()) symbol->set_name(*name);
511  return *symbol;
512 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, name, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [62/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreatePrivateSymbol  )

Definition at line 493 of file runtime.cc.

493  {
494  HandleScope scope(isolate);
495  DCHECK(args.length() == 1);
497  RUNTIME_ASSERT(name->IsString() || name->IsUndefined());
498  Handle<Symbol> symbol = isolate->factory()->NewPrivateSymbol();
499  if (name->IsString()) symbol->set_name(*name);
500  return *symbol;
501 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, name, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [63/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_CreateSymbol  )

Definition at line 482 of file runtime.cc.

482  {
483  HandleScope scope(isolate);
484  DCHECK(args.length() == 1);
486  RUNTIME_ASSERT(name->IsString() || name->IsUndefined());
487  Handle<Symbol> symbol = isolate->factory()->NewSymbol();
488  if (name->IsString()) symbol->set_name(*name);
489  return *symbol;
490 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, name, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [64/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DataViewInitialize  )

Definition at line 503 of file runtime-typedarray.cc.

503  {
504  HandleScope scope(isolate);
505  DCHECK(args.length() == 4);
506  CONVERT_ARG_HANDLE_CHECKED(JSDataView, holder, 0);
507  CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, buffer, 1);
508  CONVERT_NUMBER_ARG_HANDLE_CHECKED(byte_offset, 2);
509  CONVERT_NUMBER_ARG_HANDLE_CHECKED(byte_length, 3);
510 
511  DCHECK(holder->GetInternalFieldCount() ==
513  for (int i = 0; i < v8::ArrayBufferView::kInternalFieldCount; i++) {
514  holder->SetInternalField(i, Smi::FromInt(0));
515  }
516  size_t buffer_length = 0;
517  size_t offset = 0;
518  size_t length = 0;
520  TryNumberToSize(isolate, buffer->byte_length(), &buffer_length));
521  RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_offset, &offset));
522  RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_length, &length));
523 
524  // TODO(jkummerow): When we have a "safe numerics" helper class, use it here.
525  // Entire range [offset, offset + length] must be in bounds.
526  RUNTIME_ASSERT(offset <= buffer_length);
527  RUNTIME_ASSERT(offset + length <= buffer_length);
528  // No overflow.
529  RUNTIME_ASSERT(offset + length >= offset);
530 
531  holder->set_buffer(*buffer);
532  holder->set_byte_offset(*byte_offset);
533  holder->set_byte_length(*byte_length);
534 
535  holder->set_weak_next(buffer->weak_first_view());
536  buffer->set_weak_first_view(*holder);
537 
538  return isolate->heap()->undefined_value();
539 }
static const int kInternalFieldCount
Definition: v8.h:2992

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::ArrayBufferView::kInternalFieldCount, RUNTIME_ASSERT, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [65/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateCacheVersion  )

Definition at line 4507 of file runtime.cc.

4507  {
4508  HandleScope hs(isolate);
4509  DCHECK(args.length() == 0);
4510  if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) {
4511  Handle<FixedArray> date_cache_version =
4512  isolate->factory()->NewFixedArray(1, TENURED);
4513  date_cache_version->set(0, Smi::FromInt(0));
4514  isolate->eternal_handles()->CreateSingleton(
4515  isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION);
4516  }
4517  Handle<FixedArray> date_cache_version =
4518  Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton(
4519  EternalHandles::DATE_CACHE_VERSION));
4520  // Return result as a JS array.
4521  Handle<JSObject> result =
4522  isolate->factory()->NewJSObject(isolate->array_function());
4523  JSArray::SetContent(Handle<JSArray>::cast(result), date_cache_version);
4524  return *result;
4525 }

References v8::internal::Handle< T >::cast(), v8::internal::EternalHandles::DATE_CACHE_VERSION, DCHECK, v8::internal::Smi::FromInt(), hs, v8::internal::JSArray::SetContent(), and TENURED.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [66/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateCurrentTime  )

Definition at line 4425 of file runtime.cc.

4425  {
4426  HandleScope scope(isolate);
4427  DCHECK(args.length() == 0);
4428  if (FLAG_log_timer_events) LOG(isolate, CurrentTimeEvent());
4429 
4430  // According to ECMA-262, section 15.9.1, page 117, the precision of
4431  // the number in a Date object representing a particular instant in
4432  // time is milliseconds. Therefore, we floor the result of getting
4433  // the OS time.
4434  double millis;
4435  if (FLAG_verify_predictable) {
4436  millis = 1388534400000.0; // Jan 1 2014 00:00:00 GMT+0000
4437  millis += Floor(isolate->heap()->synthetic_time());
4438  } else {
4439  millis = Floor(base::OS::TimeCurrentMillis());
4440  }
4441  return *isolate->factory()->NewNumber(millis);
4442 }
double Floor(double x)
Definition: utils.h:159

References DCHECK, Floor(), LOG, and v8::base::OS::TimeCurrentMillis().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [67/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateLocalTimezone  )

Definition at line 4479 of file runtime.cc.

4479  {
4480  HandleScope scope(isolate);
4481  DCHECK(args.length() == 1);
4482 
4484  RUNTIME_ASSERT(x >= -DateCache::kMaxTimeBeforeUTCInMs &&
4485  x <= DateCache::kMaxTimeBeforeUTCInMs);
4486  const char* zone =
4487  isolate->date_cache()->LocalTimezone(static_cast<int64_t>(x));
4488  Handle<String> result =
4489  isolate->factory()->NewStringFromUtf8(CStrVector(zone)).ToHandleChecked();
4490  return *result;
4491 }
Vector< const char > CStrVector(const char *data)
Definition: vector.h:158
#define CONVERT_DOUBLE_ARG_CHECKED(name, index)
Definition: runtime-utils.h:53

References CONVERT_DOUBLE_ARG_CHECKED, CStrVector(), DCHECK, v8::internal::DateCache::kMaxTimeBeforeUTCInMs, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [68/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateMakeDay  )

Definition at line 3279 of file runtime.cc.

3279  {
3280  SealHandleScope shs(isolate);
3281  DCHECK(args.length() == 2);
3282 
3283  CONVERT_SMI_ARG_CHECKED(year, 0);
3284  CONVERT_SMI_ARG_CHECKED(month, 1);
3285 
3286  int days = isolate->date_cache()->DaysFromYearMonth(year, month);
3287  RUNTIME_ASSERT(Smi::IsValid(days));
3288  return Smi::FromInt(days);
3289 }

References CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::Smi::IsValid(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [69/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateParseString  )

Definition at line 4445 of file runtime.cc.

4445  {
4446  HandleScope scope(isolate);
4447  DCHECK(args.length() == 2);
4448  CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
4449  CONVERT_ARG_HANDLE_CHECKED(JSArray, output, 1);
4450 
4451  RUNTIME_ASSERT(output->HasFastElements());
4452  JSObject::EnsureCanContainHeapObjectElements(output);
4453  RUNTIME_ASSERT(output->HasFastObjectElements());
4454  Handle<FixedArray> output_array(FixedArray::cast(output->elements()));
4455  RUNTIME_ASSERT(output_array->length() >= DateParser::OUTPUT_SIZE);
4456 
4457  str = String::Flatten(str);
4458  DisallowHeapAllocation no_gc;
4459 
4460  bool result;
4461  String::FlatContent str_content = str->GetFlatContent();
4462  if (str_content.IsOneByte()) {
4463  result = DateParser::Parse(str_content.ToOneByteVector(), *output_array,
4464  isolate->unicode_cache());
4465  } else {
4466  DCHECK(str_content.IsTwoByte());
4467  result = DateParser::Parse(str_content.ToUC16Vector(), *output_array,
4468  isolate->unicode_cache());
4469  }
4470 
4471  if (result) {
4472  return *output;
4473  } else {
4474  return isolate->heap()->null_value();
4475  }
4476 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSObject::EnsureCanContainHeapObjectElements(), v8::internal::String::Flatten(), v8::internal::String::FlatContent::IsOneByte(), v8::internal::String::FlatContent::IsTwoByte(), v8::internal::DateParser::OUTPUT_SIZE, v8::internal::DateParser::Parse(), RUNTIME_ASSERT, v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [70/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateSetValue  )

Definition at line 3292 of file runtime.cc.

3292  {
3293  HandleScope scope(isolate);
3294  DCHECK(args.length() == 3);
3295 
3296  CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 0);
3297  CONVERT_DOUBLE_ARG_CHECKED(time, 1);
3298  CONVERT_SMI_ARG_CHECKED(is_utc, 2);
3299 
3300  DateCache* date_cache = isolate->date_cache();
3301 
3302  Handle<Object> value;
3303  ;
3304  bool is_value_nan = false;
3305  if (std::isnan(time)) {
3306  value = isolate->factory()->nan_value();
3307  is_value_nan = true;
3308  } else if (!is_utc && (time < -DateCache::kMaxTimeBeforeUTCInMs ||
3309  time > DateCache::kMaxTimeBeforeUTCInMs)) {
3310  value = isolate->factory()->nan_value();
3311  is_value_nan = true;
3312  } else {
3313  time = is_utc ? time : date_cache->ToUTC(static_cast<int64_t>(time));
3314  if (time < -DateCache::kMaxTimeInMs || time > DateCache::kMaxTimeInMs) {
3315  value = isolate->factory()->nan_value();
3316  is_value_nan = true;
3317  } else {
3318  value = isolate->factory()->NewNumber(DoubleToInteger(time));
3319  }
3320  }
3321  date->SetValue(*value, is_value_nan);
3322  return *value;
3323 }
double DoubleToInteger(double x)

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_DOUBLE_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DoubleToInteger(), v8::internal::DateCache::kMaxTimeBeforeUTCInMs, v8::internal::DateCache::kMaxTimeInMs, and v8::internal::DateCache::ToUTC().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [71/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DateToUTC  )

Definition at line 4494 of file runtime.cc.

4494  {
4495  HandleScope scope(isolate);
4496  DCHECK(args.length() == 1);
4497 
4499  RUNTIME_ASSERT(x >= -DateCache::kMaxTimeBeforeUTCInMs &&
4500  x <= DateCache::kMaxTimeBeforeUTCInMs);
4501  int64_t time = isolate->date_cache()->ToUTC(static_cast<int64_t>(x));
4502 
4503  return *isolate->factory()->NewNumber(static_cast<double>(time));
4504 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, v8::internal::DateCache::kMaxTimeBeforeUTCInMs, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [72/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugAsyncTaskEvent  )

Definition at line 2670 of file runtime.cc.

2670  {
2671  DCHECK(args.length() == 1);
2672  HandleScope scope(isolate);
2673  CONVERT_ARG_HANDLE_CHECKED(JSObject, data, 0);
2674  isolate->debug()->OnAsyncTaskEvent(data);
2675  return isolate->heap()->undefined_value();
2676 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [73/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugBreak  )

Definition at line 5427 of file runtime.cc.

5427  {
5428  SealHandleScope shs(isolate);
5429  DCHECK(args.length() == 0);
5430  isolate->debug()->HandleDebugBreak();
5431  return isolate->heap()->undefined_value();
5432 }

References DCHECK.

◆ RUNTIME_FUNCTION() [74/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugCallbackSupportsStepping  )

Definition at line 2596 of file runtime.cc.

2596  {
2597  DCHECK(args.length() == 1);
2598  if (!isolate->debug()->is_active() || !isolate->debug()->StepInActive()) {
2599  return isolate->heap()->false_value();
2600  }
2601  CONVERT_ARG_CHECKED(Object, callback, 0);
2602  // We do not step into the callback if it's a builtin or not even a function.
2603  return isolate->heap()->ToBoolean(callback->IsJSFunction() &&
2604  !JSFunction::cast(callback)->IsBuiltin());
2605 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [75/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugConstructedBy  )

Definition at line 7825 of file runtime.cc.

7825  {
7826  HandleScope scope(isolate);
7827  DCHECK(args.length() == 2);
7828 
7829 
7830  // Check parameters.
7831  CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
7832  CONVERT_NUMBER_CHECKED(int32_t, max_references, Int32, args[1]);
7833  RUNTIME_ASSERT(max_references >= 0);
7834 
7835  // Get the number of referencing objects.
7836  int count;
7837  // First perform a full GC in order to avoid dead objects and to make the heap
7838  // iterable.
7839  Heap* heap = isolate->heap();
7840  heap->CollectAllGarbage(Heap::kMakeHeapIterableMask, "%DebugConstructedBy");
7841  {
7842  HeapIterator heap_iterator(heap);
7843  count = DebugConstructedBy(&heap_iterator, *constructor, max_references,
7844  NULL, 0);
7845  }
7846 
7847  // Allocate an array to hold the result.
7848  Handle<FixedArray> instances = isolate->factory()->NewFixedArray(count);
7849 
7850  // Fill the referencing objects.
7851  {
7852  HeapIterator heap_iterator2(heap);
7853  count = DebugConstructedBy(&heap_iterator2, *constructor, max_references,
7854  *instances, count);
7855  }
7856 
7857  // Return result as JS array.
7858  Handle<JSFunction> array_function = isolate->array_function();
7859  Handle<JSObject> result = isolate->factory()->NewJSObject(array_function);
7860  JSArray::SetContent(Handle<JSArray>::cast(result), instances);
7861  return *result;
7862 }
static int DebugConstructedBy(HeapIterator *iterator, JSFunction *constructor, int max_references, FixedArray *instances, int instances_size)
Definition: runtime.cc:7793

References v8::internal::Heap::CollectAllGarbage(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, DebugConstructedBy(), v8::internal::Heap::kMakeHeapIterableMask, NULL, RUNTIME_ASSERT, and v8::internal::JSArray::SetContent().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [76/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugDisassembleConstructor  )

Definition at line 7911 of file runtime.cc.

7911  {
7912  HandleScope scope(isolate);
7913 #ifdef DEBUG
7914  DCHECK(args.length() == 1);
7915  // Get the function and make sure it is compiled.
7916  CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
7917  if (!Compiler::EnsureCompiled(func, KEEP_EXCEPTION)) {
7918  return isolate->heap()->exception();
7919  }
7920  OFStream os(stdout);
7921  func->shared()->construct_stub()->Print(os);
7922  os << endl;
7923 #endif // DEBUG
7924  return isolate->heap()->undefined_value();
7925 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, endl(), v8::internal::Compiler::EnsureCompiled(), and KEEP_EXCEPTION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [77/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugDisassembleFunction  )

Definition at line 7894 of file runtime.cc.

7894  {
7895  HandleScope scope(isolate);
7896 #ifdef DEBUG
7897  DCHECK(args.length() == 1);
7898  // Get the function and make sure it is compiled.
7899  CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
7900  if (!Compiler::EnsureCompiled(func, KEEP_EXCEPTION)) {
7901  return isolate->heap()->exception();
7902  }
7903  OFStream os(stdout);
7904  func->code()->Print(os);
7905  os << endl;
7906 #endif // DEBUG
7907  return isolate->heap()->undefined_value();
7908 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, endl(), v8::internal::Compiler::EnsureCompiled(), and KEEP_EXCEPTION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [78/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugEvaluate  )

Definition at line 7509 of file runtime.cc.

7509  {
7510  HandleScope scope(isolate);
7511 
7512  // Check the execution state and decode arguments frame and source to be
7513  // evaluated.
7514  DCHECK(args.length() == 6);
7515  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7516  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7517 
7518  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
7519  CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]);
7520  CONVERT_ARG_HANDLE_CHECKED(String, source, 3);
7521  CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 4);
7522  CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 5);
7523 
7524  // Handle the processing of break.
7525  DisableBreak disable_break_scope(isolate->debug(), disable_break);
7526 
7527  // Get the frame where the debugging is performed.
7528  StackFrame::Id id = UnwrapFrameId(wrapped_id);
7529  JavaScriptFrameIterator it(isolate, id);
7530  JavaScriptFrame* frame = it.frame();
7531  FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate);
7532  Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction()));
7533 
7534  // Traverse the saved contexts chain to find the active context for the
7535  // selected frame.
7536  SaveContext* save = FindSavedContextForFrame(isolate, frame);
7537 
7538  SaveContext savex(isolate);
7539  isolate->set_context(*(save->context()));
7540 
7541  // Materialize stack locals and the arguments object.
7542  Handle<JSObject> materialized = NewJSObjectWithNullProto(isolate);
7543 
7545  isolate, materialized,
7546  MaterializeStackLocalsWithFrameInspector(isolate, materialized, function,
7547  &frame_inspector));
7548 
7550  isolate, materialized,
7551  MaterializeArgumentsObject(isolate, materialized, function));
7552 
7553  // At this point, the lookup chain may look like this:
7554  // [inner context] -> [function stack]+[function context] -> [outer context]
7555  // The function stack is not an actual context, it complements the function
7556  // context. In order to have the same lookup chain when debug-evaluating,
7557  // we materialize the stack and insert it into the context chain as a
7558  // with-context before the function context.
7559  // [inner context] -> [with context] -> [function context] -> [outer context]
7560  // Ordering the with-context before the function context forces a dynamic
7561  // lookup instead of a static lookup that could fail as the scope info is
7562  // outdated and may expect variables to still be stack-allocated.
7563  // Afterwards, we write changes to the with-context back to the stack
7564  // and remove it from the context chain.
7565  // This could cause lookup failures if debug-evaluate creates a closure that
7566  // uses this temporary context chain.
7567 
7568  Handle<Context> eval_context(Context::cast(frame_inspector.GetContext()));
7569  DCHECK(!eval_context.is_null());
7570  Handle<Context> function_context = eval_context;
7571  Handle<Context> outer_context(function->context(), isolate);
7572  Handle<Context> inner_context;
7573  // We iterate to find the function's context. If the function has no
7574  // context-allocated variables, we iterate until we hit the outer context.
7575  while (!function_context->IsFunctionContext() &&
7576  !function_context.is_identical_to(outer_context)) {
7577  inner_context = function_context;
7578  function_context = Handle<Context>(function_context->previous(), isolate);
7579  }
7580 
7581  Handle<Context> materialized_context = isolate->factory()->NewWithContext(
7582  function, function_context, materialized);
7583 
7584  if (inner_context.is_null()) {
7585  // No inner context. The with-context is now inner-most.
7586  eval_context = materialized_context;
7587  } else {
7588  inner_context->set_previous(*materialized_context);
7589  }
7590 
7591  Handle<Object> receiver(frame->receiver(), isolate);
7592  MaybeHandle<Object> maybe_result =
7593  DebugEvaluate(isolate, eval_context, context_extension, receiver, source);
7594 
7595  // Remove with-context if it was inserted in between.
7596  if (!inner_context.is_null()) inner_context->set_previous(*function_context);
7597 
7598  Handle<Object> result;
7599  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, maybe_result);
7600 
7601  // Write back potential changes to materialized stack locals to the stack.
7602  UpdateStackLocalsFromMaterializedObject(isolate, materialized, function,
7603  frame, inlined_jsframe_index);
7604 
7605  return *result;
7606 }
static void UpdateStackLocalsFromMaterializedObject(Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function, JavaScriptFrame *frame, int inlined_jsframe_index)
Definition: runtime.cc:6132
static StackFrame::Id UnwrapFrameId(int wrapped)
Definition: runtime.cc:5442
static SaveContext * FindSavedContextForFrame(Isolate *isolate, JavaScriptFrame *frame)
Definition: runtime.cc:5790
static MaybeHandle< Object > DebugEvaluate(Isolate *isolate, Handle< Context > context, Handle< Object > context_extension, Handle< Object > receiver, Handle< String > source)
Definition: runtime.cc:7457
static Handle< JSObject > NewJSObjectWithNullProto(Isolate *isolate)
Definition: runtime.cc:7494
static MUST_USE_RESULT MaybeHandle< JSObject > MaterializeArgumentsObject(Isolate *isolate, Handle< JSObject > target, Handle< JSFunction > function)
Definition: runtime.cc:7435

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Context::cast(), CheckExecutionState(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DebugEvaluate(), FindSavedContextForFrame(), v8::internal::FrameInspector::GetContext(), v8::internal::FrameInspector::GetFunction(), v8::internal::Handle< T >::is_null(), MaterializeArgumentsObject(), MaterializeStackLocalsWithFrameInspector(), NewJSObjectWithNullProto(), v8::internal::JavaScriptFrame::receiver(), RUNTIME_ASSERT, UnwrapFrameId(), and UpdateStackLocalsFromMaterializedObject().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [79/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugEvaluateGlobal  )

Definition at line 7609 of file runtime.cc.

7609  {
7610  HandleScope scope(isolate);
7611 
7612  // Check the execution state and decode arguments frame and source to be
7613  // evaluated.
7614  DCHECK(args.length() == 4);
7615  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7616  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7617 
7618  CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
7619  CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 2);
7620  CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 3);
7621 
7622  // Handle the processing of break.
7623  DisableBreak disable_break_scope(isolate->debug(), disable_break);
7624 
7625  // Enter the top context from before the debugger was invoked.
7626  SaveContext save(isolate);
7627  SaveContext* top = &save;
7628  while (top != NULL && *top->context() == *isolate->debug()->debug_context()) {
7629  top = top->prev();
7630  }
7631  if (top != NULL) {
7632  isolate->set_context(*top->context());
7633  }
7634 
7635  // Get the native context now set to the top context from before the
7636  // debugger was invoked.
7637  Handle<Context> context = isolate->native_context();
7638  Handle<JSObject> receiver(context->global_proxy());
7639  Handle<Object> result;
7641  isolate, result,
7642  DebugEvaluate(isolate, context, context_extension, receiver, source));
7643  return *result;
7644 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CheckExecutionState(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, DebugEvaluate(), NULL, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [80/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugGetLoadedScripts  )

Definition at line 7647 of file runtime.cc.

7647  {
7648  HandleScope scope(isolate);
7649  DCHECK(args.length() == 0);
7650 
7651  // Fill the script objects.
7652  Handle<FixedArray> instances = isolate->debug()->GetLoadedScripts();
7653 
7654  // Convert the script objects to proper JS objects.
7655  for (int i = 0; i < instances->length(); i++) {
7656  Handle<Script> script = Handle<Script>(Script::cast(instances->get(i)));
7657  // Get the script wrapper in a local handle before calling GetScriptWrapper,
7658  // because using
7659  // instances->set(i, *GetScriptWrapper(script))
7660  // is unsafe as GetScriptWrapper might call GC and the C++ compiler might
7661  // already have dereferenced the instances handle.
7662  Handle<JSObject> wrapper = Script::GetWrapper(script);
7663  instances->set(i, *wrapper);
7664  }
7665 
7666  // Return result as a JS array.
7667  Handle<JSObject> result =
7668  isolate->factory()->NewJSObject(isolate->array_function());
7669  JSArray::SetContent(Handle<JSArray>::cast(result), instances);
7670  return *result;
7671 }

References DCHECK, v8::internal::Script::GetWrapper(), and v8::internal::JSArray::SetContent().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [81/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugGetProperty  )

Definition at line 5586 of file runtime.cc.

5586  {
5587  HandleScope scope(isolate);
5588 
5589  DCHECK(args.length() == 2);
5590 
5591  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
5592  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
5593 
5594  LookupIterator it(obj, name);
5595  return *DebugGetProperty(&it);
5596 }
static Handle< Object > DebugGetProperty(LookupIterator *it, bool *has_caught=NULL)
Definition: runtime.cc:5472

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, DebugGetProperty(), and name.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [82/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugGetPropertyDetails  )

Definition at line 5518 of file runtime.cc.

5518  {
5519  HandleScope scope(isolate);
5520 
5521  DCHECK(args.length() == 2);
5522 
5523  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
5524  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
5525 
5526  // Make sure to set the current context to the context before the debugger was
5527  // entered (if the debugger is entered). The reason for switching context here
5528  // is that for some property lookups (accessors and interceptors) callbacks
5529  // into the embedding application can occour, and the embedding application
5530  // could have the assumption that its own native context is the current
5531  // context and not some internal debugger context.
5532  SaveContext save(isolate);
5533  if (isolate->debug()->in_debug_scope()) {
5534  isolate->set_context(*isolate->debug()->debugger_entry()->GetContext());
5535  }
5536 
5537  // Check if the name is trivially convertible to an index and get the element
5538  // if so.
5539  uint32_t index;
5540  if (name->AsArrayIndex(&index)) {
5541  Handle<FixedArray> details = isolate->factory()->NewFixedArray(2);
5542  Handle<Object> element_or_char;
5544  isolate, element_or_char,
5545  Runtime::GetElementOrCharAt(isolate, obj, index));
5546  details->set(0, *element_or_char);
5547  details->set(1,
5548  PropertyDetails(NONE, NORMAL, Representation::None()).AsSmi());
5549  return *isolate->factory()->NewJSArrayWithElements(details);
5550  }
5551 
5552  LookupIterator it(obj, name, LookupIterator::HIDDEN);
5553  bool has_caught = false;
5554  Handle<Object> value = DebugGetProperty(&it, &has_caught);
5555  if (!it.IsFound()) return isolate->heap()->undefined_value();
5556 
5557  Handle<Object> maybe_pair;
5558  if (it.state() == LookupIterator::ACCESSOR) {
5559  maybe_pair = it.GetAccessors();
5560  }
5561 
5562  // If the callback object is a fixed array then it contains JavaScript
5563  // getter and/or setter.
5564  bool has_js_accessors = !maybe_pair.is_null() && maybe_pair->IsAccessorPair();
5565  Handle<FixedArray> details =
5566  isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3);
5567  details->set(0, *value);
5568  // TODO(verwaest): Get rid of this random way of handling interceptors.
5569  PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR
5570  ? PropertyDetails(NONE, NORMAL, 0)
5571  : it.property_details();
5572  details->set(1, d.AsSmi());
5573  details->set(
5574  2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR));
5575  if (has_js_accessors) {
5576  AccessorPair* accessors = AccessorPair::cast(*maybe_pair);
5577  details->set(3, isolate->heap()->ToBoolean(has_caught));
5578  details->set(4, accessors->GetComponent(ACCESSOR_GETTER));
5579  details->set(5, accessors->GetComponent(ACCESSOR_SETTER));
5580  }
5581 
5582  return *isolate->factory()->NewJSArrayWithElements(details);
5583 }
@ None
Definition: v8.h:2211

References ACCESSOR, ACCESSOR_GETTER, ACCESSOR_SETTER, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, DebugGetProperty(), v8::internal::AccessorPair::GetComponent(), v8::internal::Runtime::GetElementOrCharAt(), v8::internal::Handle< T >::is_null(), name, NONE, v8::internal::Representation::None(), and NORMAL.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [83/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugGetPrototype  )

Definition at line 7867 of file runtime.cc.

7867  {
7868  HandleScope shs(isolate);
7869  DCHECK(args.length() == 1);
7870  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
7871  return *GetPrototypeSkipHiddenPrototypes(isolate, obj);
7872 }
static Handle< Object > GetPrototypeSkipHiddenPrototypes(Isolate *isolate, Handle< Object > receiver)
Definition: runtime.cc:670

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and GetPrototypeSkipHiddenPrototypes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [84/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugIndexedInterceptorElementValue  )

Definition at line 5650 of file runtime.cc.

5650  {
5651  HandleScope scope(isolate);
5652  DCHECK(args.length() == 2);
5653  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
5654  RUNTIME_ASSERT(obj->HasIndexedInterceptor());
5655  CONVERT_NUMBER_CHECKED(uint32_t, index, Uint32, args[1]);
5656  Handle<Object> result;
5658  isolate, result, JSObject::GetElementWithInterceptor(obj, obj, index));
5659  return *result;
5660 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::JSObject::GetElementWithInterceptor(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [85/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugNamedInterceptorPropertyValue  )

Definition at line 5633 of file runtime.cc.

5633  {
5634  HandleScope scope(isolate);
5635  DCHECK(args.length() == 2);
5636  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
5637  RUNTIME_ASSERT(obj->HasNamedInterceptor());
5638  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
5639 
5640  Handle<Object> result;
5641  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
5642  JSObject::GetProperty(obj, name));
5643  return *result;
5644 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Object::GetProperty(), name, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [86/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPopPromise  )

Definition at line 2643 of file runtime.cc.

2643  {
2644  DCHECK(args.length() == 0);
2645  SealHandleScope shs(isolate);
2646  isolate->PopPromise();
2647  return isolate->heap()->undefined_value();
2648 }

References DCHECK.

◆ RUNTIME_FUNCTION() [87/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPrepareStepInIfStepping  )

Definition at line 2610 of file runtime.cc.

2610  {
2611  DCHECK(args.length() == 1);
2612  Debug* debug = isolate->debug();
2613  if (!debug->IsStepping()) return isolate->heap()->undefined_value();
2614 
2615  HandleScope scope(isolate);
2616  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
2617  RUNTIME_ASSERT(object->IsJSFunction() || object->IsJSGeneratorObject());
2618  Handle<JSFunction> fun;
2619  if (object->IsJSFunction()) {
2620  fun = Handle<JSFunction>::cast(object);
2621  } else {
2622  fun = Handle<JSFunction>(
2623  Handle<JSGeneratorObject>::cast(object)->function(), isolate);
2624  }
2625  // When leaving the function, step out has been activated, but not performed
2626  // if we do not leave the builtin. To be able to step into the function
2627  // again, we need to clear the step out at this point.
2628  debug->ClearStepOut();
2629  debug->FloodWithOneShot(fun);
2630  return isolate->heap()->undefined_value();
2631 }

References v8::internal::Handle< T >::cast(), v8::internal::Debug::ClearStepOut(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Debug::FloodWithOneShot(), v8::internal::Debug::IsStepping(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [88/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPrint  )

Definition at line 193 of file runtime-test.cc.

193  {
194  SealHandleScope shs(isolate);
195  DCHECK(args.length() == 1);
196 
197  OFStream os(stdout);
198 #ifdef DEBUG
199  if (args[0]->IsString()) {
200  // If we have a string, assume it's a code "marker"
201  // and print some interesting cpu debugging info.
202  JavaScriptFrameIterator it(isolate);
203  JavaScriptFrame* frame = it.frame();
204  os << "fp = " << frame->fp() << ", sp = " << frame->sp()
205  << ", caller_sp = " << frame->caller_sp() << ": ";
206  } else {
207  os << "DebugPrint: ";
208  }
209  args[0]->Print(os);
210  if (args[0]->IsHeapObject()) {
211  os << "\n";
212  HeapObject::cast(args[0])->map()->Print(os);
213  }
214 #else
215  // ShortPrint is available in release mode. Print is not.
216  os << Brief(args[0]);
217 #endif
218  os << endl;
219 
220  return args[0]; // return TOS
221 }

References DCHECK, and endl().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [89/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPrintScopes  )

Definition at line 7141 of file runtime.cc.

7141  {
7142  HandleScope scope(isolate);
7143  DCHECK(args.length() == 0);
7144 
7145 #ifdef DEBUG
7146  // Print the scopes for the top frame.
7147  StackFrameLocator locator(isolate);
7148  JavaScriptFrame* frame = locator.FindJavaScriptFrame(0);
7149  for (ScopeIterator it(isolate, frame, 0); !it.Done(); it.Next()) {
7150  it.DebugPrint();
7151  }
7152 #endif
7153  return isolate->heap()->undefined_value();
7154 }

References DCHECK, and v8::internal::ScopeIterator::Done().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [90/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPromiseEvent  )

Definition at line 2651 of file runtime.cc.

2651  {
2652  DCHECK(args.length() == 1);
2653  HandleScope scope(isolate);
2654  CONVERT_ARG_HANDLE_CHECKED(JSObject, data, 0);
2655  isolate->debug()->OnPromiseEvent(data);
2656  return isolate->heap()->undefined_value();
2657 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [91/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPromiseRejectEvent  )

Definition at line 2660 of file runtime.cc.

2660  {
2661  DCHECK(args.length() == 2);
2662  HandleScope scope(isolate);
2663  CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
2665  isolate->debug()->OnPromiseReject(promise, value);
2666  return isolate->heap()->undefined_value();
2667 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [92/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPropertyAttributesFromDetails  )

Definition at line 5611 of file runtime.cc.

5611  {
5612  SealHandleScope shs(isolate);
5613  DCHECK(args.length() == 1);
5615  return Smi::FromInt(static_cast<int>(details.attributes()));
5616 }
#define CONVERT_PROPERTY_DETAILS_CHECKED(name, index)
Definition: runtime-utils.h:68

References CONVERT_PROPERTY_DETAILS_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [93/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPropertyIndexFromDetails  )

Definition at line 5621 of file runtime.cc.

5621  {
5622  SealHandleScope shs(isolate);
5623  DCHECK(args.length() == 1);
5625  // TODO(verwaest): Depends on the type of details.
5626  return Smi::FromInt(details.dictionary_index());
5627 }

References CONVERT_PROPERTY_DETAILS_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [94/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPropertyTypeFromDetails  )

Definition at line 5601 of file runtime.cc.

5601  {
5602  SealHandleScope shs(isolate);
5603  DCHECK(args.length() == 1);
5605  return Smi::FromInt(static_cast<int>(details.type()));
5606 }

References CONVERT_PROPERTY_DETAILS_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [95/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugPushPromise  )

Definition at line 2634 of file runtime.cc.

2634  {
2635  DCHECK(args.length() == 1);
2636  HandleScope scope(isolate);
2637  CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
2638  isolate->PushPromise(promise);
2639  return isolate->heap()->undefined_value();
2640 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [96/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugReferencedBy  )

Definition at line 7743 of file runtime.cc.

7743  {
7744  HandleScope scope(isolate);
7745  DCHECK(args.length() == 3);
7746 
7747  // Check parameters.
7748  CONVERT_ARG_HANDLE_CHECKED(JSObject, target, 0);
7749  CONVERT_ARG_HANDLE_CHECKED(Object, instance_filter, 1);
7750  RUNTIME_ASSERT(instance_filter->IsUndefined() ||
7751  instance_filter->IsJSObject());
7752  CONVERT_NUMBER_CHECKED(int32_t, max_references, Int32, args[2]);
7753  RUNTIME_ASSERT(max_references >= 0);
7754 
7755 
7756  // Get the constructor function for context extension and arguments array.
7757  Handle<JSFunction> arguments_function(
7758  JSFunction::cast(isolate->sloppy_arguments_map()->constructor()));
7759 
7760  // Get the number of referencing objects.
7761  int count;
7762  // First perform a full GC in order to avoid dead objects and to make the heap
7763  // iterable.
7764  Heap* heap = isolate->heap();
7765  heap->CollectAllGarbage(Heap::kMakeHeapIterableMask, "%DebugConstructedBy");
7766  {
7767  HeapIterator heap_iterator(heap);
7768  count = DebugReferencedBy(&heap_iterator, *target, *instance_filter,
7769  max_references, NULL, 0, *arguments_function);
7770  }
7771 
7772  // Allocate an array to hold the result.
7773  Handle<FixedArray> instances = isolate->factory()->NewFixedArray(count);
7774 
7775  // Fill the referencing objects.
7776  {
7777  HeapIterator heap_iterator(heap);
7778  count = DebugReferencedBy(&heap_iterator, *target, *instance_filter,
7779  max_references, *instances, count,
7780  *arguments_function);
7781  }
7782 
7783  // Return result as JS array.
7784  Handle<JSFunction> constructor = isolate->array_function();
7785 
7786  Handle<JSObject> result = isolate->factory()->NewJSObject(constructor);
7787  JSArray::SetContent(Handle<JSArray>::cast(result), instances);
7788  return *result;
7789 }
static int DebugReferencedBy(HeapIterator *iterator, JSObject *target, Object *instance_filter, int max_references, FixedArray *instances, int instances_size, JSFunction *arguments_function)
Definition: runtime.cc:7675

References v8::internal::Heap::CollectAllGarbage(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, DebugReferencedBy(), v8::internal::Heap::kMakeHeapIterableMask, NULL, RUNTIME_ASSERT, and v8::internal::JSArray::SetContent().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [97/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugSetScriptSource  )

Definition at line 7876 of file runtime.cc.

7876  {
7877  HandleScope scope(isolate);
7878  DCHECK(args.length() == 2);
7879 
7880  CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0);
7881  CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
7882 
7883  RUNTIME_ASSERT(script_wrapper->value()->IsScript());
7884  Handle<Script> script(Script::cast(script_wrapper->value()));
7885 
7886  int compilation_state = script->compilation_state();
7887  RUNTIME_ASSERT(compilation_state == Script::COMPILATION_STATE_INITIAL);
7888  script->set_source(*source);
7889 
7890  return isolate->heap()->undefined_value();
7891 }

References v8::internal::Script::COMPILATION_STATE_INITIAL, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [98/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DebugTrace  )

Definition at line 224 of file runtime-test.cc.

224  {
225  SealHandleScope shs(isolate);
226  DCHECK(args.length() == 0);
227  isolate->PrintStack(stdout);
228  return isolate->heap()->undefined_value();
229 }

References DCHECK.

◆ RUNTIME_FUNCTION() [99/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeclareGlobals  )

Definition at line 1083 of file runtime.cc.

1083  {
1084  HandleScope scope(isolate);
1085  DCHECK(args.length() == 3);
1086  Handle<GlobalObject> global(isolate->global_object());
1087 
1088  CONVERT_ARG_HANDLE_CHECKED(Context, context, 0);
1089  CONVERT_ARG_HANDLE_CHECKED(FixedArray, pairs, 1);
1091 
1092  // Traverse the name/value pairs and set the properties.
1093  int length = pairs->length();
1094  for (int i = 0; i < length; i += 2) {
1095  HandleScope scope(isolate);
1096  Handle<String> name(String::cast(pairs->get(i)));
1097  Handle<Object> initial_value(pairs->get(i + 1), isolate);
1098 
1099  // We have to declare a global const property. To capture we only
1100  // assign to it when evaluating the assignment for "const x =
1101  // <expr>" the initial value is the hole.
1102  bool is_var = initial_value->IsUndefined();
1103  bool is_const = initial_value->IsTheHole();
1104  bool is_function = initial_value->IsSharedFunctionInfo();
1105  DCHECK(is_var + is_const + is_function == 1);
1106 
1107  Handle<Object> value;
1108  if (is_function) {
1109  // Copy the function and update its context. Use it as value.
1110  Handle<SharedFunctionInfo> shared =
1111  Handle<SharedFunctionInfo>::cast(initial_value);
1112  Handle<JSFunction> function =
1113  isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
1114  TENURED);
1115  value = function;
1116  } else {
1117  value = isolate->factory()->undefined_value();
1118  }
1119 
1120  // Compute the property attributes. According to ECMA-262,
1121  // the property must be non-configurable except in eval.
1122  bool is_native = DeclareGlobalsNativeFlag::decode(flags);
1123  bool is_eval = DeclareGlobalsEvalFlag::decode(flags);
1124  int attr = NONE;
1125  if (is_const) attr |= READ_ONLY;
1126  if (is_function && is_native) attr |= READ_ONLY;
1127  if (!is_const && !is_eval) attr |= DONT_DELETE;
1128 
1129  Object* result = DeclareGlobals(isolate, global, name, value,
1130  static_cast<PropertyAttributes>(attr),
1131  is_var, is_const, is_function);
1132  if (isolate->has_pending_exception()) return result;
1133  }
1134 
1135  return isolate->heap()->undefined_value();
1136 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction pairs(ARM only)") DEFINE_BOOL(enable_unaligned_accesses
static Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
Definition: runtime.cc:1038

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DeclareGlobals(), v8::internal::BitFieldBase< T, shift, size, U >::decode(), DONT_DELETE, v8::internal::anonymous_namespace{flags.cc}::flags, name, NONE, pairs(), READ_ONLY, and TENURED.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [100/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeclareLookupSlot  )

Definition at line 1200 of file runtime.cc.

1200  {
1201  HandleScope scope(isolate);
1202  DCHECK(args.length() == 4);
1203 
1204  // Declarations are always made in a function, native, or global context. In
1205  // the case of eval code, the context passed is the context of the caller,
1206  // which may be some nested context and not the declaration context.
1207  CONVERT_ARG_HANDLE_CHECKED(Context, context_arg, 0);
1208  Handle<Context> context(context_arg->declaration_context());
1209  CONVERT_ARG_HANDLE_CHECKED(String, name, 1);
1210  CONVERT_SMI_ARG_CHECKED(attr_arg, 2);
1211  PropertyAttributes attr = static_cast<PropertyAttributes>(attr_arg);
1212  RUNTIME_ASSERT(attr == READ_ONLY || attr == NONE);
1213  CONVERT_ARG_HANDLE_CHECKED(Object, initial_value, 3);
1214 
1215  // TODO(verwaest): Unify the encoding indicating "var" with DeclareGlobals.
1216  bool is_var = *initial_value == NULL;
1217  bool is_const = initial_value->IsTheHole();
1218  bool is_function = initial_value->IsJSFunction();
1219  DCHECK(is_var + is_const + is_function == 1);
1220 
1221  int index;
1222  PropertyAttributes attributes;
1224  BindingFlags binding_flags;
1225  Handle<Object> holder =
1226  context->Lookup(name, flags, &index, &attributes, &binding_flags);
1227 
1228  Handle<JSObject> object;
1229  Handle<Object> value =
1230  is_function ? initial_value
1231  : Handle<Object>::cast(isolate->factory()->undefined_value());
1232 
1233  // TODO(verwaest): This case should probably not be covered by this function,
1234  // but by DeclareGlobals instead.
1235  if ((attributes != ABSENT && holder->IsJSGlobalObject()) ||
1236  (context_arg->has_extension() &&
1237  context_arg->extension()->IsJSGlobalObject())) {
1238  return DeclareGlobals(isolate, Handle<JSGlobalObject>::cast(holder), name,
1239  value, attr, is_var, is_const, is_function);
1240  }
1241 
1242  if (attributes != ABSENT) {
1243  // The name was declared before; check for conflicting re-declarations.
1244  if (is_const || (attributes & READ_ONLY) != 0) {
1245  return ThrowRedeclarationError(isolate, name);
1246  }
1247 
1248  // Skip var re-declarations.
1249  if (is_var) return isolate->heap()->undefined_value();
1250 
1251  DCHECK(is_function);
1252  if (index >= 0) {
1253  DCHECK(holder.is_identical_to(context));
1254  context->set(index, *initial_value);
1255  return isolate->heap()->undefined_value();
1256  }
1257 
1258  object = Handle<JSObject>::cast(holder);
1259 
1260  } else if (context->has_extension()) {
1261  object = handle(JSObject::cast(context->extension()));
1262  DCHECK(object->IsJSContextExtensionObject() || object->IsJSGlobalObject());
1263  } else {
1264  DCHECK(context->IsFunctionContext());
1265  object =
1266  isolate->factory()->NewJSObject(isolate->context_extension_function());
1267  context->set_extension(*object);
1268  }
1269 
1270  RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes(
1271  object, name, value, attr));
1272 
1273  return isolate->heap()->undefined_value();
1274 }

References ABSENT, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DeclareGlobals(), DONT_FOLLOW_CHAINS, v8::internal::anonymous_namespace{flags.cc}::flags, handle(), name, NONE, NULL, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, RUNTIME_ASSERT, v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), and ThrowRedeclarationError().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [101/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeclareModules  )

Definition at line 4024 of file runtime.cc.

4024  {
4025  HandleScope scope(isolate);
4026  DCHECK(args.length() == 1);
4027  CONVERT_ARG_HANDLE_CHECKED(FixedArray, descriptions, 0);
4028  Context* host_context = isolate->context();
4029 
4030  for (int i = 0; i < descriptions->length(); ++i) {
4031  Handle<ModuleInfo> description(ModuleInfo::cast(descriptions->get(i)));
4032  int host_index = description->host_index();
4033  Handle<Context> context(Context::cast(host_context->get(host_index)));
4034  Handle<JSModule> module(context->module());
4035 
4036  for (int j = 0; j < description->length(); ++j) {
4037  Handle<String> name(description->name(j));
4038  VariableMode mode = description->mode(j);
4039  int index = description->index(j);
4040  switch (mode) {
4041  case VAR:
4042  case LET:
4043  case CONST:
4044  case CONST_LEGACY: {
4045  PropertyAttributes attr =
4047  Handle<AccessorInfo> info =
4048  Accessors::MakeModuleExport(name, index, attr);
4049  Handle<Object> result =
4050  JSObject::SetAccessor(module, info).ToHandleChecked();
4051  DCHECK(!result->IsUndefined());
4052  USE(result);
4053  break;
4054  }
4055  case MODULE: {
4056  Object* referenced_context = Context::cast(host_context)->get(index);
4057  Handle<JSModule> value(Context::cast(referenced_context)->module());
4058  JSObject::SetOwnPropertyIgnoreAttributes(module, name, value, FROZEN)
4059  .Assert();
4060  break;
4061  }
4062  case INTERNAL:
4063  case TEMPORARY:
4064  case DYNAMIC:
4065  case DYNAMIC_GLOBAL:
4066  case DYNAMIC_LOCAL:
4067  UNREACHABLE();
4068  }
4069  }
4070 
4071  JSObject::PreventExtensions(module).Assert();
4072  }
4073 
4074  DCHECK(!isolate->has_pending_exception());
4075  return isolate->heap()->undefined_value();
4076 }
bool IsImmutableVariableMode(VariableMode mode)
Definition: globals.h:715
@ SEALED
@ FROZEN

References v8::internal::Context::cast(), v8::internal::ModuleInfo::cast(), CONST, CONST_LEGACY, CONVERT_ARG_HANDLE_CHECKED, DCHECK, DYNAMIC, DYNAMIC_GLOBAL, DYNAMIC_LOCAL, FROZEN, v8::internal::FixedArray::get(), INTERNAL, IsImmutableVariableMode(), LET, v8::internal::Accessors::MakeModuleExport(), mode(), MODULE, name, v8::internal::JSObject::PreventExtensions(), SEALED, v8::internal::JSObject::SetAccessor(), v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), TEMPORARY, UNREACHABLE, USE(), and VAR.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [102/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DefineAccessorPropertyUnchecked  )

Definition at line 2104 of file runtime.cc.

2104  {
2105  HandleScope scope(isolate);
2106  DCHECK(args.length() == 5);
2107  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
2108  RUNTIME_ASSERT(!obj->IsNull());
2109  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
2110  CONVERT_ARG_HANDLE_CHECKED(Object, getter, 2);
2112  CONVERT_ARG_HANDLE_CHECKED(Object, setter, 3);
2114  CONVERT_SMI_ARG_CHECKED(unchecked, 4);
2115  RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
2116  PropertyAttributes attr = static_cast<PropertyAttributes>(unchecked);
2117 
2118  bool fast = obj->HasFastProperties();
2120  isolate, JSObject::DefineAccessor(obj, name, getter, setter, attr));
2121  if (fast) JSObject::MigrateSlowToFast(obj, 0);
2122  return isolate->heap()->undefined_value();
2123 }
static bool IsValidAccessor(Handle< Object > obj)
Definition: runtime.cc:2062

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::JSObject::DefineAccessor(), DONT_DELETE, DONT_ENUM, IsValidAccessor(), v8::internal::JSObject::MigrateSlowToFast(), name, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [103/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DefineApiAccessorProperty  )

Definition at line 2077 of file runtime.cc.

2077  {
2078  HandleScope scope(isolate);
2079  DCHECK(args.length() == 5);
2080  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2081  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
2082  CONVERT_ARG_HANDLE_CHECKED(Object, getter, 2);
2083  CONVERT_ARG_HANDLE_CHECKED(Object, setter, 3);
2084  CONVERT_SMI_ARG_CHECKED(attribute, 4);
2085  RUNTIME_ASSERT(getter->IsUndefined() || getter->IsFunctionTemplateInfo());
2086  RUNTIME_ASSERT(setter->IsUndefined() || setter->IsFunctionTemplateInfo());
2087  RUNTIME_ASSERT(PropertyDetails::AttributesField::is_valid(
2088  static_cast<PropertyAttributes>(attribute)));
2090  isolate, JSObject::DefineAccessor(
2091  object, name, InstantiateAccessorComponent(isolate, getter),
2092  InstantiateAccessorComponent(isolate, setter),
2093  static_cast<PropertyAttributes>(attribute)));
2094  return isolate->heap()->undefined_value();
2095 }
static Handle< Object > InstantiateAccessorComponent(Isolate *isolate, Handle< Object > component)
Definition: runtime.cc:2068

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::JSObject::DefineAccessor(), InstantiateAccessorComponent(), name, RETURN_FAILURE_ON_EXCEPTION, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [104/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DefineDataPropertyUnchecked  )

Definition at line 2132 of file runtime.cc.

2132  {
2133  HandleScope scope(isolate);
2134  DCHECK(args.length() == 4);
2135  CONVERT_ARG_HANDLE_CHECKED(JSObject, js_object, 0);
2136  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
2137  CONVERT_ARG_HANDLE_CHECKED(Object, obj_value, 2);
2138  CONVERT_SMI_ARG_CHECKED(unchecked, 3);
2139  RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
2140  PropertyAttributes attr = static_cast<PropertyAttributes>(unchecked);
2141 
2142  LookupIterator it(js_object, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
2143  if (it.IsFound() && it.state() == LookupIterator::ACCESS_CHECK) {
2144  if (!isolate->MayNamedAccess(js_object, name, v8::ACCESS_SET)) {
2145  return isolate->heap()->undefined_value();
2146  }
2147  it.Next();
2148  }
2149 
2150  // Take special care when attributes are different and there is already
2151  // a property.
2152  if (it.state() == LookupIterator::ACCESSOR) {
2153  // Use IgnoreAttributes version since a readonly property may be
2154  // overridden and SetProperty does not allow this.
2155  Handle<Object> result;
2157  isolate, result,
2158  JSObject::SetOwnPropertyIgnoreAttributes(
2159  js_object, name, obj_value, attr, JSObject::DONT_FORCE_FIELD));
2160  return *result;
2161  }
2162 
2163  Handle<Object> result;
2165  isolate, result,
2166  Runtime::DefineObjectProperty(js_object, name, obj_value, attr));
2167  return *result;
2168 }
@ ACCESS_SET
Definition: v8.h:3521

References v8::ACCESS_SET, ACCESSOR, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Runtime::DefineObjectProperty(), DONT_DELETE, DONT_ENUM, v8::internal::JSObject::DONT_FORCE_FIELD, name, READ_ONLY, RUNTIME_ASSERT, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [105/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeleteLookupSlot  )

Definition at line 4079 of file runtime.cc.

4079  {
4080  HandleScope scope(isolate);
4081  DCHECK(args.length() == 2);
4082 
4083  CONVERT_ARG_HANDLE_CHECKED(Context, context, 0);
4084  CONVERT_ARG_HANDLE_CHECKED(String, name, 1);
4085 
4086  int index;
4087  PropertyAttributes attributes;
4089  BindingFlags binding_flags;
4090  Handle<Object> holder =
4091  context->Lookup(name, flags, &index, &attributes, &binding_flags);
4092 
4093  // If the slot was not found the result is true.
4094  if (holder.is_null()) {
4095  return isolate->heap()->true_value();
4096  }
4097 
4098  // If the slot was found in a context, it should be DONT_DELETE.
4099  if (holder->IsContext()) {
4100  return isolate->heap()->false_value();
4101  }
4102 
4103  // The slot was found in a JSObject, either a context extension object,
4104  // the global object, or the subject of a with. Try to delete it
4105  // (respecting DONT_DELETE).
4106  Handle<JSObject> object = Handle<JSObject>::cast(holder);
4107  Handle<Object> result;
4108  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
4109  JSReceiver::DeleteProperty(object, name));
4110  return *result;
4111 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSReceiver::DeleteProperty(), v8::internal::anonymous_namespace{flags.cc}::flags, FOLLOW_CHAINS, v8::internal::Handle< T >::is_null(), and name.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [106/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeleteProperty  )

Definition at line 2679 of file runtime.cc.

2679  {
2680  HandleScope scope(isolate);
2681  DCHECK(args.length() == 3);
2682  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
2683  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2684  CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 2);
2685  JSReceiver::DeleteMode delete_mode = strict_mode == STRICT
2686  ? JSReceiver::STRICT_DELETION
2687  : JSReceiver::NORMAL_DELETION;
2688  Handle<Object> result;
2690  isolate, result, JSReceiver::DeleteProperty(object, key, delete_mode));
2691  return *result;
2692 }
#define CONVERT_STRICT_MODE_ARG_CHECKED(name, index)
Definition: runtime-utils.h:75

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_STRICT_MODE_ARG_CHECKED, DCHECK, v8::internal::JSReceiver::DeleteProperty(), v8::internal::JSReceiver::NORMAL_DELETION, STRICT, and v8::internal::JSReceiver::STRICT_DELETION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [107/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DeoptimizeFunction  )

Definition at line 16 of file runtime-test.cc.

16  {
17  HandleScope scope(isolate);
18  DCHECK(args.length() == 1);
19  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
20  if (!function->IsOptimized()) return isolate->heap()->undefined_value();
21 
22  // TODO(turbofan): Deoptimization is not supported yet.
23  if (function->code()->is_turbofanned() && !FLAG_turbo_deoptimization) {
24  return isolate->heap()->undefined_value();
25  }
26 
27  Deoptimizer::DeoptimizeFunction(*function);
28 
29  return isolate->heap()->undefined_value();
30 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Deoptimizer::DeoptimizeFunction().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [108/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DisableAccessChecks  )

Definition at line 999 of file runtime.cc.

999  {
1000  HandleScope scope(isolate);
1001  DCHECK(args.length() == 1);
1002  CONVERT_ARG_HANDLE_CHECKED(HeapObject, object, 0);
1003  Handle<Map> old_map(object->map());
1004  bool needs_access_checks = old_map->is_access_check_needed();
1005  if (needs_access_checks) {
1006  // Copy map so it won't interfere constructor's initial map.
1007  Handle<Map> new_map = Map::Copy(old_map);
1008  new_map->set_is_access_check_needed(false);
1009  JSObject::MigrateToMap(Handle<JSObject>::cast(object), new_map);
1010  }
1011  return isolate->heap()->ToBoolean(needs_access_checks);
1012 }

References CONVERT_ARG_HANDLE_CHECKED, v8::internal::Map::Copy(), DCHECK, and v8::internal::JSObject::MigrateToMap().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [109/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DoubleHi  )

Definition at line 34 of file runtime-maths.cc.

34  {
35  HandleScope scope(isolate);
36  DCHECK(args.length() == 1);
38  uint64_t integer = double_to_uint64(x);
39  integer = (integer >> 32) & 0xFFFFFFFFu;
40  return *isolate->factory()->NewNumber(static_cast<int32_t>(integer));
41 }
uint64_t double_to_uint64(double d)
Definition: double.h:14

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and double_to_uint64().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [110/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_DoubleLo  )

Definition at line 44 of file runtime-maths.cc.

44  {
45  HandleScope scope(isolate);
46  DCHECK(args.length() == 1);
48  return *isolate->factory()->NewNumber(
49  static_cast<int32_t>(double_to_uint64(x) & 0xFFFFFFFFu));
50 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and double_to_uint64().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [111/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_EnableAccessChecks  )

Definition at line 1015 of file runtime.cc.

1015  {
1016  HandleScope scope(isolate);
1017  DCHECK(args.length() == 1);
1018  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1019  Handle<Map> old_map(object->map());
1020  RUNTIME_ASSERT(!old_map->is_access_check_needed());
1021  // Copy map so it won't interfere constructor's initial map.
1022  Handle<Map> new_map = Map::Copy(old_map);
1023  new_map->set_is_access_check_needed(true);
1024  JSObject::MigrateToMap(object, new_map);
1025  return isolate->heap()->undefined_value();
1026 }

References CONVERT_ARG_HANDLE_CHECKED, v8::internal::Map::Copy(), DCHECK, v8::internal::JSObject::MigrateToMap(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [112/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_EnqueueMicrotask  )

Definition at line 8691 of file runtime.cc.

8691  {
8692  HandleScope scope(isolate);
8693  DCHECK(args.length() == 1);
8694  CONVERT_ARG_HANDLE_CHECKED(JSFunction, microtask, 0);
8695  isolate->EnqueueMicrotask(microtask);
8696  return isolate->heap()->undefined_value();
8697 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [113/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_EstimateNumberOfElements  )

Definition at line 5327 of file runtime.cc.

5327  {
5328  HandleScope scope(isolate);
5329  DCHECK(args.length() == 1);
5330  CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
5331  Handle<FixedArrayBase> elements(array->elements(), isolate);
5332  SealHandleScope shs(isolate);
5333  if (elements->IsDictionary()) {
5334  int result =
5335  Handle<SeededNumberDictionary>::cast(elements)->NumberOfElements();
5336  return Smi::FromInt(result);
5337  } else {
5338  DCHECK(array->length()->IsSmi());
5339  // For packed elements, we know the exact number of elements
5340  int length = elements->length();
5341  ElementsKind kind = array->GetElementsKind();
5342  if (IsFastPackedElementsKind(kind)) {
5343  return Smi::FromInt(length);
5344  }
5345  // For holey elements, take samples from the buffer checking for holes
5346  // to generate the estimate.
5347  const int kNumberOfHoleCheckSamples = 97;
5348  int increment = (length < kNumberOfHoleCheckSamples)
5349  ? 1
5350  : static_cast<int>(length / kNumberOfHoleCheckSamples);
5351  ElementsAccessor* accessor = array->GetElementsAccessor();
5352  int holes = 0;
5353  for (int i = 0; i < length; i += increment) {
5354  if (!accessor->HasElement(array, array, i, elements)) {
5355  ++holes;
5356  }
5357  }
5358  int estimate = static_cast<int>((kNumberOfHoleCheckSamples - holes) /
5359  kNumberOfHoleCheckSamples * length);
5360  return Smi::FromInt(estimate);
5361  }
5362 }
bool IsFastPackedElementsKind(ElementsKind kind)

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::ElementsAccessor::HasElement(), and IsFastPackedElementsKind().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [114/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ExecuteInDebugContext  )

Definition at line 8254 of file runtime.cc.

8254  {
8255  HandleScope scope(isolate);
8256  DCHECK(args.length() == 2);
8257  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8258  CONVERT_BOOLEAN_ARG_CHECKED(without_debugger, 1);
8259 
8260  MaybeHandle<Object> maybe_result;
8261  if (without_debugger) {
8262  maybe_result = Execution::Call(isolate, function,
8263  handle(function->global_proxy()), 0, NULL);
8264  } else {
8265  DebugScope debug_scope(isolate->debug());
8266  maybe_result = Execution::Call(isolate, function,
8267  handle(function->global_proxy()), 0, NULL);
8268  }
8269  Handle<Object> result;
8270  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, maybe_result);
8271  return *result;
8272 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, handle(), and NULL.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [115/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FinalizeInstanceSize  )

Definition at line 3760 of file runtime.cc.

3760  {
3761  HandleScope scope(isolate);
3762  DCHECK(args.length() == 1);
3763 
3764  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
3765  function->CompleteInobjectSlackTracking();
3766 
3767  return isolate->heap()->undefined_value();
3768 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [116/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FinishArrayPrototypeSetup  )

Definition at line 1360 of file runtime.cc.

1360  {
1361  HandleScope scope(isolate);
1362  DCHECK(args.length() == 1);
1363  CONVERT_ARG_HANDLE_CHECKED(JSArray, prototype, 0);
1364  Object* length = prototype->length();
1365  RUNTIME_ASSERT(length->IsSmi() && Smi::cast(length)->value() == 0);
1366  RUNTIME_ASSERT(prototype->HasFastSmiOrObjectElements());
1367  // This is necessary to enable fast checks for absence of elements
1368  // on Array.prototype and below.
1369  prototype->set_elements(isolate->heap()->empty_fixed_array());
1370  return Smi::FromInt(0);
1371 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [117/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Fix  )

Definition at line 634 of file runtime.cc.

634  {
635  HandleScope scope(isolate);
636  DCHECK(args.length() == 1);
637  CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
638  JSProxy::Fix(proxy);
639  return isolate->heap()->undefined_value();
640 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSProxy::Fix().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [118/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FlattenString  )

Definition at line 1185 of file runtime-strings.cc.

1185  {
1186  HandleScope scope(isolate);
1187  DCHECK(args.length() == 1);
1188  CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
1189  return *String::Flatten(str);
1190 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::String::Flatten().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [119/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ForInCacheArrayLength  )

Definition at line 8961 of file runtime.cc.

8961  {
8962  SealHandleScope shs(isolate);
8963  DCHECK(args.length() == 2);
8964  CONVERT_ARG_HANDLE_CHECKED(Object, cache_type, 0);
8965  CONVERT_ARG_HANDLE_CHECKED(FixedArray, array, 1);
8966  int length = 0;
8967  if (cache_type->IsMap()) {
8968  length = Map::cast(*cache_type)->EnumLength();
8969  } else {
8970  DCHECK(cache_type->IsSmi());
8971  length = array->length();
8972  }
8973  return Smi::FromInt(length);
8974 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [120/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionBindArguments  )

Definition at line 3551 of file runtime.cc.

3551  {
3552  HandleScope scope(isolate);
3553  DCHECK(args.length() == 4);
3554  CONVERT_ARG_HANDLE_CHECKED(JSFunction, bound_function, 0);
3555  CONVERT_ARG_HANDLE_CHECKED(Object, bindee, 1);
3556  CONVERT_ARG_HANDLE_CHECKED(Object, this_object, 2);
3557  CONVERT_NUMBER_ARG_HANDLE_CHECKED(new_length, 3);
3558 
3559  // TODO(lrn): Create bound function in C++ code from premade shared info.
3560  bound_function->shared()->set_bound(true);
3561  // Get all arguments of calling function (Function.prototype.bind).
3562  int argc = 0;
3563  SmartArrayPointer<Handle<Object> > arguments =
3564  GetCallerArguments(isolate, 0, &argc);
3565  // Don't count the this-arg.
3566  if (argc > 0) {
3567  RUNTIME_ASSERT(arguments[0].is_identical_to(this_object));
3568  argc--;
3569  } else {
3570  RUNTIME_ASSERT(this_object->IsUndefined());
3571  }
3572  // Initialize array of bindings (function, this, and any existing arguments
3573  // if the function was already bound).
3574  Handle<FixedArray> new_bindings;
3575  int i;
3576  if (bindee->IsJSFunction() && JSFunction::cast(*bindee)->shared()->bound()) {
3577  Handle<FixedArray> old_bindings(
3578  JSFunction::cast(*bindee)->function_bindings());
3579  RUNTIME_ASSERT(old_bindings->length() > JSFunction::kBoundFunctionIndex);
3580  new_bindings =
3581  isolate->factory()->NewFixedArray(old_bindings->length() + argc);
3582  bindee = Handle<Object>(old_bindings->get(JSFunction::kBoundFunctionIndex),
3583  isolate);
3584  i = 0;
3585  for (int n = old_bindings->length(); i < n; i++) {
3586  new_bindings->set(i, old_bindings->get(i));
3587  }
3588  } else {
3589  int array_size = JSFunction::kBoundArgumentsStartIndex + argc;
3590  new_bindings = isolate->factory()->NewFixedArray(array_size);
3591  new_bindings->set(JSFunction::kBoundFunctionIndex, *bindee);
3592  new_bindings->set(JSFunction::kBoundThisIndex, *this_object);
3593  i = 2;
3594  }
3595  // Copy arguments, skipping the first which is "this_arg".
3596  for (int j = 0; j < argc; j++, i++) {
3597  new_bindings->set(i, *arguments[j + 1]);
3598  }
3599  new_bindings->set_map_no_write_barrier(
3600  isolate->heap()->fixed_cow_array_map());
3601  bound_function->set_function_bindings(*new_bindings);
3602 
3603  // Update length. Have to remove the prototype first so that map migration
3604  // is happy about the number of fields.
3605  RUNTIME_ASSERT(bound_function->RemovePrototype());
3606  Handle<Map> bound_function_map(
3607  isolate->native_context()->bound_function_map());
3608  JSObject::MigrateToMap(bound_function, bound_function_map);
3609  Handle<String> length_string = isolate->factory()->length_string();
3610  PropertyAttributes attr =
3613  isolate, JSObject::SetOwnPropertyIgnoreAttributes(
3614  bound_function, length_string, new_length, attr));
3615  return *bound_function;
3616 }
static SmartArrayPointer< Handle< Object > > GetCallerArguments(Isolate *isolate, int prefix_argc, int *total_argc)
Definition: runtime.cc:3506

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, DCHECK, DONT_DELETE, DONT_ENUM, GetCallerArguments(), v8::internal::JSFunction::kBoundArgumentsStartIndex, v8::internal::JSFunction::kBoundFunctionIndex, v8::internal::JSFunction::kBoundThisIndex, v8::internal::JSObject::MigrateToMap(), READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, RUNTIME_ASSERT, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [121/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetInferredName  )

Definition at line 7928 of file runtime.cc.

7928  {
7929  SealHandleScope shs(isolate);
7930  DCHECK(args.length() == 1);
7931 
7932  CONVERT_ARG_CHECKED(JSFunction, f, 0);
7933  return f->shared()->inferred_name();
7934 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [122/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetName  )

Definition at line 1447 of file runtime.cc.

1447  {
1448  SealHandleScope shs(isolate);
1449  DCHECK(args.length() == 1);
1450 
1451  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1452  return f->shared()->name();
1453 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [123/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetPositionForOffset  )

Definition at line 1552 of file runtime.cc.

1552  {
1553  SealHandleScope shs(isolate);
1554  DCHECK(args.length() == 2);
1555 
1556  CONVERT_ARG_CHECKED(Code, code, 0);
1557  CONVERT_NUMBER_CHECKED(int, offset, Int32, args[1]);
1558 
1559  RUNTIME_ASSERT(0 <= offset && offset < code->Size());
1560 
1561  Address pc = code->address() + offset;
1562  return Smi::FromInt(code->SourcePosition(pc));
1563 }

References CONVERT_ARG_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Smi::FromInt(), pc, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [124/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetScript  )

Definition at line 1520 of file runtime.cc.

1520  {
1521  HandleScope scope(isolate);
1522  DCHECK(args.length() == 1);
1523 
1524  CONVERT_ARG_CHECKED(JSFunction, fun, 0);
1525  Handle<Object> script = Handle<Object>(fun->shared()->script(), isolate);
1526  if (!script->IsScript()) return isolate->heap()->undefined_value();
1527 
1528  return *Script::GetWrapper(Handle<Script>::cast(script));
1529 }

References CONVERT_ARG_CHECKED, DCHECK, and v8::internal::Script::GetWrapper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [125/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetScriptSourcePosition  )

Definition at line 1542 of file runtime.cc.

1542  {
1543  SealHandleScope shs(isolate);
1544  DCHECK(args.length() == 1);
1545 
1546  CONVERT_ARG_CHECKED(JSFunction, fun, 0);
1547  int pos = fun->shared()->start_position();
1548  return Smi::FromInt(pos);
1549 }

References CONVERT_ARG_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [126/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionGetSourceCode  )

Definition at line 1532 of file runtime.cc.

1532  {
1533  HandleScope scope(isolate);
1534  DCHECK(args.length() == 1);
1535 
1536  CONVERT_ARG_HANDLE_CHECKED(JSFunction, f, 0);
1537  Handle<SharedFunctionInfo> shared(f->shared());
1538  return *shared->GetSourceCode();
1539 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [127/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionIsAPIFunction  )

Definition at line 1602 of file runtime.cc.

1602  {
1603  SealHandleScope shs(isolate);
1604  DCHECK(args.length() == 1);
1605 
1606  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1607  return isolate->heap()->ToBoolean(f->shared()->IsApiFunction());
1608 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [128/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionIsArrow  )

Definition at line 1493 of file runtime.cc.

1493  {
1494  SealHandleScope shs(isolate);
1495  DCHECK(args.length() == 1);
1496  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1497  return isolate->heap()->ToBoolean(f->shared()->is_arrow());
1498 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [129/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionIsBuiltin  )

Definition at line 1611 of file runtime.cc.

1611  {
1612  SealHandleScope shs(isolate);
1613  DCHECK(args.length() == 1);
1614 
1615  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1616  return isolate->heap()->ToBoolean(f->IsBuiltin());
1617 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [130/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionIsConciseMethod  )

Definition at line 1501 of file runtime.cc.

1501  {
1502  SealHandleScope shs(isolate);
1503  DCHECK(args.length() == 1);
1504  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1505  return isolate->heap()->ToBoolean(f->shared()->is_concise_method());
1506 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [131/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionIsGenerator  )

Definition at line 1485 of file runtime.cc.

1485  {
1486  SealHandleScope shs(isolate);
1487  DCHECK(args.length() == 1);
1488  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1489  return isolate->heap()->ToBoolean(f->shared()->is_generator());
1490 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [132/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionMarkNameShouldPrintAsAnonymous  )

Definition at line 1476 of file runtime.cc.

1476  {
1477  SealHandleScope shs(isolate);
1478  DCHECK(args.length() == 1);
1479  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1480  f->shared()->set_name_should_print_as_anonymous(true);
1481  return isolate->heap()->undefined_value();
1482 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [133/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionNameShouldPrintAsAnonymous  )

Definition at line 1467 of file runtime.cc.

1467  {
1468  SealHandleScope shs(isolate);
1469  DCHECK(args.length() == 1);
1470  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1471  return isolate->heap()->ToBoolean(
1472  f->shared()->name_should_print_as_anonymous());
1473 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [134/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionRemovePrototype  )

Definition at line 1509 of file runtime.cc.

1509  {
1510  SealHandleScope shs(isolate);
1511  DCHECK(args.length() == 1);
1512 
1513  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1514  RUNTIME_ASSERT(f->RemovePrototype());
1515 
1516  return isolate->heap()->undefined_value();
1517 }

References CONVERT_ARG_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [135/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionSetInstanceClassName  )

Definition at line 1566 of file runtime.cc.

1566  {
1567  SealHandleScope shs(isolate);
1568  DCHECK(args.length() == 2);
1569 
1570  CONVERT_ARG_CHECKED(JSFunction, fun, 0);
1571  CONVERT_ARG_CHECKED(String, name, 1);
1572  fun->SetInstanceClassName(name);
1573  return isolate->heap()->undefined_value();
1574 }

References CONVERT_ARG_CHECKED, DCHECK, and name.

◆ RUNTIME_FUNCTION() [136/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionSetLength  )

Definition at line 1577 of file runtime.cc.

1577  {
1578  SealHandleScope shs(isolate);
1579  DCHECK(args.length() == 2);
1580 
1581  CONVERT_ARG_CHECKED(JSFunction, fun, 0);
1582  CONVERT_SMI_ARG_CHECKED(length, 1);
1583  RUNTIME_ASSERT((length & 0xC0000000) == 0xC0000000 ||
1584  (length & 0xC0000000) == 0x0);
1585  fun->shared()->set_length(length);
1586  return isolate->heap()->undefined_value();
1587 }

References CONVERT_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [137/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionSetName  )

Definition at line 1456 of file runtime.cc.

1456  {
1457  SealHandleScope shs(isolate);
1458  DCHECK(args.length() == 2);
1459 
1460  CONVERT_ARG_CHECKED(JSFunction, f, 0);
1461  CONVERT_ARG_CHECKED(String, name, 1);
1462  f->shared()->set_name(name);
1463  return isolate->heap()->undefined_value();
1464 }

References CONVERT_ARG_CHECKED, DCHECK, and name.

◆ RUNTIME_FUNCTION() [138/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_FunctionSetPrototype  )

Definition at line 1590 of file runtime.cc.

1590  {
1591  HandleScope scope(isolate);
1592  DCHECK(args.length() == 2);
1593 
1594  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
1596  RUNTIME_ASSERT(fun->should_have_prototype());
1597  Accessors::FunctionSetPrototype(fun, value);
1598  return args[0]; // return TOS
1599 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Accessors::FunctionSetPrototype(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [139/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GeneratorGetContext  )

Definition at line 8389 of file runtime.cc.

8389  {
8390  HandleScope scope(isolate);
8391  DCHECK(args.length() == 1);
8392  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
8393 
8394  return generator->context();
8395 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [140/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GeneratorGetContinuation  )

Definition at line 8409 of file runtime.cc.

8409  {
8410  HandleScope scope(isolate);
8411  DCHECK(args.length() == 1);
8412  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
8413 
8414  return Smi::FromInt(generator->continuation());
8415 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [141/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GeneratorGetFunction  )

Definition at line 8379 of file runtime.cc.

8379  {
8380  HandleScope scope(isolate);
8381  DCHECK(args.length() == 1);
8382  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
8383 
8384  return generator->function();
8385 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [142/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GeneratorGetReceiver  )

Definition at line 8399 of file runtime.cc.

8399  {
8400  HandleScope scope(isolate);
8401  DCHECK(args.length() == 1);
8402  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
8403 
8404  return generator->receiver();
8405 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [143/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GeneratorGetSourcePosition  )

Definition at line 8418 of file runtime.cc.

8418  {
8419  HandleScope scope(isolate);
8420  DCHECK(args.length() == 1);
8421  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
8422 
8423  if (generator->is_suspended()) {
8424  Handle<Code> code(generator->function()->code(), isolate);
8425  int offset = generator->continuation();
8426 
8427  RUNTIME_ASSERT(0 <= offset && offset < code->Size());
8428  Address pc = code->address() + offset;
8429 
8430  return Smi::FromInt(code->SourcePosition(pc));
8431  }
8432 
8433  return isolate->heap()->undefined_value();
8434 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), pc, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [144/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetAllScopesDetails  )

Definition at line 7006 of file runtime.cc.

7006  {
7007  HandleScope scope(isolate);
7008  DCHECK(args.length() == 3 || args.length() == 4);
7009  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7010  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7011 
7012  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
7013  CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]);
7014 
7015  bool ignore_nested_scopes = false;
7016  if (args.length() == 4) {
7018  ignore_nested_scopes = flag;
7019  }
7020 
7021  // Get the frame where the debugging is performed.
7022  StackFrame::Id id = UnwrapFrameId(wrapped_id);
7023  JavaScriptFrameIterator frame_it(isolate, id);
7024  JavaScriptFrame* frame = frame_it.frame();
7025 
7026  List<Handle<JSObject> > result(4);
7027  ScopeIterator it(isolate, frame, inlined_jsframe_index, ignore_nested_scopes);
7028  for (; !it.Done(); it.Next()) {
7029  Handle<JSObject> details;
7030  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, details,
7031  MaterializeScopeDetails(isolate, &it));
7032  result.Add(details);
7033  }
7034 
7035  Handle<FixedArray> array = isolate->factory()->NewFixedArray(result.length());
7036  for (int i = 0; i < result.length(); ++i) {
7037  array->set(i, *result[i]);
7038  }
7039  return *isolate->factory()->NewJSArrayWithElements(array);
7040 }
static MUST_USE_RESULT MaybeHandle< JSObject > MaterializeScopeDetails(Isolate *isolate, ScopeIterator *it)
Definition: runtime.cc:6940

References v8::internal::List< T, AllocationPolicy >::Add(), ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CheckExecutionState(), CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::ScopeIterator::Done(), flag, MaterializeScopeDetails(), v8::internal::ScopeIterator::Next(), RUNTIME_ASSERT, and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [145/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetArgumentsProperty  )

Definition at line 3092 of file runtime.cc.

3092  {
3093  SealHandleScope shs(isolate);
3094  DCHECK(args.length() == 1);
3095  CONVERT_ARG_HANDLE_CHECKED(Object, raw_key, 0);
3096 
3097  // Compute the frame holding the arguments.
3098  JavaScriptFrameIterator it(isolate);
3099  it.AdvanceToArgumentsFrame();
3100  JavaScriptFrame* frame = it.frame();
3101 
3102  // Get the actual number of provided arguments.
3103  const uint32_t n = frame->ComputeParametersCount();
3104 
3105  // Try to convert the key to an index. If successful and within
3106  // index return the the argument from the frame.
3107  uint32_t index;
3108  if (raw_key->ToArrayIndex(&index) && index < n) {
3109  return frame->GetParameter(index);
3110  }
3111 
3112  HandleScope scope(isolate);
3113  if (raw_key->IsSymbol()) {
3114  Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key);
3115  if (symbol->Equals(isolate->native_context()->iterator_symbol())) {
3116  return isolate->native_context()->array_values_iterator();
3117  }
3118  // Lookup in the initial Object.prototype object.
3119  Handle<Object> result;
3121  isolate, result,
3122  Object::GetProperty(isolate->initial_object_prototype(),
3123  Handle<Symbol>::cast(raw_key)));
3124  return *result;
3125  }
3126 
3127  // Convert the key to a string.
3128  Handle<Object> converted;
3129  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, converted,
3130  Execution::ToString(isolate, raw_key));
3131  Handle<String> key = Handle<String>::cast(converted);
3132 
3133  // Try to convert the string key into an array index.
3134  if (key->AsArrayIndex(&index)) {
3135  if (index < n) {
3136  return frame->GetParameter(index);
3137  } else {
3138  Handle<Object> initial_prototype(isolate->initial_object_prototype());
3139  Handle<Object> result;
3141  isolate, result,
3142  Object::GetElement(isolate, initial_prototype, index));
3143  return *result;
3144  }
3145  }
3146 
3147  // Handle special arguments properties.
3148  if (String::Equals(isolate->factory()->length_string(), key)) {
3149  return Smi::FromInt(n);
3150  }
3151  if (String::Equals(isolate->factory()->callee_string(), key)) {
3152  JSFunction* function = frame->function();
3153  if (function->shared()->strict_mode() == STRICT) {
3155  isolate, NewTypeError("strict_arguments_callee",
3156  HandleVector<Object>(NULL, 0)));
3157  }
3158  return function;
3159  }
3160 
3161  // Lookup in the initial Object.prototype object.
3162  Handle<Object> result;
3164  isolate, result,
3165  Object::GetProperty(isolate->initial_object_prototype(), key));
3166  return *result;
3167 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), v8::internal::JavaScriptFrame::ComputeParametersCount(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Equals(), v8::internal::Smi::FromInt(), v8::internal::JavaScriptFrame::function(), v8::internal::Object::GetElement(), v8::internal::JavaScriptFrame::GetParameter(), v8::internal::Object::GetProperty(), NULL, STRICT, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [146/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetArrayKeys  )

Definition at line 5370 of file runtime.cc.

5370  {
5371  HandleScope scope(isolate);
5372  DCHECK(args.length() == 2);
5373  CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
5374  CONVERT_NUMBER_CHECKED(uint32_t, length, Uint32, args[1]);
5375  if (array->elements()->IsDictionary()) {
5376  Handle<FixedArray> keys = isolate->factory()->empty_fixed_array();
5377  for (PrototypeIterator iter(isolate, array,
5378  PrototypeIterator::START_AT_RECEIVER);
5379  !iter.IsAtEnd(); iter.Advance()) {
5380  if (PrototypeIterator::GetCurrent(iter)->IsJSProxy() ||
5381  JSObject::cast(*PrototypeIterator::GetCurrent(iter))
5382  ->HasIndexedInterceptor()) {
5383  // Bail out if we find a proxy or interceptor, likely not worth
5384  // collecting keys in that case.
5385  return *isolate->factory()->NewNumberFromUint(length);
5386  }
5387  Handle<JSObject> current =
5388  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
5389  Handle<FixedArray> current_keys =
5390  isolate->factory()->NewFixedArray(current->NumberOfOwnElements(NONE));
5391  current->GetOwnElementKeys(*current_keys, NONE);
5393  isolate, keys, FixedArray::UnionOfKeys(keys, current_keys));
5394  }
5395  // Erase any keys >= length.
5396  // TODO(adamk): Remove this step when the contract of %GetArrayKeys
5397  // is changed to let this happen on the JS side.
5398  for (int i = 0; i < keys->length(); i++) {
5399  if (NumberToUint32(keys->get(i)) >= length) keys->set_undefined(i);
5400  }
5401  return *isolate->factory()->NewJSArrayWithElements(keys);
5402  } else {
5403  RUNTIME_ASSERT(array->HasFastSmiOrObjectElements() ||
5404  array->HasFastDoubleElements());
5405  uint32_t actual_length = static_cast<uint32_t>(array->elements()->length());
5406  return *isolate->factory()->NewNumberFromUint(Min(actual_length, length));
5407  }
5408 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::PrototypeIterator::IsAtEnd(), keys(), Min(), NONE, NumberToUint32(), RUNTIME_ASSERT, v8::internal::PrototypeIterator::START_AT_RECEIVER, and v8::internal::FixedArray::UnionOfKeys().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [147/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetBreakLocations  )

Definition at line 7245 of file runtime.cc.

7245  {
7246  HandleScope scope(isolate);
7247  DCHECK(args.length() == 2);
7248 
7249  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
7250  CONVERT_NUMBER_CHECKED(int32_t, statement_aligned_code, Int32, args[1]);
7251 
7252  if (!IsPositionAlignmentCodeCorrect(statement_aligned_code)) {
7253  return isolate->ThrowIllegalOperation();
7254  }
7255  BreakPositionAlignment alignment =
7256  static_cast<BreakPositionAlignment>(statement_aligned_code);
7257 
7258  Handle<SharedFunctionInfo> shared(fun->shared());
7259  // Find the number of break points
7260  Handle<Object> break_locations =
7261  Debug::GetSourceBreakLocations(shared, alignment);
7262  if (break_locations->IsUndefined()) return isolate->heap()->undefined_value();
7263  // Return array as JS array
7264  return *isolate->factory()->NewJSArrayWithElements(
7265  Handle<FixedArray>::cast(break_locations));
7266 }
BreakPositionAlignment
Definition: debug.h:60
static bool IsPositionAlignmentCodeCorrect(int alignment)
Definition: runtime.cc:7240

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Debug::GetSourceBreakLocations(), and IsPositionAlignmentCodeCorrect().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [148/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetCallTrap  )

Definition at line 618 of file runtime.cc.

618  {
619  SealHandleScope shs(isolate);
620  DCHECK(args.length() == 1);
621  CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0);
622  return proxy->call_trap();
623 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [149/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetConstructorDelegate  )

Definition at line 3866 of file runtime.cc.

3866  {
3867  HandleScope scope(isolate);
3868  DCHECK(args.length() == 1);
3869  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
3870  RUNTIME_ASSERT(!object->IsJSFunction());
3871  return *Execution::GetConstructorDelegate(isolate, object);
3872 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [150/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetConstructTrap  )

Definition at line 626 of file runtime.cc.

626  {
627  SealHandleScope shs(isolate);
628  DCHECK(args.length() == 1);
629  CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0);
630  return proxy->construct_trap();
631 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [151/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetDataProperty  )

Definition at line 2172 of file runtime.cc.

2172  {
2173  HandleScope scope(isolate);
2174  DCHECK(args.length() == 2);
2175  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2176  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2177  return *JSObject::GetDataProperty(object, key);
2178 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::GetDataProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [152/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetDefaultReceiver  )

Definition at line 1421 of file runtime.cc.

1421  {
1422  SealHandleScope shs(isolate);
1423  DCHECK(args.length() == 1);
1424  CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
1425 
1426  if (!callable->IsJSFunction()) {
1427  HandleScope scope(isolate);
1428  Handle<Object> delegate;
1430  isolate, delegate, Execution::TryGetFunctionDelegate(
1431  isolate, Handle<JSReceiver>(callable)));
1432  callable = JSFunction::cast(*delegate);
1433  }
1434  JSFunction* function = JSFunction::cast(callable);
1435 
1436  SharedFunctionInfo* shared = function->shared();
1437  if (shared->native() || shared->strict_mode() == STRICT) {
1438  return isolate->heap()->undefined_value();
1439  }
1440  // Returns undefined for strict or native functions, or
1441  // the associated global receiver for "normal" functions.
1442 
1443  return function->global_proxy();
1444 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_CHECKED, DCHECK, STRICT, and v8::internal::SharedFunctionInfo::strict_mode().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [153/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFrameCount  )

Definition at line 5679 of file runtime.cc.

5679  {
5680  HandleScope scope(isolate);
5681  DCHECK(args.length() == 1);
5682  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
5683  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
5684 
5685  // Count all frames which are relevant to debugging stack trace.
5686  int n = 0;
5687  StackFrame::Id id = isolate->debug()->break_frame_id();
5688  if (id == StackFrame::NO_ID) {
5689  // If there is no JavaScript stack frame count is 0.
5690  return Smi::FromInt(0);
5691  }
5692 
5693  for (JavaScriptFrameIterator it(isolate, id); !it.done(); it.Advance()) {
5694  List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
5695  it.frame()->Summarize(&frames);
5696  for (int i = frames.length() - 1; i >= 0; i--) {
5697  // Omit functions from native scripts.
5698  if (!frames[i].function()->IsFromNativeScript()) n++;
5699  }
5700  }
5701  return Smi::FromInt(n);
5702 }

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Smi::FromInt(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [154/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFrameDetails  )

Definition at line 5835 of file runtime.cc.

5835  {
5836  HandleScope scope(isolate);
5837  DCHECK(args.length() == 2);
5838  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
5839  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
5840 
5841  CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]);
5842  Heap* heap = isolate->heap();
5843 
5844  // Find the relevant frame with the requested index.
5845  StackFrame::Id id = isolate->debug()->break_frame_id();
5846  if (id == StackFrame::NO_ID) {
5847  // If there are no JavaScript stack frames return undefined.
5848  return heap->undefined_value();
5849  }
5850 
5851  JavaScriptFrameIterator it(isolate, id);
5852  // Inlined frame index in optimized frame, starting from outer function.
5853  int inlined_jsframe_index = FindIndexedNonNativeFrame(&it, index);
5854  if (inlined_jsframe_index == -1) return heap->undefined_value();
5855 
5856  FrameInspector frame_inspector(it.frame(), inlined_jsframe_index, isolate);
5857  bool is_optimized = it.frame()->is_optimized();
5858 
5859  // Traverse the saved contexts chain to find the active context for the
5860  // selected frame.
5861  SaveContext* save = FindSavedContextForFrame(isolate, it.frame());
5862 
5863  // Get the frame id.
5864  Handle<Object> frame_id(WrapFrameId(it.frame()->id()), isolate);
5865 
5866  // Find source position in unoptimized code.
5867  int position = frame_inspector.GetSourcePosition();
5868 
5869  // Check for constructor frame.
5870  bool constructor = frame_inspector.IsConstructor();
5871 
5872  // Get scope info and read from it for local variable information.
5873  Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction()));
5874  Handle<SharedFunctionInfo> shared(function->shared());
5875  Handle<ScopeInfo> scope_info(shared->scope_info());
5876  DCHECK(*scope_info != ScopeInfo::Empty(isolate));
5877 
5878  // Get the locals names and values into a temporary array.
5879  int local_count = scope_info->LocalCount();
5880  for (int slot = 0; slot < scope_info->LocalCount(); ++slot) {
5881  // Hide compiler-introduced temporary variables, whether on the stack or on
5882  // the context.
5883  if (scope_info->LocalIsSynthetic(slot)) local_count--;
5884  }
5885 
5886  Handle<FixedArray> locals =
5887  isolate->factory()->NewFixedArray(local_count * 2);
5888 
5889  // Fill in the values of the locals.
5890  int local = 0;
5891  int i = 0;
5892  for (; i < scope_info->StackLocalCount(); ++i) {
5893  // Use the value from the stack.
5894  if (scope_info->LocalIsSynthetic(i)) continue;
5895  locals->set(local * 2, scope_info->LocalName(i));
5896  locals->set(local * 2 + 1, frame_inspector.GetExpression(i));
5897  local++;
5898  }
5899  if (local < local_count) {
5900  // Get the context containing declarations.
5901  Handle<Context> context(
5902  Context::cast(frame_inspector.GetContext())->declaration_context());
5903  for (; i < scope_info->LocalCount(); ++i) {
5904  if (scope_info->LocalIsSynthetic(i)) continue;
5905  Handle<String> name(scope_info->LocalName(i));
5907  InitializationFlag init_flag;
5908  MaybeAssignedFlag maybe_assigned_flag;
5909  locals->set(local * 2, *name);
5910  int context_slot_index = ScopeInfo::ContextSlotIndex(
5911  scope_info, name, &mode, &init_flag, &maybe_assigned_flag);
5912  Object* value = context->get(context_slot_index);
5913  locals->set(local * 2 + 1, value);
5914  local++;
5915  }
5916  }
5917 
5918  // Check whether this frame is positioned at return. If not top
5919  // frame or if the frame is optimized it cannot be at a return.
5920  bool at_return = false;
5921  if (!is_optimized && index == 0) {
5922  at_return = isolate->debug()->IsBreakAtReturn(it.frame());
5923  }
5924 
5925  // If positioned just before return find the value to be returned and add it
5926  // to the frame information.
5927  Handle<Object> return_value = isolate->factory()->undefined_value();
5928  if (at_return) {
5929  StackFrameIterator it2(isolate);
5930  Address internal_frame_sp = NULL;
5931  while (!it2.done()) {
5932  if (it2.frame()->is_internal()) {
5933  internal_frame_sp = it2.frame()->sp();
5934  } else {
5935  if (it2.frame()->is_java_script()) {
5936  if (it2.frame()->id() == it.frame()->id()) {
5937  // The internal frame just before the JavaScript frame contains the
5938  // value to return on top. A debug break at return will create an
5939  // internal frame to store the return value (eax/rax/r0) before
5940  // entering the debug break exit frame.
5941  if (internal_frame_sp != NULL) {
5942  return_value =
5943  Handle<Object>(Memory::Object_at(internal_frame_sp), isolate);
5944  break;
5945  }
5946  }
5947  }
5948 
5949  // Indicate that the previous frame was not an internal frame.
5950  internal_frame_sp = NULL;
5951  }
5952  it2.Advance();
5953  }
5954  }
5955 
5956  // Now advance to the arguments adapter frame (if any). It contains all
5957  // the provided parameters whereas the function frame always have the number
5958  // of arguments matching the functions parameters. The rest of the
5959  // information (except for what is collected above) is the same.
5960  if ((inlined_jsframe_index == 0) && it.frame()->has_adapted_arguments()) {
5961  it.AdvanceToArgumentsFrame();
5962  frame_inspector.SetArgumentsFrame(it.frame());
5963  }
5964 
5965  // Find the number of arguments to fill. At least fill the number of
5966  // parameters for the function and fill more if more parameters are provided.
5967  int argument_count = scope_info->ParameterCount();
5968  if (argument_count < frame_inspector.GetParametersCount()) {
5969  argument_count = frame_inspector.GetParametersCount();
5970  }
5971 
5972  // Calculate the size of the result.
5973  int details_size = kFrameDetailsFirstDynamicIndex +
5974  2 * (argument_count + local_count) + (at_return ? 1 : 0);
5975  Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size);
5976 
5977  // Add the frame id.
5978  details->set(kFrameDetailsFrameIdIndex, *frame_id);
5979 
5980  // Add the function (same as in function frame).
5981  details->set(kFrameDetailsFunctionIndex, frame_inspector.GetFunction());
5982 
5983  // Add the arguments count.
5984  details->set(kFrameDetailsArgumentCountIndex, Smi::FromInt(argument_count));
5985 
5986  // Add the locals count
5987  details->set(kFrameDetailsLocalCountIndex, Smi::FromInt(local_count));
5988 
5989  // Add the source position.
5990  if (position != RelocInfo::kNoPosition) {
5991  details->set(kFrameDetailsSourcePositionIndex, Smi::FromInt(position));
5992  } else {
5993  details->set(kFrameDetailsSourcePositionIndex, heap->undefined_value());
5994  }
5995 
5996  // Add the constructor information.
5997  details->set(kFrameDetailsConstructCallIndex, heap->ToBoolean(constructor));
5998 
5999  // Add the at return information.
6000  details->set(kFrameDetailsAtReturnIndex, heap->ToBoolean(at_return));
6001 
6002  // Add flags to indicate information on whether this frame is
6003  // bit 0: invoked in the debugger context.
6004  // bit 1: optimized frame.
6005  // bit 2: inlined in optimized frame
6006  int flags = 0;
6007  if (*save->context() == *isolate->debug()->debug_context()) {
6008  flags |= 1 << 0;
6009  }
6010  if (is_optimized) {
6011  flags |= 1 << 1;
6012  flags |= inlined_jsframe_index << 2;
6013  }
6014  details->set(kFrameDetailsFlagsIndex, Smi::FromInt(flags));
6015 
6016  // Fill the dynamic part.
6017  int details_index = kFrameDetailsFirstDynamicIndex;
6018 
6019  // Add arguments name and value.
6020  for (int i = 0; i < argument_count; i++) {
6021  // Name of the argument.
6022  if (i < scope_info->ParameterCount()) {
6023  details->set(details_index++, scope_info->ParameterName(i));
6024  } else {
6025  details->set(details_index++, heap->undefined_value());
6026  }
6027 
6028  // Parameter value.
6029  if (i < frame_inspector.GetParametersCount()) {
6030  // Get the value from the stack.
6031  details->set(details_index++, frame_inspector.GetParameter(i));
6032  } else {
6033  details->set(details_index++, heap->undefined_value());
6034  }
6035  }
6036 
6037  // Add locals name and value from the temporary copy from the function frame.
6038  for (int i = 0; i < local_count * 2; i++) {
6039  details->set(details_index++, locals->get(i));
6040  }
6041 
6042  // Add the value being returned.
6043  if (at_return) {
6044  details->set(details_index++, *return_value);
6045  }
6046 
6047  // Add the receiver (same as in function frame).
6048  // THIS MUST BE DONE LAST SINCE WE MIGHT ADVANCE
6049  // THE FRAME ITERATOR TO WRAP THE RECEIVER.
6050  Handle<Object> receiver(it.frame()->receiver(), isolate);
6051  if (!receiver->IsJSObject() && shared->strict_mode() == SLOPPY &&
6052  !function->IsBuiltin()) {
6053  // If the receiver is not a JSObject and the function is not a
6054  // builtin or strict-mode we have hit an optimization where a
6055  // value object is not converted into a wrapped JS objects. To
6056  // hide this optimization from the debugger, we wrap the receiver
6057  // by creating correct wrapper object based on the calling frame's
6058  // native context.
6059  it.Advance();
6060  if (receiver->IsUndefined()) {
6061  receiver = handle(function->global_proxy());
6062  } else {
6063  Context* context = Context::cast(it.frame()->context());
6064  Handle<Context> native_context(Context::cast(context->native_context()));
6065  if (!Object::ToObject(isolate, receiver, native_context)
6066  .ToHandle(&receiver)) {
6067  // This only happens if the receiver is forcibly set in %_CallFunction.
6068  return heap->undefined_value();
6069  }
6070  }
6071  }
6072  details->set(kFrameDetailsReceiverIndex, *receiver);
6073 
6074  DCHECK_EQ(details_size, details_index);
6075  return *isolate->factory()->NewJSArrayWithElements(details);
6076 }
static const int kFrameDetailsAtReturnIndex
Definition: runtime.cc:5785
static const int kFrameDetailsConstructCallIndex
Definition: runtime.cc:5784
static const int kFrameDetailsSourcePositionIndex
Definition: runtime.cc:5783
static const int kFrameDetailsFlagsIndex
Definition: runtime.cc:5786
static const int kFrameDetailsReceiverIndex
Definition: runtime.cc:5779
static const int kFrameDetailsFunctionIndex
Definition: runtime.cc:5780
static const int kFrameDetailsArgumentCountIndex
Definition: runtime.cc:5781
static int FindIndexedNonNativeFrame(JavaScriptFrameIterator *it, int index)
Definition: runtime.cc:5803
static Smi * WrapFrameId(StackFrame::Id id)
Definition: runtime.cc:5436
static const int kFrameDetailsFirstDynamicIndex
Definition: runtime.cc:5787
static const int kFrameDetailsFrameIdIndex
Definition: runtime.cc:5778
static const int kFrameDetailsLocalCountIndex
Definition: runtime.cc:5782

References v8::internal::StackFrameIterator::Advance(), v8::internal::Context::cast(), CheckExecutionState(), v8::internal::ScopeInfo::ContextSlotIndex(), CONVERT_NUMBER_CHECKED, DCHECK, DCHECK_EQ, v8::internal::Context::declaration_context(), v8::internal::ScopeInfo::Empty(), FindIndexedNonNativeFrame(), FindSavedContextForFrame(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::StackFrameIterator::frame(), v8::internal::Smi::FromInt(), v8::internal::FrameInspector::GetContext(), v8::internal::FrameInspector::GetExpression(), v8::internal::FrameInspector::GetFunction(), v8::internal::FrameInspector::GetParameter(), v8::internal::FrameInspector::GetParametersCount(), v8::internal::FrameInspector::GetSourcePosition(), handle(), v8::internal::FrameInspector::IsConstructor(), kFrameDetailsArgumentCountIndex, kFrameDetailsAtReturnIndex, kFrameDetailsConstructCallIndex, kFrameDetailsFirstDynamicIndex, kFrameDetailsFlagsIndex, kFrameDetailsFrameIdIndex, kFrameDetailsFunctionIndex, kFrameDetailsLocalCountIndex, kFrameDetailsReceiverIndex, kFrameDetailsSourcePositionIndex, v8::internal::RelocInfo::kNoPosition, mode(), name, v8::internal::Context::native_context(), NULL, v8::internal::Memory::Object_at(), RUNTIME_ASSERT, v8::internal::FrameInspector::SetArgumentsFrame(), SLOPPY, v8::internal::Heap::ToBoolean(), v8::internal::Object::ToObject(), and WrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [155/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFromCache  )

Definition at line 8474 of file runtime.cc.

8474  {
8475  SealHandleScope shs(isolate);
8476  // This is only called from codegen, so checks might be more lax.
8477  CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0);
8478  CONVERT_ARG_CHECKED(Object, key, 1);
8479 
8480  {
8481  DisallowHeapAllocation no_alloc;
8482 
8483  int finger_index = cache->finger_index();
8484  Object* o = cache->get(finger_index);
8485  if (o == key) {
8486  // The fastest case: hit the same place again.
8487  return cache->get(finger_index + 1);
8488  }
8489 
8490  for (int i = finger_index - 2; i >= JSFunctionResultCache::kEntriesIndex;
8491  i -= 2) {
8492  o = cache->get(i);
8493  if (o == key) {
8494  cache->set_finger_index(i);
8495  return cache->get(i + 1);
8496  }
8497  }
8498 
8499  int size = cache->size();
8500  DCHECK(size <= cache->length());
8501 
8502  for (int i = size - 2; i > finger_index; i -= 2) {
8503  o = cache->get(i);
8504  if (o == key) {
8505  cache->set_finger_index(i);
8506  return cache->get(i + 1);
8507  }
8508  }
8509  }
8510 
8511  // There is no value in the cache. Invoke the function and cache result.
8512  HandleScope scope(isolate);
8513 
8514  Handle<JSFunctionResultCache> cache_handle(cache);
8515  Handle<Object> key_handle(key, isolate);
8516  Handle<Object> value;
8517  {
8518  Handle<JSFunction> factory(JSFunction::cast(
8519  cache_handle->get(JSFunctionResultCache::kFactoryIndex)));
8520  // TODO(antonm): consider passing a receiver when constructing a cache.
8521  Handle<JSObject> receiver(isolate->global_proxy());
8522  // This handle is nor shared, nor used later, so it's safe.
8523  Handle<Object> argv[] = {key_handle};
8525  isolate, value,
8526  Execution::Call(isolate, factory, receiver, arraysize(argv), argv));
8527  }
8528 
8529 #ifdef VERIFY_HEAP
8530  if (FLAG_verify_heap) {
8531  cache_handle->JSFunctionResultCacheVerify();
8532  }
8533 #endif
8534 
8535  // Function invocation may have cleared the cache. Reread all the data.
8536  int finger_index = cache_handle->finger_index();
8537  int size = cache_handle->size();
8538 
8539  // If we have spare room, put new data into it, otherwise evict post finger
8540  // entry which is likely to be the least recently used.
8541  int index = -1;
8542  if (size < cache_handle->length()) {
8543  cache_handle->set_size(size + JSFunctionResultCache::kEntrySize);
8544  index = size;
8545  } else {
8546  index = finger_index + JSFunctionResultCache::kEntrySize;
8547  if (index == cache_handle->length()) {
8548  index = JSFunctionResultCache::kEntriesIndex;
8549  }
8550  }
8551 
8552  DCHECK(index % 2 == 0);
8553  DCHECK(index >= JSFunctionResultCache::kEntriesIndex);
8554  DCHECK(index < cache_handle->length());
8555 
8556  cache_handle->set(index, *key_handle);
8557  cache_handle->set(index + 1, *value);
8558  cache_handle->set_finger_index(index);
8559 
8560 #ifdef VERIFY_HEAP
8561  if (FLAG_verify_heap) {
8562  cache_handle->JSFunctionResultCacheVerify();
8563  }
8564 #endif
8565 
8566  return *value;
8567 }

References arraysize, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_CHECKED, DCHECK, v8::internal::JSFunctionResultCache::kEntriesIndex, v8::internal::JSFunctionResultCache::kEntrySize, v8::internal::JSFunctionResultCache::kFactoryIndex, and size.

◆ RUNTIME_FUNCTION() [156/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFunctionCodePositionFromSource  )

Definition at line 8216 of file runtime.cc.

8216  {
8217  HandleScope scope(isolate);
8218  CHECK(isolate->debug()->live_edit_enabled());
8219  DCHECK(args.length() == 2);
8220  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8221  CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
8222 
8223  Handle<Code> code(function->code(), isolate);
8224 
8225  if (code->kind() != Code::FUNCTION &&
8226  code->kind() != Code::OPTIMIZED_FUNCTION) {
8227  return isolate->heap()->undefined_value();
8228  }
8229 
8230  RelocIterator it(*code, RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION));
8231  int closest_pc = 0;
8232  int distance = kMaxInt;
8233  while (!it.done()) {
8234  int statement_position = static_cast<int>(it.rinfo()->data());
8235  // Check if this break point is closer that what was previously found.
8236  if (source_position <= statement_position &&
8237  statement_position - source_position < distance) {
8238  closest_pc =
8239  static_cast<int>(it.rinfo()->pc() - code->instruction_start());
8240  distance = statement_position - source_position;
8241  // Check whether we can't get any closer.
8242  if (distance == 0) break;
8243  }
8244  it.next();
8245  }
8246 
8247  return Smi::FromInt(closest_pc);
8248 }

References CHECK, CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, v8::internal::RelocInfo::data(), DCHECK, v8::internal::RelocIterator::done(), v8::internal::Smi::FromInt(), kMaxInt, v8::internal::RelocInfo::ModeMask(), v8::internal::RelocIterator::next(), v8::internal::RelocInfo::pc(), v8::internal::RelocIterator::rinfo(), and v8::internal::RelocInfo::STATEMENT_POSITION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [157/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFunctionDelegate  )

Definition at line 3857 of file runtime.cc.

3857  {
3858  HandleScope scope(isolate);
3859  DCHECK(args.length() == 1);
3860  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
3861  RUNTIME_ASSERT(!object->IsJSFunction());
3862  return *Execution::GetFunctionDelegate(isolate, object);
3863 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [158/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFunctionScopeCount  )

Definition at line 7043 of file runtime.cc.

7043  {
7044  HandleScope scope(isolate);
7045  DCHECK(args.length() == 1);
7046 
7047  // Check arguments.
7048  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
7049 
7050  // Count the visible scopes.
7051  int n = 0;
7052  for (ScopeIterator it(isolate, fun); !it.Done(); it.Next()) {
7053  n++;
7054  }
7055 
7056  return Smi::FromInt(n);
7057 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::ScopeIterator::Done(), and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [159/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetFunctionScopeDetails  )

Definition at line 7060 of file runtime.cc.

7060  {
7061  HandleScope scope(isolate);
7062  DCHECK(args.length() == 2);
7063 
7064  // Check arguments.
7065  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
7066  CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]);
7067 
7068  // Find the requested scope.
7069  int n = 0;
7070  ScopeIterator it(isolate, fun);
7071  for (; !it.Done() && n < index; it.Next()) {
7072  n++;
7073  }
7074  if (it.Done()) {
7075  return isolate->heap()->undefined_value();
7076  }
7077 
7078  Handle<JSObject> details;
7079  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, details,
7080  MaterializeScopeDetails(isolate, &it));
7081  return *details;
7082 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::ScopeIterator::Done(), MaterializeScopeDetails(), and v8::internal::ScopeIterator::Next().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [160/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetHandler  )

Definition at line 610 of file runtime.cc.

610  {
611  SealHandleScope shs(isolate);
612  DCHECK(args.length() == 1);
613  CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
614  return proxy->handler();
615 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [161/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetHeapUsage  )

Definition at line 8286 of file runtime.cc.

8286  {
8287  SealHandleScope shs(isolate);
8288  DCHECK(args.length() == 0);
8289  int usage = static_cast<int>(isolate->heap()->SizeOfObjects());
8290  if (!Smi::IsValid(usage)) {
8291  return *isolate->factory()->NewNumberFromInt(usage);
8292  }
8293  return Smi::FromInt(usage);
8294 }

References DCHECK, v8::internal::Smi::FromInt(), and v8::internal::Smi::IsValid().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [162/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetIndexedInterceptorElementNames  )

Definition at line 3029 of file runtime.cc.

3029  {
3030  HandleScope scope(isolate);
3031  DCHECK(args.length() == 1);
3032  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
3033 
3034  if (obj->HasIndexedInterceptor()) {
3035  Handle<JSObject> result;
3036  if (JSObject::GetKeysForIndexedInterceptor(obj, obj).ToHandle(&result)) {
3037  return *result;
3038  }
3039  }
3040  return isolate->heap()->undefined_value();
3041 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::GetKeysForIndexedInterceptor().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [163/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetInterceptorInfo  )

Definition at line 2994 of file runtime.cc.

2994  {
2995  HandleScope scope(isolate);
2996  DCHECK(args.length() == 1);
2997  if (!args[0]->IsJSObject()) {
2998  return Smi::FromInt(0);
2999  }
3000  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
3001 
3002  int result = 0;
3003  if (obj->HasNamedInterceptor()) result |= 2;
3004  if (obj->HasIndexedInterceptor()) result |= 1;
3005 
3006  return Smi::FromInt(result);
3007 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [164/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetNamedInterceptorPropertyNames  )

Definition at line 3012 of file runtime.cc.

3012  {
3013  HandleScope scope(isolate);
3014  DCHECK(args.length() == 1);
3015  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
3016 
3017  if (obj->HasNamedInterceptor()) {
3018  Handle<JSObject> result;
3019  if (JSObject::GetKeysForNamedInterceptor(obj, obj).ToHandle(&result)) {
3020  return *result;
3021  }
3022  }
3023  return isolate->heap()->undefined_value();
3024 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::GetKeysForNamedInterceptor().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [165/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetObjectContextNotifierPerformChange  )

Definition at line 8769 of file runtime.cc.

8769  {
8770  HandleScope scope(isolate);
8771  DCHECK(args.length() == 1);
8772  CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0);
8773 
8774  Handle<Context> context(object_info->GetCreationContext(), isolate);
8775  return context->native_object_notifier_perform_change();
8776 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [166/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetObjectContextObjectGetNotifier  )

Definition at line 8759 of file runtime.cc.

8759  {
8760  HandleScope scope(isolate);
8761  DCHECK(args.length() == 1);
8762  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
8763 
8764  Handle<Context> context(object->GetCreationContext(), isolate);
8765  return context->native_object_get_notifier();
8766 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [167/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetObjectContextObjectObserve  )

Definition at line 8749 of file runtime.cc.

8749  {
8750  HandleScope scope(isolate);
8751  DCHECK(args.length() == 1);
8752  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
8753 
8754  Handle<Context> context(object->GetCreationContext(), isolate);
8755  return context->native_object_observe();
8756 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [168/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetObservationState  )

Definition at line 8708 of file runtime.cc.

8708  {
8709  SealHandleScope shs(isolate);
8710  DCHECK(args.length() == 0);
8711  return isolate->heap()->observation_state();
8712 }

References DCHECK.

◆ RUNTIME_FUNCTION() [169/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetOptimizationCount  )

Definition at line 142 of file runtime-test.cc.

142  {
143  HandleScope scope(isolate);
144  DCHECK(args.length() == 1);
145  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
146  return Smi::FromInt(function->shared()->opt_count());
147 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [170/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetOptimizationStatus  )

Definition at line 95 of file runtime-test.cc.

95  {
96  HandleScope scope(isolate);
97  RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
98  if (!isolate->use_crankshaft()) {
99  return Smi::FromInt(4); // 4 == "never".
100  }
101  bool sync_with_compiler_thread = true;
102  if (args.length() == 2) {
103  CONVERT_ARG_HANDLE_CHECKED(String, sync, 1);
104  if (sync->IsOneByteEqualTo(STATIC_CHAR_VECTOR("no sync"))) {
105  sync_with_compiler_thread = false;
106  }
107  }
108  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
109  if (isolate->concurrent_recompilation_enabled() &&
110  sync_with_compiler_thread) {
111  while (function->IsInOptimizationQueue()) {
112  isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
113  base::OS::Sleep(50);
114  }
115  }
116  if (FLAG_always_opt) {
117  // We may have always opt, but that is more best-effort than a real
118  // promise, so we still say "no" if it is not optimized.
119  return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always".
120  : Smi::FromInt(2); // 2 == "no".
121  }
122  if (FLAG_deopt_every_n_times) {
123  return Smi::FromInt(6); // 6 == "maybe deopted".
124  }
125  if (function->IsOptimized() && function->code()->is_turbofanned()) {
126  return Smi::FromInt(7); // 7 == "TurboFan compiler".
127  }
128  return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes".
129  : Smi::FromInt(2); // 2 == "no".
130 }

References CONVERT_ARG_HANDLE_CHECKED, v8::internal::Smi::FromInt(), RUNTIME_ASSERT, v8::base::OS::Sleep(), and STATIC_CHAR_VECTOR.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [171/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetOwnElementNames  )

Definition at line 2977 of file runtime.cc.

2977  {
2978  HandleScope scope(isolate);
2979  DCHECK(args.length() == 1);
2980  if (!args[0]->IsJSObject()) {
2981  return isolate->heap()->undefined_value();
2982  }
2983  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
2984 
2985  int n = obj->NumberOfOwnElements(static_cast<PropertyAttributes>(NONE));
2986  Handle<FixedArray> names = isolate->factory()->NewFixedArray(n);
2987  obj->GetOwnElementKeys(*names, static_cast<PropertyAttributes>(NONE));
2988  return *isolate->factory()->NewJSArrayWithElements(names);
2989 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and NONE.

◆ RUNTIME_FUNCTION() [172/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetOwnProperty  )

Definition at line 834 of file runtime.cc.

834  {
835  HandleScope scope(isolate);
836  DCHECK(args.length() == 2);
837  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
839  Handle<Object> result;
840  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
841  GetOwnProperty(isolate, obj, name));
842  return *result;
843 }
static MUST_USE_RESULT MaybeHandle< Object > GetOwnProperty(Isolate *isolate, Handle< JSObject > obj, Handle< Name > name)
Definition: runtime.cc:757

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, GetOwnProperty(), and name.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [173/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetOwnPropertyNames  )

Definition at line 2857 of file runtime.cc.

2857  {
2858  HandleScope scope(isolate);
2859  DCHECK(args.length() == 2);
2860  if (!args[0]->IsJSObject()) {
2861  return isolate->heap()->undefined_value();
2862  }
2863  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
2864  CONVERT_SMI_ARG_CHECKED(filter_value, 1);
2865  PropertyAttributes filter = static_cast<PropertyAttributes>(filter_value);
2866 
2867  // Skip the global proxy as it has no properties and always delegates to the
2868  // real global object.
2869  if (obj->IsJSGlobalProxy()) {
2870  // Only collect names if access is permitted.
2871  if (obj->IsAccessCheckNeeded() &&
2872  !isolate->MayNamedAccess(obj, isolate->factory()->undefined_value(),
2873  v8::ACCESS_KEYS)) {
2874  isolate->ReportFailedAccessCheck(obj, v8::ACCESS_KEYS);
2876  return *isolate->factory()->NewJSArray(0);
2877  }
2878  PrototypeIterator iter(isolate, obj);
2879  obj = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
2880  }
2881 
2882  // Find the number of objects making up this.
2883  int length = OwnPrototypeChainLength(*obj);
2884 
2885  // Find the number of own properties for each of the objects.
2886  ScopedVector<int> own_property_count(length);
2887  int total_property_count = 0;
2888  {
2889  PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER);
2890  for (int i = 0; i < length; i++) {
2891  DCHECK(!iter.IsAtEnd());
2892  Handle<JSObject> jsproto =
2893  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
2894  // Only collect names if access is permitted.
2895  if (jsproto->IsAccessCheckNeeded() &&
2896  !isolate->MayNamedAccess(jsproto,
2897  isolate->factory()->undefined_value(),
2898  v8::ACCESS_KEYS)) {
2899  isolate->ReportFailedAccessCheck(jsproto, v8::ACCESS_KEYS);
2901  return *isolate->factory()->NewJSArray(0);
2902  }
2903  int n;
2904  n = jsproto->NumberOfOwnProperties(filter);
2905  own_property_count[i] = n;
2906  total_property_count += n;
2907  iter.Advance();
2908  }
2909  }
2910 
2911  // Allocate an array with storage for all the property names.
2912  Handle<FixedArray> names =
2913  isolate->factory()->NewFixedArray(total_property_count);
2914 
2915  // Get the property names.
2916  int next_copy_index = 0;
2917  int hidden_strings = 0;
2918  {
2919  PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER);
2920  for (int i = 0; i < length; i++) {
2921  DCHECK(!iter.IsAtEnd());
2922  Handle<JSObject> jsproto =
2923  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
2924  jsproto->GetOwnPropertyNames(*names, next_copy_index, filter);
2925  if (i > 0) {
2926  // Names from hidden prototypes may already have been added
2927  // for inherited function template instances. Count the duplicates
2928  // and stub them out; the final copy pass at the end ignores holes.
2929  for (int j = next_copy_index;
2930  j < next_copy_index + own_property_count[i]; j++) {
2931  Object* name_from_hidden_proto = names->get(j);
2932  for (int k = 0; k < next_copy_index; k++) {
2933  if (names->get(k) != isolate->heap()->hidden_string()) {
2934  Object* name = names->get(k);
2935  if (name_from_hidden_proto == name) {
2936  names->set(j, isolate->heap()->hidden_string());
2937  hidden_strings++;
2938  break;
2939  }
2940  }
2941  }
2942  }
2943  }
2944  next_copy_index += own_property_count[i];
2945 
2946  // Hidden properties only show up if the filter does not skip strings.
2947  if ((filter & STRING) == 0 && JSObject::HasHiddenProperties(jsproto)) {
2948  hidden_strings++;
2949  }
2950  iter.Advance();
2951  }
2952  }
2953 
2954  // Filter out name of hidden properties object and
2955  // hidden prototype duplicates.
2956  if (hidden_strings > 0) {
2957  Handle<FixedArray> old_names = names;
2958  names = isolate->factory()->NewFixedArray(names->length() - hidden_strings);
2959  int dest_pos = 0;
2960  for (int i = 0; i < total_property_count; i++) {
2961  Object* name = old_names->get(i);
2962  if (name == isolate->heap()->hidden_string()) {
2963  hidden_strings--;
2964  continue;
2965  }
2966  names->set(dest_pos++, name);
2967  }
2968  DCHECK_EQ(0, hidden_strings);
2969  }
2970 
2971  return *isolate->factory()->NewJSArrayWithElements(names);
2972 }
static int OwnPrototypeChainLength(JSObject *obj)
Definition: runtime.cc:2844
@ ACCESS_KEYS
Definition: v8.h:3524

References v8::ACCESS_KEYS, v8::internal::PrototypeIterator::Advance(), v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DCHECK_EQ, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::JSObject::HasHiddenProperties(), v8::internal::PrototypeIterator::IsAtEnd(), name, OwnPrototypeChainLength(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, v8::internal::PrototypeIterator::START_AT_RECEIVER, and STRING.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [174/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetProperty  )

Definition at line 1942 of file runtime.cc.

1942  {
1943  HandleScope scope(isolate);
1944  DCHECK(args.length() == 2);
1945 
1946  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
1948  Handle<Object> result;
1950  isolate, result, Runtime::GetObjectProperty(isolate, object, key));
1951  return *result;
1952 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Runtime::GetObjectProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [175/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetPropertyNames  )

Definition at line 2799 of file runtime.cc.

2799  {
2800  HandleScope scope(isolate);
2801  DCHECK(args.length() == 1);
2802  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
2803  Handle<JSArray> result;
2804 
2805  isolate->counters()->for_in()->Increment();
2806  Handle<FixedArray> elements;
2808  isolate, elements,
2809  JSReceiver::GetKeys(object, JSReceiver::INCLUDE_PROTOS));
2810  return *isolate->factory()->NewJSArrayWithElements(elements);
2811 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSReceiver::GetKeys(), and v8::internal::JSReceiver::INCLUDE_PROTOS.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [176/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetPropertyNamesFast  )

Definition at line 2819 of file runtime.cc.

2819  {
2820  SealHandleScope shs(isolate);
2821  DCHECK(args.length() == 1);
2822 
2823  CONVERT_ARG_CHECKED(JSReceiver, raw_object, 0);
2824 
2825  if (raw_object->IsSimpleEnum()) return raw_object->map();
2826 
2827  HandleScope scope(isolate);
2828  Handle<JSReceiver> object(raw_object);
2829  Handle<FixedArray> content;
2831  isolate, content,
2832  JSReceiver::GetKeys(object, JSReceiver::INCLUDE_PROTOS));
2833 
2834  // Test again, since cache may have been built by preceding call.
2835  if (object->IsSimpleEnum()) return object->map();
2836 
2837  return *content;
2838 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_CHECKED, DCHECK, v8::internal::JSReceiver::GetKeys(), and v8::internal::JSReceiver::INCLUDE_PROTOS.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [177/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetPrototype  )

Definition at line 643 of file runtime.cc.

643  {
644  HandleScope scope(isolate);
645  DCHECK(args.length() == 1);
647  // We don't expect access checks to be needed on JSProxy objects.
648  DCHECK(!obj->IsAccessCheckNeeded() || obj->IsJSObject());
649  PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER);
650  do {
651  if (PrototypeIterator::GetCurrent(iter)->IsAccessCheckNeeded() &&
652  !isolate->MayNamedAccess(
653  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)),
654  isolate->factory()->proto_string(), v8::ACCESS_GET)) {
655  isolate->ReportFailedAccessCheck(
656  Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)),
659  return isolate->heap()->undefined_value();
660  }
661  iter.AdvanceIgnoringProxies();
662  if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
663  return *PrototypeIterator::GetCurrent(iter);
664  }
665  } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
666  return *PrototypeIterator::GetCurrent(iter);
667 }

References v8::ACCESS_GET, v8::internal::PrototypeIterator::AdvanceIgnoringProxies(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::PrototypeIterator::END_AT_NON_HIDDEN, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::PrototypeIterator::IsAtEnd(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, and v8::internal::PrototypeIterator::START_AT_RECEIVER.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [178/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetRootNaN  )

Definition at line 3779 of file runtime.cc.

3779  {
3780  SealHandleScope shs(isolate);
3781  DCHECK(args.length() == 0);
3782  RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
3783  return isolate->heap()->nan_value();
3784 }

References DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [179/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetScopeCount  )

Definition at line 6838 of file runtime.cc.

6838  {
6839  HandleScope scope(isolate);
6840  DCHECK(args.length() == 2);
6841  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
6842  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
6843 
6844  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
6845 
6846  // Get the frame where the debugging is performed.
6847  StackFrame::Id id = UnwrapFrameId(wrapped_id);
6848  JavaScriptFrameIterator it(isolate, id);
6849  JavaScriptFrame* frame = it.frame();
6850 
6851  // Count the visible scopes.
6852  int n = 0;
6853  for (ScopeIterator it(isolate, frame, 0); !it.Done(); it.Next()) {
6854  n++;
6855  }
6856 
6857  return Smi::FromInt(n);
6858 }

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::ScopeIterator::Done(), v8::internal::Smi::FromInt(), RUNTIME_ASSERT, and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [180/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetScopeDetails  )

Definition at line 6966 of file runtime.cc.

6966  {
6967  HandleScope scope(isolate);
6968  DCHECK(args.length() == 4);
6969  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
6970  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
6971 
6972  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
6973  CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]);
6974  CONVERT_NUMBER_CHECKED(int, index, Int32, args[3]);
6975 
6976  // Get the frame where the debugging is performed.
6977  StackFrame::Id id = UnwrapFrameId(wrapped_id);
6978  JavaScriptFrameIterator frame_it(isolate, id);
6979  JavaScriptFrame* frame = frame_it.frame();
6980 
6981  // Find the requested scope.
6982  int n = 0;
6983  ScopeIterator it(isolate, frame, inlined_jsframe_index);
6984  for (; !it.Done() && n < index; it.Next()) {
6985  n++;
6986  }
6987  if (it.Done()) {
6988  return isolate->heap()->undefined_value();
6989  }
6990  Handle<JSObject> details;
6991  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, details,
6992  MaterializeScopeDetails(isolate, &it));
6993  return *details;
6994 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CheckExecutionState(), CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::ScopeIterator::Done(), MaterializeScopeDetails(), v8::internal::ScopeIterator::Next(), RUNTIME_ASSERT, and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [181/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetScript  )

Definition at line 8334 of file runtime.cc.

8334  {
8335  HandleScope scope(isolate);
8336 
8337  DCHECK(args.length() == 1);
8338 
8339  CONVERT_ARG_CHECKED(String, script_name, 0);
8340 
8341  // Find the requested script.
8342  Handle<Object> result =
8343  Runtime_GetScriptFromScriptName(Handle<String>(script_name));
8344  return *result;
8345 }
static Handle< Object > Runtime_GetScriptFromScriptName(Handle< String > script_name)
Definition: runtime.cc:8303

References CONVERT_ARG_CHECKED, DCHECK, and Runtime_GetScriptFromScriptName().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [182/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetStepInPositions  )

Definition at line 6864 of file runtime.cc.

6864  {
6865  HandleScope scope(isolate);
6866  DCHECK(args.length() == 2);
6867  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
6868  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
6869 
6870  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
6871 
6872  // Get the frame where the debugging is performed.
6873  StackFrame::Id id = UnwrapFrameId(wrapped_id);
6874  JavaScriptFrameIterator frame_it(isolate, id);
6875  RUNTIME_ASSERT(!frame_it.done());
6876 
6877  JavaScriptFrame* frame = frame_it.frame();
6878 
6879  Handle<JSFunction> fun = Handle<JSFunction>(frame->function());
6880  Handle<SharedFunctionInfo> shared = Handle<SharedFunctionInfo>(fun->shared());
6881 
6882  if (!isolate->debug()->EnsureDebugInfo(shared, fun)) {
6883  return isolate->heap()->undefined_value();
6884  }
6885 
6886  Handle<DebugInfo> debug_info = Debug::GetDebugInfo(shared);
6887 
6888  int len = 0;
6889  Handle<JSArray> array(isolate->factory()->NewJSArray(10));
6890  // Find the break point where execution has stopped.
6891  BreakLocationIterator break_location_iterator(debug_info,
6893 
6894  break_location_iterator.FindBreakLocationFromAddress(frame->pc() - 1);
6895  int current_statement_pos = break_location_iterator.statement_position();
6896 
6897  while (!break_location_iterator.Done()) {
6898  bool accept;
6899  if (break_location_iterator.pc() > frame->pc()) {
6900  accept = true;
6901  } else {
6902  StackFrame::Id break_frame_id = isolate->debug()->break_frame_id();
6903  // The break point is near our pc. Could be a step-in possibility,
6904  // that is currently taken by active debugger call.
6905  if (break_frame_id == StackFrame::NO_ID) {
6906  // We are not stepping.
6907  accept = false;
6908  } else {
6909  JavaScriptFrameIterator additional_frame_it(isolate, break_frame_id);
6910  // If our frame is a top frame and we are stepping, we can do step-in
6911  // at this place.
6912  accept = additional_frame_it.frame()->id() == id;
6913  }
6914  }
6915  if (accept) {
6916  if (break_location_iterator.IsStepInLocation(isolate)) {
6917  Smi* position_value = Smi::FromInt(break_location_iterator.position());
6919  isolate, JSObject::SetElement(
6920  array, len, Handle<Object>(position_value, isolate),
6921  NONE, SLOPPY));
6922  len++;
6923  }
6924  }
6925  // Advance iterator.
6926  break_location_iterator.Next();
6927  if (current_statement_pos != break_location_iterator.statement_position()) {
6928  break;
6929  }
6930  }
6931  return *array;
6932 }

References ALL_BREAK_LOCATIONS, CheckExecutionState(), CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::BreakLocationIterator::Done(), v8::internal::BreakLocationIterator::FindBreakLocationFromAddress(), v8::internal::Smi::FromInt(), v8::internal::JavaScriptFrame::function(), v8::internal::Debug::GetDebugInfo(), v8::internal::BreakLocationIterator::IsStepInLocation(), v8::internal::BreakLocationIterator::Next(), NONE, v8::internal::BreakLocationIterator::pc(), v8::internal::BreakLocationIterator::position(), RETURN_FAILURE_ON_EXCEPTION, RUNTIME_ASSERT, v8::internal::JSObject::SetElement(), SLOPPY, v8::internal::BreakLocationIterator::statement_position(), and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [183/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetTemplateField  )

Definition at line 980 of file runtime.cc.

980  {
981  SealHandleScope shs(isolate);
982  DCHECK(args.length() == 2);
983  CONVERT_ARG_CHECKED(HeapObject, templ, 0);
984  CONVERT_SMI_ARG_CHECKED(index, 1);
985  int offset = index * kPointerSize + HeapObject::kHeaderSize;
986  InstanceType type = templ->map()->instance_type();
988  type == OBJECT_TEMPLATE_INFO_TYPE);
989  RUNTIME_ASSERT(offset > 0);
990  if (type == FUNCTION_TEMPLATE_INFO_TYPE) {
991  RUNTIME_ASSERT(offset < FunctionTemplateInfo::kSize);
992  } else {
993  RUNTIME_ASSERT(offset < ObjectTemplateInfo::kSize);
994  }
995  return *HeapObject::RawField(templ, offset);
996 }

References CONVERT_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, FUNCTION_TEMPLATE_INFO_TYPE, v8::internal::HeapObject::kHeaderSize, kPointerSize, v8::internal::FunctionTemplateInfo::kSize, v8::internal::ObjectTemplateInfo::kSize, OBJECT_TEMPLATE_INFO_TYPE, v8::internal::HeapObject::RawField(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [184/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetThreadCount  )

Definition at line 7157 of file runtime.cc.

7157  {
7158  HandleScope scope(isolate);
7159  DCHECK(args.length() == 1);
7160  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7161  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7162 
7163  // Count all archived V8 threads.
7164  int n = 0;
7165  for (ThreadState* thread = isolate->thread_manager()->FirstThreadStateInUse();
7166  thread != NULL; thread = thread->Next()) {
7167  n++;
7168  }
7169 
7170  // Total number of threads is current thread and archived threads.
7171  return Smi::FromInt(n + 1);
7172 }

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Smi::FromInt(), NULL, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [185/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetThreadDetails  )

Definition at line 7186 of file runtime.cc.

7186  {
7187  HandleScope scope(isolate);
7188  DCHECK(args.length() == 2);
7189  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7190  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7191 
7192  CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]);
7193 
7194  // Allocate array for result.
7195  Handle<FixedArray> details =
7196  isolate->factory()->NewFixedArray(kThreadDetailsSize);
7197 
7198  // Thread index 0 is current thread.
7199  if (index == 0) {
7200  // Fill the details.
7201  details->set(kThreadDetailsCurrentThreadIndex,
7202  isolate->heap()->true_value());
7203  details->set(kThreadDetailsThreadIdIndex,
7204  Smi::FromInt(ThreadId::Current().ToInteger()));
7205  } else {
7206  // Find the thread with the requested index.
7207  int n = 1;
7208  ThreadState* thread = isolate->thread_manager()->FirstThreadStateInUse();
7209  while (index != n && thread != NULL) {
7210  thread = thread->Next();
7211  n++;
7212  }
7213  if (thread == NULL) {
7214  return isolate->heap()->undefined_value();
7215  }
7216 
7217  // Fill the details.
7218  details->set(kThreadDetailsCurrentThreadIndex,
7219  isolate->heap()->false_value());
7220  details->set(kThreadDetailsThreadIdIndex,
7221  Smi::FromInt(thread->id().ToInteger()));
7222  }
7223 
7224  // Convert to JS array and return.
7225  return *isolate->factory()->NewJSArrayWithElements(details);
7226 }
static const int kThreadDetailsSize
Definition: runtime.cc:7177
static const int kThreadDetailsThreadIdIndex
Definition: runtime.cc:7176
static const int kThreadDetailsCurrentThreadIndex
Definition: runtime.cc:7175

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, v8::internal::ThreadId::Current(), DCHECK, v8::internal::Smi::FromInt(), v8::internal::ThreadState::id(), kThreadDetailsCurrentThreadIndex, kThreadDetailsSize, kThreadDetailsThreadIdIndex, v8::internal::ThreadState::Next(), NULL, RUNTIME_ASSERT, and v8::internal::ThreadId::ToInteger().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [186/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetV8Version  )

Definition at line 8368 of file runtime.cc.

8368  {
8369  HandleScope scope(isolate);
8370  DCHECK(args.length() == 0);
8371 
8372  const char* version_string = v8::V8::GetVersion();
8373 
8374  return *isolate->factory()->NewStringFromAsciiChecked(version_string);
8375 }
static const char * GetVersion()
Get the version string.
Definition: api.cc:5146

References DCHECK, and v8::V8::GetVersion().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [187/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetWeakMapEntries  )

Definition at line 201 of file runtime-collections.cc.

201  {
202  HandleScope scope(isolate);
203  DCHECK(args.length() == 1);
204  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
205  Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table()));
206  Handle<FixedArray> entries =
207  isolate->factory()->NewFixedArray(table->NumberOfElements() * 2);
208  {
210  int number_of_non_hole_elements = 0;
211  for (int i = 0; i < table->Capacity(); i++) {
212  Handle<Object> key(table->KeyAt(i), isolate);
213  if (table->IsKey(*key)) {
214  entries->set(number_of_non_hole_elements++, *key);
215  Object* value = table->Lookup(key);
216  entries->set(number_of_non_hole_elements++, value);
217  }
218  }
219  DCHECK_EQ(table->NumberOfElements() * 2, number_of_non_hole_elements);
220  }
221  return *isolate->factory()->NewJSArrayWithElements(entries);
222 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and DCHECK_EQ.

◆ RUNTIME_FUNCTION() [188/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GetWeakSetValues  )

Definition at line 312 of file runtime-collections.cc.

312  {
313  HandleScope scope(isolate);
314  DCHECK(args.length() == 1);
315  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
316  Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table()));
317  Handle<FixedArray> values =
318  isolate->factory()->NewFixedArray(table->NumberOfElements());
319  {
321  int number_of_non_hole_elements = 0;
322  for (int i = 0; i < table->Capacity(); i++) {
323  Handle<Object> key(table->KeyAt(i), isolate);
324  if (table->IsKey(*key)) {
325  values->set(number_of_non_hole_elements++, *key);
326  }
327  }
328  DCHECK_EQ(table->NumberOfElements(), number_of_non_hole_elements);
329  }
330  return *isolate->factory()->NewJSArrayWithElements(values);
331 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and DCHECK_EQ.

◆ RUNTIME_FUNCTION() [189/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GlobalPrint  )

Definition at line 234 of file runtime-test.cc.

234  {
235  SealHandleScope shs(isolate);
236  DCHECK(args.length() == 1);
237 
238  CONVERT_ARG_CHECKED(String, string, 0);
239  ConsStringIteratorOp op;
240  StringCharacterStream stream(string, &op);
241  while (stream.HasMore()) {
242  uint16_t character = stream.GetNext();
243  PrintF("%c", character);
244  }
245  return string;
246 }

References CONVERT_ARG_CHECKED, DCHECK, v8::internal::StringCharacterStream::GetNext(), v8::internal::StringCharacterStream::HasMore(), and PrintF().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [190/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_GlobalProxy  )

Definition at line 4528 of file runtime.cc.

4528  {
4529  SealHandleScope shs(isolate);
4530  DCHECK(args.length() == 1);
4531  CONVERT_ARG_CHECKED(Object, global, 0);
4532  if (!global->IsJSGlobalObject()) return isolate->heap()->null_value();
4533  return JSGlobalObject::cast(global)->global_proxy();
4534 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [191/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_HasElement  )

Definition at line 2772 of file runtime.cc.

2772  {
2773  HandleScope scope(isolate);
2774  DCHECK(args.length() == 2);
2775  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
2776  CONVERT_SMI_ARG_CHECKED(index, 1);
2777 
2778  Maybe<bool> maybe = JSReceiver::HasElement(receiver, index);
2779  if (!maybe.has_value) return isolate->heap()->exception();
2780  return isolate->heap()->ToBoolean(maybe.value);
2781 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::JSReceiver::HasElement(), and v8::maybe().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [192/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_HasOwnProperty  )

Definition at line 2720 of file runtime.cc.

2720  {
2721  HandleScope scope(isolate);
2722  DCHECK(args.length() == 2);
2724  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2725 
2726  uint32_t index;
2727  const bool key_is_array_index = key->AsArrayIndex(&index);
2728 
2729  // Only JS objects can have properties.
2730  if (object->IsJSObject()) {
2731  Handle<JSObject> js_obj = Handle<JSObject>::cast(object);
2732  // Fast case: either the key is a real named property or it is not
2733  // an array index and there are no interceptors or hidden
2734  // prototypes.
2735  Maybe<bool> maybe = JSObject::HasRealNamedProperty(js_obj, key);
2736  if (!maybe.has_value) return isolate->heap()->exception();
2737  DCHECK(!isolate->has_pending_exception());
2738  if (maybe.value) {
2739  return isolate->heap()->true_value();
2740  }
2741  Map* map = js_obj->map();
2742  if (!key_is_array_index && !map->has_named_interceptor() &&
2743  !HeapObject::cast(map->prototype())->map()->is_hidden_prototype()) {
2744  return isolate->heap()->false_value();
2745  }
2746  // Slow case.
2747  return HasOwnPropertyImplementation(isolate, Handle<JSObject>(js_obj),
2748  Handle<Name>(key));
2749  } else if (object->IsString() && key_is_array_index) {
2750  // Well, there is one exception: Handle [] on strings.
2751  Handle<String> string = Handle<String>::cast(object);
2752  if (index < static_cast<uint32_t>(string->length())) {
2753  return isolate->heap()->true_value();
2754  }
2755  }
2756  return isolate->heap()->false_value();
2757 }

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, HasOwnPropertyImplementation(), v8::internal::JSObject::HasRealNamedProperty(), map, and v8::maybe().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [193/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_HasProperty  )

Definition at line 2760 of file runtime.cc.

2760  {
2761  HandleScope scope(isolate);
2762  DCHECK(args.length() == 2);
2763  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
2764  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2765 
2766  Maybe<bool> maybe = JSReceiver::HasProperty(receiver, key);
2767  if (!maybe.has_value) return isolate->heap()->exception();
2768  return isolate->heap()->ToBoolean(maybe.value);
2769 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSReceiver::HasProperty(), and v8::maybe().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [194/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_HaveSameMap  )

Definition at line 295 of file runtime-test.cc.

295  {
296  SealHandleScope shs(isolate);
297  DCHECK(args.length() == 2);
298  CONVERT_ARG_CHECKED(JSObject, obj1, 0);
299  CONVERT_ARG_CHECKED(JSObject, obj2, 1);
300  return isolate->heap()->ToBoolean(obj1->map() == obj2->map());
301 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [195/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_HomeObjectSymbol  )

Definition at line 870 of file runtime.cc.

870  {
871  DCHECK(args.length() == 0);
872  return isolate->heap()->home_object_symbol();
873 }

References DCHECK.

◆ RUNTIME_FUNCTION() [196/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InitializeConstGlobal  )

Definition at line 1161 of file runtime.cc.

1161  {
1162  HandleScope handle_scope(isolate);
1163  // All constants are declared with an initial value. The name
1164  // of the constant is the first argument and the initial value
1165  // is the second.
1166  RUNTIME_ASSERT(args.length() == 2);
1167  CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
1169 
1170  Handle<GlobalObject> global = isolate->global_object();
1171 
1172  // Lookup the property as own on the global object.
1173  LookupIterator it(global, name, LookupIterator::HIDDEN_SKIP_INTERCEPTOR);
1174  Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
1175  DCHECK(maybe.has_value);
1176  PropertyAttributes old_attributes = maybe.value;
1177 
1178  PropertyAttributes attr =
1179  static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1180  // Set the value if the property is either missing, or the property attributes
1181  // allow setting the value without invoking an accessor.
1182  if (it.IsFound()) {
1183  // Ignore if we can't reconfigure the value.
1184  if ((old_attributes & DONT_DELETE) != 0) {
1185  if ((old_attributes & READ_ONLY) != 0 ||
1186  it.state() == LookupIterator::ACCESSOR) {
1187  return *value;
1188  }
1189  attr = static_cast<PropertyAttributes>(old_attributes | READ_ONLY);
1190  }
1191  }
1192 
1193  RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes(
1194  global, name, value, attr));
1195 
1196  return *value;
1197 }

References ACCESSOR, CONVERT_ARG_HANDLE_CHECKED, DCHECK, DONT_DELETE, v8::internal::JSReceiver::GetPropertyAttributes(), v8::maybe(), name, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, RUNTIME_ASSERT, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [197/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InitializeLegacyConstLookupSlot  )

Definition at line 1277 of file runtime.cc.

1277  {
1278  HandleScope scope(isolate);
1279  DCHECK(args.length() == 3);
1280 
1282  DCHECK(!value->IsTheHole());
1283  // Initializations are always done in a function or native context.
1284  CONVERT_ARG_HANDLE_CHECKED(Context, context_arg, 1);
1285  Handle<Context> context(context_arg->declaration_context());
1286  CONVERT_ARG_HANDLE_CHECKED(String, name, 2);
1287 
1288  int index;
1289  PropertyAttributes attributes;
1291  BindingFlags binding_flags;
1292  Handle<Object> holder =
1293  context->Lookup(name, flags, &index, &attributes, &binding_flags);
1294 
1295  if (index >= 0) {
1296  DCHECK(holder->IsContext());
1297  // Property was found in a context. Perform the assignment if the constant
1298  // was uninitialized.
1299  Handle<Context> context = Handle<Context>::cast(holder);
1300  DCHECK((attributes & READ_ONLY) != 0);
1301  if (context->get(index)->IsTheHole()) context->set(index, *value);
1302  return *value;
1303  }
1304 
1305  PropertyAttributes attr =
1306  static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1307 
1308  // Strict mode handling not needed (legacy const is disallowed in strict
1309  // mode).
1310 
1311  // The declared const was configurable, and may have been deleted in the
1312  // meanwhile. If so, re-introduce the variable in the context extension.
1313  DCHECK(context_arg->has_extension());
1314  if (attributes == ABSENT) {
1315  holder = handle(context_arg->extension(), isolate);
1316  } else {
1317  // For JSContextExtensionObjects, the initializer can be run multiple times
1318  // if in a for loop: for (var i = 0; i < 2; i++) { const x = i; }. Only the
1319  // first assignment should go through. For JSGlobalObjects, additionally any
1320  // code can run in between that modifies the declared property.
1321  DCHECK(holder->IsJSGlobalObject() || holder->IsJSContextExtensionObject());
1322 
1323  LookupIterator it(holder, name, LookupIterator::HIDDEN_SKIP_INTERCEPTOR);
1324  Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
1325  if (!maybe.has_value) return isolate->heap()->exception();
1326  PropertyAttributes old_attributes = maybe.value;
1327 
1328  // Ignore if we can't reconfigure the value.
1329  if ((old_attributes & DONT_DELETE) != 0) {
1330  if ((old_attributes & READ_ONLY) != 0 ||
1331  it.state() == LookupIterator::ACCESSOR) {
1332  return *value;
1333  }
1334  attr = static_cast<PropertyAttributes>(old_attributes | READ_ONLY);
1335  }
1336  }
1337 
1339  isolate, JSObject::SetOwnPropertyIgnoreAttributes(
1340  Handle<JSObject>::cast(holder), name, value, attr));
1341 
1342  return *value;
1343 }

References ABSENT, ACCESSOR, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, DONT_DELETE, DONT_FOLLOW_CHAINS, v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::JSReceiver::GetPropertyAttributes(), handle(), v8::maybe(), name, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [198/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InitializeVarGlobal  )

Definition at line 1139 of file runtime.cc.

1139  {
1140  HandleScope scope(isolate);
1141  // args[0] == name
1142  // args[1] == language_mode
1143  // args[2] == value (optional)
1144 
1145  // Determine if we need to assign to the variable if it already
1146  // exists (based on the number of arguments).
1147  RUNTIME_ASSERT(args.length() == 3);
1148 
1149  CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
1150  CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 1);
1152 
1153  Handle<GlobalObject> global(isolate->context()->global_object());
1154  Handle<Object> result;
1156  isolate, result, Object::SetProperty(global, name, value, strict_mode));
1157  return *result;
1158 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_STRICT_MODE_ARG_CHECKED, name, RUNTIME_ASSERT, and v8::internal::Object::SetProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [199/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InternalArrayConstructor  )

Definition at line 8889 of file runtime.cc.

8889  {
8890  HandleScope scope(isolate);
8891  Arguments empty_args(0, NULL);
8892  bool no_caller_args = args.length() == 1;
8893  DCHECK(no_caller_args || args.length() == 3);
8894  int parameters_start = no_caller_args ? 0 : 1;
8895  Arguments* caller_args =
8896  no_caller_args ? &empty_args : reinterpret_cast<Arguments*>(args[0]);
8897  CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, parameters_start);
8898 #ifdef DEBUG
8899  if (!no_caller_args) {
8900  CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 1);
8901  DCHECK(arg_count == caller_args->length());
8902  }
8903 #endif
8904  return ArrayConstructorCommon(isolate, constructor,
8905  Handle<AllocationSite>::null(), caller_args);
8906 }

References ArrayConstructorCommon(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and NULL.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [200/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InternalizeString  )

Definition at line 283 of file runtime-strings.cc.

283  {
284  HandleScope handles(isolate);
285  RUNTIME_ASSERT(args.length() == 1);
286  CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
287  return *isolate->factory()->InternalizeString(string);
288 }

References CONVERT_ARG_HANDLE_CHECKED, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [201/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_InternalSetPrototype  )

Definition at line 683 of file runtime.cc.

683  {
684  HandleScope scope(isolate);
685  DCHECK(args.length() == 2);
686  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
687  CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
688  DCHECK(!obj->IsAccessCheckNeeded());
689  DCHECK(!obj->map()->is_observed());
690  Handle<Object> result;
692  isolate, result, JSObject::SetPrototype(obj, prototype, false));
693  return *result;
694 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::SetPrototype().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [202/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Interrupt  )

Definition at line 4371 of file runtime.cc.

4371  {
4372  SealHandleScope shs(isolate);
4373  DCHECK(args.length() == 0);
4374  return isolate->stack_guard()->HandleInterrupts();
4375 }

References DCHECK.

◆ RUNTIME_FUNCTION() [203/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IS_VAR  )

Definition at line 8630 of file runtime.cc.

8630  {
8631  UNREACHABLE(); // implemented as macro in the parser
8632  return NULL;
8633 }

References NULL, and UNREACHABLE.

◆ RUNTIME_FUNCTION() [204/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsAttachedGlobal  )

Definition at line 4537 of file runtime.cc.

4537  {
4538  SealHandleScope shs(isolate);
4539  DCHECK(args.length() == 1);
4540  CONVERT_ARG_CHECKED(Object, global, 0);
4541  if (!global->IsJSGlobalObject()) return isolate->heap()->false_value();
4542  return isolate->heap()->ToBoolean(
4543  !JSGlobalObject::cast(global)->IsDetached());
4544 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [205/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsBreakOnException  )

Definition at line 7360 of file runtime.cc.

7360  {
7361  HandleScope scope(isolate);
7362  DCHECK(args.length() == 1);
7363  CONVERT_NUMBER_CHECKED(uint32_t, type_arg, Uint32, args[0]);
7364 
7365  ExceptionBreakType type = static_cast<ExceptionBreakType>(type_arg);
7366  bool result = isolate->debug()->IsBreakOnException(type);
7367  return Smi::FromInt(result);
7368 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [206/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsConcurrentRecompilationSupported  )

Definition at line 44 of file runtime-test.cc.

44  {
45  SealHandleScope shs(isolate);
46  DCHECK(args.length() == 0);
47  return isolate->heap()->ToBoolean(
48  isolate->concurrent_recompilation_enabled());
49 }

References DCHECK.

◆ RUNTIME_FUNCTION() [207/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsExtensible  )

Definition at line 948 of file runtime.cc.

948  {
949  SealHandleScope shs(isolate);
950  DCHECK(args.length() == 1);
951  CONVERT_ARG_CHECKED(JSObject, obj, 0);
952  if (obj->IsJSGlobalProxy()) {
953  PrototypeIterator iter(isolate, obj);
954  if (iter.IsAtEnd()) return isolate->heap()->false_value();
955  DCHECK(iter.GetCurrent()->IsJSGlobalObject());
956  obj = JSObject::cast(iter.GetCurrent());
957  }
958  return isolate->heap()->ToBoolean(obj->map()->is_extensible());
959 }

References CONVERT_ARG_CHECKED, DCHECK, v8::internal::PrototypeIterator::GetCurrent(), and v8::internal::PrototypeIterator::IsAtEnd().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [208/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsInPrototypeChain  )

Definition at line 729 of file runtime.cc.

729  {
730  HandleScope shs(isolate);
731  DCHECK(args.length() == 2);
732  // See ECMA-262, section 15.3.5.3, page 88 (steps 5 - 8).
735  PrototypeIterator iter(isolate, V, PrototypeIterator::START_AT_RECEIVER);
736  while (true) {
737  iter.AdvanceIgnoringProxies();
738  if (iter.IsAtEnd()) return isolate->heap()->false_value();
739  if (iter.IsAtEnd(O)) return isolate->heap()->true_value();
740  }
741 }

References v8::internal::PrototypeIterator::AdvanceIgnoringProxies(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::PrototypeIterator::IsAtEnd(), and v8::internal::PrototypeIterator::START_AT_RECEIVER.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [209/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsJSFunctionProxy  )

Definition at line 602 of file runtime.cc.

602  {
603  SealHandleScope shs(isolate);
604  DCHECK(args.length() == 1);
606  return isolate->heap()->ToBoolean(obj->IsJSFunctionProxy());
607 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [210/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsJSGlobalProxy  )

Definition at line 8658 of file runtime.cc.

8658  {
8659  SealHandleScope shs(isolate);
8660  DCHECK(args.length() == 1);
8661  CONVERT_ARG_CHECKED(Object, obj, 0);
8662  return isolate->heap()->ToBoolean(obj->IsJSGlobalProxy());
8663 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [211/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsJSModule  )

Definition at line 3981 of file runtime.cc.

3981  {
3982  SealHandleScope shs(isolate);
3983  DCHECK(args.length() == 1);
3984  CONVERT_ARG_CHECKED(Object, obj, 0);
3985  return isolate->heap()->ToBoolean(obj->IsJSModule());
3986 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [212/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsJSProxy  )

Definition at line 594 of file runtime.cc.

594  {
595  SealHandleScope shs(isolate);
596  DCHECK(args.length() == 1);
598  return isolate->heap()->ToBoolean(obj->IsJSProxy());
599 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [213/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsObserved  )

Definition at line 8666 of file runtime.cc.

8666  {
8667  SealHandleScope shs(isolate);
8668  DCHECK(args.length() == 1);
8669 
8670  if (!args[0]->IsJSReceiver()) return isolate->heap()->false_value();
8671  CONVERT_ARG_CHECKED(JSReceiver, obj, 0);
8672  DCHECK(!obj->IsJSGlobalProxy() || !obj->map()->is_observed());
8673  return isolate->heap()->ToBoolean(obj->map()->is_observed());
8674 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [214/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsPropertyEnumerable  )

Definition at line 2784 of file runtime.cc.

2784  {
2785  HandleScope scope(isolate);
2786  DCHECK(args.length() == 2);
2787 
2788  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2789  CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
2790 
2791  Maybe<PropertyAttributes> maybe =
2792  JSReceiver::GetOwnPropertyAttributes(object, key);
2793  if (!maybe.has_value) return isolate->heap()->exception();
2794  if (maybe.value == ABSENT) maybe.value = DONT_ENUM;
2795  return isolate->heap()->ToBoolean((maybe.value & DONT_ENUM) == 0);
2796 }

References ABSENT, CONVERT_ARG_HANDLE_CHECKED, DCHECK, DONT_ENUM, v8::internal::JSReceiver::GetOwnPropertyAttributes(), and v8::maybe().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [215/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsSloppyModeFunction  )

Definition at line 1403 of file runtime.cc.

1403  {
1404  SealHandleScope shs(isolate);
1405  DCHECK(args.length() == 1);
1406  CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
1407  if (!callable->IsJSFunction()) {
1408  HandleScope scope(isolate);
1409  Handle<Object> delegate;
1411  isolate, delegate, Execution::TryGetFunctionDelegate(
1412  isolate, Handle<JSReceiver>(callable)));
1413  callable = JSFunction::cast(*delegate);
1414  }
1415  JSFunction* function = JSFunction::cast(callable);
1416  SharedFunctionInfo* shared = function->shared();
1417  return isolate->heap()->ToBoolean(shared->strict_mode() == SLOPPY);
1418 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_CHECKED, DCHECK, SLOPPY, and v8::internal::SharedFunctionInfo::strict_mode().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [216/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsTemplate  )

Definition at line 971 of file runtime.cc.

971  {
972  SealHandleScope shs(isolate);
973  DCHECK(args.length() == 1);
975  bool result = arg->IsObjectTemplateInfo() || arg->IsFunctionTemplateInfo();
976  return isolate->heap()->ToBoolean(result);
977 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [217/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_IsValidSmi  )

Definition at line 107 of file runtime-numbers.cc.

107  {
108  SealHandleScope shs(isolate);
109  DCHECK(args.length() == 1);
110 
111  CONVERT_NUMBER_CHECKED(int32_t, number, Int32, args[0]);
112  return isolate->heap()->ToBoolean(Smi::IsValid(number));
113 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::internal::Smi::IsValid().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [218/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_KeyedGetProperty  )

Definition at line 1956 of file runtime.cc.

1956  {
1957  HandleScope scope(isolate);
1958  DCHECK(args.length() == 2);
1959 
1960  CONVERT_ARG_HANDLE_CHECKED(Object, receiver_obj, 0);
1961  CONVERT_ARG_HANDLE_CHECKED(Object, key_obj, 1);
1962 
1963  // Fast cases for getting named properties of the receiver JSObject
1964  // itself.
1965  //
1966  // The global proxy objects has to be excluded since LookupOwn on
1967  // the global proxy object can return a valid result even though the
1968  // global proxy object never has properties. This is the case
1969  // because the global proxy object forwards everything to its hidden
1970  // prototype including own lookups.
1971  //
1972  // Additionally, we need to make sure that we do not cache results
1973  // for objects that require access checks.
1974  if (receiver_obj->IsJSObject()) {
1975  if (!receiver_obj->IsJSGlobalProxy() &&
1976  !receiver_obj->IsAccessCheckNeeded() && key_obj->IsName()) {
1977  DisallowHeapAllocation no_allocation;
1978  Handle<JSObject> receiver = Handle<JSObject>::cast(receiver_obj);
1979  Handle<Name> key = Handle<Name>::cast(key_obj);
1980  if (receiver->HasFastProperties()) {
1981  // Attempt to use lookup cache.
1982  Handle<Map> receiver_map(receiver->map(), isolate);
1983  KeyedLookupCache* keyed_lookup_cache = isolate->keyed_lookup_cache();
1984  int index = keyed_lookup_cache->Lookup(receiver_map, key);
1985  if (index != -1) {
1986  // Doubles are not cached, so raw read the value.
1987  return receiver->RawFastPropertyAt(
1988  FieldIndex::ForKeyedLookupCacheIndex(*receiver_map, index));
1989  }
1990  // Lookup cache miss. Perform lookup and update the cache if
1991  // appropriate.
1992  LookupIterator it(receiver, key, LookupIterator::OWN);
1993  if (it.state() == LookupIterator::DATA &&
1994  it.property_details().type() == FIELD) {
1995  FieldIndex field_index = it.GetFieldIndex();
1996  // Do not track double fields in the keyed lookup cache. Reading
1997  // double values requires boxing.
1998  if (!it.representation().IsDouble()) {
1999  keyed_lookup_cache->Update(receiver_map, key,
2000  field_index.GetKeyedLookupCacheIndex());
2001  }
2002  AllowHeapAllocation allow_allocation;
2003  return *JSObject::FastPropertyAt(receiver, it.representation(),
2004  field_index);
2005  }
2006  } else {
2007  // Attempt dictionary lookup.
2008  NameDictionary* dictionary = receiver->property_dictionary();
2009  int entry = dictionary->FindEntry(key);
2010  if ((entry != NameDictionary::kNotFound) &&
2011  (dictionary->DetailsAt(entry).type() == NORMAL)) {
2012  Object* value = dictionary->ValueAt(entry);
2013  if (!receiver->IsGlobalObject()) return value;
2014  value = PropertyCell::cast(value)->value();
2015  if (!value->IsTheHole()) return value;
2016  // If value is the hole (meaning, absent) do the general lookup.
2017  }
2018  }
2019  } else if (key_obj->IsSmi()) {
2020  // JSObject without a name key. If the key is a Smi, check for a
2021  // definite out-of-bounds access to elements, which is a strong indicator
2022  // that subsequent accesses will also call the runtime. Proactively
2023  // transition elements to FAST_*_ELEMENTS to avoid excessive boxing of
2024  // doubles for those future calls in the case that the elements would
2025  // become FAST_DOUBLE_ELEMENTS.
2026  Handle<JSObject> js_object = Handle<JSObject>::cast(receiver_obj);
2027  ElementsKind elements_kind = js_object->GetElementsKind();
2028  if (IsFastDoubleElementsKind(elements_kind)) {
2029  Handle<Smi> key = Handle<Smi>::cast(key_obj);
2030  if (key->value() >= js_object->elements()->length()) {
2031  if (IsFastHoleyElementsKind(elements_kind)) {
2032  elements_kind = FAST_HOLEY_ELEMENTS;
2033  } else {
2034  elements_kind = FAST_ELEMENTS;
2035  }
2037  isolate, TransitionElements(js_object, elements_kind, isolate));
2038  }
2039  } else {
2040  DCHECK(IsFastSmiOrObjectElementsKind(elements_kind) ||
2041  !IsFastElementsKind(elements_kind));
2042  }
2043  }
2044  } else if (receiver_obj->IsString() && key_obj->IsSmi()) {
2045  // Fast case for string indexing using [] with a smi index.
2046  Handle<String> str = Handle<String>::cast(receiver_obj);
2047  int index = args.smi_at(1);
2048  if (index >= 0 && index < str->length()) {
2049  return *GetCharAt(str, index);
2050  }
2051  }
2052 
2053  // Fall back to GetObjectProperty.
2054  Handle<Object> result;
2056  isolate, result,
2057  Runtime::GetObjectProperty(isolate, receiver_obj, key_obj));
2058  return *result;
2059 }
static MUST_USE_RESULT MaybeHandle< Object > TransitionElements(Handle< Object > object, ElementsKind to_kind, Isolate *isolate)
Definition: runtime.cc:230
static Handle< Object > GetCharAt(Handle< String > string, uint32_t index)
Definition: runtime.cc:1840

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Dictionary< Derived, Shape, Key >::DetailsAt(), FAST_ELEMENTS, FAST_HOLEY_ELEMENTS, v8::internal::JSObject::FastPropertyAt(), FIELD, v8::internal::NameDictionary::FindEntry(), GetCharAt(), v8::internal::Runtime::GetObjectProperty(), IsFastDoubleElementsKind(), IsFastElementsKind(), IsFastHoleyElementsKind(), IsFastSmiOrObjectElementsKind(), v8::internal::HashTable< Derived, Shape, Key >::kNotFound, v8::internal::KeyedLookupCache::Lookup(), NORMAL, RETURN_FAILURE_ON_EXCEPTION, TransitionElements(), v8::internal::KeyedLookupCache::Update(), and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [219/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditCheckAndDropActivations  )

Definition at line 8147 of file runtime.cc.

8147  {
8148  HandleScope scope(isolate);
8149  CHECK(isolate->debug()->live_edit_enabled());
8150  DCHECK(args.length() == 2);
8151  CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
8152  CONVERT_BOOLEAN_ARG_CHECKED(do_drop, 1);
8153  RUNTIME_ASSERT(shared_array->length()->IsSmi());
8154  RUNTIME_ASSERT(shared_array->HasFastElements())
8155  int array_length = Smi::cast(shared_array->length())->value();
8156  for (int i = 0; i < array_length; i++) {
8157  Handle<Object> element =
8158  Object::GetElement(isolate, shared_array, i).ToHandleChecked();
8160  element->IsJSValue() &&
8161  Handle<JSValue>::cast(element)->value()->IsSharedFunctionInfo());
8162  }
8163 
8164  return *LiveEdit::CheckAndDropActivations(shared_array, do_drop);
8165 }

References CHECK, v8::internal::LiveEdit::CheckAndDropActivations(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, v8::internal::Object::GetElement(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [220/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditCompareStrings  )

Definition at line 8171 of file runtime.cc.

8171  {
8172  HandleScope scope(isolate);
8173  CHECK(isolate->debug()->live_edit_enabled());
8174  DCHECK(args.length() == 2);
8175  CONVERT_ARG_HANDLE_CHECKED(String, s1, 0);
8176  CONVERT_ARG_HANDLE_CHECKED(String, s2, 1);
8177 
8178  return *LiveEdit::CompareStrings(s1, s2);
8179 }

References CHECK, v8::internal::LiveEdit::CompareStrings(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, s1, and s2.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [221/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditFindSharedFunctionInfosForScript  )

Definition at line 7965 of file runtime.cc.

7965  {
7966  HandleScope scope(isolate);
7967  CHECK(isolate->debug()->live_edit_enabled());
7968  DCHECK(args.length() == 1);
7969  CONVERT_ARG_CHECKED(JSValue, script_value, 0);
7970 
7971  RUNTIME_ASSERT(script_value->value()->IsScript());
7972  Handle<Script> script = Handle<Script>(Script::cast(script_value->value()));
7973 
7974  const int kBufferSize = 32;
7975 
7976  Handle<FixedArray> array;
7977  array = isolate->factory()->NewFixedArray(kBufferSize);
7978  int number;
7979  Heap* heap = isolate->heap();
7980  {
7981  HeapIterator heap_iterator(heap);
7982  Script* scr = *script;
7983  FixedArray* arr = *array;
7984  number = FindSharedFunctionInfosForScript(&heap_iterator, scr, arr);
7985  }
7986  if (number > kBufferSize) {
7987  array = isolate->factory()->NewFixedArray(number);
7988  HeapIterator heap_iterator(heap);
7989  Script* scr = *script;
7990  FixedArray* arr = *array;
7991  FindSharedFunctionInfosForScript(&heap_iterator, scr, arr);
7992  }
7993 
7994  Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(array);
7995  result->set_length(Smi::FromInt(number));
7996 
7997  LiveEdit::WrapSharedFunctionInfos(result);
7998 
7999  return *result;
8000 }
static int FindSharedFunctionInfosForScript(HeapIterator *iterator, Script *script, FixedArray *buffer)
Definition: runtime.cc:7937

References CHECK, CONVERT_ARG_CHECKED, DCHECK, FindSharedFunctionInfosForScript(), v8::internal::Smi::FromInt(), v8::base::anonymous_namespace{semaphore-unittest.cc}::kBufferSize, RUNTIME_ASSERT, and v8::internal::LiveEdit::WrapSharedFunctionInfos().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [222/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditFunctionSetScript  )

Definition at line 8080 of file runtime.cc.

8080  {
8081  HandleScope scope(isolate);
8082  CHECK(isolate->debug()->live_edit_enabled());
8083  DCHECK(args.length() == 2);
8084  CONVERT_ARG_HANDLE_CHECKED(Object, function_object, 0);
8085  CONVERT_ARG_HANDLE_CHECKED(Object, script_object, 1);
8086 
8087  if (function_object->IsJSValue()) {
8088  Handle<JSValue> function_wrapper = Handle<JSValue>::cast(function_object);
8089  if (script_object->IsJSValue()) {
8090  RUNTIME_ASSERT(JSValue::cast(*script_object)->value()->IsScript());
8091  Script* script = Script::cast(JSValue::cast(*script_object)->value());
8092  script_object = Handle<Object>(script, isolate);
8093  }
8094  RUNTIME_ASSERT(function_wrapper->value()->IsSharedFunctionInfo());
8095  LiveEdit::SetFunctionScript(function_wrapper, script_object);
8096  } else {
8097  // Just ignore this. We may not have a SharedFunctionInfo for some functions
8098  // and we check it in this function.
8099  }
8100 
8101  return isolate->heap()->undefined_value();
8102 }

References v8::internal::Handle< T >::cast(), CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, RUNTIME_ASSERT, and v8::internal::LiveEdit::SetFunctionScript().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [223/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditFunctionSourceUpdated  )

Definition at line 8053 of file runtime.cc.

8053  {
8054  HandleScope scope(isolate);
8055  CHECK(isolate->debug()->live_edit_enabled());
8056  DCHECK(args.length() == 1);
8057  CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 0);
8058  RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_info));
8059 
8060  LiveEdit::FunctionSourceUpdated(shared_info);
8061  return isolate->heap()->undefined_value();
8062 }

References CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::LiveEdit::FunctionSourceUpdated(), v8::internal::SharedInfoWrapper::IsInstance(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [224/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditGatherCompileInfo  )

Definition at line 8010 of file runtime.cc.

8010  {
8011  HandleScope scope(isolate);
8012  CHECK(isolate->debug()->live_edit_enabled());
8013  DCHECK(args.length() == 2);
8014  CONVERT_ARG_CHECKED(JSValue, script, 0);
8015  CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
8016 
8017  RUNTIME_ASSERT(script->value()->IsScript());
8018  Handle<Script> script_handle = Handle<Script>(Script::cast(script->value()));
8019 
8020  Handle<JSArray> result;
8022  isolate, result, LiveEdit::GatherCompileInfo(script_handle, source));
8023  return *result;
8024 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CHECK, CONVERT_ARG_CHECKED, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::LiveEdit::GatherCompileInfo(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [225/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditPatchFunctionPositions  )

Definition at line 8130 of file runtime.cc.

8130  {
8131  HandleScope scope(isolate);
8132  CHECK(isolate->debug()->live_edit_enabled());
8133  DCHECK(args.length() == 2);
8134  CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
8135  CONVERT_ARG_HANDLE_CHECKED(JSArray, position_change_array, 1);
8136  RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_array))
8137 
8138  LiveEdit::PatchFunctionPositions(shared_array, position_change_array);
8139  return isolate->heap()->undefined_value();
8140 }

References CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::SharedInfoWrapper::IsInstance(), v8::internal::LiveEdit::PatchFunctionPositions(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [226/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditReplaceFunctionCode  )

Definition at line 8066 of file runtime.cc.

8066  {
8067  HandleScope scope(isolate);
8068  CHECK(isolate->debug()->live_edit_enabled());
8069  DCHECK(args.length() == 2);
8070  CONVERT_ARG_HANDLE_CHECKED(JSArray, new_compile_info, 0);
8071  CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 1);
8072  RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_info));
8073 
8074  LiveEdit::ReplaceFunctionCode(new_compile_info, shared_info);
8075  return isolate->heap()->undefined_value();
8076 }

References CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::SharedInfoWrapper::IsInstance(), v8::internal::LiveEdit::ReplaceFunctionCode(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [227/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditReplaceRefToNestedFunction  )

Definition at line 8107 of file runtime.cc.

8107  {
8108  HandleScope scope(isolate);
8109  CHECK(isolate->debug()->live_edit_enabled());
8110  DCHECK(args.length() == 3);
8111 
8112  CONVERT_ARG_HANDLE_CHECKED(JSValue, parent_wrapper, 0);
8113  CONVERT_ARG_HANDLE_CHECKED(JSValue, orig_wrapper, 1);
8114  CONVERT_ARG_HANDLE_CHECKED(JSValue, subst_wrapper, 2);
8115  RUNTIME_ASSERT(parent_wrapper->value()->IsSharedFunctionInfo());
8116  RUNTIME_ASSERT(orig_wrapper->value()->IsSharedFunctionInfo());
8117  RUNTIME_ASSERT(subst_wrapper->value()->IsSharedFunctionInfo());
8118 
8119  LiveEdit::ReplaceRefToNestedFunction(parent_wrapper, orig_wrapper,
8120  subst_wrapper);
8121  return isolate->heap()->undefined_value();
8122 }

References CHECK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::LiveEdit::ReplaceRefToNestedFunction(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [228/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditReplaceScript  )

Definition at line 8030 of file runtime.cc.

8030  {
8031  HandleScope scope(isolate);
8032  CHECK(isolate->debug()->live_edit_enabled());
8033  DCHECK(args.length() == 3);
8034  CONVERT_ARG_CHECKED(JSValue, original_script_value, 0);
8035  CONVERT_ARG_HANDLE_CHECKED(String, new_source, 1);
8036  CONVERT_ARG_HANDLE_CHECKED(Object, old_script_name, 2);
8037 
8038  RUNTIME_ASSERT(original_script_value->value()->IsScript());
8039  Handle<Script> original_script(Script::cast(original_script_value->value()));
8040 
8041  Handle<Object> old_script = LiveEdit::ChangeScriptSource(
8042  original_script, new_source, old_script_name);
8043 
8044  if (old_script->IsScript()) {
8045  Handle<Script> script_handle = Handle<Script>::cast(old_script);
8046  return *Script::GetWrapper(script_handle);
8047  } else {
8048  return isolate->heap()->null_value();
8049  }
8050 }

References v8::internal::Handle< T >::cast(), v8::internal::LiveEdit::ChangeScriptSource(), CHECK, CONVERT_ARG_CHECKED, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Script::GetWrapper(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [229/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LiveEditRestartFrame  )

Definition at line 8184 of file runtime.cc.

8184  {
8185  HandleScope scope(isolate);
8186  CHECK(isolate->debug()->live_edit_enabled());
8187  DCHECK(args.length() == 2);
8188  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
8189  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
8190 
8191  CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]);
8192  Heap* heap = isolate->heap();
8193 
8194  // Find the relevant frame with the requested index.
8195  StackFrame::Id id = isolate->debug()->break_frame_id();
8196  if (id == StackFrame::NO_ID) {
8197  // If there are no JavaScript stack frames return undefined.
8198  return heap->undefined_value();
8199  }
8200 
8201  JavaScriptFrameIterator it(isolate, id);
8202  int inlined_jsframe_index = FindIndexedNonNativeFrame(&it, index);
8203  if (inlined_jsframe_index == -1) return heap->undefined_value();
8204  // We don't really care what the inlined frame index is, since we are
8205  // throwing away the entire frame anyways.
8206  const char* error_message = LiveEdit::RestartFrame(it.frame());
8207  if (error_message) {
8208  return *(isolate->factory()->InternalizeUtf8String(error_message));
8209  }
8210  return heap->true_value();
8211 }

References CHECK, CheckExecutionState(), CONVERT_NUMBER_CHECKED, DCHECK, FindIndexedNonNativeFrame(), v8::internal::LiveEdit::RestartFrame(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [230/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LoadFromSuper  )

Definition at line 876 of file runtime.cc.

876  {
877  HandleScope scope(isolate);
878  DCHECK(args.length() == 3);
879  CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
880  CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
882 
883  if (home_object->IsAccessCheckNeeded() &&
884  !isolate->MayNamedAccess(home_object, name, v8::ACCESS_GET)) {
885  isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET);
887  }
888 
889  PrototypeIterator iter(isolate, home_object);
890  Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
891  if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value();
892 
893  LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
894  Handle<Object> result;
895  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it));
896  return *result;
897 }

References v8::ACCESS_GET, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::Object::GetProperty(), name, and RETURN_FAILURE_IF_SCHEDULED_EXCEPTION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [231/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LoadMutableDouble  )

Definition at line 8437 of file runtime.cc.

8437  {
8438  HandleScope scope(isolate);
8439  DCHECK(args.length() == 2);
8440  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
8441  CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1);
8442  RUNTIME_ASSERT((index->value() & 1) == 1);
8443  FieldIndex field_index =
8444  FieldIndex::ForLoadByFieldIndex(object->map(), index->value());
8445  if (field_index.is_inobject()) {
8446  RUNTIME_ASSERT(field_index.property_index() <
8447  object->map()->inobject_properties());
8448  } else {
8449  RUNTIME_ASSERT(field_index.outobject_array_index() <
8450  object->properties()->length());
8451  }
8452  Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate);
8453  RUNTIME_ASSERT(raw_value->IsMutableHeapNumber());
8454  return *Object::WrapForRead(isolate, raw_value, Representation::Double());
8455 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Representation::Double(), RUNTIME_ASSERT, and v8::internal::Object::WrapForRead().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [232/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_LookupAccessor  )

Definition at line 5411 of file runtime.cc.

5411  {
5412  HandleScope scope(isolate);
5413  DCHECK(args.length() == 3);
5414  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
5415  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
5418  if (!receiver->IsJSObject()) return isolate->heap()->undefined_value();
5419  Handle<Object> result;
5421  isolate, result,
5422  JSObject::GetAccessor(Handle<JSObject>::cast(receiver), name, component));
5423  return *result;
5424 }

References ACCESSOR_GETTER, ACCESSOR_SETTER, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, flag, v8::internal::JSObject::GetAccessor(), and name.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [233/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapClear  )

Definition at line 151 of file runtime-collections.cc.

151  {
152  HandleScope scope(isolate);
153  DCHECK(args.length() == 1);
154  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
155  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
156  table = OrderedHashMap::Clear(table);
157  holder->set_table(*table);
158  return isolate->heap()->undefined_value();
159 }

References v8::internal::OrderedHashTable< OrderedHashMap, JSMapIterator, 2 >::Clear(), CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [234/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapDelete  )

Definition at line 137 of file runtime-collections.cc.

137  {
138  HandleScope scope(isolate);
139  DCHECK(args.length() == 2);
140  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
142  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
143  bool was_present = false;
144  Handle<OrderedHashMap> new_table =
145  OrderedHashMap::Remove(table, key, &was_present);
146  holder->set_table(*new_table);
147  return isolate->heap()->ToBoolean(was_present);
148 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::OrderedHashTable< OrderedHashMap, JSMapIterator, 2 >::Remove().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [235/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapGet  )

Definition at line 115 of file runtime-collections.cc.

115  {
116  HandleScope scope(isolate);
117  DCHECK(args.length() == 2);
118  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
120  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
121  Handle<Object> lookup(table->Lookup(key), isolate);
122  return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup;
123 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [236/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapGetSize  )

Definition at line 175 of file runtime-collections.cc.

175  {
176  HandleScope scope(isolate);
177  DCHECK(args.length() == 1);
178  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
179  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
180  return Smi::FromInt(table->NumberOfElements());
181 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [237/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapHas  )

Definition at line 126 of file runtime-collections.cc.

126  {
127  HandleScope scope(isolate);
128  DCHECK(args.length() == 2);
129  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
131  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
132  Handle<Object> lookup(table->Lookup(key), isolate);
133  return isolate->heap()->ToBoolean(!lookup->IsTheHole());
134 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [238/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapInitialize  )

Definition at line 105 of file runtime-collections.cc.

105  {
106  HandleScope scope(isolate);
107  DCHECK(args.length() == 1);
108  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
109  Handle<OrderedHashMap> table = isolate->factory()->NewOrderedHashMap();
110  holder->set_table(*table);
111  return *holder;
112 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [239/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapIteratorInitialize  )

Definition at line 184 of file runtime-collections.cc.

184  {
185  HandleScope scope(isolate);
186  DCHECK(args.length() == 3);
187  CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0);
188  CONVERT_ARG_HANDLE_CHECKED(JSMap, map, 1);
189  CONVERT_SMI_ARG_CHECKED(kind, 2)
190  RUNTIME_ASSERT(kind == JSMapIterator::kKindKeys ||
191  kind == JSMapIterator::kKindValues ||
192  kind == JSMapIterator::kKindEntries);
193  Handle<OrderedHashMap> table(OrderedHashMap::cast(map->table()));
194  holder->set_table(*table);
195  holder->set_index(Smi::FromInt(0));
196  holder->set_kind(Smi::FromInt(kind));
197  return isolate->heap()->undefined_value();
198 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::OrderedHashTableIterator< JSMapIterator, OrderedHashMap >::kKindEntries, v8::internal::OrderedHashTableIterator< JSMapIterator, OrderedHashMap >::kKindKeys, v8::internal::OrderedHashTableIterator< JSMapIterator, OrderedHashMap >::kKindValues, map, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [240/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapIteratorNext  )

Definition at line 225 of file runtime-collections.cc.

225  {
226  SealHandleScope shs(isolate);
227  DCHECK(args.length() == 2);
228  CONVERT_ARG_CHECKED(JSMapIterator, holder, 0);
229  CONVERT_ARG_CHECKED(JSArray, value_array, 1);
230  return holder->Next(value_array);
231 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [241/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MapSet  )

Definition at line 162 of file runtime-collections.cc.

162  {
163  HandleScope scope(isolate);
164  DCHECK(args.length() == 3);
165  CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0);
168  Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
169  Handle<OrderedHashMap> new_table = OrderedHashMap::Put(table, key, value);
170  holder->set_table(*new_table);
171  return *holder;
172 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::OrderedHashMap::Put().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [242/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MaterializeRegExpLiteral  )

Definition at line 886 of file runtime-regexp.cc.

886  {
887  HandleScope scope(isolate);
888  DCHECK(args.length() == 4);
889  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
890  CONVERT_SMI_ARG_CHECKED(index, 1);
891  CONVERT_ARG_HANDLE_CHECKED(String, pattern, 2);
892  CONVERT_ARG_HANDLE_CHECKED(String, flags, 3);
893 
894  // Get the RegExp function from the context in the literals array.
895  // This is the RegExp function from the context in which the
896  // function was created. We do not use the RegExp function from the
897  // current native context because this might be the RegExp function
898  // from another context which we should not have access to.
899  Handle<JSFunction> constructor = Handle<JSFunction>(
900  JSFunction::NativeContextFromLiterals(*literals)->regexp_function());
901  // Compute the regular expression literal.
902  Handle<Object> regexp;
904  isolate, regexp,
905  RegExpImpl::CreateRegExpLiteral(constructor, pattern, flags));
906  literals->set(index, *regexp);
907  return *regexp;
908 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, v8::internal::RegExpImpl::CreateRegExpLiteral(), DCHECK, v8::internal::anonymous_namespace{flags.cc}::flags, literals(), and v8::internal::JSFunction::NativeContextFromLiterals().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [243/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathAtan2  )

Definition at line 83 of file runtime-maths.cc.

83  {
84  HandleScope scope(isolate);
85  DCHECK(args.length() == 2);
86  isolate->counters()->math_atan2()->Increment();
87 
90  double result;
91  if (std::isinf(x) && std::isinf(y)) {
92  // Make sure that the result in case of two infinite arguments
93  // is a multiple of Pi / 4. The sign of the result is determined
94  // by the first argument (x) and the sign of the second argument
95  // determines the multiplier: one or three.
96  int multiplier = (x < 0) ? -1 : 1;
97  if (y < 0) multiplier *= 3;
98  result = multiplier * kPiDividedBy4;
99  } else {
100  result = std::atan2(x, y);
101  }
102  return *isolate->factory()->NewNumber(result);
103 }
static const double kPiDividedBy4

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, kPiDividedBy4, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [244/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathExpRT  )

Definition at line 106 of file runtime-maths.cc.

106  {
107  HandleScope scope(isolate);
108  DCHECK(args.length() == 1);
109  isolate->counters()->math_exp()->Increment();
110 
113  return *isolate->factory()->NewNumber(fast_exp(x));
114 }
double fast_exp(double input)
void lazily_initialize_fast_exp()
Definition: codegen.cc:71

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, fast_exp(), and lazily_initialize_fast_exp().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [245/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathFloorRT  )

Definition at line 117 of file runtime-maths.cc.

117  {
118  HandleScope scope(isolate);
119  DCHECK(args.length() == 1);
120  isolate->counters()->math_floor()->Increment();
121 
123  return *isolate->factory()->NewNumber(Floor(x));
124 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and Floor().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [246/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathFround  )

Definition at line 222 of file runtime-maths.cc.

222  {
223  HandleScope scope(isolate);
224  DCHECK(args.length() == 1);
225 
227  float xf = DoubleToFloat32(x);
228  return *isolate->factory()->NewNumber(xf);
229 }
float DoubleToFloat32(double x)

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and DoubleToFloat32().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [247/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathPowRT  )

Definition at line 152 of file runtime-maths.cc.

152  {
153  HandleScope scope(isolate);
154  DCHECK(args.length() == 2);
155  isolate->counters()->math_pow()->Increment();
156 
159  if (y == 0) {
160  return Smi::FromInt(1);
161  } else {
162  double result = power_double_double(x, y);
163  if (std::isnan(result)) return isolate->heap()->nan_value();
164  return *isolate->factory()->NewNumber(result);
165  }
166 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), power_double_double(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [248/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathPowSlow  )

Definition at line 129 of file runtime-maths.cc.

129  {
130  HandleScope scope(isolate);
131  DCHECK(args.length() == 2);
132  isolate->counters()->math_pow()->Increment();
133 
135 
136  // If the second argument is a smi, it is much faster to call the
137  // custom powi() function than the generic pow().
138  if (args[1]->IsSmi()) {
139  int y = args.smi_at(1);
140  return *isolate->factory()->NewNumber(power_double_int(x, y));
141  }
142 
144  double result = power_helper(x, y);
145  if (std::isnan(result)) return isolate->heap()->nan_value();
146  return *isolate->factory()->NewNumber(result);
147 }
double power_helper(double x, double y)
Definition: assembler.cc:1408

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, power_double_int(), power_helper(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [249/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MathSqrtRT  )

Definition at line 212 of file runtime-maths.cc.

212  {
213  HandleScope scope(isolate);
214  DCHECK(args.length() == 1);
215  isolate->counters()->math_sqrt()->Increment();
216 
218  return *isolate->factory()->NewNumber(fast_sqrt(x));
219 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and fast_sqrt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [250/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MaxSmi  )

Definition at line 8920 of file runtime.cc.

8920  {
8921  SealHandleScope shs(isolate);
8922  DCHECK(args.length() == 0);
8923  return Smi::FromInt(Smi::kMaxValue);
8924 }

References DCHECK, v8::internal::Smi::FromInt(), and v8::internal::Smi::kMaxValue.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [251/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MessageGetScript  )

Definition at line 8578 of file runtime.cc.

8578  {
8579  SealHandleScope shs(isolate);
8580  DCHECK(args.length() == 1);
8581  CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
8582  return message->script();
8583 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [252/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MessageGetStartPosition  )

Definition at line 8570 of file runtime.cc.

8570  {
8571  SealHandleScope shs(isolate);
8572  DCHECK(args.length() == 1);
8573  CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
8574  return Smi::FromInt(message->start_position());
8575 }

References CONVERT_ARG_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [253/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_MoveArrayContents  )

Definition at line 5304 of file runtime.cc.

5304  {
5305  HandleScope scope(isolate);
5306  DCHECK(args.length() == 2);
5307  CONVERT_ARG_HANDLE_CHECKED(JSArray, from, 0);
5308  CONVERT_ARG_HANDLE_CHECKED(JSArray, to, 1);
5309  JSObject::ValidateElements(from);
5310  JSObject::ValidateElements(to);
5311 
5312  Handle<FixedArrayBase> new_elements(from->elements());
5313  ElementsKind from_kind = from->GetElementsKind();
5314  Handle<Map> new_map = JSObject::GetElementsTransitionMap(to, from_kind);
5315  JSObject::SetMapAndElements(to, new_map, new_elements);
5316  to->set_length(from->length());
5317 
5318  JSObject::ResetElements(from);
5319  from->set_length(Smi::FromInt(0));
5320 
5321  JSObject::ValidateElements(to);
5322  return *to;
5323 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::JSObject::GetElementsTransitionMap(), v8::internal::JSObject::ResetElements(), v8::internal::JSObject::SetMapAndElements(), to(), and v8::internal::JSObject::ValidateElements().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [254/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NeverOptimizeFunction  )

Definition at line 86 of file runtime-test.cc.

86  {
87  HandleScope scope(isolate);
88  DCHECK(args.length() == 1);
89  CONVERT_ARG_CHECKED(JSFunction, function, 0);
90  function->shared()->set_optimization_disabled(true);
91  return isolate->heap()->undefined_value();
92 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [255/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewArguments  )

Definition at line 3438 of file runtime.cc.

3438  {
3439  HandleScope scope(isolate);
3440  DCHECK(args.length() == 1);
3441  CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
3442  JavaScriptFrameIterator it(isolate);
3443 
3444  // Find the frame that holds the actual arguments passed to the function.
3445  it.AdvanceToArgumentsFrame();
3446  JavaScriptFrame* frame = it.frame();
3447 
3448  // Determine parameter location on the stack and dispatch on language mode.
3449  int argument_count = frame->GetArgumentsLength();
3450  Object** parameters = reinterpret_cast<Object**>(frame->GetParameterSlot(-1));
3451  return callee->shared()->strict_mode() == STRICT
3452  ? *NewStrictArguments(isolate, callee, parameters, argument_count)
3453  : *NewSloppyArguments(isolate, callee, parameters, argument_count);
3454 }
static Handle< JSObject > NewStrictArguments(Isolate *isolate, Handle< JSFunction > callee, Object **parameters, int argument_count)
Definition: runtime.cc:3417
static Handle< JSObject > NewSloppyArguments(Isolate *isolate, Handle< JSFunction > callee, Object **parameters, int argument_count)
Definition: runtime.cc:3326

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JavaScriptFrame::GetArgumentsLength(), v8::internal::JavaScriptFrame::GetParameterSlot(), NewSloppyArguments(), NewStrictArguments(), and STRICT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [256/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewClosure  )

Definition at line 3488 of file runtime.cc.

3488  {
3489  HandleScope scope(isolate);
3490  DCHECK(args.length() == 3);
3491  CONVERT_ARG_HANDLE_CHECKED(Context, context, 0);
3492  CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1);
3493  CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2);
3494 
3495  // The caller ensures that we pretenure closures that are assigned
3496  // directly to properties.
3497  PretenureFlag pretenure_flag = pretenure ? TENURED : NOT_TENURED;
3498  return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
3499  pretenure_flag);
3500 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, NOT_TENURED, and TENURED.

◆ RUNTIME_FUNCTION() [257/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewClosureFromStubFailure  )

Definition at line 3477 of file runtime.cc.

3477  {
3478  HandleScope scope(isolate);
3479  DCHECK(args.length() == 1);
3480  CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
3481  Handle<Context> context(isolate->context());
3482  PretenureFlag pretenure_flag = NOT_TENURED;
3483  return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
3484  pretenure_flag);
3485 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and NOT_TENURED.

◆ RUNTIME_FUNCTION() [258/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewFunctionContext  )

Definition at line 3891 of file runtime.cc.

3891  {
3892  HandleScope scope(isolate);
3893  DCHECK(args.length() == 1);
3894 
3895  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
3896 
3897  DCHECK(function->context() == isolate->context());
3898  int length = function->shared()->scope_info()->ContextLength();
3899  return *isolate->factory()->NewFunctionContext(length, function);
3900 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [259/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewGlobalContext  )

Definition at line 3875 of file runtime.cc.

3875  {
3876  HandleScope scope(isolate);
3877  DCHECK(args.length() == 2);
3878 
3879  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
3880  CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 1);
3881  Handle<Context> result =
3882  isolate->factory()->NewGlobalContext(function, scope_info);
3883 
3884  DCHECK(function->context() == isolate->context());
3885  DCHECK(function->context()->global_object() == result->global_object());
3886  result->global_object()->set_global_context(*result);
3887  return *result;
3888 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [260/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewObject  )

Definition at line 3737 of file runtime.cc.

3737  {
3738  HandleScope scope(isolate);
3739  DCHECK(args.length() == 1);
3740  CONVERT_ARG_HANDLE_CHECKED(Object, constructor, 0);
3741  return Runtime_NewObjectHelper(isolate, constructor,
3742  Handle<AllocationSite>::null());
3743 }
static Object * Runtime_NewObjectHelper(Isolate *isolate, Handle< Object > constructor, Handle< AllocationSite > site)
Definition: runtime.cc:3676

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and Runtime_NewObjectHelper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [261/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewObjectFromBound  )

Definition at line 3635 of file runtime.cc.

3635  {
3636  HandleScope scope(isolate);
3637  DCHECK(args.length() == 1);
3638  // First argument is a function to use as a constructor.
3639  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
3640  RUNTIME_ASSERT(function->shared()->bound());
3641 
3642  // The argument is a bound function. Extract its bound arguments
3643  // and callable.
3644  Handle<FixedArray> bound_args =
3645  Handle<FixedArray>(FixedArray::cast(function->function_bindings()));
3646  int bound_argc = bound_args->length() - JSFunction::kBoundArgumentsStartIndex;
3647  Handle<Object> bound_function(
3648  JSReceiver::cast(bound_args->get(JSFunction::kBoundFunctionIndex)),
3649  isolate);
3650  DCHECK(!bound_function->IsJSFunction() ||
3651  !Handle<JSFunction>::cast(bound_function)->shared()->bound());
3652 
3653  int total_argc = 0;
3654  SmartArrayPointer<Handle<Object> > param_data =
3655  GetCallerArguments(isolate, bound_argc, &total_argc);
3656  for (int i = 0; i < bound_argc; i++) {
3657  param_data[i] = Handle<Object>(
3658  bound_args->get(JSFunction::kBoundArgumentsStartIndex + i), isolate);
3659  }
3660 
3661  if (!bound_function->IsJSFunction()) {
3663  isolate, bound_function,
3664  Execution::TryGetConstructorDelegate(isolate, bound_function));
3665  }
3666  DCHECK(bound_function->IsJSFunction());
3667 
3668  Handle<Object> result;
3670  isolate, result, Execution::New(Handle<JSFunction>::cast(bound_function),
3671  total_argc, param_data.get()));
3672  return *result;
3673 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::SmartPointerBase< Deallocator, T >::get(), GetCallerArguments(), v8::internal::JSFunction::kBoundArgumentsStartIndex, v8::internal::JSFunction::kBoundFunctionIndex, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [262/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewObjectWithAllocationSite  )

Definition at line 3746 of file runtime.cc.

3746  {
3747  HandleScope scope(isolate);
3748  DCHECK(args.length() == 2);
3749  CONVERT_ARG_HANDLE_CHECKED(Object, constructor, 1);
3750  CONVERT_ARG_HANDLE_CHECKED(Object, feedback, 0);
3751  Handle<AllocationSite> site;
3752  if (feedback->IsAllocationSite()) {
3753  // The feedback can be an AllocationSite or undefined.
3754  site = Handle<AllocationSite>::cast(feedback);
3755  }
3756  return Runtime_NewObjectHelper(isolate, constructor, site);
3757 }

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, and Runtime_NewObjectHelper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [263/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewSloppyArguments  )

Definition at line 3457 of file runtime.cc.

3457  {
3458  HandleScope scope(isolate);
3459  DCHECK(args.length() == 3);
3460  CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
3461  Object** parameters = reinterpret_cast<Object**>(args[1]);
3462  CONVERT_SMI_ARG_CHECKED(argument_count, 2);
3463  return *NewSloppyArguments(isolate, callee, parameters, argument_count);
3464 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and NewSloppyArguments().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [264/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewStrictArguments  )

Definition at line 3467 of file runtime.cc.

3467  {
3468  HandleScope scope(isolate);
3469  DCHECK(args.length() == 3);
3470  CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0)
3471  Object** parameters = reinterpret_cast<Object**>(args[1]);
3472  CONVERT_SMI_ARG_CHECKED(argument_count, 2);
3473  return *NewStrictArguments(isolate, callee, parameters, argument_count);
3474 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, and NewStrictArguments().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [265/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewString  )

Definition at line 1149 of file runtime-strings.cc.

1149  {
1150  HandleScope scope(isolate);
1151  DCHECK(args.length() == 2);
1152  CONVERT_INT32_ARG_CHECKED(length, 0);
1153  CONVERT_BOOLEAN_ARG_CHECKED(is_one_byte, 1);
1154  if (length == 0) return isolate->heap()->empty_string();
1155  Handle<String> result;
1156  if (is_one_byte) {
1158  isolate, result, isolate->factory()->NewRawOneByteString(length));
1159  } else {
1161  isolate, result, isolate->factory()->NewRawTwoByteString(length));
1162  }
1163  return *result;
1164 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_INT32_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [266/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewStringWrapper  )

Definition at line 3261 of file runtime.cc.

3261  {
3262  HandleScope scope(isolate);
3263  DCHECK(args.length() == 1);
3264  CONVERT_ARG_HANDLE_CHECKED(String, value, 0);
3265  return *Object::ToObject(isolate, value).ToHandleChecked();
3266 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Object::ToObject().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [267/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NewSymbolWrapper  )

Definition at line 539 of file runtime.cc.

539  {
540  HandleScope scope(isolate);
541  DCHECK(args.length() == 1);
543  return *Object::ToObject(isolate, symbol).ToHandleChecked();
544 }
IN DWORD64 OUT PDWORD64 OUT PIMAGEHLP_SYMBOL64 Symbol

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Object::ToObject().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [268/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NormalizeElements  )

Definition at line 8909 of file runtime.cc.

8909  {
8910  HandleScope scope(isolate);
8911  DCHECK(args.length() == 1);
8912  CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
8913  RUNTIME_ASSERT(!array->HasExternalArrayElements() &&
8914  !array->HasFixedTypedArrayElements());
8915  JSObject::NormalizeElements(array);
8916  return *array;
8917 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSObject::NormalizeElements(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [269/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NotifyContextDisposed  )

Definition at line 163 of file runtime-test.cc.

163  {
164  HandleScope scope(isolate);
165  DCHECK(args.length() == 0);
166  isolate->heap()->NotifyContextDisposed();
167  return isolate->heap()->undefined_value();
168 }

References DCHECK.

◆ RUNTIME_FUNCTION() [270/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NotifyDeoptimized  )

Definition at line 119 of file runtime-compiler.cc.

119  {
120  HandleScope scope(isolate);
121  DCHECK(args.length() == 1);
122  CONVERT_SMI_ARG_CHECKED(type_arg, 0);
123  Deoptimizer::BailoutType type =
124  static_cast<Deoptimizer::BailoutType>(type_arg);
125  Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
126  DCHECK(AllowHeapAllocation::IsAllowed());
127 
128  Handle<JSFunction> function = deoptimizer->function();
129  Handle<Code> optimized_code = deoptimizer->compiled_code();
130 
131  DCHECK(optimized_code->kind() == Code::OPTIMIZED_FUNCTION);
132  DCHECK(type == deoptimizer->bailout_type());
133 
134  // Make sure to materialize objects before causing any allocation.
135  JavaScriptFrameIterator it(isolate);
136  deoptimizer->MaterializeHeapObjects(&it);
137  delete deoptimizer;
138 
139  JavaScriptFrame* frame = it.frame();
140  RUNTIME_ASSERT(frame->function()->IsJSFunction());
141  DCHECK(frame->function() == *function);
142 
143  // Avoid doing too much work when running with --always-opt and keep
144  // the optimized code around.
145  if (FLAG_always_opt || type == Deoptimizer::LAZY) {
146  return isolate->heap()->undefined_value();
147  }
148 
149  // Search for other activations of the same function and code.
150  ActivationsFinder activations_finder(*optimized_code);
151  activations_finder.VisitFrames(&it);
152  isolate->thread_manager()->IterateArchivedThreads(&activations_finder);
153 
154  if (!activations_finder.has_code_activations_) {
155  if (function->code() == *optimized_code) {
156  if (FLAG_trace_deopt) {
157  PrintF("[removing optimized code for: ");
158  function->PrintName();
159  PrintF("]\n");
160  }
161  function->ReplaceCode(function->shared()->code());
162  // Evict optimized code for this function from the cache so that it
163  // doesn't get used for new closures.
164  function->shared()->EvictFromOptimizedCodeMap(*optimized_code,
165  "notify deoptimized");
166  }
167  } else {
168  // TODO(titzer): we should probably do DeoptimizeCodeList(code)
169  // unconditionally if the code is not already marked for deoptimization.
170  // If there is an index by shared function info, all the better.
171  Deoptimizer::DeoptimizeFunction(*function);
172  }
173 
174  return isolate->heap()->undefined_value();
175 }

References v8::internal::Deoptimizer::bailout_type(), v8::internal::Deoptimizer::compiled_code(), CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Deoptimizer::DeoptimizeFunction(), v8::internal::Deoptimizer::function(), v8::internal::JavaScriptFrame::function(), v8::internal::Deoptimizer::Grab(), v8::internal::ActivationsFinder::has_code_activations_, v8::internal::Deoptimizer::LAZY, v8::internal::Deoptimizer::MaterializeHeapObjects(), PrintF(), RUNTIME_ASSERT, and v8::internal::ActivationsFinder::VisitFrames().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [271/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NotifyStubFailure  )

Definition at line 87 of file runtime-compiler.cc.

87  {
88  HandleScope scope(isolate);
89  DCHECK(args.length() == 0);
90  Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
91  DCHECK(AllowHeapAllocation::IsAllowed());
92  delete deoptimizer;
93  return isolate->heap()->undefined_value();
94 }

References DCHECK, and v8::internal::Deoptimizer::Grab().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [272/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberAdd  )

Definition at line 318 of file runtime-numbers.cc.

318  {
319  HandleScope scope(isolate);
320  DCHECK(args.length() == 2);
321 
324  return *isolate->factory()->NewNumber(x + y);
325 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [273/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberAnd  )

Definition at line 400 of file runtime-numbers.cc.

400  {
401  HandleScope scope(isolate);
402  DCHECK(args.length() == 2);
403 
404  CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
405  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
406  return *isolate->factory()->NewNumberFromInt(x & y);
407 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [274/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberCompare  )

Definition at line 470 of file runtime-numbers.cc.

470  {
471  SealHandleScope shs(isolate);
472  DCHECK(args.length() == 3);
473 
476  CONVERT_ARG_HANDLE_CHECKED(Object, uncomparable_result, 2)
477  if (std::isnan(x) || std::isnan(y)) return *uncomparable_result;
478  if (x == y) return Smi::FromInt(EQUAL);
479  if (isless(x, y)) return Smi::FromInt(LESS);
480  return Smi::FromInt(GREATER);
481 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_DOUBLE_ARG_CHECKED, DCHECK, EQUAL, v8::internal::Smi::FromInt(), GREATER, LESS, and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [275/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberDiv  )

Definition at line 357 of file runtime-numbers.cc.

357  {
358  HandleScope scope(isolate);
359  DCHECK(args.length() == 2);
360 
363  return *isolate->factory()->NewNumber(x / y);
364 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [276/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberEquals  )

Definition at line 451 of file runtime-numbers.cc.

451  {
452  SealHandleScope shs(isolate);
453  DCHECK(args.length() == 2);
454 
457  if (std::isnan(x)) return Smi::FromInt(NOT_EQUAL);
458  if (std::isnan(y)) return Smi::FromInt(NOT_EQUAL);
459  if (x == y) return Smi::FromInt(EQUAL);
460  Object* result;
461  if ((fpclassify(x) == FP_ZERO) && (fpclassify(y) == FP_ZERO)) {
462  result = Smi::FromInt(EQUAL);
463  } else {
464  result = Smi::FromInt(NOT_EQUAL);
465  }
466  return result;
467 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, EQUAL, FP_ZERO, v8::internal::Smi::FromInt(), NOT_EQUAL, and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [277/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberImul  )

Definition at line 377 of file runtime-numbers.cc.

377  {
378  HandleScope scope(isolate);
379  DCHECK(args.length() == 2);
380 
381  // We rely on implementation-defined behavior below, but at least not on
382  // undefined behavior.
383  CONVERT_NUMBER_CHECKED(uint32_t, x, Int32, args[0]);
384  CONVERT_NUMBER_CHECKED(uint32_t, y, Int32, args[1]);
385  int32_t product = static_cast<int32_t>(x * y);
386  return *isolate->factory()->NewNumberFromInt(product);
387 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [278/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberMod  )

Definition at line 367 of file runtime-numbers.cc.

367  {
368  HandleScope scope(isolate);
369  DCHECK(args.length() == 2);
370 
373  return *isolate->factory()->NewNumber(modulo(x, y));
374 }
double modulo(double x, double y)
Definition: codegen.cc:50

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, modulo(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [279/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberMul  )

Definition at line 338 of file runtime-numbers.cc.

338  {
339  HandleScope scope(isolate);
340  DCHECK(args.length() == 2);
341 
344  return *isolate->factory()->NewNumber(x * y);
345 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [280/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberOr  )

Definition at line 390 of file runtime-numbers.cc.

390  {
391  HandleScope scope(isolate);
392  DCHECK(args.length() == 2);
393 
394  CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
395  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
396  return *isolate->factory()->NewNumberFromInt(x | y);
397 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [281/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberSar  )

Definition at line 440 of file runtime-numbers.cc.

440  {
441  HandleScope scope(isolate);
442  DCHECK(args.length() == 2);
443 
444  CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
445  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
446  return *isolate->factory()->NewNumberFromInt(
447  ArithmeticShiftRight(x, y & 0x1f));
448 }
int ArithmeticShiftRight(int x, int s)
Definition: utils.h:90

References ArithmeticShiftRight(), CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [282/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberShl  )

Definition at line 420 of file runtime-numbers.cc.

420  {
421  HandleScope scope(isolate);
422  DCHECK(args.length() == 2);
423 
424  CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
425  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
426  return *isolate->factory()->NewNumberFromInt(x << (y & 0x1f));
427 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [283/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberShr  )

Definition at line 430 of file runtime-numbers.cc.

430  {
431  HandleScope scope(isolate);
432  DCHECK(args.length() == 2);
433 
434  CONVERT_NUMBER_CHECKED(uint32_t, x, Uint32, args[0]);
435  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
436  return *isolate->factory()->NewNumberFromUint(x >> (y & 0x1f));
437 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [284/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberSub  )

Definition at line 328 of file runtime-numbers.cc.

328  {
329  HandleScope scope(isolate);
330  DCHECK(args.length() == 2);
331 
334  return *isolate->factory()->NewNumber(x - y);
335 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [285/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToExponential  )

Definition at line 75 of file runtime-numbers.cc.

75  {
76  HandleScope scope(isolate);
77  DCHECK(args.length() == 2);
78 
80  CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
81  int f = FastD2IChecked(f_number);
82  RUNTIME_ASSERT(f >= -1 && f <= 20);
83  RUNTIME_ASSERT(!Double(value).IsSpecial());
84  char* str = DoubleToExponentialCString(value, f);
85  Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
86  DeleteArray(str);
87  return *result;
88 }
char * DoubleToExponentialCString(double value, int f)
Definition: conversions.cc:299
int FastD2IChecked(double x)
Definition: conversions.h:46

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, DeleteArray(), DoubleToExponentialCString(), FastD2IChecked(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [286/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToFixed  )

Definition at line 58 of file runtime-numbers.cc.

58  {
59  HandleScope scope(isolate);
60  DCHECK(args.length() == 2);
61 
63  CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
64  int f = FastD2IChecked(f_number);
65  // See DoubleToFixedCString for these constants:
66  RUNTIME_ASSERT(f >= 0 && f <= 20);
67  RUNTIME_ASSERT(!Double(value).IsSpecial());
68  char* str = DoubleToFixedCString(value, f);
69  Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
70  DeleteArray(str);
71  return *result;
72 }
char * DoubleToFixedCString(double value, int f)
Definition: conversions.cc:196

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, DeleteArray(), DoubleToFixedCString(), FastD2IChecked(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [287/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToInteger  )

Definition at line 258 of file runtime-numbers.cc.

258  {
259  HandleScope scope(isolate);
260  DCHECK(args.length() == 1);
261 
262  CONVERT_DOUBLE_ARG_CHECKED(number, 0);
263  return *isolate->factory()->NewNumber(DoubleToInteger(number));
264 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and DoubleToInteger().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [288/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToIntegerMapMinusZero  )

Definition at line 267 of file runtime-numbers.cc.

267  {
268  HandleScope scope(isolate);
269  DCHECK(args.length() == 1);
270 
271  CONVERT_DOUBLE_ARG_CHECKED(number, 0);
272  double double_value = DoubleToInteger(number);
273  // Map both -0 and +0 to +0.
274  if (double_value == 0) double_value = 0;
275 
276  return *isolate->factory()->NewNumber(double_value);
277 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and DoubleToInteger().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [289/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToJSInt32  )

Definition at line 289 of file runtime-numbers.cc.

289  {
290  HandleScope scope(isolate);
291  DCHECK(args.length() == 1);
292 
293  CONVERT_DOUBLE_ARG_CHECKED(number, 0);
294  return *isolate->factory()->NewNumberFromInt(DoubleToInt32(number));
295 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, and DoubleToInt32().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [290/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToJSUint32  )

Definition at line 280 of file runtime-numbers.cc.

280  {
281  HandleScope scope(isolate);
282  DCHECK(args.length() == 1);
283 
284  CONVERT_NUMBER_CHECKED(int32_t, number, Uint32, args[0]);
285  return *isolate->factory()->NewNumberFromUint(number);
286 }

References CONVERT_NUMBER_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [291/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToPrecision  )

Definition at line 91 of file runtime-numbers.cc.

91  {
92  HandleScope scope(isolate);
93  DCHECK(args.length() == 2);
94 
96  CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
97  int f = FastD2IChecked(f_number);
98  RUNTIME_ASSERT(f >= 1 && f <= 21);
99  RUNTIME_ASSERT(!Double(value).IsSpecial());
100  char* str = DoubleToPrecisionCString(value, f);
101  Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
102  DeleteArray(str);
103  return *result;
104 }
char * DoubleToPrecisionCString(double value, int p)
Definition: conversions.cc:344

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, DeleteArray(), DoubleToPrecisionCString(), FastD2IChecked(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [292/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToRadixString  )

Definition at line 23 of file runtime-numbers.cc.

23  {
24  HandleScope scope(isolate);
25  DCHECK(args.length() == 2);
26  CONVERT_SMI_ARG_CHECKED(radix, 1);
27  RUNTIME_ASSERT(2 <= radix && radix <= 36);
28 
29  // Fast case where the result is a one character string.
30  if (args[0]->IsSmi()) {
31  int value = args.smi_at(0);
32  if (value >= 0 && value < radix) {
33  // Character array used for conversion.
34  static const char kCharTable[] = "0123456789abcdefghijklmnopqrstuvwxyz";
35  return *isolate->factory()->LookupSingleCharacterStringFromCode(
36  kCharTable[value]);
37  }
38  }
39 
40  // Slow case.
42  if (std::isnan(value)) {
43  return isolate->heap()->nan_string();
44  }
45  if (std::isinf(value)) {
46  if (value < 0) {
47  return isolate->heap()->minus_infinity_string();
48  }
49  return isolate->heap()->infinity_string();
50  }
51  char* str = DoubleToRadixCString(value, radix);
52  Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
53  DeleteArray(str);
54  return *result;
55 }
char * DoubleToRadixCString(double value, int radix)
Definition: conversions.cc:414

References CONVERT_DOUBLE_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DeleteArray(), DoubleToRadixCString(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [293/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToSmi  )

Definition at line 300 of file runtime-numbers.cc.

300  {
301  SealHandleScope shs(isolate);
302  DCHECK(args.length() == 1);
303  CONVERT_ARG_CHECKED(Object, obj, 0);
304  if (obj->IsSmi()) {
305  return obj;
306  }
307  if (obj->IsHeapNumber()) {
308  double value = HeapNumber::cast(obj)->value();
309  int int_value = FastD2I(value);
310  if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
311  return Smi::FromInt(int_value);
312  }
313  }
314  return isolate->heap()->nan_value();
315 }

References CONVERT_ARG_CHECKED, DCHECK, FastD2I(), FastI2D(), v8::internal::Smi::FromInt(), and v8::internal::Smi::IsValid().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [294/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToStringRT  )

Definition at line 240 of file runtime-numbers.cc.

240  {
241  HandleScope scope(isolate);
242  DCHECK(args.length() == 1);
244 
245  return *isolate->factory()->NumberToString(number);
246 }

References CONVERT_NUMBER_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [295/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberToStringSkipCache  )

Definition at line 249 of file runtime-numbers.cc.

249  {
250  HandleScope scope(isolate);
251  DCHECK(args.length() == 1);
253 
254  return *isolate->factory()->NumberToString(number, false);
255 }

References CONVERT_NUMBER_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [296/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberUnaryMinus  )

Definition at line 348 of file runtime-numbers.cc.

348  {
349  HandleScope scope(isolate);
350  DCHECK(args.length() == 1);
351 
353  return *isolate->factory()->NewNumber(-x);
354 }

References CONVERT_DOUBLE_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [297/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_NumberXor  )

Definition at line 410 of file runtime-numbers.cc.

410  {
411  HandleScope scope(isolate);
412  DCHECK(args.length() == 2);
413 
414  CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
415  CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
416  return *isolate->factory()->NewNumberFromInt(x ^ y);
417 }

References CONVERT_NUMBER_CHECKED, DCHECK, and v8::base::internal::y.

◆ RUNTIME_FUNCTION() [298/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ObjectFreeze  )

Definition at line 1823 of file runtime.cc.

1823  {
1824  HandleScope scope(isolate);
1825  DCHECK(args.length() == 1);
1826  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1827 
1828  // %ObjectFreeze is a fast path and these cases are handled elsewhere.
1829  RUNTIME_ASSERT(!object->HasSloppyArgumentsElements() &&
1830  !object->map()->is_observed() && !object->IsJSProxy());
1831 
1832  Handle<Object> result;
1833  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object));
1834  return *result;
1835 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSObject::Freeze(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [299/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ObjectWasCreatedInCurrentOrigin  )

Definition at line 8738 of file runtime.cc.

8738  {
8739  HandleScope scope(isolate);
8740  DCHECK(args.length() == 1);
8741  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
8742 
8743  Handle<Context> creation_context(object->GetCreationContext(), isolate);
8744  return isolate->heap()->ToBoolean(
8745  ContextsHaveSameOrigin(creation_context, isolate->native_context()));
8746 }
static bool ContextsHaveSameOrigin(Handle< Context > context1, Handle< Context > context2)
Definition: runtime.cc:8715

References ContextsHaveSameOrigin(), CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [300/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ObservationWeakMapCreate  )

Definition at line 334 of file runtime-collections.cc.

334  {
335  HandleScope scope(isolate);
336  DCHECK(args.length() == 0);
337  // TODO(adamk): Currently this runtime function is only called three times per
338  // isolate. If it's called more often, the map should be moved into the
339  // strong root list.
340  Handle<Map> map =
341  isolate->factory()->NewMap(JS_WEAK_MAP_TYPE, JSWeakMap::kSize);
342  Handle<JSWeakMap> weakmap =
343  Handle<JSWeakMap>::cast(isolate->factory()->NewJSObjectFromMap(map));
344  return *WeakCollectionInitialize(isolate, weakmap);
345 }
static Handle< JSWeakCollection > WeakCollectionInitialize(Isolate *isolate, Handle< JSWeakCollection > weak_collection)

References v8::internal::Handle< T >::cast(), DCHECK, JS_WEAK_MAP_TYPE, v8::internal::JSWeakCollection::kSize, map, and WeakCollectionInitialize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [301/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ObserverObjectAndRecordHaveSameOrigin  )

Definition at line 8721 of file runtime.cc.

8721  {
8722  HandleScope scope(isolate);
8723  DCHECK(args.length() == 3);
8724  CONVERT_ARG_HANDLE_CHECKED(JSFunction, observer, 0);
8725  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 1);
8726  CONVERT_ARG_HANDLE_CHECKED(JSObject, record, 2);
8727 
8728  Handle<Context> observer_context(observer->context()->native_context());
8729  Handle<Context> object_context(object->GetCreationContext());
8730  Handle<Context> record_context(record->GetCreationContext());
8731 
8732  return isolate->heap()->ToBoolean(
8733  ContextsHaveSameOrigin(object_context, observer_context) &&
8734  ContextsHaveSameOrigin(object_context, record_context));
8735 }

References ContextsHaveSameOrigin(), CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [302/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_OptimizeFunctionOnNextCall  )

Definition at line 52 of file runtime-test.cc.

52  {
53  HandleScope scope(isolate);
54  RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
55  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
56  // The following two assertions are lifted from the DCHECKs inside
57  // JSFunction::MarkForOptimization().
58  RUNTIME_ASSERT(!function->shared()->is_generator());
59  RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() ||
60  (function->code()->kind() == Code::FUNCTION &&
61  function->code()->optimizable()));
62 
63  // If the function is optimized, just return.
64  if (function->IsOptimized()) return isolate->heap()->undefined_value();
65 
66  function->MarkForOptimization();
67 
68  Code* unoptimized = function->shared()->code();
69  if (args.length() == 2 && unoptimized->kind() == Code::FUNCTION) {
70  CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
71  if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("osr")) && FLAG_use_osr) {
72  // Start patching from the currently patched loop nesting level.
73  DCHECK(BackEdgeTable::Verify(isolate, unoptimized));
74  isolate->runtime_profiler()->AttemptOnStackReplacement(
75  *function, Code::kMaxLoopNestingMarker);
76  } else if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) &&
77  isolate->concurrent_recompilation_enabled()) {
78  function->MarkForConcurrentOptimization();
79  }
80  }
81 
82  return isolate->heap()->undefined_value();
83 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Code::kind(), v8::internal::Code::kMaxLoopNestingMarker, RUNTIME_ASSERT, and STATIC_CHAR_VECTOR.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [303/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_OptimizeObjectForAddingMultipleProperties  )

Definition at line 1346 of file runtime.cc.

1346  {
1347  HandleScope scope(isolate);
1348  DCHECK(args.length() == 2);
1349  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1350  CONVERT_SMI_ARG_CHECKED(properties, 1);
1351  // Conservative upper limit to prevent fuzz tests from going OOM.
1352  RUNTIME_ASSERT(properties <= 100000);
1353  if (object->HasFastProperties() && !object->IsJSGlobalProxy()) {
1354  JSObject::NormalizeProperties(object, KEEP_INOBJECT_PROPERTIES, properties);
1355  }
1356  return *object;
1357 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, KEEP_INOBJECT_PROPERTIES, v8::internal::JSObject::NormalizeProperties(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [304/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_OwnKeys  )

Definition at line 3044 of file runtime.cc.

3044  {
3045  HandleScope scope(isolate);
3046  DCHECK(args.length() == 1);
3047  CONVERT_ARG_CHECKED(JSObject, raw_object, 0);
3048  Handle<JSObject> object(raw_object);
3049 
3050  if (object->IsJSGlobalProxy()) {
3051  // Do access checks before going to the global object.
3052  if (object->IsAccessCheckNeeded() &&
3053  !isolate->MayNamedAccess(object, isolate->factory()->undefined_value(),
3054  v8::ACCESS_KEYS)) {
3055  isolate->ReportFailedAccessCheck(object, v8::ACCESS_KEYS);
3057  return *isolate->factory()->NewJSArray(0);
3058  }
3059 
3060  PrototypeIterator iter(isolate, object);
3061  // If proxy is detached we simply return an empty array.
3062  if (iter.IsAtEnd()) return *isolate->factory()->NewJSArray(0);
3063  object = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
3064  }
3065 
3066  Handle<FixedArray> contents;
3068  isolate, contents, JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY));
3069 
3070  // Some fast paths through GetKeysInFixedArrayFor reuse a cached
3071  // property array and since the result is mutable we have to create
3072  // a fresh clone on each invocation.
3073  int length = contents->length();
3074  Handle<FixedArray> copy = isolate->factory()->NewFixedArray(length);
3075  for (int i = 0; i < length; i++) {
3076  Object* entry = contents->get(i);
3077  if (entry->IsString()) {
3078  copy->set(i, entry);
3079  } else {
3080  DCHECK(entry->IsNumber());
3081  HandleScope scope(isolate);
3082  Handle<Object> entry_handle(entry, isolate);
3083  Handle<Object> entry_str =
3084  isolate->factory()->NumberToString(entry_handle);
3085  copy->set(i, *entry_str);
3086  }
3087  }
3088  return *isolate->factory()->NewJSArrayWithElements(copy);
3089 }

References v8::ACCESS_KEYS, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Handle< T >::cast(), CONVERT_ARG_CHECKED, DCHECK, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::JSReceiver::GetKeys(), v8::internal::PrototypeIterator::IsAtEnd(), v8::internal::JSReceiver::OWN_ONLY, and RETURN_FAILURE_IF_SCHEDULED_EXCEPTION.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [305/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ParseJson  )

Definition at line 39 of file runtime-json.cc.

39  {
40  HandleScope scope(isolate);
41  DCHECK(args.length() == 1);
42  CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
43 
44  source = String::Flatten(source);
45  // Optimized fast case where we only have Latin1 characters.
46  Handle<Object> result;
47  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
48  source->IsSeqOneByteString()
49  ? JsonParser<true>::Parse(source)
50  : JsonParser<false>::Parse(source));
51  return *result;
52 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), and v8::internal::compiler::Parse().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [306/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PrepareStep  )

Definition at line 7376 of file runtime.cc.

7376  {
7377  HandleScope scope(isolate);
7378  DCHECK(args.length() == 4);
7379  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7380  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7381 
7382  if (!args[1]->IsNumber() || !args[2]->IsNumber()) {
7383  return isolate->Throw(isolate->heap()->illegal_argument_string());
7384  }
7385 
7386  CONVERT_NUMBER_CHECKED(int, wrapped_frame_id, Int32, args[3]);
7387 
7388  StackFrame::Id frame_id;
7389  if (wrapped_frame_id == 0) {
7390  frame_id = StackFrame::NO_ID;
7391  } else {
7392  frame_id = UnwrapFrameId(wrapped_frame_id);
7393  }
7394 
7395  // Get the step action and check validity.
7396  StepAction step_action = static_cast<StepAction>(NumberToInt32(args[1]));
7397  if (step_action != StepIn && step_action != StepNext &&
7398  step_action != StepOut && step_action != StepInMin &&
7399  step_action != StepMin) {
7400  return isolate->Throw(isolate->heap()->illegal_argument_string());
7401  }
7402 
7403  if (frame_id != StackFrame::NO_ID && step_action != StepNext &&
7404  step_action != StepMin && step_action != StepOut) {
7405  return isolate->ThrowIllegalOperation();
7406  }
7407 
7408  // Get the number of steps.
7409  int step_count = NumberToInt32(args[2]);
7410  if (step_count < 1) {
7411  return isolate->Throw(isolate->heap()->illegal_argument_string());
7412  }
7413 
7414  // Clear all current stepping setup.
7415  isolate->debug()->ClearStepping();
7416 
7417  // Prepare step.
7418  isolate->debug()->PrepareStep(static_cast<StepAction>(step_action),
7419  step_count, frame_id);
7420  return isolate->heap()->undefined_value();
7421 }

References CheckExecutionState(), CONVERT_NUMBER_CHECKED, DCHECK, NumberToInt32(), RUNTIME_ASSERT, StepIn, StepInMin, StepMin, StepNext, StepOut, and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [307/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PreventExtensions  )

Definition at line 846 of file runtime.cc.

846  {
847  HandleScope scope(isolate);
848  DCHECK(args.length() == 1);
849  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
850  Handle<Object> result;
851  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
852  JSObject::PreventExtensions(obj));
853  return *result;
854 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::PreventExtensions().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [308/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PromoteScheduledException  )

Definition at line 4316 of file runtime.cc.

4316  {
4317  SealHandleScope shs(isolate);
4318  DCHECK(args.length() == 0);
4319  return isolate->PromoteScheduledException();
4320 }

References DCHECK.

◆ RUNTIME_FUNCTION() [309/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PushBlockContext  )

Definition at line 3960 of file runtime.cc.

3960  {
3961  HandleScope scope(isolate);
3962  DCHECK(args.length() == 2);
3963  CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 0);
3964  Handle<JSFunction> function;
3965  if (args[1]->IsSmi()) {
3966  // A smi sentinel indicates a context nested inside global code rather
3967  // than some function. There is a canonical empty function that can be
3968  // gotten from the native context.
3969  function = handle(isolate->native_context()->closure());
3970  } else {
3971  function = args.at<JSFunction>(1);
3972  }
3973  Handle<Context> current(isolate->context());
3974  Handle<Context> context =
3975  isolate->factory()->NewBlockContext(function, current, scope_info);
3976  isolate->set_context(*context);
3977  return *context;
3978 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and handle().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [310/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PushCatchContext  )

Definition at line 3938 of file runtime.cc.

3938  {
3939  HandleScope scope(isolate);
3940  DCHECK(args.length() == 3);
3941  CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
3942  CONVERT_ARG_HANDLE_CHECKED(Object, thrown_object, 1);
3943  Handle<JSFunction> function;
3944  if (args[2]->IsSmi()) {
3945  // A smi sentinel indicates a context nested inside global code rather
3946  // than some function. There is a canonical empty function that can be
3947  // gotten from the native context.
3948  function = handle(isolate->native_context()->closure());
3949  } else {
3950  function = args.at<JSFunction>(2);
3951  }
3952  Handle<Context> current(isolate->context());
3953  Handle<Context> context = isolate->factory()->NewCatchContext(
3954  function, current, name, thrown_object);
3955  isolate->set_context(*context);
3956  return *context;
3957 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, handle(), and name.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [311/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PushIfAbsent  )

Definition at line 4575 of file runtime.cc.

4575  {
4576  HandleScope scope(isolate);
4577  DCHECK(args.length() == 2);
4578  CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
4579  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, element, 1);
4580  RUNTIME_ASSERT(array->HasFastSmiOrObjectElements());
4581  int length = Smi::cast(array->length())->value();
4582  FixedArray* elements = FixedArray::cast(array->elements());
4583  for (int i = 0; i < length; i++) {
4584  if (elements->get(i) == *element) return isolate->heap()->false_value();
4585  }
4586 
4587  // Strict not needed. Used for cycle detection in Array join implementation.
4589  isolate, JSObject::SetFastElement(array, length, element, SLOPPY, true));
4590  return isolate->heap()->true_value();
4591 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::FixedArray::get(), RETURN_FAILURE_ON_EXCEPTION, RUNTIME_ASSERT, v8::internal::JSObject::SetFastElement(), and SLOPPY.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [312/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PushModuleContext  )

Definition at line 3989 of file runtime.cc.

3989  {
3990  SealHandleScope shs(isolate);
3991  DCHECK(args.length() == 2);
3992  CONVERT_SMI_ARG_CHECKED(index, 0);
3993 
3994  if (!args[1]->IsScopeInfo()) {
3995  // Module already initialized. Find hosting context and retrieve context.
3996  Context* host = Context::cast(isolate->context())->global_context();
3997  Context* context = Context::cast(host->get(index));
3998  DCHECK(context->previous() == isolate->context());
3999  isolate->set_context(context);
4000  return context;
4001  }
4002 
4003  CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 1);
4004 
4005  // Allocate module context.
4006  HandleScope scope(isolate);
4007  Factory* factory = isolate->factory();
4008  Handle<Context> context = factory->NewModuleContext(scope_info);
4009  Handle<JSModule> module = factory->NewJSModule(context, scope_info);
4010  context->set_module(*module);
4011  Context* previous = isolate->context();
4012  context->set_previous(previous);
4013  context->set_closure(previous->closure());
4014  context->set_global_object(previous->global_object());
4015  isolate->set_context(*context);
4016 
4017  // Find hosting scope and initialize internal variable holding module there.
4018  previous->global_context()->set(index, *context);
4019 
4020  return *context;
4021 }

References v8::internal::Context::cast(), v8::internal::Context::closure(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::FixedArray::get(), v8::internal::Context::global_context(), v8::internal::Context::global_object(), v8::internal::Context::previous(), and v8::internal::FixedArray::set().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [313/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_PushWithContext  )

Definition at line 3903 of file runtime.cc.

3903  {
3904  HandleScope scope(isolate);
3905  DCHECK(args.length() == 2);
3906  Handle<JSReceiver> extension_object;
3907  if (args[0]->IsJSReceiver()) {
3908  extension_object = args.at<JSReceiver>(0);
3909  } else {
3910  // Try to convert the object to a proper JavaScript object.
3911  MaybeHandle<JSReceiver> maybe_object =
3912  Object::ToObject(isolate, args.at<Object>(0));
3913  if (!maybe_object.ToHandle(&extension_object)) {
3914  Handle<Object> handle = args.at<Object>(0);
3916  isolate, NewTypeError("with_expression", HandleVector(&handle, 1)));
3917  }
3918  }
3919 
3920  Handle<JSFunction> function;
3921  if (args[1]->IsSmi()) {
3922  // A smi sentinel indicates a context nested inside global code rather
3923  // than some function. There is a canonical empty function that can be
3924  // gotten from the native context.
3925  function = handle(isolate->native_context()->closure());
3926  } else {
3927  function = args.at<JSFunction>(1);
3928  }
3929 
3930  Handle<Context> current(isolate->context());
3931  Handle<Context> context =
3932  isolate->factory()->NewWithContext(function, current, extension_object);
3933  isolate->set_context(*context);
3934  return *context;
3935 }

References DCHECK, handle(), HandleVector(), THROW_NEW_ERROR_RETURN_FAILURE, and v8::internal::Object::ToObject().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [314/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_QuoteJSONString  )

Definition at line 16 of file runtime-json.cc.

16  {
17  HandleScope scope(isolate);
18  CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
19  DCHECK(args.length() == 1);
20  Handle<Object> result;
22  isolate, result, BasicJsonStringifier::StringifyString(isolate, string));
23  return *result;
24 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [315/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RegExpCompile  )

Definition at line 763 of file runtime-regexp.cc.

763  {
764  HandleScope scope(isolate);
765  DCHECK(args.length() == 3);
766  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, re, 0);
767  CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1);
768  CONVERT_ARG_HANDLE_CHECKED(String, flags, 2);
769  Handle<Object> result;
770  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
771  RegExpImpl::Compile(re, pattern, flags));
772  return *result;
773 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::RegExpImpl::Compile(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::anonymous_namespace{flags.cc}::flags.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [316/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RegExpConstructResult  )

Definition at line 796 of file runtime-regexp.cc.

796  {
797  HandleScope handle_scope(isolate);
798  DCHECK(args.length() == 3);
800  RUNTIME_ASSERT(size >= 0 && size <= FixedArray::kMaxLength);
803  Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size);
804  Handle<Map> regexp_map(isolate->native_context()->regexp_result_map());
805  Handle<JSObject> object =
806  isolate->factory()->NewJSObjectFromMap(regexp_map, NOT_TENURED, false);
807  Handle<JSArray> array = Handle<JSArray>::cast(object);
808  array->set_elements(*elements);
809  array->set_length(Smi::FromInt(size));
810  // Write in-object properties after the length of the array.
811  array->InObjectPropertyAtPut(JSRegExpResult::kIndexIndex, *index);
812  array->InObjectPropertyAtPut(JSRegExpResult::kInputIndex, *input);
813  return *array;
814 }

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::JSRegExpResult::kIndexIndex, v8::internal::JSRegExpResult::kInputIndex, v8::internal::FixedArray::kMaxLength, NOT_TENURED, RUNTIME_ASSERT, and size.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [317/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RegExpExecMultiple  )

Definition at line 1055 of file runtime-regexp.cc.

1055  {
1056  HandleScope handles(isolate);
1057  DCHECK(args.length() == 4);
1058 
1059  CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
1060  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
1061  CONVERT_ARG_HANDLE_CHECKED(JSArray, last_match_info, 2);
1062  CONVERT_ARG_HANDLE_CHECKED(JSArray, result_array, 3);
1063  RUNTIME_ASSERT(last_match_info->HasFastObjectElements());
1064  RUNTIME_ASSERT(result_array->HasFastObjectElements());
1065 
1066  subject = String::Flatten(subject);
1067  RUNTIME_ASSERT(regexp->GetFlags().is_global());
1068 
1069  if (regexp->CaptureCount() == 0) {
1070  return SearchRegExpMultiple<false>(isolate, subject, regexp,
1071  last_match_info, result_array);
1072  } else {
1073  return SearchRegExpMultiple<true>(isolate, subject, regexp, last_match_info,
1074  result_array);
1075  }
1076 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [318/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RegExpExecRT  )

Definition at line 776 of file runtime-regexp.cc.

776  {
777  HandleScope scope(isolate);
778  DCHECK(args.length() == 4);
779  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
780  CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
781  CONVERT_INT32_ARG_CHECKED(index, 2);
782  CONVERT_ARG_HANDLE_CHECKED(JSArray, last_match_info, 3);
783  // Due to the way the JS calls are constructed this must be less than the
784  // length of a string, i.e. it is always a Smi. We check anyway for security.
785  RUNTIME_ASSERT(index >= 0);
786  RUNTIME_ASSERT(index <= subject->length());
787  isolate->counters()->regexp_entry_runtime()->Increment();
788  Handle<Object> result;
790  isolate, result,
791  RegExpImpl::Exec(regexp, subject, index, last_match_info));
792  return *result;
793 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_INT32_ARG_CHECKED, DCHECK, v8::internal::RegExpImpl::Exec(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [319/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RegExpInitializeObject  )

Definition at line 817 of file runtime-regexp.cc.

817  {
818  HandleScope scope(isolate);
819  DCHECK(args.length() == 6);
820  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
821  CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
822  // If source is the empty string we set it to "(?:)" instead as
823  // suggested by ECMA-262, 5th, section 15.10.4.1.
824  if (source->length() == 0) source = isolate->factory()->query_colon_string();
825 
827  if (!global->IsTrue()) global = isolate->factory()->false_value();
828 
829  CONVERT_ARG_HANDLE_CHECKED(Object, ignoreCase, 3);
830  if (!ignoreCase->IsTrue()) ignoreCase = isolate->factory()->false_value();
831 
832  CONVERT_ARG_HANDLE_CHECKED(Object, multiline, 4);
833  if (!multiline->IsTrue()) multiline = isolate->factory()->false_value();
834 
836  if (!sticky->IsTrue()) sticky = isolate->factory()->false_value();
837 
838  Map* map = regexp->map();
839  Object* constructor = map->constructor();
840  if (!FLAG_harmony_regexps && constructor->IsJSFunction() &&
841  JSFunction::cast(constructor)->initial_map() == map) {
842  // If we still have the original map, set in-object properties directly.
843  regexp->InObjectPropertyAtPut(JSRegExp::kSourceFieldIndex, *source);
844  // Both true and false are immovable immortal objects so no need for write
845  // barrier.
846  regexp->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex, *global,
848  regexp->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex, *ignoreCase,
850  regexp->InObjectPropertyAtPut(JSRegExp::kMultilineFieldIndex, *multiline,
852  regexp->InObjectPropertyAtPut(JSRegExp::kLastIndexFieldIndex,
853  Smi::FromInt(0), SKIP_WRITE_BARRIER);
854  return *regexp;
855  }
856 
857  // Map has changed, so use generic, but slower, method. We also end here if
858  // the --harmony-regexp flag is set, because the initial map does not have
859  // space for the 'sticky' flag, since it is from the snapshot, but must work
860  // both with and without --harmony-regexp. When sticky comes out from under
861  // the flag, we will be able to use the fast initial map.
862  PropertyAttributes final =
864  PropertyAttributes writable =
865  static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
866  Handle<Object> zero(Smi::FromInt(0), isolate);
867  Factory* factory = isolate->factory();
868  JSObject::SetOwnPropertyIgnoreAttributes(regexp, factory->source_string(),
869  source, final).Check();
870  JSObject::SetOwnPropertyIgnoreAttributes(regexp, factory->global_string(),
871  global, final).Check();
872  JSObject::SetOwnPropertyIgnoreAttributes(
873  regexp, factory->ignore_case_string(), ignoreCase, final).Check();
874  JSObject::SetOwnPropertyIgnoreAttributes(regexp, factory->multiline_string(),
875  multiline, final).Check();
876  if (FLAG_harmony_regexps) {
877  JSObject::SetOwnPropertyIgnoreAttributes(regexp, factory->sticky_string(),
878  sticky, final).Check();
879  }
880  JSObject::SetOwnPropertyIgnoreAttributes(regexp, factory->last_index_string(),
881  zero, writable).Check();
882  return *regexp;
883 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, DONT_DELETE, DONT_ENUM, v8::internal::Smi::FromInt(), v8::internal::JSRegExp::kGlobalFieldIndex, v8::internal::JSRegExp::kIgnoreCaseFieldIndex, v8::internal::JSRegExp::kLastIndexFieldIndex, v8::internal::JSRegExp::kMultilineFieldIndex, v8::internal::JSRegExp::kSourceFieldIndex, map, READ_ONLY, v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), SKIP_WRITE_BARRIER, and zero.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [320/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RemoveArrayHoles  )

Definition at line 5294 of file runtime.cc.

5294  {
5295  HandleScope scope(isolate);
5296  DCHECK(args.length() == 2);
5297  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
5298  CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
5299  return *JSObject::PrepareElementsForSort(object, limit);
5300 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, and v8::internal::JSObject::PrepareElementsForSort().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [321/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RemPiO2  )

Definition at line 63 of file runtime-maths.cc.

63  {
64  HandleScope handle_scope(isolate);
65  DCHECK(args.length() == 1);
67  Factory* factory = isolate->factory();
68  double y[2];
69  int n = fdlibm::rempio2(x, y);
70  Handle<FixedArray> array = factory->NewFixedArray(3);
71  Handle<HeapNumber> y0 = factory->NewHeapNumber(y[0]);
72  Handle<HeapNumber> y1 = factory->NewHeapNumber(y[1]);
73  array->set(0, Smi::FromInt(n));
74  array->set(1, *y0);
75  array->set(2, *y1);
76  return *factory->NewJSArrayWithElements(array);
77 }

References CONVERT_DOUBLE_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [322/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ResumeJSGeneratorObject  )

Definition at line 1762 of file runtime.cc.

1762  {
1763  SealHandleScope shs(isolate);
1764  DCHECK(args.length() == 3);
1765  CONVERT_ARG_CHECKED(JSGeneratorObject, generator_object, 0);
1766  CONVERT_ARG_CHECKED(Object, value, 1);
1767  CONVERT_SMI_ARG_CHECKED(resume_mode_int, 2);
1768  JavaScriptFrameIterator stack_iterator(isolate);
1769  JavaScriptFrame* frame = stack_iterator.frame();
1770 
1771  DCHECK_EQ(frame->function(), generator_object->function());
1772  DCHECK(frame->function()->is_compiled());
1773 
1774  STATIC_ASSERT(JSGeneratorObject::kGeneratorExecuting < 0);
1775  STATIC_ASSERT(JSGeneratorObject::kGeneratorClosed == 0);
1776 
1777  Address pc = generator_object->function()->code()->instruction_start();
1778  int offset = generator_object->continuation();
1779  DCHECK(offset > 0);
1780  frame->set_pc(pc + offset);
1781  if (FLAG_enable_ool_constant_pool) {
1782  frame->set_constant_pool(
1783  generator_object->function()->code()->constant_pool());
1784  }
1785  generator_object->set_continuation(JSGeneratorObject::kGeneratorExecuting);
1786 
1787  FixedArray* operand_stack = generator_object->operand_stack();
1788  int operands_count = operand_stack->length();
1789  if (operands_count != 0) {
1790  frame->RestoreOperandStack(operand_stack,
1791  generator_object->stack_handler_index());
1792  generator_object->set_operand_stack(isolate->heap()->empty_fixed_array());
1793  generator_object->set_stack_handler_index(-1);
1794  }
1795 
1796  JSGeneratorObject::ResumeMode resume_mode =
1797  static_cast<JSGeneratorObject::ResumeMode>(resume_mode_int);
1798  switch (resume_mode) {
1799  case JSGeneratorObject::NEXT:
1800  return value;
1801  case JSGeneratorObject::THROW:
1802  return isolate->Throw(value);
1803  }
1804 
1805  UNREACHABLE();
1806  return isolate->ThrowIllegalOperation();
1807 }

References v8::internal::Register::code(), CONVERT_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, DCHECK_EQ, v8::internal::JavaScriptFrame::function(), v8::internal::JSFunction::is_compiled(), v8::internal::JSGeneratorObject::kGeneratorClosed, v8::internal::JSGeneratorObject::kGeneratorExecuting, v8::internal::FixedArrayBase::length(), v8::internal::JSGeneratorObject::NEXT, pc, v8::internal::JavaScriptFrame::RestoreOperandStack(), STATIC_ASSERT(), v8::internal::JSGeneratorObject::THROW, and UNREACHABLE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [323/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ReThrow  )

Definition at line 4308 of file runtime.cc.

4308  {
4309  HandleScope scope(isolate);
4310  DCHECK(args.length() == 1);
4311 
4312  return isolate->ReThrow(args[0]);
4313 }

References DCHECK.

◆ RUNTIME_FUNCTION() [324/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RoundNumber  )

Definition at line 169 of file runtime-maths.cc.

169  {
170  HandleScope scope(isolate);
171  DCHECK(args.length() == 1);
173  isolate->counters()->math_round()->Increment();
174 
175  if (!input->IsHeapNumber()) {
176  DCHECK(input->IsSmi());
177  return *input;
178  }
179 
180  Handle<HeapNumber> number = Handle<HeapNumber>::cast(input);
181 
182  double value = number->value();
183  int exponent = number->get_exponent();
184  int sign = number->get_sign();
185 
186  if (exponent < -1) {
187  // Number in range ]-0.5..0.5[. These always round to +/-zero.
188  if (sign) return isolate->heap()->minus_zero_value();
189  return Smi::FromInt(0);
190  }
191 
192  // We compare with kSmiValueSize - 2 because (2^30 - 0.1) has exponent 29 and
193  // should be rounded to 2^30, which is not smi (for 31-bit smis, similar
194  // argument holds for 32-bit smis).
195  if (!sign && exponent < kSmiValueSize - 2) {
196  return Smi::FromInt(static_cast<int>(value + 0.5));
197  }
198 
199  // If the magnitude is big enough, there's no place for fraction part. If we
200  // try to add 0.5 to this number, 1.0 will be added instead.
201  if (exponent >= 52) {
202  return *number;
203  }
204 
205  if (sign && value >= -0.5) return isolate->heap()->minus_zero_value();
206 
207  // Do not call NumberFromDouble() to avoid extra checks.
208  return *isolate->factory()->NewNumber(Floor(value + 0.5));
209 }
const int kSmiValueSize
Definition: v8.h:5806

References v8::internal::Handle< T >::cast(), CONVERT_NUMBER_ARG_HANDLE_CHECKED, DCHECK, Floor(), v8::internal::Smi::FromInt(), kSmiValueSize, and sign.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [325/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RunMicrotasks  )

Definition at line 8700 of file runtime.cc.

8700  {
8701  HandleScope scope(isolate);
8702  DCHECK(args.length() == 0);
8703  isolate->RunMicrotasks();
8704  return isolate->heap()->undefined_value();
8705 }

References DCHECK.

◆ RUNTIME_FUNCTION() [326/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_RunningInSimulator  )

Definition at line 33 of file runtime-test.cc.

33  {
34  SealHandleScope shs(isolate);
35  DCHECK(args.length() == 0);
36 #if defined(USE_SIMULATOR)
37  return isolate->heap()->true_value();
38 #else
39  return isolate->heap()->false_value();
40 #endif
41 }

References DCHECK.

◆ RUNTIME_FUNCTION() [327/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetAdd  )

Definition at line 25 of file runtime-collections.cc.

25  {
26  HandleScope scope(isolate);
27  DCHECK(args.length() == 2);
28  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
30  Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
31  table = OrderedHashSet::Add(table, key);
32  holder->set_table(*table);
33  return *holder;
34 }

References v8::internal::OrderedHashSet::Add(), CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [328/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetAllocationTimeout  )

Definition at line 171 of file runtime-test.cc.

171  {
172  SealHandleScope shs(isolate);
173  DCHECK(args.length() == 2 || args.length() == 3);
174 #ifdef DEBUG
175  CONVERT_SMI_ARG_CHECKED(interval, 0);
176  CONVERT_SMI_ARG_CHECKED(timeout, 1);
177  isolate->heap()->set_allocation_timeout(timeout);
178  FLAG_gc_interval = interval;
179  if (args.length() == 3) {
180  // Enable/disable inline allocation if requested.
181  CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2);
182  if (inline_allocation) {
183  isolate->heap()->EnableInlineAllocation();
184  } else {
185  isolate->heap()->DisableInlineAllocation();
186  }
187  }
188 #endif
189  return isolate->heap()->undefined_value();
190 }

References CONVERT_BOOLEAN_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [329/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetClear  )

Definition at line 60 of file runtime-collections.cc.

60  {
61  HandleScope scope(isolate);
62  DCHECK(args.length() == 1);
63  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
64  Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
65  table = OrderedHashSet::Clear(table);
66  holder->set_table(*table);
67  return isolate->heap()->undefined_value();
68 }

References v8::internal::OrderedHashTable< OrderedHashSet, JSSetIterator, 1 >::Clear(), CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [330/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetCode  )

Definition at line 1620 of file runtime.cc.

1620  {
1621  HandleScope scope(isolate);
1622  DCHECK(args.length() == 2);
1623 
1624  CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
1625  CONVERT_ARG_HANDLE_CHECKED(JSFunction, source, 1);
1626 
1627  Handle<SharedFunctionInfo> target_shared(target->shared());
1628  Handle<SharedFunctionInfo> source_shared(source->shared());
1629  RUNTIME_ASSERT(!source_shared->bound());
1630 
1631  if (!Compiler::EnsureCompiled(source, KEEP_EXCEPTION)) {
1632  return isolate->heap()->exception();
1633  }
1634 
1635  // Mark both, the source and the target, as un-flushable because the
1636  // shared unoptimized code makes them impossible to enqueue in a list.
1637  DCHECK(target_shared->code()->gc_metadata() == NULL);
1638  DCHECK(source_shared->code()->gc_metadata() == NULL);
1639  target_shared->set_dont_flush(true);
1640  source_shared->set_dont_flush(true);
1641 
1642  // Set the code, scope info, formal parameter count, and the length
1643  // of the target shared function info.
1644  target_shared->ReplaceCode(source_shared->code());
1645  target_shared->set_scope_info(source_shared->scope_info());
1646  target_shared->set_length(source_shared->length());
1647  target_shared->set_feedback_vector(source_shared->feedback_vector());
1648  target_shared->set_formal_parameter_count(
1649  source_shared->formal_parameter_count());
1650  target_shared->set_script(source_shared->script());
1651  target_shared->set_start_position_and_type(
1652  source_shared->start_position_and_type());
1653  target_shared->set_end_position(source_shared->end_position());
1654  bool was_native = target_shared->native();
1655  target_shared->set_compiler_hints(source_shared->compiler_hints());
1656  target_shared->set_native(was_native);
1657  target_shared->set_profiler_ticks(source_shared->profiler_ticks());
1658 
1659  // Set the code of the target function.
1660  target->ReplaceCode(source_shared->code());
1661  DCHECK(target->next_function_link()->IsUndefined());
1662 
1663  // Make sure we get a fresh copy of the literal vector to avoid cross
1664  // context contamination.
1665  Handle<Context> context(source->context());
1666  int number_of_literals = source->NumberOfLiterals();
1667  Handle<FixedArray> literals =
1668  isolate->factory()->NewFixedArray(number_of_literals, TENURED);
1669  if (number_of_literals > 0) {
1670  literals->set(JSFunction::kLiteralNativeContextIndex,
1671  context->native_context());
1672  }
1673  target->set_context(*context);
1674  target->set_literals(*literals);
1675 
1676  if (isolate->logger()->is_logging_code_events() ||
1677  isolate->cpu_profiler()->is_profiling()) {
1678  isolate->logger()->LogExistingFunction(source_shared,
1679  Handle<Code>(source_shared->code()));
1680  }
1681 
1682  return *target;
1683 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Compiler::EnsureCompiled(), KEEP_EXCEPTION, v8::internal::JSFunction::kLiteralNativeContextIndex, literals(), NULL, RUNTIME_ASSERT, and TENURED.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [331/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetDebugEventListener  )

Definition at line 5451 of file runtime.cc.

5451  {
5452  SealHandleScope shs(isolate);
5453  DCHECK(args.length() == 2);
5454  RUNTIME_ASSERT(args[0]->IsJSFunction() || args[0]->IsUndefined() ||
5455  args[0]->IsNull());
5456  CONVERT_ARG_HANDLE_CHECKED(Object, callback, 0);
5458  isolate->debug()->SetEventListener(callback, data);
5459 
5460  return isolate->heap()->undefined_value();
5461 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [332/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetDelete  )

Definition at line 47 of file runtime-collections.cc.

47  {
48  HandleScope scope(isolate);
49  DCHECK(args.length() == 2);
50  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
52  Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
53  bool was_present = false;
54  table = OrderedHashSet::Remove(table, key, &was_present);
55  holder->set_table(*table);
56  return isolate->heap()->ToBoolean(was_present);
57 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::OrderedHashTable< OrderedHashSet, JSSetIterator, 1 >::Remove().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [333/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetDisableBreak  )

Definition at line 7231 of file runtime.cc.

7231  {
7232  HandleScope scope(isolate);
7233  DCHECK(args.length() == 1);
7234  CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 0);
7235  isolate->debug()->set_disable_break(disable_break);
7236  return isolate->heap()->undefined_value();
7237 }

References CONVERT_BOOLEAN_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [334/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetFlags  )

Definition at line 258 of file runtime-test.cc.

258  {
259  SealHandleScope shs(isolate);
260  DCHECK(args.length() == 1);
261  CONVERT_ARG_CHECKED(String, arg, 0);
262  SmartArrayPointer<char> flags =
263  arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
265  return isolate->heap()->undefined_value();
266 }
static void SetFlagsFromString(const char *flags)
Definition: api.cc:7473

References CONVERT_ARG_CHECKED, DCHECK, DISALLOW_NULLS, v8::internal::anonymous_namespace{flags.cc}::flags, ROBUST_STRING_TRAVERSAL, v8::internal::FlagList::SetFlagsFromString(), and StrLength().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [335/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetFunctionBreakPoint  )

Definition at line 7273 of file runtime.cc.

7273  {
7274  HandleScope scope(isolate);
7275  DCHECK(args.length() == 3);
7276  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
7277  CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
7278  RUNTIME_ASSERT(source_position >= function->shared()->start_position() &&
7279  source_position <= function->shared()->end_position());
7280  CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 2);
7281 
7282  // Set break point.
7283  RUNTIME_ASSERT(isolate->debug()->SetBreakPoint(
7284  function, break_point_object_arg, &source_position));
7285 
7286  return Smi::FromInt(source_position);
7287 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Smi::FromInt(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [336/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetGetSize  )

Definition at line 71 of file runtime-collections.cc.

71  {
72  HandleScope scope(isolate);
73  DCHECK(args.length() == 1);
74  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
75  Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
76  return Smi::FromInt(table->NumberOfElements());
77 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [337/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetHas  )

Definition at line 37 of file runtime-collections.cc.

37  {
38  HandleScope scope(isolate);
39  DCHECK(args.length() == 2);
40  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
42  Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
43  return isolate->heap()->ToBoolean(table->Contains(key));
44 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [338/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetHiddenProperty  )

Definition at line 2364 of file runtime.cc.

2364  {
2365  HandleScope scope(isolate);
2366  RUNTIME_ASSERT(args.length() == 3);
2367 
2368  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2369  CONVERT_ARG_HANDLE_CHECKED(String, key, 1);
2371  RUNTIME_ASSERT(key->IsUniqueName());
2372  return *JSObject::SetHiddenProperty(object, key, value);
2373 }

References CONVERT_ARG_HANDLE_CHECKED, RUNTIME_ASSERT, and v8::internal::JSObject::SetHiddenProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [339/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetInitialize  )

Definition at line 15 of file runtime-collections.cc.

15  {
16  HandleScope scope(isolate);
17  DCHECK(args.length() == 1);
18  CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
19  Handle<OrderedHashSet> table = isolate->factory()->NewOrderedHashSet();
20  holder->set_table(*table);
21  return *holder;
22 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [340/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetInlineBuiltinFlag  )

Definition at line 2524 of file runtime.cc.

2524  {
2525  SealHandleScope shs(isolate);
2526  RUNTIME_ASSERT(args.length() == 1);
2527  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
2528 
2529  if (object->IsJSFunction()) {
2530  JSFunction* func = JSFunction::cast(*object);
2531  func->shared()->set_inline_builtin(true);
2532  }
2533  return isolate->heap()->undefined_value();
2534 }

References CONVERT_ARG_HANDLE_CHECKED, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [341/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetIsObserved  )

Definition at line 8677 of file runtime.cc.

8677  {
8678  HandleScope scope(isolate);
8679  DCHECK(args.length() == 1);
8680  CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
8681  RUNTIME_ASSERT(!obj->IsJSGlobalProxy());
8682  if (obj->IsJSProxy()) return isolate->heap()->undefined_value();
8683  RUNTIME_ASSERT(!obj->map()->is_observed());
8684 
8685  DCHECK(obj->IsJSObject());
8686  JSObject::SetObserved(Handle<JSObject>::cast(obj));
8687  return isolate->heap()->undefined_value();
8688 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, RUNTIME_ASSERT, and v8::internal::JSObject::SetObserved().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [342/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetIteratorInitialize  )

Definition at line 80 of file runtime-collections.cc.

80  {
81  HandleScope scope(isolate);
82  DCHECK(args.length() == 3);
83  CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0);
84  CONVERT_ARG_HANDLE_CHECKED(JSSet, set, 1);
86  RUNTIME_ASSERT(kind == JSSetIterator::kKindValues ||
87  kind == JSSetIterator::kKindEntries);
88  Handle<OrderedHashSet> table(OrderedHashSet::cast(set->table()));
89  holder->set_table(*table);
90  holder->set_index(Smi::FromInt(0));
91  holder->set_kind(Smi::FromInt(kind));
92  return isolate->heap()->undefined_value();
93 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::OrderedHashTableIterator< JSSetIterator, OrderedHashSet >::kKindEntries, v8::internal::OrderedHashTableIterator< JSSetIterator, OrderedHashSet >::kKindValues, and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [343/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetIteratorNext  )

Definition at line 96 of file runtime-collections.cc.

96  {
97  SealHandleScope shs(isolate);
98  DCHECK(args.length() == 2);
99  CONVERT_ARG_CHECKED(JSSetIterator, holder, 0);
100  CONVERT_ARG_CHECKED(JSArray, value_array, 1);
101  return holder->Next(value_array);
102 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [344/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetNativeFlag  )

Definition at line 2510 of file runtime.cc.

2510  {
2511  SealHandleScope shs(isolate);
2512  RUNTIME_ASSERT(args.length() == 1);
2513 
2514  CONVERT_ARG_CHECKED(Object, object, 0);
2515 
2516  if (object->IsJSFunction()) {
2517  JSFunction* func = JSFunction::cast(object);
2518  func->shared()->set_native(true);
2519  }
2520  return isolate->heap()->undefined_value();
2521 }

References CONVERT_ARG_CHECKED, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [345/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetProperty  )

Definition at line 2452 of file runtime.cc.

2452  {
2453  HandleScope scope(isolate);
2454  RUNTIME_ASSERT(args.length() == 4);
2455 
2456  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
2459  CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode_arg, 3);
2460  StrictMode strict_mode = strict_mode_arg;
2461 
2462  Handle<Object> result;
2464  isolate, result,
2465  Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2466  return *result;
2467 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, CONVERT_STRICT_MODE_ARG_CHECKED, RUNTIME_ASSERT, and v8::internal::Runtime::SetObjectProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [346/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetPrototype  )

Definition at line 697 of file runtime.cc.

697  {
698  HandleScope scope(isolate);
699  DCHECK(args.length() == 2);
700  CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
701  CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
702  if (obj->IsAccessCheckNeeded() &&
703  !isolate->MayNamedAccess(obj, isolate->factory()->proto_string(),
704  v8::ACCESS_SET)) {
705  isolate->ReportFailedAccessCheck(obj, v8::ACCESS_SET);
707  return isolate->heap()->undefined_value();
708  }
709  if (obj->map()->is_observed()) {
710  Handle<Object> old_value = GetPrototypeSkipHiddenPrototypes(isolate, obj);
711  Handle<Object> result;
713  isolate, result, JSObject::SetPrototype(obj, prototype, true));
714 
715  Handle<Object> new_value = GetPrototypeSkipHiddenPrototypes(isolate, obj);
716  if (!new_value->SameValue(*old_value)) {
717  JSObject::EnqueueChangeRecord(
718  obj, "setPrototype", isolate->factory()->proto_string(), old_value);
719  }
720  return *result;
721  }
722  Handle<Object> result;
724  isolate, result, JSObject::SetPrototype(obj, prototype, true));
725  return *result;
726 }

References v8::ACCESS_SET, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSObject::EnqueueChangeRecord(), GetPrototypeSkipHiddenPrototypes(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, and v8::internal::JSObject::SetPrototype().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [347/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetScopeVariableValue  )

Definition at line 7107 of file runtime.cc.

7107  {
7108  HandleScope scope(isolate);
7109  DCHECK(args.length() == 6);
7110 
7111  // Check arguments.
7112  CONVERT_NUMBER_CHECKED(int, index, Int32, args[3]);
7113  CONVERT_ARG_HANDLE_CHECKED(String, variable_name, 4);
7114  CONVERT_ARG_HANDLE_CHECKED(Object, new_value, 5);
7115 
7116  bool res;
7117  if (args[0]->IsNumber()) {
7118  CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
7119  RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
7120 
7121  CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
7122  CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]);
7123 
7124  // Get the frame where the debugging is performed.
7125  StackFrame::Id id = UnwrapFrameId(wrapped_id);
7126  JavaScriptFrameIterator frame_it(isolate, id);
7127  JavaScriptFrame* frame = frame_it.frame();
7128 
7129  ScopeIterator it(isolate, frame, inlined_jsframe_index);
7130  res = SetScopeVariableValue(&it, index, variable_name, new_value);
7131  } else {
7132  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
7133  ScopeIterator it(isolate, fun);
7134  res = SetScopeVariableValue(&it, index, variable_name, new_value);
7135  }
7136 
7137  return isolate->heap()->ToBoolean(res);
7138 }
static bool SetScopeVariableValue(ScopeIterator *it, int index, Handle< String > variable_name, Handle< Object > new_value)
Definition: runtime.cc:7085

References CheckExecutionState(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, RUNTIME_ASSERT, SetScopeVariableValue(), and UnwrapFrameId().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [348/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SetScriptBreakPoint  )

Definition at line 7297 of file runtime.cc.

7297  {
7298  HandleScope scope(isolate);
7299  DCHECK(args.length() == 4);
7300  CONVERT_ARG_HANDLE_CHECKED(JSValue, wrapper, 0);
7301  CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
7302  RUNTIME_ASSERT(source_position >= 0);
7303  CONVERT_NUMBER_CHECKED(int32_t, statement_aligned_code, Int32, args[2]);
7304  CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 3);
7305 
7306  if (!IsPositionAlignmentCodeCorrect(statement_aligned_code)) {
7307  return isolate->ThrowIllegalOperation();
7308  }
7309  BreakPositionAlignment alignment =
7310  static_cast<BreakPositionAlignment>(statement_aligned_code);
7311 
7312  // Get the script from the script wrapper.
7313  RUNTIME_ASSERT(wrapper->value()->IsScript());
7314  Handle<Script> script(Script::cast(wrapper->value()));
7315 
7316  // Set break point.
7317  if (!isolate->debug()->SetBreakPointForScript(script, break_point_object_arg,
7318  &source_position, alignment)) {
7319  return isolate->heap()->undefined_value();
7320  }
7321 
7322  return Smi::FromInt(source_position);
7323 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::Smi::FromInt(), IsPositionAlignmentCodeCorrect(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [349/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SmiLexicographicCompare  )

Definition at line 486 of file runtime-numbers.cc.

486  {
487  SealHandleScope shs(isolate);
488  DCHECK(args.length() == 2);
489  CONVERT_SMI_ARG_CHECKED(x_value, 0);
490  CONVERT_SMI_ARG_CHECKED(y_value, 1);
491 
492  // If the integers are equal so are the string representations.
493  if (x_value == y_value) return Smi::FromInt(EQUAL);
494 
495  // If one of the integers is zero the normal integer order is the
496  // same as the lexicographic order of the string representations.
497  if (x_value == 0 || y_value == 0)
498  return Smi::FromInt(x_value < y_value ? LESS : GREATER);
499 
500  // If only one of the integers is negative the negative number is
501  // smallest because the char code of '-' is less than the char code
502  // of any digit. Otherwise, we make both values positive.
503 
504  // Use unsigned values otherwise the logic is incorrect for -MIN_INT on
505  // architectures using 32-bit Smis.
506  uint32_t x_scaled = x_value;
507  uint32_t y_scaled = y_value;
508  if (x_value < 0 || y_value < 0) {
509  if (y_value >= 0) return Smi::FromInt(LESS);
510  if (x_value >= 0) return Smi::FromInt(GREATER);
511  x_scaled = -x_value;
512  y_scaled = -y_value;
513  }
514 
515  static const uint32_t kPowersOf10[] = {
516  1, 10, 100, 1000,
517  10 * 1000, 100 * 1000, 1000 * 1000, 10 * 1000 * 1000,
518  100 * 1000 * 1000, 1000 * 1000 * 1000};
519 
520  // If the integers have the same number of decimal digits they can be
521  // compared directly as the numeric order is the same as the
522  // lexicographic order. If one integer has fewer digits, it is scaled
523  // by some power of 10 to have the same number of digits as the longer
524  // integer. If the scaled integers are equal it means the shorter
525  // integer comes first in the lexicographic order.
526 
527  // From http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
528  int x_log2 = IntegerLog2(x_scaled);
529  int x_log10 = ((x_log2 + 1) * 1233) >> 12;
530  x_log10 -= x_scaled < kPowersOf10[x_log10];
531 
532  int y_log2 = IntegerLog2(y_scaled);
533  int y_log10 = ((y_log2 + 1) * 1233) >> 12;
534  y_log10 -= y_scaled < kPowersOf10[y_log10];
535 
536  int tie = EQUAL;
537 
538  if (x_log10 < y_log10) {
539  // X has fewer digits. We would like to simply scale up X but that
540  // might overflow, e.g when comparing 9 with 1_000_000_000, 9 would
541  // be scaled up to 9_000_000_000. So we scale up by the next
542  // smallest power and scale down Y to drop one digit. It is OK to
543  // drop one digit from the longer integer since the final digit is
544  // past the length of the shorter integer.
545  x_scaled *= kPowersOf10[y_log10 - x_log10 - 1];
546  y_scaled /= 10;
547  tie = LESS;
548  } else if (y_log10 < x_log10) {
549  y_scaled *= kPowersOf10[x_log10 - y_log10 - 1];
550  x_scaled /= 10;
551  tie = GREATER;
552  }
553 
554  if (x_scaled < y_scaled) return Smi::FromInt(LESS);
555  if (x_scaled > y_scaled) return Smi::FromInt(GREATER);
556  return Smi::FromInt(tie);
557 }
int IntegerLog2(uint32_t value)

References CONVERT_SMI_ARG_CHECKED, DCHECK, EQUAL, v8::internal::Smi::FromInt(), GREATER, IntegerLog2(), and LESS.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [350/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SparseJoinWithSeparator  )

Definition at line 641 of file runtime-strings.cc.

641  {
642  HandleScope scope(isolate);
643  DCHECK(args.length() == 3);
644  CONVERT_ARG_HANDLE_CHECKED(JSArray, elements_array, 0);
645  CONVERT_NUMBER_CHECKED(uint32_t, array_length, Uint32, args[1]);
646  CONVERT_ARG_HANDLE_CHECKED(String, separator, 2);
647  // elements_array is fast-mode JSarray of alternating positions
648  // (increasing order) and strings.
649  RUNTIME_ASSERT(elements_array->HasFastSmiOrObjectElements());
650  // array_length is length of original array (used to add separators);
651  // separator is string to put between elements. Assumed to be non-empty.
652  RUNTIME_ASSERT(array_length > 0);
653 
654  // Find total length of join result.
655  int string_length = 0;
656  bool is_one_byte = separator->IsOneByteRepresentation();
657  bool overflow = false;
658  CONVERT_NUMBER_CHECKED(int, elements_length, Int32, elements_array->length());
659  RUNTIME_ASSERT(elements_length <= elements_array->elements()->length());
660  RUNTIME_ASSERT((elements_length & 1) == 0); // Even length.
661  FixedArray* elements = FixedArray::cast(elements_array->elements());
662  for (int i = 0; i < elements_length; i += 2) {
663  RUNTIME_ASSERT(elements->get(i)->IsNumber());
664  CONVERT_NUMBER_CHECKED(uint32_t, position, Uint32, elements->get(i));
665  RUNTIME_ASSERT(position < array_length);
666  RUNTIME_ASSERT(elements->get(i + 1)->IsString());
667  }
668 
669  {
671  for (int i = 0; i < elements_length; i += 2) {
672  String* string = String::cast(elements->get(i + 1));
673  int length = string->length();
674  if (is_one_byte && !string->IsOneByteRepresentation()) {
675  is_one_byte = false;
676  }
677  if (length > String::kMaxLength ||
678  String::kMaxLength - length < string_length) {
679  overflow = true;
680  break;
681  }
682  string_length += length;
683  }
684  }
685 
686  int separator_length = separator->length();
687  if (!overflow && separator_length > 0) {
688  if (array_length <= 0x7fffffffu) {
689  int separator_count = static_cast<int>(array_length) - 1;
690  int remaining_length = String::kMaxLength - string_length;
691  if ((remaining_length / separator_length) >= separator_count) {
692  string_length += separator_length * (array_length - 1);
693  } else {
694  // Not room for the separators within the maximal string length.
695  overflow = true;
696  }
697  } else {
698  // Nonempty separator and at least 2^31-1 separators necessary
699  // means that the string is too large to create.
700  STATIC_ASSERT(String::kMaxLength < 0x7fffffff);
701  overflow = true;
702  }
703  }
704  if (overflow) {
705  // Throw an exception if the resulting string is too large. See
706  // https://code.google.com/p/chromium/issues/detail?id=336820
707  // for details.
708  THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError());
709  }
710 
711  if (is_one_byte) {
712  Handle<SeqOneByteString> result = isolate->factory()
713  ->NewRawOneByteString(string_length)
714  .ToHandleChecked();
715  JoinSparseArrayWithSeparator<uint8_t>(
716  FixedArray::cast(elements_array->elements()), elements_length,
717  array_length, *separator,
718  Vector<uint8_t>(result->GetChars(), string_length));
719  return *result;
720  } else {
721  Handle<SeqTwoByteString> result = isolate->factory()
722  ->NewRawTwoByteString(string_length)
723  .ToHandleChecked();
724  JoinSparseArrayWithSeparator<uc16>(
725  FixedArray::cast(elements_array->elements()), elements_length,
726  array_length, *separator,
727  Vector<uc16>(result->GetChars(), string_length));
728  return *result;
729  }
730 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::FixedArray::get(), v8::internal::String::IsOneByteRepresentation(), v8::internal::String::kMaxLength, overflow, RUNTIME_ASSERT, STATIC_ASSERT(), and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [351/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SpecialArrayFunctions  )

Definition at line 1385 of file runtime.cc.

1385  {
1386  HandleScope scope(isolate);
1387  DCHECK(args.length() == 0);
1388  Handle<JSObject> holder =
1389  isolate->factory()->NewJSObject(isolate->object_function());
1390 
1391  InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop);
1392  InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush);
1393  InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift);
1394  InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift);
1395  InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice);
1396  InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
1397  InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat);
1398 
1399  return *holder;
1400 }
static void InstallBuiltin(Isolate *isolate, Handle< JSObject > holder, const char *name, Builtins::Name builtin_name)
Definition: runtime.cc:1374

References DCHECK, and InstallBuiltin().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [352/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StackGuard  )

Definition at line 4357 of file runtime.cc.

4357  {
4358  SealHandleScope shs(isolate);
4359  DCHECK(args.length() == 0);
4360 
4361  // First check if this is a real stack overflow.
4362  StackLimitCheck check(isolate);
4363  if (check.JsHasOverflowed()) {
4364  return isolate->StackOverflow();
4365  }
4366 
4367  return isolate->stack_guard()->HandleInterrupts();
4368 }

References DCHECK.

◆ RUNTIME_FUNCTION() [353/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StoreArrayLiteralElement  )

Definition at line 2537 of file runtime.cc.

2537  {
2538  HandleScope scope(isolate);
2539  RUNTIME_ASSERT(args.length() == 5);
2540  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
2541  CONVERT_SMI_ARG_CHECKED(store_index, 1);
2543  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 3);
2544  CONVERT_SMI_ARG_CHECKED(literal_index, 4);
2545 
2546  Object* raw_literal_cell = literals->get(literal_index);
2547  JSArray* boilerplate = NULL;
2548  if (raw_literal_cell->IsAllocationSite()) {
2549  AllocationSite* site = AllocationSite::cast(raw_literal_cell);
2550  boilerplate = JSArray::cast(site->transition_info());
2551  } else {
2552  boilerplate = JSArray::cast(raw_literal_cell);
2553  }
2554  Handle<JSArray> boilerplate_object(boilerplate);
2555  ElementsKind elements_kind = object->GetElementsKind();
2556  DCHECK(IsFastElementsKind(elements_kind));
2557  // Smis should never trigger transitions.
2558  DCHECK(!value->IsSmi());
2559 
2560  if (value->IsNumber()) {
2561  DCHECK(IsFastSmiElementsKind(elements_kind));
2562  ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind)
2566  boilerplate_object->GetElementsKind(), transitioned_kind)) {
2567  JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
2568  }
2569  JSObject::TransitionElementsKind(object, transitioned_kind);
2570  DCHECK(IsFastDoubleElementsKind(object->GetElementsKind()));
2571  FixedDoubleArray* double_array = FixedDoubleArray::cast(object->elements());
2572  HeapNumber* number = HeapNumber::cast(*value);
2573  double_array->set(store_index, number->Number());
2574  } else {
2575  if (!IsFastObjectElementsKind(elements_kind)) {
2576  ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind)
2578  : FAST_ELEMENTS;
2579  JSObject::TransitionElementsKind(object, transitioned_kind);
2580  ElementsKind boilerplate_elements_kind =
2581  boilerplate_object->GetElementsKind();
2582  if (IsMoreGeneralElementsKindTransition(boilerplate_elements_kind,
2583  transitioned_kind)) {
2584  JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
2585  }
2586  }
2587  FixedArray* object_array = FixedArray::cast(object->elements());
2588  object_array->set(store_index, *value);
2589  }
2590  return *object;
2591 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, FAST_HOLEY_ELEMENTS, IsFastDoubleElementsKind(), IsFastElementsKind(), IsFastHoleyElementsKind(), IsFastObjectElementsKind(), IsFastSmiElementsKind(), IsMoreGeneralElementsKindTransition(), literals(), NULL, v8::internal::Object::Number(), RUNTIME_ASSERT, v8::internal::FixedDoubleArray::set(), v8::internal::FixedArray::set(), and v8::internal::JSObject::TransitionElementsKind().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [354/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StoreLookupSlot  )

Definition at line 4246 of file runtime.cc.

4246  {
4247  HandleScope scope(isolate);
4248  DCHECK(args.length() == 4);
4249 
4251  CONVERT_ARG_HANDLE_CHECKED(Context, context, 1);
4252  CONVERT_ARG_HANDLE_CHECKED(String, name, 2);
4253  CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 3);
4254 
4255  int index;
4256  PropertyAttributes attributes;
4258  BindingFlags binding_flags;
4259  Handle<Object> holder =
4260  context->Lookup(name, flags, &index, &attributes, &binding_flags);
4261  // In case of JSProxy, an exception might have been thrown.
4262  if (isolate->has_pending_exception()) return isolate->heap()->exception();
4263 
4264  // The property was found in a context slot.
4265  if (index >= 0) {
4266  if ((attributes & READ_ONLY) == 0) {
4267  Handle<Context>::cast(holder)->set(index, *value);
4268  } else if (strict_mode == STRICT) {
4269  // Setting read only property in strict mode.
4271  isolate,
4272  NewTypeError("strict_cannot_assign", HandleVector(&name, 1)));
4273  }
4274  return *value;
4275  }
4276 
4277  // Slow case: The property is not in a context slot. It is either in a
4278  // context extension object, a property of the subject of a with, or a
4279  // property of the global object.
4280  Handle<JSReceiver> object;
4281  if (attributes != ABSENT) {
4282  // The property exists on the holder.
4283  object = Handle<JSReceiver>::cast(holder);
4284  } else if (strict_mode == STRICT) {
4285  // If absent in strict mode: throw.
4287  isolate, NewReferenceError("not_defined", HandleVector(&name, 1)));
4288  } else {
4289  // If absent in sloppy mode: add the property to the global object.
4290  object = Handle<JSReceiver>(context->global_object());
4291  }
4292 
4294  isolate, Object::SetProperty(object, name, value, strict_mode));
4295 
4296  return *value;
4297 }

References ABSENT, v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_STRICT_MODE_ARG_CHECKED, DCHECK, v8::internal::anonymous_namespace{flags.cc}::flags, FOLLOW_CHAINS, HandleVector(), name, READ_ONLY, RETURN_FAILURE_ON_EXCEPTION, v8::internal::Object::SetProperty(), STRICT, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [355/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StoreToSuper_Sloppy  )

Definition at line 936 of file runtime.cc.

936  {
937  HandleScope scope(isolate);
938  DCHECK(args.length() == 4);
939  CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
940  CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
943 
944  return StoreToSuper(isolate, home_object, receiver, name, value, SLOPPY);
945 }
static Object * StoreToSuper(Isolate *isolate, Handle< JSObject > home_object, Handle< Object > receiver, Handle< Name > name, Handle< Object > value, StrictMode strict_mode)
Definition: runtime.cc:900

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, name, SLOPPY, and StoreToSuper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [356/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StoreToSuper_Strict  )

Definition at line 924 of file runtime.cc.

924  {
925  HandleScope scope(isolate);
926  DCHECK(args.length() == 4);
927  CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
928  CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
931 
932  return StoreToSuper(isolate, home_object, receiver, name, value, STRICT);
933 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, name, StoreToSuper(), and STRICT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [357/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringAdd  )

Definition at line 270 of file runtime-strings.cc.

270  {
271  HandleScope scope(isolate);
272  DCHECK(args.length() == 2);
273  CONVERT_ARG_HANDLE_CHECKED(String, str1, 0);
274  CONVERT_ARG_HANDLE_CHECKED(String, str2, 1);
275  isolate->counters()->string_add_runtime()->Increment();
276  Handle<String> result;
278  isolate, result, isolate->factory()->NewConsString(str1, str2));
279  return *result;
280 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [358/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringBuilderConcat  )

Definition at line 446 of file runtime-strings.cc.

446  {
447  HandleScope scope(isolate);
448  DCHECK(args.length() == 3);
449  CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
450  int32_t array_length;
451  if (!args[1]->ToInt32(&array_length)) {
452  THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError());
453  }
454  CONVERT_ARG_HANDLE_CHECKED(String, special, 2);
455 
456  size_t actual_array_length = 0;
458  TryNumberToSize(isolate, array->length(), &actual_array_length));
459  RUNTIME_ASSERT(array_length >= 0);
460  RUNTIME_ASSERT(static_cast<size_t>(array_length) <= actual_array_length);
461 
462  // This assumption is used by the slice encoding in one or two smis.
463  DCHECK(Smi::kMaxValue >= String::kMaxLength);
464 
465  RUNTIME_ASSERT(array->HasFastElements());
466  JSObject::EnsureCanContainHeapObjectElements(array);
467 
468  int special_length = special->length();
469  if (!array->HasFastObjectElements()) {
470  return isolate->Throw(isolate->heap()->illegal_argument_string());
471  }
472 
473  int length;
474  bool one_byte = special->HasOnlyOneByteChars();
475 
476  {
478  FixedArray* fixed_array = FixedArray::cast(array->elements());
479  if (fixed_array->length() < array_length) {
480  array_length = fixed_array->length();
481  }
482 
483  if (array_length == 0) {
484  return isolate->heap()->empty_string();
485  } else if (array_length == 1) {
486  Object* first = fixed_array->get(0);
487  if (first->IsString()) return first;
488  }
489  length = StringBuilderConcatLength(special_length, fixed_array,
490  array_length, &one_byte);
491  }
492 
493  if (length == -1) {
494  return isolate->Throw(isolate->heap()->illegal_argument_string());
495  }
496 
497  if (one_byte) {
498  Handle<SeqOneByteString> answer;
500  isolate, answer, isolate->factory()->NewRawOneByteString(length));
501  StringBuilderConcatHelper(*special, answer->GetChars(),
502  FixedArray::cast(array->elements()),
503  array_length);
504  return *answer;
505  } else {
506  Handle<SeqTwoByteString> answer;
508  isolate, answer, isolate->factory()->NewRawTwoByteString(length));
509  StringBuilderConcatHelper(*special, answer->GetChars(),
510  FixedArray::cast(array->elements()),
511  array_length);
512  return *answer;
513  }
514 }
static void StringBuilderConcatHelper(String *special, sinkchar *sink, FixedArray *fixed_array, int array_length)
static int StringBuilderConcatLength(int special_length, FixedArray *fixed_array, int array_length, bool *one_byte)

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSObject::EnsureCanContainHeapObjectElements(), v8::internal::FixedArray::get(), v8::internal::String::kMaxLength, v8::internal::Smi::kMaxValue, v8::internal::FixedArrayBase::length(), RUNTIME_ASSERT, StringBuilderConcatHelper(), StringBuilderConcatLength(), THROW_NEW_ERROR_RETURN_FAILURE, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [359/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringBuilderJoin  )

Definition at line 517 of file runtime-strings.cc.

517  {
518  HandleScope scope(isolate);
519  DCHECK(args.length() == 3);
520  CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
521  int32_t array_length;
522  if (!args[1]->ToInt32(&array_length)) {
523  THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError());
524  }
525  CONVERT_ARG_HANDLE_CHECKED(String, separator, 2);
526  RUNTIME_ASSERT(array->HasFastObjectElements());
527  RUNTIME_ASSERT(array_length >= 0);
528 
529  Handle<FixedArray> fixed_array(FixedArray::cast(array->elements()));
530  if (fixed_array->length() < array_length) {
531  array_length = fixed_array->length();
532  }
533 
534  if (array_length == 0) {
535  return isolate->heap()->empty_string();
536  } else if (array_length == 1) {
537  Object* first = fixed_array->get(0);
538  RUNTIME_ASSERT(first->IsString());
539  return first;
540  }
541 
542  int separator_length = separator->length();
543  RUNTIME_ASSERT(separator_length > 0);
544  int max_nof_separators =
545  (String::kMaxLength + separator_length - 1) / separator_length;
546  if (max_nof_separators < (array_length - 1)) {
547  THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError());
548  }
549  int length = (array_length - 1) * separator_length;
550  for (int i = 0; i < array_length; i++) {
551  Object* element_obj = fixed_array->get(i);
552  RUNTIME_ASSERT(element_obj->IsString());
553  String* element = String::cast(element_obj);
554  int increment = element->length();
555  if (increment > String::kMaxLength - length) {
556  STATIC_ASSERT(String::kMaxLength < kMaxInt);
557  length = kMaxInt; // Provoke exception;
558  break;
559  }
560  length += increment;
561  }
562 
563  Handle<SeqTwoByteString> answer;
565  isolate, answer, isolate->factory()->NewRawTwoByteString(length));
566 
568 
569  uc16* sink = answer->GetChars();
570 #ifdef DEBUG
571  uc16* end = sink + length;
572 #endif
573 
574  RUNTIME_ASSERT(fixed_array->get(0)->IsString());
575  String* first = String::cast(fixed_array->get(0));
576  String* separator_raw = *separator;
577  int first_length = first->length();
578  String::WriteToFlat(first, sink, 0, first_length);
579  sink += first_length;
580 
581  for (int i = 1; i < array_length; i++) {
582  DCHECK(sink + separator_length <= end);
583  String::WriteToFlat(separator_raw, sink, 0, separator_length);
584  sink += separator_length;
585 
586  RUNTIME_ASSERT(fixed_array->get(i)->IsString());
587  String* element = String::cast(fixed_array->get(i));
588  int element_length = element->length();
589  DCHECK(sink + element_length <= end);
590  String::WriteToFlat(element, sink, 0, element_length);
591  sink += element_length;
592  }
593  DCHECK(sink == end);
594 
595  // Use %_FastOneByteArrayJoin instead.
596  DCHECK(!answer->IsOneByteRepresentation());
597  return *answer;
598 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, kMaxInt, v8::internal::String::kMaxLength, v8::internal::String::length(), RUNTIME_ASSERT, STATIC_ASSERT(), THROW_NEW_ERROR_RETURN_FAILURE, and v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [360/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringCharCodeAtRT  )

Definition at line 345 of file runtime-strings.cc.

345  {
346  HandleScope handle_scope(isolate);
347  DCHECK(args.length() == 2);
348 
349  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
350  CONVERT_NUMBER_CHECKED(uint32_t, i, Uint32, args[1]);
351 
352  // Flatten the string. If someone wants to get a char at an index
353  // in a cons string, it is likely that more indices will be
354  // accessed.
355  subject = String::Flatten(subject);
356 
357  if (i >= static_cast<uint32_t>(subject->length())) {
358  return isolate->heap()->nan_value();
359  }
360 
361  return Smi::FromInt(subject->Get(i));
362 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::String::Flatten(), and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [361/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringCompare  )

Definition at line 377 of file runtime-strings.cc.

377  {
378  HandleScope handle_scope(isolate);
379  DCHECK(args.length() == 2);
380 
381  CONVERT_ARG_HANDLE_CHECKED(String, x, 0);
382  CONVERT_ARG_HANDLE_CHECKED(String, y, 1);
383 
384  isolate->counters()->string_compare_runtime()->Increment();
385 
386  // A few fast case tests before we flatten.
387  if (x.is_identical_to(y)) return Smi::FromInt(EQUAL);
388  if (y->length() == 0) {
389  if (x->length() == 0) return Smi::FromInt(EQUAL);
390  return Smi::FromInt(GREATER);
391  } else if (x->length() == 0) {
392  return Smi::FromInt(LESS);
393  }
394 
395  int d = x->Get(0) - y->Get(0);
396  if (d < 0)
397  return Smi::FromInt(LESS);
398  else if (d > 0)
399  return Smi::FromInt(GREATER);
400 
401  // Slow case.
402  x = String::Flatten(x);
403  y = String::Flatten(y);
404 
406  Object* equal_prefix_result = Smi::FromInt(EQUAL);
407  int prefix_length = x->length();
408  if (y->length() < prefix_length) {
409  prefix_length = y->length();
410  equal_prefix_result = Smi::FromInt(GREATER);
411  } else if (y->length() > prefix_length) {
412  equal_prefix_result = Smi::FromInt(LESS);
413  }
414  int r;
415  String::FlatContent x_content = x->GetFlatContent();
416  String::FlatContent y_content = y->GetFlatContent();
417  if (x_content.IsOneByte()) {
418  Vector<const uint8_t> x_chars = x_content.ToOneByteVector();
419  if (y_content.IsOneByte()) {
420  Vector<const uint8_t> y_chars = y_content.ToOneByteVector();
421  r = CompareChars(x_chars.start(), y_chars.start(), prefix_length);
422  } else {
423  Vector<const uc16> y_chars = y_content.ToUC16Vector();
424  r = CompareChars(x_chars.start(), y_chars.start(), prefix_length);
425  }
426  } else {
427  Vector<const uc16> x_chars = x_content.ToUC16Vector();
428  if (y_content.IsOneByte()) {
429  Vector<const uint8_t> y_chars = y_content.ToOneByteVector();
430  r = CompareChars(x_chars.start(), y_chars.start(), prefix_length);
431  } else {
432  Vector<const uc16> y_chars = y_content.ToUC16Vector();
433  r = CompareChars(x_chars.start(), y_chars.start(), prefix_length);
434  }
435  }
436  Object* result;
437  if (r == 0) {
438  result = equal_prefix_result;
439  } else {
440  result = (r < 0) ? Smi::FromInt(LESS) : Smi::FromInt(GREATER);
441  }
442  return result;
443 }

References CompareChars(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, EQUAL, v8::internal::String::Flatten(), v8::internal::Smi::FromInt(), GREATER, v8::internal::String::FlatContent::IsOneByte(), LESS, v8::internal::Vector< T >::start(), v8::internal::String::FlatContent::ToOneByteVector(), v8::internal::String::FlatContent::ToUC16Vector(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [362/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringEquals  )

Definition at line 1167 of file runtime-strings.cc.

1167  {
1168  HandleScope handle_scope(isolate);
1169  DCHECK(args.length() == 2);
1170 
1171  CONVERT_ARG_HANDLE_CHECKED(String, x, 0);
1172  CONVERT_ARG_HANDLE_CHECKED(String, y, 1);
1173 
1174  bool not_equal = !String::Equals(x, y);
1175  // This is slightly convoluted because the value that signifies
1176  // equality is 0 and inequality is 1 so we have to negate the result
1177  // from String::Equals.
1178  DCHECK(not_equal == 0 || not_equal == 1);
1179  STATIC_ASSERT(EQUAL == 0);
1180  STATIC_ASSERT(NOT_EQUAL == 1);
1181  return Smi::FromInt(not_equal);
1182 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, EQUAL, v8::internal::String::Equals(), v8::internal::Smi::FromInt(), not_equal, NOT_EQUAL, STATIC_ASSERT(), and v8::base::internal::y.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [363/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringIndexOf  )

Definition at line 92 of file runtime-strings.cc.

92  {
93  HandleScope scope(isolate);
94  DCHECK(args.length() == 3);
95 
96  CONVERT_ARG_HANDLE_CHECKED(String, sub, 0);
97  CONVERT_ARG_HANDLE_CHECKED(String, pat, 1);
99 
100  uint32_t start_index;
101  if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1);
102 
103  RUNTIME_ASSERT(start_index <= static_cast<uint32_t>(sub->length()));
104  int position = Runtime::StringMatch(isolate, sub, pat, start_index);
105  return Smi::FromInt(position);
106 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), RUNTIME_ASSERT, and v8::internal::Runtime::StringMatch().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [364/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringLastIndexOf  )

Definition at line 143 of file runtime-strings.cc.

143  {
144  HandleScope scope(isolate);
145  DCHECK(args.length() == 3);
146 
147  CONVERT_ARG_HANDLE_CHECKED(String, sub, 0);
148  CONVERT_ARG_HANDLE_CHECKED(String, pat, 1);
150 
151  uint32_t start_index;
152  if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1);
153 
154  uint32_t pat_length = pat->length();
155  uint32_t sub_length = sub->length();
156 
157  if (start_index + pat_length > sub_length) {
158  start_index = sub_length - pat_length;
159  }
160 
161  if (pat_length == 0) {
162  return Smi::FromInt(start_index);
163  }
164 
165  sub = String::Flatten(sub);
166  pat = String::Flatten(pat);
167 
168  int position = -1;
169  DisallowHeapAllocation no_gc; // ensure vectors stay valid
170 
171  String::FlatContent sub_content = sub->GetFlatContent();
172  String::FlatContent pat_content = pat->GetFlatContent();
173 
174  if (pat_content.IsOneByte()) {
175  Vector<const uint8_t> pat_vector = pat_content.ToOneByteVector();
176  if (sub_content.IsOneByte()) {
177  position = StringMatchBackwards(sub_content.ToOneByteVector(), pat_vector,
178  start_index);
179  } else {
180  position = StringMatchBackwards(sub_content.ToUC16Vector(), pat_vector,
181  start_index);
182  }
183  } else {
184  Vector<const uc16> pat_vector = pat_content.ToUC16Vector();
185  if (sub_content.IsOneByte()) {
186  position = StringMatchBackwards(sub_content.ToOneByteVector(), pat_vector,
187  start_index);
188  } else {
189  position = StringMatchBackwards(sub_content.ToUC16Vector(), pat_vector,
190  start_index);
191  }
192  }
193 
194  return Smi::FromInt(position);
195 }
static int StringMatchBackwards(Vector< const schar > subject, Vector< const pchar > pattern, int idx)

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), v8::internal::Smi::FromInt(), v8::internal::String::FlatContent::IsOneByte(), StringMatchBackwards(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [365/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringLocaleCompare  )

Definition at line 198 of file runtime-strings.cc.

198  {
199  HandleScope handle_scope(isolate);
200  DCHECK(args.length() == 2);
201 
202  CONVERT_ARG_HANDLE_CHECKED(String, str1, 0);
203  CONVERT_ARG_HANDLE_CHECKED(String, str2, 1);
204 
205  if (str1.is_identical_to(str2)) return Smi::FromInt(0); // Equal.
206  int str1_length = str1->length();
207  int str2_length = str2->length();
208 
209  // Decide trivial cases without flattening.
210  if (str1_length == 0) {
211  if (str2_length == 0) return Smi::FromInt(0); // Equal.
212  return Smi::FromInt(-str2_length);
213  } else {
214  if (str2_length == 0) return Smi::FromInt(str1_length);
215  }
216 
217  int end = str1_length < str2_length ? str1_length : str2_length;
218 
219  // No need to flatten if we are going to find the answer on the first
220  // character. At this point we know there is at least one character
221  // in each string, due to the trivial case handling above.
222  int d = str1->Get(0) - str2->Get(0);
223  if (d != 0) return Smi::FromInt(d);
224 
225  str1 = String::Flatten(str1);
226  str2 = String::Flatten(str2);
227 
229  String::FlatContent flat1 = str1->GetFlatContent();
230  String::FlatContent flat2 = str2->GetFlatContent();
231 
232  for (int i = 0; i < end; i++) {
233  if (flat1.Get(i) != flat2.Get(i)) {
234  return Smi::FromInt(flat1.Get(i) - flat2.Get(i));
235  }
236  }
237 
238  return Smi::FromInt(str1_length - str2_length);
239 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), v8::internal::Smi::FromInt(), and v8::internal::String::FlatContent::Get().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [366/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringMatch  )

Definition at line 291 of file runtime-strings.cc.

291  {
292  HandleScope handles(isolate);
293  DCHECK(args.length() == 3);
294 
295  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
296  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 1);
297  CONVERT_ARG_HANDLE_CHECKED(JSArray, regexp_info, 2);
298 
299  RUNTIME_ASSERT(regexp_info->HasFastObjectElements());
300 
301  RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate);
302  if (global_cache.HasException()) return isolate->heap()->exception();
303 
304  int capture_count = regexp->CaptureCount();
305 
306  ZoneScope zone_scope(isolate->runtime_zone());
307  ZoneList<int> offsets(8, zone_scope.zone());
308 
309  while (true) {
310  int32_t* match = global_cache.FetchNext();
311  if (match == NULL) break;
312  offsets.Add(match[0], zone_scope.zone()); // start
313  offsets.Add(match[1], zone_scope.zone()); // end
314  }
315 
316  if (global_cache.HasException()) return isolate->heap()->exception();
317 
318  if (offsets.length() == 0) {
319  // Not a single match.
320  return isolate->heap()->null_value();
321  }
322 
323  RegExpImpl::SetLastMatchInfo(regexp_info, subject, capture_count,
324  global_cache.LastSuccessfulMatch());
325 
326  int matches = offsets.length() / 2;
327  Handle<FixedArray> elements = isolate->factory()->NewFixedArray(matches);
328  Handle<String> substring =
329  isolate->factory()->NewSubString(subject, offsets.at(0), offsets.at(1));
330  elements->set(0, *substring);
331  for (int i = 1; i < matches; i++) {
332  HandleScope temp_scope(isolate);
333  int from = offsets.at(i * 2);
334  int to = offsets.at(i * 2 + 1);
335  Handle<String> substring =
336  isolate->factory()->NewProperSubString(subject, from, to);
337  elements->set(i, *substring);
338  }
339  Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(elements);
340  result->set_length(Smi::FromInt(matches));
341  return *result;
342 }

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), NULL, RUNTIME_ASSERT, v8::internal::RegExpImpl::SetLastMatchInfo(), to(), and v8::internal::ZoneScope::zone().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [367/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringParseFloat  )

Definition at line 227 of file runtime-numbers.cc.

227  {
228  HandleScope shs(isolate);
229  DCHECK(args.length() == 1);
230  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
231 
232  subject = String::Flatten(subject);
233  double value = StringToDouble(isolate->unicode_cache(), *subject,
234  ALLOW_TRAILING_JUNK, base::OS::nan_value());
235 
236  return *isolate->factory()->NewNumber(value);
237 }
double StringToDouble(UnicodeCache *unicode_cache, const char *str, int flags, double empty_string_val)
Definition: conversions.cc:70

References ALLOW_TRAILING_JUNK, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), v8::base::OS::nan_value(), and StringToDouble().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [368/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringParseInt  )

Definition at line 200 of file runtime-numbers.cc.

200  {
201  HandleScope handle_scope(isolate);
202  DCHECK(args.length() == 2);
203  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
204  CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]);
205  RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36));
206 
207  subject = String::Flatten(subject);
208  double value;
209 
210  {
212  String::FlatContent flat = subject->GetFlatContent();
213 
214  // ECMA-262 section 15.1.2.3, empty string is NaN
215  if (flat.IsOneByte()) {
216  value =
217  StringToInt(isolate->unicode_cache(), flat.ToOneByteVector(), radix);
218  } else {
219  value = StringToInt(isolate->unicode_cache(), flat.ToUC16Vector(), radix);
220  }
221  }
222 
223  return *isolate->factory()->NewNumber(value);
224 }
double StringToInt(UnicodeCache *unicode_cache, Vector< const uint8_t > vector, int radix)
Definition: conversions.cc:105

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::String::Flatten(), v8::internal::String::FlatContent::IsOneByte(), RUNTIME_ASSERT, StringToInt(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [369/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringReplaceGlobalRegExpWithString  )

Definition at line 647 of file runtime-regexp.cc.

647  {
648  HandleScope scope(isolate);
649  DCHECK(args.length() == 4);
650 
651  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
652  CONVERT_ARG_HANDLE_CHECKED(String, replacement, 2);
653  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 1);
654  CONVERT_ARG_HANDLE_CHECKED(JSArray, last_match_info, 3);
655 
656  RUNTIME_ASSERT(regexp->GetFlags().is_global());
657  RUNTIME_ASSERT(last_match_info->HasFastObjectElements());
658 
659  subject = String::Flatten(subject);
660 
661  if (replacement->length() == 0) {
662  if (subject->HasOnlyOneByteChars()) {
663  return StringReplaceGlobalRegExpWithEmptyString<SeqOneByteString>(
664  isolate, subject, regexp, last_match_info);
665  } else {
666  return StringReplaceGlobalRegExpWithEmptyString<SeqTwoByteString>(
667  isolate, subject, regexp, last_match_info);
668  }
669  }
670 
671  replacement = String::Flatten(replacement);
672 
673  return StringReplaceGlobalRegExpWithString(isolate, subject, regexp,
674  replacement, last_match_info);
675 }
static MUST_USE_RESULT Object * StringReplaceGlobalRegExpWithString(Isolate *isolate, Handle< String > subject, Handle< JSRegExp > regexp, Handle< String > replacement, Handle< JSArray > last_match_info)

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), RUNTIME_ASSERT, and StringReplaceGlobalRegExpWithString().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [370/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringReplaceOneCharWithString  )

Definition at line 65 of file runtime-strings.cc.

65  {
66  HandleScope scope(isolate);
67  DCHECK(args.length() == 3);
68  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
69  CONVERT_ARG_HANDLE_CHECKED(String, search, 1);
70  CONVERT_ARG_HANDLE_CHECKED(String, replace, 2);
71 
72  // If the cons string tree is too deep, we simply abort the recursion and
73  // retry with a flattened subject string.
74  const int kRecursionLimit = 0x1000;
75  bool found = false;
76  Handle<String> result;
77  if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
78  kRecursionLimit).ToHandle(&result)) {
79  return *result;
80  }
81  if (isolate->has_pending_exception()) return isolate->heap()->exception();
82 
83  subject = String::Flatten(subject);
85  isolate, result,
86  StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
87  kRecursionLimit));
88  return *result;
89 }
MaybeHandle< String > StringReplaceOneCharWithString(Isolate *isolate, Handle< String > subject, Handle< String > search, Handle< String > replace, bool *found, int recursion_limit)

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::String::Flatten(), and StringReplaceOneCharWithString().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [371/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringSplit  )

Definition at line 678 of file runtime-regexp.cc.

678  {
679  HandleScope handle_scope(isolate);
680  DCHECK(args.length() == 3);
681  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
682  CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1);
683  CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[2]);
684  RUNTIME_ASSERT(limit > 0);
685 
686  int subject_length = subject->length();
687  int pattern_length = pattern->length();
688  RUNTIME_ASSERT(pattern_length > 0);
689 
690  if (limit == 0xffffffffu) {
691  Handle<Object> cached_answer(
692  RegExpResultsCache::Lookup(isolate->heap(), *subject, *pattern,
693  RegExpResultsCache::STRING_SPLIT_SUBSTRINGS),
694  isolate);
695  if (*cached_answer != Smi::FromInt(0)) {
696  // The cache FixedArray is a COW-array and can therefore be reused.
697  Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(
698  Handle<FixedArray>::cast(cached_answer));
699  return *result;
700  }
701  }
702 
703  // The limit can be very large (0xffffffffu), but since the pattern
704  // isn't empty, we can never create more parts than ~half the length
705  // of the subject.
706 
707  subject = String::Flatten(subject);
708  pattern = String::Flatten(pattern);
709 
710  static const int kMaxInitialListCapacity = 16;
711 
712  ZoneScope zone_scope(isolate->runtime_zone());
713 
714  // Find (up to limit) indices of separator and end-of-string in subject
715  int initial_capacity = Min<uint32_t>(kMaxInitialListCapacity, limit);
716  ZoneList<int> indices(initial_capacity, zone_scope.zone());
717 
718  FindStringIndicesDispatch(isolate, *subject, *pattern, &indices, limit,
719  zone_scope.zone());
720 
721  if (static_cast<uint32_t>(indices.length()) < limit) {
722  indices.Add(subject_length, zone_scope.zone());
723  }
724 
725  // The list indices now contains the end of each part to create.
726 
727  // Create JSArray of substrings separated by separator.
728  int part_count = indices.length();
729 
730  Handle<JSArray> result = isolate->factory()->NewJSArray(part_count);
731  JSObject::EnsureCanContainHeapObjectElements(result);
732  result->set_length(Smi::FromInt(part_count));
733 
734  DCHECK(result->HasFastObjectElements());
735 
736  if (part_count == 1 && indices.at(0) == subject_length) {
737  FixedArray::cast(result->elements())->set(0, *subject);
738  return *result;
739  }
740 
741  Handle<FixedArray> elements(FixedArray::cast(result->elements()));
742  int part_start = 0;
743  for (int i = 0; i < part_count; i++) {
744  HandleScope local_loop_handle(isolate);
745  int part_end = indices.at(i);
746  Handle<String> substring =
747  isolate->factory()->NewProperSubString(subject, part_start, part_end);
748  elements->set(i, *substring);
749  part_start = part_end + pattern_length;
750  }
751 
752  if (limit == 0xffffffffu) {
753  if (result->HasFastObjectElements()) {
754  RegExpResultsCache::Enter(isolate, subject, pattern, elements,
755  RegExpResultsCache::STRING_SPLIT_SUBSTRINGS);
756  }
757  }
758 
759  return *result;
760 }
void FindStringIndicesDispatch(Isolate *isolate, String *subject, String *pattern, ZoneList< int > *indices, unsigned int limit, Zone *zone)

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, DCHECK, v8::internal::JSObject::EnsureCanContainHeapObjectElements(), v8::internal::RegExpResultsCache::Enter(), FindStringIndicesDispatch(), v8::internal::String::Flatten(), v8::internal::Smi::FromInt(), v8::internal::RegExpResultsCache::Lookup(), RUNTIME_ASSERT, v8::internal::RegExpResultsCache::STRING_SPLIT_SUBSTRINGS, and v8::internal::ZoneScope::zone().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [372/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringToArray  )

Definition at line 766 of file runtime-strings.cc.

766  {
767  HandleScope scope(isolate);
768  DCHECK(args.length() == 2);
769  CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
770  CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
771 
772  s = String::Flatten(s);
773  const int length = static_cast<int>(Min<uint32_t>(s->length(), limit));
774 
775  Handle<FixedArray> elements;
776  int position = 0;
777  if (s->IsFlat() && s->IsOneByteRepresentation()) {
778  // Try using cached chars where possible.
779  elements = isolate->factory()->NewUninitializedFixedArray(length);
780 
782  String::FlatContent content = s->GetFlatContent();
783  if (content.IsOneByte()) {
784  Vector<const uint8_t> chars = content.ToOneByteVector();
785  // Note, this will initialize all elements (not only the prefix)
786  // to prevent GC from seeing partially initialized array.
787  position = CopyCachedOneByteCharsToArray(isolate->heap(), chars.start(),
788  *elements, length);
789  } else {
790  MemsetPointer(elements->data_start(), isolate->heap()->undefined_value(),
791  length);
792  }
793  } else {
794  elements = isolate->factory()->NewFixedArray(length);
795  }
796  for (int i = position; i < length; ++i) {
797  Handle<Object> str =
798  isolate->factory()->LookupSingleCharacterStringFromCode(s->Get(i));
799  elements->set(i, *str);
800  }
801 
802 #ifdef DEBUG
803  for (int i = 0; i < length; ++i) {
804  DCHECK(String::cast(elements->get(i))->length() == 1);
805  }
806 #endif
807 
808  return *isolate->factory()->NewJSArrayWithElements(elements);
809 }
static int CopyCachedOneByteCharsToArray(Heap *heap, const uint8_t *chars, FixedArray *elements, int length)

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_CHECKED, CopyCachedOneByteCharsToArray(), DCHECK, v8::internal::String::Flatten(), v8::internal::String::FlatContent::IsOneByte(), MemsetPointer(), v8::internal::Vector< T >::start(), and v8::internal::String::FlatContent::ToOneByteVector().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [373/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringToLowerCase  )

Definition at line 1090 of file runtime-strings.cc.

1090  {
1091  HandleScope scope(isolate);
1092  DCHECK(args.length() == 1);
1093  CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
1094  return ConvertCase(s, isolate, isolate->runtime_state()->to_lower_mapping());
1095 }
static MUST_USE_RESULT Object * ConvertCase(Handle< String > s, Isolate *isolate, unibrow::Mapping< Converter, 128 > *mapping)

References CONVERT_ARG_HANDLE_CHECKED, ConvertCase(), and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [374/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringToNumber  )

Definition at line 138 of file runtime-numbers.cc.

138  {
139  HandleScope handle_scope(isolate);
140  DCHECK(args.length() == 1);
141  CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
142  subject = String::Flatten(subject);
143 
144  // Fast case: short integer or some sorts of junk values.
145  if (subject->IsSeqOneByteString()) {
146  int len = subject->length();
147  if (len == 0) return Smi::FromInt(0);
148 
150  uint8_t const* data = Handle<SeqOneByteString>::cast(subject)->GetChars();
151  bool minus = (data[0] == '-');
152  int start_pos = (minus ? 1 : 0);
153 
154  if (start_pos == len) {
155  return isolate->heap()->nan_value();
156  } else if (data[start_pos] > '9') {
157  // Fast check for a junk value. A valid string may start from a
158  // whitespace, a sign ('+' or '-'), the decimal point, a decimal digit
159  // or the 'I' character ('Infinity'). All of that have codes not greater
160  // than '9' except 'I' and &nbsp;.
161  if (data[start_pos] != 'I' && data[start_pos] != 0xa0) {
162  return isolate->heap()->nan_value();
163  }
164  } else if (len - start_pos < 10 && AreDigits(data, start_pos, len)) {
165  // The maximal/minimal smi has 10 digits. If the string has less digits
166  // we know it will fit into the smi-data type.
167  int d = ParseDecimalInteger(data, start_pos, len);
168  if (minus) {
169  if (d == 0) return isolate->heap()->minus_zero_value();
170  d = -d;
171  } else if (!subject->HasHashCode() && len <= String::kMaxArrayIndexSize &&
172  (len == 1 || data[0] != '0')) {
173  // String hash is not calculated yet but all the data are present.
174  // Update the hash field to speed up sequential convertions.
175  uint32_t hash = StringHasher::MakeArrayIndexHash(d, len);
176 #ifdef DEBUG
177  subject->Hash(); // Force hash calculation.
178  DCHECK_EQ(static_cast<int>(subject->hash_field()),
179  static_cast<int>(hash));
180 #endif
181  subject->set_hash_field(hash);
182  }
183  return Smi::FromInt(d);
184  }
185  }
186 
187  // Slower case.
188  int flags = ALLOW_HEX;
189  if (FLAG_harmony_numeric_literals) {
190  // The current spec draft has not updated "ToNumber Applied to the String
191  // Type", https://bugs.ecmascript.org/show_bug.cgi?id=1584
193  }
194 
195  return *isolate->factory()->NewNumber(
196  StringToDouble(isolate->unicode_cache(), *subject, flags));
197 }
static int ParseDecimalInteger(const uint8_t *s, int from, int to)
static bool AreDigits(const uint8_t *s, int from, int to)

References ALLOW_BINARY, ALLOW_HEX, ALLOW_OCTAL, AreDigits(), v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, DCHECK_EQ, v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::String::Flatten(), v8::internal::Smi::FromInt(), v8::internal::String::kMaxArrayIndexSize, v8::internal::StringHasher::MakeArrayIndexHash(), ParseDecimalInteger(), and StringToDouble().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [375/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringToUpperCase  )

Definition at line 1098 of file runtime-strings.cc.

1098  {
1099  HandleScope scope(isolate);
1100  DCHECK(args.length() == 1);
1101  CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
1102  return ConvertCase(s, isolate, isolate->runtime_state()->to_upper_mapping());
1103 }

References CONVERT_ARG_HANDLE_CHECKED, ConvertCase(), and DCHECK.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [376/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_StringTrim  )

Definition at line 1106 of file runtime-strings.cc.

1106  {
1107  HandleScope scope(isolate);
1108  DCHECK(args.length() == 3);
1109 
1110  CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
1111  CONVERT_BOOLEAN_ARG_CHECKED(trimLeft, 1);
1112  CONVERT_BOOLEAN_ARG_CHECKED(trimRight, 2);
1113 
1114  string = String::Flatten(string);
1115  int length = string->length();
1116 
1117  int left = 0;
1118  UnicodeCache* unicode_cache = isolate->unicode_cache();
1119  if (trimLeft) {
1120  while (left < length &&
1121  unicode_cache->IsWhiteSpaceOrLineTerminator(string->Get(left))) {
1122  left++;
1123  }
1124  }
1125 
1126  int right = length;
1127  if (trimRight) {
1128  while (
1129  right > left &&
1130  unicode_cache->IsWhiteSpaceOrLineTerminator(string->Get(right - 1))) {
1131  right--;
1132  }
1133  }
1134 
1135  return *isolate->factory()->NewSubString(string, left, right);
1136 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_BOOLEAN_ARG_CHECKED, DCHECK, v8::internal::String::Flatten(), and v8::internal::UnicodeCache::IsWhiteSpaceOrLineTerminator().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [377/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SubString  )

Definition at line 242 of file runtime-strings.cc.

242  {
243  HandleScope scope(isolate);
244  DCHECK(args.length() == 3);
245 
246  CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
247  int start, end;
248  // We have a fast integer-only case here to avoid a conversion to double in
249  // the common case where from and to are Smis.
250  if (args[1]->IsSmi() && args[2]->IsSmi()) {
251  CONVERT_SMI_ARG_CHECKED(from_number, 1);
252  CONVERT_SMI_ARG_CHECKED(to_number, 2);
253  start = from_number;
254  end = to_number;
255  } else {
256  CONVERT_DOUBLE_ARG_CHECKED(from_number, 1);
257  CONVERT_DOUBLE_ARG_CHECKED(to_number, 2);
258  start = FastD2IChecked(from_number);
259  end = FastD2IChecked(to_number);
260  }
261  RUNTIME_ASSERT(end >= start);
262  RUNTIME_ASSERT(start >= 0);
263  RUNTIME_ASSERT(end <= string->length());
264  isolate->counters()->sub_string_runtime()->Increment();
265 
266  return *isolate->factory()->NewSubString(string, start, end);
267 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_DOUBLE_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, FastD2IChecked(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [378/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SuspendJSGeneratorObject  )

Definition at line 1712 of file runtime.cc.

1712  {
1713  HandleScope handle_scope(isolate);
1714  DCHECK(args.length() == 1);
1715  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator_object, 0);
1716 
1717  JavaScriptFrameIterator stack_iterator(isolate);
1718  JavaScriptFrame* frame = stack_iterator.frame();
1719  RUNTIME_ASSERT(frame->function()->shared()->is_generator());
1720  DCHECK_EQ(frame->function(), generator_object->function());
1721 
1722  // The caller should have saved the context and continuation already.
1723  DCHECK_EQ(generator_object->context(), Context::cast(frame->context()));
1724  DCHECK_LT(0, generator_object->continuation());
1725 
1726  // We expect there to be at least two values on the operand stack: the return
1727  // value of the yield expression, and the argument to this runtime call.
1728  // Neither of those should be saved.
1729  int operands_count = frame->ComputeOperandsCount();
1730  DCHECK_GE(operands_count, 2);
1731  operands_count -= 2;
1732 
1733  if (operands_count == 0) {
1734  // Although it's semantically harmless to call this function with an
1735  // operands_count of zero, it is also unnecessary.
1736  DCHECK_EQ(generator_object->operand_stack(),
1737  isolate->heap()->empty_fixed_array());
1738  DCHECK_EQ(generator_object->stack_handler_index(), -1);
1739  // If there are no operands on the stack, there shouldn't be a handler
1740  // active either.
1741  DCHECK(!frame->HasHandler());
1742  } else {
1743  int stack_handler_index = -1;
1744  Handle<FixedArray> operand_stack =
1745  isolate->factory()->NewFixedArray(operands_count);
1746  frame->SaveOperandStack(*operand_stack, &stack_handler_index);
1747  generator_object->set_operand_stack(*operand_stack);
1748  generator_object->set_stack_handler_index(stack_handler_index);
1749  }
1750 
1751  return isolate->heap()->undefined_value();
1752 }

References v8::internal::Context::cast(), v8::internal::JavaScriptFrame::ComputeOperandsCount(), v8::internal::StandardFrame::context(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, DCHECK_EQ, DCHECK_GE, DCHECK_LT, v8::internal::JavaScriptFrame::function(), RUNTIME_ASSERT, and v8::internal::JavaScriptFrame::SaveOperandStack().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [379/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SymbolDescription  )

Definition at line 547 of file runtime.cc.

547  {
548  SealHandleScope shs(isolate);
549  DCHECK(args.length() == 1);
550  CONVERT_ARG_CHECKED(Symbol, symbol, 0);
551  return symbol->name();
552 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [380/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SymbolIsPrivate  )

Definition at line 562 of file runtime.cc.

562  {
563  SealHandleScope shs(isolate);
564  DCHECK(args.length() == 1);
565  CONVERT_ARG_CHECKED(Symbol, symbol, 0);
566  return isolate->heap()->ToBoolean(symbol->is_private());
567 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [381/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SymbolRegistry  )

Definition at line 555 of file runtime.cc.

555  {
556  HandleScope scope(isolate);
557  DCHECK(args.length() == 0);
558  return *isolate->GetSymbolRegistry();
559 }

References DCHECK.

◆ RUNTIME_FUNCTION() [382/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_SystemBreak  )

Definition at line 249 of file runtime-test.cc.

249  {
250  SealHandleScope shs(isolate);
251  DCHECK(args.length() == 0);
252  base::OS::DebugBreak();
253  return isolate->heap()->undefined_value();
254 }

References DCHECK, and v8::base::OS::DebugBreak().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [383/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Throw  )

Definition at line 4300 of file runtime.cc.

4300  {
4301  HandleScope scope(isolate);
4302  DCHECK(args.length() == 1);
4303 
4304  return isolate->Throw(args[0]);
4305 }

References DCHECK.

◆ RUNTIME_FUNCTION() [384/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ThrowGeneratorStateError  )

Definition at line 1810 of file runtime.cc.

1810  {
1811  HandleScope scope(isolate);
1812  DCHECK(args.length() == 1);
1813  CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
1814  int continuation = generator->continuation();
1815  const char* message = continuation == JSGeneratorObject::kGeneratorClosed
1816  ? "generator_finished"
1817  : "generator_running";
1818  Vector<Handle<Object> > argv = HandleVector<Object>(NULL, 0);
1819  THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewError(message, argv));
1820 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::JSGeneratorObject::kGeneratorClosed, NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ RUNTIME_FUNCTION() [385/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ThrowNonMethodError  )

Definition at line 4332 of file runtime.cc.

4332  {
4333  HandleScope scope(isolate);
4334  DCHECK(args.length() == 0);
4336  isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0)));
4337 }

References DCHECK, NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ RUNTIME_FUNCTION() [386/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ThrowNotDateError  )

Definition at line 4349 of file runtime.cc.

4349  {
4350  HandleScope scope(isolate);
4351  DCHECK(args.length() == 0);
4353  isolate, NewTypeError("not_date_object", HandleVector<Object>(NULL, 0)));
4354 }

References DCHECK, NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ RUNTIME_FUNCTION() [387/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ThrowReferenceError  )

Definition at line 4323 of file runtime.cc.

4323  {
4324  HandleScope scope(isolate);
4325  DCHECK(args.length() == 1);
4328  isolate, NewReferenceError("not_defined", HandleVector(&name, 1)));
4329 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, HandleVector(), name, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [388/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ThrowUnsupportedSuperError  )

Definition at line 4340 of file runtime.cc.

4340  {
4341  HandleScope scope(isolate);
4342  DCHECK(args.length() == 0);
4344  isolate,
4345  NewReferenceError("unsupported_super", HandleVector<Object>(NULL, 0)));
4346 }

References DCHECK, NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

◆ RUNTIME_FUNCTION() [389/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ToBool  )

Definition at line 3181 of file runtime.cc.

3181  {
3182  SealHandleScope shs(isolate);
3183  DCHECK(args.length() == 1);
3184  CONVERT_ARG_CHECKED(Object, object, 0);
3185 
3186  return isolate->heap()->ToBoolean(object->BooleanValue());
3187 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [390/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ToFastProperties  )

Definition at line 3170 of file runtime.cc.

3170  {
3171  HandleScope scope(isolate);
3172  DCHECK(args.length() == 1);
3173  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
3174  if (object->IsJSObject() && !object->IsGlobalObject()) {
3175  JSObject::MigrateSlowToFast(Handle<JSObject>::cast(object), 0);
3176  }
3177  return *object;
3178 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::JSObject::MigrateSlowToFast().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [391/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_ToMethod  )

Definition at line 857 of file runtime.cc.

857  {
858  HandleScope scope(isolate);
859  DCHECK(args.length() == 2);
860  CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
861  CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
862  Handle<JSFunction> clone = JSFunction::CloneClosure(fun);
863  Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol());
864  JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol,
865  home_object, DONT_ENUM).Assert();
866  return *clone;
867 }

References v8::internal::JSFunction::CloneClosure(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, DONT_ENUM, and v8::internal::JSObject::SetOwnPropertyIgnoreAttributes().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [392/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TraceEnter  )

Definition at line 4408 of file runtime.cc.

4408  {
4409  SealHandleScope shs(isolate);
4410  DCHECK(args.length() == 0);
4411  PrintTransition(isolate, NULL);
4412  return isolate->heap()->undefined_value();
4413 }
static void PrintTransition(Isolate *isolate, Object *result)
Definition: runtime.cc:4385

References DCHECK, NULL, and PrintTransition().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [393/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TraceExit  )

Definition at line 4416 of file runtime.cc.

4416  {
4417  SealHandleScope shs(isolate);
4418  DCHECK(args.length() == 1);
4419  CONVERT_ARG_CHECKED(Object, obj, 0);
4420  PrintTransition(isolate, obj);
4421  return obj; // return TOS
4422 }

References CONVERT_ARG_CHECKED, DCHECK, and PrintTransition().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [394/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TransitionElementsKind  )

Definition at line 2497 of file runtime.cc.

2497  {
2498  HandleScope scope(isolate);
2499  RUNTIME_ASSERT(args.length() == 2);
2500  CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
2502  JSObject::TransitionElementsKind(array, map->elements_kind());
2503  return *array;
2504 }

References CONVERT_ARG_HANDLE_CHECKED, map, RUNTIME_ASSERT, and v8::internal::JSObject::TransitionElementsKind().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [395/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TruncateString  )

Definition at line 1139 of file runtime-strings.cc.

1139  {
1140  HandleScope scope(isolate);
1141  DCHECK(args.length() == 2);
1142  CONVERT_ARG_HANDLE_CHECKED(SeqString, string, 0);
1143  CONVERT_INT32_ARG_CHECKED(new_length, 1);
1144  RUNTIME_ASSERT(new_length >= 0);
1145  return *SeqString::Truncate(string, new_length);
1146 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_INT32_ARG_CHECKED, DCHECK, RUNTIME_ASSERT, and v8::internal::SeqString::Truncate().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [396/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TryInstallOptimizedCode  )

Definition at line 316 of file runtime-compiler.cc.

316  {
317  HandleScope scope(isolate);
318  DCHECK(args.length() == 1);
319  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
320 
321  // First check if this is a real stack overflow.
322  StackLimitCheck check(isolate);
323  if (check.JsHasOverflowed()) {
324  SealHandleScope shs(isolate);
325  return isolate->StackOverflow();
326  }
327 
328  isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
329  return (function->IsOptimized()) ? function->code()
330  : function->shared()->code();
331 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [397/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TryMigrateInstance  )

Definition at line 8458 of file runtime.cc.

8458  {
8459  HandleScope scope(isolate);
8460  DCHECK(args.length() == 1);
8461  CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
8462  if (!object->IsJSObject()) return Smi::FromInt(0);
8463  Handle<JSObject> js_object = Handle<JSObject>::cast(object);
8464  if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
8465  // This call must not cause lazy deopts, because it's called from deferred
8466  // code where we can't handle lazy deopts for lack of a suitable bailout
8467  // ID. So we just try migration and signal failure if necessary,
8468  // which will also trigger a deopt.
8469  if (!JSObject::TryMigrateInstance(js_object)) return Smi::FromInt(0);
8470  return *object;
8471 }

References v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), and v8::internal::JSObject::TryMigrateInstance().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [398/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TypedArrayGetBuffer  )

Definition at line 410 of file runtime-typedarray.cc.

410  {
411  HandleScope scope(isolate);
412  DCHECK(args.length() == 1);
413  CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0);
414  return *holder->GetBuffer();
415 }

References CONVERT_ARG_HANDLE_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [399/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TypedArrayInitialize  )

Definition at line 208 of file runtime-typedarray.cc.

208  {
209  HandleScope scope(isolate);
210  DCHECK(args.length() == 5);
211  CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0);
212  CONVERT_SMI_ARG_CHECKED(arrayId, 1);
213  CONVERT_ARG_HANDLE_CHECKED(Object, maybe_buffer, 2);
214  CONVERT_NUMBER_ARG_HANDLE_CHECKED(byte_offset_object, 3);
215  CONVERT_NUMBER_ARG_HANDLE_CHECKED(byte_length_object, 4);
216 
217  RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST &&
218  arrayId <= Runtime::ARRAY_ID_LAST);
219 
220  ExternalArrayType array_type = kExternalInt8Array; // Bogus initialization.
221  size_t element_size = 1; // Bogus initialization.
222  ElementsKind external_elements_kind =
223  EXTERNAL_INT8_ELEMENTS; // Bogus initialization.
224  ElementsKind fixed_elements_kind = INT8_ELEMENTS; // Bogus initialization.
225  Runtime::ArrayIdToTypeAndSize(arrayId, &array_type, &external_elements_kind,
226  &fixed_elements_kind, &element_size);
227  RUNTIME_ASSERT(holder->map()->elements_kind() == fixed_elements_kind);
228 
229  size_t byte_offset = 0;
230  size_t byte_length = 0;
231  RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_offset_object, &byte_offset));
232  RUNTIME_ASSERT(TryNumberToSize(isolate, *byte_length_object, &byte_length));
233 
234  if (maybe_buffer->IsJSArrayBuffer()) {
235  Handle<JSArrayBuffer> buffer = Handle<JSArrayBuffer>::cast(maybe_buffer);
236  size_t array_buffer_byte_length =
237  NumberToSize(isolate, buffer->byte_length());
238  RUNTIME_ASSERT(byte_offset <= array_buffer_byte_length);
239  RUNTIME_ASSERT(array_buffer_byte_length - byte_offset >= byte_length);
240  } else {
241  RUNTIME_ASSERT(maybe_buffer->IsNull());
242  }
243 
244  RUNTIME_ASSERT(byte_length % element_size == 0);
245  size_t length = byte_length / element_size;
246 
247  if (length > static_cast<unsigned>(Smi::kMaxValue)) {
249  isolate, NewRangeError("invalid_typed_array_length",
250  HandleVector<Object>(NULL, 0)));
251  }
252 
253  // All checks are done, now we can modify objects.
254 
255  DCHECK(holder->GetInternalFieldCount() ==
257  for (int i = 0; i < v8::ArrayBufferView::kInternalFieldCount; i++) {
258  holder->SetInternalField(i, Smi::FromInt(0));
259  }
260  Handle<Object> length_obj = isolate->factory()->NewNumberFromSize(length);
261  holder->set_length(*length_obj);
262  holder->set_byte_offset(*byte_offset_object);
263  holder->set_byte_length(*byte_length_object);
264 
265  if (!maybe_buffer->IsNull()) {
266  Handle<JSArrayBuffer> buffer = Handle<JSArrayBuffer>::cast(maybe_buffer);
267  holder->set_buffer(*buffer);
268  holder->set_weak_next(buffer->weak_first_view());
269  buffer->set_weak_first_view(*holder);
270 
271  Handle<ExternalArray> elements = isolate->factory()->NewExternalArray(
272  static_cast<int>(length), array_type,
273  static_cast<uint8_t*>(buffer->backing_store()) + byte_offset);
274  Handle<Map> map =
275  JSObject::GetElementsTransitionMap(holder, external_elements_kind);
276  JSObject::SetMapAndElements(holder, map, elements);
277  DCHECK(IsExternalArrayElementsKind(holder->map()->elements_kind()));
278  } else {
279  holder->set_buffer(Smi::FromInt(0));
280  holder->set_weak_next(isolate->heap()->undefined_value());
281  Handle<FixedTypedArrayBase> elements =
282  isolate->factory()->NewFixedTypedArray(static_cast<int>(length),
283  array_type);
284  holder->set_elements(*elements);
285  }
286  return isolate->heap()->undefined_value();
287 }
ExternalArrayType
Definition: v8.h:2217
@ kExternalInt8Array
Definition: v8.h:2218

References v8::internal::Runtime::ARRAY_ID_FIRST, v8::internal::Runtime::ARRAY_ID_LAST, v8::internal::Runtime::ArrayIdToTypeAndSize(), v8::internal::Handle< T >::cast(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, EXTERNAL_INT8_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::JSObject::GetElementsTransitionMap(), INT8_ELEMENTS, IsExternalArrayElementsKind(), v8::kExternalInt8Array, v8::ArrayBufferView::kInternalFieldCount, v8::internal::Smi::kMaxValue, map, NULL, NumberToSize(), RUNTIME_ASSERT, v8::internal::JSObject::SetMapAndElements(), THROW_NEW_ERROR_RETURN_FAILURE, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [400/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TypedArrayInitializeFromArrayLike  )

Definition at line 295 of file runtime-typedarray.cc.

295  {
296  HandleScope scope(isolate);
297  DCHECK(args.length() == 4);
298  CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0);
299  CONVERT_SMI_ARG_CHECKED(arrayId, 1);
301  CONVERT_NUMBER_ARG_HANDLE_CHECKED(length_obj, 3);
302 
303  RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST &&
304  arrayId <= Runtime::ARRAY_ID_LAST);
305 
306  ExternalArrayType array_type = kExternalInt8Array; // Bogus initialization.
307  size_t element_size = 1; // Bogus initialization.
308  ElementsKind external_elements_kind =
309  EXTERNAL_INT8_ELEMENTS; // Bogus intialization.
310  ElementsKind fixed_elements_kind = INT8_ELEMENTS; // Bogus initialization.
311  Runtime::ArrayIdToTypeAndSize(arrayId, &array_type, &external_elements_kind,
312  &fixed_elements_kind, &element_size);
313 
314  RUNTIME_ASSERT(holder->map()->elements_kind() == fixed_elements_kind);
315 
316  Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer();
317  if (source->IsJSTypedArray() &&
318  JSTypedArray::cast(*source)->type() == array_type) {
319  length_obj = Handle<Object>(JSTypedArray::cast(*source)->length(), isolate);
320  }
321  size_t length = 0;
322  RUNTIME_ASSERT(TryNumberToSize(isolate, *length_obj, &length));
323 
324  if ((length > static_cast<unsigned>(Smi::kMaxValue)) ||
325  (length > (kMaxInt / element_size))) {
327  isolate, NewRangeError("invalid_typed_array_length",
328  HandleVector<Object>(NULL, 0)));
329  }
330  size_t byte_length = length * element_size;
331 
332  DCHECK(holder->GetInternalFieldCount() ==
334  for (int i = 0; i < v8::ArrayBufferView::kInternalFieldCount; i++) {
335  holder->SetInternalField(i, Smi::FromInt(0));
336  }
337 
338  // NOTE: not initializing backing store.
339  // We assume that the caller of this function will initialize holder
340  // with the loop
341  // for(i = 0; i < length; i++) { holder[i] = source[i]; }
342  // We assume that the caller of this function is always a typed array
343  // constructor.
344  // If source is a typed array, this loop will always run to completion,
345  // so we are sure that the backing store will be initialized.
346  // Otherwise, the indexing operation might throw, so the loop will not
347  // run to completion and the typed array might remain partly initialized.
348  // However we further assume that the caller of this function is a typed array
349  // constructor, and the exception will propagate out of the constructor,
350  // therefore uninitialized memory will not be accessible by a user program.
351  //
352  // TODO(dslomov): revise this once we support subclassing.
353 
354  if (!Runtime::SetupArrayBufferAllocatingData(isolate, buffer, byte_length,
355  false)) {
357  isolate, NewRangeError("invalid_array_buffer_length",
358  HandleVector<Object>(NULL, 0)));
359  }
360 
361  holder->set_buffer(*buffer);
362  holder->set_byte_offset(Smi::FromInt(0));
363  Handle<Object> byte_length_obj(
364  isolate->factory()->NewNumberFromSize(byte_length));
365  holder->set_byte_length(*byte_length_obj);
366  holder->set_length(*length_obj);
367  holder->set_weak_next(buffer->weak_first_view());
368  buffer->set_weak_first_view(*holder);
369 
370  Handle<ExternalArray> elements = isolate->factory()->NewExternalArray(
371  static_cast<int>(length), array_type,
372  static_cast<uint8_t*>(buffer->backing_store()));
373  Handle<Map> map =
374  JSObject::GetElementsTransitionMap(holder, external_elements_kind);
375  JSObject::SetMapAndElements(holder, map, elements);
376 
377  if (source->IsJSTypedArray()) {
378  Handle<JSTypedArray> typed_array(JSTypedArray::cast(*source));
379 
380  if (typed_array->type() == holder->type()) {
381  uint8_t* backing_store =
382  static_cast<uint8_t*>(typed_array->GetBuffer()->backing_store());
383  size_t source_byte_offset =
384  NumberToSize(isolate, typed_array->byte_offset());
385  memcpy(buffer->backing_store(), backing_store + source_byte_offset,
386  byte_length);
387  return isolate->heap()->true_value();
388  }
389  }
390 
391  return isolate->heap()->false_value();
392 }

References v8::internal::Runtime::ARRAY_ID_FIRST, v8::internal::Runtime::ARRAY_ID_LAST, v8::internal::Runtime::ArrayIdToTypeAndSize(), CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, EXTERNAL_INT8_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::JSObject::GetElementsTransitionMap(), INT8_ELEMENTS, v8::kExternalInt8Array, v8::ArrayBufferView::kInternalFieldCount, kMaxInt, v8::internal::Smi::kMaxValue, map, NULL, NumberToSize(), RUNTIME_ASSERT, v8::internal::JSObject::SetMapAndElements(), v8::internal::Runtime::SetupArrayBufferAllocatingData(), THROW_NEW_ERROR_RETURN_FAILURE, and TryNumberToSize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [401/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TypedArrayMaxSizeInHeap  )

Definition at line 495 of file runtime-typedarray.cc.

495  {
496  DCHECK(args.length() == 0);
497  DCHECK_OBJECT_SIZE(FLAG_typed_array_max_size_in_heap +
498  FixedTypedArrayBase::kDataOffset);
499  return Smi::FromInt(FLAG_typed_array_max_size_in_heap);
500 }
#define DCHECK_OBJECT_SIZE(size)
Definition: spaces.h:84

References DCHECK, DCHECK_OBJECT_SIZE, v8::internal::Smi::FromInt(), and v8::internal::FixedTypedArrayBase::kDataOffset.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [402/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_TypedArraySetFastCases  )

Definition at line 433 of file runtime-typedarray.cc.

433  {
434  HandleScope scope(isolate);
435  DCHECK(args.length() == 3);
436  if (!args[0]->IsJSTypedArray()) {
438  isolate,
439  NewTypeError("not_typed_array", HandleVector<Object>(NULL, 0)));
440  }
441 
442  if (!args[1]->IsJSTypedArray())
443  return Smi::FromInt(TYPED_ARRAY_SET_NON_TYPED_ARRAY);
444 
445  CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, target_obj, 0);
446  CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, source_obj, 1);
447  CONVERT_NUMBER_ARG_HANDLE_CHECKED(offset_obj, 2);
448 
449  Handle<JSTypedArray> target(JSTypedArray::cast(*target_obj));
450  Handle<JSTypedArray> source(JSTypedArray::cast(*source_obj));
451  size_t offset = 0;
452  RUNTIME_ASSERT(TryNumberToSize(isolate, *offset_obj, &offset));
453  size_t target_length = NumberToSize(isolate, target->length());
454  size_t source_length = NumberToSize(isolate, source->length());
455  size_t target_byte_length = NumberToSize(isolate, target->byte_length());
456  size_t source_byte_length = NumberToSize(isolate, source->byte_length());
457  if (offset > target_length || offset + source_length > target_length ||
458  offset + source_length < offset) { // overflow
460  isolate, NewRangeError("typed_array_set_source_too_large",
461  HandleVector<Object>(NULL, 0)));
462  }
463 
464  size_t target_offset = NumberToSize(isolate, target->byte_offset());
465  size_t source_offset = NumberToSize(isolate, source->byte_offset());
466  uint8_t* target_base =
467  static_cast<uint8_t*>(target->GetBuffer()->backing_store()) +
468  target_offset;
469  uint8_t* source_base =
470  static_cast<uint8_t*>(source->GetBuffer()->backing_store()) +
471  source_offset;
472 
473  // Typed arrays of the same type: use memmove.
474  if (target->type() == source->type()) {
475  memmove(target_base + offset * target->element_size(), source_base,
476  source_byte_length);
477  return Smi::FromInt(TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE);
478  }
479 
480  // Typed arrays of different types over the same backing store
481  if ((source_base <= target_base &&
482  source_base + source_byte_length > target_base) ||
483  (target_base <= source_base &&
484  target_base + target_byte_length > source_base)) {
485  // We do not support overlapping ArrayBuffers
486  DCHECK(target->GetBuffer()->backing_store() ==
487  source->GetBuffer()->backing_store());
488  return Smi::FromInt(TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING);
489  } else { // Non-overlapping typed arrays
490  return Smi::FromInt(TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING);
491  }
492 }

References CONVERT_ARG_HANDLE_CHECKED, CONVERT_NUMBER_ARG_HANDLE_CHECKED, DCHECK, v8::internal::Smi::FromInt(), NULL, NumberToSize(), RUNTIME_ASSERT, THROW_NEW_ERROR_RETURN_FAILURE, TryNumberToSize(), TYPED_ARRAY_SET_NON_TYPED_ARRAY, TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING, TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING, and TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [403/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_Typeof  )

Definition at line 3192 of file runtime.cc.

3192  {
3193  SealHandleScope shs(isolate);
3194  DCHECK(args.length() == 1);
3195  CONVERT_ARG_CHECKED(Object, obj, 0);
3196  if (obj->IsNumber()) return isolate->heap()->number_string();
3197  HeapObject* heap_obj = HeapObject::cast(obj);
3198 
3199  // typeof an undetectable object is 'undefined'
3200  if (heap_obj->map()->is_undetectable()) {
3201  return isolate->heap()->undefined_string();
3202  }
3203 
3204  InstanceType instance_type = heap_obj->map()->instance_type();
3205  if (instance_type < FIRST_NONSTRING_TYPE) {
3206  return isolate->heap()->string_string();
3207  }
3208 
3209  switch (instance_type) {
3210  case ODDBALL_TYPE:
3211  if (heap_obj->IsTrue() || heap_obj->IsFalse()) {
3212  return isolate->heap()->boolean_string();
3213  }
3214  if (heap_obj->IsNull()) {
3215  return isolate->heap()->object_string();
3216  }
3217  DCHECK(heap_obj->IsUndefined());
3218  return isolate->heap()->undefined_string();
3219  case SYMBOL_TYPE:
3220  return isolate->heap()->symbol_string();
3221  case JS_FUNCTION_TYPE:
3223  return isolate->heap()->function_string();
3224  default:
3225  // For any kind of object not handled above, the spec rule for
3226  // host objects gives that it is okay to return "object"
3227  return isolate->heap()->object_string();
3228  }
3229 }

References CONVERT_ARG_CHECKED, DCHECK, FIRST_NONSTRING_TYPE, v8::internal::Map::instance_type(), v8::internal::Map::is_undetectable(), JS_FUNCTION_PROXY_TYPE, JS_FUNCTION_TYPE, v8::internal::HeapObject::map(), ODDBALL_TYPE, and SYMBOL_TYPE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [404/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_UnblockConcurrentRecompilation  )

Definition at line 133 of file runtime-test.cc.

133  {
134  DCHECK(args.length() == 0);
135  RUNTIME_ASSERT(FLAG_block_concurrent_recompilation);
136  RUNTIME_ASSERT(isolate->concurrent_recompilation_enabled());
137  isolate->optimizing_compiler_thread()->Unblock();
138  return isolate->heap()->undefined_value();
139 }

References DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [405/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_URIEscape  )

Definition at line 280 of file runtime-uri.cc.

280  {
281  HandleScope scope(isolate);
282  DCHECK(args.length() == 1);
283  CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
284  Handle<String> string = String::Flatten(source);
285  DCHECK(string->IsFlat());
286  Handle<String> result;
288  isolate, result, string->IsOneByteRepresentationUnderneath()
289  ? URIEscape::Escape<uint8_t>(isolate, source)
290  : URIEscape::Escape<uc16>(isolate, source));
291  return *result;
292 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::String::Flatten().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [406/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_URIUnescape  )

Definition at line 295 of file runtime-uri.cc.

295  {
296  HandleScope scope(isolate);
297  DCHECK(args.length() == 1);
298  CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
299  Handle<String> string = String::Flatten(source);
300  DCHECK(string->IsFlat());
301  Handle<String> result;
303  isolate, result, string->IsOneByteRepresentationUnderneath()
304  ? URIUnescape::Unescape<uint8_t>(isolate, source)
305  : URIUnescape::Unescape<uc16>(isolate, source));
306  return *result;
307 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, CONVERT_ARG_HANDLE_CHECKED, DCHECK, and v8::internal::String::Flatten().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [407/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_WeakCollectionDelete  )

Definition at line 279 of file runtime-collections.cc.

279  {
280  HandleScope scope(isolate);
281  DCHECK(args.length() == 2);
282  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
284  RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
285  Handle<ObjectHashTable> table(
286  ObjectHashTable::cast(weak_collection->table()));
287  RUNTIME_ASSERT(table->IsKey(*key));
288  bool was_present = false;
289  Handle<ObjectHashTable> new_table =
290  ObjectHashTable::Remove(table, key, &was_present);
291  weak_collection->set_table(*new_table);
292  return isolate->heap()->ToBoolean(was_present);
293 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::ObjectHashTable::Remove(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [408/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_WeakCollectionGet  )

Definition at line 251 of file runtime-collections.cc.

251  {
252  HandleScope scope(isolate);
253  DCHECK(args.length() == 2);
254  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
256  RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
257  Handle<ObjectHashTable> table(
258  ObjectHashTable::cast(weak_collection->table()));
259  RUNTIME_ASSERT(table->IsKey(*key));
260  Handle<Object> lookup(table->Lookup(key), isolate);
261  return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup;
262 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [409/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_WeakCollectionHas  )

Definition at line 265 of file runtime-collections.cc.

265  {
266  HandleScope scope(isolate);
267  DCHECK(args.length() == 2);
268  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
270  RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
271  Handle<ObjectHashTable> table(
272  ObjectHashTable::cast(weak_collection->table()));
273  RUNTIME_ASSERT(table->IsKey(*key));
274  Handle<Object> lookup(table->Lookup(key), isolate);
275  return isolate->heap()->ToBoolean(!lookup->IsTheHole());
276 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and RUNTIME_ASSERT.

◆ RUNTIME_FUNCTION() [410/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_WeakCollectionInitialize  )

Definition at line 243 of file runtime-collections.cc.

243  {
244  HandleScope scope(isolate);
245  DCHECK(args.length() == 1);
246  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
247  return *WeakCollectionInitialize(isolate, weak_collection);
248 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, and WeakCollectionInitialize().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [411/457]

v8::internal::RUNTIME_FUNCTION ( Runtime_WeakCollectionSet  )

Definition at line 296 of file runtime-collections.cc.

296  {
297  HandleScope scope(isolate);
298  DCHECK(args.length() == 3);
299  CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
301  RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
303  Handle<ObjectHashTable> table(
304  ObjectHashTable::cast(weak_collection->table()));
305  RUNTIME_ASSERT(table->IsKey(*key));
306  Handle<ObjectHashTable> new_table = ObjectHashTable::Put(table, key, value);
307  weak_collection->set_table(*new_table);
308  return *weak_collection;
309 }

References CONVERT_ARG_HANDLE_CHECKED, DCHECK, v8::internal::ObjectHashTable::Put(), and RUNTIME_ASSERT.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [412/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_Arguments  )

Definition at line 9089 of file runtime.cc.

9089  {
9090  SealHandleScope shs(isolate);
9091  return __RT_impl_Runtime_GetArgumentsProperty(args, isolate);
9092 }

◆ RUNTIME_FUNCTION() [413/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_ArgumentsLength  )

Definition at line 9080 of file runtime.cc.

9080  {
9081  SealHandleScope shs(isolate);
9082  DCHECK(args.length() == 0);
9083  JavaScriptFrameIterator it(isolate);
9084  JavaScriptFrame* frame = it.frame();
9085  return Smi::FromInt(frame->GetArgumentsLength());
9086 }

References DCHECK, v8::internal::Smi::FromInt(), and v8::internal::JavaScriptFrame::GetArgumentsLength().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [414/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_CallFunction  )

Definition at line 9074 of file runtime.cc.

9074  {
9075  SealHandleScope shs(isolate);
9076  return __RT_impl_Runtime_Call(args, isolate);
9077 }

◆ RUNTIME_FUNCTION() [415/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_ClassOf  )

Definition at line 9213 of file runtime.cc.

9213  {
9214  SealHandleScope shs(isolate);
9215  DCHECK(args.length() == 1);
9216  CONVERT_ARG_CHECKED(Object, obj, 0);
9217  if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
9218  return JSReceiver::cast(obj)->class_name();
9219 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [416/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_DateField  )

Definition at line 9115 of file runtime.cc.

9115  {
9116  SealHandleScope shs(isolate);
9117  DCHECK(args.length() == 2);
9118  CONVERT_ARG_CHECKED(Object, obj, 0);
9119  CONVERT_SMI_ARG_CHECKED(index, 1);
9120  if (!obj->IsJSDate()) {
9121  HandleScope scope(isolate);
9123  isolate,
9124  NewTypeError("not_date_object", HandleVector<Object>(NULL, 0)));
9125  }
9126  JSDate* date = JSDate::cast(obj);
9127  if (index == 0) return date->value();
9128  return JSDate::GetField(date, Smi::FromInt(index));
9129 }

References CONVERT_ARG_CHECKED, CONVERT_SMI_ARG_CHECKED, DCHECK, v8::internal::Smi::FromInt(), v8::internal::JSDate::GetField(), NULL, and THROW_NEW_ERROR_RETURN_FAILURE.

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [417/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_DebugIsActive  )

Definition at line 9231 of file runtime.cc.

9231  {
9232  SealHandleScope shs(isolate);
9233  return Smi::FromInt(isolate->debug()->is_active());
9234 }

References v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [418/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_FastOneByteArrayJoin  )

Definition at line 9194 of file runtime.cc.

9194  {
9195  SealHandleScope shs(isolate);
9196  DCHECK(args.length() == 2);
9197  return isolate->heap()->undefined_value();
9198 }

References DCHECK.

◆ RUNTIME_FUNCTION() [419/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_GeneratorNext  )

Definition at line 9201 of file runtime.cc.

9201  {
9202  UNREACHABLE(); // Optimization disabled in SetUpGenerators().
9203  return NULL;
9204 }

References NULL, and UNREACHABLE.

◆ RUNTIME_FUNCTION() [420/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_GeneratorThrow  )

Definition at line 9207 of file runtime.cc.

9207  {
9208  UNREACHABLE(); // Optimization disabled in SetUpGenerators().
9209  return NULL;
9210 }

References NULL, and UNREACHABLE.

◆ RUNTIME_FUNCTION() [421/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_GetCachedArrayIndex  )

Definition at line 9187 of file runtime.cc.

9187  {
9188  SealHandleScope shs(isolate);
9189  DCHECK(args.length() == 1);
9190  return isolate->heap()->undefined_value();
9191 }

References DCHECK.

◆ RUNTIME_FUNCTION() [422/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_GetFromCache  )

Definition at line 9222 of file runtime.cc.

9222  {
9223  HandleScope scope(isolate);
9224  DCHECK(args.length() == 2);
9225  CONVERT_SMI_ARG_CHECKED(id, 0);
9226  args[0] = isolate->native_context()->jsfunction_result_caches()->get(id);
9227  return __RT_impl_Runtime_GetFromCache(args, isolate);
9228 }

References CONVERT_SMI_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [423/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_HasCachedArrayIndex  )

Definition at line 9180 of file runtime.cc.

9180  {
9181  SealHandleScope shs(isolate);
9182  DCHECK(args.length() == 1);
9183  return isolate->heap()->false_value();
9184 }

References DCHECK.

◆ RUNTIME_FUNCTION() [424/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsArray  )

Definition at line 9049 of file runtime.cc.

9049  {
9050  SealHandleScope shs(isolate);
9051  DCHECK(args.length() == 1);
9052  CONVERT_ARG_CHECKED(Object, obj, 0);
9053  return isolate->heap()->ToBoolean(obj->IsJSArray());
9054 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [425/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsConstructCall  )

Definition at line 9065 of file runtime.cc.

9065  {
9066  SealHandleScope shs(isolate);
9067  DCHECK(args.length() == 0);
9068  JavaScriptFrameIterator it(isolate);
9069  JavaScriptFrame* frame = it.frame();
9070  return isolate->heap()->ToBoolean(frame->IsConstructor());
9071 }

References DCHECK, and v8::internal::JavaScriptFrame::IsConstructor().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [426/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsFunction  )

Definition at line 9156 of file runtime.cc.

9156  {
9157  SealHandleScope shs(isolate);
9158  DCHECK(args.length() == 1);
9159  CONVERT_ARG_CHECKED(Object, obj, 0);
9160  return isolate->heap()->ToBoolean(obj->IsJSFunction());
9161 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [427/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsMinusZero  )

Definition at line 238 of file runtime-maths.cc.

238  {
239  SealHandleScope shs(isolate);
240  DCHECK(args.length() == 1);
241  CONVERT_ARG_CHECKED(Object, obj, 0);
242  if (!obj->IsHeapNumber()) return isolate->heap()->false_value();
243  HeapNumber* number = HeapNumber::cast(obj);
244  return isolate->heap()->ToBoolean(IsMinusZero(number->value()));
245 }

References CONVERT_ARG_CHECKED, DCHECK, IsMinusZero(), and v8::internal::HeapNumber::value().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [428/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsNonNegativeSmi  )

Definition at line 9040 of file runtime.cc.

9040  {
9041  SealHandleScope shs(isolate);
9042  DCHECK(args.length() == 1);
9043  CONVERT_ARG_CHECKED(Object, obj, 0);
9044  return isolate->heap()->ToBoolean(obj->IsSmi() &&
9045  Smi::cast(obj)->value() >= 0);
9046 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [429/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsObject  )

Definition at line 9141 of file runtime.cc.

9141  {
9142  SealHandleScope shs(isolate);
9143  DCHECK(args.length() == 1);
9144  CONVERT_ARG_CHECKED(Object, obj, 0);
9145  if (!obj->IsHeapObject()) return isolate->heap()->false_value();
9146  if (obj->IsNull()) return isolate->heap()->true_value();
9147  if (obj->IsUndetectableObject()) return isolate->heap()->false_value();
9148  Map* map = HeapObject::cast(obj)->map();
9149  bool is_non_callable_spec_object =
9150  map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE &&
9151  map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE;
9152  return isolate->heap()->ToBoolean(is_non_callable_spec_object);
9153 }

References CONVERT_ARG_CHECKED, DCHECK, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, LAST_NONCALLABLE_SPEC_OBJECT_TYPE, and map.

◆ RUNTIME_FUNCTION() [430/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsRegExp  )

Definition at line 9057 of file runtime.cc.

9057  {
9058  SealHandleScope shs(isolate);
9059  DCHECK(args.length() == 1);
9060  CONVERT_ARG_CHECKED(Object, obj, 0);
9061  return isolate->heap()->ToBoolean(obj->IsJSRegExp());
9062 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [431/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsSpecObject  )

Definition at line 9172 of file runtime.cc.

9172  {
9173  SealHandleScope shs(isolate);
9174  DCHECK(args.length() == 1);
9175  CONVERT_ARG_CHECKED(Object, obj, 0);
9176  return isolate->heap()->ToBoolean(obj->IsSpecObject());
9177 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [432/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_IsUndetectableObject  )

Definition at line 9164 of file runtime.cc.

9164  {
9165  SealHandleScope shs(isolate);
9166  DCHECK(args.length() == 1);
9167  CONVERT_ARG_CHECKED(Object, obj, 0);
9168  return isolate->heap()->ToBoolean(obj->IsUndetectableObject());
9169 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [433/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_MathPow  )

Definition at line 232 of file runtime-maths.cc.

232  {
233  SealHandleScope shs(isolate);
234  return __RT_impl_Runtime_MathPowSlow(args, isolate);
235 }

◆ RUNTIME_FUNCTION() [434/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_NumberToString  )

Definition at line 560 of file runtime-numbers.cc.

560  {
561  SealHandleScope shs(isolate);
562  return __RT_impl_Runtime_NumberToStringRT(args, isolate);
563 }

◆ RUNTIME_FUNCTION() [435/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_ObjectEquals  )

Definition at line 9132 of file runtime.cc.

9132  {
9133  SealHandleScope shs(isolate);
9134  DCHECK(args.length() == 2);
9135  CONVERT_ARG_CHECKED(Object, obj1, 0);
9136  CONVERT_ARG_CHECKED(Object, obj2, 1);
9137  return isolate->heap()->ToBoolean(obj1 == obj2);
9138 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [436/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_OneByteSeqStringSetChar  )

Definition at line 1211 of file runtime-strings.cc.

1211  {
1212  SealHandleScope shs(isolate);
1213  DCHECK(args.length() == 3);
1214  CONVERT_INT32_ARG_CHECKED(index, 0);
1215  CONVERT_INT32_ARG_CHECKED(value, 1);
1216  CONVERT_ARG_CHECKED(SeqOneByteString, string, 2);
1217  string->SeqOneByteStringSet(index, value);
1218  return string;
1219 }

References CONVERT_ARG_CHECKED, CONVERT_INT32_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [437/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_RegExpConstructResult  )

Definition at line 1079 of file runtime-regexp.cc.

1079  {
1080  SealHandleScope shs(isolate);
1081  return __RT_impl_Runtime_RegExpConstructResult(args, isolate);
1082 }

◆ RUNTIME_FUNCTION() [438/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_RegExpExec  )

Definition at line 1085 of file runtime-regexp.cc.

1085  {
1086  SealHandleScope shs(isolate);
1087  return __RT_impl_Runtime_RegExpExecRT(args, isolate);
1088 }

◆ RUNTIME_FUNCTION() [439/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_SetValueOf  )

Definition at line 9104 of file runtime.cc.

9104  {
9105  SealHandleScope shs(isolate);
9106  DCHECK(args.length() == 2);
9107  CONVERT_ARG_CHECKED(Object, obj, 0);
9108  CONVERT_ARG_CHECKED(Object, value, 1);
9109  if (!obj->IsJSValue()) return value;
9110  JSValue::cast(obj)->set_value(value);
9111  return value;
9112 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [440/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_StringAdd  )

Definition at line 1255 of file runtime-strings.cc.

1255  {
1256  SealHandleScope shs(isolate);
1257  return __RT_impl_Runtime_StringAdd(args, isolate);
1258 }

◆ RUNTIME_FUNCTION() [441/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_StringCharAt  )

Definition at line 1199 of file runtime-strings.cc.

1199  {
1200  SealHandleScope shs(isolate);
1201  DCHECK(args.length() == 2);
1202  if (!args[0]->IsString()) return Smi::FromInt(0);
1203  if (!args[1]->IsNumber()) return Smi::FromInt(0);
1204  if (std::isinf(args.number_at(1))) return isolate->heap()->empty_string();
1205  Object* code = __RT_impl_Runtime_StringCharCodeAtRT(args, isolate);
1206  if (code->IsNaN()) return isolate->heap()->empty_string();
1207  return __RT_impl_Runtime_CharFromCode(Arguments(1, &code), isolate);
1208 }

References DCHECK, and v8::internal::Smi::FromInt().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [442/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_StringCharCodeAt  )

Definition at line 1239 of file runtime-strings.cc.

1239  {
1240  SealHandleScope shs(isolate);
1241  DCHECK(args.length() == 2);
1242  if (!args[0]->IsString()) return isolate->heap()->undefined_value();
1243  if (!args[1]->IsNumber()) return isolate->heap()->undefined_value();
1244  if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value();
1245  return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate);
1246 }

References DCHECK.

◆ RUNTIME_FUNCTION() [443/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_StringCharFromCode  )

Definition at line 1193 of file runtime-strings.cc.

1193  {
1194  SealHandleScope shs(isolate);
1195  return __RT_impl_Runtime_CharFromCode(args, isolate);
1196 }

◆ RUNTIME_FUNCTION() [444/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_StringCompare  )

Definition at line 1233 of file runtime-strings.cc.

1233  {
1234  SealHandleScope shs(isolate);
1235  return __RT_impl_Runtime_StringCompare(args, isolate);
1236 }

◆ RUNTIME_FUNCTION() [445/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_SubString  )

Definition at line 1249 of file runtime-strings.cc.

1249  {
1250  SealHandleScope shs(isolate);
1251  return __RT_impl_Runtime_SubString(args, isolate);
1252 }

◆ RUNTIME_FUNCTION() [446/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_TwoByteSeqStringSetChar  )

Definition at line 1222 of file runtime-strings.cc.

1222  {
1223  SealHandleScope shs(isolate);
1224  DCHECK(args.length() == 3);
1225  CONVERT_INT32_ARG_CHECKED(index, 0);
1226  CONVERT_INT32_ARG_CHECKED(value, 1);
1227  CONVERT_ARG_CHECKED(SeqTwoByteString, string, 2);
1228  string->SeqTwoByteStringSet(index, value);
1229  return string;
1230 }

References CONVERT_ARG_CHECKED, CONVERT_INT32_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [447/457]

v8::internal::RUNTIME_FUNCTION ( RuntimeReference_ValueOf  )

Definition at line 9095 of file runtime.cc.

9095  {
9096  SealHandleScope shs(isolate);
9097  DCHECK(args.length() == 1);
9098  CONVERT_ARG_CHECKED(Object, obj, 0);
9099  if (!obj->IsJSValue()) return obj;
9100  return JSValue::cast(obj)->value();
9101 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ RUNTIME_FUNCTION() [448/457]

v8::internal::RUNTIME_FUNCTION ( SharedStoreIC_ExtendStorage  )

Definition at line 2112 of file ic.cc.

2112  {
2113  TimerEventScope<TimerEventIcMiss> timer(isolate);
2114  HandleScope shs(isolate);
2115  DCHECK(args.length() == 3);
2116 
2117  // Convert the parameters
2118  Handle<JSObject> object = args.at<JSObject>(0);
2119  Handle<Map> transition = args.at<Map>(1);
2120  Handle<Object> value = args.at<Object>(2);
2121 
2122  // Check the object has run out out property space.
2123  DCHECK(object->HasFastProperties());
2124  DCHECK(object->map()->unused_property_fields() == 0);
2125 
2126  JSObject::MigrateToNewProperty(object, transition, value);
2127 
2128  // Return the stored value.
2129  return *value;
2130 }

References DCHECK, and v8::internal::JSObject::MigrateToNewProperty().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [449/457]

v8::internal::RUNTIME_FUNCTION ( StoreCallbackProperty  )

Definition at line 2514 of file ic.cc.

2514  {
2515  Handle<JSObject> receiver = args.at<JSObject>(0);
2516  Handle<JSObject> holder = args.at<JSObject>(1);
2517  Handle<ExecutableAccessorInfo> callback = args.at<ExecutableAccessorInfo>(2);
2518  Handle<Name> name = args.at<Name>(3);
2519  Handle<Object> value = args.at<Object>(4);
2520  HandleScope scope(isolate);
2521 
2522  DCHECK(callback->IsCompatibleReceiver(*receiver));
2523 
2524  Address setter_address = v8::ToCData<Address>(callback->setter());
2526  FUNCTION_CAST<v8::AccessorNameSetterCallback>(setter_address);
2527  DCHECK(fun != NULL);
2528 
2529  LOG(isolate, ApiNamedPropertyAccess("store", *receiver, *name));
2530  PropertyCallbackArguments custom_args(isolate, callback->data(), *receiver,
2531  *holder);
2532  custom_args.Call(fun, v8::Utils::ToLocal(name), v8::Utils::ToLocal(value));
2534  return *value;
2535 }
void(* AccessorNameSetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
Definition: v8.h:2257

References DCHECK, LOG, name, NULL, RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, and v8::Utils::ToLocal().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [450/457]

v8::internal::RUNTIME_FUNCTION ( StoreIC_Miss  )

Definition at line 2079 of file ic.cc.

2079  {
2080  TimerEventScope<TimerEventIcMiss> timer(isolate);
2081  HandleScope scope(isolate);
2082  DCHECK(args.length() == 3);
2083  StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2084  Handle<Object> receiver = args.at<Object>(0);
2085  Handle<String> key = args.at<String>(1);
2086  ic.UpdateState(receiver, key);
2087  Handle<Object> result;
2089  isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2090  return *result;
2091 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::NO_EXTRA_FRAME, v8::internal::StoreIC::Store(), and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [451/457]

v8::internal::RUNTIME_FUNCTION ( StoreIC_MissFromStubFailure  )

Definition at line 2094 of file ic.cc.

2094  {
2095  TimerEventScope<TimerEventIcMiss> timer(isolate);
2096  HandleScope scope(isolate);
2097  DCHECK(args.length() == 3);
2098  StoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2099  Handle<Object> receiver = args.at<Object>(0);
2100  Handle<String> key = args.at<String>(1);
2101  ic.UpdateState(receiver, key);
2102  Handle<Object> result;
2104  isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2105  return *result;
2106 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::EXTRA_CALL_FRAME, v8::internal::StoreIC::Store(), and v8::internal::IC::UpdateState().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [452/457]

v8::internal::RUNTIME_FUNCTION ( StoreIC_Slow  )

Definition at line 2164 of file ic.cc.

2164  {
2165  HandleScope scope(isolate);
2166  DCHECK(args.length() == 3);
2167  StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2168  Handle<Object> object = args.at<Object>(0);
2169  Handle<Object> key = args.at<Object>(1);
2170  Handle<Object> value = args.at<Object>(2);
2171  StrictMode strict_mode = ic.strict_mode();
2172  Handle<Object> result;
2174  isolate, result,
2175  Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2176  return *result;
2177 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::IC::NO_EXTRA_FRAME, v8::internal::Runtime::SetObjectProperty(), and v8::internal::StoreIC::strict_mode().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [453/457]

v8::internal::RUNTIME_FUNCTION ( StorePropertyWithInterceptor  )

Definition at line 2626 of file ic.cc.

2626  {
2627  HandleScope scope(isolate);
2628  DCHECK(args.length() == 3);
2629  StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2630  Handle<JSObject> receiver = args.at<JSObject>(0);
2631  Handle<Name> name = args.at<Name>(1);
2632  Handle<Object> value = args.at<Object>(2);
2633 #ifdef DEBUG
2634  PrototypeIterator iter(isolate, receiver,
2635  PrototypeIterator::START_AT_RECEIVER);
2636  bool found = false;
2637  while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
2638  Handle<Object> current = PrototypeIterator::GetCurrent(iter);
2639  if (current->IsJSObject() &&
2640  Handle<JSObject>::cast(current)->HasNamedInterceptor()) {
2641  found = true;
2642  break;
2643  }
2644  }
2645  DCHECK(found);
2646 #endif
2647  Handle<Object> result;
2649  isolate, result,
2650  JSObject::SetProperty(receiver, name, value, ic.strict_mode()));
2651  return *result;
2652 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, DCHECK, v8::internal::PrototypeIterator::END_AT_NON_HIDDEN, v8::internal::PrototypeIterator::GetCurrent(), name, v8::internal::IC::NO_EXTRA_FRAME, v8::internal::Object::SetProperty(), v8::internal::PrototypeIterator::START_AT_RECEIVER, and v8::internal::StoreIC::strict_mode().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION() [454/457]

v8::internal::RUNTIME_FUNCTION ( ToBooleanIC_Miss  )

Definition at line 2504 of file ic.cc.

2504  {
2505  TimerEventScope<TimerEventIcMiss> timer(isolate);
2506  DCHECK(args.length() == 1);
2507  HandleScope scope(isolate);
2508  Handle<Object> object = args.at<Object>(0);
2509  ToBooleanIC ic(isolate);
2510  return *ic.ToBoolean(object);
2511 }

References DCHECK.

◆ RUNTIME_FUNCTION() [455/457]

v8::internal::RUNTIME_FUNCTION ( Unreachable  )

Definition at line 2447 of file ic.cc.

2447  {
2448  UNREACHABLE();
2449  CHECK(false);
2450  return isolate->heap()->undefined_value();
2451 }

References CHECK, and UNREACHABLE.

◆ RUNTIME_FUNCTION() [456/457]

v8::internal::RUNTIME_FUNCTION ( VectorKeyedLoadIC_MissFromStubFailure  )

Definition at line 2674 of file ic.cc.

2674  {
2675  // TODO(mvstanton): To be enabled when ICs can accept a vector and slot
2676  return NULL;
2677 }

References NULL.

◆ RUNTIME_FUNCTION() [457/457]

v8::internal::RUNTIME_FUNCTION ( VectorLoadIC_MissFromStubFailure  )

Definition at line 2668 of file ic.cc.

2668  {
2669  // TODO(mvstanton): To be enabled when ICs can accept a vector and slot
2670  return NULL;
2671 }

References NULL.

◆ RUNTIME_FUNCTION_RETURN_PAIR() [1/5]

v8::internal::RUNTIME_FUNCTION_RETURN_PAIR ( Runtime_ForInInit  )

Definition at line 8930 of file runtime.cc.

8930  {
8931  SealHandleScope scope(isolate);
8932  DCHECK(args.length() == 2);
8933  // This simulates CONVERT_ARG_HANDLE_CHECKED for calls returning pairs.
8934  // Not worth creating a macro atm as this function should be removed.
8935  if (!args[0]->IsJSReceiver() || !args[1]->IsObject()) {
8936  Object* error = isolate->ThrowIllegalOperation();
8937  return MakePair(error, isolate->heap()->undefined_value());
8938  }
8939  Handle<JSReceiver> object = args.at<JSReceiver>(0);
8940  Handle<Object> cache_type = args.at<Object>(1);
8941  if (cache_type->IsMap()) {
8942  // Enum cache case.
8943  if (Map::EnumLengthBits::decode(Map::cast(*cache_type)->bit_field3()) ==
8944  0) {
8945  // 0 length enum.
8946  // Can't handle this case in the graph builder,
8947  // so transform it into the empty fixed array case.
8948  return MakePair(isolate->heap()->empty_fixed_array(), Smi::FromInt(1));
8949  }
8950  return MakePair(object->map()->instance_descriptors()->GetEnumCache(),
8951  *cache_type);
8952  } else {
8953  // FixedArray case.
8954  Smi* new_cache_type = Smi::FromInt(object->IsJSProxy() ? 0 : 1);
8955  return MakePair(*Handle<FixedArray>::cast(cache_type), new_cache_type);
8956  }
8957 }

References DCHECK, v8::internal::BitFieldBase< T, shift, size, U >::decode(), v8::internal::Smi::FromInt(), and MakePair().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION_RETURN_PAIR() [2/5]

v8::internal::RUNTIME_FUNCTION_RETURN_PAIR ( Runtime_ForInNext  )

Definition at line 8983 of file runtime.cc.

8983  {
8984  SealHandleScope scope(isolate);
8985  DCHECK(args.length() == 4);
8986  int32_t index;
8987  // This simulates CONVERT_ARG_HANDLE_CHECKED for calls returning pairs.
8988  // Not worth creating a macro atm as this function should be removed.
8989  if (!args[0]->IsJSReceiver() || !args[1]->IsFixedArray() ||
8990  !args[2]->IsObject() || !args[3]->ToInt32(&index)) {
8991  Object* error = isolate->ThrowIllegalOperation();
8992  return MakePair(error, isolate->heap()->undefined_value());
8993  }
8994  Handle<JSReceiver> object = args.at<JSReceiver>(0);
8995  Handle<FixedArray> array = args.at<FixedArray>(1);
8996  Handle<Object> cache_type = args.at<Object>(2);
8997  // Figure out first if a slow check is needed for this object.
8998  bool slow_check_needed = false;
8999  if (cache_type->IsMap()) {
9000  if (object->map() != Map::cast(*cache_type)) {
9001  // Object transitioned. Need slow check.
9002  slow_check_needed = true;
9003  }
9004  } else {
9005  // No slow check needed for proxies.
9006  slow_check_needed = Smi::cast(*cache_type)->value() == 1;
9007  }
9008  return MakePair(array->get(index),
9009  isolate->heap()->ToBoolean(slow_check_needed));
9010 }

References DCHECK, and MakePair().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION_RETURN_PAIR() [3/5]

v8::internal::RUNTIME_FUNCTION_RETURN_PAIR ( Runtime_LoadLookupSlot  )

Definition at line 4236 of file runtime.cc.

4236  {
4237  return LoadLookupSlotHelper(args, isolate, true);
4238 }
static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate *isolate, bool throw_error)
Definition: runtime.cc:4133

References LoadLookupSlotHelper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION_RETURN_PAIR() [4/5]

v8::internal::RUNTIME_FUNCTION_RETURN_PAIR ( Runtime_LoadLookupSlotNoReferenceError  )

Definition at line 4241 of file runtime.cc.

4241  {
4242  return LoadLookupSlotHelper(args, isolate, false);
4243 }

References LoadLookupSlotHelper().

+ Here is the call graph for this function:

◆ RUNTIME_FUNCTION_RETURN_PAIR() [5/5]

v8::internal::RUNTIME_FUNCTION_RETURN_PAIR ( Runtime_ResolvePossiblyDirectEval  )

Definition at line 417 of file runtime-compiler.cc.

417  {
418  HandleScope scope(isolate);
419  DCHECK(args.length() == 5);
420 
421  Handle<Object> callee = args.at<Object>(0);
422 
423  // If "eval" didn't refer to the original GlobalEval, it's not a
424  // direct call to eval.
425  // (And even if it is, but the first argument isn't a string, just let
426  // execution default to an indirect call to eval, which will also return
427  // the first argument without doing anything).
428  if (*callee != isolate->native_context()->global_eval_fun() ||
429  !args[1]->IsString()) {
430  return MakePair(*callee, isolate->heap()->undefined_value());
431  }
432 
433  DCHECK(args[3]->IsSmi());
434  DCHECK(args.smi_at(3) == SLOPPY || args.smi_at(3) == STRICT);
435  StrictMode strict_mode = static_cast<StrictMode>(args.smi_at(3));
436  DCHECK(args[4]->IsSmi());
437  return CompileGlobalEval(isolate, args.at<String>(1), args.at<Object>(2),
438  strict_mode, args.smi_at(4));
439 }
static ObjectPair CompileGlobalEval(Isolate *isolate, Handle< String > source, Handle< Object > receiver, StrictMode strict_mode, int scope_position)

References CompileGlobalEval(), DCHECK, MakePair(), SLOPPY, and STRICT.

+ Here is the call graph for this function:

◆ Runtime_GetScriptFromScriptName()

static Handle<Object> v8::internal::Runtime_GetScriptFromScriptName ( Handle< String script_name)
static

Definition at line 8303 of file runtime.cc.

8304  {
8305  // Scan the heap for Script objects to find the script with the requested
8306  // script data.
8307  Handle<Script> script;
8308  Factory* factory = script_name->GetIsolate()->factory();
8309  Heap* heap = script_name->GetHeap();
8310  HeapIterator iterator(heap);
8311  HeapObject* obj = NULL;
8312  while (script.is_null() && ((obj = iterator.next()) != NULL)) {
8313  // If a script is found check if it has the script data requested.
8314  if (obj->IsScript()) {
8315  if (Script::cast(obj)->name()->IsString()) {
8316  if (String::cast(Script::cast(obj)->name())->Equals(*script_name)) {
8317  script = Handle<Script>(Script::cast(obj));
8318  }
8319  }
8320  }
8321  }
8322 
8323  // If no script with the requested script data is found return undefined.
8324  if (script.is_null()) return factory->undefined_value();
8325 
8326  // Return the script found.
8327  return Script::GetWrapper(script);
8328 }

References v8::internal::compiler::anonymous_namespace{value-numbering-reducer.cc}::Equals(), v8::internal::Script::GetWrapper(), v8::internal::Handle< T >::is_null(), name, and NULL.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Runtime_NewObjectHelper()

static Object* v8::internal::Runtime_NewObjectHelper ( Isolate isolate,
Handle< Object constructor,
Handle< AllocationSite site 
)
static

Definition at line 3676 of file runtime.cc.

3678  {
3679  // If the constructor isn't a proper function we throw a type error.
3680  if (!constructor->IsJSFunction()) {
3681  Vector<Handle<Object> > arguments = HandleVector(&constructor, 1);
3683  NewTypeError("not_constructor", arguments));
3684  }
3685 
3686  Handle<JSFunction> function = Handle<JSFunction>::cast(constructor);
3687 
3688  // If function should not have prototype, construction is not allowed. In this
3689  // case generated code bailouts here, since function has no initial_map.
3690  if (!function->should_have_prototype() && !function->shared()->bound()) {
3691  Vector<Handle<Object> > arguments = HandleVector(&constructor, 1);
3693  NewTypeError("not_constructor", arguments));
3694  }
3695 
3696  Debug* debug = isolate->debug();
3697  // Handle stepping into constructors if step into is active.
3698  if (debug->StepInActive()) {
3699  debug->HandleStepIn(function, Handle<Object>::null(), 0, true);
3700  }
3701 
3702  if (function->has_initial_map()) {
3703  if (function->initial_map()->instance_type() == JS_FUNCTION_TYPE) {
3704  // The 'Function' function ignores the receiver object when
3705  // called using 'new' and creates a new JSFunction object that
3706  // is returned. The receiver object is only used for error
3707  // reporting if an error occurs when constructing the new
3708  // JSFunction. Factory::NewJSObject() should not be used to
3709  // allocate JSFunctions since it does not properly initialize
3710  // the shared part of the function. Since the receiver is
3711  // ignored anyway, we use the global object as the receiver
3712  // instead of a new JSFunction object. This way, errors are
3713  // reported the same way whether or not 'Function' is called
3714  // using 'new'.
3715  return isolate->global_proxy();
3716  }
3717  }
3718 
3719  // The function should be compiled for the optimization hints to be
3720  // available.
3721  Compiler::EnsureCompiled(function, CLEAR_EXCEPTION);
3722 
3723  Handle<JSObject> result;
3724  if (site.is_null()) {
3725  result = isolate->factory()->NewJSObject(function);
3726  } else {
3727  result = isolate->factory()->NewJSObjectWithMemento(function, site);
3728  }
3729 
3730  isolate->counters()->constructed_objects()->Increment();
3731  isolate->counters()->constructed_objects_runtime()->Increment();
3732 
3733  return *result;
3734 }

References v8::internal::Handle< T >::cast(), CLEAR_EXCEPTION, v8::internal::Isolate::counters(), v8::internal::Isolate::debug(), v8::internal::Compiler::EnsureCompiled(), v8::internal::Isolate::factory(), v8::internal::Isolate::global_proxy(), v8::internal::Debug::HandleStepIn(), HandleVector(), v8::internal::Handle< T >::is_null(), JS_FUNCTION_TYPE, v8::internal::Debug::StepInActive(), and THROW_NEW_ERROR_RETURN_FAILURE.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Search()

template<SearchMode search_mode, typename T >
int v8::internal::Search ( T array,
Name name,
int  valid_entries 
)
inline

Definition at line 2822 of file objects-inl.h.

2822  {
2823  if (search_mode == VALID_ENTRIES) {
2824  SLOW_DCHECK(array->IsSortedNoDuplicates(valid_entries));
2825  } else {
2826  SLOW_DCHECK(array->IsSortedNoDuplicates());
2827  }
2828 
2829  int nof = array->number_of_entries();
2830  if (nof == 0) return T::kNotFound;
2831 
2832  // Fast case: do linear search for small arrays.
2833  const int kMaxElementsForLinearSearch = 8;
2834  if ((search_mode == ALL_ENTRIES &&
2835  nof <= kMaxElementsForLinearSearch) ||
2836  (search_mode == VALID_ENTRIES &&
2837  valid_entries <= (kMaxElementsForLinearSearch * 3))) {
2838  return LinearSearch<search_mode>(array, name, nof, valid_entries);
2839  }
2840 
2841  // Slow case: perform binary search.
2842  return BinarySearch<search_mode>(array, name, 0, nof - 1, valid_entries);
2843 }

References ALL_ENTRIES, name, SLOW_DCHECK, and VALID_ENTRIES.

◆ SearchRegExpMultiple()

template<bool has_capture>
static Object* v8::internal::SearchRegExpMultiple ( Isolate isolate,
Handle< String subject,
Handle< JSRegExp regexp,
Handle< JSArray last_match_array,
Handle< JSArray result_array 
)
static

Definition at line 914 of file runtime-regexp.cc.

917  {
918  DCHECK(subject->IsFlat());
919  DCHECK_NE(has_capture, regexp->CaptureCount() == 0);
920 
921  int capture_count = regexp->CaptureCount();
922  int subject_length = subject->length();
923 
924  static const int kMinLengthToCache = 0x1000;
925 
926  if (subject_length > kMinLengthToCache) {
927  Handle<Object> cached_answer(
928  RegExpResultsCache::Lookup(isolate->heap(), *subject, regexp->data(),
929  RegExpResultsCache::REGEXP_MULTIPLE_INDICES),
930  isolate);
931  if (*cached_answer != Smi::FromInt(0)) {
932  Handle<FixedArray> cached_fixed_array =
933  Handle<FixedArray>(FixedArray::cast(*cached_answer));
934  // The cache FixedArray is a COW-array and can therefore be reused.
935  JSArray::SetContent(result_array, cached_fixed_array);
936  // The actual length of the result array is stored in the last element of
937  // the backing store (the backing FixedArray may have a larger capacity).
938  Object* cached_fixed_array_last_element =
939  cached_fixed_array->get(cached_fixed_array->length() - 1);
940  Smi* js_array_length = Smi::cast(cached_fixed_array_last_element);
941  result_array->set_length(js_array_length);
942  RegExpImpl::SetLastMatchInfo(last_match_array, subject, capture_count,
943  NULL);
944  return *result_array;
945  }
946  }
947 
948  RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate);
949  if (global_cache.HasException()) return isolate->heap()->exception();
950 
951  // Ensured in Runtime_RegExpExecMultiple.
952  DCHECK(result_array->HasFastObjectElements());
953  Handle<FixedArray> result_elements(
954  FixedArray::cast(result_array->elements()));
955  if (result_elements->length() < 16) {
956  result_elements = isolate->factory()->NewFixedArrayWithHoles(16);
957  }
958 
959  FixedArrayBuilder builder(result_elements);
960 
961  // Position to search from.
962  int match_start = -1;
963  int match_end = 0;
964  bool first = true;
965 
966  // Two smis before and after the match, for very long strings.
967  static const int kMaxBuilderEntriesPerRegExpMatch = 5;
968 
969  while (true) {
970  int32_t* current_match = global_cache.FetchNext();
971  if (current_match == NULL) break;
972  match_start = current_match[0];
973  builder.EnsureCapacity(kMaxBuilderEntriesPerRegExpMatch);
974  if (match_end < match_start) {
975  ReplacementStringBuilder::AddSubjectSlice(&builder, match_end,
976  match_start);
977  }
978  match_end = current_match[1];
979  {
980  // Avoid accumulating new handles inside loop.
981  HandleScope temp_scope(isolate);
982  Handle<String> match;
983  if (!first) {
984  match = isolate->factory()->NewProperSubString(subject, match_start,
985  match_end);
986  } else {
987  match =
988  isolate->factory()->NewSubString(subject, match_start, match_end);
989  first = false;
990  }
991 
992  if (has_capture) {
993  // Arguments array to replace function is match, captures, index and
994  // subject, i.e., 3 + capture count in total.
995  Handle<FixedArray> elements =
996  isolate->factory()->NewFixedArray(3 + capture_count);
997 
998  elements->set(0, *match);
999  for (int i = 1; i <= capture_count; i++) {
1000  int start = current_match[i * 2];
1001  if (start >= 0) {
1002  int end = current_match[i * 2 + 1];
1003  DCHECK(start <= end);
1004  Handle<String> substring =
1005  isolate->factory()->NewSubString(subject, start, end);
1006  elements->set(i, *substring);
1007  } else {
1008  DCHECK(current_match[i * 2 + 1] < 0);
1009  elements->set(i, isolate->heap()->undefined_value());
1010  }
1011  }
1012  elements->set(capture_count + 1, Smi::FromInt(match_start));
1013  elements->set(capture_count + 2, *subject);
1014  builder.Add(*isolate->factory()->NewJSArrayWithElements(elements));
1015  } else {
1016  builder.Add(*match);
1017  }
1018  }
1019  }
1020 
1021  if (global_cache.HasException()) return isolate->heap()->exception();
1022 
1023  if (match_start >= 0) {
1024  // Finished matching, with at least one match.
1025  if (match_end < subject_length) {
1026  ReplacementStringBuilder::AddSubjectSlice(&builder, match_end,
1027  subject_length);
1028  }
1029 
1030  RegExpImpl::SetLastMatchInfo(last_match_array, subject, capture_count,
1031  NULL);
1032 
1033  if (subject_length > kMinLengthToCache) {
1034  // Store the length of the result array into the last element of the
1035  // backing FixedArray.
1036  builder.EnsureCapacity(1);
1037  Handle<FixedArray> fixed_array = builder.array();
1038  fixed_array->set(fixed_array->length() - 1,
1039  Smi::FromInt(builder.length()));
1040  // Cache the result and turn the FixedArray into a COW array.
1041  RegExpResultsCache::Enter(isolate, subject,
1042  handle(regexp->data(), isolate), fixed_array,
1043  RegExpResultsCache::REGEXP_MULTIPLE_INDICES);
1044  }
1045  return *builder.ToJSArray(result_array);
1046  } else {
1047  return isolate->heap()->null_value(); // No matches at all.
1048  }
1049 }
#define DCHECK_NE(v1, v2)
Definition: logging.h:207

References v8::internal::FixedArrayBuilder::Add(), v8::internal::ReplacementStringBuilder::AddSubjectSlice(), v8::internal::FixedArrayBuilder::array(), DCHECK, DCHECK_NE, v8::internal::FixedArrayBuilder::EnsureCapacity(), v8::internal::RegExpResultsCache::Enter(), v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), handle(), v8::internal::Isolate::heap(), v8::internal::FixedArrayBuilder::length(), v8::internal::RegExpResultsCache::Lookup(), NULL, v8::internal::RegExpResultsCache::REGEXP_MULTIPLE_INDICES, v8::internal::JSArray::SetContent(), v8::internal::RegExpImpl::SetLastMatchInfo(), and v8::internal::FixedArrayBuilder::ToJSArray().

+ Here is the call graph for this function:

◆ SearchString()

template<typename SubjectChar , typename PatternChar >
int v8::internal::SearchString ( Isolate isolate,
Vector< const SubjectChar >  subject,
Vector< const PatternChar >  pattern,
int  start_index 
)

Definition at line 547 of file string-search.h.

550  {
551  StringSearch<PatternChar, SubjectChar> search(isolate, pattern);
552  return search.Search(subject, start_index);
553 }

References v8::internal::StringSearch< PatternChar, SubjectChar >::Search().

Referenced by v8::internal::RegExpImpl::AtomExecRaw(), and v8::internal::Runtime::StringMatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SeqStringSet() [1/3]

template<>
void v8::internal::SeqStringSet ( Handle< SeqOneByteString seq_str,
int  i,
uc32  c 
)
inline

Definition at line 556 of file json-parser.h.

556  {
557  seq_str->SeqOneByteStringSet(i, c);
558 }

◆ SeqStringSet() [2/3]

template<>
void v8::internal::SeqStringSet ( Handle< SeqTwoByteString seq_str,
int  i,
uc32  c 
)
inline

Definition at line 551 of file json-parser.h.

551  {
552  seq_str->SeqTwoByteStringSet(i, c);
553 }

◆ SeqStringSet() [3/3]

template<typename StringType >
void v8::internal::SeqStringSet ( Handle< StringType >  seq_str,
int  i,
uc32  c 
)
inline

◆ SerializePosition()

static int v8::internal::SerializePosition ( int  position,
const Vector< char > &  buffer,
int  buffer_pos 
)
static

Definition at line 3027 of file heap-snapshot-generator.cc.

3028  {
3029  if (position == -1) {
3030  buffer[buffer_pos++] = '0';
3031  } else {
3032  DCHECK(position >= 0);
3033  buffer_pos = utoa(static_cast<unsigned>(position + 1), buffer, buffer_pos);
3034  }
3035  return buffer_pos;
3036 }
static int utoa(T value, const Vector< char > &buffer, int buffer_pos)

References DCHECK, and utoa().

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNodeInfos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAccessors()

static void v8::internal::SetAccessors ( Handle< Map map,
Handle< String name,
Handle< JSFunction func 
)
static

Definition at line 681 of file bootstrapper.cc.

683  {
684  DescriptorArray* descs = map->instance_descriptors();
685  int number = descs->SearchWithCache(*name, *map);
686  AccessorPair* accessors = AccessorPair::cast(descs->GetValue(number));
687  accessors->set_getter(*func);
688  accessors->set_setter(*func);
689 }

References v8::internal::DescriptorArray::GetValue(), map, and name.

+ Here is the call graph for this function:

◆ SetAtomLastCapture()

static void v8::internal::SetAtomLastCapture ( FixedArray array,
String subject,
int  from,
int  to 
)
static

Definition at line 257 of file jsregexp.cc.

260  {
261  SealHandleScope shs(array->GetIsolate());
262  RegExpImpl::SetLastCaptureCount(array, 2);
263  RegExpImpl::SetLastSubject(array, subject);
264  RegExpImpl::SetLastInput(array, subject);
265  RegExpImpl::SetCapture(array, 0, from);
266  RegExpImpl::SetCapture(array, 1, to);
267 }

References v8::internal::HeapObject::GetIsolate(), v8::internal::RegExpImpl::SetCapture(), v8::internal::RegExpImpl::SetLastCaptureCount(), v8::internal::RegExpImpl::SetLastInput(), v8::internal::RegExpImpl::SetLastSubject(), and to().

Referenced by v8::internal::RegExpImpl::AtomExec().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCatchVariableValue()

static bool v8::internal::SetCatchVariableValue ( Isolate isolate,
Handle< Context context,
Handle< String variable_name,
Handle< Object new_value 
)
static

Definition at line 6421 of file runtime.cc.

6423  {
6424  DCHECK(context->IsCatchContext());
6425  Handle<String> name(String::cast(context->extension()));
6426  if (!String::Equals(name, variable_name)) {
6427  return false;
6428  }
6429  context->set(Context::THROWN_OBJECT_INDEX, *new_value);
6430  return true;
6431 }

References DCHECK, v8::internal::String::Equals(), name, and v8::internal::Context::THROWN_OBJECT_INDEX.

Referenced by v8::internal::ScopeIterator::SetVariableValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetClosureVariableValue()

static bool v8::internal::SetClosureVariableValue ( Isolate isolate,
Handle< Context context,
Handle< String variable_name,
Handle< Object new_value 
)
static

Definition at line 6372 of file runtime.cc.

6374  {
6375  DCHECK(context->IsFunctionContext());
6376 
6377  Handle<SharedFunctionInfo> shared(context->closure()->shared());
6378  Handle<ScopeInfo> scope_info(shared->scope_info());
6379 
6380  // Context locals to the context extension.
6381  if (SetContextLocalValue(isolate, scope_info, context, variable_name,
6382  new_value)) {
6383  return true;
6384  }
6385 
6386  // Properties from the function context extension. This will
6387  // be variables introduced by eval.
6388  if (context->has_extension()) {
6389  Handle<JSObject> ext(JSObject::cast(context->extension()));
6390  Maybe<bool> maybe = JSReceiver::HasProperty(ext, variable_name);
6391  DCHECK(maybe.has_value);
6392  if (maybe.value) {
6393  // We don't expect this to do anything except replacing property value.
6394  Runtime::DefineObjectProperty(ext, variable_name, new_value, NONE)
6395  .Assert();
6396  return true;
6397  }
6398  }
6399 
6400  return false;
6401 }
static bool SetContextLocalValue(Isolate *isolate, Handle< ScopeInfo > scope_info, Handle< Context > context, Handle< String > variable_name, Handle< Object > new_value)
Definition: runtime.cc:6237

References DCHECK, v8::internal::Runtime::DefineObjectProperty(), v8::internal::JSReceiver::HasProperty(), v8::maybe(), NONE, and SetContextLocalValue().

Referenced by v8::internal::ScopeIterator::SetVariableValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetContextLocalValue()

static bool v8::internal::SetContextLocalValue ( Isolate isolate,
Handle< ScopeInfo scope_info,
Handle< Context context,
Handle< String variable_name,
Handle< Object new_value 
)
static

Definition at line 6237 of file runtime.cc.

6240  {
6241  for (int i = 0; i < scope_info->ContextLocalCount(); i++) {
6242  Handle<String> next_name(scope_info->ContextLocalName(i));
6243  if (String::Equals(variable_name, next_name)) {
6245  InitializationFlag init_flag;
6246  MaybeAssignedFlag maybe_assigned_flag;
6247  int context_index = ScopeInfo::ContextSlotIndex(
6248  scope_info, next_name, &mode, &init_flag, &maybe_assigned_flag);
6249  context->set(context_index, *new_value);
6250  return true;
6251  }
6252  }
6253 
6254  return false;
6255 }

References v8::internal::ScopeInfo::ContextSlotIndex(), v8::internal::String::Equals(), and mode().

Referenced by SetClosureVariableValue(), and SetLocalVariableValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetElementSloppy()

void v8::internal::SetElementSloppy ( Handle< JSObject object,
uint32_t  index,
Handle< Object value 
)

Definition at line 25 of file liveedit.cc.

27  {
28  // Ignore return value from SetElement. It can only be a failure if there
29  // are element setters causing exceptions and the debugger context has none
30  // of these.
31  JSObject::SetElement(object, index, value, NONE, SLOPPY).Assert();
32 }

References NONE, v8::internal::JSObject::SetElement(), and SLOPPY.

Referenced by CheckActivation(), v8::internal::LiveEdit::CheckAndDropActivations(), DropActivationsInActiveThread(), v8::internal::FunctionInfoListener::FunctionStarted(), v8::internal::FunctionInfoListener::SerializeFunctionScope(), v8::internal::LiveEdit::WrapSharedFunctionInfos(), and v8::internal::CompareOutputArrayWriter::WriteChunk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetExpectedNofPropertiesFromEstimate()

void v8::internal::SetExpectedNofPropertiesFromEstimate ( Handle< SharedFunctionInfo shared,
int  estimate 
)

Definition at line 542 of file compiler.cc.

543  {
544  // If no properties are added in the constructor, they are more likely
545  // to be added later.
546  if (estimate == 0) estimate = 2;
547 
548  // TODO(yangguo): check whether those heuristics are still up-to-date.
549  // We do not shrink objects that go into a snapshot (yet), so we adjust
550  // the estimate conservatively.
551  if (shared->GetIsolate()->serializer_enabled()) {
552  estimate += 2;
553  } else if (FLAG_clever_optimizations) {
554  // Inobject slack tracking will reclaim redundant inobject space later,
555  // so we can afford to adjust the estimate generously.
556  estimate += 8;
557  } else {
558  estimate += 3;
559  }
560 
561  shared->set_expected_nof_properties(estimate);
562 }

Referenced by v8::internal::Compiler::BuildFunctionInfo(), CompileToplevel(), and GetUnoptimizedCodeCommon().

+ Here is the caller graph for this function:

◆ SetFunctionInfo()

static void v8::internal::SetFunctionInfo ( Handle< SharedFunctionInfo function_info,
FunctionLiteral *  lit,
bool  is_toplevel,
Handle< Script script 
)
static

Definition at line 569 of file compiler.cc.

572  {
573  function_info->set_length(lit->parameter_count());
574  function_info->set_formal_parameter_count(lit->parameter_count());
575  function_info->set_script(*script);
576  function_info->set_function_token_position(lit->function_token_position());
577  function_info->set_start_position(lit->start_position());
578  function_info->set_end_position(lit->end_position());
579  function_info->set_is_expression(lit->is_expression());
580  function_info->set_is_anonymous(lit->is_anonymous());
581  function_info->set_is_toplevel(is_toplevel);
582  function_info->set_inferred_name(*lit->inferred_name());
583  function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
584  function_info->set_allows_lazy_compilation_without_context(
585  lit->AllowsLazyCompilationWithoutContext());
586  function_info->set_strict_mode(lit->strict_mode());
587  function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
588  function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
589  function_info->set_ast_node_count(lit->ast_node_count());
590  function_info->set_is_function(lit->is_function());
591  function_info->set_bailout_reason(lit->dont_optimize_reason());
592  function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
593  function_info->set_kind(lit->kind());
594  function_info->set_asm_function(lit->scope()->asm_function());
595 }
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit is_toplevel
Definition: objects-inl.h:5431

References is_toplevel, kDontCache, and NULL.

Referenced by v8::internal::Compiler::BuildFunctionInfo(), and CompileToplevel().

+ Here is the caller graph for this function:

◆ SetFunctionPrototype()

static Handle<Object> v8::internal::SetFunctionPrototype ( Isolate isolate,
Handle< JSFunction function,
Handle< Object value 
)
static

Definition at line 895 of file accessors.cc.

897  {
898  Handle<Object> old_value;
899  bool is_observed = function->map()->is_observed();
900  if (is_observed) {
901  if (function->has_prototype())
902  old_value = handle(function->prototype(), isolate);
903  else
904  old_value = isolate->factory()->NewFunctionPrototype(function);
905  }
906 
907  JSFunction::SetPrototype(function, value);
908  DCHECK(function->prototype() == *value);
909 
910  if (is_observed && !old_value->SameValue(*value)) {
911  JSObject::EnqueueChangeRecord(
912  function, "update", isolate->factory()->prototype_string(), old_value);
913  }
914 
915  return function;
916 }

References DCHECK, v8::internal::JSObject::EnqueueChangeRecord(), v8::internal::Isolate::factory(), handle(), and v8::internal::JSFunction::SetPrototype().

Referenced by v8::internal::Accessors::FunctionSetPrototype().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLocalVariableValue()

static bool v8::internal::SetLocalVariableValue ( Isolate isolate,
JavaScriptFrame frame,
int  inlined_jsframe_index,
Handle< String variable_name,
Handle< Object new_value 
)
static

Definition at line 6258 of file runtime.cc.

6261  {
6262  if (inlined_jsframe_index != 0 || frame->is_optimized()) {
6263  // Optimized frames are not supported.
6264  return false;
6265  }
6266 
6267  Handle<JSFunction> function(frame->function());
6268  Handle<SharedFunctionInfo> shared(function->shared());
6269  Handle<ScopeInfo> scope_info(shared->scope_info());
6270 
6271  bool default_result = false;
6272 
6273  // Parameters.
6274  for (int i = 0; i < scope_info->ParameterCount(); ++i) {
6275  HandleScope scope(isolate);
6276  if (String::Equals(handle(scope_info->ParameterName(i)), variable_name)) {
6277  frame->SetParameterValue(i, *new_value);
6278  // Argument might be shadowed in heap context, don't stop here.
6279  default_result = true;
6280  }
6281  }
6282 
6283  // Stack locals.
6284  for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
6285  HandleScope scope(isolate);
6286  if (String::Equals(handle(scope_info->StackLocalName(i)), variable_name)) {
6287  frame->SetExpression(i, *new_value);
6288  return true;
6289  }
6290  }
6291 
6292  if (scope_info->HasContext()) {
6293  // Context locals.
6294  Handle<Context> frame_context(Context::cast(frame->context()));
6295  Handle<Context> function_context(frame_context->declaration_context());
6296  if (SetContextLocalValue(isolate, scope_info, function_context,
6297  variable_name, new_value)) {
6298  return true;
6299  }
6300 
6301  // Function context extension. These are variables introduced by eval.
6302  if (function_context->closure() == *function) {
6303  if (function_context->has_extension() &&
6304  !function_context->IsNativeContext()) {
6305  Handle<JSObject> ext(JSObject::cast(function_context->extension()));
6306 
6307  Maybe<bool> maybe = JSReceiver::HasProperty(ext, variable_name);
6308  DCHECK(maybe.has_value);
6309  if (maybe.value) {
6310  // We don't expect this to do anything except replacing
6311  // property value.
6312  Runtime::SetObjectProperty(isolate, ext, variable_name, new_value,
6313  SLOPPY).Assert();
6314  return true;
6315  }
6316  }
6317  }
6318  }
6319 
6320  return default_result;
6321 }

References v8::internal::Context::cast(), v8::internal::StandardFrame::context(), DCHECK, v8::internal::String::Equals(), v8::internal::JavaScriptFrame::function(), handle(), v8::internal::JSReceiver::HasProperty(), v8::maybe(), SetContextLocalValue(), v8::internal::StandardFrame::SetExpression(), v8::internal::Runtime::SetObjectProperty(), v8::internal::JavaScriptFrame::SetParameterValue(), and SLOPPY.

Referenced by v8::internal::ScopeIterator::SetVariableValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMarkBitsUnderInvalidatedCode()

static bool v8::internal::SetMarkBitsUnderInvalidatedCode ( Code code,
bool  value 
)
static

Definition at line 3387 of file mark-compact.cc.

3387  {
3388  Page* p = Page::FromAddress(code->address());
3389 
3390  if (p->IsEvacuationCandidate() || p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) {
3391  return false;
3392  }
3393 
3394  Address code_start = code->address();
3395  Address code_end = code_start + code->Size();
3396 
3397  uint32_t start_index = MemoryChunk::FastAddressToMarkbitIndex(code_start);
3398  uint32_t end_index =
3399  MemoryChunk::FastAddressToMarkbitIndex(code_end - kPointerSize);
3400 
3401  Bitmap* b = p->markbits();
3402 
3403  MarkBit start_mark_bit = b->MarkBitFromIndex(start_index);
3404  MarkBit end_mark_bit = b->MarkBitFromIndex(end_index);
3405 
3406  MarkBit::CellType* start_cell = start_mark_bit.cell();
3407  MarkBit::CellType* end_cell = end_mark_bit.cell();
3408 
3409  if (value) {
3410  MarkBit::CellType start_mask = ~(start_mark_bit.mask() - 1);
3411  MarkBit::CellType end_mask = (end_mark_bit.mask() << 1) - 1;
3412 
3413  if (start_cell == end_cell) {
3414  *start_cell |= start_mask & end_mask;
3415  } else {
3416  *start_cell |= start_mask;
3417  for (MarkBit::CellType* cell = start_cell + 1; cell < end_cell; cell++) {
3418  *cell = ~0;
3419  }
3420  *end_cell |= end_mask;
3421  }
3422  } else {
3423  for (MarkBit::CellType* cell = start_cell; cell <= end_cell; cell++) {
3424  *cell = 0;
3425  }
3426  }
3427 
3428  return true;
3429 }

References v8::internal::HeapObject::address(), v8::internal::MarkBit::cell(), v8::internal::MemoryChunk::FastAddressToMarkbitIndex(), v8::internal::MemoryChunk::FromAddress(), v8::internal::MemoryChunk::IsEvacuationCandidate(), v8::internal::MemoryChunk::IsFlagSet(), kPointerSize, v8::internal::Bitmap::MarkBitFromIndex(), v8::internal::MemoryChunk::markbits(), v8::internal::MarkBit::mask(), v8::internal::MemoryChunk::RESCAN_ON_EVACUATION, and v8::internal::HeapObject::Size().

Referenced by v8::internal::MarkCompactCollector::MarkInvalidatedCode(), and v8::internal::MarkCompactCollector::ProcessInvalidatedCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetNativesFromFile()

void v8::internal::SetNativesFromFile ( StartupData natives_blob)

Read the Natives (library sources) blob, as generated by js2c + the build system.

Definition at line 128 of file natives-external.cc.

128  {
129  DCHECK(natives_blob);
130  DCHECK(natives_blob->data);
131  DCHECK(natives_blob->raw_size > 0);
132 
133  SnapshotByteSource bytes(
134  reinterpret_cast<const byte*>(natives_blob->data),
135  natives_blob->raw_size);
136  NativesHolder<CORE>::set(NativesStore::MakeFromScriptsSource(&bytes));
137  NativesHolder<EXPERIMENTAL>::set(NativesStore::MakeFromScriptsSource(&bytes));
138  DCHECK(!bytes.HasMore());
139 }

References v8::StartupData::data, DCHECK, v8::internal::NativesStore::MakeFromScriptsSource(), v8::StartupData::raw_size, and v8::internal::NativesHolder< type >::set().

Referenced by v8::V8::SetNativesDataBlob().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetObjectPrototype()

static void v8::internal::SetObjectPrototype ( Handle< JSObject object,
Handle< Object proto 
)
static

Definition at line 349 of file bootstrapper.cc.

349  {
350  // object.__proto__ = proto;
351  Handle<Map> old_map = Handle<Map>(object->map());
352  Handle<Map> new_map = Map::Copy(old_map);
353  new_map->set_prototype(*proto);
354  JSObject::MigrateToMap(object, new_map);
355 }

◆ SetPropertyOnInstanceIfInherited()

bool v8::internal::SetPropertyOnInstanceIfInherited ( Isolate isolate,
const v8::PropertyCallbackInfo< void > &  info,
v8::Local< v8::Name name,
Handle< Object value 
)

Definition at line 139 of file accessors.cc.

141  {
142  Handle<Object> holder = Utils::OpenHandle(*info.Holder());
143  Handle<Object> receiver = Utils::OpenHandle(*info.This());
144  if (*holder == *receiver) return false;
145  if (receiver->IsJSObject()) {
146  Handle<JSObject> object = Handle<JSObject>::cast(receiver);
147  // This behaves sloppy since we lost the actual strict-mode.
148  // TODO(verwaest): Fix by making ExecutableAccessorInfo behave like data
149  // properties.
150  if (!object->map()->is_extensible()) return true;
151  JSObject::SetOwnPropertyIgnoreAttributes(object, Utils::OpenHandle(*name),
152  value, NONE).Check();
153  }
154  return true;
155 }
Local< Object > This() const
Definition: v8.h:6819

References v8::internal::Handle< T >::cast(), v8::PropertyCallbackInfo< T >::Holder(), name, NONE, v8::Utils::OpenHandle(), v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), and v8::PropertyCallbackInfo< T >::This().

+ Here is the call graph for this function:

◆ SetScopeVariableValue()

static bool v8::internal::SetScopeVariableValue ( ScopeIterator it,
int  index,
Handle< String variable_name,
Handle< Object new_value 
)
static

Definition at line 7085 of file runtime.cc.

7087  {
7088  for (int n = 0; !it->Done() && n < index; it->Next()) {
7089  n++;
7090  }
7091  if (it->Done()) {
7092  return false;
7093  }
7094  return it->SetVariableValue(variable_name, new_value);
7095 }

References v8::internal::ScopeIterator::Done(), and v8::internal::ScopeIterator::SetVariableValue().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSnapshotFromFile()

void v8::internal::SetSnapshotFromFile ( StartupData snapshot_blob)

Definition at line 111 of file snapshot-external.cc.

111  {
112  DCHECK(snapshot_blob);
113  DCHECK(snapshot_blob->data);
114  DCHECK(snapshot_blob->raw_size > 0);
116 
117  snapshot_impl_ = new SnapshotImpl;
118  SnapshotByteSource source(reinterpret_cast<const byte*>(snapshot_blob->data),
119  snapshot_blob->raw_size);
120 
121  bool success = source.GetBlob(&snapshot_impl_->data,
122  &snapshot_impl_->size);
123  snapshot_impl_->new_space_used = source.GetInt();
124  snapshot_impl_->pointer_space_used = source.GetInt();
125  snapshot_impl_->data_space_used = source.GetInt();
126  snapshot_impl_->code_space_used = source.GetInt();
127  snapshot_impl_->map_space_used = source.GetInt();
128  snapshot_impl_->cell_space_used = source.GetInt();
129  snapshot_impl_->property_cell_space_used = source.GetInt();
130  snapshot_impl_->lo_space_used = source.GetInt();
131 
132  success &= source.GetBlob(&snapshot_impl_->context_data,
134  snapshot_impl_->context_new_space_used = source.GetInt();
135  snapshot_impl_->context_pointer_space_used = source.GetInt();
136  snapshot_impl_->context_data_space_used = source.GetInt();
137  snapshot_impl_->context_code_space_used = source.GetInt();
138  snapshot_impl_->context_map_space_used = source.GetInt();
139  snapshot_impl_->context_cell_space_used = source.GetInt();
141 
142  DCHECK(success);
143 }
static SnapshotImpl * snapshot_impl_

References v8::internal::SnapshotImpl::cell_space_used, v8::internal::SnapshotImpl::code_space_used, v8::internal::SnapshotImpl::context_cell_space_used, v8::internal::SnapshotImpl::context_code_space_used, v8::internal::SnapshotImpl::context_data, v8::internal::SnapshotImpl::context_data_space_used, v8::internal::SnapshotImpl::context_map_space_used, v8::internal::SnapshotImpl::context_new_space_used, v8::internal::SnapshotImpl::context_pointer_space_used, v8::internal::SnapshotImpl::context_property_cell_space_used, v8::internal::SnapshotImpl::context_size, v8::StartupData::data, v8::internal::SnapshotImpl::data, v8::internal::SnapshotImpl::data_space_used, DCHECK, v8::internal::SnapshotImpl::lo_space_used, v8::internal::SnapshotImpl::map_space_used, v8::internal::SnapshotImpl::new_space_used, v8::internal::SnapshotImpl::pointer_space_used, v8::internal::SnapshotImpl::property_cell_space_used, v8::StartupData::raw_size, v8::internal::SnapshotImpl::size, and snapshot_impl_.

Referenced by v8::V8::SetSnapshotDataBlob().

+ Here is the caller graph for this function:

◆ SetUpFrameDropperFrame()

static Object** v8::internal::SetUpFrameDropperFrame ( StackFrame bottom_js_frame,
Handle< Code code 
)
static

Definition at line 1580 of file liveedit.cc.

1581  {
1582  DCHECK(bottom_js_frame->is_java_script());
1583 
1584  Address fp = bottom_js_frame->fp();
1585 
1586  // Move function pointer into "context" slot.
1587  Memory::Object_at(fp + StandardFrameConstants::kContextOffset) =
1588  Memory::Object_at(fp + JavaScriptFrameConstants::kFunctionOffset);
1589 
1590  Memory::Object_at(fp + InternalFrameConstants::kCodeOffset) = *code;
1591  Memory::Object_at(fp + StandardFrameConstants::kMarkerOffset) =
1592  Smi::FromInt(StackFrame::INTERNAL);
1593 
1594  return reinterpret_cast<Object**>(&Memory::Object_at(
1595  fp + StandardFrameConstants::kContextOffset));
1596 }

References DCHECK, fp, v8::internal::Smi::FromInt(), INTERNAL, v8::internal::InternalFrameConstants::kCodeOffset, v8::internal::StandardFrameConstants::kContextOffset, v8::internal::JavaScriptFrameConstants::kFunctionOffset, v8::internal::StandardFrameConstants::kMarkerOffset, and v8::internal::Memory::Object_at().

Referenced by DropFrames().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUpJSCallerSavedCodeData()

void v8::internal::SetUpJSCallerSavedCodeData ( )

Definition at line 1591 of file frames.cc.

1591  {
1592  int i = 0;
1593  for (int r = 0; r < kNumRegs; r++)
1594  if ((kJSCallerSaved & (1 << r)) != 0)
1596 
1598 }
const RegList kJSCallerSaved
Definition: frames-arm.h:24
const int kNumRegs
Definition: frames-arm.h:20

References caller_saved_code_data, DCHECK, kJSCallerSaved, kNumJSCallerSaved, kNumRegs, and v8::internal::JSCallerSavedCodeData::reg_code.

Referenced by v8::internal::V8::InitializeOncePerProcessImpl().

+ Here is the caller graph for this function:

◆ SetVectorContents()

static Vector<const char> v8::internal::SetVectorContents ( char *  chars,
int  size,
bool exists 
)
static

Definition at line 228 of file utils.cc.

230  {
231  if (!chars) {
232  *exists = false;
233  return Vector<const char>::empty();
234  }
235  chars[size] = '\0';
236  *exists = true;
237  return Vector<const char>(chars, size);
238 }
static Vector< const char > empty()
Definition: vector.h:95

References v8::internal::Vector< T >::empty(), and size.

Referenced by ReadFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShiftAmountsAllowReplaceByRotate()

static bool v8::internal::ShiftAmountsAllowReplaceByRotate ( HValue sa,
HValue const32_minus_sa 
)
static

Definition at line 10114 of file hydrogen.cc.

10115  {
10116  if (sa->IsConstant() && const32_minus_sa->IsConstant()) {
10117  const HConstant* c1 = HConstant::cast(sa);
10118  const HConstant* c2 = HConstant::cast(const32_minus_sa);
10119  return c1->HasInteger32Value() && c2->HasInteger32Value() &&
10120  (c1->Integer32Value() + c2->Integer32Value() == 32);
10121  }
10122  if (!const32_minus_sa->IsSub()) return false;
10123  HSub* sub = HSub::cast(const32_minus_sa);
10124  return sub->left()->EqualsInteger32Constant(32) && sub->right() == sa;
10125 }

Referenced by v8::internal::HGraphBuilder::MatchRotateRight().

+ Here is the caller graph for this function:

◆ ShortCircuitConsString()

static HeapObject* v8::internal::ShortCircuitConsString ( Object **  p)
inlinestatic

Definition at line 1317 of file mark-compact.cc.

1317  {
1318  // Optimization: If the heap object pointed to by p is a non-internalized
1319  // cons string whose right substring is HEAP->empty_string, update
1320  // it in place to its left substring. Return the updated value.
1321  //
1322  // Here we assume that if we change *p, we replace it with a heap object
1323  // (i.e., the left substring of a cons string is always a heap object).
1324  //
1325  // The check performed is:
1326  // object->IsConsString() && !object->IsInternalizedString() &&
1327  // (ConsString::cast(object)->second() == HEAP->empty_string())
1328  // except the maps for the object and its possible substrings might be
1329  // marked.
1330  HeapObject* object = HeapObject::cast(*p);
1331  if (!FLAG_clever_optimizations) return object;
1332  Map* map = object->map();
1333  InstanceType type = map->instance_type();
1334  if (!IsShortcutCandidate(type)) return object;
1335 
1336  Object* second = reinterpret_cast<ConsString*>(object)->second();
1337  Heap* heap = map->GetHeap();
1338  if (second != heap->empty_string()) {
1339  return object;
1340  }
1341 
1342  // Since we don't have the object's start, it is impossible to update the
1343  // page dirty marks. Therefore, we only replace the string with its left
1344  // substring when page dirty marks do not change.
1345  Object* first = reinterpret_cast<ConsString*>(object)->first();
1346  if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object;
1347 
1348  *p = first;
1349  return HeapObject::cast(first);
1350 }
static bool IsShortcutCandidate(int type)
Definition: objects.h:605

References v8::internal::Heap::InNewSpace(), IsShortcutCandidate(), and map.

Referenced by v8::internal::MarkCompactMarkingVisitor::INLINE(), and v8::internal::RootMarkingVisitor::MarkObjectByPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShortCutEmitCharacterPair()

static bool v8::internal::ShortCutEmitCharacterPair ( RegExpMacroAssembler macro_assembler,
bool  one_byte,
uc16  c1,
uc16  c2,
Label *  on_failure 
)
static

Definition at line 1670 of file jsregexp.cc.

1672  {
1673  uc16 char_mask;
1674  if (one_byte) {
1675  char_mask = String::kMaxOneByteCharCode;
1676  } else {
1677  char_mask = String::kMaxUtf16CodeUnit;
1678  }
1679  uc16 exor = c1 ^ c2;
1680  // Check whether exor has only one bit set.
1681  if (((exor - 1) & exor) == 0) {
1682  // If c1 and c2 differ only by one bit.
1683  // Ecma262UnCanonicalize always gives the highest number last.
1684  DCHECK(c2 > c1);
1685  uc16 mask = char_mask ^ exor;
1686  macro_assembler->CheckNotCharacterAfterAnd(c1, mask, on_failure);
1687  return true;
1688  }
1689  DCHECK(c2 > c1);
1690  uc16 diff = c2 - c1;
1691  if (((diff - 1) & diff) == 0 && c1 >= diff) {
1692  // If the characters differ by 2^n but don't differ by one bit then
1693  // subtract the difference from the found character, then do the or
1694  // trick. We avoid the theoretical case where negative numbers are
1695  // involved in order to simplify code generation.
1696  uc16 mask = char_mask ^ diff;
1697  macro_assembler->CheckNotCharacterAfterMinusAnd(c1 - diff,
1698  diff,
1699  mask,
1700  on_failure);
1701  return true;
1702  }
1703  return false;
1704 }

References v8::internal::RegExpMacroAssembler::CheckNotCharacterAfterAnd(), v8::internal::RegExpMacroAssembler::CheckNotCharacterAfterMinusAnd(), DCHECK, v8::internal::String::kMaxOneByteCharCode, and v8::internal::String::kMaxUtf16CodeUnit.

Referenced by EmitAtomLetter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShouldStartSweeperThreads()

static bool v8::internal::ShouldStartSweeperThreads ( MarkCompactCollector::SweeperType  type)
static

Definition at line 4248 of file mark-compact.cc.

4248  {
4249  return type == MarkCompactCollector::PARALLEL_SWEEPING ||
4250  type == MarkCompactCollector::CONCURRENT_SWEEPING;
4251 }

References v8::internal::MarkCompactCollector::CONCURRENT_SWEEPING, and v8::internal::MarkCompactCollector::PARALLEL_SWEEPING.

Referenced by v8::internal::MarkCompactCollector::SweepSpaces().

+ Here is the caller graph for this function:

◆ ShouldWaitForSweeperThreads()

static bool v8::internal::ShouldWaitForSweeperThreads ( MarkCompactCollector::SweeperType  type)
static

Definition at line 4254 of file mark-compact.cc.

4255  {
4256  return type == MarkCompactCollector::PARALLEL_SWEEPING;
4257 }

References v8::internal::MarkCompactCollector::PARALLEL_SWEEPING.

Referenced by v8::internal::MarkCompactCollector::SweepSpaces().

+ Here is the caller graph for this function:

◆ ShrinkInstanceSize()

static void v8::internal::ShrinkInstanceSize ( Map map,
void *  data 
)
static

Definition at line 9971 of file objects.cc.

9971  {
9972  int slack = *reinterpret_cast<int*>(data);
9973  map->set_inobject_properties(map->inobject_properties() - slack);
9974  map->set_unused_property_fields(map->unused_property_fields() - slack);
9975  map->set_instance_size(map->instance_size() - slack * kPointerSize);
9976 
9977  // Visitor id might depend on the instance size, recalculate it.
9978  map->set_visitor_id(StaticVisitorBase::GetVisitorId(map));
9979 }

References v8::internal::StaticVisitorBase::GetVisitorId(), kPointerSize, and map.

Referenced by v8::internal::JSFunction::CompleteInobjectSlackTracking().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signed_bitextract_32()

int32_t v8::internal::signed_bitextract_32 ( int  msb,
int  lsb,
int32_t  x 
)
inline

Definition at line 888 of file utils.h.

888  {
889  return (x << (31 - msb)) >> (lsb + 31 - msb);
890 }

Referenced by v8::internal::Instruction::ImmPCRel(), and v8::internal::Instruction::SignedBits().

+ Here is the caller graph for this function:

◆ signed_bitextract_64()

int v8::internal::signed_bitextract_64 ( int  msb,
int  lsb,
int  x 
)
inline

Definition at line 892 of file utils.h.

892  {
893  // TODO(jbramley): This is broken for big bitfields.
894  return (x << (63 - msb)) >> (lsb + 63 - msb);
895 }

◆ SignedZero()

double v8::internal::SignedZero ( bool  negative)
inline

Definition at line 32 of file conversions-inl.h.

32  {
34 }
const int kSignMask

References v8::internal::Double::kSignMask, negative, and uint64_to_double().

Referenced by InternalStringToDouble(), InternalStringToInt(), and InternalStringToIntDouble().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeInHexChars()

template<typename S >
static int v8::internal::SizeInHexChars ( S  number)
static

Definition at line 531 of file bignum.cc.

531  {
532  DCHECK(number > 0);
533  int result = 0;
534  while (number != 0) {
535  number >>= 4;
536  result++;
537  }
538  return result;
539 }

References DCHECK.

Referenced by v8::internal::Bignum::ToHexString().

+ Here is the caller graph for this function:

◆ SkipBlackSpace()

static char* v8::internal::SkipBlackSpace ( char *  p)
static

Definition at line 465 of file flags.cc.

465  {
466  while (*p != '\0' && isspace(*p) == 0) p++;
467  return p;
468 }

Referenced by v8::internal::FlagList::SetFlagsFromString().

+ Here is the caller graph for this function:

◆ SkipWhiteSpace()

static char* v8::internal::SkipWhiteSpace ( char *  p)
static

Definition at line 459 of file flags.cc.

459  {
460  while (*p != '\0' && isspace(*p) != 0) p++;
461  return p;
462 }

Referenced by v8::internal::FlagList::SetFlagsFromString().

+ Here is the caller graph for this function:

◆ SlotTypeForRMode()

static SlotsBuffer::SlotType v8::internal::SlotTypeForRMode ( RelocInfo::Mode  rmode)
inlinestatic

Definition at line 4422 of file mark-compact.cc.

4422  {
4423  if (RelocInfo::IsCodeTarget(rmode)) {
4424  return SlotsBuffer::CODE_TARGET_SLOT;
4425  } else if (RelocInfo::IsEmbeddedObject(rmode)) {
4426  return SlotsBuffer::EMBEDDED_OBJECT_SLOT;
4427  } else if (RelocInfo::IsDebugBreakSlot(rmode)) {
4428  return SlotsBuffer::DEBUG_TARGET_SLOT;
4429  } else if (RelocInfo::IsJSReturn(rmode)) {
4430  return SlotsBuffer::JS_RETURN_SLOT;
4431  }
4432  UNREACHABLE();
4433  return SlotsBuffer::NUMBER_OF_SLOT_TYPES;
4434 }

References v8::internal::SlotsBuffer::CODE_TARGET_SLOT, v8::internal::SlotsBuffer::DEBUG_TARGET_SLOT, v8::internal::SlotsBuffer::EMBEDDED_OBJECT_SLOT, v8::internal::RelocInfo::IsCodeTarget(), v8::internal::RelocInfo::IsDebugBreakSlot(), v8::internal::RelocInfo::IsEmbeddedObject(), v8::internal::RelocInfo::IsJSReturn(), v8::internal::SlotsBuffer::JS_RETURN_SLOT, v8::internal::SlotsBuffer::NUMBER_OF_SLOT_TYPES, and UNREACHABLE.

Referenced by v8::internal::MarkCompactCollector::RecordRelocSlot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SmearBitsRight()

static uint32_t v8::internal::SmearBitsRight ( uint32_t  v)
inlinestatic

Definition at line 2411 of file jsregexp.cc.

2411  {
2412  v |= v >> 1;
2413  v |= v >> 2;
2414  v |= v >> 4;
2415  v |= v >> 8;
2416  v |= v >> 16;
2417  return v;
2418 }

Referenced by v8::internal::TextNode::GetQuickCheckDetails().

+ Here is the caller graph for this function:

◆ SmiValuesAre31Bits()

static bool v8::internal::SmiValuesAre31Bits ( )
inlinestatic

◆ SmiValuesAre32Bits()

◆ SnapshotObjectIdHash()

static uint32_t v8::internal::SnapshotObjectIdHash ( SnapshotObjectId  id)
static

Definition at line 259 of file allocation-tracker.cc.

259  {
260  return ComputeIntegerHash(static_cast<uint32_t>(id),
262 }

References ComputeIntegerHash(), and kZeroHashSeed.

Referenced by v8::internal::AllocationTracker::AddFunctionInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SNPrintF()

int FPRINTF_CHECKING v8::internal::SNPrintF ( Vector< char >  str,
const char *  format,
  ... 
)

Definition at line 105 of file utils.cc.

105  {
106  va_list args;
107  va_start(args, format);
108  int result = VSNPrintF(str, format, args);
109  va_end(args);
110  return result;
111 }
int VSNPrintF(Vector< char > str, const char *format, va_list args)
Definition: utils.cc:114

References VSNPrintF().

Referenced by v8::internal::OutputStreamWriter::AddNumberImpl(), v8::internal::CodeEventLogger::NameBuffer::AppendHex(), v8::internal::CodeEventLogger::NameBuffer::AppendInt(), v8::internal::GCExtension::BuildSource(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CodeTracer(), v8::internal::Version::GetSONAME(), v8::internal::Version::GetString(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HTracer(), v8::internal::PerfBasicLogger::PerfBasicLogger(), and v8::internal::compiler::Pipeline::VerifyAndPrintGraph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SortByIds()

template<class T >
static int v8::internal::SortByIds ( const T entry1_ptr,
const T entry2_ptr 
)
static

Definition at line 318 of file heap-snapshot-generator.cc.

319  {
320  if ((*entry1_ptr)->id() == (*entry2_ptr)->id()) return 0;
321  return (*entry1_ptr)->id() < (*entry2_ptr)->id() ? -1 : 1;
322 }

Referenced by v8::internal::HeapSnapshot::GetSortedEntriesList().

+ Here is the caller graph for this function:

◆ SortedListBSearch() [1/2]

template<typename T , typename P >
int v8::internal::SortedListBSearch ( const List< T > &  list,
P  cmp 
)

Definition at line 219 of file list-inl.h.

219  {
220  int low = 0;
221  int high = list.length() - 1;
222  while (low <= high) {
223  int mid = (low + high) / 2;
224  T mid_elem = list[mid];
225 
226  if (cmp(&mid_elem) > 0) {
227  high = mid - 1;
228  continue;
229  }
230  if (cmp(&mid_elem) < 0) {
231  low = mid + 1;
232  continue;
233  }
234  // Found the elememt.
235  return mid;
236  }
237  return -1;
238 }

References T.

Referenced by v8::internal::HeapSnapshot::GetEntryById().

+ Here is the caller graph for this function:

◆ SortedListBSearch() [2/2]

template<typename T >
int v8::internal::SortedListBSearch ( const List< T > &  list,
T  elem 
)

Definition at line 254 of file list-inl.h.

254  {
255  return SortedListBSearch<T, ElementCmp<T> > (list, ElementCmp<T>(elem));
256 }

◆ SplitArgument()

static void v8::internal::SplitArgument ( const char *  arg,
char *  buffer,
int  buffer_size,
const char **  name,
const char **  value,
bool is_bool 
)
static

Definition at line 267 of file flags.cc.

272  {
273  *name = NULL;
274  *value = NULL;
275  *is_bool = false;
276 
277  if (arg != NULL && *arg == '-') {
278  // find the begin of the flag name
279  arg++; // remove 1st '-'
280  if (*arg == '-') {
281  arg++; // remove 2nd '-'
282  if (arg[0] == '\0') {
283  const char* kJSArgumentsFlagName = "js_arguments";
284  *name = kJSArgumentsFlagName;
285  return;
286  }
287  }
288  if (arg[0] == 'n' && arg[1] == 'o') {
289  arg += 2; // remove "no"
290  if (NormalizeChar(arg[0]) == '-') arg++; // remove dash after "no".
291  *is_bool = true;
292  }
293  *name = arg;
294 
295  // find the end of the flag name
296  while (*arg != '\0' && *arg != '=')
297  arg++;
298 
299  // get the value if any
300  if (*arg == '=') {
301  // make a copy so we can NUL-terminate flag name
302  size_t n = arg - *name;
303  CHECK(n < static_cast<size_t>(buffer_size)); // buffer is too small
304  MemCopy(buffer, *name, n);
305  buffer[n] = '\0';
306  *name = buffer;
307  // get the value
308  *value = arg + 1;
309  }
310  }
311 }

References CHECK, MemCopy(), name, NormalizeChar(), and NULL.

Referenced by v8::internal::FlagList::SetFlagsFromCommandLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SplitSearchSpace()

static void v8::internal::SplitSearchSpace ( ZoneList< int > *  ranges,
int  start_index,
int  end_index,
int new_start_index,
int new_end_index,
int border 
)
static

Definition at line 1893 of file jsregexp.cc.

1898  {
1899  static const int kSize = RegExpMacroAssembler::kTableSize;
1900  static const int kMask = RegExpMacroAssembler::kTableMask;
1901 
1902  int first = ranges->at(start_index);
1903  int last = ranges->at(end_index) - 1;
1904 
1905  *new_start_index = start_index;
1906  *border = (ranges->at(start_index) & ~kMask) + kSize;
1907  while (*new_start_index < end_index) {
1908  if (ranges->at(*new_start_index) > *border) break;
1909  (*new_start_index)++;
1910  }
1911  // new_start_index is the index of the first edge that is beyond the
1912  // current kSize space.
1913 
1914  // For very large search spaces we do a binary chop search of the non-Latin1
1915  // space instead of just going to the end of the current kSize space. The
1916  // heuristics are complicated a little by the fact that any 128-character
1917  // encoding space can be quickly tested with a table lookup, so we don't
1918  // wish to do binary chop search at a smaller granularity than that. A
1919  // 128-character space can take up a lot of space in the ranges array if,
1920  // for example, we only want to match every second character (eg. the lower
1921  // case characters on some Unicode pages).
1922  int binary_chop_index = (end_index + start_index) / 2;
1923  // The first test ensures that we get to the code that handles the Latin1
1924  // range with a single not-taken branch, speeding up this important
1925  // character range (even non-Latin1 charset-based text has spaces and
1926  // punctuation).
1927  if (*border - 1 > String::kMaxOneByteCharCode && // Latin1 case.
1928  end_index - start_index > (*new_start_index - start_index) * 2 &&
1929  last - first > kSize * 2 && binary_chop_index > *new_start_index &&
1930  ranges->at(binary_chop_index) >= first + 2 * kSize) {
1931  int scan_forward_for_section_border = binary_chop_index;;
1932  int new_border = (ranges->at(binary_chop_index) | kMask) + 1;
1933 
1934  while (scan_forward_for_section_border < end_index) {
1935  if (ranges->at(scan_forward_for_section_border) > new_border) {
1936  *new_start_index = scan_forward_for_section_border;
1937  *border = new_border;
1938  break;
1939  }
1940  scan_forward_for_section_border++;
1941  }
1942  }
1943 
1944  DCHECK(*new_start_index > start_index);
1945  *new_end_index = *new_start_index - 1;
1946  if (ranges->at(*new_end_index) == *border) {
1947  (*new_end_index)--;
1948  }
1949  if (*border >= ranges->at(end_index)) {
1950  *border = ranges->at(end_index);
1951  *new_start_index = end_index; // Won't be used.
1952  *new_end_index = end_index - 1;
1953  }
1954 }

References v8::internal::List< T, AllocationPolicy >::at(), DCHECK, v8::internal::String::kMaxOneByteCharCode, v8::internal::RegExpMacroAssembler::kTableMask, and v8::internal::RegExpMacroAssembler::kTableSize.

Referenced by GenerateBranches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StackOperandForReturnAddress()

Operand v8::internal::StackOperandForReturnAddress ( int32_t  disp)
inline

Definition at line 1623 of file macro-assembler-x64.h.

1623  {
1624  return Operand(rsp, disp);
1625 }
const Register rsp

References rsp.

◆ StackSize()

static int v8::internal::StackSize ( Isolate isolate)
static

Definition at line 4378 of file runtime.cc.

4378  {
4379  int n = 0;
4380  for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) n++;
4381  return n;
4382 }

Referenced by PrintTransition().

+ Here is the caller graph for this function:

◆ StackSlotOffset()

int v8::internal::StackSlotOffset ( int  index)

Definition at line 254 of file lithium.cc.

254  {
255  if (index >= 0) {
256  // Local or spill slot. Skip the frame pointer, function, and
257  // context in the fixed part of the frame.
258  return -(index + 1) * kPointerSize -
259  StandardFrameConstants::kFixedFrameSizeFromFp;
260  } else {
261  // Incoming parameter. Skip the return address.
262  return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize;
263  }
264 }
const int kPCOnStackSize
Definition: globals.h:135
const int kFPOnStackSize
Definition: globals.h:136

References v8::internal::StandardFrameConstants::kFixedFrameSizeFromFp, kFPOnStackSize, kPCOnStackSize, and kPointerSize.

Referenced by v8::internal::LCodeGen::ToHighMemOperand(), and v8::internal::LCodeGen::ToMemOperand().

+ Here is the caller graph for this function:

◆ StackSpaceOperand()

Operand v8::internal::StackSpaceOperand ( int  index)
inline

Definition at line 1613 of file macro-assembler-x64.h.

1613  {
1614 #ifdef _WIN64
1615  const int kShaddowSpace = 4;
1616  return Operand(rsp, (index + kShaddowSpace) * kPointerSize);
1617 #else
1618  return Operand(rsp, index * kPointerSize);
1619 #endif
1620 }

References kPointerSize, and rsp.

◆ StateToString()

const char* v8::internal::StateToString ( StateTag  state)
inline

Definition at line 20 of file vm-state-inl.h.

20  {
21  switch (state) {
22  case JS:
23  return "JS";
24  case GC:
25  return "GC";
26  case COMPILER:
27  return "COMPILER";
28  case OTHER:
29  return "OTHER";
30  case EXTERNAL:
31  return "EXTERNAL";
32  default:
33  UNREACHABLE();
34  return NULL;
35  }
36 }

References COMPILER, EXTERNAL, GC, JS, NULL, OTHER, and UNREACHABLE.

◆ STATIC_ASSERT() [1/33]

v8::internal::STATIC_ASSERT ( (ConstantPoolArray::kExtendedFirstOffset &kDoubleAlignmentMask = =0)

◆ STATIC_ASSERT() [2/33]

v8::internal::STATIC_ASSERT ( (ConstantPoolArray::kFirstEntryOffset &kDoubleAlignmentMask = =0)

◆ STATIC_ASSERT() [3/33]

v8::internal::STATIC_ASSERT ( (FixedDoubleArray::kHeaderSize &kDoubleAlignmentMask = =0)

◆ STATIC_ASSERT() [4/33]

v8::internal::STATIC_ASSERT ( (kConsStringTag &kIsIndirectStringMask = =kIsIndirectStringTag)

◆ STATIC_ASSERT() [5/33]

v8::internal::STATIC_ASSERT ( (kExternalStringTag &kIsIndirectStringMask = =0)

◆ STATIC_ASSERT() [6/33]

◆ STATIC_ASSERT() [7/33]

◆ STATIC_ASSERT() [8/33]

v8::internal::STATIC_ASSERT ( (kSeqStringTag &kIsIndirectStringMask = =0)

◆ STATIC_ASSERT() [9/33]

v8::internal::STATIC_ASSERT ( (kSlicedStringTag &kIsIndirectStringMask = =kIsIndirectStringTag)

◆ STATIC_ASSERT() [10/33]

◆ STATIC_ASSERT() [11/33]

v8::internal::STATIC_ASSERT ( (static_cast< int32_t >(-1) >> 1)  = =-1)

◆ STATIC_ASSERT() [12/33]

v8::internal::STATIC_ASSERT ( (static_cast< uint32_t >(-1) >> 1)  = =0x7FFFFFFF)

◆ STATIC_ASSERT() [13/33]

◆ STATIC_ASSERT() [14/33]

◆ STATIC_ASSERT() [15/33]

v8::internal::STATIC_ASSERT ( FIRST_NONSTRING_TYPE  = =Internals::kFirstNonstringType)

◆ STATIC_ASSERT() [16/33]

v8::internal::STATIC_ASSERT ( FOREIGN_TYPE  = =Internals::kForeignType)

◆ STATIC_ASSERT() [17/33]

v8::internal::STATIC_ASSERT ( IS_POWER_OF_TWO(kSlicedNotConsMask )

◆ STATIC_ASSERT() [18/33]

v8::internal::STATIC_ASSERT ( JS_OBJECT_TYPE  = =Internals::kJSObjectType)

◆ STATIC_ASSERT() [19/33]

◆ STATIC_ASSERT() [20/33]

v8::internal::STATIC_ASSERT ( kJSSPCode  = =28)

◆ STATIC_ASSERT() [21/33]

v8::internal::STATIC_ASSERT ( )

◆ STATIC_ASSERT() [22/33]

v8::internal::STATIC_ASSERT ( kPointerSize  = =(1<< kPointerSizeLog2))

◆ STATIC_ASSERT() [23/33]

v8::internal::STATIC_ASSERT ( NUMBER_OF_CONSTRAINTS<=  8)

◆ STATIC_ASSERT() [24/33]

v8::internal::STATIC_ASSERT ( ODDBALL_TYPE  = =Internals::kOddballType)

◆ STATIC_ASSERT() [25/33]

v8::internal::STATIC_ASSERT ( sizeof(CPURegister = =sizeof(Register))

Referenced by v8::internal::RegExpImpl::AtomExec(), v8::internal::HOptimizedGraphBuilder::BuildAllocateFixedTypedArray(), v8::internal::LCodeGen::BuildSeqStringOperand(), BUILTIN(), v8::internal::anonymous_namespace{builtins.cc}::BuiltinArguments< extra_args >::called_function(), v8::internal::HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessAsMonomorphic(), v8::internal::Map::CanTransition(), CommonStubCacheChecks(), v8::internal::InitializeFastElementsKindSequence::Construct(), CopyBytes(), CopyWords(), v8::internal::LCodeGen::DoDeferredTaggedToI(), DropFrames(), v8::internal::LCodeGen::EmitClassOfTest(), v8::internal::LCodeGen::EmitTypeofIs(), v8::internal::V8HeapExplorer::ExtractAllocationSiteReferences(), v8::internal::V8HeapExplorer::ExtractContextReferences(), v8::internal::V8HeapExplorer::ExtractJSObjectReferences(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::ForMapInstanceTypeAndBitField(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::ForStringLength(), GetDefaultHeaderSizeForElementsKind(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess(), v8::internal::HeapSnapshot::HeapSnapshot(), v8::internal::Immediate::Immediate(), v8::internal::ImmediateInitializer< T >::immediate_for(), v8::internal::ReplacementStringBuilder::IncrementCharacterCount(), v8::internal::Scanner::Init(), v8::internal::HGraphBuilder::FINAL::initial_capacity(), v8::internal::ElementsAccessor::InitializeOncePerProcess(), v8::internal::BASE_EMBEDDED< Visitor >::INLINE(), v8::internal::RegExpImpl::IrregexpExecRaw(), v8::internal::anonymous_namespace{builtins.cc}::BuiltinArguments< extra_args >::length(), v8::internal::CompleteParserRecorder::LogMessage(), v8::internal::StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::MarkInlinedFunctionsCode(), MoveWords(), v8::internal::GlobalHandles::Node::Node(), v8::internal::PerIsolateAssertScope< type, allow >::PerIsolateAssertScope(), v8::internal::LCodeGen::PrepareKeyedArrayOperand(), v8::internal::StubCache::PrimaryOffset(), v8::internal::CpuFeatures::Probe(), v8::internal::MarkCompactCollector::ProcessMapCaches(), v8::internal::CodeFlusher::ProcessOptimizedCodeMaps(), v8::internal::VisitorDispatchTable< Callback >::RegisterSpecializations(), RUNTIME_FUNCTION(), v8::internal::SafeStackFrameIterator::SafeStackFrameIterator(), v8::internal::SerializedCodeData::SerializedCodeData(), v8::internal::Differencer::StaticAssertHolder(), StringReplaceGlobalAtomRegExpWithString(), v8::internal::Operand::UntagSmi(), v8::internal::Operand::UntagSmiAndScale(), UntagSmiMemOperand(), utoa(), utoa_impl(), v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitJSFunctionStrongCode(), v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitJSFunctionWeakCode(), and v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitSharedFunctionInfoWeakCode().

+ Here is the caller graph for this function:

◆ STATIC_ASSERT() [26/33]

v8::internal::STATIC_ASSERT ( sizeof(LargePage)<=MemoryChunk::kHeaderSize  )

◆ STATIC_ASSERT() [27/33]

v8::internal::STATIC_ASSERT ( sizeof(MemoryChunk)<=MemoryChunk::kHeaderSize  )

◆ STATIC_ASSERT() [28/33]

v8::internal::STATIC_ASSERT ( sizeof(Page)<=MemoryChunk::kHeaderSize  )

◆ STATIC_ASSERT() [29/33]

v8::internal::STATIC_ASSERT ( STANDARD_STORE  = =0)

◆ STATIC_ASSERT() [30/33]

v8::internal::STATIC_ASSERT ( static_cast< uint32_t kStringEncodingMask = =Internals::kStringEncodingMask)

◆ STATIC_ASSERT() [31/33]

v8::internal::STATIC_ASSERT ( Token::NUM_TOKENS<=  0x100)

◆ STATIC_ASSERT() [32/33]

v8::internal::STATIC_ASSERT ( v8::String::ONE_BYTE_ENCODING  = =kOneByteStringTag)

◆ STATIC_ASSERT() [33/33]

v8::internal::STATIC_ASSERT ( v8::String::TWO_BYTE_ENCODING  = =kTwoByteStringTag)

◆ StoreToSuper()

static Object* v8::internal::StoreToSuper ( Isolate isolate,
Handle< JSObject home_object,
Handle< Object receiver,
Handle< Name name,
Handle< Object value,
StrictMode  strict_mode 
)
static

Definition at line 900 of file runtime.cc.

902  {
903  if (home_object->IsAccessCheckNeeded() &&
904  !isolate->MayNamedAccess(home_object, name, v8::ACCESS_SET)) {
905  isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_SET);
907  }
908 
909  PrototypeIterator iter(isolate, home_object);
910  Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
911  if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value();
912 
913  LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
914  Handle<Object> result;
916  isolate, result,
917  Object::SetProperty(&it, value, strict_mode,
918  Object::CERTAINLY_NOT_STORE_FROM_KEYED,
919  Object::SUPER_PROPERTY));
920  return *result;
921 }

References v8::ACCESS_SET, ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::Object::CERTAINLY_NOT_STORE_FROM_KEYED, v8::internal::PrototypeIterator::GetCurrent(), v8::internal::Isolate::heap(), v8::internal::Isolate::MayNamedAccess(), name, v8::internal::Isolate::ReportFailedAccessCheck(), RETURN_FAILURE_IF_SCHEDULED_EXCEPTION, v8::internal::Object::SetProperty(), and v8::internal::Object::SUPER_PROPERTY.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoringValueNeedsWriteBarrier()

bool v8::internal::StoringValueNeedsWriteBarrier ( HValue value)
inline

Definition at line 5762 of file hydrogen-instructions.h.

5762  {
5763  return !value->type().IsSmi()
5764  && !value->type().IsNull()
5765  && !value->type().IsBoolean()
5766  && !value->type().IsUndefined()
5767  && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
5768 }

References v8::internal::HValue::type().

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::NeedsWriteBarrier().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StrDup()

char * v8::internal::StrDup ( const char *  str)

Definition at line 67 of file allocation.cc.

67  {
68  int length = StrLength(str);
69  char* result = NewArray<char>(length + 1);
70  MemCopy(result, str, length);
71  result[length] = '\0';
72  return result;
73 }

References MemCopy(), and StrLength().

Referenced by v8::internal::FlagList::argv(), DoubleToFixedCString(), and v8::internal::FlagList::SetFlagsFromCommandLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringBuilderConcatHelper()

template<typename sinkchar >
static void v8::internal::StringBuilderConcatHelper ( String special,
sinkchar *  sink,
FixedArray fixed_array,
int  array_length 
)
inlinestatic

Definition at line 22 of file string-builder.h.

24  {
26  int position = 0;
27  for (int i = 0; i < array_length; i++) {
28  Object* element = fixed_array->get(i);
29  if (element->IsSmi()) {
30  // Smi encoding of position and length.
31  int encoded_slice = Smi::cast(element)->value();
32  int pos;
33  int len;
34  if (encoded_slice > 0) {
35  // Position and length encoded in one smi.
36  pos = StringBuilderSubstringPosition::decode(encoded_slice);
37  len = StringBuilderSubstringLength::decode(encoded_slice);
38  } else {
39  // Position and length encoded in two smis.
40  Object* obj = fixed_array->get(++i);
41  DCHECK(obj->IsSmi());
42  pos = Smi::cast(obj)->value();
43  len = -encoded_slice;
44  }
45  String::WriteToFlat(special, sink + position, pos, pos + len);
46  position += len;
47  } else {
48  String* string = String::cast(element);
49  int element_length = string->length();
50  String::WriteToFlat(string, sink + position, 0, element_length);
51  position += element_length;
52  }
53  }
54 }

References DCHECK, v8::internal::BitFieldBase< T, shift, size, uint32_t >::decode(), v8::internal::FixedArray::get(), and v8::internal::String::WriteToFlat().

Referenced by RUNTIME_FUNCTION(), and v8::internal::ReplacementStringBuilder::ToString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringBuilderConcatLength()

static int v8::internal::StringBuilderConcatLength ( int  special_length,
FixedArray fixed_array,
int  array_length,
bool one_byte 
)
inlinestatic

Definition at line 59 of file string-builder.h.

61  {
63  int position = 0;
64  for (int i = 0; i < array_length; i++) {
65  int increment = 0;
66  Object* elt = fixed_array->get(i);
67  if (elt->IsSmi()) {
68  // Smi encoding of position and length.
69  int smi_value = Smi::cast(elt)->value();
70  int pos;
71  int len;
72  if (smi_value > 0) {
73  // Position and length encoded in one smi.
74  pos = StringBuilderSubstringPosition::decode(smi_value);
75  len = StringBuilderSubstringLength::decode(smi_value);
76  } else {
77  // Position and length encoded in two smis.
78  len = -smi_value;
79  // Get the position and check that it is a positive smi.
80  i++;
81  if (i >= array_length) return -1;
82  Object* next_smi = fixed_array->get(i);
83  if (!next_smi->IsSmi()) return -1;
84  pos = Smi::cast(next_smi)->value();
85  if (pos < 0) return -1;
86  }
87  DCHECK(pos >= 0);
88  DCHECK(len >= 0);
89  if (pos > special_length || len > special_length - pos) return -1;
90  increment = len;
91  } else if (elt->IsString()) {
92  String* element = String::cast(elt);
93  int element_length = element->length();
94  increment = element_length;
95  if (*one_byte && !element->HasOnlyOneByteChars()) {
96  *one_byte = false;
97  }
98  } else {
99  return -1;
100  }
101  if (increment > String::kMaxLength - position) {
102  return kMaxInt; // Provoke throw on allocation.
103  }
104  position += increment;
105  }
106  return position;
107 }

References DCHECK, v8::internal::BitFieldBase< T, shift, size, uint32_t >::decode(), v8::internal::FixedArray::get(), v8::internal::String::HasOnlyOneByteChars(), kMaxInt, v8::internal::String::kMaxLength, and v8::internal::String::length().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringMatchBackwards()

template<typename schar , typename pchar >
static int v8::internal::StringMatchBackwards ( Vector< const schar >  subject,
Vector< const pchar >  pattern,
int  idx 
)
static

Definition at line 110 of file runtime-strings.cc.

111  {
112  int pattern_length = pattern.length();
113  DCHECK(pattern_length >= 1);
114  DCHECK(idx + pattern_length <= subject.length());
115 
116  if (sizeof(schar) == 1 && sizeof(pchar) > 1) {
117  for (int i = 0; i < pattern_length; i++) {
118  uc16 c = pattern[i];
119  if (c > String::kMaxOneByteCharCode) {
120  return -1;
121  }
122  }
123  }
124 
125  pchar pattern_first_char = pattern[0];
126  for (int i = idx; i >= 0; i--) {
127  if (subject[i] != pattern_first_char) continue;
128  int j = 1;
129  while (j < pattern_length) {
130  if (pattern[j] != subject[i + j]) {
131  break;
132  }
133  j++;
134  }
135  if (j == pattern_length) {
136  return i;
137  }
138  }
139  return -1;
140 }

References DCHECK, v8::internal::String::kMaxOneByteCharCode, and v8::internal::Vector< T >::length().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringReplaceGlobalAtomRegExpWithString()

template<typename ResultSeqString >
static MUST_USE_RESULT Object* v8::internal::StringReplaceGlobalAtomRegExpWithString ( Isolate isolate,
Handle< String subject,
Handle< JSRegExp pattern_regexp,
Handle< String replacement,
Handle< JSArray last_match_info 
)
static

Definition at line 390 of file runtime-regexp.cc.

392  {
393  DCHECK(subject->IsFlat());
394  DCHECK(replacement->IsFlat());
395 
396  ZoneScope zone_scope(isolate->runtime_zone());
397  ZoneList<int> indices(8, zone_scope.zone());
398  DCHECK_EQ(JSRegExp::ATOM, pattern_regexp->TypeTag());
399  String* pattern =
400  String::cast(pattern_regexp->DataAt(JSRegExp::kAtomPatternIndex));
401  int subject_len = subject->length();
402  int pattern_len = pattern->length();
403  int replacement_len = replacement->length();
404 
405  FindStringIndicesDispatch(isolate, *subject, pattern, &indices, 0xffffffff,
406  zone_scope.zone());
407 
408  int matches = indices.length();
409  if (matches == 0) return *subject;
410 
411  // Detect integer overflow.
412  int64_t result_len_64 = (static_cast<int64_t>(replacement_len) -
413  static_cast<int64_t>(pattern_len)) *
414  static_cast<int64_t>(matches) +
415  static_cast<int64_t>(subject_len);
416  int result_len;
417  if (result_len_64 > static_cast<int64_t>(String::kMaxLength)) {
418  STATIC_ASSERT(String::kMaxLength < kMaxInt);
419  result_len = kMaxInt; // Provoke exception.
420  } else {
421  result_len = static_cast<int>(result_len_64);
422  }
423 
424  int subject_pos = 0;
425  int result_pos = 0;
426 
427  MaybeHandle<SeqString> maybe_res;
428  if (ResultSeqString::kHasOneByteEncoding) {
429  maybe_res = isolate->factory()->NewRawOneByteString(result_len);
430  } else {
431  maybe_res = isolate->factory()->NewRawTwoByteString(result_len);
432  }
433  Handle<SeqString> untyped_res;
434  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, untyped_res, maybe_res);
435  Handle<ResultSeqString> result = Handle<ResultSeqString>::cast(untyped_res);
436 
437  for (int i = 0; i < matches; i++) {
438  // Copy non-matched subject content.
439  if (subject_pos < indices.at(i)) {
440  String::WriteToFlat(*subject, result->GetChars() + result_pos,
441  subject_pos, indices.at(i));
442  result_pos += indices.at(i) - subject_pos;
443  }
444 
445  // Replace match.
446  if (replacement_len > 0) {
447  String::WriteToFlat(*replacement, result->GetChars() + result_pos, 0,
448  replacement_len);
449  result_pos += replacement_len;
450  }
451 
452  subject_pos = indices.at(i) + pattern_len;
453  }
454  // Add remaining subject content at the end.
455  if (subject_pos < subject_len) {
456  String::WriteToFlat(*subject, result->GetChars() + result_pos, subject_pos,
457  subject_len);
458  }
459 
460  int32_t match_indices[] = {indices.at(matches - 1),
461  indices.at(matches - 1) + pattern_len};
462  RegExpImpl::SetLastMatchInfo(last_match_info, subject, 0, match_indices);
463 
464  return *result;
465 }

References ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::List< T, AllocationPolicy >::at(), v8::internal::JSRegExp::ATOM, v8::internal::Handle< T >::cast(), DCHECK, DCHECK_EQ, v8::internal::Isolate::factory(), FindStringIndicesDispatch(), v8::internal::JSRegExp::kAtomPatternIndex, kMaxInt, v8::internal::String::kMaxLength, v8::internal::String::length(), v8::internal::Isolate::runtime_zone(), v8::internal::RegExpImpl::SetLastMatchInfo(), STATIC_ASSERT(), v8::internal::String::WriteToFlat(), and v8::internal::ZoneScope::zone().

+ Here is the call graph for this function:

◆ StringReplaceGlobalRegExpWithEmptyString()

template<typename ResultSeqString >
static MUST_USE_RESULT Object* v8::internal::StringReplaceGlobalRegExpWithEmptyString ( Isolate isolate,
Handle< String subject,
Handle< JSRegExp regexp,
Handle< JSArray last_match_info 
)
static

Definition at line 553 of file runtime-regexp.cc.

555  {
556  DCHECK(subject->IsFlat());
557 
558  // Shortcut for simple non-regexp global replacements
559  if (regexp->TypeTag() == JSRegExp::ATOM) {
560  Handle<String> empty_string = isolate->factory()->empty_string();
561  if (subject->IsOneByteRepresentation()) {
562  return StringReplaceGlobalAtomRegExpWithString<SeqOneByteString>(
563  isolate, subject, regexp, empty_string, last_match_info);
564  } else {
565  return StringReplaceGlobalAtomRegExpWithString<SeqTwoByteString>(
566  isolate, subject, regexp, empty_string, last_match_info);
567  }
568  }
569 
570  RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate);
571  if (global_cache.HasException()) return isolate->heap()->exception();
572 
573  int32_t* current_match = global_cache.FetchNext();
574  if (current_match == NULL) {
575  if (global_cache.HasException()) return isolate->heap()->exception();
576  return *subject;
577  }
578 
579  int start = current_match[0];
580  int end = current_match[1];
581  int capture_count = regexp->CaptureCount();
582  int subject_length = subject->length();
583 
584  int new_length = subject_length - (end - start);
585  if (new_length == 0) return isolate->heap()->empty_string();
586 
587  Handle<ResultSeqString> answer;
588  if (ResultSeqString::kHasOneByteEncoding) {
589  answer = Handle<ResultSeqString>::cast(
590  isolate->factory()->NewRawOneByteString(new_length).ToHandleChecked());
591  } else {
592  answer = Handle<ResultSeqString>::cast(
593  isolate->factory()->NewRawTwoByteString(new_length).ToHandleChecked());
594  }
595 
596  int prev = 0;
597  int position = 0;
598 
599  do {
600  start = current_match[0];
601  end = current_match[1];
602  if (prev < start) {
603  // Add substring subject[prev;start] to answer string.
604  String::WriteToFlat(*subject, answer->GetChars() + position, prev, start);
605  position += start - prev;
606  }
607  prev = end;
608 
609  current_match = global_cache.FetchNext();
610  } while (current_match != NULL);
611 
612  if (global_cache.HasException()) return isolate->heap()->exception();
613 
614  RegExpImpl::SetLastMatchInfo(last_match_info, subject, capture_count,
615  global_cache.LastSuccessfulMatch());
616 
617  if (prev < subject_length) {
618  // Add substring subject[prev;length] to answer string.
619  String::WriteToFlat(*subject, answer->GetChars() + position, prev,
620  subject_length);
621  position += subject_length - prev;
622  }
623 
624  if (position == 0) return isolate->heap()->empty_string();
625 
626  // Shorten string and fill
627  int string_size = ResultSeqString::SizeFor(position);
628  int allocated_string_size = ResultSeqString::SizeFor(new_length);
629  int delta = allocated_string_size - string_size;
630 
631  answer->set_length(position);
632  if (delta == 0) return *answer;
633 
634  Address end_of_string = answer->address() + string_size;
635  Heap* heap = isolate->heap();
636 
637  // The trimming is performed on a newly allocated object, which is on a
638  // fresly allocated page or on an already swept page. Hence, the sweeper
639  // thread can not get confused with the filler creation. No synchronization
640  // needed.
641  heap->CreateFillerObjectAt(end_of_string, delta);
642  heap->AdjustLiveBytes(answer->address(), -delta, Heap::FROM_MUTATOR);
643  return *answer;
644 }

References v8::internal::Heap::AdjustLiveBytes(), v8::internal::JSRegExp::ATOM, v8::internal::Handle< T >::cast(), v8::internal::Heap::CreateFillerObjectAt(), DCHECK, v8::internal::Isolate::factory(), v8::internal::Heap::FROM_MUTATOR, v8::internal::Isolate::heap(), NULL, v8::internal::RegExpImpl::SetLastMatchInfo(), and v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:

◆ StringReplaceGlobalRegExpWithString()

static MUST_USE_RESULT Object* v8::internal::StringReplaceGlobalRegExpWithString ( Isolate isolate,
Handle< String subject,
Handle< JSRegExp regexp,
Handle< String replacement,
Handle< JSArray last_match_info 
)
static

Definition at line 468 of file runtime-regexp.cc.

470  {
471  DCHECK(subject->IsFlat());
472  DCHECK(replacement->IsFlat());
473 
474  int capture_count = regexp->CaptureCount();
475  int subject_length = subject->length();
476 
477  // CompiledReplacement uses zone allocation.
478  ZoneScope zone_scope(isolate->runtime_zone());
479  CompiledReplacement compiled_replacement(zone_scope.zone());
480  bool simple_replace =
481  compiled_replacement.Compile(replacement, capture_count, subject_length);
482 
483  // Shortcut for simple non-regexp global replacements
484  if (regexp->TypeTag() == JSRegExp::ATOM && simple_replace) {
485  if (subject->HasOnlyOneByteChars() && replacement->HasOnlyOneByteChars()) {
486  return StringReplaceGlobalAtomRegExpWithString<SeqOneByteString>(
487  isolate, subject, regexp, replacement, last_match_info);
488  } else {
489  return StringReplaceGlobalAtomRegExpWithString<SeqTwoByteString>(
490  isolate, subject, regexp, replacement, last_match_info);
491  }
492  }
493 
494  RegExpImpl::GlobalCache global_cache(regexp, subject, true, isolate);
495  if (global_cache.HasException()) return isolate->heap()->exception();
496 
497  int32_t* current_match = global_cache.FetchNext();
498  if (current_match == NULL) {
499  if (global_cache.HasException()) return isolate->heap()->exception();
500  return *subject;
501  }
502 
503  // Guessing the number of parts that the final result string is built
504  // from. Global regexps can match any number of times, so we guess
505  // conservatively.
506  int expected_parts = (compiled_replacement.parts() + 1) * 4 + 1;
507  ReplacementStringBuilder builder(isolate->heap(), subject, expected_parts);
508 
509  // Number of parts added by compiled replacement plus preceeding
510  // string and possibly suffix after last match. It is possible for
511  // all components to use two elements when encoded as two smis.
512  const int parts_added_per_loop = 2 * (compiled_replacement.parts() + 2);
513 
514  int prev = 0;
515 
516  do {
517  builder.EnsureCapacity(parts_added_per_loop);
518 
519  int start = current_match[0];
520  int end = current_match[1];
521 
522  if (prev < start) {
523  builder.AddSubjectSlice(prev, start);
524  }
525 
526  if (simple_replace) {
527  builder.AddString(replacement);
528  } else {
529  compiled_replacement.Apply(&builder, start, end, current_match);
530  }
531  prev = end;
532 
533  current_match = global_cache.FetchNext();
534  } while (current_match != NULL);
535 
536  if (global_cache.HasException()) return isolate->heap()->exception();
537 
538  if (prev < subject_length) {
539  builder.EnsureCapacity(2);
540  builder.AddSubjectSlice(prev, subject_length);
541  }
542 
543  RegExpImpl::SetLastMatchInfo(last_match_info, subject, capture_count,
544  global_cache.LastSuccessfulMatch());
545 
546  Handle<String> result;
547  ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, builder.ToString());
548  return *result;
549 }

References v8::internal::ReplacementStringBuilder::AddString(), v8::internal::ReplacementStringBuilder::AddSubjectSlice(), v8::internal::CompiledReplacement::Apply(), ASSIGN_RETURN_FAILURE_ON_EXCEPTION, v8::internal::JSRegExp::ATOM, v8::internal::CompiledReplacement::Compile(), DCHECK, v8::internal::ReplacementStringBuilder::EnsureCapacity(), v8::internal::Isolate::heap(), NULL, v8::internal::CompiledReplacement::parts(), v8::internal::Isolate::runtime_zone(), v8::internal::RegExpImpl::SetLastMatchInfo(), v8::internal::ReplacementStringBuilder::ToString(), and v8::internal::ZoneScope::zone().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringReplaceOneCharWithString()

MaybeHandle<String> v8::internal::StringReplaceOneCharWithString ( Isolate isolate,
Handle< String subject,
Handle< String search,
Handle< String replace,
bool found,
int  recursion_limit 
)

Definition at line 21 of file runtime-strings.cc.

23  {
24  StackLimitCheck stackLimitCheck(isolate);
25  if (stackLimitCheck.HasOverflowed() || (recursion_limit == 0)) {
26  return MaybeHandle<String>();
27  }
28  recursion_limit--;
29  if (subject->IsConsString()) {
30  ConsString* cons = ConsString::cast(*subject);
31  Handle<String> first = Handle<String>(cons->first());
32  Handle<String> second = Handle<String>(cons->second());
33  Handle<String> new_first;
34  if (!StringReplaceOneCharWithString(isolate, first, search, replace, found,
35  recursion_limit).ToHandle(&new_first)) {
36  return MaybeHandle<String>();
37  }
38  if (*found) return isolate->factory()->NewConsString(new_first, second);
39 
40  Handle<String> new_second;
41  if (!StringReplaceOneCharWithString(isolate, second, search, replace, found,
42  recursion_limit)
43  .ToHandle(&new_second)) {
44  return MaybeHandle<String>();
45  }
46  if (*found) return isolate->factory()->NewConsString(first, new_second);
47 
48  return subject;
49  } else {
50  int index = Runtime::StringMatch(isolate, subject, search, 0);
51  if (index == -1) return subject;
52  *found = true;
53  Handle<String> first = isolate->factory()->NewSubString(subject, 0, index);
54  Handle<String> cons1;
56  isolate, cons1, isolate->factory()->NewConsString(first, replace),
57  String);
58  Handle<String> second =
59  isolate->factory()->NewSubString(subject, index + 1, subject->length());
60  return isolate->factory()->NewConsString(cons1, second);
61  }
62 }

References ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Isolate::factory(), v8::internal::ConsString::first(), v8::internal::ConsString::second(), and v8::internal::Runtime::StringMatch().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringToArrayIndex()

template<typename Stream >
bool v8::internal::StringToArrayIndex ( Stream *  stream,
uint32_t index 
)

Definition at line 1431 of file utils.h.

1431  {
1432  uint16_t ch = stream->GetNext();
1433 
1434  // If the string begins with a '0' character, it must only consist
1435  // of it to be a legal array index.
1436  if (ch == '0') {
1437  *index = 0;
1438  return !stream->HasMore();
1439  }
1440 
1441  // Convert string to uint32 array index; character by character.
1442  int d = ch - '0';
1443  if (d < 0 || d > 9) return false;
1444  uint32_t result = d;
1445  while (stream->HasMore()) {
1446  d = stream->GetNext() - '0';
1447  if (d < 0 || d > 9) return false;
1448  // Check that the new result is below the 32 bit limit.
1449  if (result > 429496729U - ((d > 5) ? 1 : 0)) return false;
1450  result = (result * 10) + d;
1451  }
1452 
1453  *index = result;
1454  return true;
1455 }

Referenced by v8::internal::AstRawString::AsArrayIndex(), and v8::internal::String::ComputeArrayIndex().

+ Here is the caller graph for this function:

◆ StringToDouble() [1/4]

double v8::internal::StringToDouble ( UnicodeCache unicode_cache,
const char *  str,
int  flags,
double  empty_string_val 
)

Definition at line 70 of file conversions.cc.

71  {
72  // We cast to const uint8_t* here to avoid instantiating the
73  // InternalStringToDouble() template for const char* as well.
74  const uint8_t* start = reinterpret_cast<const uint8_t*>(str);
75  const uint8_t* end = start + StrLength(str);
76  return InternalStringToDouble(unicode_cache, start, end, flags,
77  empty_string_val);
78 }
double InternalStringToDouble(UnicodeCache *unicode_cache, Iterator current, EndMark end, int flags, double empty_string_val)

References v8::internal::anonymous_namespace{flags.cc}::flags, InternalStringToDouble(), and StrLength().

Referenced by v8::internal::DuplicateFinder::AddNumber(), v8::internal::Scanner::DoubleValue(), RUNTIME_FUNCTION(), and StringToDouble().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringToDouble() [2/4]

double v8::internal::StringToDouble ( UnicodeCache unicode_cache,
String string,
int  flags,
double  empty_string_val 
)

Definition at line 486 of file conversions.cc.

489  {
491  String::FlatContent flat = string->GetFlatContent();
492  // ECMA-262 section 15.1.2.3, empty string is NaN
493  if (flat.IsOneByte()) {
494  return StringToDouble(
495  unicode_cache, flat.ToOneByteVector(), flags, empty_string_val);
496  } else {
497  return StringToDouble(
498  unicode_cache, flat.ToUC16Vector(), flags, empty_string_val);
499  }
500 }
double StringToDouble(UnicodeCache *unicode_cache, String *string, int flags, double empty_string_val)
Definition: conversions.cc:486

References v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::String::FlatContent::IsOneByte(), StringToDouble(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().

+ Here is the call graph for this function:

◆ StringToDouble() [3/4]

double v8::internal::StringToDouble ( UnicodeCache unicode_cache,
Vector< const uc16 str,
int  flags,
double  empty_string_val 
)

Definition at line 94 of file conversions.cc.

97  {
98  const uc16* end = str.start() + str.length();
99  return InternalStringToDouble(unicode_cache, str.start(), end, flags,
100  empty_string_val);
101 }

References v8::internal::anonymous_namespace{flags.cc}::flags, InternalStringToDouble(), v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().

+ Here is the call graph for this function:

◆ StringToDouble() [4/4]

double v8::internal::StringToDouble ( UnicodeCache unicode_cache,
Vector< const uint8_t >  str,
int  flags,
double  empty_string_val 
)

Definition at line 81 of file conversions.cc.

84  {
85  // We cast to const uint8_t* here to avoid instantiating the
86  // InternalStringToDouble() template for const char* as well.
87  const uint8_t* start = reinterpret_cast<const uint8_t*>(str.start());
88  const uint8_t* end = start + str.length();
89  return InternalStringToDouble(unicode_cache, start, end, flags,
90  empty_string_val);
91 }

References v8::internal::anonymous_namespace{flags.cc}::flags, InternalStringToDouble(), v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().

+ Here is the call graph for this function:

◆ StringToInt() [1/2]

double v8::internal::StringToInt ( UnicodeCache unicode_cache,
Vector< const uc16 vector,
int  radix 
)

Definition at line 113 of file conversions.cc.

115  {
116  return InternalStringToInt(
117  unicode_cache, vector.start(), vector.start() + vector.length(), radix);
118 }
double InternalStringToInt(UnicodeCache *unicode_cache, Iterator current, EndMark end, int radix)

References InternalStringToInt(), v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().

+ Here is the call graph for this function:

◆ StringToInt() [2/2]

double v8::internal::StringToInt ( UnicodeCache unicode_cache,
Vector< const uint8_t >  vector,
int  radix 
)

Definition at line 105 of file conversions.cc.

107  {
108  return InternalStringToInt(
109  unicode_cache, vector.start(), vector.start() + vector.length(), radix);
110 }

References InternalStringToInt(), v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StrLength()

◆ StrNCpy()

void v8::internal::StrNCpy ( Vector< char >  dest,
const char *  src,
size_t  n 
)

Definition at line 119 of file utils.cc.

119  {
120  base::OS::StrNCpy(dest.start(), dest.length(), src, n);
121 }
void StrNCpy(Vector< char > dest, const char *src, size_t n)
Definition: utils.cc:119

References v8::internal::Vector< T >::length(), v8::internal::Vector< T >::start(), and v8::base::OS::StrNCpy().

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CodeTracer(), v8::internal::StringsStorage::GetCopy(), and v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HTracer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StrNDup()

char * v8::internal::StrNDup ( const char *  str,
int  n 
)

Definition at line 76 of file allocation.cc.

76  {
77  int length = StrLength(str);
78  if (n < length) length = n;
79  char* result = NewArray<char>(length + 1);
80  MemCopy(result, str, length);
81  result[length] = '\0';
82  return result;
83 }

References MemCopy(), and StrLength().

+ Here is the call graph for this function:

◆ Strtod()

double v8::internal::Strtod ( Vector< const char >  buffer,
int  exponent 
)

Definition at line 397 of file strtod.cc.

397  {
398  Vector<const char> left_trimmed = TrimLeadingZeros(buffer);
399  Vector<const char> trimmed = TrimTrailingZeros(left_trimmed);
400  exponent += left_trimmed.length() - trimmed.length();
401  if (trimmed.length() == 0) return 0.0;
402  if (trimmed.length() > kMaxSignificantDecimalDigits) {
403  char significant_buffer[kMaxSignificantDecimalDigits];
404  int significant_exponent;
405  TrimToMaxSignificantDigits(trimmed, exponent,
406  significant_buffer, &significant_exponent);
407  return Strtod(Vector<const char>(significant_buffer,
409  significant_exponent);
410  }
411  if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) return V8_INFINITY;
412  if (exponent + trimmed.length() <= kMinDecimalPower) return 0.0;
413 
414  double guess;
415  if (DoubleStrtod(trimmed, exponent, &guess) ||
416  DiyFpStrtod(trimmed, exponent, &guess)) {
417  return guess;
418  }
419  return BignumStrtod(trimmed, exponent, guess);
420 }
static double BignumStrtod(Vector< const char > buffer, int exponent, double guess)
Definition: strtod.cc:352
static bool DoubleStrtod(Vector< const char > trimmed, int exponent, double *result)
Definition: strtod.cc:155
static void TrimToMaxSignificantDigits(Vector< const char > buffer, int exponent, char *significant_buffer, int *significant_exponent)
Definition: strtod.cc:93
static Vector< const char > TrimLeadingZeros(Vector< const char > buffer)
Definition: strtod.cc:73
static bool DiyFpStrtod(Vector< const char > buffer, int exponent, double *result)
Definition: strtod.cc:235
static Vector< const char > TrimTrailingZeros(Vector< const char > buffer)
Definition: strtod.cc:83

References BignumStrtod(), DiyFpStrtod(), DoubleStrtod(), kMaxDecimalPower, kMaxSignificantDecimalDigits, kMinDecimalPower, v8::internal::Vector< T >::length(), TrimLeadingZeros(), TrimToMaxSignificantDigits(), TrimTrailingZeros(), and V8_INFINITY.

Referenced by InternalStringToDouble(), and InternalStringToInt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SubStringEquals()

template<class Iterator , class EndMark >
bool v8::internal::SubStringEquals ( Iterator *  current,
EndMark  end,
const char *  substring 
)

Definition at line 101 of file conversions-inl.h.

103  {
104  DCHECK(**current == *substring);
105  for (substring++; *substring != '\0'; substring++) {
106  ++*current;
107  if (*current == end || **current != *substring) return false;
108  }
109  ++*current;
110  return true;
111 }

References DCHECK.

Referenced by InternalStringToDouble().

+ Here is the caller graph for this function:

◆ SubWithoutOverflow()

static int32_t v8::internal::SubWithoutOverflow ( Representation  r,
int32_t  a,
int32_t  b,
bool overflow 
)
static

Definition at line 166 of file hydrogen-instructions.cc.

169  {
170  int64_t result = static_cast<int64_t>(a) - static_cast<int64_t>(b);
171  return ConvertAndSetOverflow(r, result, overflow);
172 }

References ConvertAndSetOverflow(), and overflow.

+ Here is the call graph for this function:

◆ Sweep()

template<SweepingMode sweeping_mode, MarkCompactCollector::SweepingParallelism parallelism, SkipListRebuildingMode skip_list_mode, FreeSpaceTreatmentMode free_space_mode>
static int v8::internal::Sweep ( PagedSpace space,
FreeList free_list,
Page p,
ObjectVisitor v 
)
static

Definition at line 3298 of file mark-compact.cc.

3299  {
3300  DCHECK(!p->IsEvacuationCandidate() && !p->WasSwept());
3301  DCHECK_EQ(skip_list_mode == REBUILD_SKIP_LIST,
3302  space->identity() == CODE_SPACE);
3303  DCHECK((p->skip_list() == NULL) || (skip_list_mode == REBUILD_SKIP_LIST));
3304  DCHECK(parallelism == MarkCompactCollector::SWEEP_ON_MAIN_THREAD ||
3305  sweeping_mode == SWEEP_ONLY);
3306 
3307  Address free_start = p->area_start();
3308  DCHECK(reinterpret_cast<intptr_t>(free_start) % (32 * kPointerSize) == 0);
3309  int offsets[16];
3310 
3311  SkipList* skip_list = p->skip_list();
3312  int curr_region = -1;
3313  if ((skip_list_mode == REBUILD_SKIP_LIST) && skip_list) {
3314  skip_list->Clear();
3315  }
3316 
3317  intptr_t freed_bytes = 0;
3318  intptr_t max_freed_bytes = 0;
3319 
3320  for (MarkBitCellIterator it(p); !it.Done(); it.Advance()) {
3321  Address cell_base = it.CurrentCellBase();
3322  MarkBit::CellType* cell = it.CurrentCell();
3323  int live_objects = MarkWordToObjectStarts(*cell, offsets);
3324  int live_index = 0;
3325  for (; live_objects != 0; live_objects--) {
3326  Address free_end = cell_base + offsets[live_index++] * kPointerSize;
3327  if (free_end != free_start) {
3328  int size = static_cast<int>(free_end - free_start);
3329  if (free_space_mode == ZAP_FREE_SPACE) {
3330  memset(free_start, 0xcc, size);
3331  }
3332  freed_bytes = Free<parallelism>(space, free_list, free_start, size);
3333  max_freed_bytes = Max(freed_bytes, max_freed_bytes);
3334 #ifdef ENABLE_GDB_JIT_INTERFACE
3335  if (FLAG_gdbjit && space->identity() == CODE_SPACE) {
3336  GDBJITInterface::RemoveCodeRange(free_start, free_end);
3337  }
3338 #endif
3339  }
3340  HeapObject* live_object = HeapObject::FromAddress(free_end);
3341  DCHECK(Marking::IsBlack(Marking::MarkBitFrom(live_object)));
3342  Map* map = live_object->map();
3343  int size = live_object->SizeFromMap(map);
3344  if (sweeping_mode == SWEEP_AND_VISIT_LIVE_OBJECTS) {
3345  live_object->IterateBody(map->instance_type(), size, v);
3346  }
3347  if ((skip_list_mode == REBUILD_SKIP_LIST) && skip_list != NULL) {
3348  int new_region_start = SkipList::RegionNumber(free_end);
3349  int new_region_end =
3350  SkipList::RegionNumber(free_end + size - kPointerSize);
3351  if (new_region_start != curr_region || new_region_end != curr_region) {
3352  skip_list->AddObject(free_end, size);
3353  curr_region = new_region_end;
3354  }
3355  }
3356  free_start = free_end + size;
3357  }
3358  // Clear marking bits for current cell.
3359  *cell = 0;
3360  }
3361  if (free_start != p->area_end()) {
3362  int size = static_cast<int>(p->area_end() - free_start);
3363  if (free_space_mode == ZAP_FREE_SPACE) {
3364  memset(free_start, 0xcc, size);
3365  }
3366  freed_bytes = Free<parallelism>(space, free_list, free_start, size);
3367  max_freed_bytes = Max(freed_bytes, max_freed_bytes);
3368 #ifdef ENABLE_GDB_JIT_INTERFACE
3369  if (FLAG_gdbjit && space->identity() == CODE_SPACE) {
3370  GDBJITInterface::RemoveCodeRange(free_start, p->area_end());
3371  }
3372 #endif
3373  }
3374  p->ResetLiveBytes();
3375 
3376  if (parallelism == MarkCompactCollector::SWEEP_IN_PARALLEL) {
3377  // When concurrent sweeping is active, the page will be marked after
3378  // sweeping by the main thread.
3379  p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
3380  } else {
3381  p->SetWasSwept();
3382  }
3383  return FreeList::GuaranteedAllocatable(static_cast<int>(max_freed_bytes));
3384 }
static int MarkWordToObjectStarts(uint32_t mark_bits, int *starts)

References v8::internal::SkipList::AddObject(), v8::internal::MemoryChunk::area_end(), v8::internal::MemoryChunk::area_start(), v8::internal::SkipList::Clear(), CODE_SPACE, DCHECK, DCHECK_EQ, v8::internal::HeapObject::FromAddress(), v8::internal::FreeList::GuaranteedAllocatable(), v8::internal::MemoryChunk::IsEvacuationCandidate(), v8::internal::HeapObject::IterateBody(), kPointerSize, map, v8::internal::HeapObject::map(), MarkWordToObjectStarts(), Max(), NULL, REBUILD_SKIP_LIST, v8::internal::SkipList::RegionNumber(), v8::internal::MemoryChunk::ResetLiveBytes(), v8::internal::MemoryChunk::set_parallel_sweeping(), v8::internal::Page::SetWasSwept(), size, v8::internal::HeapObject::SizeFromMap(), v8::internal::MemoryChunk::skip_list(), space(), SWEEP_AND_VISIT_LIVE_OBJECTS, v8::internal::MarkCompactCollector::SWEEP_IN_PARALLEL, v8::internal::MarkCompactCollector::SWEEP_ON_MAIN_THREAD, SWEEP_ONLY, v8::internal::MemoryChunk::SWEEPING_FINALIZE, v8::internal::Page::WasSwept(), and ZAP_FREE_SPACE.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), v8::internal::MarkCompactCollector::SweepInParallel(), and v8::internal::MarkCompactCollector::SweepSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TenToThe()

int v8::internal::TenToThe ( int  exponent)
inline

Definition at line 733 of file utils.h.

733  {
734  DCHECK(exponent <= 9);
735  DCHECK(exponent >= 1);
736  int answer = 10;
737  for (int i = 1; i < exponent; i++) answer *= 10;
738  return answer;
739 }

References DCHECK.

Referenced by v8::internal::StringHasher::MakeArrayIndexHash().

+ Here is the caller graph for this function:

◆ TEST() [1/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkCompactTimeInitial   
)

Definition at line 88 of file gc-idle-time-handler-unittest.cc.

88  {
89  size_t size = 100 * MB;
90  size_t time = GCIdleTimeHandler::EstimateMarkCompactTime(size, 0);
91  EXPECT_EQ(size / GCIdleTimeHandler::kInitialConservativeMarkCompactSpeed,
92  time);
93 }
const int MB
Definition: d8.cc:164

References v8::internal::GCIdleTimeHandler::EstimateMarkCompactTime(), v8::internal::GCIdleTimeHandler::kInitialConservativeMarkCompactSpeed, MB, and size.

+ Here is the call graph for this function:

◆ TEST() [2/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkCompactTimeMax   
)

Definition at line 104 of file gc-idle-time-handler-unittest.cc.

104  {
105  size_t size = std::numeric_limits<size_t>::max();
106  size_t speed = 1;
107  size_t time = GCIdleTimeHandler::EstimateMarkCompactTime(size, speed);
108  EXPECT_EQ(GCIdleTimeHandler::kMaxMarkCompactTimeInMs, time);
109 }

References v8::internal::GCIdleTimeHandler::EstimateMarkCompactTime(), v8::internal::GCIdleTimeHandler::kMaxMarkCompactTimeInMs, and size.

+ Here is the call graph for this function:

◆ TEST() [3/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkCompactTimeNonZero   
)

Definition at line 96 of file gc-idle-time-handler-unittest.cc.

96  {
97  size_t size = 100 * MB;
98  size_t speed = 1 * MB;
99  size_t time = GCIdleTimeHandler::EstimateMarkCompactTime(size, speed);
100  EXPECT_EQ(size / speed, time);
101 }

References v8::internal::GCIdleTimeHandler::EstimateMarkCompactTime(), MB, and size.

+ Here is the call graph for this function:

◆ TEST() [4/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkingStepSizeInitial   
)

Definition at line 53 of file gc-idle-time-handler-unittest.cc.

53  {
54  size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(1, 0);
55  EXPECT_EQ(
56  static_cast<size_t>(GCIdleTimeHandler::kInitialConservativeMarkingSpeed *
57  GCIdleTimeHandler::kConservativeTimeRatio),
58  step_size);
59 }

References v8::internal::GCIdleTimeHandler::EstimateMarkingStepSize(), v8::internal::GCIdleTimeHandler::kConservativeTimeRatio, and v8::internal::GCIdleTimeHandler::kInitialConservativeMarkingSpeed.

+ Here is the call graph for this function:

◆ TEST() [5/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkingStepSizeNonZero   
)

Definition at line 62 of file gc-idle-time-handler-unittest.cc.

62  {
63  size_t marking_speed_in_bytes_per_millisecond = 100;
64  size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(
65  1, marking_speed_in_bytes_per_millisecond);
66  EXPECT_EQ(static_cast<size_t>(marking_speed_in_bytes_per_millisecond *
67  GCIdleTimeHandler::kConservativeTimeRatio),
68  step_size);
69 }

References v8::internal::GCIdleTimeHandler::EstimateMarkingStepSize(), and v8::internal::GCIdleTimeHandler::kConservativeTimeRatio.

+ Here is the call graph for this function:

◆ TEST() [6/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkingStepSizeOverflow1   
)

Definition at line 72 of file gc-idle-time-handler-unittest.cc.

72  {
73  size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(
74  10, std::numeric_limits<size_t>::max());
75  EXPECT_EQ(static_cast<size_t>(GCIdleTimeHandler::kMaximumMarkingStepSize),
76  step_size);
77 }

References v8::internal::GCIdleTimeHandler::EstimateMarkingStepSize(), and v8::internal::GCIdleTimeHandler::kMaximumMarkingStepSize.

+ Here is the call graph for this function:

◆ TEST() [7/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateMarkingStepSizeOverflow2   
)

Definition at line 80 of file gc-idle-time-handler-unittest.cc.

80  {
81  size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(
82  std::numeric_limits<size_t>::max(), 10);
83  EXPECT_EQ(static_cast<size_t>(GCIdleTimeHandler::kMaximumMarkingStepSize),
84  step_size);
85 }

References v8::internal::GCIdleTimeHandler::EstimateMarkingStepSize(), and v8::internal::GCIdleTimeHandler::kMaximumMarkingStepSize.

+ Here is the call graph for this function:

◆ TEST() [8/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateScavengeTimeInitial   
)

Definition at line 112 of file gc-idle-time-handler-unittest.cc.

112  {
113  size_t size = 1 * MB;
114  size_t time = GCIdleTimeHandler::EstimateScavengeTime(size, 0);
115  EXPECT_EQ(size / GCIdleTimeHandler::kInitialConservativeScavengeSpeed, time);
116 }

References v8::internal::GCIdleTimeHandler::EstimateScavengeTime(), v8::internal::GCIdleTimeHandler::kInitialConservativeScavengeSpeed, MB, and size.

+ Here is the call graph for this function:

◆ TEST() [9/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
EstimateScavengeTimeNonZero   
)

Definition at line 119 of file gc-idle-time-handler-unittest.cc.

119  {
120  size_t size = 1 * MB;
121  size_t speed = 1 * MB;
122  size_t time = GCIdleTimeHandler::EstimateScavengeTime(size, speed);
123  EXPECT_EQ(size / speed, time);
124 }

References v8::internal::GCIdleTimeHandler::EstimateScavengeTime(), MB, and size.

+ Here is the call graph for this function:

◆ TEST() [10/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
ScavangeMayHappenSoonInitial   
)

Definition at line 127 of file gc-idle-time-handler-unittest.cc.

127  {
128  size_t available = 100 * KB;
129  EXPECT_FALSE(GCIdleTimeHandler::ScavangeMayHappenSoon(available, 0));
130 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if available(X64 only)") DEFINE_BOOL(enable_vfp3
const int KB
Definition: globals.h:106

References available(), KB, and v8::internal::GCIdleTimeHandler::ScavangeMayHappenSoon().

+ Here is the call graph for this function:

◆ TEST() [11/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
ScavangeMayHappenSoonNonZeroFalse   
)

Definition at line 133 of file gc-idle-time-handler-unittest.cc.

133  {
134  size_t available = (GCIdleTimeHandler::kMaxFrameRenderingIdleTime + 1) * KB;
135  size_t speed = 1 * KB;
136  EXPECT_FALSE(GCIdleTimeHandler::ScavangeMayHappenSoon(available, speed));
137 }

References available(), KB, v8::internal::GCIdleTimeHandler::kMaxFrameRenderingIdleTime, and v8::internal::GCIdleTimeHandler::ScavangeMayHappenSoon().

+ Here is the call graph for this function:

◆ TEST() [12/12]

v8::internal::TEST ( GCIdleTimeHandler  ,
ScavangeMayHappenSoonNonZeroTrue   
)

Definition at line 140 of file gc-idle-time-handler-unittest.cc.

140  {
141  size_t available = GCIdleTimeHandler::kMaxFrameRenderingIdleTime * KB;
142  size_t speed = 1 * KB;
143  EXPECT_TRUE(GCIdleTimeHandler::ScavangeMayHappenSoon(available, speed));
144 }

References available(), KB, v8::internal::GCIdleTimeHandler::kMaxFrameRenderingIdleTime, and v8::internal::GCIdleTimeHandler::ScavangeMayHappenSoon().

+ Here is the call graph for this function:

◆ TEST_F() [1/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
AfterContextDisposeLargeIdleTime   
)

Definition at line 147 of file gc-idle-time-handler-unittest.cc.

147  {
148  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
149  heap_state.contexts_disposed = 1;
150  heap_state.incremental_marking_stopped = true;
151  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
152  int idle_time_ms =
153  static_cast<int>((heap_state.size_of_objects + speed - 1) / speed);
154  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
155  EXPECT_EQ(DO_FULL_GC, action.type);
156 }

References v8::internal::GCIdleTimeHandler::HeapState::contexts_disposed, DO_FULL_GC, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [2/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
AfterContextDisposeSmallIdleTime1   
)

Definition at line 159 of file gc-idle-time-handler-unittest.cc.

159  {
160  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
161  heap_state.contexts_disposed = 1;
162  heap_state.incremental_marking_stopped = true;
163  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
164  int idle_time_ms = static_cast<int>(heap_state.size_of_objects / speed - 1);
165  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
166  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
167 }

References v8::internal::GCIdleTimeHandler::HeapState::contexts_disposed, DO_INCREMENTAL_MARKING, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [3/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
AfterContextDisposeSmallIdleTime2   
)

Definition at line 170 of file gc-idle-time-handler-unittest.cc.

170  {
171  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
172  heap_state.contexts_disposed = 1;
173  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
174  int idle_time_ms = static_cast<int>(heap_state.size_of_objects / speed - 1);
175  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
176  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
177 }

References v8::internal::GCIdleTimeHandler::HeapState::contexts_disposed, DO_INCREMENTAL_MARKING, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [4/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
ContinueAfterStop1   
)

Definition at line 248 of file gc-idle-time-handler-unittest.cc.

248  {
249  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
250  heap_state.incremental_marking_stopped = true;
251  heap_state.can_start_incremental_marking = false;
252  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
253  int idle_time_ms = static_cast<int>(heap_state.size_of_objects / speed + 1);
254  for (int i = 0; i < GCIdleTimeHandler::kMaxMarkCompactsInIdleRound; i++) {
255  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
256  EXPECT_EQ(DO_FULL_GC, action.type);
257  handler()->NotifyIdleMarkCompact();
258  }
259  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
260  EXPECT_EQ(DONE, action.type);
261  // Emulate mutator work.
262  for (int i = 0; i < GCIdleTimeHandler::kIdleScavengeThreshold; i++) {
263  handler()->NotifyScavenge();
264  }
265  action = handler()->Compute(idle_time_ms, heap_state);
266  EXPECT_EQ(DO_FULL_GC, action.type);
267 }

References v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_FULL_GC, DONE, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeHandler::kIdleScavengeThreshold, v8::internal::GCIdleTimeHandler::kMaxMarkCompactsInIdleRound, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [5/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
ContinueAfterStop2   
)

Definition at line 270 of file gc-idle-time-handler-unittest.cc.

270  {
271  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
272  int idle_time_ms = 10;
273  for (int i = 0; i < GCIdleTimeHandler::kMaxMarkCompactsInIdleRound; i++) {
274  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
275  if (action.type == DONE) break;
276  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
277  // In this case we try to emulate incremental marking steps the finish with
278  // a full gc.
279  handler()->NotifyIdleMarkCompact();
280  }
281  heap_state.can_start_incremental_marking = false;
282  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
283  EXPECT_EQ(DONE, action.type);
284  // Emulate mutator work.
285  for (int i = 0; i < GCIdleTimeHandler::kIdleScavengeThreshold; i++) {
286  handler()->NotifyScavenge();
287  }
288  heap_state.can_start_incremental_marking = true;
289  action = handler()->Compute(idle_time_ms, heap_state);
290  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
291 }

References v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_INCREMENTAL_MARKING, DONE, v8::internal::GCIdleTimeHandler::kIdleScavengeThreshold, v8::internal::GCIdleTimeHandler::kMaxMarkCompactsInIdleRound, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [6/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
IncrementalMarking1   
)

Definition at line 180 of file gc-idle-time-handler-unittest.cc.

180  {
181  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
182  size_t speed = heap_state.incremental_marking_speed_in_bytes_per_ms;
183  int idle_time_ms = 10;
184  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
185  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
186  EXPECT_GT(speed * static_cast<size_t>(idle_time_ms),
187  static_cast<size_t>(action.parameter));
188  EXPECT_LT(0, action.parameter);
189 }

References DO_INCREMENTAL_MARKING, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_speed_in_bytes_per_ms, v8::internal::GCIdleTimeAction::parameter, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [7/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
IncrementalMarking2   
)

Definition at line 192 of file gc-idle-time-handler-unittest.cc.

192  {
193  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
194  heap_state.incremental_marking_stopped = true;
195  size_t speed = heap_state.incremental_marking_speed_in_bytes_per_ms;
196  int idle_time_ms = 10;
197  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
198  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
199  EXPECT_GT(speed * static_cast<size_t>(idle_time_ms),
200  static_cast<size_t>(action.parameter));
201  EXPECT_LT(0, action.parameter);
202 }

References DO_INCREMENTAL_MARKING, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeAction::parameter, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [8/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
NotEnoughTime   
)

Definition at line 205 of file gc-idle-time-handler-unittest.cc.

205  {
206  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
207  heap_state.incremental_marking_stopped = true;
208  heap_state.can_start_incremental_marking = false;
209  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
210  int idle_time_ms = static_cast<int>(heap_state.size_of_objects / speed - 1);
211  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
212  EXPECT_EQ(DO_NOTHING, action.type);
213 }

References v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_NOTHING, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [9/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
Scavenge   
)

Definition at line 294 of file gc-idle-time-handler-unittest.cc.

294  {
295  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
296  int idle_time_ms = 10;
297  heap_state.available_new_space_memory =
298  kNewSpaceAllocationThroughput * idle_time_ms;
299  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
300  EXPECT_EQ(DO_SCAVENGE, action.type);
301 }

References v8::internal::GCIdleTimeHandler::HeapState::available_new_space_memory, DO_SCAVENGE, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [10/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
ScavengeAndDone   
)

Definition at line 304 of file gc-idle-time-handler-unittest.cc.

304  {
305  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
306  int idle_time_ms = 10;
307  heap_state.can_start_incremental_marking = false;
308  heap_state.incremental_marking_stopped = true;
309  heap_state.available_new_space_memory =
310  kNewSpaceAllocationThroughput * idle_time_ms;
311  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
312  EXPECT_EQ(DO_SCAVENGE, action.type);
313  heap_state.available_new_space_memory = kNewSpaceCapacity;
314  action = handler()->Compute(idle_time_ms, heap_state);
315  EXPECT_EQ(DO_NOTHING, action.type);
316 }

References v8::internal::GCIdleTimeHandler::HeapState::available_new_space_memory, v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_NOTHING, DO_SCAVENGE, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [11/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
StopEventually1   
)

Definition at line 216 of file gc-idle-time-handler-unittest.cc.

216  {
217  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
218  heap_state.incremental_marking_stopped = true;
219  heap_state.can_start_incremental_marking = false;
220  size_t speed = heap_state.mark_compact_speed_in_bytes_per_ms;
221  int idle_time_ms = static_cast<int>(heap_state.size_of_objects / speed + 1);
222  for (int i = 0; i < GCIdleTimeHandler::kMaxMarkCompactsInIdleRound; i++) {
223  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
224  EXPECT_EQ(DO_FULL_GC, action.type);
225  handler()->NotifyIdleMarkCompact();
226  }
227  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
228  EXPECT_EQ(DONE, action.type);
229 }

References v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_FULL_GC, DONE, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeHandler::kMaxMarkCompactsInIdleRound, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [12/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
StopEventually2   
)

Definition at line 232 of file gc-idle-time-handler-unittest.cc.

232  {
233  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
234  int idle_time_ms = 10;
235  for (int i = 0; i < GCIdleTimeHandler::kMaxMarkCompactsInIdleRound; i++) {
236  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
237  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
238  // In this case we emulate incremental marking steps that finish with a
239  // full gc.
240  handler()->NotifyIdleMarkCompact();
241  }
242  heap_state.can_start_incremental_marking = false;
243  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
244  EXPECT_EQ(DONE, action.type);
245 }

References v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, DO_INCREMENTAL_MARKING, DONE, v8::internal::GCIdleTimeHandler::kMaxMarkCompactsInIdleRound, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [13/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
ZeroIdleTimeDoNothingButStartIdleRound   
)

Definition at line 327 of file gc-idle-time-handler-unittest.cc.

327  {
328  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
329  int idle_time_ms = 10;
330  for (int i = 0; i < GCIdleTimeHandler::kMaxMarkCompactsInIdleRound; i++) {
331  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
332  if (action.type == DONE) break;
333  EXPECT_EQ(DO_INCREMENTAL_MARKING, action.type);
334  // In this case we try to emulate incremental marking steps the finish with
335  // a full gc.
336  handler()->NotifyIdleMarkCompact();
337  }
338  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
339  // Emulate mutator work.
340  for (int i = 0; i < GCIdleTimeHandler::kIdleScavengeThreshold; i++) {
341  handler()->NotifyScavenge();
342  }
343  action = handler()->Compute(0, heap_state);
344  EXPECT_EQ(DO_NOTHING, action.type);
345 }

References DO_INCREMENTAL_MARKING, DO_NOTHING, DONE, v8::internal::GCIdleTimeHandler::kIdleScavengeThreshold, v8::internal::GCIdleTimeHandler::kMaxMarkCompactsInIdleRound, and v8::internal::GCIdleTimeAction::type.

◆ TEST_F() [14/14]

v8::internal::TEST_F ( GCIdleTimeHandlerTest  ,
ZeroIdleTimeNothingToDo   
)

Definition at line 319 of file gc-idle-time-handler-unittest.cc.

319  {
320  GCIdleTimeHandler::HeapState heap_state = DefaultHeapState();
321  int idle_time_ms = 0;
322  GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
323  EXPECT_EQ(DO_NOTHING, action.type);
324 }

References DO_NOTHING, and v8::internal::GCIdleTimeAction::type.

◆ TestType() [1/4]

static InstanceType v8::internal::TestType ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2622 of file lithium-codegen-arm.cc.

2622  {
2623  InstanceType from = instr->from();
2624  InstanceType to = instr->to();
2625  if (from == FIRST_TYPE) return to;
2626  DCHECK(from == to || to == LAST_TYPE);
2627  return from;
2628 }

References DCHECK, FIRST_TYPE, LAST_TYPE, and to().

+ Here is the call graph for this function:

◆ TestType() [2/4]

static InstanceType v8::internal::TestType ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2990 of file lithium-codegen-arm64.cc.

2990  {
2991  InstanceType from = instr->from();
2992  InstanceType to = instr->to();
2993  if (from == FIRST_TYPE) return to;
2994  DCHECK((from == to) || (to == LAST_TYPE));
2995  return from;
2996 }

References DCHECK, FIRST_TYPE, LAST_TYPE, and to().

+ Here is the call graph for this function:

◆ TestType() [3/4]

static InstanceType v8::internal::TestType ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2525 of file lithium-codegen-mips.cc.

2525  {
2526  InstanceType from = instr->from();
2527  InstanceType to = instr->to();
2528  if (from == FIRST_TYPE) return to;
2529  DCHECK(from == to || to == LAST_TYPE);
2530  return from;
2531 }

References DCHECK, FIRST_TYPE, LAST_TYPE, and to().

+ Here is the call graph for this function:

◆ TestType() [4/4]

static InstanceType v8::internal::TestType ( HHasInstanceTypeAndBranch *  instr)
static

Definition at line 2495 of file lithium-codegen-mips64.cc.

2495  {
2496  InstanceType from = instr->from();
2497  InstanceType to = instr->to();
2498  if (from == FIRST_TYPE) return to;
2499  DCHECK(from == to || to == LAST_TYPE);
2500  return from;
2501 }

References DCHECK, FIRST_TYPE, LAST_TYPE, and to().

+ Here is the call graph for this function:

◆ ThrowArrayLengthRangeError()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::ThrowArrayLengthRangeError ( Isolate isolate)
static

Definition at line 143 of file elements.cc.

143  {
144  THROW_NEW_ERROR(isolate, NewRangeError("invalid_array_length",
145  HandleVector<Object>(NULL, 0)),
146  Object);
147 }
#define THROW_NEW_ERROR(isolate, call, T)
Definition: isolate.h:138

References NULL, and THROW_NEW_ERROR.

Referenced by v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl().

+ Here is the caller graph for this function:

◆ ThrowRedeclarationError()

static Object* v8::internal::ThrowRedeclarationError ( Isolate isolate,
Handle< String name 
)
static

Definition at line 1029 of file runtime.cc.

1029  {
1030  HandleScope scope(isolate);
1031  Handle<Object> args[1] = {name};
1033  isolate, NewTypeError("var_redeclaration", HandleVector(args, 1)));
1034 }

References HandleVector(), name, and THROW_NEW_ERROR_RETURN_FAILURE.

Referenced by DeclareGlobals(), and RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ThrowReferenceError()

static Object* v8::internal::ThrowReferenceError ( Isolate isolate,
Name name 
)
static

Definition at line 2585 of file ic.cc.

2585  {
2586  // If the load is non-contextual, just return the undefined result.
2587  // Note that both keyed and non-keyed loads may end up here.
2588  HandleScope scope(isolate);
2589  LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2590  if (ic.contextual_mode() != CONTEXTUAL) {
2591  return isolate->heap()->undefined_value();
2592  }
2593 
2594  // Throw a reference error.
2595  Handle<Name> name_handle(name);
2597  isolate, NewReferenceError("not_defined", HandleVector(&name_handle, 1)));
2598 }

References CONTEXTUAL, v8::internal::LoadIC::contextual_mode(), HandleVector(), v8::internal::Isolate::heap(), name, v8::internal::IC::NO_EXTRA_FRAME, and THROW_NEW_ERROR_RETURN_FAILURE.

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ThrowRegExpException()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::ThrowRegExpException ( Handle< JSRegExp re,
Handle< String pattern,
Handle< String error_text,
const char *  message 
)
inlinestatic

Definition at line 83 of file jsregexp.cc.

87  {
88  Isolate* isolate = re->GetIsolate();
89  Factory* factory = isolate->factory();
90  Handle<FixedArray> elements = factory->NewFixedArray(2);
91  elements->set(0, *pattern);
92  elements->set(1, *error_text);
93  Handle<JSArray> array = factory->NewJSArrayWithElements(elements);
94  Handle<Object> regexp_err;
95  THROW_NEW_ERROR(isolate, NewSyntaxError(message, array), Object);
96 }

References v8::internal::Isolate::factory(), and THROW_NEW_ERROR.

Referenced by v8::internal::RegExpImpl::Compile(), and v8::internal::RegExpImpl::CompileIrregexp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToName()

static MUST_USE_RESULT MaybeHandle<Name> v8::internal::ToName ( Isolate isolate,
Handle< Object key 
)
static

Definition at line 1879 of file runtime.cc.

1879  {
1880  if (key->IsName()) {
1881  return Handle<Name>::cast(key);
1882  } else {
1883  Handle<Object> converted;
1884  ASSIGN_RETURN_ON_EXCEPTION(isolate, converted,
1885  Execution::ToString(isolate, key), Name);
1886  return Handle<Name>::cast(converted);
1887  }
1888 }

References ASSIGN_RETURN_ON_EXCEPTION, and v8::internal::Handle< T >::cast().

Referenced by v8::internal::Runtime::GetObjectProperty(), and v8::internal::Runtime::HasObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToNumber()

int v8::internal::ToNumber ( Register  reg)

Referenced by v8::internal::compiler::JSBinopReduction::ConvertToNumber(), v8::internal::MacroAssembler::GetCodeMarker(), v8::Value::NumberValue(), v8::internal::JSObject::SetElement(), v8::internal::Runtime::SetObjectProperty(), and v8::Value::ToNumber().

+ Here is the caller graph for this function:

◆ ToQuietNaN() [1/2]

double v8::internal::ToQuietNaN ( double  num)
inline

Definition at line 90 of file utils-arm64.h.

90  {
91  DCHECK(std::isnan(num));
93 }
static double rawbits_to_double(uint64_t bits)
Definition: utils-arm64.h:48

References DCHECK, double_to_rawbits(), kDQuietNanMask, and rawbits_to_double().

+ Here is the call graph for this function:

◆ ToQuietNaN() [2/2]

float v8::internal::ToQuietNaN ( float  num)
inline

Definition at line 96 of file utils-arm64.h.

96  {
97  DCHECK(std::isnan(num));
99 }
static float rawbits_to_float(uint32_t bits)
Definition: utils-arm64.h:41

References DCHECK, float_to_rawbits(), kSQuietNanMask, and rawbits_to_float().

+ Here is the call graph for this function:

◆ ToRegister()

◆ ToUpperOverflows()

static bool v8::internal::ToUpperOverflows ( uc32  character)
inlinestatic

Definition at line 812 of file runtime-strings.cc.

812  {
813  // y with umlauts and the micro sign are the only characters that stop
814  // fitting into one-byte when converting to uppercase.
815  static const uc32 yuml_code = 0xff;
816  static const uc32 micro_code = 0xb5;
817  return (character == yuml_code || character == micro_code);
818 }

Referenced by ConvertCaseHelper().

+ Here is the caller graph for this function:

◆ TraceFragmentation()

static void v8::internal::TraceFragmentation ( PagedSpace space)
static

Definition at line 343 of file mark-compact.cc.

343  {
344  int number_of_pages = space->CountTotalPages();
345  intptr_t reserved = (number_of_pages * space->AreaSize());
346  intptr_t free = reserved - space->SizeOfObjects();
347  PrintF("[%s]: %d pages, %d (%.1f%%) free\n",
348  AllocationSpaceName(space->identity()), number_of_pages,
349  static_cast<int>(free), static_cast<double>(free) * 100 / reserved);
350 }

References AllocationSpaceName(), PrintF(), and space().

Referenced by v8::internal::MarkCompactCollector::StartCompaction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceGVN()

void v8::internal::TraceGVN ( const char *  msg,
  ... 
)

Definition at line 98 of file hydrogen-gvn.cc.

98  {
99  va_list arguments;
100  va_start(arguments, msg);
101  base::OS::VPrint(msg, arguments);
102  va_end(arguments);
103 }

References v8::base::OS::VPrint().

+ Here is the call graph for this function:

◆ TraceTopFrame()

static void v8::internal::TraceTopFrame ( Isolate isolate)
static

Definition at line 476 of file elements.cc.

476  {
477  StackFrameIterator it(isolate);
478  if (it.done()) {
479  PrintF("unknown location (no JavaScript frames present)");
480  return;
481  }
482  StackFrame* raw_frame = it.frame();
483  if (raw_frame->is_internal()) {
484  Code* apply_builtin = isolate->builtins()->builtin(
485  Builtins::kFunctionApply);
486  if (raw_frame->unchecked_code() == apply_builtin) {
487  PrintF("apply from ");
488  it.Advance();
489  raw_frame = it.frame();
490  }
491  }
492  JavaScriptFrame::PrintTop(isolate, stdout, false, true);
493 }

References v8::internal::StackFrameIterator::Advance(), v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::StackFrameIterator::frame(), PrintF(), and v8::internal::JavaScriptFrame::PrintTop().

Referenced by CheckArrayAbuse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceValueType()

static const char* v8::internal::TraceValueType ( bool  is_smi)
static

Definition at line 2083 of file deoptimizer.cc.

2083  {
2084  if (is_smi) {
2085  return "smi";
2086  }
2087 
2088  return "heap number";
2089 }

Referenced by v8::internal::Deoptimizer::DoTranslateCommand(), and v8::internal::Deoptimizer::DoTranslateObject().

+ Here is the caller graph for this function:

◆ TransitionElements()

static MUST_USE_RESULT MaybeHandle<Object> v8::internal::TransitionElements ( Handle< Object object,
ElementsKind  to_kind,
Isolate isolate 
)
static

Definition at line 230 of file runtime.cc.

231  {
232  HandleScope scope(isolate);
233  if (!object->IsJSObject()) {
234  isolate->ThrowIllegalOperation();
235  return MaybeHandle<Object>();
236  }
237  ElementsKind from_kind =
238  Handle<JSObject>::cast(object)->map()->elements_kind();
239  if (Map::IsValidElementsTransition(from_kind, to_kind)) {
240  JSObject::TransitionElementsKind(Handle<JSObject>::cast(object), to_kind);
241  return object;
242  }
243  isolate->ThrowIllegalOperation();
244  return MaybeHandle<Object>();
245 }

References v8::internal::Handle< T >::cast(), v8::internal::Map::IsValidElementsTransition(), v8::internal::Isolate::ThrowIllegalOperation(), and v8::internal::JSObject::TransitionElementsKind().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TranslatePosition()

static int v8::internal::TranslatePosition ( int  original_position,
Handle< JSArray position_change_array 
)
static

Definition at line 1262 of file liveedit.cc.

1263  {
1264  int position_diff = 0;
1265  int array_len = GetArrayLength(position_change_array);
1266  Isolate* isolate = position_change_array->GetIsolate();
1267  // TODO(635): binary search may be used here
1268  for (int i = 0; i < array_len; i += 3) {
1269  HandleScope scope(isolate);
1270  Handle<Object> element = Object::GetElement(
1271  isolate, position_change_array, i).ToHandleChecked();
1272  CHECK(element->IsSmi());
1273  int chunk_start = Handle<Smi>::cast(element)->value();
1274  if (original_position < chunk_start) {
1275  break;
1276  }
1277  element = Object::GetElement(
1278  isolate, position_change_array, i + 1).ToHandleChecked();
1279  CHECK(element->IsSmi());
1280  int chunk_end = Handle<Smi>::cast(element)->value();
1281  // Position mustn't be inside a chunk.
1282  DCHECK(original_position >= chunk_end);
1283  element = Object::GetElement(
1284  isolate, position_change_array, i + 2).ToHandleChecked();
1285  CHECK(element->IsSmi());
1286  int chunk_changed_end = Handle<Smi>::cast(element)->value();
1287  position_diff = chunk_changed_end - chunk_end;
1288  }
1289 
1290  return original_position + position_diff;
1291 }

References v8::internal::Handle< T >::cast(), CHECK, DCHECK, GetArrayLength(), and v8::internal::Object::GetElement().

Referenced by v8::internal::LiveEdit::PatchFunctionPositions(), and PatchPositionsInCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimLeadingZeros()

static Vector<const char> v8::internal::TrimLeadingZeros ( Vector< const char >  buffer)
static

Definition at line 73 of file strtod.cc.

73  {
74  for (int i = 0; i < buffer.length(); i++) {
75  if (buffer[i] != '0') {
76  return buffer.SubVector(i, buffer.length());
77  }
78  }
79  return Vector<const char>(buffer.start(), 0);
80 }
Vector< T > SubVector(int from, int to)
Definition: vector.h:33

References v8::internal::Vector< T >::length(), v8::internal::Vector< T >::start(), and v8::internal::Vector< T >::SubVector().

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimToMaxSignificantDigits()

static void v8::internal::TrimToMaxSignificantDigits ( Vector< const char >  buffer,
int  exponent,
char *  significant_buffer,
int significant_exponent 
)
static

Definition at line 93 of file strtod.cc.

96  {
97  for (int i = 0; i < kMaxSignificantDecimalDigits - 1; ++i) {
98  significant_buffer[i] = buffer[i];
99  }
100  // The input buffer has been trimmed. Therefore the last digit must be
101  // different from '0'.
102  DCHECK(buffer[buffer.length() - 1] != '0');
103  // Set the last digit to be non-zero. This is sufficient to guarantee
104  // correct rounding.
105  significant_buffer[kMaxSignificantDecimalDigits - 1] = '1';
106  *significant_exponent =
107  exponent + (buffer.length() - kMaxSignificantDecimalDigits);
108 }

References DCHECK, kMaxSignificantDecimalDigits, and v8::internal::Vector< T >::length().

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimTrailingZeros()

static Vector<const char> v8::internal::TrimTrailingZeros ( Vector< const char >  buffer)
static

Definition at line 83 of file strtod.cc.

83  {
84  for (int i = buffer.length() - 1; i >= 0; --i) {
85  if (buffer[i] != '0') {
86  return buffer.SubVector(0, i + 1);
87  }
88  }
89  return Vector<const char>(buffer.start(), 0);
90 }

References v8::internal::Vector< T >::length(), v8::internal::Vector< T >::start(), and v8::internal::Vector< T >::SubVector().

Referenced by Strtod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrimZeros()

static void v8::internal::TrimZeros ( Vector< char >  buffer,
int length,
int decimal_point 
)
static

Definition at line 271 of file fixed-dtoa.cc.

271  {
272  while (*length > 0 && buffer[(*length) - 1] == '0') {
273  (*length)--;
274  }
275  int first_non_zero = 0;
276  while (first_non_zero < *length && buffer[first_non_zero] == '0') {
277  first_non_zero++;
278  }
279  if (first_non_zero != 0) {
280  for (int i = first_non_zero; i < *length; ++i) {
281  buffer[i - first_non_zero] = buffer[i];
282  }
283  *length -= first_non_zero;
284  *decimal_point -= first_non_zero;
285  }
286 }

Referenced by FastFixedDtoa().

+ Here is the caller graph for this function:

◆ truncate_to_intn()

template<class T >
T v8::internal::truncate_to_intn ( T  x,
unsigned  n 
)
inline

Definition at line 910 of file utils.h.

910  {
911  DCHECK((0 < n) && (n < (sizeof(x) * kBitsPerByte)));
912  return (x & ((static_cast<T>(1) << n) - 1));
913 }

References DCHECK, kBitsPerByte, and T.

◆ TryConvertKey()

static Handle<Object> v8::internal::TryConvertKey ( Handle< Object key,
Isolate isolate 
)
static

Definition at line 1104 of file ic.cc.

1104  {
1105  // This helper implements a few common fast cases for converting
1106  // non-smi keys of keyed loads/stores to a smi or a string.
1107  if (key->IsHeapNumber()) {
1108  double value = Handle<HeapNumber>::cast(key)->value();
1109  if (std::isnan(value)) {
1110  key = isolate->factory()->nan_string();
1111  } else {
1112  int int_value = FastD2I(value);
1113  if (value == int_value && Smi::IsValid(int_value)) {
1114  key = Handle<Smi>(Smi::FromInt(int_value), isolate);
1115  }
1116  }
1117  } else if (key->IsUndefined()) {
1118  key = isolate->factory()->undefined_string();
1119  }
1120  return key;
1121 }

References v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), FastD2I(), v8::internal::Smi::FromInt(), and v8::internal::Smi::IsValid().

Referenced by v8::internal::KeyedLoadIC::Load(), and v8::internal::KeyedStoreIC::Store().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryNumberToSize()

bool v8::internal::TryNumberToSize ( Isolate isolate,
Object number,
size_t *  result 
)
inline

Definition at line 207 of file conversions.h.

208  {
209  SealHandleScope shs(isolate);
210  if (number->IsSmi()) {
211  int value = Smi::cast(number)->value();
212  DCHECK(static_cast<unsigned>(Smi::kMaxValue)
213  <= std::numeric_limits<size_t>::max());
214  if (value >= 0) {
215  *result = static_cast<size_t>(value);
216  return true;
217  }
218  return false;
219  } else {
220  DCHECK(number->IsHeapNumber());
221  double value = HeapNumber::cast(number)->value();
222  if (value >= 0 &&
223  value <= std::numeric_limits<size_t>::max()) {
224  *result = static_cast<size_t>(value);
225  return true;
226  } else {
227  return false;
228  }
229  }
230 }

References DCHECK, and v8::internal::Smi::kMaxValue.

Referenced by DataViewGetValue(), DataViewSetValue(), NumberToSize(), and RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ Type2String()

static const char* v8::internal::Type2String ( Flag::FlagType  type)
static

Definition at line 170 of file flags.cc.

170  {
171  switch (type) {
172  case Flag::TYPE_BOOL: return "bool";
173  case Flag::TYPE_MAYBE_BOOL: return "maybe_bool";
174  case Flag::TYPE_INT: return "int";
175  case Flag::TYPE_FLOAT: return "float";
176  case Flag::TYPE_STRING: return "string";
177  case Flag::TYPE_ARGS: return "arguments";
178  }
179  UNREACHABLE();
180  return NULL;
181 }

References NULL, and UNREACHABLE.

Referenced by v8::internal::FlagList::PrintHelp(), and v8::internal::FlagList::SetFlagsFromCommandLine().

+ Here is the caller graph for this function:

◆ TypeCheck()

static Object* v8::internal::TypeCheck ( Heap heap,
int  argc,
Object **  argv,
FunctionTemplateInfo info 
)
inlinestatic

Definition at line 1054 of file builtins.cc.

1057  {
1058  Object* recv = argv[0];
1059  // API calls are only supported with JSObject receivers.
1060  if (!recv->IsJSObject()) return heap->null_value();
1061  Object* sig_obj = info->signature();
1062  if (sig_obj->IsUndefined()) return recv;
1063  SignatureInfo* sig = SignatureInfo::cast(sig_obj);
1064  // If necessary, check the receiver
1065  Object* recv_type = sig->receiver();
1066  Object* holder = recv;
1067  if (!recv_type->IsUndefined()) {
1068  holder = FindHidden(heap, holder, FunctionTemplateInfo::cast(recv_type));
1069  if (holder == heap->null_value()) return heap->null_value();
1070  }
1071  Object* args_obj = sig->args();
1072  // If there is no argument signature we're done
1073  if (args_obj->IsUndefined()) return holder;
1074  FixedArray* args = FixedArray::cast(args_obj);
1075  int length = args->length();
1076  if (argc <= length) length = argc - 1;
1077  for (int i = 0; i < length; i++) {
1078  Object* argtype = args->get(i);
1079  if (argtype->IsUndefined()) continue;
1080  Object** arg = &argv[-1 - i];
1081  Object* current = *arg;
1082  current = FindHidden(heap, current, FunctionTemplateInfo::cast(argtype));
1083  if (current == heap->null_value()) current = heap->undefined_value();
1084  *arg = current;
1085  }
1086  return holder;
1087 }
static Object * FindHidden(Heap *heap, Object *object, FunctionTemplateInfo *type)
Definition: builtins.cc:1034

References FindHidden(), v8::internal::FixedArray::get(), and v8::internal::FixedArrayBase::length().

Referenced by HandleApiCallHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TypedArrayMap()

static Handle<Map> v8::internal::TypedArrayMap ( Isolate isolate,
ExternalArrayType  array_type,
ElementsKind  target_kind 
)
static

Definition at line 9470 of file hydrogen.cc.

9472  {
9473  Handle<Context> native_context = isolate->native_context();
9474  Handle<JSFunction> fun;
9475  switch (array_type) {
9476 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
9477  case kExternal##Type##Array: \
9478  fun = Handle<JSFunction>(native_context->type##_array_fun()); \
9479  break;
9480 
9482 #undef TYPED_ARRAY_CASE
9483  }
9484  Handle<Map> map(fun->initial_map());
9485  return Map::AsElementsKind(map, target_kind);
9486 }
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)

References v8::internal::Map::AsElementsKind(), v8::internal::HGraphBuilder::isolate(), map, v8::internal::Isolate::native_context(), TYPED_ARRAY_CASE, and TYPED_ARRAYS.

+ Here is the call graph for this function:

◆ TypeOfString()

static String* v8::internal::TypeOfString ( HConstant *  constant,
Isolate isolate 
)
static

Definition at line 1296 of file hydrogen-instructions.cc.

1296  {
1297  Heap* heap = isolate->heap();
1298  if (constant->HasNumberValue()) return heap->number_string();
1299  if (constant->IsUndetectable()) return heap->undefined_string();
1300  if (constant->HasStringValue()) return heap->string_string();
1301  switch (constant->GetInstanceType()) {
1302  case ODDBALL_TYPE: {
1303  Unique<Object> unique = constant->GetUnique();
1304  if (unique.IsKnownGlobal(heap->true_value()) ||
1305  unique.IsKnownGlobal(heap->false_value())) {
1306  return heap->boolean_string();
1307  }
1308  if (unique.IsKnownGlobal(heap->null_value())) {
1309  return heap->object_string();
1310  }
1311  DCHECK(unique.IsKnownGlobal(heap->undefined_value()));
1312  return heap->undefined_string();
1313  }
1314  case SYMBOL_TYPE:
1315  return heap->symbol_string();
1316  case JS_FUNCTION_TYPE:
1318  return heap->function_string();
1319  default:
1320  return heap->object_string();
1321  }
1322 }

References DCHECK, v8::internal::Isolate::heap(), v8::internal::Unique< T >::IsKnownGlobal(), JS_FUNCTION_PROXY_TYPE, JS_FUNCTION_TYPE, ODDBALL_TYPE, and SYMBOL_TYPE.

+ Here is the call graph for this function:

◆ U()

v8::internal::U ( IsStringWrapperSafeForDefaultValueOf  )

Definition at line 9026 of file runtime.cc.

9032  {
9033  SealHandleScope shs(isolate);
9034  DCHECK(args.length() == 1);
9035  CONVERT_ARG_CHECKED(Object, obj, 0);
9036  return isolate->heap()->ToBoolean(obj->IsSmi());
9037 }

References CONVERT_ARG_CHECKED, and DCHECK.

◆ uint64_to_double()

double v8::internal::uint64_to_double ( uint64_t  d64)
inline

Definition at line 15 of file double.h.

15 { return bit_cast<double>(d64); }

Referenced by RUNTIME_FUNCTION(), SignedZero(), and v8::internal::Double::value().

+ Here is the caller graph for this function:

◆ UnhandledSortHelper()

static int v8::internal::UnhandledSortHelper ( LiveRange *const *  a,
LiveRange *const *  b 
)
static

Definition at line 1673 of file lithium-allocator.cc.

1673  {
1674  DCHECK(!(*a)->ShouldBeAllocatedBefore(*b) ||
1675  !(*b)->ShouldBeAllocatedBefore(*a));
1676  if ((*a)->ShouldBeAllocatedBefore(*b)) return 1;
1677  if ((*b)->ShouldBeAllocatedBefore(*a)) return -1;
1678  return (*a)->id() - (*b)->id();
1679 }

References DCHECK.

◆ UnscopableLookup()

static Maybe<PropertyAttributes> v8::internal::UnscopableLookup ( LookupIterator *  it)
static

Lookups a property in an object environment, taking the unscopables into account.

This is used For HasBinding spec algorithms for ObjectEnvironment.

Definition at line 78 of file contexts.cc.

78  {
79  Isolate* isolate = it->isolate();
80 
81  Maybe<PropertyAttributes> attrs = JSReceiver::GetPropertyAttributes(it);
82  DCHECK(attrs.has_value || isolate->has_pending_exception());
83  if (!attrs.has_value || attrs.value == ABSENT) return attrs;
84 
85  Handle<Symbol> unscopables_symbol(
86  isolate->native_context()->unscopables_symbol(), isolate);
87  Handle<Object> receiver = it->GetReceiver();
88  Handle<Object> unscopables;
89  MaybeHandle<Object> maybe_unscopables =
90  Object::GetProperty(receiver, unscopables_symbol);
91  if (!maybe_unscopables.ToHandle(&unscopables)) {
92  return Maybe<PropertyAttributes>();
93  }
94  if (!unscopables->IsSpecObject()) return attrs;
95  Maybe<bool> blacklist = JSReceiver::HasProperty(
96  Handle<JSReceiver>::cast(unscopables), it->name());
97  if (!blacklist.has_value) {
98  DCHECK(isolate->has_pending_exception());
99  return Maybe<PropertyAttributes>();
100  }
101  if (blacklist.value) return maybe(ABSENT);
102  return attrs;
103 }

References ABSENT, DCHECK, v8::internal::Object::GetProperty(), v8::internal::JSReceiver::GetPropertyAttributes(), v8::internal::Isolate::has_pending_exception(), v8::Maybe< T >::has_value, v8::internal::JSReceiver::HasProperty(), v8::maybe(), v8::internal::Isolate::native_context(), and v8::Maybe< T >::value.

Referenced by v8::internal::Context::Lookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsigned_bitextract_32()

uint32_t v8::internal::unsigned_bitextract_32 ( int  msb,
int  lsb,
uint32_t  x 
)
inline

Definition at line 880 of file utils.h.

880  {
881  return (x >> lsb) & ((1 << (1 + msb - lsb)) - 1);
882 }

Referenced by v8::internal::Instruction::Bits().

+ Here is the caller graph for this function:

◆ unsigned_bitextract_64()

uint64_t v8::internal::unsigned_bitextract_64 ( int  msb,
int  lsb,
uint64_t  x 
)
inline

Definition at line 884 of file utils.h.

884  {
885  return (x >> lsb) & ((static_cast<uint64_t>(1) << (1 + msb - lsb)) - 1);
886 }

◆ UntagSmiFieldMemOperand()

MemOperand v8::internal::UntagSmiFieldMemOperand ( Register  object,
int  offset 
)
inline

Definition at line 28 of file macro-assembler-arm64-inl.h.

28  {
29  return UntagSmiMemOperand(object, offset - kHeapObjectTag);
30 }
MemOperand UntagSmiMemOperand(Register object, int offset)

References kHeapObjectTag, and UntagSmiMemOperand().

+ Here is the call graph for this function:

◆ UntagSmiMemOperand()

MemOperand v8::internal::UntagSmiMemOperand ( Register  object,
int  offset 
)
inline

Definition at line 33 of file macro-assembler-arm64-inl.h.

33  {
34  // Assumes that Smis are shifted by 32 bits and little endianness.
35  STATIC_ASSERT(kSmiShift == 32);
36  return MemOperand(object, offset + (kSmiShift / kBitsPerByte));
37 }
const int kSmiShift

References kBitsPerByte, kSmiShift, and STATIC_ASSERT().

Referenced by v8::internal::LCodeGen::PrepareKeyedArrayOperand(), and UntagSmiFieldMemOperand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnwrapFrameId()

static StackFrame::Id v8::internal::UnwrapFrameId ( int  wrapped)
static

Definition at line 5442 of file runtime.cc.

5442  {
5443  return static_cast<StackFrame::Id>(wrapped << 2);
5444 }

Referenced by RUNTIME_FUNCTION().

+ Here is the caller graph for this function:

◆ UnwrapJSValue()

static Handle<Object> v8::internal::UnwrapJSValue ( Handle< JSValue jsValue)
static

Definition at line 576 of file liveedit.cc.

576  {
577  return Handle<Object>(jsValue->value(), jsValue->GetIsolate());
578 }

Referenced by v8::internal::FunctionInfoWrapper::GetCodeScopeInfo(), v8::internal::FunctionInfoWrapper::GetFeedbackVector(), and v8::internal::FunctionInfoWrapper::GetFunctionCode().

+ Here is the caller graph for this function:

◆ UnwrapSharedFunctionInfoFromJSValue()

static Handle<SharedFunctionInfo> v8::internal::UnwrapSharedFunctionInfoFromJSValue ( Handle< JSValue jsValue)
static

Definition at line 593 of file liveedit.cc.

594  {
595  Object* shared = jsValue->value();
596  CHECK(shared->IsSharedFunctionInfo());
597  return Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(shared));
598 }

References CHECK.

Referenced by CheckActivation(), v8::internal::LiveEdit::FindActiveGenerators(), v8::internal::SharedInfoWrapper::GetInfo(), v8::internal::LiveEdit::ReplaceRefToNestedFunction(), and v8::internal::LiveEdit::SetFunctionScript().

+ Here is the caller graph for this function:

◆ UpdateBoundsCheck()

static void v8::internal::UpdateBoundsCheck ( int  index,
int checked_up_to 
)
static

Definition at line 3189 of file jsregexp.cc.

3189  {
3190  if (index > *checked_up_to) {
3191  *checked_up_to = index;
3192  }
3193 }

Referenced by v8::internal::TextNode::TextEmitPass().

+ Here is the caller graph for this function:

◆ UpdateGetterSetterInDictionary()

static bool v8::internal::UpdateGetterSetterInDictionary ( SeededNumberDictionary dictionary,
uint32_t  index,
Object getter,
Object setter,
PropertyAttributes  attributes 
)
static

Definition at line 5912 of file objects.cc.

5917  {
5918  int entry = dictionary->FindEntry(index);
5919  if (entry != SeededNumberDictionary::kNotFound) {
5920  Object* result = dictionary->ValueAt(entry);
5921  PropertyDetails details = dictionary->DetailsAt(entry);
5922  if (details.type() == CALLBACKS && result->IsAccessorPair()) {
5923  DCHECK(details.IsConfigurable());
5924  if (details.attributes() != attributes) {
5925  dictionary->DetailsAtPut(
5926  entry,
5927  PropertyDetails(attributes, CALLBACKS, index));
5928  }
5929  AccessorPair::cast(result)->SetComponents(getter, setter);
5930  return true;
5931  }
5932  }
5933  return false;
5934 }

References CALLBACKS, DCHECK, v8::internal::Dictionary< Derived, Shape, Key >::DetailsAt(), v8::internal::Dictionary< Derived, Shape, Key >::DetailsAtPut(), v8::internal::HashTable< Derived, Shape, Key >::FindEntry(), v8::internal::HashTable< Derived, Shape, Key >::kNotFound, and v8::internal::Dictionary< Derived, Shape, Key >::ValueAt().

Referenced by v8::internal::JSObject::DefineElementAccessor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdatePointer()

static void v8::internal::UpdatePointer ( HeapObject **  address,
HeapObject object 
)
static

Definition at line 3038 of file mark-compact.cc.

3038  {
3039  Address new_addr = Memory::Address_at(object->address());
3040 
3041  // The new space sweep will overwrite the map word of dead objects
3042  // with NULL. In this case we do not need to transfer this entry to
3043  // the store buffer which we are rebuilding.
3044  // We perform the pointer update with a no barrier compare-and-swap. The
3045  // compare and swap may fail in the case where the pointer update tries to
3046  // update garbage memory which was concurrently accessed by the sweeper.
3047  if (new_addr != NULL) {
3049  reinterpret_cast<base::AtomicWord*>(address),
3050  reinterpret_cast<base::AtomicWord>(object),
3051  reinterpret_cast<base::AtomicWord>(HeapObject::FromAddress(new_addr)));
3052  }
3053 }
Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
intptr_t AtomicWord
Definition: atomicops.h:57

References v8::internal::HeapObject::address(), v8::internal::Memory::Address_at(), v8::internal::HeapObject::FromAddress(), v8::base::NoBarrier_CompareAndSwap(), and NULL.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateReferenceInExternalStringTableEntry()

static String* v8::internal::UpdateReferenceInExternalStringTableEntry ( Heap heap,
Object **  p 
)
static

Definition at line 3056 of file mark-compact.cc.

3057  {
3058  MapWord map_word = HeapObject::cast(*p)->map_word();
3059 
3060  if (map_word.IsForwardingAddress()) {
3061  return String::cast(map_word.ToForwardingAddress());
3062  }
3063 
3064  return String::cast(*p);
3065 }

References v8::internal::HeapObject::map_word().

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateSlot()

static void v8::internal::UpdateSlot ( Isolate isolate,
ObjectVisitor v,
SlotsBuffer::SlotType  slot_type,
Address  addr 
)
inlinestatic

Definition at line 3229 of file mark-compact.cc.

3230  {
3231  switch (slot_type) {
3232  case SlotsBuffer::CODE_TARGET_SLOT: {
3233  RelocInfo rinfo(addr, RelocInfo::CODE_TARGET, 0, NULL);
3234  rinfo.Visit(isolate, v);
3235  break;
3236  }
3237  case SlotsBuffer::CODE_ENTRY_SLOT: {
3238  v->VisitCodeEntry(addr);
3239  break;
3240  }
3241  case SlotsBuffer::RELOCATED_CODE_OBJECT: {
3242  HeapObject* obj = HeapObject::FromAddress(addr);
3243  Code::cast(obj)->CodeIterateBody(v);
3244  break;
3245  }
3246  case SlotsBuffer::DEBUG_TARGET_SLOT: {
3247  RelocInfo rinfo(addr, RelocInfo::DEBUG_BREAK_SLOT, 0, NULL);
3248  if (rinfo.IsPatchedDebugBreakSlotSequence()) rinfo.Visit(isolate, v);
3249  break;
3250  }
3251  case SlotsBuffer::JS_RETURN_SLOT: {
3252  RelocInfo rinfo(addr, RelocInfo::JS_RETURN, 0, NULL);
3253  if (rinfo.IsPatchedReturnSequence()) rinfo.Visit(isolate, v);
3254  break;
3255  }
3256  case SlotsBuffer::EMBEDDED_OBJECT_SLOT: {
3257  RelocInfo rinfo(addr, RelocInfo::EMBEDDED_OBJECT, 0, NULL);
3258  rinfo.Visit(isolate, v);
3259  break;
3260  }
3261  default:
3262  UNREACHABLE();
3263  break;
3264  }
3265 }

References v8::internal::SlotsBuffer::CODE_ENTRY_SLOT, v8::internal::RelocInfo::CODE_TARGET, v8::internal::SlotsBuffer::CODE_TARGET_SLOT, v8::internal::RelocInfo::DEBUG_BREAK_SLOT, v8::internal::SlotsBuffer::DEBUG_TARGET_SLOT, v8::internal::RelocInfo::EMBEDDED_OBJECT, v8::internal::SlotsBuffer::EMBEDDED_OBJECT_SLOT, v8::internal::HeapObject::FromAddress(), v8::internal::RelocInfo::JS_RETURN, v8::internal::SlotsBuffer::JS_RETURN_SLOT, NULL, v8::internal::SlotsBuffer::RELOCATED_CODE_OBJECT, UNREACHABLE, and v8::internal::RelocInfo::Visit().

Referenced by v8::internal::SlotsBuffer::UpdateSlots(), and v8::internal::SlotsBuffer::UpdateSlotsWithFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateStackLocalsFromMaterializedObject()

static void v8::internal::UpdateStackLocalsFromMaterializedObject ( Isolate isolate,
Handle< JSObject target,
Handle< JSFunction function,
JavaScriptFrame frame,
int  inlined_jsframe_index 
)
static

Definition at line 6132 of file runtime.cc.

6136  {
6137  if (inlined_jsframe_index != 0 || frame->is_optimized()) {
6138  // Optimized frames are not supported.
6139  // TODO(yangguo): make sure all code deoptimized when debugger is active
6140  // and assert that this cannot happen.
6141  return;
6142  }
6143 
6144  Handle<SharedFunctionInfo> shared(function->shared());
6145  Handle<ScopeInfo> scope_info(shared->scope_info());
6146 
6147  // Parameters.
6148  for (int i = 0; i < scope_info->ParameterCount(); ++i) {
6149  // Shadowed parameters were not materialized.
6150  Handle<String> name(scope_info->ParameterName(i));
6151  if (ParameterIsShadowedByContextLocal(scope_info, name)) continue;
6152 
6153  DCHECK(!frame->GetParameter(i)->IsTheHole());
6154  HandleScope scope(isolate);
6155  Handle<Object> value =
6156  Object::GetPropertyOrElement(target, name).ToHandleChecked();
6157  frame->SetParameterValue(i, *value);
6158  }
6159 
6160  // Stack locals.
6161  for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
6162  if (scope_info->LocalIsSynthetic(i)) continue;
6163  if (frame->GetExpression(i)->IsTheHole()) continue;
6164  HandleScope scope(isolate);
6165  Handle<Object> value = Object::GetPropertyOrElement(
6166  target, handle(scope_info->StackLocalName(i),
6167  isolate)).ToHandleChecked();
6168  frame->SetExpression(i, *value);
6169  }
6170 }

References DCHECK, v8::internal::StandardFrame::GetExpression(), v8::internal::JavaScriptFrame::GetParameter(), v8::internal::Object::GetPropertyOrElement(), handle(), name, ParameterIsShadowedByContextLocal(), v8::internal::StandardFrame::SetExpression(), and v8::internal::JavaScriptFrame::SetParameterValue().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Utf8CharacterBack()

static void v8::internal::Utf8CharacterBack ( const byte buffer,
unsigned *  cursor 
)
inlinestatic

Definition at line 248 of file scanner-character-streams.cc.

248  {
249  byte character = buffer[--*cursor];
250  if (character > unibrow::Utf8::kMaxOneByteChar) {
252  // Last byte of a multi-byte character encoding. Step backwards until
253  // pointing to the first byte of the encoding, recognized by having the
254  // top two bits set.
255  while (IsUtf8MultiCharacterFollower(buffer[--*cursor])) { }
256  DCHECK(IsUtf8MultiCharacterStart(buffer[*cursor]));
257  }
258 }
static const unsigned kMaxOneByteChar
Definition: unicode.h:141
static bool IsUtf8MultiCharacterFollower(byte later_byte)

References DCHECK, IsUtf8MultiCharacterFollower(), and unibrow::Utf8::kMaxOneByteChar.

Referenced by v8::internal::Utf8ToUtf16CharacterStream::SetRawPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Utf8CharacterForward()

static void v8::internal::Utf8CharacterForward ( const byte buffer,
unsigned *  cursor 
)
inlinestatic

Definition at line 263 of file scanner-character-streams.cc.

263  {
264  byte character = buffer[(*cursor)++];
265  if (character > unibrow::Utf8::kMaxOneByteChar) {
266  // First character of a multi-byte character encoding.
267  // The number of most-significant one-bits determines the length of the
268  // encoding:
269  // 110..... - (0xCx, 0xDx) one additional byte (minimum).
270  // 1110.... - (0xEx) two additional bytes.
271  // 11110... - (0xFx) three additional bytes (maximum).
272  DCHECK(IsUtf8MultiCharacterStart(character));
273  // Additional bytes is:
274  // 1 if value in range 0xC0 .. 0xDF.
275  // 2 if value in range 0xE0 .. 0xEF.
276  // 3 if value in range 0xF0 .. 0xF7.
277  // Encode that in a single value.
278  unsigned additional_bytes =
279  ((0x3211u) >> (((character - 0xC0) >> 2) & 0xC)) & 0x03;
280  *cursor += additional_bytes;
281  DCHECK(!IsUtf8MultiCharacterFollower(buffer[1 + additional_bytes]));
282  }
283 }

References DCHECK, IsUtf8MultiCharacterFollower(), and unibrow::Utf8::kMaxOneByteChar.

Referenced by v8::internal::Utf8ToUtf16CharacterStream::SetRawPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ utoa()

template<typename T >
static int v8::internal::utoa ( T  value,
const Vector< char > &  buffer,
int  buffer_pos 
)
static

Definition at line 2814 of file heap-snapshot-generator.cc.

2814  {
2815  typename ToUnsigned<sizeof(value)>::Type unsigned_value = value;
2816  STATIC_ASSERT(sizeof(value) == sizeof(unsigned_value));
2817  return utoa_impl(unsigned_value, buffer, buffer_pos);
2818 }
static int utoa_impl(T value, const Vector< char > &buffer, int buffer_pos)
TypeImpl< ZoneTypeConfig > Type

References STATIC_ASSERT(), and utoa_impl().

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeEdge(), v8::internal::HeapSnapshotJSONSerializer::SerializeNode(), SerializePosition(), v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode(), and v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNodeInfos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ utoa_impl()

template<typename T >
static int v8::internal::utoa_impl ( T  value,
const Vector< char > &  buffer,
int  buffer_pos 
)
static

Definition at line 2794 of file heap-snapshot-generator.cc.

2794  {
2795  STATIC_ASSERT(static_cast<T>(-1) > 0); // Check that T is unsigned
2796  int number_of_digits = 0;
2797  T t = value;
2798  do {
2799  ++number_of_digits;
2800  } while (t /= 10);
2801 
2802  buffer_pos += number_of_digits;
2803  int result = buffer_pos;
2804  do {
2805  int last_digit = static_cast<int>(value % 10);
2806  buffer[--buffer_pos] = '0' + last_digit;
2807  value /= 10;
2808  } while (value);
2809  return result;
2810 }

References STATIC_ASSERT(), and T.

Referenced by utoa().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ V8_DECLARE_ONCE() [1/2]

v8::internal::V8_DECLARE_ONCE ( init_once  )

◆ V8_DECLARE_ONCE() [2/2]

v8::internal::V8_DECLARE_ONCE ( initialize_gc_once  )

◆ VisitWeakList()

template<class T >
Object * v8::internal::VisitWeakList ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

Definition at line 191 of file objects-visiting.cc.

191  {
192  Object* undefined = heap->undefined_value();
193  Object* head = undefined;
194  T* tail = NULL;
195  MarkCompactCollector* collector = heap->mark_compact_collector();
196  bool record_slots = MustRecordSlots(heap);
197  while (list != undefined) {
198  // Check whether to keep the candidate in the list.
199  T* candidate = reinterpret_cast<T*>(list);
200  Object* retained = retainer->RetainAs(list);
201  if (retained != NULL) {
202  if (head == undefined) {
203  // First element in the list.
204  head = retained;
205  } else {
206  // Subsequent elements in the list.
207  DCHECK(tail != NULL);
208  WeakListVisitor<T>::SetWeakNext(tail, retained);
209  if (record_slots) {
210  Object** next_slot =
211  HeapObject::RawField(tail, WeakListVisitor<T>::WeakNextOffset());
212  collector->RecordSlot(next_slot, next_slot, retained);
213  }
214  }
215  // Retained object is new tail.
216  DCHECK(!retained->IsUndefined());
217  candidate = reinterpret_cast<T*>(retained);
218  tail = candidate;
219 
220 
221  // tail is a live object, visit it.
222  WeakListVisitor<T>::VisitLiveObject(heap, tail, retainer);
223  } else {
224  WeakListVisitor<T>::VisitPhantomObject(heap, candidate);
225  }
226 
227  // Move to next element in the list.
228  list = WeakListVisitor<T>::WeakNext(candidate);
229  }
230 
231  // Terminate the list if there is one or more elements.
232  if (tail != NULL) {
233  WeakListVisitor<T>::SetWeakNext(tail, undefined);
234  }
235  return head;
236 }
static bool MustRecordSlots(Heap *heap)

References DCHECK, v8::internal::Heap::mark_compact_collector(), MustRecordSlots(), NULL, v8::internal::HeapObject::RawField(), v8::internal::WeakObjectRetainer::RetainAs(), and T.

+ Here is the call graph for this function:

◆ VisitWeakList< AllocationSite >()

template Object* v8::internal::VisitWeakList< AllocationSite > ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

Referenced by v8::internal::Heap::ProcessAllocationSites().

+ Here is the caller graph for this function:

◆ VisitWeakList< Code >()

template Object* v8::internal::VisitWeakList< Code > ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

Referenced by v8::internal::MarkCompactCollector::ClearNonLiveDependentCodeInGroup().

+ Here is the caller graph for this function:

◆ VisitWeakList< Context >()

template Object* v8::internal::VisitWeakList< Context > ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

Referenced by v8::internal::Heap::ProcessNativeContexts().

+ Here is the caller graph for this function:

◆ VisitWeakList< JSArrayBuffer >()

template Object* v8::internal::VisitWeakList< JSArrayBuffer > ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

Referenced by v8::internal::Heap::ProcessArrayBuffers().

+ Here is the caller graph for this function:

◆ VisitWeakList< JSFunction >()

template Object* v8::internal::VisitWeakList< JSFunction > ( Heap heap,
Object list,
WeakObjectRetainer retainer 
)

◆ VSNPrintF()

int v8::internal::VSNPrintF ( Vector< char >  str,
const char *  format,
va_list  args 
)

Definition at line 114 of file utils.cc.

114  {
115  return base::OS::VSNPrintF(str.start(), str.length(), format, args);
116 }

References v8::internal::Vector< T >::length(), v8::internal::Vector< T >::start(), and v8::base::OS::VSNPrintF().

Referenced by v8::internal::StringBuilder::AddFormattedList(), v8::internal::StringsStorage::GetVFormatted(), and SNPrintF().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WeakCollectionInitialize()

static Handle<JSWeakCollection> v8::internal::WeakCollectionInitialize ( Isolate isolate,
Handle< JSWeakCollection weak_collection 
)
static

Definition at line 234 of file runtime-collections.cc.

235  {
236  DCHECK(weak_collection->map()->inobject_properties() == 0);
237  Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0);
238  weak_collection->set_table(*table);
239  return weak_collection;
240 }

References DCHECK, and v8::internal::HashTable< ObjectHashTable, ObjectHashTableShape, Handle< Object > >::New().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WhichPowerOf2()

int v8::internal::WhichPowerOf2 ( uint32_t  x)
inline

Definition at line 37 of file utils.h.

37  {
39  int bits = 0;
40 #ifdef DEBUG
41  int original_x = x;
42 #endif
43  if (x >= 0x10000) {
44  bits += 16;
45  x >>= 16;
46  }
47  if (x >= 0x100) {
48  bits += 8;
49  x >>= 8;
50  }
51  if (x >= 0x10) {
52  bits += 4;
53  x >>= 4;
54  }
55  switch (x) {
56  default: UNREACHABLE();
57  case 8: bits++; // Fall through.
58  case 4: bits++; // Fall through.
59  case 2: bits++; // Fall through.
60  case 1: break;
61  }
62  DCHECK_EQ(1 << bits, original_x);
63  return bits;
64  return 0;
65 }

References DCHECK, DCHECK_EQ, v8::base::bits::IsPowerOfTwo32(), and UNREACHABLE.

Referenced by WhichPowerOf2Abs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WhichPowerOf2Abs()

int32_t v8::internal::WhichPowerOf2Abs ( int32_t  x)
inline

Definition at line 168 of file utils.h.

168  {
169  return (x == kMinInt) ? 31 : WhichPowerOf2(Abs(x));
170 }
int WhichPowerOf2(uint32_t x)
Definition: utils.h:37
T Abs(T a)
Definition: utils.h:153

References Abs(), kMinInt, and WhichPowerOf2().

+ Here is the call graph for this function:

◆ WipeOutRelocations()

static void v8::internal::WipeOutRelocations ( Code code)
static

Definition at line 1712 of file serialize.cc.

1712  {
1713  int mode_mask =
1714  RelocInfo::kCodeTargetMask |
1715  RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
1716  RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) |
1717  RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
1718  for (RelocIterator it(code, mode_mask); !it.done(); it.next()) {
1719  if (!(FLAG_enable_ool_constant_pool && it.rinfo()->IsInConstantPool())) {
1720  it.rinfo()->WipeOut();
1721  }
1722  }
1723 }

References v8::internal::RelocIterator::done(), v8::internal::RelocInfo::EMBEDDED_OBJECT, v8::internal::RelocInfo::EXTERNAL_REFERENCE, v8::internal::RelocInfo::kCodeTargetMask, v8::internal::RelocInfo::ModeMask(), and v8::internal::RelocInfo::RUNTIME_ENTRY.

Referenced by v8::internal::Serializer::ObjectSerializer::OutputRawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WrapFrameId()

static Smi* v8::internal::WrapFrameId ( StackFrame::Id  id)
static

Definition at line 5436 of file runtime.cc.

5436  {
5437  DCHECK(IsAligned(OffsetFrom(id), static_cast<intptr_t>(4)));
5438  return Smi::FromInt(id >> 2);
5439 }

References DCHECK, v8::internal::Smi::FromInt(), IsAligned(), and OffsetFrom().

Referenced by RUNTIME_FUNCTION().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WrapInJSValue()

static Handle<JSValue> v8::internal::WrapInJSValue ( Handle< HeapObject object)
static

Definition at line 583 of file liveedit.cc.

583  {
584  Isolate* isolate = object->GetIsolate();
585  Handle<JSFunction> constructor = isolate->opaque_reference_function();
586  Handle<JSValue> result =
587  Handle<JSValue>::cast(isolate->factory()->NewJSObject(constructor));
588  result->set_value(*object);
589  return result;
590 }

References v8::internal::Handle< T >::cast(), and v8::internal::Isolate::factory().

Referenced by v8::internal::FunctionInfoWrapper::SetFunctionCode(), v8::internal::SharedInfoWrapper::SetProperties(), and v8::internal::FunctionInfoWrapper::SetSharedFunctionInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteAsCFile()

int v8::internal::WriteAsCFile ( const char *  filename,
const char *  varname,
const char *  str,
int  size,
bool  verbose = true 
)

◆ WriteBytes()

int v8::internal::WriteBytes ( const char *  filename,
const byte bytes,
int  size,
bool  verbose 
)

Definition at line 307 of file utils.cc.

310  {
311  const char* str = reinterpret_cast<const char*>(bytes);
312  return WriteChars(filename, str, size, verbose);
313 }
int WriteChars(const char *filename, const char *str, int size, bool verbose)
Definition: utils.cc:290

References size, and WriteChars().

+ Here is the call graph for this function:

◆ WriteChars()

int v8::internal::WriteChars ( const char *  filename,
const char *  str,
int  size,
bool  verbose 
)

Definition at line 290 of file utils.cc.

293  {
294  FILE* f = base::OS::FOpen(filename, "wb");
295  if (f == NULL) {
296  if (verbose) {
297  base::OS::PrintError("Cannot open file %s for writing.\n", filename);
298  }
299  return 0;
300  }
301  int written = WriteCharsToFile(str, size, f);
302  fclose(f);
303  return written;
304 }

References v8::base::OS::FOpen(), NULL, v8::base::OS::PrintError(), size, and WriteCharsToFile().

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CodeTracer(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::HTracer(), and WriteBytes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteCharsToFile()

int v8::internal::WriteCharsToFile ( const char *  str,
int  size,
FILE *  f 
)

Definition at line 259 of file utils.cc.

259  {
260  int total = 0;
261  while (total < size) {
262  int write = static_cast<int>(fwrite(str, 1, size - total, f));
263  if (write == 0) {
264  return total;
265  }
266  total += write;
267  str += write;
268  }
269  return total;
270 }

References size.

Referenced by AppendChars(), and WriteChars().

+ Here is the caller graph for this function:

◆ WriteOneByteData() [1/2]

static void v8::internal::WriteOneByteData ( String s,
uint8_t *  chars,
int  len 
)
inlinestatic

Definition at line 3805 of file heap.cc.

3805  {
3806  DCHECK(s->length() == len);
3807  String::WriteToFlat(s, chars, 0, len);
3808 }

References DCHECK, v8::internal::String::length(), and v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:

◆ WriteOneByteData() [2/2]

static void v8::internal::WriteOneByteData ( Vector< const char >  vector,
uint8_t *  chars,
int  len 
)
inlinestatic

Definition at line 3771 of file heap.cc.

3772  {
3773  // Only works for one byte strings.
3774  DCHECK(vector.length() == len);
3775  MemCopy(chars, vector.start(), len);
3776 }

References DCHECK, v8::internal::Vector< T >::length(), MemCopy(), and v8::internal::Vector< T >::start().

Referenced by v8::internal::Heap::AllocateInternalizedStringImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteTwoByteData() [1/2]

static void v8::internal::WriteTwoByteData ( String s,
uint16_t *  chars,
int  len 
)
inlinestatic

Definition at line 3811 of file heap.cc.

3811  {
3812  DCHECK(s->length() == len);
3813  String::WriteToFlat(s, chars, 0, len);
3814 }

References DCHECK, v8::internal::String::length(), and v8::internal::String::WriteToFlat().

+ Here is the call graph for this function:

◆ WriteTwoByteData() [2/2]

static void v8::internal::WriteTwoByteData ( Vector< const char >  vector,
uint16_t *  chars,
int  len 
)
inlinestatic

Definition at line 3778 of file heap.cc.

3779  {
3780  const uint8_t* stream = reinterpret_cast<const uint8_t*>(vector.start());
3781  unsigned stream_length = vector.length();
3782  while (stream_length != 0) {
3783  unsigned consumed = 0;
3784  uint32_t c = unibrow::Utf8::ValueOf(stream, stream_length, &consumed);
3786  DCHECK(consumed <= stream_length);
3787  stream_length -= consumed;
3788  stream += consumed;
3790  len -= 2;
3791  if (len < 0) break;
3792  *chars++ = unibrow::Utf16::LeadSurrogate(c);
3793  *chars++ = unibrow::Utf16::TrailSurrogate(c);
3794  } else {
3795  len -= 1;
3796  if (len < 0) break;
3797  *chars++ = c;
3798  }
3799  }
3800  DCHECK(stream_length == 0);
3801  DCHECK(len == 0);
3802 }
static uint16_t LeadSurrogate(uint32_t char_code)
Definition: unicode.h:108
static const uchar kMaxNonSurrogateCharCode
Definition: unicode.h:98
static uint16_t TrailSurrogate(uint32_t char_code)
Definition: unicode.h:111
static uchar ValueOf(const byte *str, unsigned length, unsigned *cursor)
Definition: unicode-inl.h:129
static const uchar kBadChar
Definition: unicode.h:139

References DCHECK, unibrow::Utf8::kBadChar, unibrow::Utf16::kMaxNonSurrogateCharCode, unibrow::Utf16::LeadSurrogate(), v8::internal::Vector< T >::length(), v8::internal::Vector< T >::start(), unibrow::Utf16::TrailSurrogate(), and unibrow::Utf8::ValueOf().

Referenced by v8::internal::Heap::AllocateInternalizedStringImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteUChar()

static void v8::internal::WriteUChar ( OutputStreamWriter w,
unibrow::uchar  u 
)
static

Definition at line 2978 of file heap-snapshot-generator.cc.

2978  {
2979  static const char hex_chars[] = "0123456789ABCDEF";
2980  w->AddString("\\u");
2981  w->AddCharacter(hex_chars[(u >> 12) & 0xf]);
2982  w->AddCharacter(hex_chars[(u >> 8) & 0xf]);
2983  w->AddCharacter(hex_chars[(u >> 4) & 0xf]);
2984  w->AddCharacter(hex_chars[u & 0xf]);
2985 }

References v8::internal::OutputStreamWriter::AddCharacter(), and v8::internal::OutputStreamWriter::AddString().

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ allows_lazy_compilation_without_context

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit v8::internal::allows_lazy_compilation_without_context

Definition at line 5440 of file objects-inl.h.

◆ arg_reg_1

const Register v8::internal::arg_reg_1 = { kRegister_rdi_Code }

Definition at line 190 of file assembler-x64.h.

◆ arg_reg_2

const Register v8::internal::arg_reg_2 = { kRegister_rsi_Code }

Definition at line 191 of file assembler-x64.h.

◆ arg_reg_3

const Register v8::internal::arg_reg_3 = { kRegister_rdx_Code }

Definition at line 192 of file assembler-x64.h.

◆ arg_reg_4

const Register v8::internal::arg_reg_4 = { kRegister_rcx_Code }

Definition at line 193 of file assembler-x64.h.

◆ builtin_function_table

BuiltinFunctionTable v8::internal::builtin_function_table
static
Initial value:
=
#define BUILTIN_FUNCTION_TABLE_INIT
Definition: builtins.cc:1460

Definition at line 1475 of file builtins.cc.

Referenced by v8::internal::Builtins::InitBuiltinFunctionTable(), and v8::internal::Builtins::SetUp().

◆ ByteArray

Definition at line 5287 of file objects-inl.h.

◆ BYTECODE_MASK

const int v8::internal::BYTECODE_MASK = 0xff

Definition at line 13 of file bytecodes-irregexp.h.

Referenced by RawMatch().

◆ BYTECODE_SHIFT

const int v8::internal::BYTECODE_SHIFT = 8

Definition at line 18 of file bytecodes-irregexp.h.

Referenced by RawMatch().

◆ caller_saved_code_data

JSCallerSavedCodeData v8::internal::caller_saved_code_data

Definition at line 1589 of file frames.cc.

Referenced by JSCallerSavedCode(), and SetUpJSCallerSavedCodeData().

◆ checkpoint_object_stats_mutex

base::LazyMutex v8::internal::checkpoint_object_stats_mutex = LAZY_MUTEX_INITIALIZER
static

Definition at line 6097 of file heap.cc.

Referenced by v8::internal::Heap::CheckpointObjectStats().

◆ compiler_hints

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext v8::internal::compiler_hints

Definition at line 5439 of file objects-inl.h.

◆ cp

◆ cr0

const CRegister v8::internal::cr0 = { 0 }

Definition at line 448 of file assembler-arm.h.

◆ cr1

const CRegister v8::internal::cr1 = { 1 }

Definition at line 449 of file assembler-arm.h.

◆ cr10

const CRegister v8::internal::cr10 = { 10 }

Definition at line 458 of file assembler-arm.h.

◆ cr11

const CRegister v8::internal::cr11 = { 11 }

Definition at line 459 of file assembler-arm.h.

◆ cr12

const CRegister v8::internal::cr12 = { 12 }

Definition at line 460 of file assembler-arm.h.

◆ cr13

const CRegister v8::internal::cr13 = { 13 }

Definition at line 461 of file assembler-arm.h.

◆ cr14

const CRegister v8::internal::cr14 = { 14 }

Definition at line 462 of file assembler-arm.h.

◆ cr15

const CRegister v8::internal::cr15 = { 15 }

Definition at line 463 of file assembler-arm.h.

◆ cr2

const CRegister v8::internal::cr2 = { 2 }

Definition at line 450 of file assembler-arm.h.

◆ cr3

const CRegister v8::internal::cr3 = { 3 }

Definition at line 451 of file assembler-arm.h.

◆ cr4

const CRegister v8::internal::cr4 = { 4 }

Definition at line 452 of file assembler-arm.h.

◆ cr5

const CRegister v8::internal::cr5 = { 5 }

Definition at line 453 of file assembler-arm.h.

◆ cr6

const CRegister v8::internal::cr6 = { 6 }

Definition at line 454 of file assembler-arm.h.

◆ cr7

const CRegister v8::internal::cr7 = { 7 }

Definition at line 455 of file assembler-arm.h.

◆ cr8

const CRegister v8::internal::cr8 = { 8 }

Definition at line 456 of file assembler-arm.h.

◆ cr9

const CRegister v8::internal::cr9 = { 9 }

Definition at line 457 of file assembler-arm.h.

◆ d0

const LowDwVfpRegister v8::internal::d0 = { 0 }

Definition at line 368 of file assembler-arm.h.

◆ d1

const LowDwVfpRegister v8::internal::d1 = { 1 }

Definition at line 369 of file assembler-arm.h.

◆ d10

const LowDwVfpRegister v8::internal::d10 = { 10 }

Definition at line 378 of file assembler-arm.h.

◆ d11

const LowDwVfpRegister v8::internal::d11 = { 11 }

Definition at line 379 of file assembler-arm.h.

◆ d12

const LowDwVfpRegister v8::internal::d12 = { 12 }

Definition at line 380 of file assembler-arm.h.

◆ d13

const LowDwVfpRegister v8::internal::d13 = { 13 }

Definition at line 381 of file assembler-arm.h.

◆ d14

const LowDwVfpRegister v8::internal::d14 = { 14 }

Definition at line 382 of file assembler-arm.h.

◆ d15

const LowDwVfpRegister v8::internal::d15 = { 15 }

Definition at line 383 of file assembler-arm.h.

◆ d16

const DwVfpRegister v8::internal::d16 = { 16 }

Definition at line 384 of file assembler-arm.h.

◆ d17

const DwVfpRegister v8::internal::d17 = { 17 }

Definition at line 385 of file assembler-arm.h.

◆ d18

const DwVfpRegister v8::internal::d18 = { 18 }

Definition at line 386 of file assembler-arm.h.

◆ d19

const DwVfpRegister v8::internal::d19 = { 19 }

Definition at line 387 of file assembler-arm.h.

◆ d2

const LowDwVfpRegister v8::internal::d2 = { 2 }

Definition at line 370 of file assembler-arm.h.

◆ d20

const DwVfpRegister v8::internal::d20 = { 20 }

Definition at line 388 of file assembler-arm.h.

◆ d21

const DwVfpRegister v8::internal::d21 = { 21 }

Definition at line 389 of file assembler-arm.h.

◆ d22

const DwVfpRegister v8::internal::d22 = { 22 }

Definition at line 390 of file assembler-arm.h.

◆ d23

const DwVfpRegister v8::internal::d23 = { 23 }

Definition at line 391 of file assembler-arm.h.

◆ d24

const DwVfpRegister v8::internal::d24 = { 24 }

Definition at line 392 of file assembler-arm.h.

◆ d25

const DwVfpRegister v8::internal::d25 = { 25 }

Definition at line 393 of file assembler-arm.h.

◆ d26

const DwVfpRegister v8::internal::d26 = { 26 }

Definition at line 394 of file assembler-arm.h.

◆ d27

const DwVfpRegister v8::internal::d27 = { 27 }

Definition at line 395 of file assembler-arm.h.

◆ d28

const DwVfpRegister v8::internal::d28 = { 28 }

Definition at line 396 of file assembler-arm.h.

◆ d29

const DwVfpRegister v8::internal::d29 = { 29 }

Definition at line 397 of file assembler-arm.h.

◆ d3

const LowDwVfpRegister v8::internal::d3 = { 3 }

Definition at line 371 of file assembler-arm.h.

◆ d30

const DwVfpRegister v8::internal::d30 = { 30 }

Definition at line 398 of file assembler-arm.h.

◆ d31

const DwVfpRegister v8::internal::d31 = { 31 }

Definition at line 399 of file assembler-arm.h.

◆ d4

const LowDwVfpRegister v8::internal::d4 = { 4 }

Definition at line 372 of file assembler-arm.h.

◆ d5

const LowDwVfpRegister v8::internal::d5 = { 5 }

Definition at line 373 of file assembler-arm.h.

◆ d6

const LowDwVfpRegister v8::internal::d6 = { 6 }

Definition at line 374 of file assembler-arm.h.

◆ d7

const LowDwVfpRegister v8::internal::d7 = { 7 }

Definition at line 375 of file assembler-arm.h.

◆ d8

const LowDwVfpRegister v8::internal::d8 = { 8 }

Definition at line 376 of file assembler-arm.h.

◆ d9

const LowDwVfpRegister v8::internal::d9 = { 9 }

Definition at line 377 of file assembler-arm.h.

◆ dependent_code

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset v8::internal::dependent_code

◆ DependentCode

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset v8::internal::DependentCode

Definition at line 5353 of file objects-inl.h.

◆ do_not_cache

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit v8::internal::do_not_cache

Definition at line 5427 of file objects-inl.h.

Referenced by v8::FunctionTemplateNew().

◆ double_constants

DoubleConstant v8::internal::double_constants
static

Definition at line 114 of file assembler.cc.

◆ eax

◆ ebp

const Register v8::internal::ebp = { kRegister_ebp_Code }

◆ ebx

◆ ecx

◆ edi

◆ edx

◆ esi

◆ esp

◆ exact_powers_of_ten

const double v8::internal::exact_powers_of_ten[]
static
Initial value:
= {
1.0,
10.0,
100.0,
1000.0,
10000.0,
100000.0,
1000000.0,
10000000.0,
100000000.0,
1000000000.0,
10000000000.0,
100000000000.0,
1000000000000.0,
10000000000000.0,
100000000000000.0,
1000000000000000.0,
10000000000000000.0,
100000000000000000.0,
1000000000000000000.0,
10000000000000000000.0,
100000000000000000000.0,
1000000000000000000000.0,
10000000000000000000000.0
}

Definition at line 40 of file strtod.cc.

Referenced by DoubleStrtod().

◆ expected_nof_properties

v8::internal::expected_nof_properties

Definition at line 5503 of file objects-inl.h.

◆ f0

const FPURegister v8::internal::f0 = { 0 }

Definition at line 291 of file assembler-mips.h.

◆ f1

const FPURegister v8::internal::f1 = { 1 }

Definition at line 292 of file assembler-mips.h.

◆ f10

const FPURegister v8::internal::f10 = { 10 }

Definition at line 301 of file assembler-mips.h.

◆ f11

const FPURegister v8::internal::f11 = { 11 }

Definition at line 302 of file assembler-mips.h.

◆ f12

const FPURegister v8::internal::f12 = { 12 }

Definition at line 303 of file assembler-mips.h.

◆ f13

const FPURegister v8::internal::f13 = { 13 }

Definition at line 304 of file assembler-mips.h.

◆ f14

const FPURegister v8::internal::f14 = { 14 }

Definition at line 305 of file assembler-mips.h.

◆ f15

const FPURegister v8::internal::f15 = { 15 }

Definition at line 306 of file assembler-mips.h.

◆ f16

const FPURegister v8::internal::f16 = { 16 }

Definition at line 307 of file assembler-mips.h.

◆ f17

const FPURegister v8::internal::f17 = { 17 }

Definition at line 308 of file assembler-mips.h.

◆ f18

const FPURegister v8::internal::f18 = { 18 }

Definition at line 309 of file assembler-mips.h.

◆ f19

const FPURegister v8::internal::f19 = { 19 }

Definition at line 310 of file assembler-mips.h.

◆ f2

const FPURegister v8::internal::f2 = { 2 }

Definition at line 293 of file assembler-mips.h.

◆ f20

const FPURegister v8::internal::f20 = { 20 }

Definition at line 311 of file assembler-mips.h.

◆ f21

const FPURegister v8::internal::f21 = { 21 }

Definition at line 312 of file assembler-mips.h.

◆ f22

const FPURegister v8::internal::f22 = { 22 }

Definition at line 313 of file assembler-mips.h.

◆ f23

const FPURegister v8::internal::f23 = { 23 }

Definition at line 314 of file assembler-mips.h.

◆ f24

const FPURegister v8::internal::f24 = { 24 }

Definition at line 315 of file assembler-mips.h.

◆ f25

const FPURegister v8::internal::f25 = { 25 }

Definition at line 316 of file assembler-mips.h.

◆ f26

const FPURegister v8::internal::f26 = { 26 }

Definition at line 317 of file assembler-mips.h.

◆ f27

const FPURegister v8::internal::f27 = { 27 }

Definition at line 318 of file assembler-mips.h.

◆ f28

const FPURegister v8::internal::f28 = { 28 }

Definition at line 319 of file assembler-mips.h.

◆ f29

const FPURegister v8::internal::f29 = { 29 }

Definition at line 320 of file assembler-mips.h.

◆ f3

const FPURegister v8::internal::f3 = { 3 }

Definition at line 294 of file assembler-mips.h.

◆ f30

const FPURegister v8::internal::f30 = { 30 }

Definition at line 321 of file assembler-mips.h.

◆ f31

const FPURegister v8::internal::f31 = { 31 }

Definition at line 322 of file assembler-mips.h.

◆ f4

const FPURegister v8::internal::f4 = { 4 }

Definition at line 295 of file assembler-mips.h.

◆ f5

const FPURegister v8::internal::f5 = { 5 }

Definition at line 296 of file assembler-mips.h.

◆ f6

const FPURegister v8::internal::f6 = { 6 }

Definition at line 297 of file assembler-mips.h.

◆ f7

const FPURegister v8::internal::f7 = { 7 }

Definition at line 298 of file assembler-mips.h.

◆ f8

const FPURegister v8::internal::f8 = { 8 }

Definition at line 299 of file assembler-mips.h.

◆ f9

const FPURegister v8::internal::f9 = { 9 }

Definition at line 300 of file assembler-mips.h.

◆ fast_elements_kind_sequence

◆ fatal_exception_depth

int v8::internal::fatal_exception_depth = 0
static

Definition at line 1001 of file isolate.cc.

Referenced by v8::internal::Isolate::DoThrow().

◆ FCSR

const FPUControlRegister v8::internal::FCSR = { kFCSRRegister }

Definition at line 360 of file assembler-mips.h.

◆ feedback_vector

◆ flag

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit v8::internal::flag

Definition at line 5418 of file objects-inl.h.

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::add_flag(), v8::internal::AccessorInfo::all_can_read(), v8::internal::AccessorInfo::all_can_write(), v8::internal::MemoryChunk::ClearFlag(), v8::internal::LoadIC::CompileHandler(), v8::internal::StoreIC::ComputeExtraICState(), v8::internal::KeyedStoreIC::ComputeExtraICState(), v8::internal::IC::ComputeHandler(), v8::internal::NamedLoadHandlerCompiler::ComputeLoadNonexistent(), v8::internal::PropertyICCompiler::ComputeMonomorphic(), v8::internal::Map::ConnectTransition(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::ContainsFlag(), v8::internal::Map::CopyAddDescriptor(), v8::internal::Map::CopyAsElementsKind(), v8::internal::TransitionArray::CopyInsert(), v8::internal::Map::CopyInsertDescriptor(), v8::internal::Map::CopyReplaceDescriptor(), v8::internal::Map::CopyReplaceDescriptors(), v8::internal::Parser::DesugarLetBindingsInForStatement(), v8::internal::Compiler::EnsureCompiled(), v8::internal::StoreBuffer::Filter(), v8::internal::CompilationInfo::GetFlag(), v8::internal::IC::GetHandlerCacheHolder(), v8::internal::IC::GetICCacheHolder(), v8::internal::MacroAssembler::InvokeCode(), v8::internal::JSArrayBuffer::is_external(), v8::internal::MemoryChunk::IsFlagSet(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::MaskFlag(), v8::internal::TransitionArray::NewWith(), v8::base::FINAL< T, S >::operator&(), v8::base::FINAL< T, S >::operator&=(), operator<<(), v8::base::FINAL< T, S >::operator^(), v8::base::FINAL< T, S >::operator^=(), v8::base::FINAL< T, S >::operator|(), v8::base::FINAL< T, S >::operator|=(), v8::internal::AccessorInfo::property_attributes(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::RemoveFlag(), v8::internal::Heap::ResetAllAllocationSitesDependentCode(), RUNTIME_FUNCTION(), v8::internal::AccessorInfo::set_all_can_read(), v8::internal::AccessorInfo::set_all_can_write(), v8::internal::Code::set_has_function_cache(), v8::internal::JSArrayBuffer::set_is_external(), v8::internal::Code::set_marked_for_deoptimization(), v8::internal::AccessorInfo::set_property_attributes(), v8::internal::JSArrayBuffer::set_should_be_freed(), v8::internal::CompilationInfo::SetFlag(), v8::internal::MemoryChunk::SetFlag(), v8::internal::FlagList::SetFlagsFromCommandLine(), v8::internal::MemoryChunk::SetFlagTo(), v8::internal::JSArrayBuffer::should_be_freed(), v8::internal::IncrementalMarking::Start(), v8::internal::IncrementalMarking::StartMarking(), v8::internal::Map::TransitionToAccessorProperty(), v8::internal::Map::TransitionToDataProperty(), v8::internal::IC::TryRemoveInvalidPrototypeDependentStub(), and v8::internal::HOptimizedGraphBuilder::VisitForValue().

◆ FLAG_enable_slow_asserts

◆ fp

const Register v8::internal::fp = { kRegister_fp_Code }

Definition at line 173 of file assembler-arm.h.

Referenced by v8::internal::StandardFrame::caller_fp(), v8::internal::StandardFrame::caller_pc(), v8::internal::ExitFrame::code_slot(), v8::internal::ExitFrame::ComputeCallerState(), v8::internal::StandardFrame::ComputeCallerState(), v8::internal::StandardFrame::ComputeConstantPoolAddress(), v8::internal::StandardFrame::ComputeExpressionsCount(), v8::internal::JavaScriptFrame::ComputeOperandsCount(), v8::internal::StandardFrame::ComputePCAddress(), v8::internal::ExitFrame::ComputeStackPointer(), v8::internal::StandardFrame::context(), v8::internal::LCodeGen::DoDeferredNumberTagD(), v8::internal::LCodeGen::DoDeferredNumberTagIU(), v8::internal::LCodeGen::DoDeferredNumberTagU(), v8::internal::LCodeGen::EmitIsConstructCall(), v8::internal::Deoptimizer::FillInputFrame(), v8::internal::ExitFrame::FillState(), FixTryCatchHandler(), v8::internal::RegExpMacroAssemblerARM::frame_pointer(), v8::internal::RegExpMacroAssemblerARM64::frame_pointer(), v8::internal::RegExpMacroAssemblerMIPS::frame_pointer(), v8::internal::JavaScriptFrame::function_slot_object(), v8::internal::LCodeGen::GenerateDeferredCode(), v8::internal::LCodeGen::GenerateJumpTable(), v8::internal::LCodeGen::GeneratePrologue(), v8::internal::MaterializedObjectStore::Get(), v8::internal::ExitFrame::GetCallerStackPointer(), v8::internal::JavaScriptFrame::GetCallerStackPointer(), v8::internal::StubFrame::GetCallerStackPointer(), v8::internal::ArgumentsAdaptorFrame::GetCallerStackPointer(), v8::internal::InternalFrame::GetCallerStackPointer(), v8::internal::StubFailureTrampolineFrame::GetCallerStackPointer(), v8::internal::EntryFrame::GetCallerState(), v8::internal::StandardFrame::GetExpression(), v8::internal::StandardFrame::GetExpressionAddress(), SnapshotWriter::GetFileDescriptorOrDie(), v8::internal::JavaScriptFrame::GetOperandSlot(), v8::base::OS::GetSharedLibraryAddresses(), v8::internal::ExitFrame::GetStateForFramePointer(), v8::internal::Debug::HandleStepIn(), v8::internal::StandardFrame::IsArgumentsAdaptorFrame(), v8::internal::StandardFrame::IsConstructFrame(), v8::internal::JavaScriptFrame::IsConstructor(), v8::internal::SafeStackFrameIterator::IsValidExitFrame(), v8::internal::StubFailureTrampolineFrame::Iterate(), v8::internal::StandardFrame::IterateCompiledFrame(), v8::internal::StandardFrame::IterateExpressions(), v8::internal::MaterializedObjectStore::Remove(), v8::internal::JavaScriptFrame::RestoreOperandStack(), v8::internal::SafeStackFrameIterator::SafeStackFrameIterator(), v8::internal::MaterializedObjectStore::Set(), v8::internal::EntryFrame::SetCallerFp(), v8::internal::ExitFrame::SetCallerFp(), v8::internal::StandardFrame::SetCallerFp(), v8::internal::FrameDescription::SetFp(), SetUpFrameDropperFrame(), v8::internal::MaterializedObjectStore::StackIdToIndex(), v8::internal::LCodeGen::ToHighMemOperand(), v8::internal::compiler::FINAL< kOperandKind, kNumCachedOperands >::ToMemOperand(), v8::internal::LCodeGen::ToMemOperand(), v8::internal::InternalFrame::unchecked_code(), and v8::internal::BASE_EMBEDDED< Visitor >::UpdateFp().

◆ function_token_position

kExpectedNofPropertiesOffset v8::internal::function_token_position

◆ GB

const int v8::internal::GB = KB * KB * KB

Definition at line 108 of file globals.h.

Referenced by v8::ResourceConstraints::ConfigureDefaults().

◆ has_duplicate_parameters

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext v8::internal::has_duplicate_parameters

◆ hidden_prototype

kFeedbackVectorOffset v8::internal::hidden_prototype

Definition at line 5418 of file objects-inl.h.

◆ IC_utilities

const Address v8::internal::IC_utilities[]
static
Initial value:
= {
#define ADDR(name)
}
#define ADDR(name)
#define IC_UTIL_LIST(ICU)
Definition: ic.h:17

Definition at line 2680 of file ic.cc.

Referenced by v8::internal::IC::AddressFromUtilityId().

◆ ImmPCRel_mask

const int v8::internal::ImmPCRel_mask = ImmPCRelLo_mask | ImmPCRelHi_mask

Definition at line 240 of file constants-arm64.h.

◆ indexed_property_handler

kSerializedDataOffset kPrototypeTemplateOffset v8::internal::indexed_property_handler

Definition at line 5327 of file objects-inl.h.

◆ instance_call_handler

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset v8::internal::instance_call_handler

Definition at line 5333 of file objects-inl.h.

◆ internal_field_count

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset v8::internal::internal_field_count

Definition at line 5340 of file objects-inl.h.

Referenced by v8::ObjectTemplate::InternalFieldCount().

◆ ip

◆ is_toplevel

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit v8::internal::is_toplevel

Definition at line 5431 of file objects-inl.h.

Referenced by SetFunctionInfo().

◆ kAlignmentPaddingPushed

const int v8::internal::kAlignmentPaddingPushed = 2

Definition at line 32 of file frames-ia32.h.

◆ kAlignmentZapValue

const int v8::internal::kAlignmentZapValue = 0x12345678

Definition at line 33 of file frames-ia32.h.

◆ kApiInt64Size

const int v8::internal::kApiInt64Size = sizeof(int64_t)

Definition at line 5734 of file v8.h.

◆ kApiIntSize

const int v8::internal::kApiIntSize = sizeof(int)

Definition at line 5733 of file v8.h.

◆ kApiPointerSize

◆ kASanRedzoneBytes

const int v8::internal::kASanRedzoneBytes = 24
static

Definition at line 24 of file zone-inl.h.

Referenced by v8::internal::Zone::New().

◆ kAsciiMask

const uintptr_t v8::internal::kAsciiMask = kOneInEveryByte << 7
static

Definition at line 921 of file runtime-strings.cc.

Referenced by FastAsciiConvert().

◆ KB

◆ kBArgsSlotsSize

const int v8::internal::kBArgsSlotsSize = 0 * Instruction::kInstrSize

Definition at line 933 of file constants-mips.h.

◆ kBase10MaximalLength

const int v8::internal::kBase10MaximalLength = 17

Definition at line 27 of file dtoa.h.

Referenced by DoubleToCString(), and DoubleToExponentialCString().

◆ kBinary32ExponentBias

const int v8::internal::kBinary32ExponentBias = 127

Definition at line 171 of file globals.h.

◆ kBinary32ExponentMask

const uint32_t v8::internal::kBinary32ExponentMask = 0x7f800000u

Definition at line 169 of file globals.h.

◆ kBinary32ExponentShift

const int v8::internal::kBinary32ExponentShift = 23

Definition at line 175 of file globals.h.

◆ kBinary32MantissaBits

const int v8::internal::kBinary32MantissaBits = 23

Definition at line 174 of file globals.h.

◆ kBinary32MantissaMask

const uint32_t v8::internal::kBinary32MantissaMask = 0x007fffffu

Definition at line 170 of file globals.h.

◆ kBinary32MaxExponent

const int v8::internal::kBinary32MaxExponent = 0xFE

Definition at line 172 of file globals.h.

◆ kBinary32MinExponent

const int v8::internal::kBinary32MinExponent = 0x01

Definition at line 173 of file globals.h.

◆ kBinary32SignMask

const uint32_t v8::internal::kBinary32SignMask = 0x80000000u

Definition at line 168 of file globals.h.

◆ kBitfieldNOffset

const int v8::internal::kBitfieldNOffset = 22

Definition at line 573 of file constants-arm64.h.

◆ kBitsPerByte

◆ kBitsPerByteLog2

const int v8::internal::kBitsPerByteLog2 = 3

Definition at line 163 of file globals.h.

Referenced by v8::internal::StandardFrame::IterateCompiledFrame(), and RawMatch().

◆ kBitsPerInt

const int v8::internal::kBitsPerInt = kIntSize * kBitsPerByte

Definition at line 165 of file globals.h.

Referenced by BUILTIN(), and v8::internal::CpuFeatures::Probe().

◆ kBitsPerPointer

const int v8::internal::kBitsPerPointer = kPointerSize * kBitsPerByte

Definition at line 164 of file globals.h.

◆ kBranchReturnOffset

const int v8::internal::kBranchReturnOffset = 2 * Instruction::kInstrSize

Definition at line 935 of file constants-mips.h.

◆ kByteMask

const int64_t v8::internal::kByteMask = 0xffL

Definition at line 78 of file constants-arm64.h.

◆ kByteSize

const unsigned v8::internal::kByteSize = 8

Definition at line 96 of file constants-arm64.h.

◆ kByteSizeInBytes

const unsigned v8::internal::kByteSizeInBytes = kByteSize >> 3

Definition at line 97 of file constants-arm64.h.

◆ kCachedPowers

◆ kCachedPowersOffset

const int v8::internal::kCachedPowersOffset = 348
static

◆ kCalleeSaved

const RegList v8::internal::kCalleeSaved
Initial value:
=
1 << 4 |
1 << 5 |
1 << 6 |
1 << 7 |
1 << 8 |
kR9Available << 9 |
1 << 10 |
1 << 11
const int kR9Available
Definition: frames-arm.h:15

Definition at line 38 of file frames-arm.h.

◆ kCalleeSavedFPU

const RegList v8::internal::kCalleeSavedFPU
Initial value:
=
1 << 20 |
1 << 22 |
1 << 24 |
1 << 26 |
1 << 28 |
1 << 30

Definition at line 56 of file frames-mips.h.

◆ kCallerSaved

const RegList v8::internal::kCallerSaved

◆ kCallerSavedFPU

const RegList v8::internal::kCallerSavedFPU
Initial value:
=
1 << 0 |
1 << 2 |
1 << 4 |
1 << 6 |
1 << 8 |
1 << 10 |
1 << 12 |
1 << 14 |
1 << 16 |
1 << 18

Definition at line 66 of file frames-mips.h.

Referenced by v8::internal::RecordWriteStub::RegisterAllocation::RestoreCallerSaveRegisters(), and v8::internal::RecordWriteStub::RegisterAllocation::SaveCallerSaveRegisters().

◆ kCallOpcode [1/3]

const byte v8::internal::kCallOpcode = 0xE8
static

Definition at line 51 of file assembler-ia32-inl.h.

◆ kCallOpcode [2/3]

const byte v8::internal::kCallOpcode = 0xE8
static

Definition at line 24 of file assembler-x64-inl.h.

◆ kCallOpcode [3/3]

const byte v8::internal::kCallOpcode = 0xE8
static

Definition at line 51 of file assembler-x87-inl.h.

◆ kCArgSlotCount

const int v8::internal::kCArgSlotCount = 4

Definition at line 928 of file constants-mips.h.

Referenced by CFunctionArgumentOperand().

◆ kCArgsSlotsSize

const int v8::internal::kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize

Definition at line 929 of file constants-mips.h.

Referenced by CFunctionArgumentOperand().

◆ kCharSize

◆ kChunkBits

const int v8::internal::kChunkBits = 7

◆ kChunkMask

const int v8::internal::kChunkMask = (1 << kChunkBits) - 1

Definition at line 313 of file assembler.cc.

◆ kCodeAgeJumpInstruction

const int v8::internal::kCodeAgeJumpInstruction = 0xe51ff004

Definition at line 31 of file constants-arm.h.

◆ kCodeAgeStubEntryOffset

const int v8::internal::kCodeAgeStubEntryOffset = 3 * kInstructionSize
static

Definition at line 779 of file assembler-arm64-inl.h.

◆ kCodeAlignment

const intptr_t v8::internal::kCodeAlignment = 1 << kCodeAlignmentBits

◆ kCodeAlignmentBits

const int v8::internal::kCodeAlignmentBits = 5

Definition at line 239 of file globals.h.

◆ kCodeAlignmentMask

const intptr_t v8::internal::kCodeAlignmentMask = kCodeAlignment - 1

Definition at line 241 of file globals.h.

◆ kCodeTargetTag

const int v8::internal::kCodeTargetTag = 1

Definition at line 301 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kCodeWithIdTag

const int v8::internal::kCodeWithIdTag = 0

Definition at line 321 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kCodeZapValue

const int v8::internal::kCodeZapValue = 0xbadc0de

Definition at line 278 of file globals.h.

Referenced by v8::internal::FreeList::Allocate().

◆ kCommentTag

const int v8::internal::kCommentTag = 3

Definition at line 324 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kConstantPoolLengthMaxMask

const int v8::internal::kConstantPoolLengthMaxMask = 0xffff

Definition at line 20 of file constants-arm.h.

Referenced by EncodeConstantPoolLength().

◆ kConstantPoolMarker

const int v8::internal::kConstantPoolMarker = 0xe7f000f0

Definition at line 19 of file constants-arm.h.

Referenced by DecodeConstantPoolLength().

◆ kConstantPoolMarkerMask

const int v8::internal::kConstantPoolMarkerMask = 0xfff000f0

Definition at line 18 of file constants-arm.h.

Referenced by DecodeConstantPoolLength().

◆ kConstPoolTag

const int v8::internal::kConstPoolTag = 0

Definition at line 327 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kCounterList

const CounterDescriptor v8::internal::kCounterList[]
static
Initial value:
= {
{"Instruction", Cumulative},
{"Move Immediate", Gauge},
{"Add/Sub DP", Gauge},
{"Logical DP", Gauge},
{"Other Int DP", Gauge},
{"FP DP", Gauge},
{"Conditional Select", Gauge},
{"Conditional Compare", Gauge},
{"Unconditional Branch", Gauge},
{"Compare and Branch", Gauge},
{"Test and Branch", Gauge},
{"Conditional Branch", Gauge},
{"Load Integer", Gauge},
{"Load FP", Gauge},
{"Load Pair", Gauge},
{"Load Literal", Gauge},
{"Store Integer", Gauge},
{"Store FP", Gauge},
{"Store Pair", Gauge},
{"PC Addressing", Gauge},
{"Other", Gauge},
{"SP Adjust", Gauge},
}

Definition at line 65 of file instrument-arm64.cc.

Referenced by v8::internal::Instrument::Instrument().

◆ kCounterNameMaxLength

const int v8::internal::kCounterNameMaxLength = 256

Definition at line 17 of file instrument-arm64.h.

Referenced by v8::internal::Counter::Counter().

◆ kD_1_LOG2_10

const double v8::internal::kD_1_LOG2_10 = 0.30102999566398114
static

◆ kDataJumpExtraTag

const int v8::internal::kDataJumpExtraTag = kPCJumpExtraTag - 1

Definition at line 319 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kDays1970to2000

const int v8::internal::kDays1970to2000 = 30 * 365 + 7
static

Definition at line 19 of file date.cc.

◆ kDaysIn100Years

const int v8::internal::kDaysIn100Years = 25 * kDaysIn4Years - 1
static

Definition at line 17 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kDaysIn400Years

const int v8::internal::kDaysIn400Years = 4 * kDaysIn100Years + 1
static

Definition at line 18 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kDaysIn4Years

const int v8::internal::kDaysIn4Years = 4 * 365 + 1
static

Definition at line 16 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kDaysInMonths

const char v8::internal::kDaysInMonths[]
static
Initial value:
=
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}

Definition at line 23 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kDaysOffset

const int v8::internal::kDaysOffset
static
Initial value:
static const int kDays1970to2000
Definition: date.cc:19
static const int kDaysIn400Years
Definition: date.cc:18

Definition at line 20 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kDebugCodeOffset

const unsigned v8::internal::kDebugCodeOffset = 1 * kInstructionSize

Definition at line 461 of file instructions-arm64.h.

◆ kDebuggerTracingDirectivesMask

const unsigned v8::internal::kDebuggerTracingDirectivesMask = 3 << 6

Definition at line 486 of file instructions-arm64.h.

◆ kDebugMessageOffset

const unsigned v8::internal::kDebugMessageOffset = 3 * kInstructionSize

Definition at line 463 of file instructions-arm64.h.

◆ kDebugParamsOffset

const unsigned v8::internal::kDebugParamsOffset = 2 * kInstructionSize

Definition at line 462 of file instructions-arm64.h.

◆ kDebugZapValue

const uint32_t v8::internal::kDebugZapValue = 0xbadbaddb

Definition at line 274 of file globals.h.

◆ kDefaultInstrumentationSamplingPeriod

const uint64_t v8::internal::kDefaultInstrumentationSamplingPeriod = 1 << 22

Definition at line 18 of file instrument-arm64.h.

◆ kDefaultKeyedHeaderOffsetSentinel

const int v8::internal::kDefaultKeyedHeaderOffsetSentinel = -1
static

◆ kDefaultStopCode

const int32_t v8::internal::kDefaultStopCode = -1

Definition at line 343 of file constants-arm.h.

◆ kDefaultTag

const int v8::internal::kDefaultTag = 3

Definition at line 303 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kDeoptTableMaxEpilogueCodeSize

const int v8::internal::kDeoptTableMaxEpilogueCodeSize = 2 * KB
static

Definition at line 98 of file deoptimizer.cc.

Referenced by v8::internal::Deoptimizer::GetMaxDeoptTableSize().

◆ kDeoptTableSerializeEntryCount

const int v8::internal::kDeoptTableSerializeEntryCount = 64

◆ kDescriptorIndexBitCount

const int v8::internal::kDescriptorIndexBitCount = 10
static

Definition at line 173 of file property-details.h.

◆ kDigitRangeCount

const int v8::internal::kDigitRangeCount = arraysize(kDigitRanges)
static

◆ kDigitRanges

const int v8::internal::kDigitRanges[] = { '0', '9' + 1, 0x10000 }
static

◆ kDoubleAlignment

◆ kDoubleAlignmentMask

const intptr_t v8::internal::kDoubleAlignmentMask = kDoubleAlignment - 1

Definition at line 235 of file globals.h.

Referenced by EnsureDoubleAligned().

◆ kDoubleExponentBias

const unsigned v8::internal::kDoubleExponentBias = 1023

Definition at line 113 of file constants-arm64.h.

◆ kDoubleExponentBits

const unsigned v8::internal::kDoubleExponentBits = 11

Definition at line 112 of file constants-arm64.h.

◆ kDoubleMantissaBits

const unsigned v8::internal::kDoubleMantissaBits = 52

Definition at line 111 of file constants-arm64.h.

◆ kDoubleSignificandSize

const int v8::internal::kDoubleSignificandSize = 53
static

Definition at line 99 of file fixed-dtoa.cc.

Referenced by FastFixedDtoa().

◆ kDoubleSize

◆ kDoubleSizeLog2

const int v8::internal::kDoubleSizeLog2 = 3

Definition at line 138 of file globals.h.

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::INLINE().

◆ kDoubleToCStringMinBufferSize

const int v8::internal::kDoubleToCStringMinBufferSize = 100

Definition at line 135 of file conversions.h.

◆ kDoubleWordSize

const unsigned v8::internal::kDoubleWordSize = 64

Definition at line 106 of file constants-arm64.h.

◆ kDoubleWordSizeInBytes

const unsigned v8::internal::kDoubleWordSizeInBytes = kDoubleWordSize >> 3

Definition at line 107 of file constants-arm64.h.

◆ kDQuietNanBit

const int64_t v8::internal::kDQuietNanBit = 51

Definition at line 74 of file constants-arm64.h.

◆ kDQuietNanMask

const int64_t v8::internal::kDQuietNanMask = 0x1L << kDQuietNanBit

Definition at line 75 of file constants-arm64.h.

Referenced by IsSignallingNaN(), and ToQuietNaN().

◆ kDRegMask

const int64_t v8::internal::kDRegMask = 0xffffffffffffffffL

Definition at line 63 of file constants-arm64.h.

◆ kDRegSize

const unsigned v8::internal::kDRegSize = kDRegSizeInBits >> 3

Definition at line 58 of file constants-arm64.h.

◆ kDRegSizeInBits

◆ kDRegSizeInBitsLog2

const unsigned v8::internal::kDRegSizeInBitsLog2 = 6

Definition at line 57 of file constants-arm64.h.

◆ kDRegSizeLog2

const unsigned v8::internal::kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3

Definition at line 59 of file constants-arm64.h.

◆ kDSignBit

const int64_t v8::internal::kDSignBit = 63

Definition at line 66 of file constants-arm64.h.

◆ kDSignMask

const int64_t v8::internal::kDSignMask = 0x1L << kDSignBit

Definition at line 67 of file constants-arm64.h.

◆ kElementsKindCount

◆ kEmbeddedObjectTag

const int v8::internal::kEmbeddedObjectTag = 0

Definition at line 300 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kEvalContextualGenerations

const int v8::internal::kEvalContextualGenerations = 2
static

Definition at line 20 of file compilation-cache.cc.

◆ kEvalGlobalGenerations

const int v8::internal::kEvalGlobalGenerations = 2
static

Definition at line 19 of file compilation-cache.cc.

◆ kExactPowersOfTenSize

const int v8::internal::kExactPowersOfTenSize = arraysize(exact_powers_of_ten)
static

Definition at line 66 of file strtod.cc.

Referenced by DoubleStrtod().

◆ kExternalArrayTypeCount

const int v8::internal::kExternalArrayTypeCount
Initial value:

Definition at line 791 of file objects.h.

◆ kExtraTagBits

const int v8::internal::kExtraTagBits = 4

◆ kFastDtoaMaximalLength

const int v8::internal::kFastDtoaMaximalLength = 17

Definition at line 23 of file fast-dtoa.h.

◆ kFastElementsKindCount

◆ kFastElementsKindPackedToHoley

const int v8::internal::kFastElementsKindPackedToHoley

◆ kFBccBits

const int v8::internal::kFBccBits = 3

Definition at line 289 of file constants-mips.h.

Referenced by v8::internal::Instruction::FBccValue().

◆ kFBccShift

const int v8::internal::kFBccShift = 18

Definition at line 288 of file constants-mips.h.

Referenced by v8::internal::Instruction::FBccValue().

◆ kFBtrueBits

const int v8::internal::kFBtrueBits = 1

Definition at line 291 of file constants-mips.h.

Referenced by v8::internal::Instruction::FBtrueValue().

◆ kFBtrueShift

const int v8::internal::kFBtrueShift = 16

Definition at line 290 of file constants-mips.h.

Referenced by v8::internal::Instruction::FBtrueValue().

◆ kFCccBits

const int v8::internal::kFCccBits = 3

Definition at line 287 of file constants-mips.h.

Referenced by v8::internal::Instruction::FCccValue().

◆ kFCccShift

const int v8::internal::kFCccShift = 8

Definition at line 286 of file constants-mips.h.

Referenced by v8::internal::Instruction::FCccValue().

◆ kFCSRDivideByZeroFlagBit

const uint32_t v8::internal::kFCSRDivideByZeroFlagBit = 5

Definition at line 153 of file constants-mips.h.

◆ kFCSRDivideByZeroFlagMask

const uint32_t v8::internal::kFCSRDivideByZeroFlagMask = 1 << kFCSRDivideByZeroFlagBit

Definition at line 159 of file constants-mips.h.

◆ kFCSRExceptionFlagMask

const uint32_t v8::internal::kFCSRExceptionFlagMask = kFCSRFlagMask ^ kFCSRInexactFlagMask

Definition at line 169 of file constants-mips.h.

◆ kFCSRFlagMask

const uint32_t v8::internal::kFCSRFlagMask
Initial value:
=
const uint32_t kFCSRUnderflowFlagMask
const uint32_t kFCSRInvalidOpFlagMask
const uint32_t kFCSROverflowFlagMask
const uint32_t kFCSRInexactFlagMask
const uint32_t kFCSRDivideByZeroFlagMask

Definition at line 162 of file constants-mips.h.

◆ kFCSRInexactFlagBit

const uint32_t v8::internal::kFCSRInexactFlagBit = 2

Definition at line 150 of file constants-mips.h.

◆ kFCSRInexactFlagMask

const uint32_t v8::internal::kFCSRInexactFlagMask = 1 << kFCSRInexactFlagBit

Definition at line 156 of file constants-mips.h.

◆ kFCSRInvalidOpFlagBit

const uint32_t v8::internal::kFCSRInvalidOpFlagBit = 6

Definition at line 154 of file constants-mips.h.

◆ kFCSRInvalidOpFlagMask

const uint32_t v8::internal::kFCSRInvalidOpFlagMask = 1 << kFCSRInvalidOpFlagBit

Definition at line 160 of file constants-mips.h.

◆ kFCSROverflowFlagBit

const uint32_t v8::internal::kFCSROverflowFlagBit = 4

Definition at line 152 of file constants-mips.h.

◆ kFCSROverflowFlagMask

const uint32_t v8::internal::kFCSROverflowFlagMask = 1 << kFCSROverflowFlagBit

Definition at line 158 of file constants-mips.h.

◆ kFCSRRegister

const int v8::internal::kFCSRRegister = 31

Definition at line 143 of file constants-mips.h.

Referenced by v8::internal::FPUControlRegister::is_valid().

◆ kFCSRUnderflowFlagBit

const uint32_t v8::internal::kFCSRUnderflowFlagBit = 3

Definition at line 151 of file constants-mips.h.

◆ kFCSRUnderflowFlagMask

const uint32_t v8::internal::kFCSRUnderflowFlagMask = 1 << kFCSRUnderflowFlagBit

Definition at line 157 of file constants-mips.h.

◆ kFdBits

const int v8::internal::kFdBits = 5

Definition at line 285 of file constants-mips.h.

Referenced by v8::internal::Instruction::FdValue().

◆ kFdShift

const int v8::internal::kFdShift = 6

Definition at line 284 of file constants-mips.h.

Referenced by v8::internal::Instruction::FdValue().

◆ kFirstCalleeSavedFPRegisterIndex

const int v8::internal::kFirstCalleeSavedFPRegisterIndex = 8

Definition at line 40 of file constants-arm64.h.

◆ kFirstCalleeSavedRegisterIndex

const int v8::internal::kFirstCalleeSavedRegisterIndex = 19

Definition at line 37 of file constants-arm64.h.

◆ kFirstTypeCode

◆ kFloatExponentBits

const unsigned v8::internal::kFloatExponentBits = 8

Definition at line 115 of file constants-arm64.h.

◆ kFloatMantissaBits

const unsigned v8::internal::kFloatMantissaBits = 23

Definition at line 114 of file constants-arm64.h.

◆ kFPOnStackSize

◆ kFPU64InvalidResult

const uint64_t v8::internal::kFPU64InvalidResult
Initial value:
=
static_cast<uint64_t>(static_cast<uint64_t>(1) << 63) - 1

Definition at line 146 of file constants-mips.h.

◆ kFPUInvalidResult

const uint32_t v8::internal::kFPUInvalidResult = static_cast<uint32_t>(1 << 31) - 1

Definition at line 145 of file constants-mips.h.

◆ kFPURoundingModeMask

const uint32_t v8::internal::kFPURoundingModeMask = 3 << 0

Definition at line 676 of file constants-mips.h.

◆ kFrameDetailsArgumentCountIndex

const int v8::internal::kFrameDetailsArgumentCountIndex = 3
static

Definition at line 5781 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsAtReturnIndex

const int v8::internal::kFrameDetailsAtReturnIndex = 7
static

Definition at line 5785 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsConstructCallIndex

const int v8::internal::kFrameDetailsConstructCallIndex = 6
static

Definition at line 5784 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsFirstDynamicIndex

const int v8::internal::kFrameDetailsFirstDynamicIndex = 9
static

Definition at line 5787 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsFlagsIndex

const int v8::internal::kFrameDetailsFlagsIndex = 8
static

Definition at line 5786 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsFrameIdIndex

const int v8::internal::kFrameDetailsFrameIdIndex = 0
static

Definition at line 5778 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsFunctionIndex

const int v8::internal::kFrameDetailsFunctionIndex = 2
static

Definition at line 5780 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsLocalCountIndex

const int v8::internal::kFrameDetailsLocalCountIndex = 4
static

Definition at line 5782 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsReceiverIndex

const int v8::internal::kFrameDetailsReceiverIndex = 1
static

Definition at line 5779 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFrameDetailsSourcePositionIndex

const int v8::internal::kFrameDetailsSourcePositionIndex = 5
static

Definition at line 5783 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kFramePointerRegCode

const unsigned v8::internal::kFramePointerRegCode = 29

Definition at line 87 of file constants-arm64.h.

◆ kFrBits

const int v8::internal::kFrBits = 5

Definition at line 278 of file constants-mips.h.

Referenced by v8::internal::Instruction::FrValue().

◆ kFreeListZapValue

const uint32_t v8::internal::kFreeListZapValue = 0xfeed1eaf

Definition at line 275 of file globals.h.

◆ kFromSpaceZapValue

const Address v8::internal::kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdaf)

Definition at line 272 of file globals.h.

Referenced by v8::internal::Heap::ZapFromSpace().

◆ kFrShift

const int v8::internal::kFrShift = 21

Definition at line 279 of file constants-mips.h.

Referenced by v8::internal::Instruction::FrValue().

◆ kFsBits

const int v8::internal::kFsBits = 5

Definition at line 281 of file constants-mips.h.

Referenced by v8::internal::Instruction::FsValue().

◆ kFsShift

const int v8::internal::kFsShift = 11

Definition at line 280 of file constants-mips.h.

Referenced by v8::internal::Instruction::FsValue().

◆ kFtBits

const int v8::internal::kFtBits = 5

Definition at line 283 of file constants-mips.h.

Referenced by v8::internal::Instruction::FtValue().

◆ kFtShift

const int v8::internal::kFtShift = 16

Definition at line 282 of file constants-mips.h.

Referenced by v8::internal::Instruction::FtValue().

◆ kFunctionBits

const int v8::internal::kFunctionBits = 6

Definition at line 260 of file constants-mips.h.

Referenced by v8::internal::Instruction::FunctionValue().

◆ kFunctionFieldMask

const int v8::internal::kFunctionFieldMask = ((1 << kFunctionBits) - 1) << kFunctionShift

Definition at line 303 of file constants-mips.h.

Referenced by v8::internal::Instruction::FunctionFieldRaw().

◆ kFunctionShift

const int v8::internal::kFunctionShift = 0

Definition at line 259 of file constants-mips.h.

Referenced by v8::internal::Instruction::FunctionValue().

◆ kGlobalHandleZapValue

const Address v8::internal::kGlobalHandleZapValue = reinterpret_cast<Address>(0xbaffedf)

Definition at line 271 of file globals.h.

Referenced by v8::internal::GlobalHandles::Node::Release().

◆ kGrowICDelta

const int v8::internal::kGrowICDelta
static
Initial value:

Definition at line 185 of file objects.h.

Referenced by GetGrowStoreMode().

◆ kHalfWordMask

const int64_t v8::internal::kHalfWordMask = 0xffffL

Definition at line 79 of file constants-arm64.h.

◆ kHalfWordSize

const unsigned v8::internal::kHalfWordSize = 16

Definition at line 98 of file constants-arm64.h.

◆ kHalfWordSizeInBytes

const unsigned v8::internal::kHalfWordSizeInBytes = kHalfWordSize >> 3

Definition at line 100 of file constants-arm64.h.

◆ kHalfWordSizeInBytesLog2

const unsigned v8::internal::kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3

Definition at line 101 of file constants-arm64.h.

◆ kHalfWordSizeLog2

const unsigned v8::internal::kHalfWordSizeLog2 = 4

Definition at line 99 of file constants-arm64.h.

◆ kHandleBlockSize

◆ kHandleZapValue

const Address v8::internal::kHandleZapValue = reinterpret_cast<Address>(0xbaddeaf)

Definition at line 270 of file globals.h.

Referenced by v8::internal::CustomArguments< T >::~CustomArguments().

◆ kHeapObjectTag

◆ kHeapObjectTagMask

const intptr_t v8::internal::kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1

◆ kHeapObjectTagSize

const int v8::internal::kHeapObjectTagSize = 2

Definition at line 5738 of file v8.h.

◆ kHi16MaskOf64

const int64_t v8::internal::kHi16MaskOf64 = (int64_t)0xffff << 48

Definition at line 271 of file constants-mips64.h.

◆ kHiMask

const int v8::internal::kHiMask = 0xffff << 16

Definition at line 305 of file constants-mips.h.

◆ kHltBadCode

const int v8::internal::kHltBadCode = 0xbad

Definition at line 689 of file constants-arm64.h.

◆ kHoleNanInt64

const uint64_t v8::internal::kHoleNanInt64

◆ kHoleNanLower32

const uint32_t v8::internal::kHoleNanLower32 = 0xFFFFFFFF

Definition at line 657 of file globals.h.

Referenced by v8::internal::LCodeGen::DoLoadKeyedFixedDoubleArray().

◆ kHoleNanUpper32

const uint32_t v8::internal::kHoleNanUpper32 = 0x7FFFFFFF

◆ kImm16Bits

const int v8::internal::kImm16Bits = 16

Definition at line 264 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm16Value().

◆ kImm16Shift

const int v8::internal::kImm16Shift = 0

Definition at line 263 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm16Value().

◆ kImm21Bits

const int v8::internal::kImm21Bits = 21

Definition at line 266 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm21Value().

◆ kImm21Shift

const int v8::internal::kImm21Shift = 0

Definition at line 265 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm21Value().

◆ kImm26Bits

const int v8::internal::kImm26Bits = 26

Definition at line 268 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm26Value().

◆ kImm26Mask

const int v8::internal::kImm26Mask = ((1 << kImm26Bits) - 1) << kImm26Shift

Definition at line 297 of file constants-mips.h.

◆ kImm26Shift

const int v8::internal::kImm26Shift = 0

Definition at line 267 of file constants-mips.h.

Referenced by v8::internal::Instruction::Imm26Value().

◆ kImm28Bits

const int v8::internal::kImm28Bits = 28

Definition at line 270 of file constants-mips.h.

◆ kImm28Mask

const int v8::internal::kImm28Mask = ((1 << kImm28Bits) - 1) << kImm28Shift

Definition at line 298 of file constants-mips.h.

◆ kImm28Shift

const int v8::internal::kImm28Shift = 0

Definition at line 269 of file constants-mips.h.

◆ kImm32Bits

const int v8::internal::kImm32Bits = 32

Definition at line 272 of file constants-mips.h.

◆ kImm32Shift

const int v8::internal::kImm32Shift = 0

Definition at line 271 of file constants-mips.h.

◆ kImmExceptionIsDebug

const Instr v8::internal::kImmExceptionIsDebug = 0xdeb0

Definition at line 453 of file instructions-arm64.h.

◆ kImmExceptionIsPrintf

const Instr v8::internal::kImmExceptionIsPrintf = 0xdeb1

Definition at line 418 of file instructions-arm64.h.

◆ kImmExceptionIsRedirectedCall

const Instr v8::internal::kImmExceptionIsRedirectedCall = 0xca11

Definition at line 410 of file instructions-arm64.h.

◆ kImmExceptionIsUnreachable

const Instr v8::internal::kImmExceptionIsUnreachable = 0xdebf

Definition at line 414 of file instructions-arm64.h.

◆ kImmFieldShift

const int v8::internal::kImmFieldShift = 2

Definition at line 276 of file constants-mips.h.

◆ kInitialCacheSize

const int v8::internal::kInitialCacheSize = 64
static

Definition at line 24 of file compilation-cache.cc.

Referenced by v8::internal::CompilationSubCache::GetTable().

◆ kInstructionSize

◆ kInstructionSizeLog2

const unsigned v8::internal::kInstructionSizeLog2 = 2

◆ kInt32Size

◆ kInt64Size

◆ kInternalizedTag

const uint32_t v8::internal::kInternalizedTag = 0x0

Definition at line 551 of file objects.h.

◆ kIntptrSignBit

const intptr_t v8::internal::kIntptrSignBit = 0x80000000

Definition at line 148 of file globals.h.

◆ kIntptrSize

const int v8::internal::kIntptrSize = sizeof(intptr_t)

◆ kIntrinsicFunctions

const Runtime::Function v8::internal::kIntrinsicFunctions[]
static
Initial value:
= {
#define F(name, number_of_args, result_size)
Definition: runtime.cc:9240
#define IO(name, number_of_args, result_size)
Definition: runtime.cc:9256
#define I(name, number_of_args, result_size)
Definition: runtime.cc:9248
#define INLINE_OPTIMIZED_FUNCTION_LIST(F)
Definition: runtime.h:708
#define RUNTIME_FUNCTION_LIST(F)
Definition: runtime.h:651
#define INLINE_FUNCTION_LIST(F)
Definition: runtime.h:659

Definition at line 9264 of file runtime.cc.

Referenced by v8::internal::Runtime::FunctionForEntry(), v8::internal::Runtime::FunctionForId(), v8::internal::Runtime::FunctionForName(), and v8::internal::Runtime::InitializeIntrinsicFunctionNames().

◆ kIntSize

◆ kInvalidEnumCacheSentinel

◆ kInvalidFPUControlRegister

const int v8::internal::kInvalidFPUControlRegister = -1

Definition at line 144 of file constants-mips.h.

◆ kInvalidFPURegister

const int v8::internal::kInvalidFPURegister = -1

Definition at line 140 of file constants-mips.h.

◆ kInvalidRegister

const int v8::internal::kInvalidRegister = -1

Definition at line 130 of file constants-mips.h.

◆ kIsIndirectStringMask

◆ kIsIndirectStringTag

◆ kIsNotInternalizedMask

const uint32_t v8::internal::kIsNotInternalizedMask = 0x40

◆ kIsNotStringMask

const uint32_t v8::internal::kIsNotStringMask = 0x80

◆ kJSArgsSlotsSize

const int v8::internal::kJSArgsSlotsSize = 0 * Instruction::kInstrSize

Definition at line 931 of file constants-mips.h.

◆ kJSCalleeSavedRegList

const unsigned v8::internal::kJSCalleeSavedRegList = 0x03f80000

Definition at line 42 of file constants-arm64.h.

◆ kJSCallerSaved

const RegList v8::internal::kJSCallerSaved

◆ kJSSPCode

const unsigned v8::internal::kJSSPCode = 28

Definition at line 90 of file constants-arm64.h.

◆ kJumpAddrMask

const int v8::internal::kJumpAddrMask = (1 << (kImm26Bits + kImmFieldShift)) - 1

Definition at line 308 of file constants-mips.h.

◆ kLastChunkTag

const int v8::internal::kLastChunkTag = 1

Definition at line 316 of file assembler.cc.

◆ kLastChunkTagBits

const int v8::internal::kLastChunkTagBits = 1

◆ kLastChunkTagMask

const int v8::internal::kLastChunkTagMask = 1

◆ kLastNonNaNInt64

const uint64_t v8::internal::kLastNonNaNInt64
Initial value:
=
(static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32)
const uint32_t kNaNOrInfinityLowerBoundUpper32
Definition: globals.h:658

Definition at line 662 of file globals.h.

◆ kLineTerminatorRangeCount

const int v8::internal::kLineTerminatorRangeCount = arraysize(kLineTerminatorRanges)
static

Definition at line 3592 of file jsregexp.cc.

Referenced by v8::internal::CharacterRange::AddClassEscape().

◆ kLineTerminatorRanges

const int v8::internal::kLineTerminatorRanges[]
static
Initial value:
= { 0x000A, 0x000B, 0x000D, 0x000E,
0x2028, 0x202A, 0x10000 }

Definition at line 3590 of file jsregexp.cc.

Referenced by v8::internal::CharacterRange::AddClassEscape().

◆ kLinkRegCode

const unsigned v8::internal::kLinkRegCode = 30

Definition at line 88 of file constants-arm64.h.

◆ kLoadLiteralScaleLog2

const unsigned v8::internal::kLoadLiteralScaleLog2 = 2

Definition at line 30 of file constants-arm64.h.

Referenced by v8::internal::Instruction::LiteralAddress().

◆ kLocatableTag

const int v8::internal::kLocatableTag = 2

Definition at line 302 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kLocatableTypeTagBits

◆ kLogEventsNames

◆ kLoMask

const int v8::internal::kLoMask = 0xffff

Definition at line 306 of file constants-mips.h.

◆ kLuiShift

const int v8::internal::kLuiShift = 16

Definition at line 261 of file constants-mips.h.

◆ kLwRegFpNegOffsetPattern

const Instr v8::internal::kLwRegFpNegOffsetPattern
extern

Definition at line 730 of file constants-mips64.h.

◆ kLwRegFpOffsetPattern

const Instr v8::internal::kLwRegFpOffsetPattern
extern

Definition at line 728 of file constants-mips64.h.

◆ kLwSwInstrArgumentMask

const Instr v8::internal::kLwSwInstrArgumentMask
extern

Definition at line 735 of file constants-mips64.h.

◆ kLwSwInstrTypeMask

const Instr v8::internal::kLwSwInstrTypeMask
extern

Definition at line 734 of file constants-mips64.h.

◆ kLwSwOffsetMask

const Instr v8::internal::kLwSwOffsetMask
extern

Definition at line 736 of file constants-mips64.h.

◆ kMaxDecimalPower

const int v8::internal::kMaxDecimalPower = 309
static

Definition at line 33 of file strtod.cc.

Referenced by BignumStrtod(), and Strtod().

◆ kMaxExactDoubleIntegerDecimalDigits

const int v8::internal::kMaxExactDoubleIntegerDecimalDigits = 15
static

Definition at line 23 of file strtod.cc.

Referenced by DoubleStrtod().

◆ kMaximalCodeRangeSize

const size_t v8::internal::kMaximalCodeRangeSize = 0 * MB

◆ kMaximalTargetExponent

const int v8::internal::kMaximalTargetExponent = -32
static

Definition at line 25 of file fast-dtoa.cc.

Referenced by DigitGen(), DigitGenCounted(), Grisu3(), and Grisu3Counted().

◆ kMaxInt

◆ kMaxInt16

const int v8::internal::kMaxInt16 = (1 << 15) - 1

Definition at line 115 of file globals.h.

◆ kMaxInt8

const int v8::internal::kMaxInt8 = (1 << 7) - 1

Definition at line 111 of file globals.h.

◆ kMaxKeyedPolymorphism

const int v8::internal::kMaxKeyedPolymorphism = 4

◆ kMaxLoadLiteralRange

const unsigned v8::internal::kMaxLoadLiteralRange = 1 * MB

Definition at line 31 of file constants-arm64.h.

◆ kMaxLookaheadForBoyerMoore

const int v8::internal::kMaxLookaheadForBoyerMoore = 8

◆ kMaxNumberOfDescriptors

const int v8::internal::kMaxNumberOfDescriptors
static

◆ kMaxSignificantDecimalDigits

const int v8::internal::kMaxSignificantDecimalDigits = 780
static

Definition at line 71 of file strtod.cc.

Referenced by BignumStrtod(), Strtod(), and TrimToMaxSignificantDigits().

◆ kMaxSignificantDigits

const int v8::internal::kMaxSignificantDigits = 772

Definition at line 27 of file conversions.h.

Referenced by InternalStringToDouble(), and InternalStringToInt().

◆ kMaxSizeEarlyOpt

const int v8::internal::kMaxSizeEarlyOpt
static
Initial value:
=
5 * FullCodeGenerator::kCodeSizeMultiplier

Definition at line 50 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kMaxStopCode

const uint32_t v8::internal::kMaxStopCode = kStopCode - 1

Definition at line 342 of file constants-arm.h.

◆ kMaxTrackedFields

const int v8::internal::kMaxTrackedFields = 16
static

◆ kMaxTrackedObjects

const int v8::internal::kMaxTrackedObjects = 5
static

◆ kMaxUInt16

const int v8::internal::kMaxUInt16 = (1 << 16) - 1

Definition at line 117 of file globals.h.

Referenced by v8::internal::compiler::ContextAccess::ContextAccess().

◆ kMaxUInt32

◆ kMaxUint64

const uint64_t v8::internal::kMaxUint64 = V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF)
static

Definition at line 37 of file strtod.cc.

Referenced by ReadUint64().

◆ kMaxUint64DecimalDigits

const int v8::internal::kMaxUint64DecimalDigits = 19
static

Definition at line 25 of file strtod.cc.

Referenced by v8::internal::Bignum::AssignDecimalString(), and DiyFpStrtod().

◆ kMaxUInt8

const int v8::internal::kMaxUInt8 = (1 << 8) - 1

Definition at line 113 of file globals.h.

Referenced by v8::internal::SnapshotByteSink::PutSection().

◆ kMaxWatchpointCode

const uint32_t v8::internal::kMaxWatchpointCode = 31

Definition at line 243 of file constants-mips.h.

◆ kMentionedObjectCacheMaxSize

const int v8::internal::kMentionedObjectCacheMaxSize = 256
static

Definition at line 13 of file string-stream.cc.

◆ kMinComplexMemCopy

const int v8::internal::kMinComplexMemCopy = 16 * kPointerSize

Definition at line 356 of file utils.h.

Referenced by CopyBytes(), and CopyCharsUnsigned().

◆ kMinDecimalPower

const int v8::internal::kMinDecimalPower = -324
static

Definition at line 34 of file strtod.cc.

Referenced by BignumStrtod(), and Strtod().

◆ kMinimalTargetExponent

const int v8::internal::kMinimalTargetExponent = -60
static

Definition at line 24 of file fast-dtoa.cc.

Referenced by DigitGen(), DigitGenCounted(), Grisu3(), and Grisu3Counted().

◆ kMinInt

◆ kMinInt16

const int v8::internal::kMinInt16 = -(1 << 15)

Definition at line 116 of file globals.h.

◆ kMinInt8

const int v8::internal::kMinInt8 = -(1 << 7)

Definition at line 112 of file globals.h.

◆ kMinUInt16

const int v8::internal::kMinUInt16 = 0

Definition at line 118 of file globals.h.

◆ kMinUInt8

const int v8::internal::kMinUInt8 = 0

Definition at line 114 of file globals.h.

◆ kNaNOrInfinityLowerBoundUpper32

const uint32_t v8::internal::kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000

Definition at line 658 of file globals.h.

◆ kNoAlignmentPadding

const int v8::internal::kNoAlignmentPadding = 0

Definition at line 31 of file frames-ia32.h.

◆ kNoCharClass

const uc16 v8::internal::kNoCharClass = 0
static

Definition at line 4794 of file parser.cc.

Referenced by AddRangeOrEscape().

◆ kNoCodeAgeSequenceLength [1/7]

const int v8::internal::kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize
static

◆ kNoCodeAgeSequenceLength [2/7]

const int v8::internal::kNoCodeAgeSequenceLength = 5 * kInstructionSize
static

Definition at line 778 of file assembler-arm64-inl.h.

◆ kNoCodeAgeSequenceLength [3/7]

const int v8::internal::kNoCodeAgeSequenceLength = 5
static

Definition at line 52 of file assembler-ia32-inl.h.

◆ kNoCodeAgeSequenceLength [4/7]

const int v8::internal::kNoCodeAgeSequenceLength = 7 * Assembler::kInstrSize
static

Definition at line 281 of file assembler-mips-inl.h.

◆ kNoCodeAgeSequenceLength [5/7]

const int v8::internal::kNoCodeAgeSequenceLength = 9 * Assembler::kInstrSize
static

Definition at line 275 of file assembler-mips64-inl.h.

◆ kNoCodeAgeSequenceLength [6/7]

const int v8::internal::kNoCodeAgeSequenceLength = kPointerSize == kInt64Size ? 6 : 17
static

Definition at line 26 of file assembler-x64-inl.h.

◆ kNoCodeAgeSequenceLength [7/7]

const int v8::internal::kNoCodeAgeSequenceLength = 5
static

Definition at line 52 of file assembler-x87-inl.h.

◆ kNoExtraICState

const ExtraICState v8::internal::kNoExtraICState = 0
static

Definition at line 306 of file objects.h.

Referenced by v8::internal::BASE_EMBEDDED< Visitor >::GetExtraICState().

◆ kNonstatementPositionTag

const int v8::internal::kNonstatementPositionTag = 1

Definition at line 322 of file assembler.cc.

Referenced by GetPositionModeFromTag(), and v8::internal::RelocIterator::next().

◆ kNoRegister

const int v8::internal::kNoRegister = -1

Definition at line 43 of file constants-arm.h.

◆ kNotInlinable

const int v8::internal::kNotInlinable = 1000000000
static

◆ kNotInternalizedTag

const uint32_t v8::internal::kNotInternalizedTag = 0x40

Definition at line 550 of file objects.h.

◆ kNotStringTag

const uint32_t v8::internal::kNotStringTag = 0x80

◆ kNumberDictionaryProbes

const int v8::internal::kNumberDictionaryProbes = 4
static

Definition at line 149 of file codegen.h.

◆ kNumberOfCalleeSavedFPRegisters

const int v8::internal::kNumberOfCalleeSavedFPRegisters = 8

Definition at line 39 of file constants-arm64.h.

◆ kNumberOfCalleeSavedRegisters

const int v8::internal::kNumberOfCalleeSavedRegisters = 11

Definition at line 36 of file constants-arm64.h.

◆ kNumberOfFPRegisters

◆ kNumberOfRegisters

◆ kNumCalleeSaved

const int v8::internal::kNumCalleeSaved = 7 + kR9Available

Definition at line 58 of file frames-arm.h.

◆ kNumCalleeSavedFPU

const int v8::internal::kNumCalleeSavedFPU = 6

Definition at line 64 of file frames-mips.h.

◆ kNumDoubleCalleeSaved

const int v8::internal::kNumDoubleCalleeSaved = 8

Definition at line 61 of file frames-arm.h.

◆ kNumFPURegisters

const int v8::internal::kNumFPURegisters = 32

Definition at line 139 of file constants-mips.h.

◆ kNumJSCallerSaved

const int v8::internal::kNumJSCallerSaved = 4

Definition at line 30 of file frames-arm.h.

Referenced by JSCallerSavedCode(), and SetUpJSCallerSavedCodeData().

◆ kNumRegisters

const int v8::internal::kNumRegisters = 16

Definition at line 34 of file constants-arm.h.

Referenced by v8::internal::RegExpImpl::AtomExec().

◆ kNumRegs

const int v8::internal::kNumRegs = 16

Definition at line 20 of file frames-arm.h.

Referenced by SetUpJSCallerSavedCodeData().

◆ kNumSafepointRegisters

const int v8::internal::kNumSafepointRegisters = 16

◆ kNumSafepointSavedRegisters

const int v8::internal::kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved

Definition at line 73 of file frames-arm.h.

◆ kNumSimuRegisters

const int v8::internal::kNumSimuRegisters = 35

Definition at line 133 of file constants-mips.h.

◆ kNumVFPDoubleRegisters

const int v8::internal::kNumVFPDoubleRegisters = 32

Definition at line 38 of file constants-arm.h.

◆ kNumVFPRegisters

const int v8::internal::kNumVFPRegisters = kNumVFPSingleRegisters + kNumVFPDoubleRegisters

Definition at line 39 of file constants-arm.h.

◆ kNumVFPSingleRegisters

const int v8::internal::kNumVFPSingleRegisters = 32

Definition at line 37 of file constants-arm.h.

◆ kObjectAlignment

◆ kObjectAlignmentBits

◆ kObjectAlignmentMask

◆ kOneByteDataHintMask

const uint32_t v8::internal::kOneByteDataHintMask = 0x08

◆ kOneByteDataHintTag

const uint32_t v8::internal::kOneByteDataHintTag = 0x08

◆ kOneByteSize

const int v8::internal::kOneByteSize = kCharSize

Definition at line 186 of file globals.h.

Referenced by v8::internal::LiteralBuffer::INLINE().

◆ kOneByteStringTag

◆ kOneInEveryByte

const uintptr_t v8::internal::kOneInEveryByte = kUintptrAllBitsSet / 0xFF
static

Definition at line 920 of file runtime-strings.cc.

Referenced by AsciiRangeMask().

◆ kOpcodeBits

const int v8::internal::kOpcodeBits = 6

Definition at line 250 of file constants-mips.h.

Referenced by v8::internal::Instruction::OpcodeValue().

◆ kOpcodeMask

const int v8::internal::kOpcodeMask = ((1 << kOpcodeBits) - 1) << kOpcodeShift

◆ kOpcodeShift

const int v8::internal::kOpcodeShift = 26

Definition at line 249 of file constants-mips.h.

Referenced by v8::internal::Instruction::OpcodeValue().

◆ kOSRCodeSizeAllowanceBase

const int v8::internal::kOSRCodeSizeAllowanceBase
static
Initial value:
=
100 * FullCodeGenerator::kCodeSizeMultiplier

Definition at line 42 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kOSRCodeSizeAllowancePerTick

const int v8::internal::kOSRCodeSizeAllowancePerTick
static
Initial value:
=
4 * FullCodeGenerator::kCodeSizeMultiplier

Definition at line 45 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kPackedSizeNotKnown

const int v8::internal::kPackedSizeNotKnown = -1
static

◆ kPageHeaderTag

const int v8::internal::kPageHeaderTag = 3

◆ kPageHeaderTagMask

const intptr_t v8::internal::kPageHeaderTagMask = (1 << kPageHeaderTagSize) - 1

◆ kPageHeaderTagSize

const int v8::internal::kPageHeaderTagSize = 2

Definition at line 250 of file globals.h.

◆ kPatternTooShortForBoyerMoore

const int v8::internal::kPatternTooShortForBoyerMoore = 2

Definition at line 127 of file jsregexp.cc.

Referenced by HasFewDifferentCharacters().

◆ kPCJumpExtraTag

const int v8::internal::kPCJumpExtraTag = (1 << kExtraTagBits) - 1

Definition at line 305 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kPCOnStackSize

◆ kPCRegister

const int v8::internal::kPCRegister = 15

Definition at line 42 of file constants-arm.h.

◆ kPiDividedBy4

const double v8::internal::kPiDividedBy4 = 0.78539816339744830962
static

Definition at line 80 of file runtime-maths.cc.

Referenced by RUNTIME_FUNCTION().

◆ kPointerAlignment

◆ kPointerAlignmentMask

const intptr_t v8::internal::kPointerAlignmentMask = kPointerAlignment - 1

Definition at line 231 of file globals.h.

◆ kPointerSize

const int v8::internal::kPointerSize = sizeof(void*)

Definition at line 129 of file globals.h.

Referenced by v8::internal::SkipList::AddObject(), v8::internal::BASE_EMBEDDED< Visitor >::Advance(), v8::internal::FreeList::Allocate(), v8::internal::Heap::AllocateConstantPoolArray(), v8::internal::Heap::AllocateExtendedConstantPoolArray(), v8::internal::Heap::AllocateFixedTypedArray(), v8::internal::Heap::AllocateRawFixedDoubleArray(), v8::internal::compiler::Frame::AllocateSpillSlot(), v8::internal::HEscapeAnalysisPhase::AnalyzeDataFlow(), ArgumentsOffsetWithoutFrame(), v8::internal::IncrementalMarking::BlackToGreyAndUnshift(), v8::internal::HGraphBuilder::BuildArrayBufferViewInitialization(), v8::internal::HGraphBuilder::BuildCalculateElementsSize(), v8::internal::HGraphBuilder::BuildCloneShallowArrayNonEmpty(), v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeStub(), v8::internal::SharedFunctionInfo::CalculateInObjectProperties(), v8::internal::SharedFunctionInfo::CalculateInstanceSize(), CFunctionArgumentOperand(), v8::internal::StandardFrame::ComputeExpressionsCount(), v8::internal::FrameDescription::ComputeFixedSize(), v8::internal::Deoptimizer::ComputeIncomingArgumentSize(), v8::internal::Deoptimizer::ComputeInputFrameSize(), v8::internal::JavaScriptFrame::ComputeOperandsCount(), v8::internal::Deoptimizer::ComputeOutgoingArgumentSize(), v8::internal::compiler::RawMachineAssembler::ConvertInt32ToIntPtr(), v8::internal::compiler::RawMachineAssembler::ConvertIntPtrToInt32(), v8::internal::Heap::CopyBlock(), CopyCachedOneByteCharsToArray(), CopyDoubleToDoubleElements(), v8::internal::Heap::CopyFixedArrayWithMap(), v8::internal::Heap::CopyJSObject(), v8::internal::Map::CopyNormalized(), CopyWords(), v8::internal::Map::Create(), v8::internal::Heap::CreateFillerObjectAt(), v8::internal::Heap::CreateInitialMaps(), v8::internal::Deoptimizer::DebuggerInspectableFrame(), v8::internal::MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(), DiscoverGreyObjectsOnPage(), v8::internal::Deoptimizer::DoComputeAccessorStubFrame(), v8::internal::Deoptimizer::DoComputeArgumentsAdaptorFrame(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), v8::internal::Deoptimizer::DoComputeConstructStubFrame(), v8::internal::Deoptimizer::DoComputeJSFrame(), v8::internal::Deoptimizer::DoComputeOutputFrames(), v8::internal::LCodeGen::DoDeferredInstanceOfKnownGlobal(), v8::internal::LCodeGen::DoLoadKeyedFixedArray(), v8::internal::LCodeGen::DoStoreKeyedFixedArray(), DropFrames(), v8::internal::HGraphBuilder::FINAL::elements_size(), v8::internal::compiler::ElementSizeOf(), v8::internal::FullCodeGenerator::EmitBackEdgeTable(), v8::internal::Assembler::EndBlockConstPool(), v8::internal::RegExpStack::EnsureCapacity(), EnsureDoubleAligned(), v8::internal::StoreBuffer::EnsureSpace(), v8::internal::ConstantPoolArray::entry_size(), v8::internal::MarkCompactCollector::EvacuateLiveObjectsFromPage(), v8::internal::V8HeapExplorer::ExtractJSObjectReferences(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::FieldIndex(), v8::internal::HLoadEliminationTable::FieldOf(), v8::internal::Deoptimizer::FillInputFrame(), v8::internal::Heap::FindAllocationMemento(), v8::internal::StoreBuffer::FindPointersToNewSpaceInRegion(), FixedArrayElementOperand(), v8::internal::FrameDescription::FrameDescription(), v8::internal::LCodeGen::GenerateOsrPrologue(), v8::internal::LCodeGen::GeneratePrologue(), v8::internal::FixedArray::get(), v8::internal::StandardFrame::GetExpressionAddress(), v8::internal::FrameDescription::GetExpressionCount(), v8::internal::compiler::Linkage::GetFrameOffset(), v8::internal::Map::GetInObjectPropertyOffset(), v8::internal::JSObject::GetInternalField(), v8::internal::JSObject::GetInternalFieldCount(), v8::internal::JSObject::GetInternalFieldOffset(), v8::internal::FrameDescription::GetOffsetFromSlotIndex(), v8::internal::JavaScriptFrame::GetOperandSlot(), v8::internal::JavaScriptFrame::GetParameterSlot(), v8::internal::StaticVisitorBase::GetVisitorIdForSize(), v8::internal::compiler::IA32OperandConverter::HighOperand(), v8::internal::PromotionQueue::Initialize(), v8::internal::Struct::InitializeBody(), v8::internal::JSProxy::InitializeBody(), v8::internal::JSObject::InitializeBody(), v8::internal::StaticNewSpaceVisitor< StaticVisitor >::INLINE(), v8::internal::Page::INLINE(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::INLINE(), v8::internal::NewSpace::INLINE(), v8::internal::compiler::RawMachineAssembler::IntPtrConstant(), v8::internal::Heap::IterateAndMarkPointersToFromSpace(), v8::internal::StandardFrame::IterateCompiledFrame(), v8::internal::HashTable< Derived, Shape, Key >::IterateElements(), v8::internal::JSFunction::JSFunctionIterateBody(), v8::internal::HLoadEliminationTable::KillIfMisaligned(), v8::internal::Heap::LeftTrimFixedArray(), v8::internal::ByteArray::LengthFor(), v8::internal::MacroAssembler::LoadFromSafepointRegisterSlot(), v8::internal::compiler::StructuredGraphBuilder::MakeNode(), v8::internal::StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::MarkInlinedFunctionsCode(), v8::internal::MarkCompactCollector::MarkLiveObjects(), v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame(), v8::internal::Deoptimizer::MaterializeNextHeapObject(), v8::internal::MarkCompactCollector::MigrateObject(), v8::internal::Heap::MoveBlock(), v8::internal::Heap::MoveElements(), MoveWords(), v8::internal::Zone::New(), v8::internal::compiler::Instruction::New(), v8::internal::FreeListNode::next(), v8::internal::FreeListNode::next_address(), v8::internal::FixedArray::NoIncrementalWriteBarrierSet(), v8::internal::Map::Normalize(), v8::internal::FixedArray::NoWriteBarrierSet(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::offset(), v8::internal::JSBuiltinsObject::OffsetOfCodeWithId(), v8::internal::JSBuiltinsObject::OffsetOfFunctionWithId(), v8::internal::FrameDescription::operator new(), v8::internal::BASE_EMBEDDED< Visitor >::operator[](), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::outobject_array_index(), v8::internal::LChunk::ParameterAt(), v8::internal::HEscapeAnalysisPhase::PerformScalarReplacement(), v8::internal::compiler::PointerConstant(), v8::internal::Assembler::pop(), v8::internal::MacroAssembler::pop(), v8::internal::MacroAssembler::Pop(), v8::internal::MacroAssembler::PrepareCEntryArgs(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::PromoteObject(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::property_index(), v8::internal::MacroAssembler::push(), v8::internal::MacroAssembler::Push(), v8::internal::VisitorDispatchTable< Callback >::RegisterSpecialization(), v8::internal::Assembler::RelocInfoNone(), v8::internal::Assembler::repmovsp(), v8::internal::Heap::RightTrimFixedArray(), v8::internal::Space::RoundSizeDownToObjectAlignment(), RUNTIME_FUNCTION(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::SemiSpaceCopyObject(), v8::internal::Serializer::ObjectSerializer::Serialize(), v8::internal::FixedArray::set(), v8::internal::LChunk::set_allocated_double_registers(), v8::internal::Code::set_back_edge_table_offset(), v8::internal::Map::set_bit_field3(), v8::internal::Map::set_instance_size(), v8::internal::AllocationSite::set_memento_found_count(), v8::internal::FreeListNode::set_next(), v8::internal::FixedArray::set_null(), v8::internal::ExternalOneByteString::set_resource(), v8::internal::FreeListNode::set_size(), v8::internal::FixedArray::set_the_hole(), v8::internal::FixedArray::set_undefined(), v8::internal::JSObject::SetInternalField(), SetMarkBitsUnderInvalidatedCode(), v8::internal::compiler::Frame::SetRegisterSaveAreaSize(), v8::internal::StoreBuffer::SetUp(), ShrinkInstanceSize(), v8::internal::ByteArray::Size(), v8::internal::Representation::size(), v8::internal::ConstantPoolArray::SizeFor(), v8::internal::FixedArray::SizeFor(), v8::internal::ConstantPoolArray::SizeForExtended(), v8::internal::PagedSpace::SizeOfFirstPage(), v8::internal::BASE_EMBEDDED< Visitor >::SlotAddress(), v8::internal::Context::SlotOffset(), StackSlotOffset(), StackSpaceOperand(), v8::internal::IncrementalMarking::StartMarking(), v8::internal::MacroAssembler::StoreToSafepointRegisterSlot(), Sweep(), v8::internal::LCodeGen::ToHighMemOperand(), v8::internal::LCodeGen::ToMemOperand(), v8::internal::HOptimizedGraphBuilder::TryInlineApiCall(), v8::internal::Serializer::ObjectSerializer::VisitCell(), v8::internal::Serializer::ObjectSerializer::VisitCodeEntry(), v8::internal::Serializer::ObjectSerializer::VisitExternalReference(), v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitJSFunctionStrongCode(), v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitJSFunctionWeakCode(), v8::internal::Serializer::VisitPointers(), v8::internal::Serializer::ObjectSerializer::VisitPointers(), v8::internal::StaticMarkingVisitor< StaticVisitor >::VisitSharedFunctionInfoWeakCode(), v8::internal::MemoryAllocator::ZapBlock(), and v8::internal::Heap::ZapFromSpace().

◆ kPointerSizeLog2

◆ kPoolExtraTag

const int v8::internal::kPoolExtraTag = kPCJumpExtraTag - 2

Definition at line 326 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kPopInstruction

const Instr v8::internal::kPopInstruction
extern

Definition at line 721 of file constants-mips64.h.

◆ kPopRegPattern

const Instr v8::internal::kPopRegPattern
extern

Definition at line 727 of file constants-mips64.h.

◆ kPrefHintLoad

const int32_t v8::internal::kPrefHintLoad = 0

Definition at line 172 of file constants-mips.h.

◆ kPrefHintLoadRetained

const int32_t v8::internal::kPrefHintLoadRetained = 6

Definition at line 176 of file constants-mips.h.

◆ kPrefHintLoadStreamed

const int32_t v8::internal::kPrefHintLoadStreamed = 4

Definition at line 174 of file constants-mips.h.

◆ kPrefHintPrepareForStore

const int32_t v8::internal::kPrefHintPrepareForStore = 30

Definition at line 179 of file constants-mips.h.

◆ kPrefHintStore

const int32_t v8::internal::kPrefHintStore = 1

Definition at line 173 of file constants-mips.h.

◆ kPrefHintStoreRetained

const int32_t v8::internal::kPrefHintStoreRetained = 7

Definition at line 177 of file constants-mips.h.

◆ kPrefHintStoreStreamed

const int32_t v8::internal::kPrefHintStoreStreamed = 5

Definition at line 175 of file constants-mips.h.

◆ kPrefHintWritebackInvalidate

const int32_t v8::internal::kPrefHintWritebackInvalidate = 25

Definition at line 178 of file constants-mips.h.

◆ kPrintfArgCountOffset

const unsigned v8::internal::kPrintfArgCountOffset = 1 * kInstructionSize

Definition at line 435 of file instructions-arm64.h.

◆ kPrintfArgPatternBits

const unsigned v8::internal::kPrintfArgPatternBits = 2
static

Definition at line 450 of file instructions-arm64.h.

◆ kPrintfArgPatternListOffset

const unsigned v8::internal::kPrintfArgPatternListOffset = 2 * kInstructionSize

Definition at line 436 of file instructions-arm64.h.

◆ kPrintfLength

const unsigned v8::internal::kPrintfLength = 3 * kInstructionSize

Definition at line 437 of file instructions-arm64.h.

◆ kPrintfMaxArgCount

const unsigned v8::internal::kPrintfMaxArgCount = 4

Definition at line 439 of file instructions-arm64.h.

◆ kProfilerStackSize

const int v8::internal::kProfilerStackSize = 64 * KB
static

Definition at line 20 of file cpu-profiler.cc.

◆ kProfilerTicksBeforeOptimization

const int v8::internal::kProfilerTicksBeforeOptimization = 2
static

Definition at line 27 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kProfilerTicksBeforeReenablingOptimization

const int v8::internal::kProfilerTicksBeforeReenablingOptimization = 250
static

Definition at line 31 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kPushInstruction

const Instr v8::internal::kPushInstruction
extern

Definition at line 723 of file constants-mips64.h.

◆ kPushRegPattern

const Instr v8::internal::kPushRegPattern
extern

Definition at line 725 of file constants-mips64.h.

◆ kQuadWordSize

const unsigned v8::internal::kQuadWordSize = 128

Definition at line 108 of file constants-arm64.h.

◆ kQuadWordSizeInBytes

const unsigned v8::internal::kQuadWordSizeInBytes = kQuadWordSize >> 3

Definition at line 109 of file constants-arm64.h.

◆ kQuietNaNHighBitsMask

const uint32_t v8::internal::kQuietNaNHighBitsMask = 0xfff << (51 - 32)

Definition at line 287 of file globals.h.

◆ kQuietNaNMask

const uint64_t v8::internal::kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51

Definition at line 179 of file globals.h.

Referenced by JunkStringValue().

◆ kR9Available

const int v8::internal::kR9Available = 1

Definition at line 15 of file frames-arm.h.

◆ kRdBits

const int v8::internal::kRdBits = 5

Definition at line 256 of file constants-mips.h.

Referenced by v8::internal::Instruction::RdValue().

◆ kRdFieldMask

const int v8::internal::kRdFieldMask = ((1 << kRdBits) - 1) << kRdShift

Definition at line 301 of file constants-mips.h.

Referenced by v8::internal::Instruction::RdFieldRaw().

◆ kRdShift

const int v8::internal::kRdShift = 11

Definition at line 255 of file constants-mips.h.

Referenced by v8::internal::Instruction::RdValue().

◆ kReferenceIdBits

const int v8::internal::kReferenceIdBits = 16

Definition at line 36 of file serialize.h.

◆ kReferenceIdMask

const int v8::internal::kReferenceIdMask = (1 << kReferenceIdBits) - 1

Definition at line 37 of file serialize.h.

Referenced by v8::internal::ExternalReferenceDecoder::Lookup().

◆ kReferenceTypeShift

const int v8::internal::kReferenceTypeShift = kReferenceIdBits

Definition at line 38 of file serialize.h.

Referenced by v8::internal::ExternalReferenceDecoder::Lookup().

◆ kRegCodeMask

const unsigned v8::internal::kRegCodeMask = 0x1f

◆ kRegExpGenerations

const int v8::internal::kRegExpGenerations = 2
static

Definition at line 21 of file compilation-cache.cc.

◆ kRegister_eax_Code

const int v8::internal::kRegister_eax_Code = 0

Definition at line 103 of file assembler-ia32.h.

◆ kRegister_ebp_Code

const int v8::internal::kRegister_ebp_Code = 5

Definition at line 108 of file assembler-ia32.h.

◆ kRegister_ebx_Code

const int v8::internal::kRegister_ebx_Code = 3

Definition at line 106 of file assembler-ia32.h.

◆ kRegister_ecx_Code

const int v8::internal::kRegister_ecx_Code = 1

Definition at line 104 of file assembler-ia32.h.

◆ kRegister_edi_Code

const int v8::internal::kRegister_edi_Code = 7

Definition at line 110 of file assembler-ia32.h.

◆ kRegister_edx_Code

const int v8::internal::kRegister_edx_Code = 2

Definition at line 105 of file assembler-ia32.h.

◆ kRegister_esi_Code

const int v8::internal::kRegister_esi_Code = 6

Definition at line 109 of file assembler-ia32.h.

◆ kRegister_esp_Code

const int v8::internal::kRegister_esp_Code = 4

Definition at line 107 of file assembler-ia32.h.

◆ kRegister_fp_Code

const int v8::internal::kRegister_fp_Code = 11

Definition at line 87 of file assembler-arm.h.

◆ kRegister_ip_Code

const int v8::internal::kRegister_ip_Code = 12

Definition at line 88 of file assembler-arm.h.

◆ kRegister_lr_Code

const int v8::internal::kRegister_lr_Code = 14

Definition at line 90 of file assembler-arm.h.

◆ kRegister_no_reg_Code

const int v8::internal::kRegister_no_reg_Code = -1

Definition at line 75 of file assembler-arm.h.

◆ kRegister_pc_Code

const int v8::internal::kRegister_pc_Code = 15

Definition at line 91 of file assembler-arm.h.

◆ kRegister_r0_Code

const int v8::internal::kRegister_r0_Code = 0

Definition at line 76 of file assembler-arm.h.

◆ kRegister_r10_Code

const int v8::internal::kRegister_r10_Code = 10

Definition at line 86 of file assembler-arm.h.

◆ kRegister_r11_Code

const int v8::internal::kRegister_r11_Code = 11

Definition at line 157 of file assembler-x64.h.

◆ kRegister_r12_Code

const int v8::internal::kRegister_r12_Code = 12

Definition at line 158 of file assembler-x64.h.

◆ kRegister_r13_Code

const int v8::internal::kRegister_r13_Code = 13

Definition at line 159 of file assembler-x64.h.

◆ kRegister_r14_Code

const int v8::internal::kRegister_r14_Code = 14

Definition at line 160 of file assembler-x64.h.

◆ kRegister_r15_Code

const int v8::internal::kRegister_r15_Code = 15

Definition at line 161 of file assembler-x64.h.

◆ kRegister_r1_Code

const int v8::internal::kRegister_r1_Code = 1

Definition at line 77 of file assembler-arm.h.

◆ kRegister_r2_Code

const int v8::internal::kRegister_r2_Code = 2

Definition at line 78 of file assembler-arm.h.

◆ kRegister_r3_Code

const int v8::internal::kRegister_r3_Code = 3

Definition at line 79 of file assembler-arm.h.

◆ kRegister_r4_Code

const int v8::internal::kRegister_r4_Code = 4

Definition at line 80 of file assembler-arm.h.

◆ kRegister_r5_Code

const int v8::internal::kRegister_r5_Code = 5

Definition at line 81 of file assembler-arm.h.

◆ kRegister_r6_Code

const int v8::internal::kRegister_r6_Code = 6

Definition at line 82 of file assembler-arm.h.

◆ kRegister_r7_Code

const int v8::internal::kRegister_r7_Code = 7

Definition at line 83 of file assembler-arm.h.

◆ kRegister_r8_Code

const int v8::internal::kRegister_r8_Code = 8

Definition at line 84 of file assembler-arm.h.

◆ kRegister_r9_Code

const int v8::internal::kRegister_r9_Code = 9

Definition at line 85 of file assembler-arm.h.

◆ kRegister_rax_Code

const int v8::internal::kRegister_rax_Code = 0

Definition at line 146 of file assembler-x64.h.

◆ kRegister_rbp_Code

const int v8::internal::kRegister_rbp_Code = 5

Definition at line 151 of file assembler-x64.h.

◆ kRegister_rbx_Code

const int v8::internal::kRegister_rbx_Code = 3

Definition at line 149 of file assembler-x64.h.

◆ kRegister_rcx_Code

const int v8::internal::kRegister_rcx_Code = 1

Definition at line 147 of file assembler-x64.h.

◆ kRegister_rdi_Code

const int v8::internal::kRegister_rdi_Code = 7

Definition at line 153 of file assembler-x64.h.

◆ kRegister_rdx_Code

const int v8::internal::kRegister_rdx_Code = 2

Definition at line 148 of file assembler-x64.h.

◆ kRegister_rsi_Code

const int v8::internal::kRegister_rsi_Code = 6

Definition at line 152 of file assembler-x64.h.

◆ kRegister_rsp_Code

const int v8::internal::kRegister_rsp_Code = 4

Definition at line 150 of file assembler-x64.h.

◆ kRegister_sp_Code

const int v8::internal::kRegister_sp_Code = 13

Definition at line 89 of file assembler-arm.h.

◆ kRegisterSize

const int v8::internal::kRegisterSize = kPointerSize

Definition at line 133 of file globals.h.

◆ kRegListSizeInBits

const int v8::internal::kRegListSizeInBits = sizeof(RegList) * kBitsPerByte
static

Definition at line 32 of file assembler-arm64.h.

Referenced by v8::internal::CPURegList::Count().

◆ kRequiresCodeRange

const bool v8::internal::kRequiresCodeRange = false

◆ kRootRegister

const Register v8::internal::kRootRegister = { kRegister_r10_Code }

◆ kRootRegisterBias

const int v8::internal::kRootRegisterBias = 128

◆ kRsBits

const int v8::internal::kRsBits = 5

Definition at line 252 of file constants-mips.h.

Referenced by v8::internal::Instruction::RsValue().

◆ kRsFieldMask

◆ kRsShift

◆ kRtBits

const int v8::internal::kRtBits = 5

Definition at line 254 of file constants-mips.h.

Referenced by v8::internal::Instruction::RtValue().

◆ kRtFieldMask

const int v8::internal::kRtFieldMask = ((1 << kRtBits) - 1) << kRtShift

◆ kRtMask

const Instr v8::internal::kRtMask
extern

Definition at line 733 of file constants-mips64.h.

◆ kRtShift

◆ kSaBits

const int v8::internal::kSaBits = 5

Definition at line 258 of file constants-mips.h.

Referenced by v8::internal::Instruction::SaValue().

◆ kSafepointRegisterStackIndexMap

const int v8::internal::kSafepointRegisterStackIndexMap

Definition at line 92 of file frames-mips.h.

◆ kSafepointSavedRegisters

const RegList v8::internal::kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved

Definition at line 72 of file frames-arm.h.

◆ kSaFieldMask

const int v8::internal::kSaFieldMask = ((1 << kSaBits) - 1) << kSaShift

◆ kSaShift

const int v8::internal::kSaShift = 6

◆ kScopeDetailsObjectIndex

const int v8::internal::kScopeDetailsObjectIndex = 1
static

Definition at line 6936 of file runtime.cc.

Referenced by MaterializeScopeDetails().

◆ kScopeDetailsSize

const int v8::internal::kScopeDetailsSize = 2
static

Definition at line 6937 of file runtime.cc.

Referenced by MaterializeScopeDetails().

◆ kScopeDetailsTypeIndex

const int v8::internal::kScopeDetailsTypeIndex = 0
static

Definition at line 6935 of file runtime.cc.

Referenced by MaterializeScopeDetails().

◆ kScratchRegister

const Register v8::internal::kScratchRegister = { 10 }

Definition at line 19 of file macro-assembler-x64.h.

◆ kScriptGenerations

const int v8::internal::kScriptGenerations = 5
static

Definition at line 18 of file compilation-cache.cc.

Referenced by v8::internal::CompilationCacheScript::Lookup().

◆ kSe16MaskOf64

const int64_t v8::internal::kSe16MaskOf64 = (int64_t)0xffff << 32

Definition at line 272 of file constants-mips64.h.

◆ kSFOffset

const int v8::internal::kSFOffset = 31

Definition at line 429 of file constants-arm64.h.

◆ kShiftAmountWRegMask

const unsigned v8::internal::kShiftAmountWRegMask = 0x1f

Definition at line 93 of file constants-arm64.h.

◆ kShiftAmountXRegMask

const unsigned v8::internal::kShiftAmountXRegMask = 0x3f

Definition at line 94 of file constants-arm64.h.

◆ kShortcutTypeMask

const uint32_t v8::internal::kShortcutTypeMask
Initial value:
=
const uint32_t kStringRepresentationMask
Definition: objects.h:561
const uint32_t kIsNotInternalizedMask
Definition: objects.h:549
const uint32_t kIsNotStringMask
Definition: objects.h:543

Definition at line 599 of file objects.h.

Referenced by IsShortcutCandidate().

◆ kShortcutTypeTag

const uint32_t v8::internal::kShortcutTypeTag = kConsStringTag | kNotInternalizedTag

Definition at line 603 of file objects.h.

Referenced by IsShortcutCandidate().

◆ kShortExternalStringMask

const uint32_t v8::internal::kShortExternalStringMask = 0x10

Definition at line 589 of file objects.h.

◆ kShortExternalStringTag

const uint32_t v8::internal::kShortExternalStringTag = 0x10

Definition at line 590 of file objects.h.

◆ kShortSize

◆ kSignMask

const int v8::internal::kSignMask = 0x80000000

Definition at line 307 of file constants-mips.h.

◆ kSlicedNotConsMask

const uint32_t v8::internal::kSlicedNotConsMask = kSlicedStringTag & ~kConsStringTag

Definition at line 579 of file objects.h.

◆ kSlotsZapValue

const uint32_t v8::internal::kSlotsZapValue = 0xbeefdeef

Definition at line 273 of file globals.h.

Referenced by v8::internal::LCodeGen::GeneratePrologue().

◆ kSmallDataBits

const int v8::internal::kSmallDataBits = kBitsPerByte - kLocatableTypeTagBits

Definition at line 298 of file assembler.cc.

◆ kSmallPCDeltaBits

const int v8::internal::kSmallPCDeltaBits = kBitsPerByte - kTagBits

◆ kSmallPCDeltaMask

const int v8::internal::kSmallPCDeltaMask = (1 << kSmallPCDeltaBits) - 1

Definition at line 308 of file assembler.cc.

◆ kSmiConstantRegister

const Register v8::internal::kSmiConstantRegister = { 12 }

◆ kSmiConstantRegisterValue

const int v8::internal::kSmiConstantRegisterValue = 1

◆ kSmiShift

◆ kSmiShiftMask

const uint64_t v8::internal::kSmiShiftMask = (1UL << kSmiShift) - 1

Definition at line 636 of file assembler-arm64.h.

◆ kSmiShiftSize

◆ kSmiSignMask

const intptr_t v8::internal::kSmiSignMask = kIntptrSignBit

Definition at line 223 of file globals.h.

Referenced by v8::internal::MacroAssembler::NonNegativeSmiTst().

◆ kSmiTag

◆ kSmiTagMask

◆ kSmiTagSize

◆ kSmiValueSize

◆ kSpaceRangeCount

const int v8::internal::kSpaceRangeCount = arraysize(kSpaceRanges)
static

◆ kSpaceRanges

const int v8::internal::kSpaceRanges[]
static
Initial value:
= { '\t', '\r' + 1, ' ', ' ' + 1,
0x00A0, 0x00A1, 0x1680, 0x1681, 0x180E, 0x180F, 0x2000, 0x200B,
0x2028, 0x202A, 0x202F, 0x2030, 0x205F, 0x2060, 0x3000, 0x3001,
0xFEFF, 0xFF00, 0x10000 }

Definition at line 3577 of file jsregexp.cc.

Referenced by v8::internal::CharacterRange::AddClassEscape(), and v8::internal::BoyerMoorePositionInfo::SetInterval().

◆ kSpaceTagMask

const int v8::internal::kSpaceTagMask = (1 << kSpaceTagSize) - 1

Definition at line 375 of file globals.h.

◆ kSpaceTagSize

const int v8::internal::kSpaceTagSize = 3

Definition at line 374 of file globals.h.

Referenced by v8::internal::Heap::UpdateAllocationsHash().

◆ kSPRegInternalCode

◆ kSQuietNanBit

const int64_t v8::internal::kSQuietNanBit = 22

Definition at line 76 of file constants-arm64.h.

◆ kSQuietNanMask

const int64_t v8::internal::kSQuietNanMask = 0x1L << kSQuietNanBit

Definition at line 77 of file constants-arm64.h.

Referenced by IsSignallingNaN(), and ToQuietNaN().

◆ kSRegMask

const int64_t v8::internal::kSRegMask = 0x00000000ffffffffL

Definition at line 62 of file constants-arm64.h.

◆ kSRegSize

const unsigned v8::internal::kSRegSize = kSRegSizeInBits >> 3

Definition at line 54 of file constants-arm64.h.

◆ kSRegSizeInBits

◆ kSRegSizeInBitsLog2

const unsigned v8::internal::kSRegSizeInBitsLog2 = 5

Definition at line 53 of file constants-arm64.h.

◆ kSRegSizeLog2

const unsigned v8::internal::kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3

Definition at line 55 of file constants-arm64.h.

◆ kSSignBit

const int64_t v8::internal::kSSignBit = 31

Definition at line 68 of file constants-arm64.h.

◆ kSSignMask

const int64_t v8::internal::kSSignMask = 0x1L << kSSignBit

Definition at line 69 of file constants-arm64.h.

◆ kStartTable

char v8::internal::kStartTable[kStartTableLines *kStartTableEntriesPerLine]

Definition at line 3740 of file mark-compact.cc.

Referenced by MarkWordToObjectStarts().

◆ kStartTableEntriesPerLine

const int v8::internal::kStartTableEntriesPerLine = 5
static

Definition at line 3724 of file mark-compact.cc.

Referenced by MarkWordToObjectStarts().

◆ kStartTableInvalidLine

const int v8::internal::kStartTableInvalidLine = 127
static

Definition at line 3726 of file mark-compact.cc.

Referenced by MarkWordToObjectStarts().

◆ kStartTableLines

const int v8::internal::kStartTableLines = 171
static

Definition at line 3725 of file mark-compact.cc.

Referenced by MarkWordToObjectStarts().

◆ kStartTableUnusedEntry

const int v8::internal::kStartTableUnusedEntry = 126
static

Definition at line 3727 of file mark-compact.cc.

◆ kStatementPositionTag

const int v8::internal::kStatementPositionTag = 2

Definition at line 323 of file assembler.cc.

Referenced by GetPositionModeFromTag(), and v8::internal::RelocIterator::next().

◆ kStopCodeMask

const uint32_t v8::internal::kStopCodeMask = kStopCode - 1

Definition at line 341 of file constants-arm.h.

◆ kStringBuilderConcatHelperLengthBits

const int v8::internal::kStringBuilderConcatHelperLengthBits = 11

Definition at line 11 of file string-builder.h.

◆ kStringBuilderConcatHelperPositionBits

const int v8::internal::kStringBuilderConcatHelperPositionBits = 19

Definition at line 12 of file string-builder.h.

◆ kStringEncodingMask

◆ kStringRepresentationMask

◆ kStringTag

const uint32_t v8::internal::kStringTag = 0x0

◆ kStubMajorKeyBits

const int v8::internal::kStubMajorKeyBits = 7

Definition at line 313 of file objects.h.

◆ kStubMinorKeyBits

const int v8::internal::kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1

Definition at line 314 of file objects.h.

◆ kSurrogateRangeCount

const int v8::internal::kSurrogateRangeCount = arraysize(kSurrogateRanges)
static

Definition at line 3589 of file jsregexp.cc.

Referenced by v8::internal::BoyerMoorePositionInfo::SetInterval().

◆ kSurrogateRanges

const int v8::internal::kSurrogateRanges[] = { 0xd800, 0xe000, 0x10000 }
static

Definition at line 3588 of file jsregexp.cc.

Referenced by v8::internal::BoyerMoorePositionInfo::SetInterval().

◆ kSweeperThreadStackSize

const int v8::internal::kSweeperThreadStackSize = 64 * KB
static

Definition at line 15 of file sweeper-thread.cc.

◆ kSwRegFpNegOffsetPattern

const Instr v8::internal::kSwRegFpNegOffsetPattern
extern

Definition at line 731 of file constants-mips64.h.

◆ kSwRegFpOffsetPattern

const Instr v8::internal::kSwRegFpOffsetPattern
extern

Definition at line 729 of file constants-mips64.h.

◆ kTagBits

◆ kTagMask

const int v8::internal::kTagMask = (1 << kTagBits) - 1

Definition at line 295 of file assembler.cc.

Referenced by v8::internal::RelocIterator::AdvanceGetTag().

◆ kTen4

const uint32_t v8::internal::kTen4 = 10000
static

Definition at line 208 of file fast-dtoa.cc.

Referenced by BiggestPowerTen().

◆ kTen5

const uint32_t v8::internal::kTen5 = 100000
static

Definition at line 209 of file fast-dtoa.cc.

Referenced by BiggestPowerTen().

◆ kTen6

const uint32_t v8::internal::kTen6 = 1000000
static

Definition at line 210 of file fast-dtoa.cc.

Referenced by BiggestPowerTen().

◆ kTen7

const uint32_t v8::internal::kTen7 = 10000000
static

Definition at line 211 of file fast-dtoa.cc.

Referenced by BiggestPowerTen(), FillDigits64(), and FillDigits64FixedLength().

◆ kTen8

const uint32_t v8::internal::kTen8 = 100000000
static

Definition at line 212 of file fast-dtoa.cc.

Referenced by BiggestPowerTen().

◆ kTen9

const uint32_t v8::internal::kTen9 = 1000000000
static

Definition at line 213 of file fast-dtoa.cc.

Referenced by BiggestPowerTen().

◆ kTh16MaskOf64

const int64_t v8::internal::kTh16MaskOf64 = (int64_t)0xffff << 16

Definition at line 273 of file constants-mips64.h.

◆ kThreadDetailsCurrentThreadIndex

const int v8::internal::kThreadDetailsCurrentThreadIndex = 0
static

Definition at line 7175 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kThreadDetailsSize

const int v8::internal::kThreadDetailsSize = 2
static

Definition at line 7177 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kThreadDetailsThreadIdIndex

const int v8::internal::kThreadDetailsThreadIdIndex = 1
static

Definition at line 7176 of file runtime.cc.

Referenced by RUNTIME_FUNCTION().

◆ kTicksWhenNotEnoughTypeInfo

const int v8::internal::kTicksWhenNotEnoughTypeInfo = 100
static

Definition at line 35 of file runtime-profiler.cc.

Referenced by v8::internal::RuntimeProfiler::OptimizeNow().

◆ kTwoByteStringTag

◆ kTypeCodeCount

◆ kUC16Size

◆ kUintptrAllBitsSet

const uintptr_t v8::internal::kUintptrAllBitsSet = 0xFFFFFFFFu

Definition at line 149 of file globals.h.

Referenced by v8::internal::String::NonAsciiStart().

◆ kUndefIndex

const int v8::internal::kUndefIndex = -1

Definition at line 90 of file frames-mips.h.

◆ kUninitializedRegExpNodePlaceHolder

int v8::internal::kUninitializedRegExpNodePlaceHolder
extern

◆ kUtf8MultiByteCharFollower

const byte v8::internal::kUtf8MultiByteCharFollower = 0x80
static

Definition at line 230 of file scanner-character-streams.cc.

Referenced by IsUtf8MultiCharacterFollower().

◆ kUtf8MultiByteMask

const byte v8::internal::kUtf8MultiByteMask = 0xC0
static

Definition at line 229 of file scanner-character-streams.cc.

Referenced by IsUtf8MultiCharacterFollower().

◆ kVariableLengthPCJumpTopTag

const int v8::internal::kVariableLengthPCJumpTopTag = 1

Definition at line 311 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kVariableSizeSentinel

const int v8::internal::kVariableSizeSentinel = 0

◆ kVeneerPoolTag

const int v8::internal::kVeneerPoolTag = 1

Definition at line 328 of file assembler.cc.

Referenced by v8::internal::RelocIterator::next().

◆ kVFPCConditionFlagBit

const uint32_t v8::internal::kVFPCConditionFlagBit = 1 << 29

Definition at line 371 of file constants-arm.h.

◆ kVFPDefaultNaNModeControlBit

const uint32_t v8::internal::kVFPDefaultNaNModeControlBit = 1 << 25

◆ kVFPExceptionMask

const uint32_t v8::internal::kVFPExceptionMask = 0xf

Definition at line 361 of file constants-arm.h.

◆ kVFPFlushToZeroMask

const uint32_t v8::internal::kVFPFlushToZeroMask = 1 << 24

Definition at line 366 of file constants-arm.h.

◆ kVFPInexactExceptionBit

const uint32_t v8::internal::kVFPInexactExceptionBit = 1 << 4

Definition at line 365 of file constants-arm.h.

◆ kVFPInvalidOpExceptionBit

const uint32_t v8::internal::kVFPInvalidOpExceptionBit = 1 << 0

Definition at line 362 of file constants-arm.h.

◆ kVFPNConditionFlagBit

const uint32_t v8::internal::kVFPNConditionFlagBit = 1 << 31

Definition at line 369 of file constants-arm.h.

◆ kVFPOverflowExceptionBit

const uint32_t v8::internal::kVFPOverflowExceptionBit = 1 << 2

Definition at line 363 of file constants-arm.h.

◆ kVFPRoundingModeMask

const uint32_t v8::internal::kVFPRoundingModeMask = 3 << 22

Definition at line 389 of file constants-arm.h.

◆ kVFPUnderflowExceptionBit

const uint32_t v8::internal::kVFPUnderflowExceptionBit = 1 << 3

Definition at line 364 of file constants-arm.h.

◆ kVFPVConditionFlagBit

const uint32_t v8::internal::kVFPVConditionFlagBit = 1 << 28

Definition at line 372 of file constants-arm.h.

◆ kVFPZConditionFlagBit

const uint32_t v8::internal::kVFPZConditionFlagBit = 1 << 30

Definition at line 370 of file constants-arm.h.

◆ kWMaxInt

const int32_t v8::internal::kWMaxInt = 0x7fffffff

Definition at line 85 of file constants-arm64.h.

◆ kWMaxUInt

const uint64_t v8::internal::kWMaxUInt = 0xffffffffUL

Definition at line 82 of file constants-arm64.h.

◆ kWMinInt

const int32_t v8::internal::kWMinInt = 0x80000000

Definition at line 86 of file constants-arm64.h.

◆ kWordMask

const int64_t v8::internal::kWordMask = 0xffffffffL

Definition at line 80 of file constants-arm64.h.

◆ kWordRangeCount

◆ kWordRanges

const int v8::internal::kWordRanges[]
static
Initial value:
= {
'0', '9' + 1, 'A', 'Z' + 1, '_', '_' + 1, 'a', 'z' + 1, 0x10000 }

Definition at line 3583 of file jsregexp.cc.

Referenced by v8::internal::CharacterRange::AddClassEscape(), v8::internal::CharacterRange::GetWordBounds(), and v8::internal::BoyerMoorePositionInfo::SetInterval().

◆ kWordSize

const unsigned v8::internal::kWordSize = 32

Definition at line 102 of file constants-arm64.h.

◆ kWordSizeInBytes

const unsigned v8::internal::kWordSizeInBytes = kWordSize >> 3

Definition at line 104 of file constants-arm64.h.

◆ kWordSizeInBytesLog2

const unsigned v8::internal::kWordSizeInBytesLog2 = kWordSizeLog2 - 3

Definition at line 105 of file constants-arm64.h.

◆ kWordSizeLog2

const unsigned v8::internal::kWordSizeLog2 = 5

Definition at line 103 of file constants-arm64.h.

◆ kWRegMask

const int64_t v8::internal::kWRegMask = 0x00000000ffffffffL

Definition at line 60 of file constants-arm64.h.

◆ kWRegSize

const unsigned v8::internal::kWRegSize = kWRegSizeInBits >> 3

Definition at line 46 of file constants-arm64.h.

◆ kWRegSizeInBits

◆ kWRegSizeInBitsLog2

const unsigned v8::internal::kWRegSizeInBitsLog2 = 5

Definition at line 45 of file constants-arm64.h.

◆ kWRegSizeLog2

const unsigned v8::internal::kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3

Definition at line 47 of file constants-arm64.h.

◆ kWSignBit

const int64_t v8::internal::kWSignBit = 31

Definition at line 72 of file constants-arm64.h.

Referenced by v8::internal::LCodeGen::DeoptimizeIfNegative().

◆ kWSignMask

const int64_t v8::internal::kWSignMask = 0x1L << kWSignBit

Definition at line 73 of file constants-arm64.h.

◆ kXMaxInt

const int64_t v8::internal::kXMaxInt = 0x7fffffffffffffffL

Definition at line 83 of file constants-arm64.h.

◆ kXMaxUInt

const uint64_t v8::internal::kXMaxUInt = 0xffffffffffffffffUL

Definition at line 81 of file constants-arm64.h.

◆ kXMinInt

const int64_t v8::internal::kXMinInt = 0x8000000000000000L

Definition at line 84 of file constants-arm64.h.

◆ kXRegMask

const int64_t v8::internal::kXRegMask = 0xffffffffffffffffL

Definition at line 61 of file constants-arm64.h.

◆ kXRegSize

const unsigned v8::internal::kXRegSize = kXRegSizeInBits >> 3

Definition at line 50 of file constants-arm64.h.

◆ kXRegSizeInBits

◆ kXRegSizeInBitsLog2

const unsigned v8::internal::kXRegSizeInBitsLog2 = 6

Definition at line 49 of file constants-arm64.h.

◆ kXRegSizeLog2

const unsigned v8::internal::kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3

Definition at line 51 of file constants-arm64.h.

◆ kXSignBit

const int64_t v8::internal::kXSignBit = 63

◆ kXSignMask

const int64_t v8::internal::kXSignMask = 0x1L << kXSignBit

Definition at line 71 of file constants-arm64.h.

Referenced by v8::internal::LCodeGen::DoDeferredMathAbsTagged().

◆ kYearsOffset

const int v8::internal::kYearsOffset = 400000
static

Definition at line 22 of file date.cc.

Referenced by v8::internal::DateCache::YearMonthDayFromDays().

◆ kZapValue

const Address v8::internal::kZapValue = reinterpret_cast<Address>(0xdeadbeef)

Definition at line 269 of file globals.h.

Referenced by v8::internal::MemoryAllocator::ZapBlock().

◆ kZeroHashSeed

◆ kZeroRegCode

◆ lr

◆ math_exp_constants_array

double* v8::internal::math_exp_constants_array = NULL
static

Definition at line 120 of file assembler.cc.

◆ math_exp_data_initialized

bool v8::internal::math_exp_data_initialized = false
static

Definition at line 118 of file assembler.cc.

◆ math_exp_data_mutex

base::Mutex* v8::internal::math_exp_data_mutex = NULL
static

Definition at line 119 of file assembler.cc.

◆ math_exp_log_table_array

double* v8::internal::math_exp_log_table_array = NULL
static

Definition at line 121 of file assembler.cc.

◆ MAX_FIRST_ARG

const unsigned int v8::internal::MAX_FIRST_ARG = 0x7fffffu

Definition at line 17 of file bytecodes-irregexp.h.

◆ MB

◆ name_should_print_as_anonymous

v8::internal::name_should_print_as_anonymous

Definition at line 5584 of file objects-inl.h.

◆ no_creg

const CRegister v8::internal::no_creg = { -1 }

Definition at line 446 of file assembler-arm.h.

◆ no_dreg

const DwVfpRegister v8::internal::no_dreg = { -1 }

Definition at line 367 of file assembler-arm.h.

◆ no_fpucreg

const FPUControlRegister v8::internal::no_fpucreg = { kInvalidFPUControlRegister }

Definition at line 359 of file assembler-mips.h.

◆ no_freg

const FPURegister v8::internal::no_freg = { -1 }

Definition at line 289 of file assembler-mips.h.

◆ no_reg

◆ no_xmm_reg

const XMMRegister v8::internal::no_xmm_reg = { -1 }

Definition at line 211 of file assembler-ia32.h.

◆ nopInstr

const Instr v8::internal::nopInstr = 0

Definition at line 727 of file constants-mips.h.

◆ Object

kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset v8::internal::Object

Definition at line 5322 of file objects-inl.h.

Referenced by v8::internal::compiler::Typer::Typer().

◆ one_char_tokens

const byte v8::internal::one_char_tokens[]
static

Definition at line 87 of file scanner.cc.

Referenced by v8::internal::Scanner::Next().

◆ opt_count_and_bailout_reason

kExpectedNofPropertiesOffset kFunctionTokenPositionOffset v8::internal::opt_count_and_bailout_reason

◆ pc

const Register v8::internal::pc = { kRegister_pc_Code }

Definition at line 177 of file assembler-arm.h.

Referenced by v8::internal::BackEdgeTable::AddStackCheck(), v8::internal::Instruction::At(), v8::internal::Code::CanDeoptAt(), v8::internal::Isolate::CaptureCurrentStackTrace(), ComputeCodeOffsetFromPcOffset(), v8::internal::DeoptimizedFrameInfo::DeoptimizedFrameInfo(), v8::internal::Deoptimizer::DoComputeAccessorStubFrame(), v8::internal::Deoptimizer::DoComputeConstructStubFrame(), v8::internal::FullCodeGenerator::EmitBackEdgeTable(), v8::internal::OptimizedFrame::GetDeoptimizationData(), v8::internal::Code::GetSafepointEntry(), v8::internal::StandardFrame::IterateCompiledFrame(), Load16Aligned(), Load32Aligned(), v8::internal::Builtins::Lookup(), v8::internal::Trace::PerformDeferredActions(), v8::internal::JavaScriptFrame::Print(), v8::internal::JavaScriptFrame::PrintFunctionAndOffset(), RawMatch(), v8::internal::MarkCompactCollector::RecordCodeTargetPatch(), v8::internal::IncrementalMarking::RecordCodeTargetPatch(), v8::internal::RelocInfoBuffer::RelocInfoBuffer(), v8::internal::BackEdgeTable::RemoveStackCheck(), v8::internal::BASE_EMBEDDED< Visitor >::Reposition(), RUNTIME_FUNCTION(), v8::internal::BASE_EMBEDDED< Visitor >::set_pc(), v8::internal::FrameDescription::SetContinuation(), v8::internal::FrameDescription::SetPc(), vTune::internal::JITCodeLineInfo::SetPosition(), v8::internal::Code::SourcePosition(), v8::internal::Code::SourceStatementPosition(), v8::internal::JavaScriptFrame::Summarize(), v8::internal::StubFrame::unchecked_code(), v8::internal::StubFailureTrampolineFrame::unchecked_code(), and v8::internal::SlotsBuffer::UpdateSlotsWithFilter().

◆ pp

const Register v8::internal::pp = { kRegister_r8_Code }

Definition at line 27 of file macro-assembler-arm.h.

Referenced by v8::internal::LCodeGen::RecordSafepoint().

◆ profiler_ticks

kExpectedNofPropertiesOffset kFunctionTokenPositionOffset kOptCountAndBailoutReasonOffset v8::internal::profiler_ticks

Definition at line 5528 of file objects-inl.h.

◆ prototype_template

kSerializedDataOffset v8::internal::prototype_template

Definition at line 5322 of file objects-inl.h.

Referenced by v8::FunctionTemplate::PrototypeTemplate().

◆ q0

const QwNeonRegister v8::internal::q0 = { 0 }

Definition at line 401 of file assembler-arm.h.

◆ q1

const QwNeonRegister v8::internal::q1 = { 1 }

◆ q10

const QwNeonRegister v8::internal::q10 = { 10 }

Definition at line 411 of file assembler-arm.h.

◆ q11

const QwNeonRegister v8::internal::q11 = { 11 }

Definition at line 412 of file assembler-arm.h.

◆ q12

const QwNeonRegister v8::internal::q12 = { 12 }

Definition at line 413 of file assembler-arm.h.

◆ q13

const QwNeonRegister v8::internal::q13 = { 13 }

Definition at line 414 of file assembler-arm.h.

◆ q14

const QwNeonRegister v8::internal::q14 = { 14 }

Definition at line 415 of file assembler-arm.h.

◆ q15

const QwNeonRegister v8::internal::q15 = { 15 }

Definition at line 416 of file assembler-arm.h.

◆ q2

const QwNeonRegister v8::internal::q2 = { 2 }

◆ q3

const QwNeonRegister v8::internal::q3 = { 3 }

Definition at line 404 of file assembler-arm.h.

◆ q4

const QwNeonRegister v8::internal::q4 = { 4 }

Definition at line 405 of file assembler-arm.h.

◆ q5

const QwNeonRegister v8::internal::q5 = { 5 }

Definition at line 406 of file assembler-arm.h.

◆ q6

const QwNeonRegister v8::internal::q6 = { 6 }

Definition at line 407 of file assembler-arm.h.

◆ q7

const QwNeonRegister v8::internal::q7 = { 7 }

Definition at line 408 of file assembler-arm.h.

◆ q8

const QwNeonRegister v8::internal::q8 = { 8 }

Definition at line 409 of file assembler-arm.h.

◆ q9

const QwNeonRegister v8::internal::q9 = { 9 }

Definition at line 410 of file assembler-arm.h.

◆ r0

◆ r1

◆ r10

◆ r11

const Register v8::internal::r11 = { kRegister_r11_Code }

Definition at line 175 of file assembler-x64.h.

◆ r12

const Register v8::internal::r12 = { kRegister_r12_Code }

◆ r13

const Register v8::internal::r13 = { kRegister_r13_Code }

◆ r14

const Register v8::internal::r14 = { kRegister_r14_Code }

◆ r15

const Register v8::internal::r15 = { kRegister_r15_Code }

◆ r2

◆ r3

◆ r4

◆ r5

◆ r6

◆ r7

◆ r8

◆ r9

◆ rax

◆ rbp

const Register v8::internal::rbp = { kRegister_rbp_Code }

◆ rbx

◆ rcx

◆ rdi

◆ rdx

◆ read_only_prototype

kFeedbackVectorOffset kHiddenPrototypeBit v8::internal::read_only_prototype

Definition at line 5423 of file objects-inl.h.

◆ rsi

◆ rsp

◆ rtCallRedirInstr

const Instr v8::internal::rtCallRedirInstr = SPECIAL | BREAK | call_rt_redirected << 6

Definition at line 725 of file constants-mips.h.

◆ s0

const SwVfpRegister v8::internal::s0 = { 0 }

Definition at line 334 of file assembler-arm.h.

Referenced by v8::internal::MacroAssembler::PrepareCEntryArgs().

◆ s1

◆ s10

const SwVfpRegister v8::internal::s10 = { 10 }

Definition at line 344 of file assembler-arm.h.

◆ s11

const SwVfpRegister v8::internal::s11 = { 11 }

Definition at line 345 of file assembler-arm.h.

◆ s12

const SwVfpRegister v8::internal::s12 = { 12 }

Definition at line 346 of file assembler-arm.h.

◆ s13

const SwVfpRegister v8::internal::s13 = { 13 }

Definition at line 347 of file assembler-arm.h.

◆ s14

const SwVfpRegister v8::internal::s14 = { 14 }

Definition at line 348 of file assembler-arm.h.

◆ s15

const SwVfpRegister v8::internal::s15 = { 15 }

Definition at line 349 of file assembler-arm.h.

◆ s16

const SwVfpRegister v8::internal::s16 = { 16 }

Definition at line 350 of file assembler-arm.h.

◆ s17

const SwVfpRegister v8::internal::s17 = { 17 }

Definition at line 351 of file assembler-arm.h.

◆ s18

const SwVfpRegister v8::internal::s18 = { 18 }

Definition at line 352 of file assembler-arm.h.

◆ s19

const SwVfpRegister v8::internal::s19 = { 19 }

Definition at line 353 of file assembler-arm.h.

◆ s2

◆ s20

const SwVfpRegister v8::internal::s20 = { 20 }

Definition at line 354 of file assembler-arm.h.

◆ s21

const SwVfpRegister v8::internal::s21 = { 21 }

Definition at line 355 of file assembler-arm.h.

◆ s22

const SwVfpRegister v8::internal::s22 = { 22 }

Definition at line 356 of file assembler-arm.h.

◆ s23

const SwVfpRegister v8::internal::s23 = { 23 }

Definition at line 357 of file assembler-arm.h.

◆ s24

const SwVfpRegister v8::internal::s24 = { 24 }

Definition at line 358 of file assembler-arm.h.

◆ s25

const SwVfpRegister v8::internal::s25 = { 25 }

Definition at line 359 of file assembler-arm.h.

◆ s26

const SwVfpRegister v8::internal::s26 = { 26 }

Definition at line 360 of file assembler-arm.h.

◆ s27

const SwVfpRegister v8::internal::s27 = { 27 }

Definition at line 361 of file assembler-arm.h.

◆ s28

const SwVfpRegister v8::internal::s28 = { 28 }

Definition at line 362 of file assembler-arm.h.

◆ s29

const SwVfpRegister v8::internal::s29 = { 29 }

Definition at line 363 of file assembler-arm.h.

◆ s3

const SwVfpRegister v8::internal::s3 = { 3 }

Definition at line 337 of file assembler-arm.h.

Referenced by v8::internal::compiler::TEST_F().

◆ s30

const SwVfpRegister v8::internal::s30 = { 30 }

Definition at line 364 of file assembler-arm.h.

◆ s31

const SwVfpRegister v8::internal::s31 = { 31 }

Definition at line 365 of file assembler-arm.h.

◆ s4

const SwVfpRegister v8::internal::s4 = { 4 }

Definition at line 338 of file assembler-arm.h.

◆ s5

const SwVfpRegister v8::internal::s5 = { 5 }

Definition at line 339 of file assembler-arm.h.

◆ s6

const SwVfpRegister v8::internal::s6 = { 6 }

Definition at line 340 of file assembler-arm.h.

◆ s7

const SwVfpRegister v8::internal::s7 = { 7 }

Definition at line 341 of file assembler-arm.h.

◆ s8

const SwVfpRegister v8::internal::s8 = { 8 }

Definition at line 342 of file assembler-arm.h.

◆ s9

const SwVfpRegister v8::internal::s9 = { 9 }

Definition at line 343 of file assembler-arm.h.

◆ serialized_data

v8::internal::serialized_data

Definition at line 5287 of file objects-inl.h.

◆ snapshot_impl_

SnapshotImpl* v8::internal::snapshot_impl_ = NULL
static

Definition at line 43 of file snapshot-external.cc.

Referenced by SetSnapshotFromFile().

◆ sp

const Register v8::internal::sp = { kRegister_sp_Code }

◆ start_position_and_type

kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit v8::internal::start_position_and_type

Definition at line 5431 of file objects-inl.h.

◆ stX_0

const X87Register v8::internal::stX_0 = { 0 }

Definition at line 198 of file assembler-x87.h.

◆ stX_1

const X87Register v8::internal::stX_1 = { 1 }

Definition at line 199 of file assembler-x87.h.

◆ stX_2

const X87Register v8::internal::stX_2 = { 2 }

Definition at line 200 of file assembler-x87.h.

◆ stX_3

const X87Register v8::internal::stX_3 = { 3 }

Definition at line 201 of file assembler-x87.h.

◆ stX_4

const X87Register v8::internal::stX_4 = { 4 }

Definition at line 202 of file assembler-x87.h.

◆ stX_5

const X87Register v8::internal::stX_5 = { 5 }

Definition at line 203 of file assembler-x87.h.

◆ stX_6

const X87Register v8::internal::stX_6 = { 6 }

Definition at line 204 of file assembler-x87.h.

◆ stX_7

const X87Register v8::internal::stX_7 = { 7 }

Definition at line 205 of file assembler-x87.h.

◆ TypeFeedbackVector

◆ VmovIndexHi

const VmovIndex v8::internal::VmovIndexHi = { 1 }

Definition at line 704 of file assembler-arm.h.

◆ VmovIndexLo

const VmovIndex v8::internal::VmovIndexLo = { 0 }

Definition at line 703 of file assembler-arm.h.

◆ xmm0

const XMMRegister v8::internal::xmm0 = { 0 }

Definition at line 203 of file assembler-ia32.h.

Referenced by v8::internal::LCodeGen::double_scratch0().

◆ xmm1

const XMMRegister v8::internal::xmm1 = { 1 }

Definition at line 204 of file assembler-ia32.h.

◆ xmm10

const XMMRegister v8::internal::xmm10 = { 10 }

Definition at line 278 of file assembler-x64.h.

◆ xmm11

const XMMRegister v8::internal::xmm11 = { 11 }

Definition at line 279 of file assembler-x64.h.

◆ xmm12

const XMMRegister v8::internal::xmm12 = { 12 }

Definition at line 280 of file assembler-x64.h.

◆ xmm13

const XMMRegister v8::internal::xmm13 = { 13 }

Definition at line 281 of file assembler-x64.h.

◆ xmm14

const XMMRegister v8::internal::xmm14 = { 14 }

Definition at line 282 of file assembler-x64.h.

◆ xmm15

const XMMRegister v8::internal::xmm15 = { 15 }

Definition at line 283 of file assembler-x64.h.

◆ xmm2

const XMMRegister v8::internal::xmm2 = { 2 }

Definition at line 205 of file assembler-ia32.h.

◆ xmm3

const XMMRegister v8::internal::xmm3 = { 3 }

Definition at line 206 of file assembler-ia32.h.

◆ xmm4

const XMMRegister v8::internal::xmm4 = { 4 }

Definition at line 207 of file assembler-ia32.h.

◆ xmm5

const XMMRegister v8::internal::xmm5 = { 5 }

Definition at line 208 of file assembler-ia32.h.

◆ xmm6

const XMMRegister v8::internal::xmm6 = { 6 }

Definition at line 209 of file assembler-ia32.h.

◆ xmm7

const XMMRegister v8::internal::xmm7 = { 7 }

Definition at line 210 of file assembler-ia32.h.

◆ xmm8

const XMMRegister v8::internal::xmm8 = { 8 }

Definition at line 276 of file assembler-x64.h.

◆ xmm9

const XMMRegister v8::internal::xmm9 = { 9 }

Definition at line 277 of file assembler-x64.h.