OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |