V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
js-inlining.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
5
#ifndef V8_COMPILER_JS_INLINING_H_
6
#define V8_COMPILER_JS_INLINING_H_
7
8
#include "src/compiler/graph-reducer.h"
9
#include "src/compiler/js-graph.h"
10
11
namespace
v8
{
12
namespace
internal {
13
14
class
BailoutId;
15
class
OptimizedCompilationInfo;
16
17
namespace
compiler {
18
19
class
SourcePositionTable;
20
21
// The JSInliner provides the core graph inlining machinery. Note that this
22
// class only deals with the mechanics of how to inline one graph into another,
23
// heuristics that decide what and how much to inline are beyond its scope.
24
class
JSInliner
final :
public
AdvancedReducer
{
25
public
:
26
JSInliner
(
Editor
* editor,
Zone
* local_zone,
OptimizedCompilationInfo
* info,
27
JSGraph
* jsgraph,
JSHeapBroker
* broker,
28
SourcePositionTable
* source_positions)
29
:
AdvancedReducer
(editor),
30
local_zone_(local_zone),
31
info_(info),
32
jsgraph_(jsgraph),
33
broker_(broker),
34
source_positions_(source_positions) {}
35
36
const
char
* reducer_name()
const override
{
return
"JSInliner"
; }
37
38
// Reducer interface, eagerly inlines everything.
39
Reduction
Reduce(
Node
* node)
final
;
40
41
// Can be used by inlining heuristics or by testing code directly, without
42
// using the above generic reducer interface of the inlining machinery.
43
Reduction
ReduceJSCall(
Node
* node);
44
45
private
:
46
Zone
* zone()
const
{
return
local_zone_; }
47
CommonOperatorBuilder
* common()
const
;
48
JSOperatorBuilder
* javascript()
const
;
49
SimplifiedOperatorBuilder
* simplified()
const
;
50
Graph
* graph()
const
;
51
JSGraph
* jsgraph()
const
{
return
jsgraph_; }
52
// TODO(neis): Make heap broker a component of JSGraph?
53
JSHeapBroker
* broker()
const
{
return
broker_; }
54
Isolate
* isolate()
const
{
return
jsgraph_->isolate(); }
55
Handle<Context>
native_context()
const
;
56
57
Zone
*
const
local_zone_;
58
OptimizedCompilationInfo
* info_;
59
JSGraph
*
const
jsgraph_;
60
JSHeapBroker
*
const
broker_;
61
SourcePositionTable
*
const
source_positions_;
62
63
bool
DetermineCallTarget(
Node
* node,
64
Handle<SharedFunctionInfo>
& shared_info_out);
65
void
DetermineCallContext(
Node
* node,
Node
*& context_out,
66
Handle<FeedbackVector>
& feedback_vector_out);
67
68
Node
* CreateArtificialFrameState(
Node
* node,
Node
* outer_frame_state,
69
int
parameter_count,
BailoutId
bailout_id,
70
FrameStateType frame_state_type,
71
Handle<SharedFunctionInfo>
shared,
72
Node
* context =
nullptr
);
73
74
Reduction
InlineCall(
Node
* call,
Node
* new_target,
Node
* context,
75
Node
* frame_state,
Node
* start,
Node
* end,
76
Node
* exception_target,
77
const
NodeVector
& uncaught_subcalls);
78
};
79
80
}
// namespace compiler
81
}
// namespace internal
82
}
// namespace v8
83
84
#endif // V8_COMPILER_JS_INLINING_H_
v8::internal::compiler::JSGraph
Definition:
js-graph.h:26
v8::internal::compiler::SourcePositionTable
Definition:
compiler-source-position-table.h:17
v8
Definition:
libplatform.h:13
v8::internal::Handle
Definition:
accessors.h:19
v8::internal::Zone
Definition:
zone.h:42
v8::internal::compiler::AdvancedReducer::Editor
Definition:
graph-reducer.h:74
v8::internal::Isolate
Definition:
isolate.h:516
v8::internal::compiler::JSInliner
Definition:
js-inlining.h:24
v8::internal::compiler::Graph
Definition:
graph.h:35
v8::internal::BailoutId
Definition:
utils.h:1009
v8::internal::compiler::JSHeapBroker
Definition:
js-heap-broker.h:594
v8::internal::OptimizedCompilationInfo
Definition:
optimized-compilation-info.h:32
v8::internal::compiler::Node
Definition:
node.h:43
v8::internal::compiler::SimplifiedOperatorBuilder
Definition:
simplified-operator.h:531
v8::internal::compiler::JSOperatorBuilder
Definition:
js-operator.h:680
v8::internal::ZoneVector
Definition:
node-cache.h:17
v8::internal::compiler::CommonOperatorBuilder
Definition:
common-operator.h:445
v8::internal::compiler::Reduction
Definition:
graph-reducer.h:30
v8::internal::compiler::AdvancedReducer
Definition:
graph-reducer.h:71
v8
src
compiler
js-inlining.h
Generated on Tue Dec 25 2018 14:38:38 by
1.8.14