OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 bind(&done); | 681 bind(&done); |
682 } | 682 } |
683 | 683 |
684 | 684 |
685 void MacroAssembler::InvokeFunction(Register function, | 685 void MacroAssembler::InvokeFunction(Register function, |
686 const ParameterCount& actual, | 686 const ParameterCount& actual, |
687 InvokeFlag flag) { | 687 InvokeFlag flag) { |
688 ASSERT(function.is(rdi)); | 688 ASSERT(function.is(rdi)); |
689 movq(rdx, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); | 689 movq(rdx, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
690 movq(rsi, FieldOperand(function, JSFunction::kContextOffset)); | 690 movq(rsi, FieldOperand(function, JSFunction::kContextOffset)); |
691 movl(rbx, FieldOperand(rdx, SharedFunctionInfo::kFormalParameterCountOffset)); | 691 movsxlq(rbx, |
| 692 FieldOperand(rdx, SharedFunctionInfo::kFormalParameterCountOffset)); |
692 movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); | 693 movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); |
693 // Advances rdx to the end of the Code object header, to the start of | 694 // Advances rdx to the end of the Code object header, to the start of |
694 // the executable code. | 695 // the executable code. |
695 lea(rdx, FieldOperand(rdx, Code::kHeaderSize)); | 696 lea(rdx, FieldOperand(rdx, Code::kHeaderSize)); |
696 | 697 |
697 ParameterCount expected(rbx); | 698 ParameterCount expected(rbx); |
698 InvokeCode(rdx, expected, actual, flag); | 699 InvokeCode(rdx, expected, actual, flag); |
699 } | 700 } |
700 | 701 |
701 | 702 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 push(rcx); | 824 push(rcx); |
824 | 825 |
825 // Clear the top frame. | 826 // Clear the top frame. |
826 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); | 827 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); |
827 movq(kScratchRegister, c_entry_fp_address); | 828 movq(kScratchRegister, c_entry_fp_address); |
828 movq(Operand(kScratchRegister, 0), Immediate(0)); | 829 movq(Operand(kScratchRegister, 0), Immediate(0)); |
829 } | 830 } |
830 | 831 |
831 | 832 |
832 } } // namespace v8::internal | 833 } } // namespace v8::internal |
OLD | NEW |