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

Unified Diff: runtime/vm/debugger.cc

Issue 12260026: Add support for object pool (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/constants_arm.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 18603)
+++ runtime/vm/debugger.cc (working copy)
@@ -620,16 +620,21 @@
ASSERT(!is_enabled_);
switch (breakpoint_kind_) {
case PcDescriptors::kIcCall: {
+ const Code& code =
+ Code::Handle(Function::Handle(function_).unoptimized_code());
saved_bytes_.target_address_ =
- CodePatcher::GetInstanceCallAt(pc_, NULL, NULL);
- CodePatcher::PatchInstanceCallAt(pc_,
+ CodePatcher::GetInstanceCallAt(pc_, code, NULL, NULL);
+ CodePatcher::PatchInstanceCallAt(pc_, code,
StubCode::BreakpointDynamicEntryPoint());
break;
}
case PcDescriptors::kFuncCall: {
- saved_bytes_.target_address_ = CodePatcher::GetStaticCallTargetAt(pc_);
- CodePatcher::PatchStaticCallAt(pc_,
- StubCode::BreakpointStaticEntryPoint());
+ const Code& code =
+ Code::Handle(Function::Handle(function_).unoptimized_code());
+ saved_bytes_.target_address_ =
+ CodePatcher::GetStaticCallTargetAt(pc_, code);
+ CodePatcher::PatchStaticCallAt(pc_, code,
+ StubCode::BreakpointStaticEntryPoint());
break;
}
case PcDescriptors::kReturn:
@@ -645,12 +650,20 @@
void CodeBreakpoint::RestoreCode() {
ASSERT(is_enabled_);
switch (breakpoint_kind_) {
- case PcDescriptors::kIcCall:
- CodePatcher::PatchInstanceCallAt(pc_, saved_bytes_.target_address_);
+ case PcDescriptors::kIcCall: {
+ const Code& code =
+ Code::Handle(Function::Handle(function_).unoptimized_code());
+ CodePatcher::PatchInstanceCallAt(pc_, code,
+ saved_bytes_.target_address_);
break;
- case PcDescriptors::kFuncCall:
- CodePatcher::PatchStaticCallAt(pc_, saved_bytes_.target_address_);
+ }
+ case PcDescriptors::kFuncCall: {
+ const Code& code =
+ Code::Handle(Function::Handle(function_).unoptimized_code());
+ CodePatcher::PatchStaticCallAt(pc_, code,
+ saved_bytes_.target_address_);
break;
+ }
case PcDescriptors::kReturn:
RestoreFunctionReturn();
break;
@@ -1483,18 +1496,20 @@
func_to_instrument = bpt->function();
ICData& ic_data = ICData::Handle();
Array& descriptor = Array::Handle();
- CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor);
+ const Code& code =
+ Code::Handle(Function::Handle(bpt->function_).unoptimized_code());
+ CodePatcher::GetInstanceCallAt(bpt->pc_, code, &ic_data, &descriptor);
ArgumentsDescriptor arg_descriptor(descriptor);
ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0);
intptr_t num_args = arg_descriptor.Count();
Instance& receiver =
Instance::Handle(top_frame->GetInstanceCallReceiver(num_args));
- Code& code =
+ Code& target_code =
Code::Handle(ResolveCompileInstanceCallTarget(receiver,
ic_data,
descriptor));
- if (!code.IsNull()) {
- Function& callee = Function::Handle(code.function());
+ if (!target_code.IsNull()) {
+ Function& callee = Function::Handle(target_code.function());
if (IsDebuggable(callee)) {
func_to_instrument = callee.raw();
}
« no previous file with comments | « runtime/vm/constants_arm.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698