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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1630523002: [turbofan] Switch JSForInPrepare to %ForInPrepare style. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/ast/ast.h ('k') | src/compiler/js-generic-lowering.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 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 Node* is_undefined_cond = NewNode(javascript()->StrictEqual(), object, 1324 Node* is_undefined_cond = NewNode(javascript()->StrictEqual(), object,
1325 jsgraph()->UndefinedConstant()); 1325 jsgraph()->UndefinedConstant());
1326 for_block.BreakWhen(is_undefined_cond, BranchHint::kFalse); 1326 for_block.BreakWhen(is_undefined_cond, BranchHint::kFalse);
1327 { 1327 {
1328 // Convert object to jsobject. 1328 // Convert object to jsobject.
1329 object = BuildToObject(object, stmt->ToObjectId()); 1329 object = BuildToObject(object, stmt->ToObjectId());
1330 environment()->Push(object); 1330 environment()->Push(object);
1331 1331
1332 // Prepare for-in cache. 1332 // Prepare for-in cache.
1333 Node* prepare = NewNode(javascript()->ForInPrepare(), object); 1333 Node* prepare = NewNode(javascript()->ForInPrepare(), object);
1334 PrepareFrameState(prepare, stmt->EnumId(), OutputFrameStateCombine::Push()); 1334 PrepareFrameState(prepare, stmt->PrepareId(),
1335 OutputFrameStateCombine::Push(3));
1335 Node* cache_type = NewNode(common()->Projection(0), prepare); 1336 Node* cache_type = NewNode(common()->Projection(0), prepare);
1336 Node* cache_array = NewNode(common()->Projection(1), prepare); 1337 Node* cache_array = NewNode(common()->Projection(1), prepare);
1337 Node* cache_length = NewNode(common()->Projection(2), prepare); 1338 Node* cache_length = NewNode(common()->Projection(2), prepare);
1338 1339
1339 // Construct the rest of the environment. 1340 // Construct the rest of the environment.
1340 environment()->Push(cache_type); 1341 environment()->Push(cache_type);
1341 environment()->Push(cache_array); 1342 environment()->Push(cache_array);
1342 environment()->Push(cache_length); 1343 environment()->Push(cache_length);
1343 environment()->Push(jsgraph()->ZeroConstant()); 1344 environment()->Push(jsgraph()->ZeroConstant());
1344 1345
(...skipping 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
4338 // Phi does not exist yet, introduce one. 4339 // Phi does not exist yet, introduce one.
4339 value = NewPhi(inputs, value, control); 4340 value = NewPhi(inputs, value, control);
4340 value->ReplaceInput(inputs - 1, other); 4341 value->ReplaceInput(inputs - 1, other);
4341 } 4342 }
4342 return value; 4343 return value;
4343 } 4344 }
4344 4345
4345 } // namespace compiler 4346 } // namespace compiler
4346 } // namespace internal 4347 } // namespace internal
4347 } // namespace v8 4348 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698