V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
js-generic-lowering.h
1
// Copyright 2014 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
#ifndef V8_COMPILER_JS_GENERIC_LOWERING_H_
5
#define V8_COMPILER_JS_GENERIC_LOWERING_H_
6
7
#include "src/code-factory.h"
8
#include "src/compiler/graph-reducer.h"
9
#include "src/compiler/linkage.h"
10
#include "src/compiler/opcodes.h"
11
12
namespace
v8
{
13
namespace
internal {
14
namespace
compiler {
15
16
// Forward declarations.
17
class
CommonOperatorBuilder;
18
class
JSGraph;
19
class
MachineOperatorBuilder;
20
class
Linkage;
21
22
23
// Lowers JS-level operators to runtime and IC calls in the "generic" case.
24
class
JSGenericLowering
final :
public
Reducer
{
25
public
:
26
explicit
JSGenericLowering
(
JSGraph
* jsgraph);
27
~
JSGenericLowering
()
final
;
28
29
const
char
* reducer_name()
const override
{
return
"JSGenericLowering"
; }
30
31
Reduction
Reduce(
Node
* node)
final
;
32
33
protected
:
34
#define DECLARE_LOWER(x) void Lower##x(Node* node);
35
// Dispatched depending on opcode.
36
JS_OP_LIST(DECLARE_LOWER)
37
#undef DECLARE_LOWER
38
39
// Helpers to replace existing nodes with a generic call.
40
void
ReplaceWithStubCall(
Node
* node,
Callable
c,
CallDescriptor::Flags
flags);
41
void
ReplaceWithStubCall(
Node
* node,
Callable
c,
CallDescriptor::Flags
flags,
42
Operator::Properties
properties);
43
void
ReplaceWithRuntimeCall(
Node
* node, Runtime::FunctionId f,
int
args = -1);
44
45
Zone
* zone()
const
;
46
Isolate
* isolate()
const
;
47
JSGraph
* jsgraph()
const
{
return
jsgraph_; }
48
Graph
* graph()
const
;
49
CommonOperatorBuilder
* common()
const
;
50
MachineOperatorBuilder
* machine()
const
;
51
52
private
:
53
JSGraph
*
const
jsgraph_;
54
};
55
56
}
// namespace compiler
57
}
// namespace internal
58
}
// namespace v8
59
60
#endif // V8_COMPILER_JS_GENERIC_LOWERING_H_
v8::base::Flags< Flag >
v8::internal::compiler::JSGraph
Definition:
js-graph.h:26
v8::internal::compiler::Reducer
Definition:
graph-reducer.h:47
v8
Definition:
libplatform.h:13
v8::internal::Zone
Definition:
zone.h:42
v8::internal::compiler::MachineOperatorBuilder
Definition:
machine-operator.h:118
v8::internal::Isolate
Definition:
isolate.h:516
v8::internal::compiler::Graph
Definition:
graph.h:35
v8::internal::Callable
Definition:
callable.h:17
v8::internal::compiler::Node
Definition:
node.h:43
v8::internal::compiler::CommonOperatorBuilder
Definition:
common-operator.h:445
v8::internal::compiler::Reduction
Definition:
graph-reducer.h:30
v8::internal::compiler::JSGenericLowering
Definition:
js-generic-lowering.h:24
v8
src
compiler
js-generic-lowering.h
Generated on Tue Dec 25 2018 14:38:38 by
1.8.14