| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 558 } |
| 559 | 559 |
| 560 | 560 |
| 561 DART_EXPORT Dart_Handle | 561 DART_EXPORT Dart_Handle |
| 562 Dart_ActivationFrameEvaluate(Dart_ActivationFrame activation_frame, | 562 Dart_ActivationFrameEvaluate(Dart_ActivationFrame activation_frame, |
| 563 Dart_Handle expr_in) { | 563 Dart_Handle expr_in) { |
| 564 DARTSCOPE(Thread::Current()); | 564 DARTSCOPE(Thread::Current()); |
| 565 CHECK_DEBUGGER(T->isolate()); | 565 CHECK_DEBUGGER(T->isolate()); |
| 566 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); | 566 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); |
| 567 UNWRAP_AND_CHECK_PARAM(String, expr, expr_in); | 567 UNWRAP_AND_CHECK_PARAM(String, expr, expr_in); |
| 568 return Api::NewHandle(T, frame->Evaluate(expr)); | 568 const GrowableObjectArray& names = |
| 569 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 570 const GrowableObjectArray& values = |
| 571 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 572 return Api::NewHandle(T, frame->Evaluate(expr, names, values)); |
| 569 } | 573 } |
| 570 | 574 |
| 571 | 575 |
| 572 DART_EXPORT Dart_Handle Dart_EvaluateExpr(Dart_Handle target_in, | 576 DART_EXPORT Dart_Handle Dart_EvaluateExpr(Dart_Handle target_in, |
| 573 Dart_Handle expr_in) { | 577 Dart_Handle expr_in) { |
| 574 DARTSCOPE(Thread::Current()); | 578 DARTSCOPE(Thread::Current()); |
| 575 CHECK_DEBUGGER(T->isolate()); | 579 CHECK_DEBUGGER(T->isolate()); |
| 576 | 580 |
| 577 const Object& target = Object::Handle(Z, Api::UnwrapHandle(target_in)); | 581 const Object& target = Object::Handle(Z, Api::UnwrapHandle(target_in)); |
| 578 if (target.IsError()) return target_in; | 582 if (target.IsError()) return target_in; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 | 987 |
| 984 #else | 988 #else |
| 985 | 989 |
| 986 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { | 990 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { |
| 987 // NOOP. | 991 // NOOP. |
| 988 } | 992 } |
| 989 | 993 |
| 990 #endif // !PRODUCT | 994 #endif // !PRODUCT |
| 991 | 995 |
| 992 } // namespace dart | 996 } // namespace dart |
| OLD | NEW |