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

Side by Side Diff: src/prettyprinter.cc

Issue 159580: Add missing case in AST printer (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 IndentedScope indent("OBJ LITERAL"); 927 IndentedScope indent("OBJ LITERAL");
928 for (int i = 0; i < node->properties()->length(); i++) { 928 for (int i = 0; i < node->properties()->length(); i++) {
929 const char* prop_kind = NULL; 929 const char* prop_kind = NULL;
930 switch (node->properties()->at(i)->kind()) { 930 switch (node->properties()->at(i)->kind()) {
931 case ObjectLiteral::Property::CONSTANT: 931 case ObjectLiteral::Property::CONSTANT:
932 prop_kind = "PROPERTY - CONSTANT"; 932 prop_kind = "PROPERTY - CONSTANT";
933 break; 933 break;
934 case ObjectLiteral::Property::COMPUTED: 934 case ObjectLiteral::Property::COMPUTED:
935 prop_kind = "PROPERTY - COMPUTED"; 935 prop_kind = "PROPERTY - COMPUTED";
936 break; 936 break;
937 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
938 prop_kind = "PROPERTY - MATERIALIZED_LITERAL";
939 break;
937 case ObjectLiteral::Property::PROTOTYPE: 940 case ObjectLiteral::Property::PROTOTYPE:
938 prop_kind = "PROPERTY - PROTOTYPE"; 941 prop_kind = "PROPERTY - PROTOTYPE";
939 break; 942 break;
940 case ObjectLiteral::Property::GETTER: 943 case ObjectLiteral::Property::GETTER:
941 prop_kind = "PROPERTY - GETTER"; 944 prop_kind = "PROPERTY - GETTER";
942 break; 945 break;
943 case ObjectLiteral::Property::SETTER: 946 case ObjectLiteral::Property::SETTER:
944 prop_kind = "PROPERTY - SETTER"; 947 prop_kind = "PROPERTY - SETTER";
945 break; 948 break;
946 default: 949 default:
947 UNREACHABLE(); 950 UNREACHABLE();
948 break;
949 } 951 }
950 IndentedScope prop(prop_kind); 952 IndentedScope prop(prop_kind);
951 PrintIndentedVisit("KEY", node->properties()->at(i)->key()); 953 PrintIndentedVisit("KEY", node->properties()->at(i)->key());
952 PrintIndentedVisit("VALUE", node->properties()->at(i)->value()); 954 PrintIndentedVisit("VALUE", node->properties()->at(i)->value());
953 } 955 }
954 } 956 }
955 957
956 958
957 void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) { 959 void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) {
958 IndentedScope indent("ARRAY LITERAL"); 960 IndentedScope indent("ARRAY LITERAL");
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1095
1094 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1096 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1095 IndentedScope indent("THIS-FUNCTION"); 1097 IndentedScope indent("THIS-FUNCTION");
1096 } 1098 }
1097 1099
1098 1100
1099 1101
1100 #endif // DEBUG 1102 #endif // DEBUG
1101 1103
1102 } } // namespace v8::internal 1104 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698