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

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

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 10 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/safepoint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "vm/runtime_entry_list.h" 11 #include "vm/runtime_entry_list.h"
12 #include "vm/safepoint.h"
12 #include "vm/tags.h" 13 #include "vm/tags.h"
13 14
14 namespace dart { 15 namespace dart {
15 16
16 class Assembler; 17 class Assembler;
17 18
18 DECLARE_FLAG(bool, trace_runtime_calls); 19 DECLARE_FLAG(bool, trace_runtime_calls);
19 20
20 typedef void (*RuntimeFunction)(NativeArguments arguments); 21 typedef void (*RuntimeFunction)(NativeArguments arguments);
21 22
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 NativeArguments arguments); \ 89 NativeArguments arguments); \
89 void DRT_##name(NativeArguments arguments) { \ 90 void DRT_##name(NativeArguments arguments) { \
90 CHECK_STACK_ALIGNMENT; \ 91 CHECK_STACK_ALIGNMENT; \
91 VERIFY_ON_TRANSITION; \ 92 VERIFY_ON_TRANSITION; \
92 ASSERT(arguments.ArgCount() == argument_count); \ 93 ASSERT(arguments.ArgCount() == argument_count); \
93 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ 94 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \
94 { \ 95 { \
95 Thread* thread = arguments.thread(); \ 96 Thread* thread = arguments.thread(); \
96 ASSERT(thread == Thread::Current()); \ 97 ASSERT(thread == Thread::Current()); \
97 Isolate* isolate = thread->isolate(); \ 98 Isolate* isolate = thread->isolate(); \
99 TransitionGeneratedToVM transition(thread); \
98 StackZone zone(thread); \ 100 StackZone zone(thread); \
99 HANDLESCOPE(thread); \ 101 HANDLESCOPE(thread); \
100 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \ 102 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \
101 } \ 103 } \
102 VERIFY_ON_TRANSITION; \ 104 VERIFY_ON_TRANSITION; \
103 } \ 105 } \
104 static void DRT_Helper##name(Isolate* isolate, \ 106 static void DRT_Helper##name(Isolate* isolate, \
105 Thread* thread, \ 107 Thread* thread, \
106 Zone* zone, \ 108 Zone* zone, \
107 NativeArguments arguments) 109 NativeArguments arguments)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \ 171 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \
170 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id; 172 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id;
171 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS) 173 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS)
172 #undef CHECK_LEAF_RUNTIME_ADDRESS 174 #undef CHECK_LEAF_RUNTIME_ADDRESS
173 return kNoRuntimeFunctionId; 175 return kNoRuntimeFunctionId;
174 } 176 }
175 177
176 } // namespace dart 178 } // namespace dart
177 179
178 #endif // VM_RUNTIME_ENTRY_H_ 180 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/safepoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698