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

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

Issue 1037453002: Split Thread/Isolate instances, but still maintain 1:1 relationship. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
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/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 Isolate* isolate = arguments.isolate(); \
81 Thread* thread = Thread::CurrentFromCurrentIsolate(isolate); \ 81 Thread* thread = isolate->main_thread(); \
82 ASSERT(thread == Thread::Current()); \
82 StackZone zone(isolate); \ 83 StackZone zone(isolate); \
83 HANDLESCOPE(isolate); \ 84 HANDLESCOPE(isolate); \
84 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \ 85 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \
85 } \ 86 } \
86 VERIFY_ON_TRANSITION; \ 87 VERIFY_ON_TRANSITION; \
87 } \ 88 } \
88 static void DRT_Helper##name(Isolate* isolate, \ 89 static void DRT_Helper##name(Isolate* isolate, \
89 Thread* thread, \ 90 Thread* thread, \
90 Zone* zone, \ 91 Zone* zone, \
91 NativeArguments arguments) 92 NativeArguments arguments)
(...skipping 12 matching lines...) Expand all
104 105
105 #define END_LEAF_RUNTIME_ENTRY } 106 #define END_LEAF_RUNTIME_ENTRY }
106 107
107 #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \ 108 #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \
108 extern const RuntimeEntry k##name##RuntimeEntry; \ 109 extern const RuntimeEntry k##name##RuntimeEntry; \
109 extern "C" type DLRT_##name(__VA_ARGS__) 110 extern "C" type DLRT_##name(__VA_ARGS__)
110 111
111 } // namespace dart 112 } // namespace dart
112 113
113 #endif // VM_RUNTIME_ENTRY_H_ 114 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698