| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 // is already pushed by a call instruction, and PushTryHandler from the | 843 // is already pushed by a call instruction, and PushTryHandler from the |
| 844 // macro assembler will leave the top of stack in the eax register to be | 844 // macro assembler will leave the top of stack in the eax register to be |
| 845 // pushed separately). | 845 // pushed separately). |
| 846 Adjust(kHandlerSize - 2); | 846 Adjust(kHandlerSize - 2); |
| 847 __ PushTryHandler(IN_JAVASCRIPT, type); | 847 __ PushTryHandler(IN_JAVASCRIPT, type); |
| 848 // TODO(1222589): remove the reliance of PushTryHandler on a cached TOS | 848 // TODO(1222589): remove the reliance of PushTryHandler on a cached TOS |
| 849 EmitPush(eax); | 849 EmitPush(eax); |
| 850 } | 850 } |
| 851 | 851 |
| 852 | 852 |
| 853 void VirtualFrame::CallStub(CodeStub* stub, int frame_arg_count) { | 853 Result VirtualFrame::CallStub(CodeStub* stub, int frame_arg_count) { |
| 854 ASSERT(cgen_->HasValidEntryRegisters()); | 854 ASSERT(cgen_->HasValidEntryRegisters()); |
| 855 PrepareForCall(frame_arg_count); | 855 PrepareForCall(frame_arg_count); |
| 856 __ CallStub(stub); | 856 __ CallStub(stub); |
| 857 Result result = cgen_->allocator()->Allocate(eax); |
| 858 ASSERT(result.is_valid()); |
| 859 return result; |
| 857 } | 860 } |
| 858 | 861 |
| 859 | 862 |
| 860 Result VirtualFrame::CallStub(CodeStub* stub, | 863 Result VirtualFrame::CallStub(CodeStub* stub, |
| 861 Result* arg, | 864 Result* arg, |
| 862 int frame_arg_count) { | 865 int frame_arg_count) { |
| 863 arg->Unuse(); | 866 arg->Unuse(); |
| 864 CallStub(stub, frame_arg_count); | 867 return CallStub(stub, frame_arg_count); |
| 865 Result result = cgen_->allocator()->Allocate(eax); | |
| 866 ASSERT(result.is_valid()); | |
| 867 return result; | |
| 868 } | 868 } |
| 869 | 869 |
| 870 | 870 |
| 871 Result VirtualFrame::CallStub(CodeStub* stub, | 871 Result VirtualFrame::CallStub(CodeStub* stub, |
| 872 Result* arg0, | 872 Result* arg0, |
| 873 Result* arg1, | 873 Result* arg1, |
| 874 int frame_arg_count) { | 874 int frame_arg_count) { |
| 875 arg0->Unuse(); | 875 arg0->Unuse(); |
| 876 arg1->Unuse(); | 876 arg1->Unuse(); |
| 877 CallStub(stub, frame_arg_count); | 877 return CallStub(stub, frame_arg_count); |
| 878 Result result = cgen_->allocator()->Allocate(eax); | |
| 879 ASSERT(result.is_valid()); | |
| 880 return result; | |
| 881 } | 878 } |
| 882 | 879 |
| 883 | 880 |
| 884 Result VirtualFrame::CallRuntime(Runtime::Function* f, | 881 Result VirtualFrame::CallRuntime(Runtime::Function* f, |
| 885 int frame_arg_count) { | 882 int frame_arg_count) { |
| 886 ASSERT(cgen_->HasValidEntryRegisters()); | 883 ASSERT(cgen_->HasValidEntryRegisters()); |
| 887 PrepareForCall(frame_arg_count); | 884 PrepareForCall(frame_arg_count); |
| 888 __ CallRuntime(f, frame_arg_count); | 885 __ CallRuntime(f, frame_arg_count); |
| 889 Result result = cgen_->allocator()->Allocate(eax); | 886 Result result = cgen_->allocator()->Allocate(eax); |
| 890 ASSERT(result.is_valid()); | 887 ASSERT(result.is_valid()); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 return false; | 1056 return false; |
| 1060 } | 1057 } |
| 1061 } | 1058 } |
| 1062 return true; | 1059 return true; |
| 1063 } | 1060 } |
| 1064 #endif | 1061 #endif |
| 1065 | 1062 |
| 1066 #undef __ | 1063 #undef __ |
| 1067 | 1064 |
| 1068 } } // namespace v8::internal | 1065 } } // namespace v8::internal |
| OLD | NEW |