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

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
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 18597)
+++ runtime/vm/debugger.cc (working copy)
@@ -557,6 +557,7 @@
CodeBreakpoint::CodeBreakpoint(const Function& func, intptr_t pc_desc_index)
: function_(func.raw()),
+ code_(Code::ZoneHandle(func.unoptimized_code())),
pc_desc_index_(pc_desc_index),
pc_(0),
line_number_(-1),
@@ -564,9 +565,8 @@
src_bpt_(NULL),
next_(NULL) {
ASSERT(!func.HasOptimizedCode());
- Code& code = Code::Handle(func.unoptimized_code());
- ASSERT(!code.IsNull()); // Function must be compiled.
- PcDescriptors& desc = PcDescriptors::Handle(code.pc_descriptors());
+ ASSERT(!code_.IsNull()); // Function must be compiled.
+ PcDescriptors& desc = PcDescriptors::Handle(code_.pc_descriptors());
ASSERT(pc_desc_index < desc.Length());
token_pos_ = desc.TokenPos(pc_desc_index);
ASSERT(token_pos_ >= 0);
@@ -621,15 +621,16 @@
switch (breakpoint_kind_) {
case PcDescriptors::kIcCall: {
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());
+ saved_bytes_.target_address_ =
+ CodePatcher::GetStaticCallTargetAt(pc_, code_);
+ CodePatcher::PatchStaticCallAt(pc_, code_,
+ StubCode::BreakpointStaticEntryPoint());
break;
}
case PcDescriptors::kReturn:
@@ -646,10 +647,12 @@
ASSERT(is_enabled_);
switch (breakpoint_kind_) {
case PcDescriptors::kIcCall:
- CodePatcher::PatchInstanceCallAt(pc_, saved_bytes_.target_address_);
+ CodePatcher::PatchInstanceCallAt(pc_, code_,
+ saved_bytes_.target_address_);
break;
case PcDescriptors::kFuncCall:
- CodePatcher::PatchStaticCallAt(pc_, saved_bytes_.target_address_);
+ CodePatcher::PatchStaticCallAt(pc_, code_,
+ saved_bytes_.target_address_);
break;
case PcDescriptors::kReturn:
RestoreFunctionReturn();
@@ -1483,7 +1486,8 @@
func_to_instrument = bpt->function();
ICData& ic_data = ICData::Handle();
Array& descriptor = Array::Handle();
- CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor);
+ CodePatcher::GetInstanceCallAt(bpt->pc_, bpt->code_,
+ &ic_data, &descriptor);
ArgumentsDescriptor arg_descriptor(descriptor);
ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0);
intptr_t num_args = arg_descriptor.Count();

Powered by Google App Engine
This is Rietveld 408576698