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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4600 if (expr->op() == Token::INC) { | 4600 if (expr->op() == Token::INC) { |
4601 __ sub(eax, Immediate(Smi::FromInt(1))); | 4601 __ sub(eax, Immediate(Smi::FromInt(1))); |
4602 } else { | 4602 } else { |
4603 __ add(eax, Immediate(Smi::FromInt(1))); | 4603 __ add(eax, Immediate(Smi::FromInt(1))); |
4604 } | 4604 } |
4605 __ jmp(&stub_call, Label::kNear); | 4605 __ jmp(&stub_call, Label::kNear); |
4606 __ bind(&slow); | 4606 __ bind(&slow); |
4607 } | 4607 } |
4608 ToNumberStub convert_stub(isolate()); | 4608 ToNumberStub convert_stub(isolate()); |
4609 __ CallStub(&convert_stub); | 4609 __ CallStub(&convert_stub); |
| 4610 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
4610 | 4611 |
4611 // Save result for postfix expressions. | 4612 // Save result for postfix expressions. |
4612 if (expr->is_postfix()) { | 4613 if (expr->is_postfix()) { |
4613 if (!context()->IsEffect()) { | 4614 if (!context()->IsEffect()) { |
4614 // Save the result on the stack. If we have a named or keyed property | 4615 // Save the result on the stack. If we have a named or keyed property |
4615 // we store the result under the receiver that is currently on top | 4616 // we store the result under the receiver that is currently on top |
4616 // of the stack. | 4617 // of the stack. |
4617 switch (assign_type) { | 4618 switch (assign_type) { |
4618 case VARIABLE: | 4619 case VARIABLE: |
4619 __ push(eax); | 4620 __ push(eax); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5162 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5163 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5163 Assembler::target_address_at(call_target_address, | 5164 Assembler::target_address_at(call_target_address, |
5164 unoptimized_code)); | 5165 unoptimized_code)); |
5165 return OSR_AFTER_STACK_CHECK; | 5166 return OSR_AFTER_STACK_CHECK; |
5166 } | 5167 } |
5167 | 5168 |
5168 | 5169 |
5169 } } // namespace v8::internal | 5170 } } // namespace v8::internal |
5170 | 5171 |
5171 #endif // V8_TARGET_ARCH_X87 | 5172 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |