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

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

Issue 6824081: Add a stub for allocating parameter maps. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/arguments/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 __ push(edi); 186 __ push(edi);
187 } else { 187 } else {
188 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 188 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
189 } 189 }
190 // Receiver is just before the parameters on the caller's stack. 190 // Receiver is just before the parameters on the caller's stack.
191 int offset = scope()->num_parameters() * kPointerSize; 191 int offset = scope()->num_parameters() * kPointerSize;
192 __ lea(edx, 192 __ lea(edx,
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 and/or New...:
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( 200 ArgumentsAccessStub::Type type;
201 is_strict_mode() ? ArgumentsAccessStub::NEW_STRICT 201 if (is_strict_mode()) {
202 : ArgumentsAccessStub::NEW_NON_STRICT); 202 type = ArgumentsAccessStub::NEW_STRICT;
203 } else if (function()->has_duplicate_parameters()) {
204 type = ArgumentsAccessStub::NEW_NON_STRICT_SLOW;
205 } else {
206 type = ArgumentsAccessStub::NEW_NON_STRICT_FAST;
207 }
208 ArgumentsAccessStub stub(type);
203 __ CallStub(&stub); 209 __ CallStub(&stub);
204 210
205 Move(arguments->AsSlot(), eax, ebx, edx); 211 Move(arguments->AsSlot(), eax, ebx, edx);
206 } 212 }
207 213
208 if (FLAG_trace) { 214 if (FLAG_trace) {
209 __ CallRuntime(Runtime::kTraceEnter, 0); 215 __ CallRuntime(Runtime::kTraceEnter, 0);
210 } 216 }
211 217
212 // Visit the declarations and body unless there is an illegal 218 // Visit the declarations and body unless there is an illegal
(...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after
4188 // And return. 4194 // And return.
4189 __ ret(0); 4195 __ ret(0);
4190 } 4196 }
4191 4197
4192 4198
4193 #undef __ 4199 #undef __
4194 4200
4195 } } // namespace v8::internal 4201 } } // namespace v8::internal
4196 4202
4197 #endif // V8_TARGET_ARCH_IA32 4203 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698