| 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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 | 2199 |
| 2200 // If fast case code has been generated, emit code to push the | 2200 // If fast case code has been generated, emit code to push the |
| 2201 // function and receiver and have the slow path jump around this | 2201 // function and receiver and have the slow path jump around this |
| 2202 // code. | 2202 // code. |
| 2203 if (done.is_linked()) { | 2203 if (done.is_linked()) { |
| 2204 Label call; | 2204 Label call; |
| 2205 __ jmp(&call, Label::kNear); | 2205 __ jmp(&call, Label::kNear); |
| 2206 __ bind(&done); | 2206 __ bind(&done); |
| 2207 // Push function. | 2207 // Push function. |
| 2208 __ push(rax); | 2208 __ push(rax); |
| 2209 // Push global receiver. | 2209 // The receiver is implicitly the global receiver. Indicate this |
| 2210 __ movq(rbx, GlobalObjectOperand()); | 2210 // by passing the hole to the call function stub. |
| 2211 __ push(FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 2211 __ PushRoot(Heap::kTheHoleValueRootIndex); |
| 2212 __ bind(&call); | 2212 __ bind(&call); |
| 2213 } | 2213 } |
| 2214 | 2214 |
| 2215 // The receiver is either the global receiver or an object found | 2215 // The receiver is either the global receiver or an object found |
| 2216 // by LoadContextSlot. That object could be the hole if the | 2216 // by LoadContextSlot. That object could be the hole if the |
| 2217 // receiver is implicitly the global object. | 2217 // receiver is implicitly the global object. |
| 2218 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); | 2218 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); |
| 2219 } else if (fun->AsProperty() != NULL) { | 2219 } else if (fun->AsProperty() != NULL) { |
| 2220 // Call to an object property. | 2220 // Call to an object property. |
| 2221 Property* prop = fun->AsProperty(); | 2221 Property* prop = fun->AsProperty(); |
| (...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4310 __ ret(0); | 4310 __ ret(0); |
| 4311 } | 4311 } |
| 4312 | 4312 |
| 4313 | 4313 |
| 4314 #undef __ | 4314 #undef __ |
| 4315 | 4315 |
| 4316 | 4316 |
| 4317 } } // namespace v8::internal | 4317 } } // namespace v8::internal |
| 4318 | 4318 |
| 4319 #endif // V8_TARGET_ARCH_X64 | 4319 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |