v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
assembler.h
Go to the documentation of this file.
1// Copyright (c) 1994-2006 Sun Microsystems Inc.
2// All Rights Reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// - Redistributions of source code must retain the above copyright notice,
9// this list of conditions and the following disclaimer.
10//
11// - Redistribution in binary form must reproduce the above copyright
12// notice, this list of conditions and the following disclaimer in the
13// documentation and/or other materials provided with the distribution.
14//
15// - Neither the name of Sun Microsystems or the names of contributors may
16// be used to endorse or promote products derived from this software without
17// specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31// The original source code covered by the above license above has been
32// modified significantly by Google Inc.
33// Copyright 2012 the V8 project authors. All rights reserved.
34
35#ifndef V8_CODEGEN_ASSEMBLER_H_
36#define V8_CODEGEN_ASSEMBLER_H_
37
38#include <algorithm>
39#include <forward_list>
40#include <map>
41#include <memory>
42#include <ostream>
43#include <type_traits>
44#include <unordered_map>
45#include <variant>
46
47#include "src/base/macros.h"
48#include "src/base/memory.h"
52#include "src/codegen/label.h"
53#include "src/codegen/reglist.h"
55#include "src/common/globals.h"
57#include "src/flags/flags.h"
58#include "src/handles/handles.h"
59#include "src/objects/objects.h"
61#include "src/utils/ostreams.h"
62
63namespace v8 {
64
65// Forward declarations.
66class ApiFunction;
67
68namespace internal {
69
70using base::Memory;
73
74// Forward declarations.
75class EmbeddedData;
76class OffHeapInstructionStream;
77class Isolate;
78class SCTableReference;
79class SourcePosition;
80class StatsCounter;
81class Label;
82
83// -----------------------------------------------------------------------------
84// Optimization for far-jmp like instructions that can be replaced by shorter.
85
87 public:
88 struct JumpInfo {
89 int pos;
91 // target_address-address_after_jmp_instr, 0 when distance not bind.
93 };
94
95 bool is_collecting() const { return stage == kCollection; }
96 bool is_optimizing() const { return stage == kOptimization; }
101
102 bool is_optimizable() const { return optimizable; }
105 optimizable = true;
106 }
107
108 int MaxAlignInRange(int from, int to) {
109 int max_align = 0;
110
111 auto it = align_pos_size.upper_bound(from);
112
113 while (it != align_pos_size.end()) {
114 if (it->first <= to) {
115 max_align = std::max(max_align, it->second);
116 it++;
117 } else {
118 break;
119 }
120 }
121 return max_align;
122 }
123
124 // Debug
125 void Print() {
126 std::cout << "align_pos_size:" << std::endl;
127 for (auto p : align_pos_size) {
128 std::cout << "{" << p.first << "," << p.second << "}"
129 << " ";
130 }
131 std::cout << std::endl;
132
133 std::cout << "may_optimizable_farjmp:" << std::endl;
134
135 for (auto p : may_optimizable_farjmp) {
136 const auto& jmp_info = p.second;
137 printf("{postion:%d, opcode_size:%d, distance:%d, dest:%d}\n",
138 jmp_info.pos, jmp_info.opcode_size, jmp_info.distance,
139 jmp_info.pos + jmp_info.opcode_size + 4 + jmp_info.distance);
140 }
141 std::cout << std::endl;
142 }
143
144 // Used to verify the instruction sequence is always the same in two stages.
146
147 size_t hash_code = 0u;
148
149 // {position: align_size}
150 std::map<int, int> align_pos_size;
151
152 int farjmp_num = 0;
153 // For collecting stage, should contains all far jump information after
154 // collecting.
155 std::vector<JumpInfo> farjmps;
156
157 bool optimizable = false;
158 // {index: JumpInfo}
159 std::map<int, JumpInfo> may_optimizable_farjmp;
160
161 // For label binding.
162 std::map<Label*, std::vector<int>> label_farjmp_maps;
163};
164
166 public:
167 explicit HeapNumberRequest(double heap_number, int offset = -1);
168
169 double heap_number() const { return value_; }
170
171 // The code buffer offset at the time of the request.
172 int offset() const {
173 DCHECK_GE(offset_, 0);
174 return offset_;
175 }
176 void set_offset(int offset) {
177 DCHECK_LT(offset_, 0);
178 offset_ = offset;
179 DCHECK_GE(offset_, 0);
180 }
181
182 private:
183 double value_;
185};
186
187// -----------------------------------------------------------------------------
188// Platform independent assembler base class.
189
191
193 // The builtin entry point address is embedded into the instruction stream as
194 // an absolute address.
195 kAbsolute,
196 // Generate builtin calls/jumps using PC-relative instructions. This mode
197 // assumes that the target is guaranteed to be within the
198 // kMaxPCRelativeCodeRangeInMB distance.
200 // Generate builtin calls/jumps as an indirect instruction which loads the
201 // target address from the builtins entry point table.
202 kIndirect,
203 // Same as kPCRelative but used only for generating embedded builtins.
204 // Currently we use RelocInfo::RUNTIME_ENTRY for generating kPCRelative but
205 // it's not supported yet for mksnapshot yet because of various reasons:
206 // 1) we encode the target as an offset from the code range which is not
207 // always available (32-bit architectures don't have it),
208 // 2) serialization of RelocInfo::RUNTIME_ENTRY is not implemented yet.
209 // TODO(v8:11527): Address the reasons above and remove the kForMksnapshot in
210 // favor of kPCRelative or kIndirect.
212};
213
215 // Recording reloc info for external references and off-heap targets is
216 // needed whenever code is serialized, e.g. into the snapshot or as a Wasm
217 // module. This flag allows this reloc info to be disabled for code that
218 // will not survive process destruction.
219 bool record_reloc_info_for_serialization = true;
220 // Enables root-relative access to arbitrary untagged addresses (usually
221 // external references). Only valid if code will not survive the process.
222 bool enable_root_relative_access = false;
223 // Enables specific assembler sequences only used for the simulator.
224 bool enable_simulator_code = USE_SIMULATOR_BOOL;
225 // Enables use of isolate-independent constants, indirected through the
226 // root array.
227 // (macro assembler feature).
228 bool isolate_independent_code = false;
229
230 // Defines how builtin calls and tail calls should be generated.
231 BuiltinCallJumpMode builtin_call_jump_mode = BuiltinCallJumpMode::kAbsolute;
232 // Mksnapshot ensures that the code range is small enough to guarantee that
233 // PC-relative call/jump instructions can be used for builtin to builtin
234 // calls/tail calls. The embedded builtins blob generator also ensures that.
235 // However, there are serializer tests, where we force isolate creation at
236 // runtime and at this point, Code space isn't restricted to a size s.t.
237 // PC-relative calls may be used. So, we fall back to an indirect mode.
238 // TODO(v8:11527): remove once kForMksnapshot is removed.
239 bool use_pc_relative_calls_and_jumps_for_mksnapshot = false;
240
241 // On some platforms, all code is created within a certain address range in
242 // the process, and the base of this code range is configured here.
243 Address code_range_base = 0;
244 // Enables the collection of information useful for the generation of unwind
245 // info. This is useful in some platform (Win64) where the unwind info depends
246 // on a function prologue/epilogue.
247 bool collect_win64_unwind_info = false;
248 // Whether to emit code comments.
249 bool emit_code_comments = v8_flags.code_comments;
250
251 bool is_wasm = false;
252
253 static AssemblerOptions Default(Isolate* isolate);
254};
255
256// Wrapper around an optional Zone*. If the zone isn't present, the
257// AccountingAllocator* may be used to create a fresh one.
258//
259// This is useful for assemblers that want to Zone-allocate temporay data,
260// without forcing all users to have to create a Zone before using the
261// assembler.
262using MaybeAssemblerZone = std::variant<Zone*, AccountingAllocator*>;
263
265 public:
266 virtual ~AssemblerBuffer() = default;
267 virtual uint8_t* start() const = 0;
268 virtual int size() const = 0;
269 // Return a grown copy of this buffer. The contained data is uninitialized.
270 // The data in {this} will still be read afterwards (until {this} is
271 // destructed), but not written.
272 virtual std::unique_ptr<AssemblerBuffer> Grow(int new_size)
274};
275
276// Describes a HeapObject slot containing a pointer to another HeapObject. Such
277// a slot can either contain a direct/tagged pointer, or an indirect pointer
278// (i.e. an index into a pointer table, which then contains the actual pointer
279// to the object) together with a specific IndirectPointerTag.
281 public:
285
289
294
298
302
304#ifdef V8_ENABLE_SANDBOX
305 return ForIndirectPointerSlot(tag);
306#else
307 return ForDirectPointerSlot();
308#endif
309 }
310
312 return ForTrustedPointerSlot(kCodeIndirectPointerTag);
313 }
314
315 private:
318
319 // If the tag is null, this object describes a direct pointer slot.
321};
322
323// Allocate an AssemblerBuffer which uses an existing buffer. This buffer cannot
324// grow, so it must be large enough for all code emitted by the Assembler.
326std::unique_ptr<AssemblerBuffer> ExternalAssemblerBuffer(void* buffer,
327 int size);
328
329// Allocate a new growable AssemblerBuffer with a given initial size.
331std::unique_ptr<AssemblerBuffer> NewAssemblerBuffer(int size);
332
334 public:
335 AssemblerBase(const AssemblerOptions& options,
336 std::unique_ptr<AssemblerBuffer>);
337 virtual ~AssemblerBase();
338
339 const AssemblerOptions& options() const { return options_; }
340
341 bool predictable_code_size() const { return predictable_code_size_; }
342 void set_predictable_code_size(bool value) { predictable_code_size_ = value; }
343
344 uint64_t enabled_cpu_features() const { return enabled_cpu_features_; }
345 void set_enabled_cpu_features(uint64_t features) {
346 enabled_cpu_features_ = features;
347 }
348 // Features are usually enabled by CpuFeatureScope, which also asserts that
349 // the features are supported before they are enabled.
350 // IMPORTANT: IsEnabled() should only be used by DCHECKs. For real feature
351 // detection, use IsSupported().
353 return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0;
354 }
356 enabled_cpu_features_ |= (static_cast<uint64_t>(1) << f);
357 }
358
361 // We need to disable constant pool here for embeded builtins
362 // because the metadata section is not adjacent to instructions
363 return constant_pool_available_ && !options().isolate_independent_code;
364 } else {
365 // Embedded constant pool not supported on this architecture.
366 UNREACHABLE();
367 }
368 }
369
371 return jump_optimization_info_;
372 }
374 jump_optimization_info_ = jump_opt;
375 }
376
378
379 // Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for
380 // cross-snapshotting.
381 static void QuietNaN(Tagged<HeapObject> nan) {}
382
383 int pc_offset() const { return static_cast<int>(pc_ - buffer_start_); }
384
386#if defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_LOONG64)
387 // MIPS and LOONG need to use their own implementation to avoid trampoline's
388 // influence.
389 UNREACHABLE();
390#else
391 return pc_offset();
392#endif
393 }
394
395 uint8_t* buffer_start() const { return buffer_->start(); }
396 int buffer_size() const { return buffer_->size(); }
397 int instruction_size() const { return pc_offset(); }
398
399 std::unique_ptr<AssemblerBuffer> ReleaseBuffer() {
400 std::unique_ptr<AssemblerBuffer> buffer = std::move(buffer_);
402 // Reset fields to prevent accidental further modifications of the buffer.
403 buffer_start_ = nullptr;
404 pc_ = nullptr;
405 return buffer;
406 }
407
408 // This function is called when code generation is aborted, so that
409 // the assembler could clean up internal data structures.
410 virtual void AbortedCodeGeneration() {}
411
412 // Debugging
413 void Print(Isolate* isolate);
414
415 // Record an inline code comment that can be used by a disassembler.
416 // Use --code-comments to enable.
418 const char* comment,
419 const SourceLocation& loc = SourceLocation::Current()) {
420 // Set explicit dependency on --code-comments for dead-code elimination in
421 // release builds.
422 if (!v8_flags.code_comments) return;
423 if (options().emit_code_comments) {
424 std::string comment_str(comment);
425 if (loc.FileName()) {
426 comment_str += " - " + loc.ToString();
427 }
428 code_comments_writer_.Add(pc_offset(), comment_str);
429 }
430 }
431
433 std::string comment,
434 const SourceLocation& loc = SourceLocation::Current()) {
435 // Set explicit dependency on --code-comments for dead-code elimination in
436 // release builds.
437 if (!v8_flags.code_comments) return;
438 if (options().emit_code_comments) {
439 std::string comment_str(comment);
440 if (loc.FileName()) {
441 comment_str += " - " + loc.ToString();
442 }
443 code_comments_writer_.Add(pc_offset(), comment_str);
444 }
445 }
446
447#ifdef V8_CODE_COMMENTS
448 class CodeComment {
449 public:
450 // `comment` can either be a value convertible to std::string, or a function
451 // that returns a value convertible to std::string which is invoked lazily
452 // when code comments are enabled.
453 template <typename CommentGen>
454 V8_NODISCARD CodeComment(
455 Assembler* assembler, CommentGen&& comment,
456 const SourceLocation& loc = SourceLocation::Current())
457 : assembler_(assembler) {
458 if (!v8_flags.code_comments) return;
459 if constexpr (std::is_invocable_v<CommentGen>) {
460 Open(comment(), loc);
461 } else {
462 Open(comment, loc);
463 }
464 }
465 ~CodeComment() {
466 if (!v8_flags.code_comments) return;
467 Close();
468 }
469 static const int kIndentWidth = 2;
470
471 private:
472 int depth() const;
473 void Open(const std::string& comment, const SourceLocation& loc);
474 void Close();
475 Assembler* assembler_;
476 };
477#else // V8_CODE_COMMENTS
479 V8_NODISCARD CodeComment(Assembler*, const std::string&) {}
480 };
481#endif
482
483 // The minimum buffer size. Should be at least two times the platform-specific
484 // {Assembler::kGap}.
485 static constexpr int kMinimalBufferSize = 128;
486
487 // The default buffer size used if we do not know the final size of the
488 // generated code.
489 static constexpr int kDefaultBufferSize = 4 * KB;
490
491 protected:
492 // Add 'target' to the {code_targets_} vector, if necessary, and return the
493 // offset at which it is stored.
494 int AddCodeTarget(IndirectHandle<Code> target);
495 IndirectHandle<Code> GetCodeTarget(intptr_t code_target_index) const;
496
497 // Add 'object' to the {embedded_objects_} vector and return the index at
498 // which it is stored.
500 EmbeddedObjectIndex AddEmbeddedObject(IndirectHandle<HeapObject> object);
501 IndirectHandle<HeapObject> GetEmbeddedObject(EmbeddedObjectIndex index) const;
502
503 // The buffer into which code and relocation info are generated.
504 std::unique_ptr<AssemblerBuffer> buffer_;
505 // Cached from {buffer_->start()}, for faster access.
507 std::forward_list<HeapNumberRequest> heap_number_requests_;
508 // The program counter, which points into the buffer above and moves forward.
509 // TODO(jkummerow): This should probably have type {Address}.
510 uint8_t* pc_;
511
512 void set_constant_pool_available(bool available) {
514 constant_pool_available_ = available;
515 } else {
516 // Embedded constant pool not supported on this architecture.
517 UNREACHABLE();
518 }
519 }
520
521 // {RequestHeapNumber} records the need for a future heap number allocation,
522 // code stub generation or string allocation. After code assembly, each
523 // platform's {Assembler::AllocateAndInstallRequestedHeapNumbers} will
524 // allocate these objects and place them where they are expected (determined
525 // by the pc offset associated with each request).
526 void RequestHeapNumber(HeapNumberRequest request);
527
529 DCHECK(!RelocInfo::IsNoInfo(rmode));
530 if (RelocInfo::IsOnlyForSerializer(rmode) &&
531 !options().record_reloc_info_for_serialization &&
532 !v8_flags.debug_code && !v8_flags.slow_debug_code) {
533 return false;
534 }
535 return true;
536 }
537
539
540 private:
541 // Before we copy code into the code space, we sometimes cannot encode
542 // call/jump code targets as we normally would, as the difference between the
543 // instruction's location in the temporary buffer and the call target is not
544 // guaranteed to fit in the instruction's offset field. We keep track of the
545 // code handles we encounter in calls in this vector, and encode the index of
546 // the code handle in the vector instead.
547 std::vector<IndirectHandle<Code>> code_targets_;
548
549 // If an assembler needs a small number to refer to a heap object handle
550 // (for example, because there are only 32bit available on a 64bit arch), the
551 // assembler adds the object into this vector using AddEmbeddedObject, and
552 // may then refer to the heap object using the handle's index in this vector.
553 std::vector<IndirectHandle<HeapObject>> embedded_objects_;
554
555 // Embedded objects are deduplicated based on handle location. This is a
556 // compromise that is almost as effective as deduplication based on actual
557 // heap object addresses maintains GC safety.
558 std::unordered_map<IndirectHandle<HeapObject>, EmbeddedObjectIndex,
562
566
567 // Indicates whether the constant pool can be accessed, which is only possible
568 // if the pp register points to the current code object's constant pool.
570
572
573#ifdef V8_CODE_COMMENTS
574 int comment_depth_ = 0;
575#endif
576
577 // Constant pool.
580};
581
582// Enable a specified feature within a scope.
584 public:
589
590#ifdef DEBUG
592 CheckPolicy check = kCheckSupported);
594
595 private:
597 uint64_t old_enabled_;
598#else
600 CheckPolicy check = kCheckSupported) {}
602 // Define a destructor to avoid unused variable warnings.
603 }
604#endif
605};
606
607#ifdef V8_CODE_COMMENTS
608#if V8_SUPPORTS_SOURCE_LOCATION
609// We'll get the function name from the source location, no need to pass it in.
610#define ASM_CODE_COMMENT(asm) ASM_CODE_COMMENT_STRING(asm, "")
611#else
612#define ASM_CODE_COMMENT(asm) ASM_CODE_COMMENT_STRING(asm, __func__)
613#endif
614#define ASM_CODE_COMMENT_STRING(asm, comment) \
615 AssemblerBase::CodeComment UNIQUE_IDENTIFIER(asm_code_comment)(asm, comment)
616#else
617#define ASM_CODE_COMMENT(asm)
618#define ASM_CODE_COMMENT_STRING(asm, ...)
619#endif
620
621// Use this macro to mark functions that are only defined if
622// V8_ENABLE_DEBUG_CODE is set, and are a no-op otherwise.
623// Use like:
624// void AssertMyCondition() NOOP_UNLESS_DEBUG_CODE;
625#ifdef V8_ENABLE_DEBUG_CODE
626#define NOOP_UNLESS_DEBUG_CODE
627#else
628#define NOOP_UNLESS_DEBUG_CODE \
629 { static_assert(v8_flags.debug_code.value() == false); } \
630 /* Dummy static_assert to swallow the semicolon after this macro */ \
631 static_assert(true)
632#endif
633
634} // namespace internal
635} // namespace v8
636#endif // V8_CODEGEN_ASSEMBLER_H_
V8_NODISCARD CodeComment(Assembler *, const std::string &)
Definition assembler.h:479
void set_enabled_cpu_features(uint64_t features)
Definition assembler.h:345
bool ShouldRecordRelocInfo(RelocInfo::Mode rmode) const
Definition assembler.h:528
std::unique_ptr< AssemblerBuffer > buffer_
Definition assembler.h:504
const AssemblerOptions options_
Definition assembler.h:563
bool IsEnabled(CpuFeature f)
Definition assembler.h:352
void EnableCpuFeature(CpuFeature f)
Definition assembler.h:355
void set_jump_optimization_info(JumpOptimizationInfo *jump_opt)
Definition assembler.h:373
bool is_constant_pool_available() const
Definition assembler.h:359
JumpOptimizationInfo * jump_optimization_info_
Definition assembler.h:571
std::unordered_map< IndirectHandle< HeapObject >, EmbeddedObjectIndex, IndirectHandle< HeapObject >::hash, IndirectHandle< HeapObject >::equal_to > embedded_objects_map_
Definition assembler.h:561
static void QuietNaN(Tagged< HeapObject > nan)
Definition assembler.h:381
std::unique_ptr< AssemblerBuffer > ReleaseBuffer()
Definition assembler.h:399
std::vector< IndirectHandle< HeapObject > > embedded_objects_
Definition assembler.h:553
void set_predictable_code_size(bool value)
Definition assembler.h:342
std::forward_list< HeapNumberRequest > heap_number_requests_
Definition assembler.h:507
JumpOptimizationInfo * jump_optimization_info()
Definition assembler.h:370
uint64_t enabled_cpu_features() const
Definition assembler.h:344
virtual void AbortedCodeGeneration()
Definition assembler.h:410
bool predictable_code_size() const
Definition assembler.h:341
uint8_t * buffer_start() const
Definition assembler.h:395
CodeCommentsWriter code_comments_writer_
Definition assembler.h:538
V8_INLINE void RecordComment(const char *comment, const SourceLocation &loc=SourceLocation::Current())
Definition assembler.h:417
V8_INLINE void RecordComment(std::string comment, const SourceLocation &loc=SourceLocation::Current())
Definition assembler.h:432
const AssemblerOptions & options() const
Definition assembler.h:339
std::vector< IndirectHandle< Code > > code_targets_
Definition assembler.h:547
void set_constant_pool_available(bool available)
Definition assembler.h:512
virtual int size() const =0
virtual std::unique_ptr< AssemblerBuffer > Grow(int new_size) V8_WARN_UNUSED_RESULT=0
virtual ~AssemblerBuffer()=default
virtual uint8_t * start() const =0
CpuFeatureScope(AssemblerBase *assembler, CpuFeature f, CheckPolicy check=kCheckSupported)
Definition assembler.h:599
HeapNumberRequest(double heap_number, int offset=-1)
Definition assembler.cc:224
static SlotDescriptor ForTrustedPointerSlot(IndirectPointerTag tag)
Definition assembler.h:303
bool contains_direct_pointer() const
Definition assembler.h:282
static SlotDescriptor ForCodePointerSlot()
Definition assembler.h:311
IndirectPointerTag indirect_pointer_tag() const
Definition assembler.h:290
static SlotDescriptor ForIndirectPointerSlot(IndirectPointerTag tag)
Definition assembler.h:299
IndirectPointerTag indirect_pointer_tag_
Definition assembler.h:320
bool contains_indirect_pointer() const
Definition assembler.h:286
static SlotDescriptor ForDirectPointerSlot()
Definition assembler.h:295
SlotDescriptor(IndirectPointerTag tag)
Definition assembler.h:316
base::OwnedVector< uint8_t > buffer_
Definition assembler.cc:111
#define V8_EMBEDDED_CONSTANT_POOL_BOOL
Definition globals.h:81
#define USE_SIMULATOR_BOOL
Definition globals.h:73
BytecodeAssembler & assembler_
refactor address components for immediate indexing make OptimizeMaglevOnNextCall optimize to turbofan instead of maglev filter for tracing turbofan compilation trace turbo cfg trace TurboFan s graph trimmer trace TurboFan s control equivalence trace TurboFan s register allocator trace stack load store counters for optimized code in run fuzzing &&concurrent_recompilation trace_turbo trace_turbo_scheduled trace_turbo_stack_accesses verify TurboFan machine graph of code stubs enable FixedArray bounds checks print TurboFan statistics of wasm compilations maximum cumulative size of bytecode considered for inlining scale factor of bytecode size used to calculate the inlining budget * KB
GCOptions options_
DirectHandle< JSReceiver > options
int pc_offset
static V ReadUnalignedValue(Address p)
Definition memory.h:28
T & Memory(Address addr)
Definition memory.h:18
static void WriteUnalignedValue(Address p, V value)
Definition memory.h:41
std::variant< Zone *, AccountingAllocator * > MaybeAssemblerZone
Definition assembler.h:262
std::unique_ptr< AssemblerBuffer > NewAssemblerBuffer(int size)
Definition assembler.cc:167
V8_EXPORT_PRIVATE FlagValues v8_flags
std::unique_ptr< AssemblerBuffer > ExternalAssemblerBuffer(void *start, int size)
Definition assembler.cc:161
#define UNREACHABLE()
Definition logging.h:67
#define DCHECK_NULL(val)
Definition logging.h:491
#define DCHECK_GE(v1, v2)
Definition logging.h:488
#define DCHECK(condition)
Definition logging.h:482
#define DCHECK_LT(v1, v2)
Definition logging.h:489
#define V8_EXPORT_PRIVATE
Definition macros.h:460
std::map< Label *, std::vector< int > > label_farjmp_maps
Definition assembler.h:162
enum v8::internal::JumpOptimizationInfo::@26 stage
std::map< int, int > align_pos_size
Definition assembler.h:150
std::vector< JumpInfo > farjmps
Definition assembler.h:155
int MaxAlignInRange(int from, int to)
Definition assembler.h:108
std::map< int, JumpInfo > may_optimizable_farjmp
Definition assembler.h:159
#define V8_INLINE
Definition v8config.h:500
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671
#define V8_NODISCARD
Definition v8config.h:693
std::unique_ptr< ValueMirror > value