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

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

Issue 23453035: 1. Add flag --trace-api to trace API function invocation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 25 matching lines...) Expand all
36 #endif 36 #endif
37 37
38 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ 38 #define DEFINE_NATIVE_ENTRY(name, argument_count) \
39 static RawObject* DN_Helper##name(Isolate* isolate, \ 39 static RawObject* DN_Helper##name(Isolate* isolate, \
40 NativeArguments* arguments); \ 40 NativeArguments* arguments); \
41 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ 41 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \
42 CHECK_STACK_ALIGNMENT; \ 42 CHECK_STACK_ALIGNMENT; \
43 VERIFY_ON_TRANSITION; \ 43 VERIFY_ON_TRANSITION; \
44 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \ 44 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \
45 ASSERT(arguments->NativeArgCount() == argument_count); \ 45 ASSERT(arguments->NativeArgCount() == argument_count); \
46 TRACE_NATIVES(""#name); \ 46 TRACE_NATIVES("%s", ""#name); \
47 { \ 47 { \
48 StackZone zone(arguments->isolate()); \ 48 StackZone zone(arguments->isolate()); \
49 SET_NATIVE_RETVAL(arguments, \ 49 SET_NATIVE_RETVAL(arguments, \
50 DN_Helper##name(arguments->isolate(), arguments)); \ 50 DN_Helper##name(arguments->isolate(), arguments)); \
51 DEOPTIMIZE_ALOT; \ 51 DEOPTIMIZE_ALOT; \
52 } \ 52 } \
53 VERIFY_ON_TRANSITION; \ 53 VERIFY_ON_TRANSITION; \
54 } \ 54 } \
55 static RawObject* DN_Helper##name(Isolate* isolate, \ 55 static RawObject* DN_Helper##name(Isolate* isolate, \
56 NativeArguments* arguments) 56 NativeArguments* arguments)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const String& function_name, 95 const String& function_name,
96 int number_of_arguments); 96 int number_of_arguments);
97 static void NativeCallWrapper(Dart_NativeArguments args, 97 static void NativeCallWrapper(Dart_NativeArguments args,
98 Dart_NativeFunction func); 98 Dart_NativeFunction func);
99 static const ExternalLabel& NativeCallWrapperLabel(); 99 static const ExternalLabel& NativeCallWrapperLabel();
100 }; 100 };
101 101
102 } // namespace dart 102 } // namespace dart
103 103
104 #endif // VM_NATIVE_ENTRY_H_ 104 #endif // VM_NATIVE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698