Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.cc

Issue 2153783002: [fullcode] Restore context after calling ToNumber builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after
3180 __ sub(eax, Immediate(Smi::FromInt(1))); 3180 __ sub(eax, Immediate(Smi::FromInt(1)));
3181 } else { 3181 } else {
3182 __ add(eax, Immediate(Smi::FromInt(1))); 3182 __ add(eax, Immediate(Smi::FromInt(1)));
3183 } 3183 }
3184 __ jmp(&stub_call, Label::kNear); 3184 __ jmp(&stub_call, Label::kNear);
3185 __ bind(&slow); 3185 __ bind(&slow);
3186 } 3186 }
3187 3187
3188 // Convert old value into a number. 3188 // Convert old value into a number.
3189 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); 3189 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
3190 RestoreContext();
3190 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); 3191 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER);
3191 3192
3192 // Save result for postfix expressions. 3193 // Save result for postfix expressions.
3193 if (expr->is_postfix()) { 3194 if (expr->is_postfix()) {
3194 if (!context()->IsEffect()) { 3195 if (!context()->IsEffect()) {
3195 // Save the result on the stack. If we have a named or keyed property 3196 // Save the result on the stack. If we have a named or keyed property
3196 // we store the result under the receiver that is currently on top 3197 // we store the result under the receiver that is currently on top
3197 // of the stack. 3198 // of the stack.
3198 switch (assign_type) { 3199 switch (assign_type) {
3199 case VARIABLE: 3200 case VARIABLE:
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 isolate->builtins()->OnStackReplacement()->entry(), 3676 isolate->builtins()->OnStackReplacement()->entry(),
3676 Assembler::target_address_at(call_target_address, unoptimized_code)); 3677 Assembler::target_address_at(call_target_address, unoptimized_code));
3677 return ON_STACK_REPLACEMENT; 3678 return ON_STACK_REPLACEMENT;
3678 } 3679 }
3679 3680
3680 3681
3681 } // namespace internal 3682 } // namespace internal
3682 } // namespace v8 3683 } // namespace v8
3683 3684
3684 #endif // V8_TARGET_ARCH_IA32 3685 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698