OLD | NEW |
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 BIN_BUILTIN_H_ | 5 #ifndef BIN_BUILTIN_H_ |
6 #define BIN_BUILTIN_H_ | 6 #define BIN_BUILTIN_H_ |
7 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #define UNIMPLEMENTED() \ | 28 #define UNIMPLEMENTED() \ |
29 FATAL("unimplemented code") | 29 FATAL("unimplemented code") |
30 | 30 |
31 #define FUNCTION_NAME(name) Builtin_##name | 31 #define FUNCTION_NAME(name) Builtin_##name |
32 #define REGISTER_FUNCTION(name, count) \ | 32 #define REGISTER_FUNCTION(name, count) \ |
33 { ""#name, FUNCTION_NAME(name), count }, | 33 { ""#name, FUNCTION_NAME(name), count }, |
34 #define DECLARE_FUNCTION(name, count) \ | 34 #define DECLARE_FUNCTION(name, count) \ |
35 extern void FUNCTION_NAME(name)(Dart_NativeArguments args); | 35 extern void FUNCTION_NAME(name)(Dart_NativeArguments args); |
36 | 36 |
37 extern Dart_Handle Builtin_Source(); | 37 |
38 extern void Builtin_SetupLibrary(Dart_Handle builtin_lib); | 38 class Builtin { |
39 extern void Builtin_ImportLibrary(Dart_Handle library); | 39 public: |
40 extern void Builtin_SetNativeResolver(); | 40 static Dart_Handle Source(); |
41 extern void PrintString(FILE* out, Dart_Handle object); | 41 static void SetupLibrary(Dart_Handle builtin_lib); |
| 42 static void ImportLibrary(Dart_Handle library); |
| 43 static void SetNativeResolver(); |
| 44 static void PrintString(FILE* out, Dart_Handle object); |
| 45 |
| 46 private: |
| 47 static Dart_NativeFunction NativeLookup(Dart_Handle name, |
| 48 int argument_count); |
| 49 |
| 50 static const char Builtin_source_[]; |
| 51 |
| 52 DISALLOW_ALLOCATION(); |
| 53 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); |
| 54 }; |
| 55 |
42 | 56 |
43 #endif // BIN_BUILTIN_H_ | 57 #endif // BIN_BUILTIN_H_ |
OLD | NEW |