| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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: |
| 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 __ mov(ecx, eax); // Duplicate result. | 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 } |
| 203 Move(arguments->AsSlot(), eax, ebx, edx); | 208 Move(arguments->AsSlot(), eax, ebx, edx); |
| 204 Slot* dot_arguments_slot = scope()->arguments_shadow()->AsSlot(); | |
| 205 Move(dot_arguments_slot, ecx, ebx, edx); | |
| 206 } | 209 } |
| 207 | 210 |
| 208 if (FLAG_trace) { | 211 if (FLAG_trace) { |
| 209 __ CallRuntime(Runtime::kTraceEnter, 0); | 212 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 210 } | 213 } |
| 211 | 214 |
| 212 // Visit the declarations and body unless there is an illegal | 215 // Visit the declarations and body unless there is an illegal |
| 213 // redeclaration. | 216 // redeclaration. |
| 214 if (scope()->HasIllegalRedeclaration()) { | 217 if (scope()->HasIllegalRedeclaration()) { |
| 215 Comment cmnt(masm_, "[ Declarations"); | 218 Comment cmnt(masm_, "[ Declarations"); |
| (...skipping 4039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4255 // And return. | 4258 // And return. |
| 4256 __ ret(0); | 4259 __ ret(0); |
| 4257 } | 4260 } |
| 4258 | 4261 |
| 4259 | 4262 |
| 4260 #undef __ | 4263 #undef __ |
| 4261 | 4264 |
| 4262 } } // namespace v8::internal | 4265 } } // namespace v8::internal |
| 4263 | 4266 |
| 4264 #endif // V8_TARGET_ARCH_IA32 | 4267 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |