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

Unified Diff: src/full-codegen.h

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove --harmony-spread flag Created 5 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
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 217f9e9bc986013521fae7c74f4de986236114e6..f5bdfdb8a607dd289ff1c6ca749f0815984235dc 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -370,9 +370,14 @@ class FullCodeGenerator: public AstVisitor {
PrepareForBailout(expr, TOS_REG);
}
- void VisitForStackValue(Expression* expr) {
+ void VisitForStackValue(Expression* expr, bool allow_super = false) {
StackValueContext context(this);
- Visit(expr);
+ if (allow_super && expr->IsSuperReference()) {
Dmitry Lomov (no reviews) 2015/03/31 10:09:42 Do not do this. Instead, call EmitLoadSuperConstr
+ EmitLoadSuperConstructor();
+ context.Plug(result_register());
+ } else {
+ Visit(expr);
+ }
PrepareForBailout(expr, NO_REGISTERS);
}
@@ -659,6 +664,7 @@ class FullCodeGenerator: public AstVisitor {
void EmitSetHomeObjectIfNeeded(Expression* initializer, int offset);
void EmitLoadSuperConstructor();
+ void EmitInitializeThisAfterSuper(SuperReference* super_ref);
void CallIC(Handle<Code> code,
TypeFeedbackId id = TypeFeedbackId::None());

Powered by Google App Engine
This is Rietveld 408576698