v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-call-descriptors.cc
Go to the documentation of this file.
1
// Copyright 2022 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/compiler/wasm-call-descriptors.h
"
6
7
#include "
src/common/globals.h
"
8
#include "
src/compiler/wasm-graph-assembler.h
"
9
#include "
src/zone/zone.h
"
10
11
namespace
v8::internal::compiler
{
12
13
WasmCallDescriptors::WasmCallDescriptors
(
AccountingAllocator
* allocator)
14
:
zone_
(new
Zone
(allocator,
"wasm_call_descriptors"
)) {
15
bigint_to_i64_descriptor_
=
compiler::GetBuiltinCallDescriptor
(
16
Builtin::kBigIntToI64,
zone_
.get(),
StubCallMode::kCallBuiltinPointer
);
17
bigint_to_i64_descriptor_with_framestate_
=
18
compiler::GetBuiltinCallDescriptor
(Builtin::kBigIntToI64,
zone_
.get(),
19
StubCallMode::kCallBuiltinPointer
,
20
true
);
21
#if V8_TARGET_ARCH_32_BIT
22
bigint_to_i32pair_descriptor_ =
23
compiler::GetBuiltinCallDescriptor
(Builtin::kBigIntToI32Pair,
zone_
.get(),
24
StubCallMode::kCallBuiltinPointer
);
25
bigint_to_i32pair_descriptor_with_framestate_ =
26
compiler::GetBuiltinCallDescriptor
(Builtin::kBigIntToI32Pair,
zone_
.get(),
27
StubCallMode::kCallBuiltinPointer
,
28
true
);
29
#endif
// V8_TARGET_ARCH_32_BIT
30
}
31
32
#if V8_TARGET_ARCH_32_BIT
33
compiler::CallDescriptor
*
WasmCallDescriptors::GetLoweredCallDescriptor
(
34
const
compiler::CallDescriptor
* original) {
35
if
(original ==
bigint_to_i64_descriptor_
) {
36
return
bigint_to_i32pair_descriptor_;
37
}
38
if
(original ==
bigint_to_i64_descriptor_with_framestate_
) {
39
return
bigint_to_i32pair_descriptor_with_framestate_;
40
}
41
return
nullptr
;
42
}
43
#endif
// V8_TARGET_ARCH_32_BIT
44
45
}
// namespace v8::internal::compiler
v8::internal::AccountingAllocator
Definition
accounting-allocator.h:27
v8::internal::Zone
Definition
zone.h:43
v8::internal::compiler::CallDescriptor
Definition
linkage.h:44
v8::internal::compiler::WasmCallDescriptors::bigint_to_i64_descriptor_with_framestate_
compiler::CallDescriptor * bigint_to_i64_descriptor_with_framestate_
Definition
wasm-call-descriptors.h:49
v8::internal::compiler::WasmCallDescriptors::zone_
std::unique_ptr< Zone > zone_
Definition
wasm-call-descriptors.h:46
v8::internal::compiler::WasmCallDescriptors::WasmCallDescriptors
WasmCallDescriptors(AccountingAllocator *allocator)
Definition
wasm-call-descriptors.cc:13
v8::internal::compiler::WasmCallDescriptors::bigint_to_i64_descriptor_
compiler::CallDescriptor * bigint_to_i64_descriptor_
Definition
wasm-call-descriptors.h:48
v8::internal::compiler::WasmCallDescriptors::GetLoweredCallDescriptor
V8_EXPORT_PRIVATE compiler::CallDescriptor * GetLoweredCallDescriptor(const compiler::CallDescriptor *original)
Definition
wasm-call-descriptors.h:39
zone_
Zone * zone_
Definition
code-generator-arm.cc:230
globals.h
v8::internal::compiler
Definition
builtins-utils-gen.h:14
v8::internal::compiler::GetBuiltinCallDescriptor
CallDescriptor * GetBuiltinCallDescriptor(Builtin name, Zone *zone, StubCallMode stub_mode, bool needs_frame_state, Operator::Properties properties)
Definition
wasm-graph-assembler.cc:19
v8::internal::StubCallMode::kCallBuiltinPointer
@ kCallBuiltinPointer
wasm-call-descriptors.h
wasm-graph-assembler.h
zone.h
src
compiler
wasm-call-descriptors.cc
Generated on Sun Apr 6 2025 21:08:53 for v8 by
1.12.0