v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
abstract-code.cc
Go to the documentation of this file.
1
// Copyright 2023 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
#include "
src/objects/abstract-code.h
"
6
7
#include "
src/objects/abstract-code-inl.h
"
8
9
namespace
v8
{
10
namespace
internal
{
11
12
int
AbstractCode::SourcePosition
(
Isolate
* isolate,
int
offset
) {
13
PtrComprCageBase
cage_base(isolate);
14
Tagged<Map>
map_object =
map
(cage_base);
15
if
(InstanceTypeChecker::IsCode(map_object)) {
16
return
GetCode
()->SourcePosition(
offset
);
17
}
else
{
18
return
GetBytecodeArray
()->SourcePosition(
offset
);
19
}
20
}
21
22
int
AbstractCode::SourceStatementPosition
(
Isolate
* isolate,
int
offset
) {
23
PtrComprCageBase
cage_base(isolate);
24
Tagged<Map>
map_object =
map
(cage_base);
25
if
(InstanceTypeChecker::IsCode(map_object)) {
26
return
GetCode
()->SourceStatementPosition(
offset
);
27
}
else
{
28
return
GetBytecodeArray
()->SourceStatementPosition(
offset
);
29
}
30
}
31
32
}
// namespace internal
33
}
// namespace v8
abstract-code-inl.h
abstract-code.h
v8::internal::AbstractCode::GetCode
Tagged< Code > GetCode()
Definition
abstract-code-inl.h:112
v8::internal::AbstractCode::SourcePosition
int SourcePosition(Isolate *isolate, int offset)
Definition
abstract-code.cc:12
v8::internal::AbstractCode::GetBytecodeArray
Tagged< BytecodeArray > GetBytecodeArray()
Definition
abstract-code-inl.h:114
v8::internal::AbstractCode::SourceStatementPosition
int SourceStatementPosition(Isolate *isolate, int offset)
Definition
abstract-code.cc:22
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::PtrComprCageBase
Definition
globals.h:2827
v8::internal::Tagged
Definition
waiter-queue-node.h:21
offset
int32_t offset
Definition
instruction-selector-ia32.cc:67
map
std::map< const std::string, const std::string > map
Definition
js-date-time-format.cc:268
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
src
objects
abstract-code.cc
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0