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

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

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope 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 = scope()->num_parameters(); 189 int num_parameters = info()->scope()->num_parameters();
190 int first_parameter = scope()->has_this_declaration() ? -1 : 0; 190 int first_parameter = info()->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) ? scope()->receiver() : scope()->parameter(i); 192 Variable* var = (i == -1) ? info()->scope()->receiver()
193 : info()->scope()->parameter(i);
193 if (var->IsContextSlot()) { 194 if (var->IsContextSlot()) {
194 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 195 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
195 (num_parameters - 1 - i) * kPointerSize; 196 (num_parameters - 1 - i) * kPointerSize;
196 // Load parameter from stack. 197 // Load parameter from stack.
197 __ LoadP(r3, MemOperand(fp, parameter_offset)); 198 __ LoadP(r3, MemOperand(fp, parameter_offset));
198 // Store it in the context. 199 // Store it in the context.
199 MemOperand target = ContextMemOperand(cp, var->index()); 200 MemOperand target = ContextMemOperand(cp, var->index());
200 __ StoreP(r3, target, r0); 201 __ StoreP(r3, target, r0);
201 // Update the write barrier. This clobbers r6 and r3. 202 // Update the write barrier. This clobbers r6 and r3.
202 if (need_write_barrier) { 203 if (need_write_barrier) {
(...skipping 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after
5779 __ LoadP(result, 5780 __ LoadP(result,
5780 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5781 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5781 __ bind(deferred->exit()); 5782 __ bind(deferred->exit());
5782 __ bind(&done); 5783 __ bind(&done);
5783 } 5784 }
5784 5785
5785 #undef __ 5786 #undef __
5786 5787
5787 } // namespace internal 5788 } // namespace internal
5788 } // namespace v8 5789 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698