| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 __ sub(eax, Immediate(Smi::FromInt(1))); | 3172 __ sub(eax, Immediate(Smi::FromInt(1))); |
| 3173 } else { | 3173 } else { |
| 3174 __ add(eax, Immediate(Smi::FromInt(1))); | 3174 __ add(eax, Immediate(Smi::FromInt(1))); |
| 3175 } | 3175 } |
| 3176 __ jmp(&stub_call, Label::kNear); | 3176 __ jmp(&stub_call, Label::kNear); |
| 3177 __ bind(&slow); | 3177 __ bind(&slow); |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 // Convert old value into a number. | 3180 // Convert old value into a number. |
| 3181 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); | 3181 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); |
| 3182 RestoreContext(); |
| 3182 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); | 3183 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
| 3183 | 3184 |
| 3184 // Save result for postfix expressions. | 3185 // Save result for postfix expressions. |
| 3185 if (expr->is_postfix()) { | 3186 if (expr->is_postfix()) { |
| 3186 if (!context()->IsEffect()) { | 3187 if (!context()->IsEffect()) { |
| 3187 // Save the result on the stack. If we have a named or keyed property | 3188 // Save the result on the stack. If we have a named or keyed property |
| 3188 // we store the result under the receiver that is currently on top | 3189 // we store the result under the receiver that is currently on top |
| 3189 // of the stack. | 3190 // of the stack. |
| 3190 switch (assign_type) { | 3191 switch (assign_type) { |
| 3191 case VARIABLE: | 3192 case VARIABLE: |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3667 isolate->builtins()->OnStackReplacement()->entry(), | 3668 isolate->builtins()->OnStackReplacement()->entry(), |
| 3668 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3669 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3669 return ON_STACK_REPLACEMENT; | 3670 return ON_STACK_REPLACEMENT; |
| 3670 } | 3671 } |
| 3671 | 3672 |
| 3672 | 3673 |
| 3673 } // namespace internal | 3674 } // namespace internal |
| 3674 } // namespace v8 | 3675 } // namespace v8 |
| 3675 | 3676 |
| 3676 #endif // V8_TARGET_ARCH_X87 | 3677 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |