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

Unified Diff: src/frames.cc

Issue 1220223005: Cleanup frame description constant. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_graph-builder-new-target
Patch Set: Addressed comments. Created 5 years, 5 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 | « src/frames.h ('k') | src/ia32/frames-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 5aefe066f5ba7cfb9f871718525fad9858a88a8d..723db4ae13c3c6e8da7a173578bd545c6e0ced7b 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -737,6 +737,8 @@ Object* JavaScriptFrame::GetOriginalConstructor() const {
fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
}
DCHECK(IsConstructFrame(fp));
+ STATIC_ASSERT(ConstructFrameConstants::kOriginalConstructorOffset ==
+ StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize);
return GetExpression(fp, 2);
}
@@ -744,6 +746,8 @@ Object* JavaScriptFrame::GetOriginalConstructor() const {
int JavaScriptFrame::GetArgumentsLength() const {
// If there is an arguments adaptor frame get the arguments length from it.
if (has_adapted_arguments()) {
+ STATIC_ASSERT(ArgumentsAdaptorFrameConstants::kLengthOffset ==
+ StandardFrameConstants::kExpressionsOffset);
return Smi::cast(GetExpression(caller_fp(), 0))->value();
} else {
return GetNumberOfIncomingArguments();
« no previous file with comments | « src/frames.h ('k') | src/ia32/frames-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698