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

Unified Diff: runtime/vm/stack_frame.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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/snapshot.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index d9bd0fa679b842e82ac03a27489b2428e3f79dae..f93111e41e411e7a8fd1075898fd605590c2ea1e 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -108,9 +108,8 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
Array maps;
maps = Array::null();
Stackmap map;
- const uword entry = reinterpret_cast<uword>(code.instructions()->ptr()) +
- Instructions::HeaderSize();
- map = code.GetStackmap(pc() - entry, &maps, &map);
+ const uword start = Instructions::PayloadStart(code.instructions());
+ map = code.GetStackmap(pc() - start, &maps, &map);
if (!map.IsNull()) {
#if !defined(TARGET_ARCH_DBC)
RawObject** first = reinterpret_cast<RawObject**>(sp());
@@ -260,7 +259,7 @@ bool StackFrame::FindExceptionHandler(Thread* thread,
if (code.IsNull()) {
return false; // Stub frames do not have exception handlers.
}
- uword pc_offset = pc() - code.EntryPoint();
+ uword pc_offset = pc() - code.PayloadStart();
REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(thread);
ExceptionHandlers& handlers = reused_exception_handlers_handle.Handle();
@@ -279,7 +278,7 @@ bool StackFrame::FindExceptionHandler(Thread* thread,
if ((iter.PcOffset() == pc_offset) && (current_try_index != -1)) {
RawExceptionHandlers::HandlerInfo handler_info;
handlers.GetHandlerInfo(current_try_index, &handler_info);
- *handler_pc = code.EntryPoint() + handler_info.handler_pc_offset;
+ *handler_pc = code.PayloadStart() + handler_info.handler_pc_offset;
*needs_stacktrace = handler_info.needs_stacktrace;
*has_catch_all = handler_info.has_catch_all;
return true;
@@ -294,7 +293,7 @@ TokenPosition StackFrame::GetTokenPos() const {
if (code.IsNull()) {
return TokenPosition::kNoSource; // Stub frames do not have token_pos.
}
- uword pc_offset = pc() - code.EntryPoint();
+ uword pc_offset = pc() - code.PayloadStart();
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
ASSERT(!descriptors.IsNull());
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698