| 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/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 old_value = NewNode(javascript()->LoadProperty(pair), object, key); | 1481 old_value = NewNode(javascript()->LoadProperty(pair), object, key); |
| 1482 PrepareFrameState(old_value, property->LoadId(), | 1482 PrepareFrameState(old_value, property->LoadId(), |
| 1483 OutputFrameStateCombine::Push()); | 1483 OutputFrameStateCombine::Push()); |
| 1484 stack_depth = 2; | 1484 stack_depth = 2; |
| 1485 break; | 1485 break; |
| 1486 } | 1486 } |
| 1487 } | 1487 } |
| 1488 | 1488 |
| 1489 // Convert old value into a number. | 1489 // Convert old value into a number. |
| 1490 old_value = NewNode(javascript()->ToNumber(), old_value); | 1490 old_value = NewNode(javascript()->ToNumber(), old_value); |
| 1491 PrepareFrameState(old_value, expr->ToNumberId(), |
| 1492 OutputFrameStateCombine::Push()); |
| 1491 | 1493 |
| 1492 // Save result for postfix expressions at correct stack depth. | 1494 // Save result for postfix expressions at correct stack depth. |
| 1493 if (is_postfix) environment()->Poke(stack_depth, old_value); | 1495 if (is_postfix) environment()->Poke(stack_depth, old_value); |
| 1494 | 1496 |
| 1495 // Create node to perform +1/-1 operation. | 1497 // Create node to perform +1/-1 operation. |
| 1496 Node* value = | 1498 Node* value = |
| 1497 BuildBinaryOp(old_value, jsgraph()->OneConstant(), expr->binary_op()); | 1499 BuildBinaryOp(old_value, jsgraph()->OneConstant(), expr->binary_op()); |
| 1498 // TODO(jarin) Insert proper bailout id here (will need to change | 1500 // TODO(jarin) Insert proper bailout id here (will need to change |
| 1499 // full code generator). | 1501 // full code generator). |
| 1500 PrepareFrameState(value, BailoutId::None()); | 1502 PrepareFrameState(value, BailoutId::None()); |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 | 2237 |
| 2236 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2238 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
| 2237 IterationStatement* stmt) { | 2239 IterationStatement* stmt) { |
| 2238 if (loop_assignment_analysis_ == NULL) return NULL; | 2240 if (loop_assignment_analysis_ == NULL) return NULL; |
| 2239 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2241 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
| 2240 } | 2242 } |
| 2241 | 2243 |
| 2242 } // namespace compiler | 2244 } // namespace compiler |
| 2243 } // namespace internal | 2245 } // namespace internal |
| 2244 } // namespace v8 | 2246 } // namespace v8 |
| OLD | NEW |