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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4614 if (expr->op() == Token::INC) { | 4614 if (expr->op() == Token::INC) { |
4615 __ sub(eax, Immediate(Smi::FromInt(1))); | 4615 __ sub(eax, Immediate(Smi::FromInt(1))); |
4616 } else { | 4616 } else { |
4617 __ add(eax, Immediate(Smi::FromInt(1))); | 4617 __ add(eax, Immediate(Smi::FromInt(1))); |
4618 } | 4618 } |
4619 __ jmp(&stub_call, Label::kNear); | 4619 __ jmp(&stub_call, Label::kNear); |
4620 __ bind(&slow); | 4620 __ bind(&slow); |
4621 } | 4621 } |
4622 ToNumberStub convert_stub(isolate()); | 4622 ToNumberStub convert_stub(isolate()); |
4623 __ CallStub(&convert_stub); | 4623 __ CallStub(&convert_stub); |
| 4624 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
4624 | 4625 |
4625 // Save result for postfix expressions. | 4626 // Save result for postfix expressions. |
4626 if (expr->is_postfix()) { | 4627 if (expr->is_postfix()) { |
4627 if (!context()->IsEffect()) { | 4628 if (!context()->IsEffect()) { |
4628 // Save the result on the stack. If we have a named or keyed property | 4629 // Save the result on the stack. If we have a named or keyed property |
4629 // we store the result under the receiver that is currently on top | 4630 // we store the result under the receiver that is currently on top |
4630 // of the stack. | 4631 // of the stack. |
4631 switch (assign_type) { | 4632 switch (assign_type) { |
4632 case VARIABLE: | 4633 case VARIABLE: |
4633 __ push(eax); | 4634 __ push(eax); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5176 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5177 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5177 Assembler::target_address_at(call_target_address, | 5178 Assembler::target_address_at(call_target_address, |
5178 unoptimized_code)); | 5179 unoptimized_code)); |
5179 return OSR_AFTER_STACK_CHECK; | 5180 return OSR_AFTER_STACK_CHECK; |
5180 } | 5181 } |
5181 | 5182 |
5182 | 5183 |
5183 } } // namespace v8::internal | 5184 } } // namespace v8::internal |
5184 | 5185 |
5185 #endif // V8_TARGET_ARCH_IA32 | 5186 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |