| 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 break; | 1021 break; |
| 1022 case VariableLocation::PARAMETER: | 1022 case VariableLocation::PARAMETER: |
| 1023 SNPrintF(buf + pos, " parameter[%d]", var->index()); | 1023 SNPrintF(buf + pos, " parameter[%d]", var->index()); |
| 1024 break; | 1024 break; |
| 1025 case VariableLocation::LOCAL: | 1025 case VariableLocation::LOCAL: |
| 1026 SNPrintF(buf + pos, " local[%d]", var->index()); | 1026 SNPrintF(buf + pos, " local[%d]", var->index()); |
| 1027 break; | 1027 break; |
| 1028 case VariableLocation::CONTEXT: | 1028 case VariableLocation::CONTEXT: |
| 1029 SNPrintF(buf + pos, " context[%d]", var->index()); | 1029 SNPrintF(buf + pos, " context[%d]", var->index()); |
| 1030 break; | 1030 break; |
| 1031 case VariableLocation::GLOBAL: | |
| 1032 SNPrintF(buf + pos, " global[%d]", var->index()); | |
| 1033 break; | |
| 1034 case VariableLocation::LOOKUP: | 1031 case VariableLocation::LOOKUP: |
| 1035 SNPrintF(buf + pos, " lookup"); | 1032 SNPrintF(buf + pos, " lookup"); |
| 1036 break; | 1033 break; |
| 1037 case VariableLocation::MODULE: | 1034 case VariableLocation::MODULE: |
| 1038 SNPrintF(buf + pos, " module"); | 1035 SNPrintF(buf + pos, " module"); |
| 1039 break; | 1036 break; |
| 1040 } | 1037 } |
| 1041 PrintLiteralWithModeIndented(buf.start(), var, node->name()); | 1038 PrintLiteralWithModeIndented(buf.start(), var, node->name()); |
| 1042 } | 1039 } |
| 1043 } | 1040 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 | 1160 |
| 1164 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1161 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
| 1165 Visit(node->expression()); | 1162 Visit(node->expression()); |
| 1166 } | 1163 } |
| 1167 | 1164 |
| 1168 | 1165 |
| 1169 #endif // DEBUG | 1166 #endif // DEBUG |
| 1170 | 1167 |
| 1171 } // namespace internal | 1168 } // namespace internal |
| 1172 } // namespace v8 | 1169 } // namespace v8 |
| OLD | NEW |