OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 } | 882 } |
883 | 883 |
884 Runtime::FunctionId function_id = | 884 Runtime::FunctionId function_id = |
885 static_cast<Runtime::FunctionId>(f->stub_id); | 885 static_cast<Runtime::FunctionId>(f->stub_id); |
886 RuntimeStub stub(function_id, num_arguments); | 886 RuntimeStub stub(function_id, num_arguments); |
887 CallStub(&stub); | 887 CallStub(&stub); |
888 } | 888 } |
889 | 889 |
890 | 890 |
891 void MacroAssembler::TailCallRuntime(const ExternalReference& ext, | 891 void MacroAssembler::TailCallRuntime(const ExternalReference& ext, |
892 int num_arguments) { | 892 int num_arguments, |
| 893 int result_size) { |
893 // TODO(1236192): Most runtime routines don't need the number of | 894 // TODO(1236192): Most runtime routines don't need the number of |
894 // arguments passed in because it is constant. At some point we | 895 // arguments passed in because it is constant. At some point we |
895 // should remove this need and make the runtime routine entry code | 896 // should remove this need and make the runtime routine entry code |
896 // smarter. | 897 // smarter. |
897 Set(eax, Immediate(num_arguments)); | 898 Set(eax, Immediate(num_arguments)); |
898 JumpToBuiltin(ext); | 899 JumpToBuiltin(ext); |
899 } | 900 } |
900 | 901 |
901 | 902 |
902 void MacroAssembler::JumpToBuiltin(const ExternalReference& ext) { | 903 void MacroAssembler::JumpToBuiltin(const ExternalReference& ext) { |
903 // Set the entry point and jump to the C entry runtime stub. | 904 // Set the entry point and jump to the C entry runtime stub. |
904 mov(ebx, Immediate(ext)); | 905 mov(ebx, Immediate(ext)); |
905 CEntryStub ces; | 906 CEntryStub ces(1); |
906 jmp(ces.GetCode(), RelocInfo::CODE_TARGET); | 907 jmp(ces.GetCode(), RelocInfo::CODE_TARGET); |
907 } | 908 } |
908 | 909 |
909 | 910 |
910 void MacroAssembler::InvokePrologue(const ParameterCount& expected, | 911 void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
911 const ParameterCount& actual, | 912 const ParameterCount& actual, |
912 Handle<Code> code_constant, | 913 Handle<Code> code_constant, |
913 const Operand& code_operand, | 914 const Operand& code_operand, |
914 Label* done, | 915 Label* done, |
915 InvokeFlag flag) { | 916 InvokeFlag flag) { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 // Indicate that code has changed. | 1176 // Indicate that code has changed. |
1176 CPU::FlushICache(address_, size_); | 1177 CPU::FlushICache(address_, size_); |
1177 | 1178 |
1178 // Check that the code was patched as expected. | 1179 // Check that the code was patched as expected. |
1179 ASSERT(masm_.pc_ == address_ + size_); | 1180 ASSERT(masm_.pc_ == address_ + size_); |
1180 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1181 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1181 } | 1182 } |
1182 | 1183 |
1183 | 1184 |
1184 } } // namespace v8::internal | 1185 } } // namespace v8::internal |
OLD | NEW |