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

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

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/scavenger.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/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); 45 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry);
46 }; 46 };
47 47
48 48
49 // Helper macros for declaring and defining runtime entries. 49 // Helper macros for declaring and defining runtime entries.
50 50
51 #define DEFINE_RUNTIME_ENTRY(name, argument_count) \ 51 #define DEFINE_RUNTIME_ENTRY(name, argument_count) \
52 extern void DRT_##name(NativeArguments arguments); \ 52 extern void DRT_##name(NativeArguments arguments); \
53 extern const RuntimeEntry k##name##RuntimeEntry( \ 53 extern const RuntimeEntry k##name##RuntimeEntry( \
54 "DRT_"#name, &DRT_##name, argument_count); \ 54 "DRT_"#name, &DRT_##name, argument_count); \
55 static void DRT_Helper##name(NativeArguments arguments); \ 55 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments); \
56 void DRT_##name(NativeArguments arguments) { \ 56 void DRT_##name(NativeArguments arguments) { \
57 CHECK_STACK_ALIGNMENT; \ 57 CHECK_STACK_ALIGNMENT; \
58 VERIFY_ON_TRANSITION; \ 58 VERIFY_ON_TRANSITION; \
59 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ 59 if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \
60 { \ 60 { \
61 Zone zone; \ 61 Zone zone(arguments.isolate()); \
62 HANDLESCOPE(); \ 62 HANDLESCOPE(arguments.isolate()); \
63 DRT_Helper##name(arguments); \ 63 DRT_Helper##name(arguments.isolate(), arguments); \
64 } \ 64 } \
65 VERIFY_ON_TRANSITION; \ 65 VERIFY_ON_TRANSITION; \
66 } \ 66 } \
67 static void DRT_Helper##name(NativeArguments arguments) 67 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments)
68 68
69 #define DECLARE_RUNTIME_ENTRY(name) \ 69 #define DECLARE_RUNTIME_ENTRY(name) \
70 extern const RuntimeEntry k##name##RuntimeEntry 70 extern const RuntimeEntry k##name##RuntimeEntry
71 71
72 } // namespace dart 72 } // namespace dart
73 73
74 #endif // VM_RUNTIME_ENTRY_H_ 74 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698