v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
code-kind.cc
Go to the documentation of this file.
1// Copyright 2020 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
7namespace v8 {
8namespace internal {
9
11 switch (kind) {
12#define CASE(name) \
13 case CodeKind::name: \
14 return #name;
16#undef CASE
17 }
19}
20
21const char* CodeKindToMarker(CodeKind kind, bool context_specialized) {
22 switch (kind) {
23 case CodeKind::INTERPRETED_FUNCTION:
24 return "~";
25 case CodeKind::BASELINE:
26 return "^";
27 case CodeKind::MAGLEV:
28 return context_specialized ? "+'" : "+";
29 case CodeKind::TURBOFAN_JS:
30 return context_specialized ? "*'" : "*";
31 default:
32 return "";
33 }
34}
35
36} // namespace internal
37} // namespace v8
Builtins::Kind kind
Definition builtins.cc:40
#define CODE_KIND_LIST(V)
Definition code-kind.h:18
const char * CodeKindToMarker(CodeKind kind, bool context_specialized)
Definition code-kind.cc:21
const char * CodeKindToString(CodeKind kind)
Definition code-kind.cc:10