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

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

Issue 11040062: Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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_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 "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 14 matching lines...) Expand all
25 25
26 typedef void (*NativeFunction)(NativeArguments* arguments); 26 typedef void (*NativeFunction)(NativeArguments* arguments);
27 27
28 28
29 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name 29 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name
30 30
31 31
32 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ 32 #define DEFINE_NATIVE_ENTRY(name, argument_count) \
33 static RawObject* DN_Helper##name(Isolate* isolate, \ 33 static RawObject* DN_Helper##name(Isolate* isolate, \
34 NativeArguments* arguments); \ 34 NativeArguments* arguments); \
35 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ 35 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \
siva 2012/10/05 18:31:58 Not related to your change but could you adjust th
Tom Ball 2012/10/05 18:55:47 Done.
36 CHECK_STACK_ALIGNMENT; \ 36 CHECK_STACK_ALIGNMENT; \
37 VERIFY_ON_TRANSITION; \ 37 VERIFY_ON_TRANSITION; \
38 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \ 38 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \
39 ASSERT(arguments->Count() == argument_count); \ 39 ASSERT(arguments->Count() == argument_count); \
40 if (FLAG_trace_natives) OS::Print("Calling native: %s\n", ""#name); \ 40 if (FLAG_trace_natives) OS::Print("Calling native: %s\n", ""#name); \
41 { \ 41 { \
42 Zone zone(arguments->isolate()); \ 42 StackZone zone(arguments->isolate()); \
43 HANDLESCOPE(arguments->isolate()); \ 43 HANDLESCOPE(arguments->isolate()); \
44 arguments->SetReturnUnsafe( \ 44 arguments->SetReturnUnsafe( \
45 DN_Helper##name(arguments->isolate(), arguments)); \ 45 DN_Helper##name(arguments->isolate(), arguments)); \
46 if (FLAG_deoptimize_alot) DeoptimizeAll(); \ 46 if (FLAG_deoptimize_alot) DeoptimizeAll(); \
47 } \ 47 } \
48 VERIFY_ON_TRANSITION; \ 48 VERIFY_ON_TRANSITION; \
49 } \ 49 } \
50 static RawObject* DN_Helper##name(Isolate* isolate, \ 50 static RawObject* DN_Helper##name(Isolate* isolate, \
51 NativeArguments* arguments) 51 NativeArguments* arguments)
52 52
(...skipping 17 matching lines...) Expand all
70 public: 70 public:
71 // Resolve specified dart native function to the actual native entrypoint. 71 // Resolve specified dart native function to the actual native entrypoint.
72 static NativeFunction ResolveNative(const Class& cls, 72 static NativeFunction ResolveNative(const Class& cls,
73 const String& function_name, 73 const String& function_name,
74 int number_of_arguments); 74 int number_of_arguments);
75 }; 75 };
76 76
77 } // namespace dart 77 } // namespace dart
78 78
79 #endif // VM_NATIVE_ENTRY_H_ 79 #endif // VM_NATIVE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698