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

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

Issue 2269403003: Use NeedsContext() instead of comparing num_heap_slots(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.cc » ('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/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.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/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 SaveCallerDoubles(); 145 SaveCallerDoubles();
146 } 146 }
147 return !is_aborted(); 147 return !is_aborted();
148 } 148 }
149 149
150 150
151 void LCodeGen::DoPrologue(LPrologue* instr) { 151 void LCodeGen::DoPrologue(LPrologue* instr) {
152 Comment(";;; Prologue begin"); 152 Comment(";;; Prologue begin");
153 153
154 // Possibly allocate a local context. 154 // Possibly allocate a local context.
155 if (info()->scope()->num_heap_slots() > 0) { 155 if (info()->scope()->NeedsContext()) {
156 Comment(";;; Allocate local context"); 156 Comment(";;; Allocate local context");
157 bool need_write_barrier = true; 157 bool need_write_barrier = true;
158 // Argument to NewContext is the function, which is in r1. 158 // Argument to NewContext is the function, which is in r1.
159 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 159 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
160 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 160 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
161 if (info()->scope()->is_script_scope()) { 161 if (info()->scope()->is_script_scope()) {
162 __ push(r1); 162 __ push(r1);
163 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 163 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
164 __ CallRuntime(Runtime::kNewScriptContext); 164 __ CallRuntime(Runtime::kNewScriptContext);
165 deopt_mode = Safepoint::kLazyDeopt; 165 deopt_mode = Safepoint::kLazyDeopt;
(...skipping 5357 matching lines...) Expand 10 before | Expand all | Expand 10 after
5523 __ ldr(result, FieldMemOperand(scratch, 5523 __ ldr(result, FieldMemOperand(scratch,
5524 FixedArray::kHeaderSize - kPointerSize)); 5524 FixedArray::kHeaderSize - kPointerSize));
5525 __ bind(deferred->exit()); 5525 __ bind(deferred->exit());
5526 __ bind(&done); 5526 __ bind(&done);
5527 } 5527 }
5528 5528
5529 #undef __ 5529 #undef __
5530 5530
5531 } // namespace internal 5531 } // namespace internal
5532 } // namespace v8 5532 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698