| 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 4435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4446 *buffer_size = 0; | 4446 *buffer_size = 0; |
| 4447 } | 4447 } |
| 4448 } | 4448 } |
| 4449 | 4449 |
| 4450 | 4450 |
| 4451 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { | 4451 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { |
| 4452 Dart::set_perf_events_writer(function); | 4452 Dart::set_perf_events_writer(function); |
| 4453 } | 4453 } |
| 4454 | 4454 |
| 4455 | 4455 |
| 4456 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { | |
| 4457 Dart::set_flow_graph_writer(function); | |
| 4458 } | |
| 4459 | |
| 4460 | |
| 4461 // --- Peer support --- | 4456 // --- Peer support --- |
| 4462 | 4457 |
| 4463 | 4458 |
| 4464 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) { | 4459 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) { |
| 4465 if (peer == NULL) { | 4460 if (peer == NULL) { |
| 4466 RETURN_NULL_ERROR(peer); | 4461 RETURN_NULL_ERROR(peer); |
| 4467 } | 4462 } |
| 4468 Isolate* isolate = Isolate::Current(); | 4463 Isolate* isolate = Isolate::Current(); |
| 4469 const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(object)); | 4464 const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(object)); |
| 4470 if (obj.IsNull() || obj.IsNumber() || obj.IsBool()) { | 4465 if (obj.IsNull() || obj.IsNumber() || obj.IsBool()) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 4491 } | 4486 } |
| 4492 { | 4487 { |
| 4493 NoGCScope no_gc; | 4488 NoGCScope no_gc; |
| 4494 RawObject* raw_obj = obj.raw(); | 4489 RawObject* raw_obj = obj.raw(); |
| 4495 isolate->heap()->SetPeer(raw_obj, peer); | 4490 isolate->heap()->SetPeer(raw_obj, peer); |
| 4496 } | 4491 } |
| 4497 return Api::Success(isolate); | 4492 return Api::Success(isolate); |
| 4498 } | 4493 } |
| 4499 | 4494 |
| 4500 } // namespace dart | 4495 } // namespace dart |
| OLD | NEW |