| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); | 194 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); |
| 195 __ push(rdx); | 195 __ push(rdx); |
| 196 __ Push(Smi::FromInt(scope()->num_parameters())); | 196 __ Push(Smi::FromInt(scope()->num_parameters())); |
| 197 // Arguments to ArgumentsAccessStub: | 197 // Arguments to ArgumentsAccessStub: |
| 198 // function, receiver address, parameter count. | 198 // function, receiver address, parameter count. |
| 199 // The stub will rewrite receiver and parameter count if the previous | 199 // The stub will rewrite receiver and parameter count if the previous |
| 200 // stack frame was an arguments adapter frame. | 200 // stack frame was an arguments adapter frame. |
| 201 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); | 201 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); |
| 202 __ CallStub(&stub); | 202 __ CallStub(&stub); |
| 203 | 203 |
| 204 Variable* arguments_shadow = scope()->arguments_shadow(); | |
| 205 if (arguments_shadow != NULL) { | |
| 206 // Store new arguments object in both "arguments" and ".arguments" slots. | |
| 207 __ movq(rcx, rax); | |
| 208 Move(arguments_shadow->AsSlot(), rcx, rbx, rdx); | |
| 209 } | |
| 210 Move(arguments->AsSlot(), rax, rbx, rdx); | 204 Move(arguments->AsSlot(), rax, rbx, rdx); |
| 211 } | 205 } |
| 212 | 206 |
| 213 if (FLAG_trace) { | 207 if (FLAG_trace) { |
| 214 __ CallRuntime(Runtime::kTraceEnter, 0); | 208 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 215 } | 209 } |
| 216 | 210 |
| 217 // Visit the declarations and body unless there is an illegal | 211 // Visit the declarations and body unless there is an illegal |
| 218 // redeclaration. | 212 // redeclaration. |
| 219 if (scope()->HasIllegalRedeclaration()) { | 213 if (scope()->HasIllegalRedeclaration()) { |
| (...skipping 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3969 __ ret(0); | 3963 __ ret(0); |
| 3970 } | 3964 } |
| 3971 | 3965 |
| 3972 | 3966 |
| 3973 #undef __ | 3967 #undef __ |
| 3974 | 3968 |
| 3975 | 3969 |
| 3976 } } // namespace v8::internal | 3970 } } // namespace v8::internal |
| 3977 | 3971 |
| 3978 #endif // V8_TARGET_ARCH_X64 | 3972 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |