v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
bytecode-offset-iterator.cc
Go to the documentation of this file.
1// Copyright 2021 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
6
10
11namespace v8 {
12namespace internal {
13namespace baseline {
14
16 Handle<TrustedByteArray> mapping_table, Handle<BytecodeArray> bytecodes)
17 : mapping_table_(mapping_table),
18 data_start_address_(mapping_table_->begin()),
19 data_length_(mapping_table_->length()),
20 current_index_(0),
21 bytecode_iterator_(bytecodes),
22 local_heap_(LocalHeap::Current()
23 ? LocalHeap::Current()
24 : Isolate::Current()->main_thread_local_heap()) {
26 Initialize();
27}
28
30 Tagged<TrustedByteArray> mapping_table, Tagged<BytecodeArray> bytecodes)
31 : data_start_address_(mapping_table->begin()),
32 data_length_(mapping_table->length()),
33 current_index_(0),
34 bytecode_handle_storage_(bytecodes),
35 // In the non-handlified version, no GC is allowed. We use a "dummy"
36 // handle to pass the BytecodeArray to the BytecodeArrayIterator, which
37 // is fine since no objects will be moved.
38 bytecode_iterator_(Handle<BytecodeArray>(
39 reinterpret_cast<Address*>(&bytecode_handle_storage_))),
40 local_heap_(nullptr) {
41 no_gc_.emplace();
42 Initialize();
43}
44
50
52 // Initialize values for the prologue.
53 // The first recorded position is at the start of the first bytecode.
57}
58
64
65} // namespace baseline
66} // namespace internal
67} // namespace v8
void RemoveGCEpilogueCallback(GCEpilogueCallback *callback, void *data)
void AddGCEpilogueCallback(GCEpilogueCallback *callback, void *data, GCCallbacksInSafepoint::GCType gc_type=GCCallbacksInSafepoint::GCType::kAll)
std::optional< DisallowGarbageCollection > no_gc_
BytecodeOffsetIterator(Handle< TrustedByteArray > mapping_table, Handle< BytecodeArray > bytecodes)
constexpr int kFunctionEntryBytecodeOffset
Definition globals.h:854
#define DCHECK(condition)
Definition logging.h:482