| 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 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2223 | 2223 |
| 2224 // If fast case code has been generated, emit code to push the | 2224 // If fast case code has been generated, emit code to push the |
| 2225 // function and receiver and have the slow path jump around this | 2225 // function and receiver and have the slow path jump around this |
| 2226 // code. | 2226 // code. |
| 2227 if (done.is_linked()) { | 2227 if (done.is_linked()) { |
| 2228 Label call; | 2228 Label call; |
| 2229 __ jmp(&call); | 2229 __ jmp(&call); |
| 2230 __ bind(&done); | 2230 __ bind(&done); |
| 2231 // Push function. | 2231 // Push function. |
| 2232 __ push(eax); | 2232 __ push(eax); |
| 2233 // Push global receiver. | 2233 // The receiver is implicitly the global receiver. Indicate this |
| 2234 __ mov(ebx, GlobalObjectOperand()); | 2234 // by passing the hole to the call function stub. |
| 2235 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 2235 __ push(Immediate(isolate()->factory()->the_hole_value())); |
| 2236 __ bind(&call); | 2236 __ bind(&call); |
| 2237 } | 2237 } |
| 2238 | 2238 |
| 2239 // The receiver is either the global receiver or an object found | 2239 // The receiver is either the global receiver or an object found |
| 2240 // by LoadContextSlot. That object could be the hole if the | 2240 // by LoadContextSlot. That object could be the hole if the |
| 2241 // receiver is implicitly the global object. | 2241 // receiver is implicitly the global object. |
| 2242 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); | 2242 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); |
| 2243 } else if (fun->AsProperty() != NULL) { | 2243 } else if (fun->AsProperty() != NULL) { |
| 2244 // Call to an object property. | 2244 // Call to an object property. |
| 2245 Property* prop = fun->AsProperty(); | 2245 Property* prop = fun->AsProperty(); |
| (...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4330 // And return. | 4330 // And return. |
| 4331 __ ret(0); | 4331 __ ret(0); |
| 4332 } | 4332 } |
| 4333 | 4333 |
| 4334 | 4334 |
| 4335 #undef __ | 4335 #undef __ |
| 4336 | 4336 |
| 4337 } } // namespace v8::internal | 4337 } } // namespace v8::internal |
| 4338 | 4338 |
| 4339 #endif // V8_TARGET_ARCH_IA32 | 4339 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |