| 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 4406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4417 } else { | 4417 } else { |
| 4418 *buffer = NULL; | 4418 *buffer = NULL; |
| 4419 } | 4419 } |
| 4420 delete debug_region; | 4420 delete debug_region; |
| 4421 } else { | 4421 } else { |
| 4422 *buffer = NULL; | 4422 *buffer = NULL; |
| 4423 *buffer_size = 0; | 4423 *buffer_size = 0; |
| 4424 } | 4424 } |
| 4425 } | 4425 } |
| 4426 | 4426 |
| 4427 | |
| 4428 DART_EXPORT void Dart_InitPerfEventsSupport(void* perf_events_file) { | |
| 4429 Dart::set_perf_events_file(perf_events_file); | |
| 4430 } | |
| 4431 | |
| 4432 | |
| 4433 // --- Peer support --- | 4427 // --- Peer support --- |
| 4434 | 4428 |
| 4435 | 4429 |
| 4436 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) { | 4430 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) { |
| 4437 if (peer == NULL) { | 4431 if (peer == NULL) { |
| 4438 RETURN_NULL_ERROR(peer); | 4432 RETURN_NULL_ERROR(peer); |
| 4439 } | 4433 } |
| 4440 Isolate* isolate = Isolate::Current(); | 4434 Isolate* isolate = Isolate::Current(); |
| 4441 DARTSCOPE(isolate); | 4435 DARTSCOPE(isolate); |
| 4442 const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(object)); | 4436 const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(object)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 4465 } | 4459 } |
| 4466 { | 4460 { |
| 4467 NoGCScope no_gc; | 4461 NoGCScope no_gc; |
| 4468 RawObject* raw_obj = obj.raw(); | 4462 RawObject* raw_obj = obj.raw(); |
| 4469 isolate->heap()->SetPeer(raw_obj, peer); | 4463 isolate->heap()->SetPeer(raw_obj, peer); |
| 4470 } | 4464 } |
| 4471 return Api::Success(isolate); | 4465 return Api::Success(isolate); |
| 4472 } | 4466 } |
| 4473 | 4467 |
| 4474 } // namespace dart | 4468 } // namespace dart |
| OLD | NEW |