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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 Function::Handle(cls.LookupGetterFunction(field_name)); | 1120 Function::Handle(cls.LookupGetterFunction(field_name)); |
1121 ASSERT(!getter_func.IsNull()); | 1121 ASSERT(!getter_func.IsNull()); |
1122 | 1122 |
1123 Object& result = Object::Handle(); | 1123 Object& result = Object::Handle(); |
1124 LongJump* base = isolate_->long_jump_base(); | 1124 LongJump* base = isolate_->long_jump_base(); |
1125 LongJump jump; | 1125 LongJump jump; |
1126 isolate_->set_long_jump_base(&jump); | 1126 isolate_->set_long_jump_base(&jump); |
1127 bool saved_ignore_flag = ignore_breakpoints_; | 1127 bool saved_ignore_flag = ignore_breakpoints_; |
1128 ignore_breakpoints_ = true; | 1128 ignore_breakpoints_ = true; |
1129 if (setjmp(*jump.Set()) == 0) { | 1129 if (setjmp(*jump.Set()) == 0) { |
1130 GrowableArray<const Object*> noArguments; | 1130 const Array& args = Array::Handle(Array::New(1)); |
1131 const Array& noArgumentNames = Array::Handle(); | 1131 args.SetAt(0, object); |
1132 result = DartEntry::InvokeDynamic(object, getter_func, | 1132 result = DartEntry::InvokeDynamic(getter_func, args); |
1133 noArguments, noArgumentNames); | |
1134 } else { | 1133 } else { |
1135 result = isolate_->object_store()->sticky_error(); | 1134 result = isolate_->object_store()->sticky_error(); |
1136 } | 1135 } |
1137 ignore_breakpoints_ = saved_ignore_flag; | 1136 ignore_breakpoints_ = saved_ignore_flag; |
1138 isolate_->set_long_jump_base(base); | 1137 isolate_->set_long_jump_base(base); |
1139 return result.raw(); | 1138 return result.raw(); |
1140 } | 1139 } |
1141 | 1140 |
1142 | 1141 |
1143 RawObject* Debugger::GetStaticField(const Class& cls, | 1142 RawObject* Debugger::GetStaticField(const Class& cls, |
(...skipping 16 matching lines...) Expand all Loading... |
1160 return Object::null(); | 1159 return Object::null(); |
1161 } | 1160 } |
1162 | 1161 |
1163 Object& result = Object::Handle(); | 1162 Object& result = Object::Handle(); |
1164 LongJump* base = isolate_->long_jump_base(); | 1163 LongJump* base = isolate_->long_jump_base(); |
1165 LongJump jump; | 1164 LongJump jump; |
1166 isolate_->set_long_jump_base(&jump); | 1165 isolate_->set_long_jump_base(&jump); |
1167 bool saved_ignore_flag = ignore_breakpoints_; | 1166 bool saved_ignore_flag = ignore_breakpoints_; |
1168 ignore_breakpoints_ = true; | 1167 ignore_breakpoints_ = true; |
1169 if (setjmp(*jump.Set()) == 0) { | 1168 if (setjmp(*jump.Set()) == 0) { |
1170 GrowableArray<const Object*> noArguments; | 1169 const Array& args = Array::Handle(Object::empty_array()); |
1171 const Array& noArgumentNames = Array::Handle(); | 1170 result = DartEntry::InvokeStatic(getter_func, args); |
1172 result = DartEntry::InvokeStatic(getter_func, noArguments, noArgumentNames); | |
1173 } else { | 1171 } else { |
1174 result = isolate_->object_store()->sticky_error(); | 1172 result = isolate_->object_store()->sticky_error(); |
1175 } | 1173 } |
1176 ignore_breakpoints_ = saved_ignore_flag; | 1174 ignore_breakpoints_ = saved_ignore_flag; |
1177 isolate_->set_long_jump_base(base); | 1175 isolate_->set_long_jump_base(base); |
1178 return result.raw(); | 1176 return result.raw(); |
1179 } | 1177 } |
1180 | 1178 |
1181 | 1179 |
1182 RawArray* Debugger::GetInstanceFields(const Instance& obj) { | 1180 RawArray* Debugger::GetInstanceFields(const Instance& obj) { |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 } | 1630 } |
1633 | 1631 |
1634 | 1632 |
1635 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1633 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1636 ASSERT(bpt->next() == NULL); | 1634 ASSERT(bpt->next() == NULL); |
1637 bpt->set_next(code_breakpoints_); | 1635 bpt->set_next(code_breakpoints_); |
1638 code_breakpoints_ = bpt; | 1636 code_breakpoints_ = bpt; |
1639 } | 1637 } |
1640 | 1638 |
1641 } // namespace dart | 1639 } // namespace dart |
OLD | NEW |