Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: runtime/vm/runtime_entry.h

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/flags.h" 9 #include "vm/flags.h"
10 #include "vm/native_arguments.h" 10 #include "vm/native_arguments.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void DRT_##name(NativeArguments arguments) { \ 135 void DRT_##name(NativeArguments arguments) { \
136 CHECK_STACK_ALIGNMENT; \ 136 CHECK_STACK_ALIGNMENT; \
137 VERIFY_ON_TRANSITION; \ 137 VERIFY_ON_TRANSITION; \
138 ASSERT(arguments.ArgCount() == argument_count); \ 138 ASSERT(arguments.ArgCount() == argument_count); \
139 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ 139 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \
140 { \ 140 { \
141 Thread* thread = arguments.thread(); \ 141 Thread* thread = arguments.thread(); \
142 ASSERT(thread == Thread::Current()); \ 142 ASSERT(thread == Thread::Current()); \
143 Isolate* isolate = thread->isolate(); \ 143 Isolate* isolate = thread->isolate(); \
144 StackZone zone(thread); \ 144 StackZone zone(thread); \
145 HANDLESCOPE(isolate); \ 145 HANDLESCOPE(thread); \
146 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \ 146 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \
147 } \ 147 } \
148 VERIFY_ON_TRANSITION; \ 148 VERIFY_ON_TRANSITION; \
149 } \ 149 } \
150 static void DRT_Helper##name(Isolate* isolate, \ 150 static void DRT_Helper##name(Isolate* isolate, \
151 Thread* thread, \ 151 Thread* thread, \
152 Zone* zone, \ 152 Zone* zone, \
153 NativeArguments arguments) 153 NativeArguments arguments)
154 154
155 #define DECLARE_RUNTIME_ENTRY(name) \ 155 #define DECLARE_RUNTIME_ENTRY(name) \
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \ 209 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \
210 if (address == reinterpret_cast<uword>(&DLRT_##name)) return k##name##Id; 210 if (address == reinterpret_cast<uword>(&DLRT_##name)) return k##name##Id;
211 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS) 211 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS)
212 #undef CHECK_LEAF_RUNTIME_ADDRESS 212 #undef CHECK_LEAF_RUNTIME_ADDRESS
213 return kNoRuntimeFunctionId; 213 return kNoRuntimeFunctionId;
214 } 214 }
215 215
216 } // namespace dart 216 } // namespace dart
217 217
218 #endif // VM_RUNTIME_ENTRY_H_ 218 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698