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 VM_BOOTSTRAP_NATIVES_H_ | 5 #ifndef VM_BOOTSTRAP_NATIVES_H_ |
6 #define VM_BOOTSTRAP_NATIVES_H_ | 6 #define VM_BOOTSTRAP_NATIVES_H_ |
7 | 7 |
8 #include "vm/native_entry.h" | 8 #include "vm/native_entry.h" |
9 | 9 |
10 // bootstrap dart natives used in the core dart library. | 10 // bootstrap dart natives used in the core dart library. |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 // List of bootstrap native entry points used in the core dart library. | 14 // List of bootstrap native entry points used in the core dart library. |
15 #define BOOTSTRAP_NATIVE_LIST(V) \ | 15 #define BOOTSTRAP_NATIVE_LIST(V) \ |
16 V(Object_equals, 2) \ | 16 V(Object_equals, 2) \ |
17 V(Object_getHash, 1) \ | 17 V(Object_getHash, 1) \ |
18 V(Object_setHash, 2) \ | 18 V(Object_setHash, 2) \ |
19 V(Object_toString, 1) \ | 19 V(Object_toString, 1) \ |
20 V(Object_noSuchMethod, 6) \ | 20 V(Object_noSuchMethod, 6) \ |
21 V(Object_runtimeType, 1) \ | 21 V(Object_runtimeType, 1) \ |
22 V(Object_instanceOf, 5) \ | 22 V(Object_instanceOf, 5) \ |
23 V(Object_as, 4) \ | 23 V(Object_as, 4) \ |
24 V(Object_cid, 1) \ | |
25 V(Function_apply, 2) \ | 24 V(Function_apply, 2) \ |
26 V(FunctionImpl_equals, 2) \ | 25 V(FunctionImpl_equals, 2) \ |
27 V(FunctionImpl_hashCode, 1) \ | 26 V(FunctionImpl_hashCode, 1) \ |
28 V(AbstractType_toString, 1) \ | 27 V(AbstractType_toString, 1) \ |
29 V(Identical_comparison, 2) \ | 28 V(Identical_comparison, 2) \ |
30 V(Integer_bitAndFromInteger, 2) \ | 29 V(Integer_bitAndFromInteger, 2) \ |
31 V(Integer_bitOrFromInteger, 2) \ | 30 V(Integer_bitOrFromInteger, 2) \ |
32 V(Integer_bitXorFromInteger, 2) \ | 31 V(Integer_bitXorFromInteger, 2) \ |
33 V(Integer_addFromInteger, 2) \ | 32 V(Integer_addFromInteger, 2) \ |
34 V(Integer_subFromInteger, 2) \ | 33 V(Integer_subFromInteger, 2) \ |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 V(WeakProperty_getValue, 1) \ | 350 V(WeakProperty_getValue, 1) \ |
352 V(WeakProperty_setValue, 2) \ | 351 V(WeakProperty_setValue, 2) \ |
353 V(Uri_isWindowsPlatform, 0) \ | 352 V(Uri_isWindowsPlatform, 0) \ |
354 V(LibraryPrefix_load, 1) \ | 353 V(LibraryPrefix_load, 1) \ |
355 V(LibraryPrefix_invalidateDependentCode, 1) \ | 354 V(LibraryPrefix_invalidateDependentCode, 1) \ |
356 V(UserTag_new, 2) \ | 355 V(UserTag_new, 2) \ |
357 V(UserTag_label, 1) \ | 356 V(UserTag_label, 1) \ |
358 V(UserTag_defaultTag, 0) \ | 357 V(UserTag_defaultTag, 0) \ |
359 V(UserTag_makeCurrent, 1) \ | 358 V(UserTag_makeCurrent, 1) \ |
360 V(Profiler_getCurrentTag, 0) \ | 359 V(Profiler_getCurrentTag, 0) \ |
| 360 V(ClassID_getID, 1) \ |
361 | 361 |
362 | 362 |
363 class BootstrapNatives : public AllStatic { | 363 class BootstrapNatives : public AllStatic { |
364 public: | 364 public: |
365 static Dart_NativeFunction Lookup(Dart_Handle name, | 365 static Dart_NativeFunction Lookup(Dart_Handle name, |
366 int argument_count, | 366 int argument_count, |
367 bool* auto_setup_scope); | 367 bool* auto_setup_scope); |
368 | 368 |
369 static const uint8_t* Symbol(Dart_NativeFunction* nf); | 369 static const uint8_t* Symbol(Dart_NativeFunction* nf); |
370 | 370 |
371 #define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \ | 371 #define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \ |
372 static void DN_##name(Dart_NativeArguments args); | 372 static void DN_##name(Dart_NativeArguments args); |
373 | 373 |
374 BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE) | 374 BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE) |
375 | 375 |
376 #undef DECLARE_BOOTSTRAP_NATIVE | 376 #undef DECLARE_BOOTSTRAP_NATIVE |
377 }; | 377 }; |
378 | 378 |
379 } // namespace dart | 379 } // namespace dart |
380 | 380 |
381 #endif // VM_BOOTSTRAP_NATIVES_H_ | 381 #endif // VM_BOOTSTRAP_NATIVES_H_ |
OLD | NEW |