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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 return Api::NewHandle( | 599 return Api::NewHandle( |
600 T, cls.Evaluate(expr, Array::empty_array(), Array::empty_array())); | 600 T, cls.Evaluate(expr, Array::empty_array(), Array::empty_array())); |
601 } | 601 } |
602 return Api::NewError("%s: unsupported target type", CURRENT_FUNC); | 602 return Api::NewError("%s: unsupported target type", CURRENT_FUNC); |
603 } | 603 } |
604 | 604 |
605 | 605 |
606 DART_EXPORT Dart_Handle Dart_GetObjClass(Dart_Handle object_in) { | 606 DART_EXPORT Dart_Handle Dart_GetObjClass(Dart_Handle object_in) { |
607 DARTSCOPE(Thread::Current()); | 607 DARTSCOPE(Thread::Current()); |
608 UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in); | 608 UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in); |
609 return Api::NewHandle(T, obj.GetType()); | 609 return Api::NewHandle(T, obj.GetType(Heap::kNew)); |
610 } | 610 } |
611 | 611 |
612 | 612 |
613 DART_EXPORT Dart_Handle Dart_GetObjClassId(Dart_Handle object_in, | 613 DART_EXPORT Dart_Handle Dart_GetObjClassId(Dart_Handle object_in, |
614 intptr_t* class_id) { | 614 intptr_t* class_id) { |
615 DARTSCOPE(Thread::Current()); | 615 DARTSCOPE(Thread::Current()); |
616 UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in); | 616 UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in); |
617 CHECK_NOT_NULL(class_id); | 617 CHECK_NOT_NULL(class_id); |
618 *class_id = obj.GetClassId(); | 618 *class_id = obj.GetClassId(); |
619 return Api::Success(); | 619 return Api::Success(); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 981 |
982 #else | 982 #else |
983 | 983 |
984 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { | 984 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { |
985 // NOOP. | 985 // NOOP. |
986 } | 986 } |
987 | 987 |
988 #endif // !PRODUCT | 988 #endif // !PRODUCT |
989 | 989 |
990 } // namespace dart | 990 } // namespace dart |
OLD | NEW |