OLD | NEW |
---|---|
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 Operand(StandardFrameConstants::kCallerSPOffset + offset)); | 205 Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
206 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters()))); | 206 __ mov(r1, Operand(Smi::FromInt(scope()->num_parameters()))); |
207 __ Push(r3, r2, r1); | 207 __ Push(r3, r2, r1); |
208 | 208 |
209 // Arguments to ArgumentsAccessStub: | 209 // Arguments to ArgumentsAccessStub: |
210 // function, receiver address, parameter count. | 210 // function, receiver address, parameter count. |
211 // The stub will rewrite receiever and parameter count if the previous | 211 // The stub will rewrite receiever and parameter count if the previous |
212 // stack frame was an arguments adapter frame. | 212 // stack frame was an arguments adapter frame. |
213 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); | 213 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); |
214 __ CallStub(&stub); | 214 __ CallStub(&stub); |
215 // Duplicate the value; move-to-slot operation might clobber registers. | 215 |
216 __ mov(r3, r0); | 216 Variable* arguments_shadow = scope()->arguments_shadow(); |
217 Move(arguments->AsSlot(), r0, r1, r2); | 217 if (arguments_shadow != NULL) { |
Kevin Millikin (Chromium)
2011/03/07 11:46:48
A bit simpler (also on the other platforms):
if (
Martin Maly
2011/03/07 19:09:40
Done.
| |
218 Slot* dot_arguments_slot = scope()->arguments_shadow()->AsSlot(); | 218 // Duplicate the value; move-to-slot operation might clobber registers. |
219 Move(dot_arguments_slot, r3, r1, r2); | 219 __ mov(r3, r0); |
220 Move(arguments->AsSlot(), r0, r1, r2); | |
221 Move(arguments_shadow->AsSlot(), r3, r1, r2); | |
222 } else { | |
223 // arguments are allocated without shadow only in strict mode. | |
224 ASSERT(scope()->is_strict_mode()); | |
225 Move(arguments->AsSlot(), r0, r1, r2); | |
226 } | |
220 } | 227 } |
221 | 228 |
222 if (FLAG_trace) { | 229 if (FLAG_trace) { |
223 __ CallRuntime(Runtime::kTraceEnter, 0); | 230 __ CallRuntime(Runtime::kTraceEnter, 0); |
224 } | 231 } |
225 | 232 |
226 // Visit the declarations and body unless there is an illegal | 233 // Visit the declarations and body unless there is an illegal |
227 // redeclaration. | 234 // redeclaration. |
228 if (scope()->HasIllegalRedeclaration()) { | 235 if (scope()->HasIllegalRedeclaration()) { |
229 Comment cmnt(masm_, "[ Declarations"); | 236 Comment cmnt(masm_, "[ Declarations"); |
(...skipping 4047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4277 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4284 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4278 __ add(pc, r1, Operand(masm_->CodeObject())); | 4285 __ add(pc, r1, Operand(masm_->CodeObject())); |
4279 } | 4286 } |
4280 | 4287 |
4281 | 4288 |
4282 #undef __ | 4289 #undef __ |
4283 | 4290 |
4284 } } // namespace v8::internal | 4291 } } // namespace v8::internal |
4285 | 4292 |
4286 #endif // V8_TARGET_ARCH_ARM | 4293 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |