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

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

Issue 656103002: Add JSGraph::GetCachedNodes and NodeCache::GetCachedNodes. These routines are necessary in the dead… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return Constant(immediate); 98 return Constant(immediate);
99 } 99 }
100 100
101 JSOperatorBuilder* javascript() { return javascript_; } 101 JSOperatorBuilder* javascript() { return javascript_; }
102 CommonOperatorBuilder* common() { return common_; } 102 CommonOperatorBuilder* common() { return common_; }
103 MachineOperatorBuilder* machine() { return machine_; } 103 MachineOperatorBuilder* machine() { return machine_; }
104 Graph* graph() { return graph_; } 104 Graph* graph() { return graph_; }
105 Zone* zone() { return graph()->zone(); } 105 Zone* zone() { return graph()->zone(); }
106 Isolate* isolate() { return zone()->isolate(); } 106 Isolate* isolate() { return zone()->isolate(); }
107 107
108 void GetCachedNodes(NodeVector* nodes);
109
108 private: 110 private:
109 Graph* graph_; 111 Graph* graph_;
110 CommonOperatorBuilder* common_; 112 CommonOperatorBuilder* common_;
111 JSOperatorBuilder* javascript_; 113 JSOperatorBuilder* javascript_;
112 Typer* typer_; 114 Typer* typer_;
113 MachineOperatorBuilder* machine_; 115 MachineOperatorBuilder* machine_;
114 116
117 // TODO(titzer): make this into a simple array.
115 SetOncePointer<Node> c_entry_stub_constant_; 118 SetOncePointer<Node> c_entry_stub_constant_;
116 SetOncePointer<Node> undefined_constant_; 119 SetOncePointer<Node> undefined_constant_;
117 SetOncePointer<Node> the_hole_constant_; 120 SetOncePointer<Node> the_hole_constant_;
118 SetOncePointer<Node> true_constant_; 121 SetOncePointer<Node> true_constant_;
119 SetOncePointer<Node> false_constant_; 122 SetOncePointer<Node> false_constant_;
120 SetOncePointer<Node> null_constant_; 123 SetOncePointer<Node> null_constant_;
121 SetOncePointer<Node> zero_constant_; 124 SetOncePointer<Node> zero_constant_;
122 SetOncePointer<Node> one_constant_; 125 SetOncePointer<Node> one_constant_;
123 SetOncePointer<Node> nan_constant_; 126 SetOncePointer<Node> nan_constant_;
124 127
125 CommonNodeCache cache_; 128 CommonNodeCache cache_;
126 129
127 Node* ImmovableHeapConstant(Handle<HeapObject> value); 130 Node* ImmovableHeapConstant(Handle<HeapObject> value);
128 Node* NumberConstant(double value); 131 Node* NumberConstant(double value);
129 Node* NewNode(const Operator* op); 132 Node* NewNode(const Operator* op);
130 133
131 Factory* factory() { return isolate()->factory(); } 134 Factory* factory() { return isolate()->factory(); }
132 }; 135 };
133 136
134 } // namespace compiler 137 } // namespace compiler
135 } // namespace internal 138 } // namespace internal
136 } // namespace v8 139 } // namespace v8
137 140
138 #endif 141 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698