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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Result of FastNewFunctionContextStub is always in new space. 168 // Result of FastNewFunctionContextStub is always in new space.
169 need_write_barrier = false; 169 need_write_barrier = false;
170 } 170 }
171 RecordSafepoint(deopt_mode); 171 RecordSafepoint(deopt_mode);
172 172
173 // Context is returned in both v0. It replaces the context passed to us. 173 // Context is returned in both v0. It replaces the context passed to us.
174 // It's saved in the stack and kept live in cp. 174 // It's saved in the stack and kept live in cp.
175 __ mov(cp, v0); 175 __ mov(cp, v0);
176 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 176 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset));
177 // Copy any necessary parameters into the context. 177 // Copy any necessary parameters into the context.
178 int num_parameters = info()->scope()->num_parameters(); 178 int num_parameters = scope()->num_parameters();
179 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0; 179 int first_parameter = scope()->has_this_declaration() ? -1 : 0;
180 for (int i = first_parameter; i < num_parameters; i++) { 180 for (int i = first_parameter; i < num_parameters; i++) {
181 Variable* var = (i == -1) ? info()->scope()->receiver() 181 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
182 : info()->scope()->parameter(i);
183 if (var->IsContextSlot()) { 182 if (var->IsContextSlot()) {
184 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 183 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
185 (num_parameters - 1 - i) * kPointerSize; 184 (num_parameters - 1 - i) * kPointerSize;
186 // Load parameter from stack. 185 // Load parameter from stack.
187 __ ld(a0, MemOperand(fp, parameter_offset)); 186 __ ld(a0, MemOperand(fp, parameter_offset));
188 // Store it in the context. 187 // Store it in the context.
189 MemOperand target = ContextMemOperand(cp, var->index()); 188 MemOperand target = ContextMemOperand(cp, var->index());
190 __ sd(a0, target); 189 __ sd(a0, target);
191 // Update the write barrier. This clobbers a3 and a0. 190 // Update the write barrier. This clobbers a3 and a0.
192 if (need_write_barrier) { 191 if (need_write_barrier) {
(...skipping 5554 matching lines...) Expand 10 before | Expand all | Expand 10 after
5747 __ ld(result, FieldMemOperand(scratch, 5746 __ ld(result, FieldMemOperand(scratch,
5748 FixedArray::kHeaderSize - kPointerSize)); 5747 FixedArray::kHeaderSize - kPointerSize));
5749 __ bind(deferred->exit()); 5748 __ bind(deferred->exit());
5750 __ bind(&done); 5749 __ bind(&done);
5751 } 5750 }
5752 5751
5753 #undef __ 5752 #undef __
5754 5753
5755 } // namespace internal 5754 } // namespace internal
5756 } // namespace v8 5755 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698