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 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3204 if (expr->op() == Token::INC) { | 3204 if (expr->op() == Token::INC) { |
3205 __ sub(eax, Immediate(Smi::FromInt(1))); | 3205 __ sub(eax, Immediate(Smi::FromInt(1))); |
3206 } else { | 3206 } else { |
3207 __ add(eax, Immediate(Smi::FromInt(1))); | 3207 __ add(eax, Immediate(Smi::FromInt(1))); |
3208 } | 3208 } |
3209 __ jmp(&stub_call, Label::kNear); | 3209 __ jmp(&stub_call, Label::kNear); |
3210 __ bind(&slow); | 3210 __ bind(&slow); |
3211 } | 3211 } |
3212 | 3212 |
3213 // Convert old value into a number. | 3213 // Convert old value into a number. |
3214 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); | 3214 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); |
3215 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); | 3215 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
3216 | 3216 |
3217 // Save result for postfix expressions. | 3217 // Save result for postfix expressions. |
3218 if (expr->is_postfix()) { | 3218 if (expr->is_postfix()) { |
3219 if (!context()->IsEffect()) { | 3219 if (!context()->IsEffect()) { |
3220 // Save the result on the stack. If we have a named or keyed property | 3220 // Save the result on the stack. If we have a named or keyed property |
3221 // we store the result under the receiver that is currently on top | 3221 // we store the result under the receiver that is currently on top |
3222 // of the stack. | 3222 // of the stack. |
3223 switch (assign_type) { | 3223 switch (assign_type) { |
3224 case VARIABLE: | 3224 case VARIABLE: |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3698 isolate->builtins()->OnStackReplacement()->entry(), | 3698 isolate->builtins()->OnStackReplacement()->entry(), |
3699 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3699 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3700 return ON_STACK_REPLACEMENT; | 3700 return ON_STACK_REPLACEMENT; |
3701 } | 3701 } |
3702 | 3702 |
3703 | 3703 |
3704 } // namespace internal | 3704 } // namespace internal |
3705 } // namespace v8 | 3705 } // namespace v8 |
3706 | 3706 |
3707 #endif // V8_TARGET_ARCH_X87 | 3707 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |