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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 2199283002: [modules] Introduce new VariableLocation for module imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 4 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/ast/modules.cc ('k') | src/ast/scopes.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ast/prettyprinter.h" 5 #include "src/ast/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 break; 1056 break;
1057 case VariableLocation::CONTEXT: 1057 case VariableLocation::CONTEXT:
1058 SNPrintF(buf + pos, " context[%d]", var->index()); 1058 SNPrintF(buf + pos, " context[%d]", var->index());
1059 break; 1059 break;
1060 case VariableLocation::GLOBAL: 1060 case VariableLocation::GLOBAL:
1061 SNPrintF(buf + pos, " global[%d]", var->index()); 1061 SNPrintF(buf + pos, " global[%d]", var->index());
1062 break; 1062 break;
1063 case VariableLocation::LOOKUP: 1063 case VariableLocation::LOOKUP:
1064 SNPrintF(buf + pos, " lookup"); 1064 SNPrintF(buf + pos, " lookup");
1065 break; 1065 break;
1066 case VariableLocation::MODULE:
1067 SNPrintF(buf + pos, " module");
1068 break;
1066 } 1069 }
1067 PrintLiteralWithModeIndented(buf.start(), var, node->name()); 1070 PrintLiteralWithModeIndented(buf.start(), var, node->name());
1068 } 1071 }
1069 } 1072 }
1070 1073
1071 1074
1072 void AstPrinter::VisitAssignment(Assignment* node) { 1075 void AstPrinter::VisitAssignment(Assignment* node) {
1073 IndentedScope indent(this, Token::Name(node->op()), node->position()); 1076 IndentedScope indent(this, Token::Name(node->op()), node->position());
1074 Visit(node->target()); 1077 Visit(node->target());
1075 Visit(node->value()); 1078 Visit(node->value());
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 1192
1190 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1193 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1191 Visit(node->expression()); 1194 Visit(node->expression());
1192 } 1195 }
1193 1196
1194 1197
1195 #endif // DEBUG 1198 #endif // DEBUG
1196 1199
1197 } // namespace internal 1200 } // namespace internal
1198 } // namespace v8 1201 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/modules.cc ('k') | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698