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

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

Issue 807693003: [turbofan] Unify custom node matchers. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Win64 Created 6 years 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 | « BUILD.gn ('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/base/macros.h"
9 #include "src/v8.h"
10 9
11 namespace v8 { 10 namespace v8 {
12 namespace internal { 11 namespace internal {
12
13 // Forward declarations.
14 class CompilationInfo;
15 template <typename>
16 class Handle;
17 class JSFunction;
18 class Zone;
19
20
13 namespace compiler { 21 namespace compiler {
14 22
15 class JSCallFunctionAccessor; 23 // Forward declarations.
24 class CommonOperatorBuilder;
25 class Graph;
26 class JSGraph;
27 class JSOperatorBuilder;
28 class MachineOperatorBuilder;
29 class Node;
16 30
17 class JSInliner { 31
32 class JSInliner FINAL {
18 public: 33 public:
19 JSInliner(Zone* local_zone, CompilationInfo* info, JSGraph* jsgraph) 34 JSInliner(CompilationInfo* info, JSGraph* jsgraph, Zone* zone)
20 : local_zone_(local_zone), info_(info), jsgraph_(jsgraph) {} 35 : info_(info), jsgraph_(jsgraph), zone_(zone) {}
21 36
22 void Inline(); 37 void Inline();
23 void TryInlineJSCall(Node* node); 38 void TryInlineJSCall(Node* node);
24 void TryInlineRuntimeCall(Node* node); 39 void TryInlineRuntimeCall(Node* node);
25 40
26 private: 41 private:
27 friend class InlinerVisitor; 42 template <typename InputIterator>
28 Zone* local_zone_; 43 Node* CreateArgumentsAdaptorFrameState(const Handle<JSFunction>& function,
29 CompilationInfo* info_; 44 InputIterator first,
30 JSGraph* jsgraph_; 45 InputIterator last, Node* frame_state);
31 46
32 Node* CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor* call, 47 Graph* graph() const;
33 Handle<JSFunction> jsfunction, 48 JSGraph* jsgraph() const { return jsgraph_; }
34 Zone* temp_zone); 49 CommonOperatorBuilder* common() const;
35 void AddClosureToFrameState(Node* frame_state, Handle<JSFunction> jsfunction); 50 JSOperatorBuilder* javascript() const;
36 static void UnifyReturn(Graph* graph); 51 MachineOperatorBuilder* machine() const;
52 Zone* zone() const { return zone_; }
53
54 CompilationInfo* const info_;
55 JSGraph* const jsgraph_;
56 Zone* const zone_;
37 }; 57 };
38 } 58
39 } 59 } // namespace compiler
40 } // namespace v8::internal::compiler 60 } // namespace internal
61 } // namespace v8
41 62
42 #endif // V8_COMPILER_JS_INLINING_H_ 63 #endif // V8_COMPILER_JS_INLINING_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698