OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 RUNTIME_BIN_BUILTIN_H_ | 5 #ifndef RUNTIME_BIN_BUILTIN_H_ |
6 #define RUNTIME_BIN_BUILTIN_H_ | 6 #define RUNTIME_BIN_BUILTIN_H_ |
7 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
11 #include "include/dart_api.h" | 11 #include "include/dart_api.h" |
12 | 12 |
13 #include "platform/assert.h" | 13 #include "platform/assert.h" |
14 #include "platform/globals.h" | 14 #include "platform/globals.h" |
15 | 15 |
16 namespace dart { | 16 namespace dart { |
17 namespace bin { | 17 namespace bin { |
18 | 18 |
19 #define FUNCTION_NAME(name) Builtin_##name | 19 #define FUNCTION_NAME(name) Builtin_##name |
20 #define REGISTER_FUNCTION(name, count) \ | 20 #define REGISTER_FUNCTION(name, count) {"" #name, FUNCTION_NAME(name), count}, |
21 { ""#name, FUNCTION_NAME(name), count }, | |
22 #define DECLARE_FUNCTION(name, count) \ | 21 #define DECLARE_FUNCTION(name, count) \ |
23 extern void FUNCTION_NAME(name)(Dart_NativeArguments args); | 22 extern void FUNCTION_NAME(name)(Dart_NativeArguments args); |
24 | 23 |
25 | 24 |
26 class Builtin { | 25 class Builtin { |
27 public: | 26 public: |
28 // Note: Changes to this enum should be accompanied with changes to | 27 // Note: Changes to this enum should be accompanied with changes to |
29 // the builtin_libraries_ array in builtin.cc and builtin_nolib.cc. | 28 // the builtin_libraries_ array in builtin.cc and builtin_nolib.cc. |
30 enum BuiltinLibraryId { | 29 enum BuiltinLibraryId { |
31 kInvalidLibrary = -1, | 30 kInvalidLibrary = -1, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 static builtin_lib_props builtin_libraries_[]; | 96 static builtin_lib_props builtin_libraries_[]; |
98 | 97 |
99 DISALLOW_ALLOCATION(); | 98 DISALLOW_ALLOCATION(); |
100 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); |
101 }; | 100 }; |
102 | 101 |
103 } // namespace bin | 102 } // namespace bin |
104 } // namespace dart | 103 } // namespace dart |
105 | 104 |
106 #endif // RUNTIME_BIN_BUILTIN_H_ | 105 #endif // RUNTIME_BIN_BUILTIN_H_ |
OLD | NEW |