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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3171 } else { | 3171 } else { |
3172 __ SmiSubConstant(rax, rax, Smi::FromInt(1), constraints, &done, | 3172 __ SmiSubConstant(rax, rax, Smi::FromInt(1), constraints, &done, |
3173 Label::kNear); | 3173 Label::kNear); |
3174 } | 3174 } |
3175 __ jmp(&stub_call, Label::kNear); | 3175 __ jmp(&stub_call, Label::kNear); |
3176 __ bind(&slow); | 3176 __ bind(&slow); |
3177 } | 3177 } |
3178 | 3178 |
3179 // Convert old value into a number. | 3179 // Convert old value into a number. |
3180 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); | 3180 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); |
| 3181 RestoreContext(); |
3181 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); | 3182 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); |
3182 | 3183 |
3183 // Save result for postfix expressions. | 3184 // Save result for postfix expressions. |
3184 if (expr->is_postfix()) { | 3185 if (expr->is_postfix()) { |
3185 if (!context()->IsEffect()) { | 3186 if (!context()->IsEffect()) { |
3186 // Save the result on the stack. If we have a named or keyed property | 3187 // Save the result on the stack. If we have a named or keyed property |
3187 // we store the result under the receiver that is currently on top | 3188 // we store the result under the receiver that is currently on top |
3188 // of the stack. | 3189 // of the stack. |
3189 switch (assign_type) { | 3190 switch (assign_type) { |
3190 case VARIABLE: | 3191 case VARIABLE: |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3665 DCHECK_EQ( | 3666 DCHECK_EQ( |
3666 isolate->builtins()->OnStackReplacement()->entry(), | 3667 isolate->builtins()->OnStackReplacement()->entry(), |
3667 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3668 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3668 return ON_STACK_REPLACEMENT; | 3669 return ON_STACK_REPLACEMENT; |
3669 } | 3670 } |
3670 | 3671 |
3671 } // namespace internal | 3672 } // namespace internal |
3672 } // namespace v8 | 3673 } // namespace v8 |
3673 | 3674 |
3674 #endif // V8_TARGET_ARCH_X64 | 3675 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |