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

Unified Diff: runtime/vm/stack_frame.cc

Issue 1808553002: Precompilation: don't include an object header for instructions in the text section. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: union Created 4 years, 9 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
« runtime/vm/raw_object_snapshot.cc ('K') | « runtime/vm/snapshot.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
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index f54ee8afdb368cc8eb2e079c3b9132349f683c95..6007b8d9d80f962ca26b69c3cdef38f73925ade0 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -28,6 +28,7 @@ bool StackFrame::IsStubFrame() const {
NoSafepointScope no_safepoint;
#endif
RawCode* code = GetCodeObject();
+ ASSERT(code != Object::null());
const intptr_t cid = code->ptr()->owner_->GetClassId();
ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
return cid == kNullCid || cid == kClassCid;
@@ -100,8 +101,7 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
Array maps;
maps = Array::null();
Stackmap map;
- const uword entry = reinterpret_cast<uword>(code.instructions()->ptr()) +
- Instructions::HeaderSize();
+ const uword entry = code.EntryPoint();
map = code.GetStackmap(pc() - entry, &maps, &map);
if (!map.IsNull()) {
RawObject** first = reinterpret_cast<RawObject**>(sp());
@@ -150,6 +150,8 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
visitor->VisitPointers(first, last);
return;
}
+
+ // No stack map, fall through.
}
// For normal unoptimized Dart frames and Stub frames each slot
// between the first and last included are tagged objects.
@@ -380,8 +382,11 @@ StackFrame* StackFrameIterator::NextFrame() {
// Consume dart/stub frames using StackFrameIterator::FrameSetIterator
// until we are out of dart/stub frames at which point we return the
// corresponding entry frame for that set of dart/stub frames.
- current_frame_ =
- (frames_.HasNext()) ? frames_.NextFrame(validate_) : NextEntryFrame();
Florian Schneider 2016/03/28 22:15:47 What's wrong with using the conditional expression
rmacnak 2016/03/28 23:56:45 Nothing, I had print here debugger earlier. Undone
+ if (frames_.HasNext()) {
+ current_frame_ = frames_.NextFrame(validate_);
+ } else {
+ current_frame_ = NextEntryFrame();
+ }
return current_frame_;
}
« runtime/vm/raw_object_snapshot.cc ('K') | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698