v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins.h
Go to the documentation of this file.
1// Copyright 2011 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_BUILTINS_BUILTINS_H_
6#define V8_BUILTINS_BUILTINS_H_
7
8#include "src/base/flags.h"
9#include "src/base/vector.h"
11#include "src/common/globals.h"
14
15#ifdef V8_ENABLE_WEBASSEMBLY
17#endif
18
19namespace v8 {
20namespace internal {
21
22class ByteArray;
23class CallInterfaceDescriptor;
24class Callable;
25
26// Forward declarations.
27class BytecodeOffset;
28class RootVisitor;
29enum class InterpreterPushArgsMode : unsigned;
30class Zone;
31namespace compiler {
33namespace turboshaft {
34class Graph;
35class PipelineData;
36} // namespace turboshaft
37} // namespace compiler
38
39template <typename T>
40static constexpr T FirstFromVarArgs(T x, ...) noexcept {
41 return x;
42}
43
44// Convenience macro to avoid generating named accessors for all builtins.
45#define BUILTIN_CODE(isolate, name) \
46 (isolate)->builtins()->code_handle(i::Builtin::k##name)
47
48enum class Builtin : int32_t {
49 kNoBuiltinId = -1,
50#define DEF_ENUM(Name, ...) k##Name,
53#undef DEF_ENUM
54#define EXTRACT_NAME(Name, ...) k##Name,
55 // Define kFirstBytecodeHandler,
56 kFirstBytecodeHandler =
57 FirstFromVarArgs(BUILTIN_LIST_BYTECODE_HANDLERS(EXTRACT_NAME) 0)
58#undef EXTRACT_NAME
59};
60enum class TieringBuiltin : int32_t {
61#define DEF_ENUM(Name, ...) k##Name = static_cast<int32_t>(Builtin::k##Name),
63#undef DEF_ENUM
64};
66#define CASE(Name, ...) \
67 if (builtin == TieringBuiltin::k##Name) { \
68 return true; \
69 }
71#undef CASE
72 return false;
73}
74
75V8_INLINE constexpr bool operator<(Builtin a, Builtin b) {
76 using type = typename std::underlying_type<Builtin>::type;
77 return static_cast<type>(a) < static_cast<type>(b);
78}
79
81 using type = typename std::underlying_type<Builtin>::type;
82 return builtin = static_cast<Builtin>(static_cast<type>(builtin) + 1);
83}
84
85class Builtins {
86 public:
87 explicit Builtins(Isolate* isolate) : isolate_(isolate) {}
88
89 Builtins(const Builtins&) = delete;
90 Builtins& operator=(const Builtins&) = delete;
91
92 void TearDown();
93
94 // Disassembler support.
95 const char* Lookup(Address pc);
96
97#if !defined(V8_SHORT_BUILTIN_CALLS) || defined(V8_COMPRESS_POINTERS)
98 static constexpr bool kCodeObjectsAreInROSpace = true;
99#else
100 static constexpr bool kCodeObjectsAreInROSpace = false;
101#endif // !defined(V8_SHORT_BUILTIN_CALLS) || \
102 // defined(V8_COMPRESS_POINTERS)
103
104#define ADD_ONE(Name, ...) +1
105 static constexpr int kBuiltinCount =
108 static constexpr int kBuiltinTier0Count = 0 BUILTIN_LIST_TIER0(
110#undef ADD_ONE
111
112 static constexpr Builtin kFirst = static_cast<Builtin>(0);
113 static constexpr Builtin kLast = static_cast<Builtin>(kBuiltinCount - 1);
114 static constexpr Builtin kLastTier0 =
115 static_cast<Builtin>(kBuiltinTier0Count - 1);
116
117 static constexpr int kFirstWideBytecodeHandler =
118 static_cast<int>(Builtin::kFirstBytecodeHandler) +
119 kNumberOfBytecodeHandlers;
120 static constexpr int kFirstExtraWideBytecodeHandler =
121 kFirstWideBytecodeHandler + kNumberOfWideBytecodeHandlers;
122 static constexpr int kLastBytecodeHandlerPlusOne =
123 kFirstExtraWideBytecodeHandler + kNumberOfWideBytecodeHandlers;
124 static constexpr bool kBytecodeHandlersAreSortedLast =
126 static_assert(kBytecodeHandlersAreSortedLast);
127
128 static constexpr bool IsBuiltinId(Builtin builtin) {
129 return builtin != Builtin::kNoBuiltinId;
130 }
131 static constexpr bool IsBuiltinId(int maybe_id) {
132 static_assert(static_cast<int>(Builtin::kNoBuiltinId) == -1);
133 return static_cast<uint32_t>(maybe_id) <
134 static_cast<uint32_t>(kBuiltinCount);
135 }
136 static constexpr bool IsTier0(Builtin builtin) {
137 return builtin <= kLastTier0 && IsBuiltinId(builtin);
138 }
139
140 static constexpr Builtin FromInt(int id) {
141 DCHECK(IsBuiltinId(id));
142 return static_cast<Builtin>(id);
143 }
144 static constexpr int ToInt(Builtin id) {
145 DCHECK(IsBuiltinId(id));
146 return static_cast<int>(id);
147 }
148
149 // The different builtin kinds are documented in builtins-definitions.h.
150 enum Kind { CPP, TSJ, TFJ, TSC, TFC, TFS, TFH, BCH, ASM };
151
154
155 //
156 // Convenience wrappers.
157 //
158 static inline constexpr Builtin RecordWrite(SaveFPRegsMode fp_mode);
159 static inline constexpr Builtin IndirectPointerBarrier(
160 SaveFPRegsMode fp_mode);
161 static inline constexpr Builtin EphemeronKeyBarrier(SaveFPRegsMode fp_mode);
162
163 static inline constexpr Builtin AdaptorWithBuiltinExitFrame(
164 int formal_parameter_count);
165
166 static inline constexpr Builtin CallFunction(
168 static inline constexpr Builtin Call(
170 // Whether the given builtin is one of the JS function call builtins.
171 static inline constexpr bool IsAnyCall(Builtin builtin);
172
173 static inline constexpr Builtin NonPrimitiveToPrimitive(
175 static inline constexpr Builtin OrdinaryToPrimitive(
177
178 static inline constexpr Builtin StringAdd(
180
181 static inline constexpr Builtin LoadGlobalIC(TypeofMode typeof_mode);
182 static inline constexpr Builtin LoadGlobalICInOptimizedCode(
183 TypeofMode typeof_mode);
184
185 static inline constexpr Builtin CEntry(int result_size, ArgvMode argv_mode,
186 bool builtin_exit_frame = false,
187 bool switch_to_central_stack = false);
188
189 static inline constexpr Builtin RuntimeCEntry(
190 int result_size, bool switch_to_central_stack = false);
191
192 static inline constexpr Builtin InterpreterCEntry(int result_size);
193 static inline constexpr Builtin InterpreterPushArgsThenCall(
194 ConvertReceiverMode receiver_mode, InterpreterPushArgsMode mode);
195 static inline constexpr Builtin InterpreterPushArgsThenConstruct(
197
198 // Used by CreateOffHeapTrampolines in isolate.cc.
199 void set_code(Builtin builtin, Tagged<Code> code);
200
203
206 Builtin builtin);
207 V8_EXPORT_PRIVATE static bool HasJSLinkage(Builtin builtin);
208
209 // Returns the number builtin's parameters passed on the stack.
211
212 // Formal parameter count is the minimum number of JS arguments that's
213 // expected to be present on the stack when a builtin is called. When
214 // a JavaScript function is called with less arguments than expected by
215 // a builtin the stack is "adapted" - i.e. the required number of undefined
216 // values is pushed to the stack to match the target builtin expectations.
217 // In case the builtin does not require arguments adaptation it returns
218 // kDontAdaptArgumentsSentinel.
219 static inline int GetFormalParameterCount(Builtin builtin);
220
221 // Checks that the formal parameter count specified in CPP macro matches
222 // the value set in SharedFunctionInfo.
223 static bool CheckFormalParameterCount(
224 Builtin builtin, int function_length,
225 int formal_parameter_count_with_receiver);
226
227 V8_EXPORT_PRIVATE static const char* name(Builtin builtin);
228 V8_EXPORT_PRIVATE static const char* NameForStackTrace(Isolate* isolate,
229 Builtin builtin);
230
231 // Support for --print-builtin-size and --print-builtin-code.
232 void PrintBuiltinCode();
233 void PrintBuiltinSize();
234
235 // Returns the C++ entry point for builtins implemented in C++, and the null
236 // Address otherwise.
237 static Address CppEntryOf(Builtin builtin);
238
239 // Loads the builtin's entry (start of instruction stream) from the isolate's
240 // builtin_entry_table, initialized earlier via {InitializeIsolateDataTables}.
241 static inline Address EntryOf(Builtin builtin, Isolate* isolate);
242
243 V8_EXPORT_PRIVATE static Kind KindOf(Builtin builtin);
244 static const char* KindNameOf(Builtin builtin);
245
246 // The tag for the builtins entrypoint.
248
249 V8_EXPORT_PRIVATE static bool IsCpp(Builtin builtin);
250
251 // True, iff the given code object is a builtin. Note that this does not
252 // necessarily mean that its kind is InstructionStream::BUILTIN.
253 static bool IsBuiltin(const Tagged<Code> code);
254
255 // As above, but safe to access off the main thread since the check is done
256 // by handle location. Similar to Heap::IsRootHandle.
258 Builtin* index) const;
259
260 // True, iff the given builtin contains no isolate-specific code and can be
261 // embedded into the binary.
262 static constexpr bool kAllBuiltinsAreIsolateIndependent = true;
263 static constexpr bool AllBuiltinsAreIsolateIndependent() {
265 }
266 static constexpr bool IsIsolateIndependent(Builtin builtin) {
269 }
270
271 // True, iff the given code object is a builtin with off-heap embedded code.
273
274 static void InitializeIsolateDataTables(Isolate* isolate);
275
276 // Emits a CodeCreateEvent for every builtin.
277 static void EmitCodeCreateEvents(Isolate* isolate);
278
279 bool is_initialized() const { return initialized_; }
280
281 // Used by SetupIsolateDelegate and Deserializer.
284 initialized_ = true;
285 }
286
288 Isolate* isolate, bool is_construct,
293
294 static void Generate_Adaptor(MacroAssembler* masm, int formal_parameter_count,
295 Address builtin_address);
296
297 static void Generate_CEntry(MacroAssembler* masm, int result_size,
298 ArgvMode argv_mode, bool builtin_exit_frame,
299 bool switch_to_central_stack);
300
301 static bool AllowDynamicFunction(Isolate* isolate,
303 DirectHandle<JSObject> target_global_proxy);
304
305 // Creates a copy of InterpreterEntryTrampolineForProfiling in the code space.
307 Isolate* isolate);
308
309 static inline constexpr bool IsJSEntryVariant(Builtin builtin);
310
315
320
322 // Check the stored offset is either uninitialized or unchanged (we
323 // generate multiple variants of this builtin but they should all have the
324 // same handler offset).
327 }
328
333
334#if V8_ENABLE_DRUMBRAKE
335 int cwasm_interpreter_entry_handler_offset() const {
336 DCHECK_NE(cwasm_interpreter_entry_handler_offset_, 0);
337 return cwasm_interpreter_entry_handler_offset_;
338 }
339
340 void SetCWasmInterpreterEntryHandlerOffset(int offset) {
341 // Check the stored offset is either uninitialized or unchanged (we
342 // generate multiple variants of this builtin but they should all have the
343 // same handler offset).
344 CHECK(cwasm_interpreter_entry_handler_offset_ == 0 ||
345 cwasm_interpreter_entry_handler_offset_ == offset);
346 cwasm_interpreter_entry_handler_offset_ = offset;
347 }
348#endif // V8_ENABLE_DRUMBRAKE
349
350 // Returns given builtin's slot in the main builtin table.
351 FullObjectSlot builtin_slot(Builtin builtin);
352 // Returns given builtin's slot in the tier0 builtin table.
353 FullObjectSlot builtin_tier0_slot(Builtin builtin);
354
355 // Public for ia32-specific helper.
357
358 private:
359 static void Generate_CallFunction(MacroAssembler* masm,
361
363
364 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode);
365
367 Builtin target_builtin);
371 Builtin target_builtin);
372
374 bool save_new_target);
375
377 // The version of InterpreterEntryTrampoline used by default.
378 kDefault,
379 // The position independent version of InterpreterEntryTrampoline used as
380 // a template to create copies of the builtin at runtime. The copies are
381 // used to create better profiling information for ticks in bytecode
382 // execution. See v8_flags.interpreted_frames_native_stack for details.
384 };
387
389 MacroAssembler* masm, ConvertReceiverMode receiver_mode,
391
394
396 MacroAssembler* masm, ForwardWhichFrame which_frame);
397
400
401#define DECLARE_ASM(Name, ...) \
402 static void Generate_##Name(MacroAssembler* masm);
403#define DECLARE_TF(Name, ...) \
404 static void Generate_##Name(compiler::CodeAssemblerState* state);
405#define DECLARE_TS(Name, ...) \
406 static void Generate_##Name(compiler::turboshaft::PipelineData* data, \
407 Isolate* isolate, \
408 compiler::turboshaft::Graph& graph, Zone* zone);
409
412
413#undef DECLARE_ASM
414#undef DECLARE_TF
415
417 bool initialized_ = false;
418
419 // Stores the offset of exception handler entry point (the handler_entry
420 // label) in JSEntry and its variants. It's used to generate the handler table
421 // during codegen (mksnapshot-only).
423
424#if V8_ENABLE_DRUMBRAKE
425 // Stores the offset of exception handler entry point (the handler_entry
426 // label) in CWasmInterpreterEntry. It's used to generate the handler table
427 // during codegen (mksnapshot-only).
428 int cwasm_interpreter_entry_handler_offset_ = 0;
429#endif // V8_ENABLE_DRUMBRAKE
430
431 // Do the same for the JSPI prompt, which catches uncaught exceptions and
432 // rejects the corresponding promise.
434
436};
437
439 // Check for kNoBuiltinId first to abort early when the current
440 // InstructionStream object is not a builtin.
441 return builtin_id != Builtin::kNoBuiltinId &&
442 (builtin_id == Builtin::kInterpreterEntryTrampoline ||
443 builtin_id == Builtin::kInterpreterEnterAtBytecode ||
444 builtin_id == Builtin::kInterpreterEnterAtNextBytecode);
445}
446
448 // Check for kNoBuiltinId first to abort early when the current
449 // InstructionStream object is not a builtin.
450 return builtin_id != Builtin::kNoBuiltinId &&
451 (builtin_id == Builtin::kBaselineOutOfLinePrologue ||
452 builtin_id == Builtin::kBaselineOutOfLinePrologueDeopt);
453}
454
456 size_t function_pointer_type_id);
457
458} // namespace internal
459} // namespace v8
460
461// Helper while transitioning some functions to libm.
462#if defined(V8_USE_LIBM_TRIG_FUNCTIONS)
463#define SIN_IMPL(X) \
464 v8_flags.use_libm_trig_functions ? base::ieee754::libm_sin(X) \
465 : base::ieee754::fdlibm_sin(X)
466#define COS_IMPL(X) \
467 v8_flags.use_libm_trig_functions ? base::ieee754::libm_cos(X) \
468 : base::ieee754::fdlibm_cos(X)
469#else
470#define SIN_IMPL(X) base::ieee754::sin(X)
471#define COS_IMPL(X) base::ieee754::cos(X)
472#endif
473
474#endif // V8_BUILTINS_BUILTINS_H_
Isolate * isolate_
friend Zone
Definition asm-types.cc:195
#define BUILTIN_LIST_TIER0(CPP, TFJ, TFC, TFS, TFH, BCH, ASM)
#define BUILTIN_LIST_BASE_TIERING(TFC)
#define IGNORE_BUILTIN(...)
#define DECLARE_TS(Name,...)
Definition builtins.h:405
#define EXTRACT_NAME(Name,...)
#define DECLARE_ASM(Name,...)
Definition builtins.h:401
#define ADD_ONE(Name,...)
Definition builtins.h:104
#define DECLARE_TF(Name,...)
Definition builtins.h:403
void SetJSEntryHandlerOffset(int offset)
Definition builtins.h:321
static constexpr Builtin InterpreterPushArgsThenCall(ConvertReceiverMode receiver_mode, InterpreterPushArgsMode mode)
static bool AllowDynamicFunction(Isolate *isolate, DirectHandle< JSFunction > target, DirectHandle< JSObject > target_global_proxy)
Definition builtins.cc:534
static constexpr Builtin RecordWrite(SaveFPRegsMode fp_mode)
static V8_EXPORT_PRIVATE bool IsCpp(Builtin builtin)
Definition builtins.cc:496
static bool IsIsolateIndependentBuiltin(Tagged< Code > code)
Definition builtins.cc:372
static constexpr Builtin InterpreterPushArgsThenConstruct(InterpreterPushArgsMode mode)
static V8_EXPORT_PRIVATE Kind KindOf(Builtin builtin)
Definition builtins.cc:471
static void Generate_InterpreterPushArgsThenConstructImpl(MacroAssembler *masm, InterpreterPushArgsMode mode)
bool is_initialized() const
Definition builtins.h:279
static void Generate_CallOrConstructForwardVarargs(MacroAssembler *masm, CallOrConstructMode mode, Builtin target_builtin)
static constexpr bool IsJSEntryVariant(Builtin builtin)
V8_EXPORT_PRIVATE Handle< Code > code_handle(Builtin builtin)
Definition builtins.cc:154
static constexpr Builtin OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint)
static BytecodeOffset GetContinuationBytecodeOffset(Builtin builtin)
Definition builtins.cc:97
static CallInterfaceDescriptor CallInterfaceDescriptorFor(Builtin builtin)
Definition builtins.cc:189
static constexpr bool kBytecodeHandlersAreSortedLast
Definition builtins.h:124
static constexpr int kBuiltinCount
Definition builtins.h:105
static constexpr int kLastBytecodeHandlerPlusOne
Definition builtins.h:122
static Address CppEntryOf(Builtin builtin)
Definition builtins.cc:350
const char * Lookup(Address pc)
Definition builtins.cc:114
static constexpr Builtin kFirst
Definition builtins.h:112
static int GetFormalParameterCount(Builtin builtin)
static V8_EXPORT_PRIVATE int GetStackParameterCount(Builtin builtin)
Definition builtins.cc:160
static void Generate_InterpreterEntryTrampoline(MacroAssembler *masm, InterpreterEntryTrampolineMode mode)
static constexpr Builtin RuntimeCEntry(int result_size, bool switch_to_central_stack=false)
static Builtin GetBuiltinFromBytecodeOffset(BytecodeOffset)
Definition builtins.cc:104
static constexpr Builtin EphemeronKeyBarrier(SaveFPRegsMode fp_mode)
FullObjectSlot builtin_slot(Builtin builtin)
Definition builtins.cc:130
static void Generate_Adaptor(MacroAssembler *masm, int formal_parameter_count, Address builtin_address)
static void Generate_CEntry(MacroAssembler *masm, int result_size, ArgvMode argv_mode, bool builtin_exit_frame, bool switch_to_central_stack)
static constexpr Builtin CallFunction(ConvertReceiverMode=ConvertReceiverMode::kAny)
static constexpr Builtin AdaptorWithBuiltinExitFrame(int formal_parameter_count)
FullObjectSlot builtin_tier0_slot(Builtin builtin)
Definition builtins.cc:135
static V8_EXPORT_PRIVATE CodeEntrypointTag EntrypointTagFor(Builtin builtin)
Definition builtins.cc:501
static void Generate_MaglevFunctionEntryStackCheck(MacroAssembler *masm, bool save_new_target)
static constexpr int kFirstWideBytecodeHandler
Definition builtins.h:117
void SetJSPIPromptHandlerOffset(int offset)
Definition builtins.h:329
static constexpr bool IsIsolateIndependent(Builtin builtin)
Definition builtins.h:266
static constexpr int ToInt(Builtin id)
Definition builtins.h:144
static void Generate_Call(MacroAssembler *masm, ConvertReceiverMode mode)
static const char * KindNameOf(Builtin builtin)
Definition builtins.cc:477
Builtins(const Builtins &)=delete
static constexpr Builtin LoadGlobalICInOptimizedCode(TypeofMode typeof_mode)
static V8_WARN_UNUSED_RESULT MaybeHandle< Object > InvokeApiFunction(Isolate *isolate, bool is_construct, DirectHandle< FunctionTemplateInfo > function, DirectHandle< Object > receiver, base::Vector< const DirectHandle< Object > > args, DirectHandle< HeapObject > new_target)
static void Generate_CallFunction(MacroAssembler *masm, ConvertReceiverMode mode)
static void InitializeIsolateDataTables(Isolate *isolate)
Definition builtins.cc:379
static constexpr bool AllBuiltinsAreIsolateIndependent()
Definition builtins.h:263
static void EmitCodeCreateEvents(Isolate *isolate)
Definition builtins.cc:401
static constexpr int kBuiltinTier0Count
Definition builtins.h:108
BUILTIN_LIST(IGNORE_BUILTIN, DECLARE_TS, DECLARE_TF, DECLARE_TS, DECLARE_TF, DECLARE_TF, DECLARE_TF, IGNORE_BUILTIN, DECLARE_ASM) Isolate *isolate_
static void Generate_CallOrConstructVarargs(MacroAssembler *masm, Builtin target_builtin)
static V8_EXPORT_PRIVATE const char * NameForStackTrace(Isolate *isolate, Builtin builtin)
Definition builtins.cc:233
static DirectHandle< Code > CreateInterpreterEntryTrampolineForProfiling(Isolate *isolate)
Definition builtins.cc:430
static constexpr Builtin IndirectPointerBarrier(SaveFPRegsMode fp_mode)
static constexpr bool kAllBuiltinsAreIsolateIndependent
Definition builtins.h:262
Builtins(Isolate *isolate)
Definition builtins.h:87
static void Generate_CallApiCallbackImpl(MacroAssembler *masm, CallApiCallbackMode mode)
void set_code(Builtin builtin, Tagged< Code > code)
Definition builtins.cc:142
static constexpr bool IsBuiltinId(Builtin builtin)
Definition builtins.h:128
static constexpr Builtin FromInt(int id)
Definition builtins.h:140
static constexpr bool IsTier0(Builtin builtin)
Definition builtins.h:136
static V8_EXPORT_PRIVATE bool HasJSLinkage(Builtin builtin)
Definition builtins.cc:220
static constexpr Builtin Call(ConvertReceiverMode=ConvertReceiverMode::kAny)
static constexpr Builtin kLast
Definition builtins.h:113
static void Generate_CallBoundFunctionImpl(MacroAssembler *masm)
static constexpr bool IsBuiltinId(int maybe_id)
Definition builtins.h:131
static constexpr bool kCodeObjectsAreInROSpace
Definition builtins.h:98
static constexpr Builtin NonPrimitiveToPrimitive(ToPrimitiveHint hint=ToPrimitiveHint::kDefault)
static constexpr int kFirstExtraWideBytecodeHandler
Definition builtins.h:120
static void Generate_ConstructForwardAllArgsImpl(MacroAssembler *masm, ForwardWhichFrame which_frame)
bool IsBuiltinHandle(IndirectHandle< HeapObject > maybe_code, Builtin *index) const
Definition builtins.cc:360
static Address EntryOf(Builtin builtin, Isolate *isolate)
static constexpr Builtin StringAdd(StringAddFlags flags=STRING_ADD_CHECK_NONE)
static bool IsBuiltin(const Tagged< Code > code)
Definition builtins.cc:356
static constexpr Builtin InterpreterCEntry(int result_size)
Builtins & operator=(const Builtins &)=delete
static constexpr Builtin kLastTier0
Definition builtins.h:114
int jspi_prompt_handler_offset() const
Definition builtins.h:316
static bool CheckFormalParameterCount(Builtin builtin, int function_length, int formal_parameter_count_with_receiver)
Definition builtins.cc:166
static constexpr Builtin CEntry(int result_size, ArgvMode argv_mode, bool builtin_exit_frame=false, bool switch_to_central_stack=false)
static constexpr Builtin LoadGlobalIC(TypeofMode typeof_mode)
static void Generate_InterpreterPushArgsThenCallImpl(MacroAssembler *masm, ConvertReceiverMode receiver_mode, InterpreterPushArgsMode mode)
int js_entry_handler_offset() const
Definition builtins.h:311
static constexpr bool IsAnyCall(Builtin builtin)
static V8_EXPORT_PRIVATE Callable CallableFor(Isolate *isolate, Builtin builtin)
Definition builtins.cc:214
Handle< Code > code
base::Vector< const DirectHandle< Object > > args
Definition execution.cc:74
DirectHandle< Object > new_target
Definition execution.cc:75
bool is_construct
Definition execution.cc:82
int32_t offset
std::optional< TNode< JSArray > > a
TNode< Object > receiver
Builtin builtin
int x
@ STRING_ADD_CHECK_NONE
Definition type-hints.h:74
V8_INLINE constexpr bool IsInterpreterTrampolineBuiltin(Builtin builtin_id)
Definition builtins.h:438
static constexpr T FirstFromVarArgs(T x,...) noexcept
Definition builtins.h:40
OrdinaryToPrimitiveHint
Definition globals.h:1860
V8_INLINE constexpr bool IsBaselineTrampolineBuiltin(Builtin builtin_id)
Definition builtins.h:447
compiler::CodeAssemblerState CodeAssemblerState
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
Definition flags.cc:2086
InterpreterPushArgsMode
Definition globals.h:2233
V8_INLINE constexpr bool operator<(Builtin a, Builtin b)
Definition builtins.h:75
V8_INLINE bool IsValidTieringBuiltin(TieringBuiltin builtin)
Definition builtins.h:65
V8_INLINE Builtin operator++(Builtin &builtin)
Definition builtins.h:80
Builtin ExampleBuiltinForTorqueFunctionPointerType(size_t function_pointer_type_id)
Definition builtins.cc:548
#define CHECK(condition)
Definition logging.h:124
#define DCHECK_NE(v1, v2)
Definition logging.h:486
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
Definition logging.h:482
#define V8_EXPORT_PRIVATE
Definition macros.h:460
#define V8_INLINE
Definition v8config.h:500
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671