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

Unified Diff: src/full-codegen.h

Issue 638623002: Keyed stores to super where key is a name. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: All platforms + CR feedback Created 6 years, 2 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/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 4c53c158b189b5bac6eb08841f244a52ed0ba51a..8c2835a86dfe5820b958087c266e4cfa7460617c 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -518,6 +518,24 @@ class FullCodeGenerator: public AstVisitor {
// Platform-specific support for compiling assignments.
+ // Left-hand side can only be a property, a global or a (parameter or local)
+ // slot.
+ enum LhsKind {
Igor Sheludko 2014/10/09 11:07:20 Since we make the enum "public" maybe "LvalueKind"
+ VARIABLE,
+ NAMED_PROPERTY,
+ KEYED_PROPERTY,
+ NAMED_SUPER_PROPERTY,
+ KEYED_SUPER_PROPERTY
+ };
+
+ static LhsKind GetAssignType(Property* property) {
+ if (property == NULL) return VARIABLE;
+ bool super_access = property->IsSuperAccess();
+ return (property->key()->IsPropertyName())
+ ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY)
+ : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY);
+ }
+
// Load a value from a named property.
// The receiver is left on the stack by the IC.
void EmitNamedPropertyLoad(Property* expr);
@@ -569,6 +587,10 @@ class FullCodeGenerator: public AstVisitor {
// is expected in accumulator.
void EmitNamedSuperPropertyStore(Property* prop);
+ // Complete a super named property assignment. The right-hand-side value
+ // is expected in accumulator.
+ void EmitKeyedSuperPropertyStore(Property* prop);
+
// Complete a keyed property assignment. The receiver and key are
// expected on top of the stack and the right-hand-side value in the
// accumulator.
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698