| 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 } | 561 } |
| 562 UNWRAP_AND_CHECK_PARAM(String, expr, expr_in); | 562 UNWRAP_AND_CHECK_PARAM(String, expr, expr_in); |
| 563 // Type extends Instance, must check first. | 563 // Type extends Instance, must check first. |
| 564 if (target.IsType()) { | 564 if (target.IsType()) { |
| 565 const Class& cls = Class::Handle(Z, Type::Cast(target).type_class()); | 565 const Class& cls = Class::Handle(Z, Type::Cast(target).type_class()); |
| 566 return Api::NewHandle(T, cls.Evaluate(expr, | 566 return Api::NewHandle(T, cls.Evaluate(expr, |
| 567 Array::empty_array(), | 567 Array::empty_array(), |
| 568 Array::empty_array())); | 568 Array::empty_array())); |
| 569 } else if (target.IsInstance()) { | 569 } else if (target.IsInstance()) { |
| 570 const Instance& inst = Instance::Cast(target); | 570 const Instance& inst = Instance::Cast(target); |
| 571 return Api::NewHandle(T, inst.Evaluate(expr, | 571 const Class& receiver_cls = Class::Handle(Z, inst.clazz()); |
| 572 return Api::NewHandle(T, inst.Evaluate(receiver_cls, |
| 573 expr, |
| 572 Array::empty_array(), | 574 Array::empty_array(), |
| 573 Array::empty_array())); | 575 Array::empty_array())); |
| 574 } else if (target.IsLibrary()) { | 576 } else if (target.IsLibrary()) { |
| 575 const Library& lib = Library::Cast(target); | 577 const Library& lib = Library::Cast(target); |
| 576 return Api::NewHandle(T, lib.Evaluate(expr, | 578 return Api::NewHandle(T, lib.Evaluate(expr, |
| 577 Array::empty_array(), | 579 Array::empty_array(), |
| 578 Array::empty_array())); | 580 Array::empty_array())); |
| 579 } else if (target.IsClass()) { | 581 } else if (target.IsClass()) { |
| 580 const Class& cls = Class::Cast(target); | 582 const Class& cls = Class::Cast(target); |
| 581 return Api::NewHandle(T, cls.Evaluate(expr, | 583 return Api::NewHandle(T, cls.Evaluate(expr, |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 | 965 |
| 964 #else | 966 #else |
| 965 | 967 |
| 966 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { | 968 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { |
| 967 // NOOP. | 969 // NOOP. |
| 968 } | 970 } |
| 969 | 971 |
| 970 #endif // !PRODUCT | 972 #endif // !PRODUCT |
| 971 | 973 |
| 972 } // namespace dart | 974 } // namespace dart |
| OLD | NEW |