OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 Result VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) { | 962 Result VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) { |
963 PrepareForCall(arg_count, arg_count); | 963 PrepareForCall(arg_count, arg_count); |
964 ASSERT(cgen()->HasValidEntryRegisters()); | 964 ASSERT(cgen()->HasValidEntryRegisters()); |
965 __ CallRuntime(id, arg_count); | 965 __ CallRuntime(id, arg_count); |
966 Result result = cgen()->allocator()->Allocate(rax); | 966 Result result = cgen()->allocator()->Allocate(rax); |
967 ASSERT(result.is_valid()); | 967 ASSERT(result.is_valid()); |
968 return result; | 968 return result; |
969 } | 969 } |
970 | 970 |
971 | 971 |
| 972 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 973 void VirtualFrame::DebugBreak() { |
| 974 PrepareForCall(0, 0); |
| 975 ASSERT(cgen()->HasValidEntryRegisters()); |
| 976 __ DebugBreak(); |
| 977 Result result = cgen()->allocator()->Allocate(rax); |
| 978 ASSERT(result.is_valid()); |
| 979 } |
| 980 #endif |
| 981 |
| 982 |
972 Result VirtualFrame::CallLoadIC(RelocInfo::Mode mode) { | 983 Result VirtualFrame::CallLoadIC(RelocInfo::Mode mode) { |
973 // Name and receiver are on the top of the frame. The IC expects | 984 // Name and receiver are on the top of the frame. The IC expects |
974 // name in rcx and receiver on the stack. It does not drop the | 985 // name in rcx and receiver on the stack. It does not drop the |
975 // receiver. | 986 // receiver. |
976 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); | 987 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
977 Result name = Pop(); | 988 Result name = Pop(); |
978 PrepareForCall(1, 0); // One stack arg, not callee-dropped. | 989 PrepareForCall(1, 0); // One stack arg, not callee-dropped. |
979 name.ToRegister(rcx); | 990 name.ToRegister(rcx); |
980 name.Unuse(); | 991 name.Unuse(); |
981 return RawCallCodeObject(ic, mode); | 992 return RawCallCodeObject(ic, mode); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 // Grow the expression stack by handler size less one (the return | 1105 // Grow the expression stack by handler size less one (the return |
1095 // address is already pushed by a call instruction). | 1106 // address is already pushed by a call instruction). |
1096 Adjust(kHandlerSize - 1); | 1107 Adjust(kHandlerSize - 1); |
1097 __ PushTryHandler(IN_JAVASCRIPT, type); | 1108 __ PushTryHandler(IN_JAVASCRIPT, type); |
1098 } | 1109 } |
1099 | 1110 |
1100 | 1111 |
1101 #undef __ | 1112 #undef __ |
1102 | 1113 |
1103 } } // namespace v8::internal | 1114 } } // namespace v8::internal |
OLD | NEW |