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

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

Issue 2212383003: Revert of Separate Scope into DeclarationScope and Scope (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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/typing.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 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Result of FastNewFunctionContextStub is always in new space. 169 // Result of FastNewFunctionContextStub is always in new space.
170 need_write_barrier = false; 170 need_write_barrier = false;
171 } 171 }
172 RecordSafepoint(deopt_mode); 172 RecordSafepoint(deopt_mode);
173 173
174 // Context is returned in both r2 and cp. It replaces the context 174 // Context is returned in both r2 and cp. It replaces the context
175 // passed to us. It's saved in the stack and kept live in cp. 175 // passed to us. It's saved in the stack and kept live in cp.
176 __ LoadRR(cp, r2); 176 __ LoadRR(cp, r2);
177 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset)); 177 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset));
178 // Copy any necessary parameters into the context. 178 // Copy any necessary parameters into the context.
179 int num_parameters = info()->scope()->num_parameters(); 179 int num_parameters = scope()->num_parameters();
180 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0; 180 int first_parameter = scope()->has_this_declaration() ? -1 : 0;
181 for (int i = first_parameter; i < num_parameters; i++) { 181 for (int i = first_parameter; i < num_parameters; i++) {
182 Variable* var = (i == -1) ? info()->scope()->receiver() 182 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
183 : info()->scope()->parameter(i);
184 if (var->IsContextSlot()) { 183 if (var->IsContextSlot()) {
185 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 184 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
186 (num_parameters - 1 - i) * kPointerSize; 185 (num_parameters - 1 - i) * kPointerSize;
187 // Load parameter from stack. 186 // Load parameter from stack.
188 __ LoadP(r2, MemOperand(fp, parameter_offset)); 187 __ LoadP(r2, MemOperand(fp, parameter_offset));
189 // Store it in the context. 188 // Store it in the context.
190 MemOperand target = ContextMemOperand(cp, var->index()); 189 MemOperand target = ContextMemOperand(cp, var->index());
191 __ StoreP(r2, target); 190 __ StoreP(r2, target);
192 // Update the write barrier. This clobbers r5 and r2. 191 // Update the write barrier. This clobbers r5 and r2.
193 if (need_write_barrier) { 192 if (need_write_barrier) {
(...skipping 5475 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 __ LoadP(result, 5668 __ LoadP(result,
5670 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5669 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5671 __ bind(deferred->exit()); 5670 __ bind(deferred->exit());
5672 __ bind(&done); 5671 __ bind(&done);
5673 } 5672 }
5674 5673
5675 #undef __ 5674 #undef __
5676 5675
5677 } // namespace internal 5676 } // namespace internal
5678 } // namespace v8 5677 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/typing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698