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

Unified Diff: src/interpreter/bytecode-generator.h

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Check for 'name' properties at parse-time Created 4 years, 1 month 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/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index 0447aa8f4522e161c3502e95710f5e02364ddeb2..4f22508f9da264e34544048ceaf9a54513b32fb2 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -132,7 +132,10 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void VisitCallSuper(Call* call);
void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr);
void VisitClassLiteralProperties(ClassLiteral* expr, Register literal,
- Register prototype);
+ Register prototype, Register needs_name);
+ void VisitClassLiteralStaticPrototypeWithComputedName(Register name);
+ void BuildClassLiteralNameProperty(ClassLiteral* expr, Register literal,
+ Register needs_name);
void VisitThisFunctionVariable(Variable* variable);
void VisitNewTargetVariable(Variable* variable);
void VisitBlockDeclarationsAndStatements(Block* stmt);
@@ -195,6 +198,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
Handle<Name> home_object_symbol() const { return home_object_symbol_; }
Handle<Name> prototype_string() const { return prototype_string_; }
+ Handle<Name> name_string() const { return name_string_; }
Zone* zone_;
BytecodeArrayBuilder* builder_;
@@ -217,6 +221,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
Handle<Name> home_object_symbol_;
Handle<Name> prototype_string_;
+ Handle<Name> name_string_;
};
} // namespace interpreter

Powered by Google App Engine
This is Rietveld 408576698