| 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 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3538 String& cls_name = String::Handle(isolate); | 3538 String& cls_name = String::Handle(isolate); |
| 3539 cls_name ^= param.raw(); | 3539 cls_name ^= param.raw(); |
| 3540 cls_name = Symbols::New(cls_name); | 3540 cls_name = Symbols::New(cls_name); |
| 3541 Library& lib = Library::Handle(isolate); | 3541 Library& lib = Library::Handle(isolate); |
| 3542 lib ^= Api::UnwrapHandle(library); | 3542 lib ^= Api::UnwrapHandle(library); |
| 3543 if (lib.IsNull()) { | 3543 if (lib.IsNull()) { |
| 3544 return Api::NewError( | 3544 return Api::NewError( |
| 3545 "Invalid arguments passed to Dart_CreateNativeWrapperClass"); | 3545 "Invalid arguments passed to Dart_CreateNativeWrapperClass"); |
| 3546 } | 3546 } |
| 3547 const Class& cls = Class::Handle( | 3547 const Class& cls = Class::Handle( |
| 3548 isolate, Class::NewNativeWrapper(&lib, cls_name, field_count)); | 3548 isolate, Class::NewNativeWrapper(lib, cls_name, field_count)); |
| 3549 if (cls.IsNull()) { | 3549 if (cls.IsNull()) { |
| 3550 return Api::NewError( | 3550 return Api::NewError( |
| 3551 "Unable to create native wrapper class : already exists"); | 3551 "Unable to create native wrapper class : already exists"); |
| 3552 } | 3552 } |
| 3553 return Api::NewHandle(isolate, cls.raw()); | 3553 return Api::NewHandle(isolate, cls.raw()); |
| 3554 } | 3554 } |
| 3555 | 3555 |
| 3556 | 3556 |
| 3557 DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj, | 3557 DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj, |
| 3558 int* count) { | 3558 int* count) { |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4081 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { | 4081 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { |
| 4082 Dart::set_perf_events_writer(function); | 4082 Dart::set_perf_events_writer(function); |
| 4083 } | 4083 } |
| 4084 | 4084 |
| 4085 | 4085 |
| 4086 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { | 4086 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { |
| 4087 Dart::set_flow_graph_writer(function); | 4087 Dart::set_flow_graph_writer(function); |
| 4088 } | 4088 } |
| 4089 | 4089 |
| 4090 } // namespace dart | 4090 } // namespace dart |
| OLD | NEW |