V8 Project
builtins.cc File Reference
#include "src/v8.h"
#include "src/api.h"
#include "src/arguments.h"
#include "src/base/once.h"
#include "src/bootstrapper.h"
#include "src/builtins.h"
#include "src/cpu-profiler.h"
#include "src/gdb-jit.h"
#include "src/heap/mark-compact.h"
#include "src/heap-profiler.h"
#include "src/ic/handler-compiler.h"
#include "src/ic/ic.h"
#include "src/prototype.h"
#include "src/vm-state-inl.h"
+ Include dependency graph for builtins.cc:

Go to the source code of this file.

Classes

class  v8::internal::anonymous_namespace{builtins.cc}::BuiltinArguments< extra_args >
 
struct  v8::internal::BuiltinDesc
 
class  v8::internal::BuiltinFunctionTable
 

Namespaces

 v8
 Debugger support for the V8 JavaScript engine.
 
 v8::internal
 
 v8::internal::anonymous_namespace{builtins.cc}
 

Macros

#define DEF_ARG_TYPE(name, spec)    typedef BuiltinArguments<spec> name##ArgumentsType;
 
#define BUILTIN(name)
 
#define DEF_ENUM_C(name, ignore)   FUNCTION_ADDR(Builtin_##name),
 
#define DEF_JS_NAME(name, ignore)   #name,
 
#define DEF_JS_ARGC(ignore, argc)   argc,
 
#define BUILTIN_FUNCTION_TABLE_INIT   { V8_ONCE_INIT, {} }
 
#define DEF_FUNCTION_PTR_C(aname, aextra_args)
 
#define DEF_FUNCTION_PTR_A(aname, kind, state, extra)
 
#define DEF_FUNCTION_PTR_H(aname, kind)
 
#define DEFINE_BUILTIN_ACCESSOR_C(name, ignore)
 
#define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra)
 
#define DEFINE_BUILTIN_ACCESSOR_H(name, kind)
 

Functions

 v8::internal::BUILTIN (Illegal)
 
 v8::internal::BUILTIN (EmptyFunction)
 
static void v8::internal::MoveDoubleElements (FixedDoubleArray *dst, int dst_index, FixedDoubleArray *src, int src_index, int len)
 
static bool v8::internal::ArrayPrototypeHasNoElements (Heap *heap, Context *native_context, JSObject *array_proto)
 
static MUST_USE_RESULT MaybeHandle< FixedArrayBase > v8::internal::EnsureJSArrayWithWritableFastElements (Isolate *isolate, Handle< Object > receiver, Arguments *args, int first_added_arg)
 
static bool v8::internal::IsJSArrayFastElementMovingAllowed (Heap *heap, JSArray *receiver)
 
static MUST_USE_RESULT Object * v8::internal::CallJsBuiltin (Isolate *isolate, const char *name, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
 
 v8::internal::BUILTIN (ArrayPush)
 
 v8::internal::BUILTIN (ArrayPop)
 
 v8::internal::BUILTIN (ArrayShift)
 
 v8::internal::BUILTIN (ArrayUnshift)
 
 v8::internal::BUILTIN (ArraySlice)
 
 v8::internal::BUILTIN (ArraySplice)
 
 v8::internal::BUILTIN (ArrayConcat)
 
 v8::internal::BUILTIN (StrictModePoisonPill)
 
 v8::internal::BUILTIN (GeneratorPoisonPill)
 
static Object * v8::internal::FindHidden (Heap *heap, Object *object, FunctionTemplateInfo *type)
 
static Object * v8::internal::TypeCheck (Heap *heap, int argc, Object **argv, FunctionTemplateInfo *info)
 
template<bool is_construct>
static MUST_USE_RESULT Object * v8::internal::HandleApiCallHelper (BuiltinArguments< NEEDS_CALLED_FUNCTION > args, Isolate *isolate)
 
 v8::internal::BUILTIN (HandleApiCall)
 
 v8::internal::BUILTIN (HandleApiCallConstruct)
 
static MUST_USE_RESULT Object * v8::internal::HandleApiCallAsFunctionOrConstructor (Isolate *isolate, bool is_construct_call, BuiltinArguments< NO_EXTRA_ARGUMENTS > args)
 
 v8::internal::BUILTIN (HandleApiCallAsFunction)
 
 v8::internal::BUILTIN (HandleApiCallAsConstructor)
 
static void v8::internal::Generate_LoadIC_Miss (MacroAssembler *masm)
 
static void v8::internal::Generate_LoadIC_Normal (MacroAssembler *masm)
 
static void v8::internal::Generate_LoadIC_Getter_ForDeopt (MacroAssembler *masm)
 
static void v8::internal::Generate_LoadIC_Slow (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_Initialize (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_Slow (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_Miss (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_Generic (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_String (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_PreMonomorphic (MacroAssembler *masm)
 
static void v8::internal::Generate_StoreIC_Miss (MacroAssembler *masm)
 
static void v8::internal::Generate_StoreIC_Normal (MacroAssembler *masm)
 
static void v8::internal::Generate_StoreIC_Slow (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Slow (MacroAssembler *masm)
 
static void v8::internal::Generate_StoreIC_Setter_ForDeopt (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Generic (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Generic_Strict (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Miss (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Initialize (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_Initialize_Strict (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_PreMonomorphic (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_PreMonomorphic_Strict (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_SloppyArguments (MacroAssembler *masm)
 
static void v8::internal::Generate_CallICStub_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_LoadIC_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_StoreIC_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedLoadIC_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_KeyedStoreIC_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_CompareNilIC_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_Return_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_CallFunctionStub_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_CallConstructStub_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_CallConstructStub_Recording_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_Slot_DebugBreak (MacroAssembler *masm)
 
static void v8::internal::Generate_PlainReturn_LiveEdit (MacroAssembler *masm)
 
static void v8::internal::Generate_FrameDropper_LiveEdit (MacroAssembler *masm)
 

Variables

static BuiltinFunctionTable v8::internal::builtin_function_table
 

Macro Definition Documentation

◆ BUILTIN

#define BUILTIN (   name)
Value:
static Object* Builtin_impl##name( \
name##ArgumentsType args, Isolate* isolate); \
static Object* Builtin_##name( \
int args_length, Object** args_object, Isolate* isolate) { \
name##ArgumentsType args(args_length, args_object); \
return Builtin_impl##name(args, isolate); \
} \
static Object* Builtin_impl##name( \
name##ArgumentsType args, Isolate* isolate)
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
kSerializedDataOffset Object
Definition: objects-inl.h:5322

Definition at line 122 of file builtins.cc.

◆ BUILTIN_FUNCTION_TABLE_INIT

#define BUILTIN_FUNCTION_TABLE_INIT   { V8_ONCE_INIT, {} }

Definition at line 1460 of file builtins.cc.

◆ DEF_ARG_TYPE

#define DEF_ARG_TYPE (   name,
  spec 
)     typedef BuiltinArguments<spec> name##ArgumentsType;

Definition at line 86 of file builtins.cc.

◆ DEF_ENUM_C

#define DEF_ENUM_C (   name,
  ignore 
)    FUNCTION_ADDR(Builtin_##name),

Definition at line 1433 of file builtins.cc.

◆ DEF_FUNCTION_PTR_A

#define DEF_FUNCTION_PTR_A (   aname,
  kind,
  state,
  extra 
)
Value:
functions->generator = FUNCTION_ADDR(Generate_##aname); \
functions->c_code = NULL; \
functions->s_name = #aname; \
functions->name = k##aname; \
functions->flags = Code::ComputeFlags(Code::kind, \
state, \
extra); \
functions->extra_args = NO_EXTRA_ARGUMENTS; \
++functions;
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 FUNCTION_ADDR(f)
Definition: globals.h:195
@ NO_EXTRA_ARGUMENTS
Definition: builtins.h:13

◆ DEF_FUNCTION_PTR_C

#define DEF_FUNCTION_PTR_C (   aname,
  aextra_args 
)
Value:
functions->generator = FUNCTION_ADDR(Generate_Adaptor); \
functions->c_code = FUNCTION_ADDR(Builtin_##aname); \
functions->s_name = #aname; \
functions->name = c_##aname; \
functions->flags = Code::ComputeFlags(Code::BUILTIN); \
functions->extra_args = aextra_args; \
++functions;
#define BUILTIN(name)
Definition: builtins.cc:122

◆ DEF_FUNCTION_PTR_H

#define DEF_FUNCTION_PTR_H (   aname,
  kind 
)
Value:
functions->generator = FUNCTION_ADDR(Generate_##aname); \
functions->c_code = NULL; \
functions->s_name = #aname; \
functions->name = k##aname; \
functions->flags = Code::ComputeHandlerFlags(Code::kind); \
functions->extra_args = NO_EXTRA_ARGUMENTS; \
++functions;

◆ DEF_JS_ARGC

#define DEF_JS_ARGC (   ignore,
  argc 
)    argc,

Definition at line 1440 of file builtins.cc.

◆ DEF_JS_NAME

#define DEF_JS_NAME (   name,
  ignore 
)    #name,

Definition at line 1439 of file builtins.cc.

◆ DEFINE_BUILTIN_ACCESSOR_A

#define DEFINE_BUILTIN_ACCESSOR_A (   name,
  kind,
  state,
  extra 
)
Value:
Handle<Code> Builtins::name() { \
Code** code_address = \
reinterpret_cast<Code**>(builtin_address(k##name)); \
return Handle<Code>(code_address); \
}

Definition at line 1634 of file builtins.cc.

◆ DEFINE_BUILTIN_ACCESSOR_C

#define DEFINE_BUILTIN_ACCESSOR_C (   name,
  ignore 
)
Value:
Handle<Code> Builtins::name() { \
Code** code_address = \
reinterpret_cast<Code**>(builtin_address(k##name)); \
return Handle<Code>(code_address); \
}

Definition at line 1628 of file builtins.cc.

◆ DEFINE_BUILTIN_ACCESSOR_H

#define DEFINE_BUILTIN_ACCESSOR_H (   name,
  kind 
)
Value:
Handle<Code> Builtins::name() { \
Code** code_address = \
reinterpret_cast<Code**>(builtin_address(k##name)); \
return Handle<Code>(code_address); \
}

Definition at line 1640 of file builtins.cc.