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

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

Issue 1155313008: [turbofan] First steps towards optimizing for-in loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/js-graph.h ('k') | src/compiler/js-typed-lowering.h » ('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 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 Node* JSGraph::ExternalConstant(ExternalReference reference) { 177 Node* JSGraph::ExternalConstant(ExternalReference reference) {
178 Node** loc = cache_.FindExternalConstant(reference); 178 Node** loc = cache_.FindExternalConstant(reference);
179 if (*loc == NULL) { 179 if (*loc == NULL) {
180 *loc = graph()->NewNode(common()->ExternalConstant(reference)); 180 *loc = graph()->NewNode(common()->ExternalConstant(reference));
181 } 181 }
182 return *loc; 182 return *loc;
183 } 183 }
184 184
185 185
186 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) {
187 return ExternalConstant(ExternalReference(function_id, isolate()));
188 }
189
190
186 Node* JSGraph::EmptyFrameState() { 191 Node* JSGraph::EmptyFrameState() {
187 Node* empty_frame_state = cached_nodes_[kEmptyFrameState]; 192 Node* empty_frame_state = cached_nodes_[kEmptyFrameState];
188 if (!empty_frame_state || empty_frame_state->IsDead()) { 193 if (!empty_frame_state || empty_frame_state->IsDead()) {
189 Node* state_values = graph()->NewNode(common()->StateValues(0)); 194 Node* state_values = graph()->NewNode(common()->StateValues(0));
190 empty_frame_state = graph()->NewNode( 195 empty_frame_state = graph()->NewNode(
191 common()->FrameState(JS_FRAME, BailoutId::None(), 196 common()->FrameState(JS_FRAME, BailoutId::None(),
192 OutputFrameStateCombine::Ignore()), 197 OutputFrameStateCombine::Ignore()),
193 state_values, state_values, state_values, NoContextConstant(), 198 state_values, state_values, state_values, NoContextConstant(),
194 UndefinedConstant(), graph()->start()); 199 UndefinedConstant(), graph()->start());
195 cached_nodes_[kEmptyFrameState] = empty_frame_state; 200 cached_nodes_[kEmptyFrameState] = empty_frame_state;
(...skipping 12 matching lines...) Expand all
208 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { 213 for (size_t i = 0; i < arraysize(cached_nodes_); i++) {
209 if (Node* node = cached_nodes_[i]) { 214 if (Node* node = cached_nodes_[i]) {
210 if (!node->IsDead()) nodes->push_back(node); 215 if (!node->IsDead()) nodes->push_back(node);
211 } 216 }
212 } 217 }
213 } 218 }
214 219
215 } // namespace compiler 220 } // namespace compiler
216 } // namespace internal 221 } // namespace internal
217 } // namespace v8 222 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698