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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 1929213002: [full-codegen] Fix stack depth tracking when reporting unsupported super usages (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move test out of message/ Created 4 years, 8 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 | « no previous file | test/mjsunit/regress/regress-4967.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index e9a043ab343ad16aaf27223e3ef97a67a33dbd8e..43bbc59cd1bcd7198dad0c27f10483a683efa042 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -683,11 +683,15 @@ void FullCodeGenerator::SetCallPosition(Expression* expr,
void FullCodeGenerator::VisitSuperPropertyReference(
SuperPropertyReference* super) {
__ CallRuntime(Runtime::kThrowUnsupportedSuperError);
+ // Even though this expression doesn't produce a value, we need to simulate
+ // plugging of the value context to ensure stack depth tracking is in sync.
+ if (context()->IsStackValue()) OperandStackDepthIncrement(1);
}
void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) {
- __ CallRuntime(Runtime::kThrowUnsupportedSuperError);
+ // Handled by VisitCall
+ UNREACHABLE();
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4967.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698