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

Unified Diff: src/frames-inl.h

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 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: src/frames-inl.h
diff --git a/src/frames-inl.h b/src/frames-inl.h
index 4013601dace9c121bf722b131e6a71234dba2df5..cf7596e8379252e0bfd175a1dc9a3d18f4cefb3c 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -114,7 +114,9 @@ inline void StandardFrame::SetExpression(int index, Object* value) {
inline Object* StandardFrame::context() const {
const int offset = StandardFrameConstants::kContextOffset;
- return Memory::Object_at(fp() + offset);
+ Object* maybe_result = Memory::Object_at(fp() + offset);
+ DCHECK(!maybe_result->IsSmi());
+ return maybe_result;
}
@@ -139,16 +141,16 @@ inline Address StandardFrame::ComputeConstantPoolAddress(Address fp) {
inline bool StandardFrame::IsArgumentsAdaptorFrame(Address fp) {
- Object* marker =
- Memory::Object_at(fp + StandardFrameConstants::kContextOffset);
- return marker == Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR);
+ Object* frame_type =
+ Memory::Object_at(fp + TypedFrameConstants::kFrameTypeOffset);
+ return frame_type == Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR);
}
inline bool StandardFrame::IsConstructFrame(Address fp) {
- Object* marker =
- Memory::Object_at(fp + StandardFrameConstants::kMarkerOffset);
- return marker == Smi::FromInt(StackFrame::CONSTRUCT);
+ Object* frame_type =
+ Memory::Object_at(fp + TypedFrameConstants::kFrameTypeOffset);
+ return frame_type == Smi::FromInt(StackFrame::CONSTRUCT);
}

Powered by Google App Engine
This is Rietveld 408576698