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

Unified Diff: src/compiler.cc

Issue 803933008: new classes: change semantics of super(...) call and add new.target to construct stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 years, 11 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/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 544b4dd4595d0a07ec6a23a30bdc062882c5c4bc..038722675e372a6b830ebb80f566e671a33dd0d5 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -785,8 +785,8 @@ static void ThrowSuperConstructorCheckError(CompilationInfo* info,
static bool CheckSuperConstructorCall(CompilationInfo* info) {
FunctionLiteral* function = info->function();
+ if (FLAG_experimental_classes) return true;
if (!function->uses_super_constructor_call()) return true;
-
if (function->is_default_constructor()) return true;
ZoneList<Statement*>* body = function->body();
@@ -836,7 +836,6 @@ static bool CheckSuperConstructorCall(CompilationInfo* info) {
ThrowSuperConstructorCheckError(info, stmt);
return false;
}
-
return true;
}

Powered by Google App Engine
This is Rietveld 408576698