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 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4695 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); | 4695 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); |
4696 __ Set(eax, Immediate(argc_)); | 4696 __ Set(eax, Immediate(argc_)); |
4697 __ Set(ebx, Immediate(0)); | 4697 __ Set(ebx, Immediate(0)); |
4698 __ SetCallKind(ecx, CALL_AS_METHOD); | 4698 __ SetCallKind(ecx, CALL_AS_METHOD); |
4699 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); | 4699 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); |
4700 Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline(); | 4700 Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline(); |
4701 __ jmp(adaptor, RelocInfo::CODE_TARGET); | 4701 __ jmp(adaptor, RelocInfo::CODE_TARGET); |
4702 } | 4702 } |
4703 | 4703 |
4704 | 4704 |
| 4705 void CallFunctionStub::FinishCode(Handle<Code> code) { |
| 4706 code->set_has_function_cache(RecordCallTarget()); |
| 4707 } |
| 4708 |
| 4709 |
4705 void CallConstructStub::Generate(MacroAssembler* masm) { | 4710 void CallConstructStub::Generate(MacroAssembler* masm) { |
4706 // eax : number of arguments | 4711 // eax : number of arguments |
4707 // ebx : cache cell for call target | 4712 // ebx : cache cell for call target |
4708 // edi : constructor function | 4713 // edi : constructor function |
4709 Label slow, non_function_call; | 4714 Label slow, non_function_call; |
4710 | 4715 |
4711 // Check that function is not a smi. | 4716 // Check that function is not a smi. |
4712 __ JumpIfSmi(edi, &non_function_call); | 4717 __ JumpIfSmi(edi, &non_function_call); |
4713 // Check that function is a JSFunction. | 4718 // Check that function is a JSFunction. |
4714 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); | 4719 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); |
(...skipping 24 matching lines...) Expand all Loading... |
4739 __ bind(&do_call); | 4744 __ bind(&do_call); |
4740 // Set expected number of arguments to zero (not changing eax). | 4745 // Set expected number of arguments to zero (not changing eax). |
4741 __ Set(ebx, Immediate(0)); | 4746 __ Set(ebx, Immediate(0)); |
4742 Handle<Code> arguments_adaptor = | 4747 Handle<Code> arguments_adaptor = |
4743 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); | 4748 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); |
4744 __ SetCallKind(ecx, CALL_AS_METHOD); | 4749 __ SetCallKind(ecx, CALL_AS_METHOD); |
4745 __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET); | 4750 __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET); |
4746 } | 4751 } |
4747 | 4752 |
4748 | 4753 |
| 4754 void CallConstructStub::FinishCode(Handle<Code> code) { |
| 4755 code->set_has_function_cache(RecordCallTarget()); |
| 4756 } |
| 4757 |
| 4758 |
4749 bool CEntryStub::NeedsImmovableCode() { | 4759 bool CEntryStub::NeedsImmovableCode() { |
4750 return false; | 4760 return false; |
4751 } | 4761 } |
4752 | 4762 |
4753 | 4763 |
4754 bool CEntryStub::IsPregenerated() { | 4764 bool CEntryStub::IsPregenerated() { |
4755 return (!save_doubles_ || ISOLATE->fp_stubs_generated()) && | 4765 return (!save_doubles_ || ISOLATE->fp_stubs_generated()) && |
4756 result_size_ == 1; | 4766 result_size_ == 1; |
4757 } | 4767 } |
4758 | 4768 |
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7372 false); | 7382 false); |
7373 __ pop(edx); | 7383 __ pop(edx); |
7374 __ ret(0); | 7384 __ ret(0); |
7375 } | 7385 } |
7376 | 7386 |
7377 #undef __ | 7387 #undef __ |
7378 | 7388 |
7379 } } // namespace v8::internal | 7389 } } // namespace v8::internal |
7380 | 7390 |
7381 #endif // V8_TARGET_ARCH_IA32 | 7391 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |