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

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

Issue 480863002: Refactor ChangeLowering class to avoid template specialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/js-graph.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_GRAPH_H_ 5 #ifndef V8_COMPILER_JS_GRAPH_H_
6 #define V8_COMPILER_JS_GRAPH_H_ 6 #define V8_COMPILER_JS_GRAPH_H_
7 7
8 #include "src/compiler/common-node-cache.h" 8 #include "src/compiler/common-node-cache.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 12 matching lines...) Expand all
23 class JSGraph : public ZoneObject { 23 class JSGraph : public ZoneObject {
24 public: 24 public:
25 JSGraph(Graph* graph, CommonOperatorBuilder* common, Typer* typer) 25 JSGraph(Graph* graph, CommonOperatorBuilder* common, Typer* typer)
26 : graph_(graph), 26 : graph_(graph),
27 common_(common), 27 common_(common),
28 javascript_(zone()), 28 javascript_(zone()),
29 typer_(typer), 29 typer_(typer),
30 cache_(zone()) {} 30 cache_(zone()) {}
31 31
32 // Canonicalized global constants. 32 // Canonicalized global constants.
33 Node* CEntryStubConstant();
33 Node* UndefinedConstant(); 34 Node* UndefinedConstant();
34 Node* TheHoleConstant(); 35 Node* TheHoleConstant();
35 Node* TrueConstant(); 36 Node* TrueConstant();
36 Node* FalseConstant(); 37 Node* FalseConstant();
37 Node* NullConstant(); 38 Node* NullConstant();
38 Node* ZeroConstant(); 39 Node* ZeroConstant();
39 Node* OneConstant(); 40 Node* OneConstant();
40 Node* NaNConstant(); 41 Node* NaNConstant();
41 42
42 // Creates a HeapConstant node, possibly canonicalized, without inspecting the 43 // Creates a HeapConstant node, possibly canonicalized, without inspecting the
(...skipping 26 matching lines...) Expand all
69 70
70 Node* SmiConstant(int32_t immediate) { 71 Node* SmiConstant(int32_t immediate) {
71 DCHECK(Smi::IsValid(immediate)); 72 DCHECK(Smi::IsValid(immediate));
72 return Constant(immediate); 73 return Constant(immediate);
73 } 74 }
74 75
75 JSOperatorBuilder* javascript() { return &javascript_; } 76 JSOperatorBuilder* javascript() { return &javascript_; }
76 CommonOperatorBuilder* common() { return common_; } 77 CommonOperatorBuilder* common() { return common_; }
77 Graph* graph() { return graph_; } 78 Graph* graph() { return graph_; }
78 Zone* zone() { return graph()->zone(); } 79 Zone* zone() { return graph()->zone(); }
80 Isolate* isolate() { return zone()->isolate(); }
79 81
80 private: 82 private:
81 Graph* graph_; 83 Graph* graph_;
82 CommonOperatorBuilder* common_; 84 CommonOperatorBuilder* common_;
83 JSOperatorBuilder javascript_; 85 JSOperatorBuilder javascript_;
84 Typer* typer_; 86 Typer* typer_;
85 87
88 SetOncePointer<Node> c_entry_stub_constant_;
86 SetOncePointer<Node> undefined_constant_; 89 SetOncePointer<Node> undefined_constant_;
87 SetOncePointer<Node> the_hole_constant_; 90 SetOncePointer<Node> the_hole_constant_;
88 SetOncePointer<Node> true_constant_; 91 SetOncePointer<Node> true_constant_;
89 SetOncePointer<Node> false_constant_; 92 SetOncePointer<Node> false_constant_;
90 SetOncePointer<Node> null_constant_; 93 SetOncePointer<Node> null_constant_;
91 SetOncePointer<Node> zero_constant_; 94 SetOncePointer<Node> zero_constant_;
92 SetOncePointer<Node> one_constant_; 95 SetOncePointer<Node> one_constant_;
93 SetOncePointer<Node> nan_constant_; 96 SetOncePointer<Node> nan_constant_;
94 97
95 CommonNodeCache cache_; 98 CommonNodeCache cache_;
96 99
97 Node* ImmovableHeapConstant(Handle<Object> value); 100 Node* ImmovableHeapConstant(Handle<Object> value);
98 Node* NumberConstant(double value); 101 Node* NumberConstant(double value);
99 Node* NewNode(Operator* op); 102 Node* NewNode(Operator* op);
100 103
101 Factory* factory() { return zone()->isolate()->factory(); } 104 Factory* factory() { return isolate()->factory(); }
102 }; 105 };
103 } // namespace compiler 106 } // namespace compiler
104 } // namespace internal 107 } // namespace internal
105 } // namespace v8 108 } // namespace v8
106 109
107 #endif 110 #endif
OLDNEW
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698