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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1251443002: ARM: make sure that the expected code size is computed in predictable scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5783 matching lines...) Expand 10 before | Expand all | Expand 10 after
5794 LEnvironment* env = instr->environment(); 5794 LEnvironment* env = instr->environment();
5795 // There is no LLazyBailout instruction for stack-checks. We have to 5795 // There is no LLazyBailout instruction for stack-checks. We have to
5796 // prepare for lazy deoptimization explicitly here. 5796 // prepare for lazy deoptimization explicitly here.
5797 if (instr->hydrogen()->is_function_entry()) { 5797 if (instr->hydrogen()->is_function_entry()) {
5798 // Perform stack overflow check. 5798 // Perform stack overflow check.
5799 Label done; 5799 Label done;
5800 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 5800 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
5801 __ cmp(sp, Operand(ip)); 5801 __ cmp(sp, Operand(ip));
5802 __ b(hs, &done); 5802 __ b(hs, &done);
5803 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); 5803 Handle<Code> stack_check = isolate()->builtins()->StackCheck();
5804 PredictableCodeSizeScope predictable(masm(), 5804 PredictableCodeSizeScope predictable(masm());
5805 CallCodeSize(stack_check, RelocInfo::CODE_TARGET)); 5805 predictable.ExpectSize(CallCodeSize(stack_check, RelocInfo::CODE_TARGET));
5806 DCHECK(instr->context()->IsRegister()); 5806 DCHECK(instr->context()->IsRegister());
5807 DCHECK(ToRegister(instr->context()).is(cp)); 5807 DCHECK(ToRegister(instr->context()).is(cp));
5808 CallCode(stack_check, RelocInfo::CODE_TARGET, instr); 5808 CallCode(stack_check, RelocInfo::CODE_TARGET, instr);
5809 __ bind(&done); 5809 __ bind(&done);
5810 } else { 5810 } else {
5811 DCHECK(instr->hydrogen()->is_backwards_branch()); 5811 DCHECK(instr->hydrogen()->is_backwards_branch());
5812 // Perform stack overflow check if this goto needs it before jumping. 5812 // Perform stack overflow check if this goto needs it before jumping.
5813 DeferredStackCheck* deferred_stack_check = 5813 DeferredStackCheck* deferred_stack_check =
5814 new(zone()) DeferredStackCheck(this, instr); 5814 new(zone()) DeferredStackCheck(this, instr);
5815 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 5815 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
5990 __ push(ToRegister(instr->function())); 5990 __ push(ToRegister(instr->function()));
5991 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5991 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5992 RecordSafepoint(Safepoint::kNoLazyDeopt); 5992 RecordSafepoint(Safepoint::kNoLazyDeopt);
5993 } 5993 }
5994 5994
5995 5995
5996 #undef __ 5996 #undef __
5997 5997
5998 } // namespace internal 5998 } // namespace internal
5999 } // namespace v8 5999 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698