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

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

Issue 10693071: Use VM type cast and save handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/debugger_api_impl.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 "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 return (src_breakpoints_ != NULL) || 648 return (src_breakpoints_ != NULL) ||
649 (code_breakpoints_ != NULL) || 649 (code_breakpoints_ != NULL) ||
650 (exc_pause_info_ != kNoPauseOnExceptions); 650 (exc_pause_info_ != kNoPauseOnExceptions);
651 } 651 }
652 652
653 653
654 static RawFunction* ResolveLibraryFunction( 654 static RawFunction* ResolveLibraryFunction(
655 const Library& library, 655 const Library& library,
656 const String& fname) { 656 const String& fname) {
657 ASSERT(!library.IsNull()); 657 ASSERT(!library.IsNull());
658 Function& function = Function::Handle();
659 const Object& object = Object::Handle(library.LookupObject(fname)); 658 const Object& object = Object::Handle(library.LookupObject(fname));
660 if (!object.IsNull() && object.IsFunction()) { 659 if (!object.IsNull() && object.IsFunction()) {
661 function ^= object.raw(); 660 return Function::Cast(object).raw();
662 } 661 }
663 return function.raw(); 662 return Function::null();
664 } 663 }
665 664
666 665
667 RawFunction* Debugger::ResolveFunction(const Library& library, 666 RawFunction* Debugger::ResolveFunction(const Library& library,
668 const String& class_name, 667 const String& class_name,
669 const String& function_name) { 668 const String& function_name) {
670 ASSERT(!library.IsNull()); 669 ASSERT(!library.IsNull());
671 ASSERT(!class_name.IsNull()); 670 ASSERT(!class_name.IsNull());
672 ASSERT(!function_name.IsNull()); 671 ASSERT(!function_name.IsNull());
673 if (class_name.Length() == 0) { 672 if (class_name.Length() == 0) {
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 } 1552 }
1554 1553
1555 1554
1556 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1555 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1557 ASSERT(bpt->next() == NULL); 1556 ASSERT(bpt->next() == NULL);
1558 bpt->set_next(code_breakpoints_); 1557 bpt->set_next(code_breakpoints_);
1559 code_breakpoints_ = bpt; 1558 code_breakpoints_ = bpt;
1560 } 1559 }
1561 1560
1562 } // namespace dart 1561 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698