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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 __ pop(ebx); // Discard copy of return address. | 712 __ pop(ebx); // Discard copy of return address. |
713 __ dec(eax); // One fewer argument (first argument is new receiver). | 713 __ dec(eax); // One fewer argument (first argument is new receiver). |
714 } | 714 } |
715 | 715 |
716 // 5a. Call non-function via tail call to CALL_NON_FUNCTION builtin, | 716 // 5a. Call non-function via tail call to CALL_NON_FUNCTION builtin, |
717 // or a function proxy via CALL_FUNCTION_PROXY. | 717 // or a function proxy via CALL_FUNCTION_PROXY. |
718 { Label function, non_proxy; | 718 { Label function, non_proxy; |
719 __ test(edx, edx); | 719 __ test(edx, edx); |
720 __ j(zero, &function); | 720 __ j(zero, &function); |
721 __ Set(ebx, Immediate(0)); | 721 __ Set(ebx, Immediate(0)); |
722 __ SetCallKind(ecx, CALL_AS_METHOD); | |
723 __ cmp(edx, Immediate(1)); | 722 __ cmp(edx, Immediate(1)); |
724 __ j(not_equal, &non_proxy); | 723 __ j(not_equal, &non_proxy); |
725 | 724 |
726 __ pop(edx); // return address | 725 __ pop(edx); // return address |
727 __ push(edi); // re-add proxy object as additional argument | 726 __ push(edi); // re-add proxy object as additional argument |
728 __ push(edx); | 727 __ push(edx); |
729 __ inc(eax); | 728 __ inc(eax); |
| 729 __ SetCallKind(ecx, CALL_AS_FUNCTION); |
730 __ GetBuiltinEntry(edx, Builtins::CALL_FUNCTION_PROXY); | 730 __ GetBuiltinEntry(edx, Builtins::CALL_FUNCTION_PROXY); |
731 __ jmp(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 731 __ jmp(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
732 RelocInfo::CODE_TARGET); | 732 RelocInfo::CODE_TARGET); |
733 | 733 |
734 __ bind(&non_proxy); | 734 __ bind(&non_proxy); |
| 735 __ SetCallKind(ecx, CALL_AS_METHOD); |
735 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); | 736 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); |
736 __ jmp(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 737 __ jmp(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
737 RelocInfo::CODE_TARGET); | 738 RelocInfo::CODE_TARGET); |
738 __ bind(&function); | 739 __ bind(&function); |
739 } | 740 } |
740 | 741 |
741 // 5b. Get the code to call from the function and check that the number of | 742 // 5b. Get the code to call from the function and check that the number of |
742 // expected arguments matches what we're providing. If so, jump | 743 // expected arguments matches what we're providing. If so, jump |
743 // (tail-call) to the code in register edx without checking arguments. | 744 // (tail-call) to the code in register edx without checking arguments. |
744 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 745 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1680 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1680 generator.Generate(); | 1681 generator.Generate(); |
1681 } | 1682 } |
1682 | 1683 |
1683 | 1684 |
1684 #undef __ | 1685 #undef __ |
1685 } | 1686 } |
1686 } // namespace v8::internal | 1687 } // namespace v8::internal |
1687 | 1688 |
1688 #endif // V8_TARGET_ARCH_IA32 | 1689 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |