| 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. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 V(Int32x4_setFlagX, 2) \ | 309 V(Int32x4_setFlagX, 2) \ |
| 310 V(Int32x4_setFlagY, 2) \ | 310 V(Int32x4_setFlagY, 2) \ |
| 311 V(Int32x4_setFlagZ, 2) \ | 311 V(Int32x4_setFlagZ, 2) \ |
| 312 V(Int32x4_setFlagW, 2) \ | 312 V(Int32x4_setFlagW, 2) \ |
| 313 V(Int32x4_select, 3) \ | 313 V(Int32x4_select, 3) \ |
| 314 V(Isolate_spawnFunction, 10) \ | 314 V(Isolate_spawnFunction, 10) \ |
| 315 V(Isolate_spawnUri, 12) \ | 315 V(Isolate_spawnUri, 12) \ |
| 316 V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0) \ | 316 V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0) \ |
| 317 V(Isolate_getCurrentRootUriStr, 0) \ | 317 V(Isolate_getCurrentRootUriStr, 0) \ |
| 318 V(Isolate_sendOOB, 2) \ | 318 V(Isolate_sendOOB, 2) \ |
| 319 V(GrowableList_allocate, 2) \ |
| 320 V(GrowableList_getIndexed, 2) \ |
| 321 V(GrowableList_setIndexed, 3) \ |
| 322 V(GrowableList_getLength, 1) \ |
| 323 V(GrowableList_getCapacity, 1) \ |
| 324 V(GrowableList_setLength, 2) \ |
| 325 V(GrowableList_setData, 2) \ |
| 326 V(Internal_makeListFixedLength, 1) \ |
| 327 V(Internal_makeFixedListUnmodifiable, 1) \ |
| 328 V(Internal_inquireIs64Bit, 0) \ |
| 329 V(LinkedHashMap_allocate, 1) \ |
| 330 V(LinkedHashMap_getIndex, 1) \ |
| 331 V(LinkedHashMap_setIndex, 2) \ |
| 332 V(LinkedHashMap_getData, 1) \ |
| 333 V(LinkedHashMap_setData, 2) \ |
| 334 V(LinkedHashMap_getHashMask, 1) \ |
| 335 V(LinkedHashMap_setHashMask, 2) \ |
| 336 V(LinkedHashMap_getUsedData, 1) \ |
| 337 V(LinkedHashMap_setUsedData, 2) \ |
| 338 V(LinkedHashMap_getDeletedKeys, 1) \ |
| 339 V(LinkedHashMap_setDeletedKeys, 2) \ |
| 340 V(WeakProperty_new, 2) \ |
| 341 V(WeakProperty_getKey, 1) \ |
| 342 V(WeakProperty_getValue, 1) \ |
| 343 V(WeakProperty_setValue, 2) \ |
| 344 V(Uri_isWindowsPlatform, 0) \ |
| 345 V(LibraryPrefix_load, 1) \ |
| 346 V(LibraryPrefix_invalidateDependentCode, 1) \ |
| 347 V(LibraryPrefix_loadError, 1) \ |
| 348 V(LibraryPrefix_isLoaded, 1) \ |
| 349 V(UserTag_new, 2) \ |
| 350 V(UserTag_label, 1) \ |
| 351 V(UserTag_defaultTag, 0) \ |
| 352 V(UserTag_makeCurrent, 1) \ |
| 353 V(Profiler_getCurrentTag, 0) \ |
| 354 V(ClassID_getID, 1) \ |
| 355 V(Num_toString, 1) \ |
| 356 V(VMService_SendIsolateServiceMessage, 2) \ |
| 357 V(VMService_SendRootServiceMessage, 1) \ |
| 358 V(VMService_OnStart, 0) \ |
| 359 V(VMService_OnExit, 0) \ |
| 360 V(VMService_OnServerAddressChange, 1) \ |
| 361 V(VMService_ListenStream, 1) \ |
| 362 V(VMService_CancelStream, 1) \ |
| 363 V(VMService_RequestAssets, 0) \ |
| 364 V(VMService_DecodeAssets, 1) \ |
| 365 |
| 366 // List of bootstrap native entry points used in the dart:mirror library. |
| 367 #define MIRRORS_BOOTSTRAP_NATIVE_LIST(V) \ |
| 319 V(Mirrors_evalInLibraryWithPrivateKey, 2) \ | 368 V(Mirrors_evalInLibraryWithPrivateKey, 2) \ |
| 320 V(Mirrors_makeLocalClassMirror, 1) \ | 369 V(Mirrors_makeLocalClassMirror, 1) \ |
| 321 V(Mirrors_makeLocalTypeMirror, 1) \ | 370 V(Mirrors_makeLocalTypeMirror, 1) \ |
| 322 V(Mirrors_mangleName, 2) \ | 371 V(Mirrors_mangleName, 2) \ |
| 323 V(MirrorReference_equals, 2) \ | 372 V(MirrorReference_equals, 2) \ |
| 324 V(MirrorSystem_libraries, 0) \ | 373 V(MirrorSystem_libraries, 0) \ |
| 325 V(MirrorSystem_isolate, 0) \ | 374 V(MirrorSystem_isolate, 0) \ |
| 326 V(InstanceMirror_invoke, 5) \ | 375 V(InstanceMirror_invoke, 5) \ |
| 327 V(InstanceMirror_invokeGetter, 3) \ | 376 V(InstanceMirror_invokeGetter, 3) \ |
| 328 V(InstanceMirror_invokeSetter, 4) \ | 377 V(InstanceMirror_invokeSetter, 4) \ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 358 V(FunctionTypeMirror_parameters, 2) \ | 407 V(FunctionTypeMirror_parameters, 2) \ |
| 359 V(FunctionTypeMirror_return_type, 2) \ | 408 V(FunctionTypeMirror_return_type, 2) \ |
| 360 V(MethodMirror_owner, 2) \ | 409 V(MethodMirror_owner, 2) \ |
| 361 V(MethodMirror_parameters, 2) \ | 410 V(MethodMirror_parameters, 2) \ |
| 362 V(MethodMirror_return_type, 2) \ | 411 V(MethodMirror_return_type, 2) \ |
| 363 V(MethodMirror_source, 1) \ | 412 V(MethodMirror_source, 1) \ |
| 364 V(ParameterMirror_type, 3) \ | 413 V(ParameterMirror_type, 3) \ |
| 365 V(TypedefMirror_referent, 1) \ | 414 V(TypedefMirror_referent, 1) \ |
| 366 V(TypedefMirror_declaration, 1) \ | 415 V(TypedefMirror_declaration, 1) \ |
| 367 V(VariableMirror_type, 2) \ | 416 V(VariableMirror_type, 2) \ |
| 368 V(GrowableList_allocate, 2) \ | |
| 369 V(GrowableList_getIndexed, 2) \ | |
| 370 V(GrowableList_setIndexed, 3) \ | |
| 371 V(GrowableList_getLength, 1) \ | |
| 372 V(GrowableList_getCapacity, 1) \ | |
| 373 V(GrowableList_setLength, 2) \ | |
| 374 V(GrowableList_setData, 2) \ | |
| 375 V(Internal_makeListFixedLength, 1) \ | |
| 376 V(Internal_makeFixedListUnmodifiable, 1) \ | |
| 377 V(Internal_inquireIs64Bit, 0) \ | |
| 378 V(LinkedHashMap_allocate, 1) \ | |
| 379 V(LinkedHashMap_getIndex, 1) \ | |
| 380 V(LinkedHashMap_setIndex, 2) \ | |
| 381 V(LinkedHashMap_getData, 1) \ | |
| 382 V(LinkedHashMap_setData, 2) \ | |
| 383 V(LinkedHashMap_getHashMask, 1) \ | |
| 384 V(LinkedHashMap_setHashMask, 2) \ | |
| 385 V(LinkedHashMap_getUsedData, 1) \ | |
| 386 V(LinkedHashMap_setUsedData, 2) \ | |
| 387 V(LinkedHashMap_getDeletedKeys, 1) \ | |
| 388 V(LinkedHashMap_setDeletedKeys, 2) \ | |
| 389 V(WeakProperty_new, 2) \ | |
| 390 V(WeakProperty_getKey, 1) \ | |
| 391 V(WeakProperty_getValue, 1) \ | |
| 392 V(WeakProperty_setValue, 2) \ | |
| 393 V(Uri_isWindowsPlatform, 0) \ | |
| 394 V(LibraryPrefix_load, 1) \ | |
| 395 V(LibraryPrefix_invalidateDependentCode, 1) \ | |
| 396 V(LibraryPrefix_loadError, 1) \ | |
| 397 V(LibraryPrefix_isLoaded, 1) \ | |
| 398 V(UserTag_new, 2) \ | |
| 399 V(UserTag_label, 1) \ | |
| 400 V(UserTag_defaultTag, 0) \ | |
| 401 V(UserTag_makeCurrent, 1) \ | |
| 402 V(Profiler_getCurrentTag, 0) \ | |
| 403 V(ClassID_getID, 1) \ | |
| 404 V(Num_toString, 1) \ | |
| 405 V(VMService_SendIsolateServiceMessage, 2) \ | |
| 406 V(VMService_SendRootServiceMessage, 1) \ | |
| 407 V(VMService_OnStart, 0) \ | |
| 408 V(VMService_OnExit, 0) \ | |
| 409 V(VMService_OnServerAddressChange, 1) \ | |
| 410 V(VMService_ListenStream, 1) \ | |
| 411 V(VMService_CancelStream, 1) \ | |
| 412 V(VMService_RequestAssets, 0) \ | |
| 413 V(VMService_DecodeAssets, 1) \ | |
| 414 | 417 |
| 415 class BootstrapNatives : public AllStatic { | 418 class BootstrapNatives : public AllStatic { |
| 416 public: | 419 public: |
| 417 static Dart_NativeFunction Lookup(Dart_Handle name, | 420 static Dart_NativeFunction Lookup(Dart_Handle name, |
| 418 int argument_count, | 421 int argument_count, |
| 419 bool* auto_setup_scope); | 422 bool* auto_setup_scope); |
| 420 | 423 |
| 421 static const uint8_t* Symbol(Dart_NativeFunction* nf); | 424 static const uint8_t* Symbol(Dart_NativeFunction* nf); |
| 422 | 425 |
| 423 #define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \ | 426 #define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \ |
| 424 static void DN_##name(Dart_NativeArguments args); | 427 static void DN_##name(Dart_NativeArguments args); |
| 425 | 428 |
| 426 BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE) | 429 BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE) |
| 430 #ifndef PRODUCT |
| 431 MIRRORS_BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE) |
| 432 #endif |
| 427 | 433 |
| 428 #undef DECLARE_BOOTSTRAP_NATIVE | 434 #undef DECLARE_BOOTSTRAP_NATIVE |
| 429 }; | 435 }; |
| 430 | 436 |
| 431 } // namespace dart | 437 } // namespace dart |
| 432 | 438 |
| 433 #endif // VM_BOOTSTRAP_NATIVES_H_ | 439 #endif // VM_BOOTSTRAP_NATIVES_H_ |
| OLD | NEW |