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

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

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-review-comments Created 4 years, 11 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_NATIVE_ENTRY_H_ 5 #ifndef VM_NATIVE_ENTRY_H_
6 #define VM_NATIVE_ENTRY_H_ 6 #define VM_NATIVE_ENTRY_H_
7 7
8 #include "platform/memory_sanitizer.h" 8 #include "platform/memory_sanitizer.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 VERIFY_ON_TRANSITION; \ 47 VERIFY_ON_TRANSITION; \
48 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \ 48 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \
49 /* Tell MemorySanitizer 'arguments' is initialized by generated code. */ \ 49 /* Tell MemorySanitizer 'arguments' is initialized by generated code. */ \
50 MSAN_UNPOISON(arguments, sizeof(*arguments)); \ 50 MSAN_UNPOISON(arguments, sizeof(*arguments)); \
51 ASSERT(arguments->NativeArgCount() == argument_count); \ 51 ASSERT(arguments->NativeArgCount() == argument_count); \
52 TRACE_NATIVE_CALL("%s", ""#name); \ 52 TRACE_NATIVE_CALL("%s", ""#name); \
53 { \ 53 { \
54 Thread* thread = arguments->thread(); \ 54 Thread* thread = arguments->thread(); \
55 ASSERT(thread == Thread::Current()); \ 55 ASSERT(thread == Thread::Current()); \
56 Isolate* isolate = thread->isolate(); \ 56 Isolate* isolate = thread->isolate(); \
57 TransitionGeneratedToVM transition(thread); \
57 StackZone zone(thread); \ 58 StackZone zone(thread); \
58 SET_NATIVE_RETVAL(arguments, \ 59 SET_NATIVE_RETVAL(arguments, \
59 DN_Helper##name(isolate, \ 60 DN_Helper##name(isolate, \
60 thread, \ 61 thread, \
61 zone.GetZone(), \ 62 zone.GetZone(), \
62 arguments)); \ 63 arguments)); \
63 DEOPTIMIZE_ALOT; \ 64 DEOPTIMIZE_ALOT; \
64 } \ 65 } \
65 VERIFY_ON_TRANSITION; \ 66 VERIFY_ON_TRANSITION; \
66 } \ 67 } \
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 static void NativeCallWrapper(Dart_NativeArguments args, 119 static void NativeCallWrapper(Dart_NativeArguments args,
119 Dart_NativeFunction func); 120 Dart_NativeFunction func);
120 121
121 static uword LinkNativeCallEntry(); 122 static uword LinkNativeCallEntry();
122 static void LinkNativeCall(Dart_NativeArguments args); 123 static void LinkNativeCall(Dart_NativeArguments args);
123 }; 124 };
124 125
125 } // namespace dart 126 } // namespace dart
126 127
127 #endif // VM_NATIVE_ENTRY_H_ 128 #endif // VM_NATIVE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698