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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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, 3 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/ppc/lithium-ppc.cc ('k') | src/crankshaft/s390/lithium-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (info()->saves_caller_doubles()) { 141 if (info()->saves_caller_doubles()) {
142 SaveCallerDoubles(); 142 SaveCallerDoubles();
143 } 143 }
144 return !is_aborted(); 144 return !is_aborted();
145 } 145 }
146 146
147 void LCodeGen::DoPrologue(LPrologue* instr) { 147 void LCodeGen::DoPrologue(LPrologue* instr) {
148 Comment(";;; Prologue begin"); 148 Comment(";;; Prologue begin");
149 149
150 // Possibly allocate a local context. 150 // Possibly allocate a local context.
151 if (info()->scope()->num_heap_slots() > 0) { 151 if (info()->scope()->NeedsContext()) {
152 Comment(";;; Allocate local context"); 152 Comment(";;; Allocate local context");
153 bool need_write_barrier = true; 153 bool need_write_barrier = true;
154 // Argument to NewContext is the function, which is in r3. 154 // Argument to NewContext is the function, which is in r3.
155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
157 if (info()->scope()->is_script_scope()) { 157 if (info()->scope()->is_script_scope()) {
158 __ push(r3); 158 __ push(r3);
159 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 159 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
160 __ CallRuntime(Runtime::kNewScriptContext); 160 __ CallRuntime(Runtime::kNewScriptContext);
161 deopt_mode = Safepoint::kLazyDeopt; 161 deopt_mode = Safepoint::kLazyDeopt;
(...skipping 5503 matching lines...) Expand 10 before | Expand all | Expand 10 after
5665 __ LoadP(result, 5665 __ LoadP(result,
5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5667 __ bind(deferred->exit()); 5667 __ bind(deferred->exit());
5668 __ bind(&done); 5668 __ bind(&done);
5669 } 5669 }
5670 5670
5671 #undef __ 5671 #undef __
5672 5672
5673 } // namespace internal 5673 } // namespace internal
5674 } // namespace v8 5674 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/s390/lithium-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698