| 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 4656 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4667   __ InvokeFunction(edi, actual, JUMP_FUNCTION); |  4667   __ InvokeFunction(edi, actual, JUMP_FUNCTION); | 
|  4668  |  4668  | 
|  4669   // Slow-case: Non-function called. |  4669   // Slow-case: Non-function called. | 
|  4670   __ bind(&slow); |  4670   __ bind(&slow); | 
|  4671   // CALL_NON_FUNCTION expects the non-function callee as receiver (instead |  4671   // CALL_NON_FUNCTION expects the non-function callee as receiver (instead | 
|  4672   // of the original receiver from the call site). |  4672   // of the original receiver from the call site). | 
|  4673   __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); |  4673   __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); | 
|  4674   __ Set(eax, Immediate(argc_)); |  4674   __ Set(eax, Immediate(argc_)); | 
|  4675   __ Set(ebx, Immediate(0)); |  4675   __ Set(ebx, Immediate(0)); | 
|  4676   __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); |  4676   __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); | 
|  4677   Handle<Code> adaptor(masm->isolate()->builtins()->builtin( |  4677   Handle<Code> adaptor = | 
|  4678       Builtins::ArgumentsAdaptorTrampoline)); |  4678       masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); | 
|  4679   __ jmp(adaptor, RelocInfo::CODE_TARGET); |  4679   __ jmp(adaptor, RelocInfo::CODE_TARGET); | 
|  4680 } |  4680 } | 
|  4681  |  4681  | 
|  4682  |  4682  | 
|  4683 bool CEntryStub::NeedsImmovableCode() { |  4683 bool CEntryStub::NeedsImmovableCode() { | 
|  4684   return false; |  4684   return false; | 
|  4685 } |  4685 } | 
|  4686  |  4686  | 
|  4687  |  4687  | 
|  4688 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { |  4688 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { | 
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4936  |  4936  | 
|  4937   // Fake a receiver (NULL). |  4937   // Fake a receiver (NULL). | 
|  4938   __ push(Immediate(0));  // receiver |  4938   __ push(Immediate(0));  // receiver | 
|  4939  |  4939  | 
|  4940   // Invoke the function by calling through JS entry trampoline |  4940   // Invoke the function by calling through JS entry trampoline | 
|  4941   // builtin and pop the faked function when we return. Notice that we |  4941   // builtin and pop the faked function when we return. Notice that we | 
|  4942   // cannot store a reference to the trampoline code directly in this |  4942   // cannot store a reference to the trampoline code directly in this | 
|  4943   // stub, because the builtin stubs may not have been generated yet. |  4943   // stub, because the builtin stubs may not have been generated yet. | 
|  4944   if (is_construct) { |  4944   if (is_construct) { | 
|  4945     ExternalReference construct_entry( |  4945     ExternalReference construct_entry( | 
|  4946         Builtins::JSConstructEntryTrampoline, |  4946         Builtins::kJSConstructEntryTrampoline, | 
|  4947         masm->isolate()); |  4947         masm->isolate()); | 
|  4948     __ mov(edx, Immediate(construct_entry)); |  4948     __ mov(edx, Immediate(construct_entry)); | 
|  4949   } else { |  4949   } else { | 
|  4950     ExternalReference entry(Builtins::JSEntryTrampoline, |  4950     ExternalReference entry(Builtins::kJSEntryTrampoline, | 
|  4951                             masm->isolate()); |  4951                             masm->isolate()); | 
|  4952     __ mov(edx, Immediate(entry)); |  4952     __ mov(edx, Immediate(entry)); | 
|  4953   } |  4953   } | 
|  4954   __ mov(edx, Operand(edx, 0));  // deref address |  4954   __ mov(edx, Operand(edx, 0));  // deref address | 
|  4955   __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); |  4955   __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); | 
|  4956   __ call(Operand(edx)); |  4956   __ call(Operand(edx)); | 
|  4957  |  4957  | 
|  4958   // Unlink this frame from the handler chain. |  4958   // Unlink this frame from the handler chain. | 
|  4959   __ pop(Operand::StaticVariable(ExternalReference( |  4959   __ pop(Operand::StaticVariable(ExternalReference( | 
|  4960       Isolate::k_handler_address, |  4960       Isolate::k_handler_address, | 
| (...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6479   // Do a tail call to the rewritten stub. |  6479   // Do a tail call to the rewritten stub. | 
|  6480   __ jmp(Operand(edi)); |  6480   __ jmp(Operand(edi)); | 
|  6481 } |  6481 } | 
|  6482  |  6482  | 
|  6483  |  6483  | 
|  6484 #undef __ |  6484 #undef __ | 
|  6485  |  6485  | 
|  6486 } }  // namespace v8::internal |  6486 } }  // namespace v8::internal | 
|  6487  |  6487  | 
|  6488 #endif  // V8_TARGET_ARCH_IA32 |  6488 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW |