OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_RUNTIME_ENTRY_H_ | 5 #ifndef VM_RUNTIME_ENTRY_H_ |
6 #define VM_RUNTIME_ENTRY_H_ | 6 #define VM_RUNTIME_ENTRY_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 static void DRT_Helper##name(Isolate* isolate, \ | 70 static void DRT_Helper##name(Isolate* isolate, \ |
71 Thread* thread, \ | 71 Thread* thread, \ |
72 Zone* zone, \ | 72 Zone* zone, \ |
73 NativeArguments arguments); \ | 73 NativeArguments arguments); \ |
74 void DRT_##name(NativeArguments arguments) { \ | 74 void DRT_##name(NativeArguments arguments) { \ |
75 CHECK_STACK_ALIGNMENT; \ | 75 CHECK_STACK_ALIGNMENT; \ |
76 VERIFY_ON_TRANSITION; \ | 76 VERIFY_ON_TRANSITION; \ |
77 ASSERT(arguments.ArgCount() == argument_count); \ | 77 ASSERT(arguments.ArgCount() == argument_count); \ |
78 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ | 78 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ |
79 { \ | 79 { \ |
80 Isolate* isolate = arguments.isolate(); \ | 80 Thread* thread = arguments.thread(); \ |
81 Thread* thread = isolate->mutator_thread(); \ | |
82 ASSERT(thread == Thread::Current()); \ | 81 ASSERT(thread == Thread::Current()); \ |
| 82 Isolate* isolate = thread->isolate(); \ |
83 StackZone zone(isolate); \ | 83 StackZone zone(isolate); \ |
84 HANDLESCOPE(isolate); \ | 84 HANDLESCOPE(isolate); \ |
85 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \ | 85 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \ |
86 } \ | 86 } \ |
87 VERIFY_ON_TRANSITION; \ | 87 VERIFY_ON_TRANSITION; \ |
88 } \ | 88 } \ |
89 static void DRT_Helper##name(Isolate* isolate, \ | 89 static void DRT_Helper##name(Isolate* isolate, \ |
90 Thread* thread, \ | 90 Thread* thread, \ |
91 Zone* zone, \ | 91 Zone* zone, \ |
92 NativeArguments arguments) | 92 NativeArguments arguments) |
(...skipping 12 matching lines...) Expand all Loading... |
105 | 105 |
106 #define END_LEAF_RUNTIME_ENTRY } | 106 #define END_LEAF_RUNTIME_ENTRY } |
107 | 107 |
108 #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \ | 108 #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \ |
109 extern const RuntimeEntry k##name##RuntimeEntry; \ | 109 extern const RuntimeEntry k##name##RuntimeEntry; \ |
110 extern "C" type DLRT_##name(__VA_ARGS__) | 110 extern "C" type DLRT_##name(__VA_ARGS__) |
111 | 111 |
112 } // namespace dart | 112 } // namespace dart |
113 | 113 |
114 #endif // VM_RUNTIME_ENTRY_H_ | 114 #endif // VM_RUNTIME_ENTRY_H_ |
OLD | NEW |