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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1647213002: Remove unnecessary ClassLiteral name member and simplify Function.name handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Slightly shorter Created 4 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
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index b236775154bf59a1962cfcfea71a4a8e9f48a0f9..61c433821aae88837d34064bb3782e30f95b8d81 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1558,22 +1558,16 @@ void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) {
void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
- Node* class_name = expr->raw_name() ? jsgraph()->Constant(expr->name())
- : jsgraph()->UndefinedConstant();
-
- // The class name is expected on the operand stack.
- environment()->Push(class_name);
VisitForValueOrTheHole(expr->extends());
VisitForValue(expr->constructor());
// Create node to instantiate a new class.
Node* constructor = environment()->Pop();
Node* extends = environment()->Pop();
- Node* name = environment()->Pop();
Node* start = jsgraph()->Constant(expr->start_position());
Node* end = jsgraph()->Constant(expr->end_position());
const Operator* opc = javascript()->CallRuntime(Runtime::kDefineClass);
- Node* literal = NewNode(opc, name, extends, constructor, start, end);
+ Node* literal = NewNode(opc, extends, constructor, start, end);
PrepareFrameState(literal, expr->CreateLiteralId(),
OutputFrameStateCombine::Push());
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698