Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: src/compiler/js-inlining.h

Issue 1135483004: [turbofan] Add AdvancedReducer::ReplaceWithValue() method and convert JSInlining to an AdvancedRedu… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/graph-reducer.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_JS_INLINING_H_ 5 #ifndef V8_COMPILER_JS_INLINING_H_
6 #define V8_COMPILER_JS_INLINING_H_ 6 #define V8_COMPILER_JS_INLINING_H_
7 7
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 class JSCallFunctionAccessor; 15 class JSCallFunctionAccessor;
16 struct Inlinee;
16 17
17 class JSInliner final : public Reducer { 18 class JSInliner final : public AdvancedReducer {
18 public: 19 public:
19 enum Mode { kBuiltinsInlining, kGeneralInlining }; 20 enum Mode { kBuiltinsInlining, kGeneralInlining };
20 21
21 JSInliner(Mode mode, Zone* local_zone, CompilationInfo* info, 22 JSInliner(Editor* editor, Mode mode, Zone* local_zone, CompilationInfo* info,
22 JSGraph* jsgraph) 23 JSGraph* jsgraph)
23 : mode_(mode), local_zone_(local_zone), info_(info), jsgraph_(jsgraph) {} 24 : AdvancedReducer(editor),
25 mode_(mode),
26 local_zone_(local_zone),
27 info_(info),
28 jsgraph_(jsgraph) {}
24 29
25 Reduction Reduce(Node* node) final; 30 Reduction Reduce(Node* node) final;
26 31
27 private: 32 private:
28 Mode const mode_; 33 Mode const mode_;
29 Zone* local_zone_; 34 Zone* local_zone_;
30 CompilationInfo* info_; 35 CompilationInfo* info_;
31 JSGraph* jsgraph_; 36 JSGraph* jsgraph_;
32 37
33 Node* CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor* call, 38 Node* CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor* call,
34 Handle<JSFunction> jsfunction, 39 Handle<JSFunction> jsfunction,
35 Zone* temp_zone); 40 Zone* temp_zone);
36 void AddClosureToFrameState(Node* frame_state, Handle<JSFunction> jsfunction); 41 void AddClosureToFrameState(Node* frame_state, Handle<JSFunction> jsfunction);
42
43 Reduction InlineCall(Node* call, Inlinee& inlinee);
37 }; 44 };
38 45
39 } // namespace compiler 46 } // namespace compiler
40 } // namespace internal 47 } // namespace internal
41 } // namespace v8 48 } // namespace v8
42 49
43 #endif // V8_COMPILER_JS_INLINING_H_ 50 #endif // V8_COMPILER_JS_INLINING_H_
OLDNEW
« no previous file with comments | « src/compiler/graph-reducer.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698