| 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_tools_api.h" | 5 #include "include/dart_tools_api.h" |
| 6 | 6 |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 Dart_Handle* name, | 664 Dart_Handle* name, |
| 665 Dart_Handle* signature, | 665 Dart_Handle* signature, |
| 666 Dart_CodeLocation* location) { | 666 Dart_CodeLocation* location) { |
| 667 DARTSCOPE(Thread::Current()); | 667 DARTSCOPE(Thread::Current()); |
| 668 UNWRAP_AND_CHECK_PARAM(Instance, instance, closure); | 668 UNWRAP_AND_CHECK_PARAM(Instance, instance, closure); |
| 669 CHECK_NOT_NULL(location); | 669 CHECK_NOT_NULL(location); |
| 670 | 670 |
| 671 if (!instance.IsClosure()) { | 671 if (!instance.IsClosure()) { |
| 672 return Api::NewError("%s: parameter 0 is not a closure", CURRENT_FUNC); | 672 return Api::NewError("%s: parameter 0 is not a closure", CURRENT_FUNC); |
| 673 } | 673 } |
| 674 const Function& func = Function::Handle(Closure::function(instance)); | 674 const Function& func = Function::Handle(Closure::Cast(instance).function()); |
| 675 ASSERT(!func.IsNull()); | 675 ASSERT(!func.IsNull()); |
| 676 if (name != NULL) { | 676 if (name != NULL) { |
| 677 *name = Api::NewHandle(T, func.QualifiedUserVisibleName()); | 677 *name = Api::NewHandle(T, func.QualifiedUserVisibleName()); |
| 678 } | 678 } |
| 679 if (signature != NULL) { | 679 if (signature != NULL) { |
| 680 *signature = Api::NewHandle(T, func.UserVisibleSignature()); | 680 *signature = Api::NewHandle(T, func.UserVisibleSignature()); |
| 681 } | 681 } |
| 682 | 682 |
| 683 if (location != NULL) { | 683 if (location != NULL) { |
| 684 if (func.token_pos() >= 0) { | 684 if (func.token_pos() >= 0) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return Api::CastIsolate(isolate); | 954 return Api::CastIsolate(isolate); |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { | 958 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
| 959 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); | 959 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
| 960 return isolate->debugger()->GetIsolateId(); | 960 return isolate->debugger()->GetIsolateId(); |
| 961 } | 961 } |
| 962 | 962 |
| 963 } // namespace dart | 963 } // namespace dart |
| OLD | NEW |