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

Unified Diff: runtime/vm/stack_frame.cc

Issue 875443002: Store pc offset instead of absolute pc in the pc descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed arm/mips/arm64 build Created 5 years, 11 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/simulator_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
===================================================================
--- runtime/vm/stack_frame.cc (revision 43041)
+++ runtime/vm/stack_frame.cc (working copy)
@@ -209,6 +209,7 @@
if (code.IsNull()) {
return false; // Stub frames do not have exception handlers.
}
+ uword pc_offset = pc() - code.EntryPoint();
REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(isolate);
ExceptionHandlers& handlers = reused_exception_handlers_handle.Handle();
@@ -224,7 +225,7 @@
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
while (iter.MoveNext()) {
const intptr_t current_try_index = iter.TryIndex();
- if ((iter.Pc() == pc()) && (current_try_index != -1)) {
+ if ((iter.PcOffset() == pc_offset) && (current_try_index != -1)) {
RawExceptionHandlers::HandlerInfo handler_info;
handlers.GetHandlerInfo(current_try_index, &handler_info);
*handler_pc = handler_info.handler_pc;
@@ -242,12 +243,13 @@
if (code.IsNull()) {
return -1; // Stub frames do not have token_pos.
}
+ uword pc_offset = pc() - code.EntryPoint();
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
ASSERT(!descriptors.IsNull());
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
while (iter.MoveNext()) {
- if (iter.Pc() == pc()) {
+ if (iter.PcOffset() == pc_offset) {
return iter.TokenPos();
}
}
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698