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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/hydrogen.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 need_write_barrier = false; 187 need_write_barrier = false;
188 } 188 }
189 RecordSafepoint(deopt_mode); 189 RecordSafepoint(deopt_mode);
190 190
191 // Context is returned in eax. It replaces the context passed to us. 191 // Context is returned in eax. It replaces the context passed to us.
192 // It's saved in the stack and kept live in esi. 192 // It's saved in the stack and kept live in esi.
193 __ mov(esi, eax); 193 __ mov(esi, eax);
194 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 194 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
195 195
196 // Copy parameters into context if necessary. 196 // Copy parameters into context if necessary.
197 int num_parameters = info()->scope()->num_parameters(); 197 int num_parameters = scope()->num_parameters();
198 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0; 198 int first_parameter = scope()->has_this_declaration() ? -1 : 0;
199 for (int i = first_parameter; i < num_parameters; i++) { 199 for (int i = first_parameter; i < num_parameters; i++) {
200 Variable* var = (i == -1) ? info()->scope()->receiver() 200 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
201 : info()->scope()->parameter(i);
202 if (var->IsContextSlot()) { 201 if (var->IsContextSlot()) {
203 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 202 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
204 (num_parameters - 1 - i) * kPointerSize; 203 (num_parameters - 1 - i) * kPointerSize;
205 // Load parameter from stack. 204 // Load parameter from stack.
206 __ mov(eax, Operand(ebp, parameter_offset)); 205 __ mov(eax, Operand(ebp, parameter_offset));
207 // Store it in the context. 206 // Store it in the context.
208 int context_offset = Context::SlotOffset(var->index()); 207 int context_offset = Context::SlotOffset(var->index());
209 __ mov(Operand(esi, context_offset), eax); 208 __ mov(Operand(esi, context_offset), eax);
210 // Update the write barrier. This clobbers eax and ebx. 209 // Update the write barrier. This clobbers eax and ebx.
211 if (need_write_barrier) { 210 if (need_write_barrier) {
(...skipping 5072 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 __ bind(deferred->exit()); 5283 __ bind(deferred->exit());
5285 __ bind(&done); 5284 __ bind(&done);
5286 } 5285 }
5287 5286
5288 #undef __ 5287 #undef __
5289 5288
5290 } // namespace internal 5289 } // namespace internal
5291 } // namespace v8 5290 } // namespace v8
5292 5291
5293 #endif // V8_TARGET_ARCH_IA32 5292 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698