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

Side by Side Diff: runtime/vm/object.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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 14537 matching lines...) Expand 10 before | Expand all | Expand 10 after
14548 const String& msg_str = String::Handle(message()); 14548 const String& msg_str = String::Handle(message());
14549 return msg_str.ToCString(); 14549 return msg_str.ToCString();
14550 } 14550 }
14551 14551
14552 14552
14553 const char* UnwindError::ToCString() const { 14553 const char* UnwindError::ToCString() const {
14554 return "UnwindError"; 14554 return "UnwindError";
14555 } 14555 }
14556 14556
14557 14557
14558 RawObject* Instance::Evaluate(const String& expr, 14558 RawObject* Instance::Evaluate(const Class& method_cls,
14559 const String& expr,
14559 const Array& param_names, 14560 const Array& param_names,
14560 const Array& param_values) const { 14561 const Array& param_values) const {
14561 const Class& cls = Class::Handle(clazz());
14562 const Function& eval_func = 14562 const Function& eval_func =
14563 Function::Handle(EvaluateHelper(cls, expr, param_names, false)); 14563 Function::Handle(EvaluateHelper(method_cls, expr, param_names, false));
14564 const Array& args = Array::Handle(Array::New(1 + param_values.Length())); 14564 const Array& args = Array::Handle(Array::New(1 + param_values.Length()));
14565 PassiveObject& param = PassiveObject::Handle(); 14565 PassiveObject& param = PassiveObject::Handle();
14566 args.SetAt(0, *this); 14566 args.SetAt(0, *this);
14567 for (intptr_t i = 0; i < param_values.Length(); i++) { 14567 for (intptr_t i = 0; i < param_values.Length(); i++) {
14568 param = param_values.At(i); 14568 param = param_values.At(i);
14569 args.SetAt(i + 1, param); 14569 args.SetAt(i + 1, param);
14570 } 14570 }
14571 return DartEntry::InvokeFunction(eval_func, args); 14571 return DartEntry::InvokeFunction(eval_func, args);
14572 } 14572 }
14573 14573
(...skipping 7283 matching lines...) Expand 10 before | Expand all | Expand 10 after
21857 return UserTag::null(); 21857 return UserTag::null();
21858 } 21858 }
21859 21859
21860 21860
21861 const char* UserTag::ToCString() const { 21861 const char* UserTag::ToCString() const {
21862 const String& tag_label = String::Handle(label()); 21862 const String& tag_label = String::Handle(label());
21863 return tag_label.ToCString(); 21863 return tag_label.ToCString();
21864 } 21864 }
21865 21865
21866 } // namespace dart 21866 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698