| 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 "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 } | 1064 } |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 if (function().is_static()) { | 1067 if (function().is_static()) { |
| 1068 const Class& cls = Class::Handle(function().Owner()); | 1068 const Class& cls = Class::Handle(function().Owner()); |
| 1069 return cls.Evaluate(expr, | 1069 return cls.Evaluate(expr, |
| 1070 Array::Handle(Array::MakeArray(param_names)), | 1070 Array::Handle(Array::MakeArray(param_names)), |
| 1071 Array::Handle(Array::MakeArray(param_values))); | 1071 Array::Handle(Array::MakeArray(param_values))); |
| 1072 } else { | 1072 } else { |
| 1073 const Object& receiver = Object::Handle(GetReceiver()); | 1073 const Object& receiver = Object::Handle(GetReceiver()); |
| 1074 const Class& method_cls = Class::Handle(function().origin()); |
| 1074 ASSERT(receiver.IsInstance() || receiver.IsNull()); | 1075 ASSERT(receiver.IsInstance() || receiver.IsNull()); |
| 1075 if (!(receiver.IsInstance() || receiver.IsNull())) { | 1076 if (!(receiver.IsInstance() || receiver.IsNull())) { |
| 1076 return Object::null(); | 1077 return Object::null(); |
| 1077 } | 1078 } |
| 1078 const Instance& inst = Instance::Cast(receiver); | 1079 const Instance& inst = Instance::Cast(receiver); |
| 1079 return inst.Evaluate(expr, | 1080 return inst.Evaluate(method_cls, |
| 1081 expr, |
| 1080 Array::Handle(Array::MakeArray(param_names)), | 1082 Array::Handle(Array::MakeArray(param_names)), |
| 1081 Array::Handle(Array::MakeArray(param_values))); | 1083 Array::Handle(Array::MakeArray(param_values))); |
| 1082 } | 1084 } |
| 1083 UNREACHABLE(); | 1085 UNREACHABLE(); |
| 1084 return Object::null(); | 1086 return Object::null(); |
| 1085 } | 1087 } |
| 1086 | 1088 |
| 1087 | 1089 |
| 1088 const char* ActivationFrame::ToCString() { | 1090 const char* ActivationFrame::ToCString() { |
| 1089 const String& url = String::Handle(SourceUrl()); | 1091 const String& url = String::Handle(SourceUrl()); |
| (...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 | 3346 |
| 3345 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3347 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3346 ASSERT(bpt->next() == NULL); | 3348 ASSERT(bpt->next() == NULL); |
| 3347 bpt->set_next(code_breakpoints_); | 3349 bpt->set_next(code_breakpoints_); |
| 3348 code_breakpoints_ = bpt; | 3350 code_breakpoints_ = bpt; |
| 3349 } | 3351 } |
| 3350 | 3352 |
| 3351 #endif // !PRODUCT | 3353 #endif // !PRODUCT |
| 3352 | 3354 |
| 3353 } // namespace dart | 3355 } // namespace dart |
| OLD | NEW |