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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1106383008: Remove unused Module-related AST nodes and associated codegen (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/ast-loop-assignment-analyzer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 const Operator* op = javascript()->StoreContext(0, variable->index()); 991 const Operator* op = javascript()->StoreContext(0, variable->index());
992 NewNode(op, current_context(), value); 992 NewNode(op, current_context(), value);
993 break; 993 break;
994 } 994 }
995 case Variable::LOOKUP: 995 case Variable::LOOKUP:
996 UNIMPLEMENTED(); 996 UNIMPLEMENTED();
997 } 997 }
998 } 998 }
999 999
1000 1000
1001 void AstGraphBuilder::VisitModuleDeclaration(ModuleDeclaration* decl) {
1002 UNREACHABLE();
1003 }
1004
1005
1006 void AstGraphBuilder::VisitImportDeclaration(ImportDeclaration* decl) { 1001 void AstGraphBuilder::VisitImportDeclaration(ImportDeclaration* decl) {
1007 UNREACHABLE(); 1002 UNREACHABLE();
1008 } 1003 }
1009 1004
1010 1005
1011 void AstGraphBuilder::VisitExportDeclaration(ExportDeclaration* decl) { 1006 void AstGraphBuilder::VisitExportDeclaration(ExportDeclaration* decl) {
1012 UNREACHABLE(); 1007 UNREACHABLE();
1013 } 1008 }
1014 1009
1015 1010
1016 void AstGraphBuilder::VisitModuleLiteral(ModuleLiteral* modl) { UNREACHABLE(); }
1017
1018
1019 void AstGraphBuilder::VisitModulePath(ModulePath* modl) { UNREACHABLE(); }
1020
1021
1022 void AstGraphBuilder::VisitModuleUrl(ModuleUrl* modl) { UNREACHABLE(); }
1023
1024
1025 void AstGraphBuilder::VisitBlock(Block* stmt) { 1011 void AstGraphBuilder::VisitBlock(Block* stmt) {
1026 BlockBuilder block(this); 1012 BlockBuilder block(this);
1027 ControlScopeForBreakable scope(this, stmt, &block); 1013 ControlScopeForBreakable scope(this, stmt, &block);
1028 if (stmt->labels() != NULL) block.BeginBlock(); 1014 if (stmt->labels() != NULL) block.BeginBlock();
1029 if (stmt->scope() == NULL) { 1015 if (stmt->scope() == NULL) {
1030 // Visit statements in the same scope, no declarations. 1016 // Visit statements in the same scope, no declarations.
1031 VisitStatements(stmt->statements()); 1017 VisitStatements(stmt->statements());
1032 } else { 1018 } else {
1033 // Visit declarations and statements in a block scope. 1019 // Visit declarations and statements in a block scope.
1034 if (stmt->scope()->ContextLocalCount() > 0) { 1020 if (stmt->scope()->ContextLocalCount() > 0) {
1035 Node* context = BuildLocalBlockContext(stmt->scope()); 1021 Node* context = BuildLocalBlockContext(stmt->scope());
1036 ContextScope scope(this, stmt->scope(), context); 1022 ContextScope scope(this, stmt->scope(), context);
1037 VisitDeclarations(stmt->scope()->declarations()); 1023 VisitDeclarations(stmt->scope()->declarations());
1038 VisitStatements(stmt->statements()); 1024 VisitStatements(stmt->statements());
1039 } else { 1025 } else {
1040 VisitDeclarations(stmt->scope()->declarations()); 1026 VisitDeclarations(stmt->scope()->declarations());
1041 VisitStatements(stmt->statements()); 1027 VisitStatements(stmt->statements());
1042 } 1028 }
1043 } 1029 }
1044 if (stmt->labels() != NULL) block.EndBlock(); 1030 if (stmt->labels() != NULL) block.EndBlock();
1045 } 1031 }
1046 1032
1047 1033
1048 void AstGraphBuilder::VisitModuleStatement(ModuleStatement* stmt) {
1049 UNREACHABLE();
1050 }
1051
1052
1053 void AstGraphBuilder::VisitExpressionStatement(ExpressionStatement* stmt) { 1034 void AstGraphBuilder::VisitExpressionStatement(ExpressionStatement* stmt) {
1054 VisitForEffect(stmt->expression()); 1035 VisitForEffect(stmt->expression());
1055 } 1036 }
1056 1037
1057 1038
1058 void AstGraphBuilder::VisitEmptyStatement(EmptyStatement* stmt) { 1039 void AstGraphBuilder::VisitEmptyStatement(EmptyStatement* stmt) {
1059 // Do nothing. 1040 // Do nothing.
1060 } 1041 }
1061 1042
1062 1043
(...skipping 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 // Phi does not exist yet, introduce one. 3571 // Phi does not exist yet, introduce one.
3591 value = NewPhi(inputs, value, control); 3572 value = NewPhi(inputs, value, control);
3592 value->ReplaceInput(inputs - 1, other); 3573 value->ReplaceInput(inputs - 1, other);
3593 } 3574 }
3594 return value; 3575 return value;
3595 } 3576 }
3596 3577
3597 } // namespace compiler 3578 } // namespace compiler
3598 } // namespace internal 3579 } // namespace internal
3599 } // namespace v8 3580 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/ast-loop-assignment-analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698