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

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

Issue 12315087: Hook up simulator (if needed) when calling Dart code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_entry_test.cc ('k') | runtime/vm/isolate.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/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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 1216
1217 Object& result = Object::Handle(); 1217 Object& result = Object::Handle();
1218 LongJump* base = isolate_->long_jump_base(); 1218 LongJump* base = isolate_->long_jump_base();
1219 LongJump jump; 1219 LongJump jump;
1220 isolate_->set_long_jump_base(&jump); 1220 isolate_->set_long_jump_base(&jump);
1221 bool saved_ignore_flag = ignore_breakpoints_; 1221 bool saved_ignore_flag = ignore_breakpoints_;
1222 ignore_breakpoints_ = true; 1222 ignore_breakpoints_ = true;
1223 if (setjmp(*jump.Set()) == 0) { 1223 if (setjmp(*jump.Set()) == 0) {
1224 const Array& args = Array::Handle(Array::New(1)); 1224 const Array& args = Array::Handle(Array::New(1));
1225 args.SetAt(0, object); 1225 args.SetAt(0, object);
1226 result = DartEntry::InvokeDynamic(getter_func, args); 1226 result = DartEntry::InvokeFunction(getter_func, args);
1227 } else { 1227 } else {
1228 result = isolate_->object_store()->sticky_error(); 1228 result = isolate_->object_store()->sticky_error();
1229 } 1229 }
1230 ignore_breakpoints_ = saved_ignore_flag; 1230 ignore_breakpoints_ = saved_ignore_flag;
1231 isolate_->set_long_jump_base(base); 1231 isolate_->set_long_jump_base(base);
1232 return result.raw(); 1232 return result.raw();
1233 } 1233 }
1234 1234
1235 1235
1236 RawObject* Debugger::GetStaticField(const Class& cls, 1236 RawObject* Debugger::GetStaticField(const Class& cls,
(...skipping 16 matching lines...) Expand all
1253 return Object::null(); 1253 return Object::null();
1254 } 1254 }
1255 1255
1256 Object& result = Object::Handle(); 1256 Object& result = Object::Handle();
1257 LongJump* base = isolate_->long_jump_base(); 1257 LongJump* base = isolate_->long_jump_base();
1258 LongJump jump; 1258 LongJump jump;
1259 isolate_->set_long_jump_base(&jump); 1259 isolate_->set_long_jump_base(&jump);
1260 bool saved_ignore_flag = ignore_breakpoints_; 1260 bool saved_ignore_flag = ignore_breakpoints_;
1261 ignore_breakpoints_ = true; 1261 ignore_breakpoints_ = true;
1262 if (setjmp(*jump.Set()) == 0) { 1262 if (setjmp(*jump.Set()) == 0) {
1263 result = DartEntry::InvokeStatic(getter_func, Object::empty_array()); 1263 result = DartEntry::InvokeFunction(getter_func, Object::empty_array());
1264 } else { 1264 } else {
1265 result = isolate_->object_store()->sticky_error(); 1265 result = isolate_->object_store()->sticky_error();
1266 } 1266 }
1267 ignore_breakpoints_ = saved_ignore_flag; 1267 ignore_breakpoints_ = saved_ignore_flag;
1268 isolate_->set_long_jump_base(base); 1268 isolate_->set_long_jump_base(base);
1269 return result.raw(); 1269 return result.raw();
1270 } 1270 }
1271 1271
1272 1272
1273 RawArray* Debugger::GetInstanceFields(const Instance& obj) { 1273 RawArray* Debugger::GetInstanceFields(const Instance& obj) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 } 1730 }
1731 1731
1732 1732
1733 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1733 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1734 ASSERT(bpt->next() == NULL); 1734 ASSERT(bpt->next() == NULL);
1735 bpt->set_next(code_breakpoints_); 1735 bpt->set_next(code_breakpoints_);
1736 code_breakpoints_ = bpt; 1736 code_breakpoints_ = bpt;
1737 } 1737 }
1738 1738
1739 } // namespace dart 1739 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698