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
6
9#include "src/zone/zone.h"
10
11namespace v8::internal::compiler {
12
14 : zone_(new Zone(allocator, "wasm_call_descriptors")) {
16 Builtin::kBigIntToI64, zone_.get(), StubCallMode::kCallBuiltinPointer);
18 compiler::GetBuiltinCallDescriptor(Builtin::kBigIntToI64, zone_.get(),
20 true);
21#if V8_TARGET_ARCH_32_BIT
22 bigint_to_i32pair_descriptor_ =
23 compiler::GetBuiltinCallDescriptor(Builtin::kBigIntToI32Pair, zone_.get(),
25 bigint_to_i32pair_descriptor_with_framestate_ =
26 compiler::GetBuiltinCallDescriptor(Builtin::kBigIntToI32Pair, zone_.get(),
28 true);
29#endif // V8_TARGET_ARCH_32_BIT
30}
31
32#if V8_TARGET_ARCH_32_BIT
34 const compiler::CallDescriptor* original) {
35 if (original == bigint_to_i64_descriptor_) {
36 return bigint_to_i32pair_descriptor_;
37 }
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
compiler::CallDescriptor * bigint_to_i64_descriptor_with_framestate_
WasmCallDescriptors(AccountingAllocator *allocator)
V8_EXPORT_PRIVATE compiler::CallDescriptor * GetLoweredCallDescriptor(const compiler::CallDescriptor *original)
Zone * zone_
CallDescriptor * GetBuiltinCallDescriptor(Builtin name, Zone *zone, StubCallMode stub_mode, bool needs_frame_state, Operator::Properties properties)