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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // Result of FastNewFunctionContextStub is always in new space. 179 // Result of FastNewFunctionContextStub is always in new space.
180 need_write_barrier = false; 180 need_write_barrier = false;
181 } 181 }
182 RecordSafepoint(deopt_mode); 182 RecordSafepoint(deopt_mode);
183 183
184 // Context is returned in both r3 and cp. It replaces the context 184 // Context is returned in both r3 and cp. It replaces the context
185 // passed to us. It's saved in the stack and kept live in cp. 185 // passed to us. It's saved in the stack and kept live in cp.
186 __ mr(cp, r3); 186 __ mr(cp, r3);
187 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); 187 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset));
188 // Copy any necessary parameters into the context. 188 // Copy any necessary parameters into the context.
189 int num_parameters = info()->scope()->num_parameters(); 189 int num_parameters = scope()->num_parameters();
190 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0; 190 int first_parameter = scope()->has_this_declaration() ? -1 : 0;
191 for (int i = first_parameter; i < num_parameters; i++) { 191 for (int i = first_parameter; i < num_parameters; i++) {
192 Variable* var = (i == -1) ? info()->scope()->receiver() 192 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
193 : info()->scope()->parameter(i);
194 if (var->IsContextSlot()) { 193 if (var->IsContextSlot()) {
195 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 194 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
196 (num_parameters - 1 - i) * kPointerSize; 195 (num_parameters - 1 - i) * kPointerSize;
197 // Load parameter from stack. 196 // Load parameter from stack.
198 __ LoadP(r3, MemOperand(fp, parameter_offset)); 197 __ LoadP(r3, MemOperand(fp, parameter_offset));
199 // Store it in the context. 198 // Store it in the context.
200 MemOperand target = ContextMemOperand(cp, var->index()); 199 MemOperand target = ContextMemOperand(cp, var->index());
201 __ StoreP(r3, target, r0); 200 __ StoreP(r3, target, r0);
202 // Update the write barrier. This clobbers r6 and r3. 201 // Update the write barrier. This clobbers r6 and r3.
203 if (need_write_barrier) { 202 if (need_write_barrier) {
(...skipping 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after
5780 __ LoadP(result, 5779 __ LoadP(result,
5781 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5780 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5782 __ bind(deferred->exit()); 5781 __ bind(deferred->exit());
5783 __ bind(&done); 5782 __ bind(&done);
5784 } 5783 }
5785 5784
5786 #undef __ 5785 #undef __
5787 5786
5788 } // namespace internal 5787 } // namespace internal
5789 } // namespace v8 5788 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698