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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 need_write_barrier = false; 157 need_write_barrier = false;
158 } 158 }
159 RecordSafepoint(deopt_mode); 159 RecordSafepoint(deopt_mode);
160 160
161 // Context is returned in eax. It replaces the context passed to us. 161 // Context is returned in eax. It replaces the context passed to us.
162 // It's saved in the stack and kept live in esi. 162 // It's saved in the stack and kept live in esi.
163 __ mov(esi, eax); 163 __ mov(esi, eax);
164 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 164 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
165 165
166 // Copy parameters into context if necessary. 166 // Copy parameters into context if necessary.
167 int num_parameters = info()->scope()->num_parameters(); 167 int num_parameters = scope()->num_parameters();
168 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0; 168 int first_parameter = scope()->has_this_declaration() ? -1 : 0;
169 for (int i = first_parameter; i < num_parameters; i++) { 169 for (int i = first_parameter; i < num_parameters; i++) {
170 Variable* var = (i == -1) ? info()->scope()->receiver() 170 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
171 : info()->scope()->parameter(i);
172 if (var->IsContextSlot()) { 171 if (var->IsContextSlot()) {
173 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 172 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
174 (num_parameters - 1 - i) * kPointerSize; 173 (num_parameters - 1 - i) * kPointerSize;
175 // Load parameter from stack. 174 // Load parameter from stack.
176 __ mov(eax, Operand(ebp, parameter_offset)); 175 __ mov(eax, Operand(ebp, parameter_offset));
177 // Store it in the context. 176 // Store it in the context.
178 int context_offset = Context::SlotOffset(var->index()); 177 int context_offset = Context::SlotOffset(var->index());
179 __ mov(Operand(esi, context_offset), eax); 178 __ mov(Operand(esi, context_offset), eax);
180 // Update the write barrier. This clobbers eax and ebx. 179 // Update the write barrier. This clobbers eax and ebx.
181 if (need_write_barrier) { 180 if (need_write_barrier) {
(...skipping 5590 matching lines...) Expand 10 before | Expand all | Expand 10 after
5772 __ bind(deferred->exit()); 5771 __ bind(deferred->exit());
5773 __ bind(&done); 5772 __ bind(&done);
5774 } 5773 }
5775 5774
5776 #undef __ 5775 #undef __
5777 5776
5778 } // namespace internal 5777 } // namespace internal
5779 } // namespace v8 5778 } // namespace v8
5780 5779
5781 #endif // V8_TARGET_ARCH_X87 5780 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698