v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
interpreter-intrinsics.cc
Go to the documentation of this file.
1// Copyright 2015 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
7#include "src/base/logging.h"
8
9namespace v8 {
10namespace internal {
11namespace interpreter {
12
13// static
15 switch (function_id) {
16#define SUPPORTED(name, lower_case, count) case Runtime::kInline##name:
18 return true;
19#undef SUPPORTED
20 default:
21 return false;
22 }
23}
24
25// static
27 Runtime::FunctionId function_id) {
28 switch (function_id) {
29#define TO_RUNTIME_ID(name, lower_case, count) \
30 case Runtime::kInline##name: \
31 return IntrinsicId::k##name;
33#undef TO_RUNTIME_ID
34 default:
36 }
37}
38
39// static
41 IntrinsicsHelper::IntrinsicId intrinsic_id) {
42 switch (intrinsic_id) {
43#define TO_INTRINSIC_ID(name, lower_case, count) \
44 case IntrinsicId::k##name: \
45 return Runtime::kInline##name;
47#undef TO_INTRINSIC_ID
48 default:
50 }
51}
52
53} // namespace interpreter
54} // namespace internal
55} // namespace v8
static Runtime::FunctionId ToRuntimeId(IntrinsicId intrinsic_id)
static V8_EXPORT_PRIVATE bool IsSupported(Runtime::FunctionId function_id)
static IntrinsicId FromRuntimeId(Runtime::FunctionId function_id)
#define TO_INTRINSIC_ID(name, lower_case, count)
#define SUPPORTED(name, lower_case, count)
#define TO_RUNTIME_ID(name, lower_case, count)
#define INTRINSICS_LIST(V)