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

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

Issue 11411072: Simplify CodePatcher::GetStaticCallAt. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/code_patcher_x64.cc ('k') | runtime/vm/native_entry_test.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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 case PcDescriptors::kIcCall: { 568 case PcDescriptors::kIcCall: {
569 int num_args, num_named_args; 569 int num_args, num_named_args;
570 CodePatcher::GetInstanceCallAt(pc_, 570 CodePatcher::GetInstanceCallAt(pc_,
571 NULL, &num_args, &num_named_args, 571 NULL, &num_args, &num_named_args,
572 &saved_bytes_.target_address_); 572 &saved_bytes_.target_address_);
573 CodePatcher::PatchInstanceCallAt( 573 CodePatcher::PatchInstanceCallAt(
574 pc_, StubCode::BreakpointDynamicEntryPoint()); 574 pc_, StubCode::BreakpointDynamicEntryPoint());
575 break; 575 break;
576 } 576 }
577 case PcDescriptors::kFuncCall: { 577 case PcDescriptors::kFuncCall: {
578 Function& func = Function::Handle(); 578 saved_bytes_.target_address_ = CodePatcher::GetStaticCallTargetAt(pc_);
579 CodePatcher::GetStaticCallAt(pc_, &func, &saved_bytes_.target_address_);
580 CodePatcher::PatchStaticCallAt(pc_, 579 CodePatcher::PatchStaticCallAt(pc_,
581 StubCode::BreakpointStaticEntryPoint()); 580 StubCode::BreakpointStaticEntryPoint());
582 break; 581 break;
583 } 582 }
584 case PcDescriptors::kReturn: 583 case PcDescriptors::kReturn:
585 PatchFunctionReturn(); 584 PatchFunctionReturn();
586 break; 585 break;
587 default: 586 default:
588 UNREACHABLE(); 587 UNREACHABLE();
589 } 588 }
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 } 1616 }
1618 1617
1619 1618
1620 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 1619 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
1621 ASSERT(bpt->next() == NULL); 1620 ASSERT(bpt->next() == NULL);
1622 bpt->set_next(code_breakpoints_); 1621 bpt->set_next(code_breakpoints_);
1623 code_breakpoints_ = bpt; 1622 code_breakpoints_ = bpt;
1624 } 1623 }
1625 1624
1626 } // namespace dart 1625 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/native_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698