| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3223 if (expr->op() == Token::INC) { | 3223 if (expr->op() == Token::INC) { |
| 3224 __ sub(eax, Immediate(Smi::FromInt(1))); | 3224 __ sub(eax, Immediate(Smi::FromInt(1))); |
| 3225 } else { | 3225 } else { |
| 3226 __ add(eax, Immediate(Smi::FromInt(1))); | 3226 __ add(eax, Immediate(Smi::FromInt(1))); |
| 3227 } | 3227 } |
| 3228 __ jmp(&stub_call, Label::kNear); | 3228 __ jmp(&stub_call, Label::kNear); |
| 3229 __ bind(&slow); | 3229 __ bind(&slow); |
| 3230 } | 3230 } |
| 3231 | 3231 |
| 3232 // Convert old value into a number. | 3232 // Convert old value into a number. |
| 3233 ToNumberStub convert_stub(isolate()); | 3233 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); |
| 3234 __ CallStub(&convert_stub); | |
| 3235 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); | 3234 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
| 3236 | 3235 |
| 3237 // Save result for postfix expressions. | 3236 // Save result for postfix expressions. |
| 3238 if (expr->is_postfix()) { | 3237 if (expr->is_postfix()) { |
| 3239 if (!context()->IsEffect()) { | 3238 if (!context()->IsEffect()) { |
| 3240 // Save the result on the stack. If we have a named or keyed property | 3239 // Save the result on the stack. If we have a named or keyed property |
| 3241 // we store the result under the receiver that is currently on top | 3240 // we store the result under the receiver that is currently on top |
| 3242 // of the stack. | 3241 // of the stack. |
| 3243 switch (assign_type) { | 3242 switch (assign_type) { |
| 3244 case VARIABLE: | 3243 case VARIABLE: |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3718 isolate->builtins()->OnStackReplacement()->entry(), | 3717 isolate->builtins()->OnStackReplacement()->entry(), |
| 3719 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3718 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3720 return ON_STACK_REPLACEMENT; | 3719 return ON_STACK_REPLACEMENT; |
| 3721 } | 3720 } |
| 3722 | 3721 |
| 3723 | 3722 |
| 3724 } // namespace internal | 3723 } // namespace internal |
| 3725 } // namespace v8 | 3724 } // namespace v8 |
| 3726 | 3725 |
| 3727 #endif // V8_TARGET_ARCH_IA32 | 3726 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |