Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: runtime/vm/debugger_api_impl.cc

Issue 1854243002: VM: Evaluate-in-frame should happen in the scope of the method class, not the receiver class. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« runtime/vm/debugger.cc ('K') | « runtime/vm/debugger.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698