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 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3215 if (expr->op() == Token::INC) { | 3215 if (expr->op() == Token::INC) { |
3216 __ sub(eax, Immediate(Smi::FromInt(1))); | 3216 __ sub(eax, Immediate(Smi::FromInt(1))); |
3217 } else { | 3217 } else { |
3218 __ add(eax, Immediate(Smi::FromInt(1))); | 3218 __ add(eax, Immediate(Smi::FromInt(1))); |
3219 } | 3219 } |
3220 __ jmp(&stub_call, Label::kNear); | 3220 __ jmp(&stub_call, Label::kNear); |
3221 __ bind(&slow); | 3221 __ bind(&slow); |
3222 } | 3222 } |
3223 | 3223 |
3224 // Convert old value into a number. | 3224 // Convert old value into a number. |
3225 ToNumberStub convert_stub(isolate()); | 3225 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); |
3226 __ CallStub(&convert_stub); | |
3227 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); | 3226 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
3228 | 3227 |
3229 // Save result for postfix expressions. | 3228 // Save result for postfix expressions. |
3230 if (expr->is_postfix()) { | 3229 if (expr->is_postfix()) { |
3231 if (!context()->IsEffect()) { | 3230 if (!context()->IsEffect()) { |
3232 // Save the result on the stack. If we have a named or keyed property | 3231 // Save the result on the stack. If we have a named or keyed property |
3233 // we store the result under the receiver that is currently on top | 3232 // we store the result under the receiver that is currently on top |
3234 // of the stack. | 3233 // of the stack. |
3235 switch (assign_type) { | 3234 switch (assign_type) { |
3236 case VARIABLE: | 3235 case VARIABLE: |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3710 isolate->builtins()->OnStackReplacement()->entry(), | 3709 isolate->builtins()->OnStackReplacement()->entry(), |
3711 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3710 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3712 return ON_STACK_REPLACEMENT; | 3711 return ON_STACK_REPLACEMENT; |
3713 } | 3712 } |
3714 | 3713 |
3715 | 3714 |
3716 } // namespace internal | 3715 } // namespace internal |
3717 } // namespace v8 | 3716 } // namespace v8 |
3718 | 3717 |
3719 #endif // V8_TARGET_ARCH_X87 | 3718 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |