| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index ec98dc64a2d72495ba0a979ed8bd7b8322b2b953..617a96fba6f144cc39b6f9e2e8ca0c8dc74b035a 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -7274,14 +7274,15 @@ void HOptimizedGraphBuilder::HandlePropertyAssignment(Assignment* expr) {
|
| // Keyed store.
|
| CHECK_ALIVE(VisitForValue(prop->key()));
|
| CHECK_ALIVE(VisitForValue(expr->value()));
|
| - HValue* value = Pop();
|
| - HValue* key = Pop();
|
| - HValue* object = Pop();
|
| + HValue* value = environment()->ExpressionStackAt(0);
|
| + HValue* key = environment()->ExpressionStackAt(1);
|
| + HValue* object = environment()->ExpressionStackAt(2);
|
| bool has_side_effects = false;
|
| HandleKeyedElementAccess(object, key, value, expr, expr->AssignmentId(),
|
| expr->position(),
|
| true, // is_store
|
| &has_side_effects);
|
| + Drop(3);
|
| Push(value);
|
| AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE);
|
| return ast_context()->ReturnValue(Pop());
|
| @@ -10013,7 +10014,7 @@ void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) {
|
| if (has_side_effects) AddSimulate(prop->LoadId(), REMOVABLE_SIMULATE);
|
|
|
| after = BuildIncrement(returns_original_input, expr);
|
| - input = Pop();
|
| + input = environment()->ExpressionStackAt(0);
|
|
|
| expr->RecordTypeFeedback(oracle(), zone());
|
| HandleKeyedElementAccess(obj, key, after, expr, expr->AssignmentId(),
|
| @@ -10021,10 +10022,10 @@ void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) {
|
| true, // is_store
|
| &has_side_effects);
|
|
|
| - // Drop the key from the bailout environment. Overwrite the receiver
|
| - // with the result of the operation, and the placeholder with the
|
| - // original value if necessary.
|
| - Drop(1);
|
| + // Drop the key and the original value from the bailout environment.
|
| + // Overwrite the receiver with the result of the operation, and the
|
| + // placeholder with the original value if necessary.
|
| + Drop(2);
|
| environment()->SetExpressionStackAt(0, after);
|
| if (returns_original_input) environment()->SetExpressionStackAt(1, input);
|
| ASSERT(has_side_effects); // Stores always have side effects.
|
|
|