OLD | NEW |
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 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 break; | 1054 break; |
1055 case VariableLocation::CONTEXT: | 1055 case VariableLocation::CONTEXT: |
1056 SNPrintF(buf + pos, " context[%d]", var->index()); | 1056 SNPrintF(buf + pos, " context[%d]", var->index()); |
1057 break; | 1057 break; |
1058 case VariableLocation::GLOBAL: | 1058 case VariableLocation::GLOBAL: |
1059 SNPrintF(buf + pos, " global[%d]", var->index()); | 1059 SNPrintF(buf + pos, " global[%d]", var->index()); |
1060 break; | 1060 break; |
1061 case VariableLocation::LOOKUP: | 1061 case VariableLocation::LOOKUP: |
1062 SNPrintF(buf + pos, " lookup"); | 1062 SNPrintF(buf + pos, " lookup"); |
1063 break; | 1063 break; |
| 1064 case VariableLocation::MODULE: |
| 1065 SNPrintF(buf + pos, " module"); |
| 1066 break; |
1064 } | 1067 } |
1065 PrintLiteralWithModeIndented(buf.start(), var, node->name()); | 1068 PrintLiteralWithModeIndented(buf.start(), var, node->name()); |
1066 } | 1069 } |
1067 } | 1070 } |
1068 | 1071 |
1069 | 1072 |
1070 void AstPrinter::VisitAssignment(Assignment* node) { | 1073 void AstPrinter::VisitAssignment(Assignment* node) { |
1071 IndentedScope indent(this, Token::Name(node->op()), node->position()); | 1074 IndentedScope indent(this, Token::Name(node->op()), node->position()); |
1072 Visit(node->target()); | 1075 Visit(node->target()); |
1073 Visit(node->value()); | 1076 Visit(node->value()); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 | 1190 |
1188 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1191 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1189 Visit(node->expression()); | 1192 Visit(node->expression()); |
1190 } | 1193 } |
1191 | 1194 |
1192 | 1195 |
1193 #endif // DEBUG | 1196 #endif // DEBUG |
1194 | 1197 |
1195 } // namespace internal | 1198 } // namespace internal |
1196 } // namespace v8 | 1199 } // namespace v8 |
OLD | NEW |