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

Side by Side Diff: arguments/src/ia32/full-codegen-ia32.cc

Issue 6667076: Remove arguments shadow from scopes, stop rewriting parameters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); 193 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset));
194 __ push(edx); 194 __ push(edx);
195 __ push(Immediate(Smi::FromInt(scope()->num_parameters()))); 195 __ push(Immediate(Smi::FromInt(scope()->num_parameters())));
196 // Arguments to ArgumentsAccessStub: 196 // Arguments to ArgumentsAccessStub:
197 // function, receiver address, parameter count. 197 // function, receiver address, parameter count.
198 // The stub will rewrite receiver and parameter count if the previous 198 // The stub will rewrite receiver and parameter count if the previous
199 // stack frame was an arguments adapter frame. 199 // stack frame was an arguments adapter frame.
200 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 200 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT);
201 __ CallStub(&stub); 201 __ CallStub(&stub);
202 202
203 Variable* arguments_shadow = scope()->arguments_shadow();
204 if (arguments_shadow != NULL) {
205 __ mov(ecx, eax); // Duplicate result.
206 Move(arguments_shadow->AsSlot(), ecx, ebx, edx);
207 }
208 Move(arguments->AsSlot(), eax, ebx, edx); 203 Move(arguments->AsSlot(), eax, ebx, edx);
209 } 204 }
210 205
211 if (FLAG_trace) { 206 if (FLAG_trace) {
212 __ CallRuntime(Runtime::kTraceEnter, 0); 207 __ CallRuntime(Runtime::kTraceEnter, 0);
213 } 208 }
214 209
215 // Visit the declarations and body unless there is an illegal 210 // Visit the declarations and body unless there is an illegal
216 // redeclaration. 211 // redeclaration.
217 if (scope()->HasIllegalRedeclaration()) { 212 if (scope()->HasIllegalRedeclaration()) {
(...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 // And return. 4257 // And return.
4263 __ ret(0); 4258 __ ret(0);
4264 } 4259 }
4265 4260
4266 4261
4267 #undef __ 4262 #undef __
4268 4263
4269 } } // namespace v8::internal 4264 } } // namespace v8::internal
4270 4265
4271 #endif // V8_TARGET_ARCH_IA32 4266 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698