OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #ifndef SRC_VM_INTRINSICS_H_ | 5 #ifndef SRC_VM_INTRINSICS_H_ |
6 #define SRC_VM_INTRINSICS_H_ | 6 #define SRC_VM_INTRINSICS_H_ |
7 | 7 |
8 #include "src/shared/globals.h" | 8 #include "src/shared/globals.h" |
9 | 9 |
10 namespace fletch { | 10 namespace dartino { |
11 | 11 |
12 #define INTRINSICS_DO(V) \ | 12 #define INTRINSICS_DO(V) \ |
13 V(ObjectEquals) \ | 13 V(ObjectEquals) \ |
14 V(GetField) \ | 14 V(GetField) \ |
15 V(SetField) \ | 15 V(SetField) \ |
16 V(ListIndexGet) \ | 16 V(ListIndexGet) \ |
17 V(ListIndexSet) \ | 17 V(ListIndexSet) \ |
18 V(ListLength) | 18 V(ListLength) |
19 | 19 |
20 #define DECLARE_EXTERN(name) extern "C" void Intrinsic_##name(); | 20 #define DECLARE_EXTERN(name) extern "C" void Intrinsic_##name(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 private: | 60 private: |
61 #define DECLARE_FIELD(name) void (*intrinsic_##name##_)(void); | 61 #define DECLARE_FIELD(name) void (*intrinsic_##name##_)(void); |
62 INTRINSICS_DO(DECLARE_FIELD) | 62 INTRINSICS_DO(DECLARE_FIELD) |
63 #undef DECLARE_FIELD | 63 #undef DECLARE_FIELD |
64 void (*last_member_)(void); | 64 void (*last_member_)(void); |
65 | 65 |
66 static IntrinsicsTable *default_table_; | 66 static IntrinsicsTable *default_table_; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace fletch | 69 } // namespace dartino |
70 | 70 |
71 #endif // SRC_VM_INTRINSICS_H_ | 71 #endif // SRC_VM_INTRINSICS_H_ |
OLD | NEW |