| OLD | NEW |
| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 | 222 |
| 223 void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) { | 223 void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) { |
| 224 Print("("); | 224 Print("("); |
| 225 PrintFunctionLiteral(node); | 225 PrintFunctionLiteral(node); |
| 226 Print(")"); | 226 Print(")"); |
| 227 } | 227 } |
| 228 | 228 |
| 229 | 229 |
| 230 void PrettyPrinter::VisitFunctionBoilerplateLiteral( | 230 void PrettyPrinter::VisitSharedFunctionInfoLiteral( |
| 231 FunctionBoilerplateLiteral* node) { | 231 SharedFunctionInfoLiteral* node) { |
| 232 Print("("); | 232 Print("("); |
| 233 PrintLiteral(node->boilerplate(), true); | 233 PrintLiteral(node->shared_function_info(), true); |
| 234 Print(")"); | 234 Print(")"); |
| 235 } | 235 } |
| 236 | 236 |
| 237 | 237 |
| 238 void PrettyPrinter::VisitConditional(Conditional* node) { | 238 void PrettyPrinter::VisitConditional(Conditional* node) { |
| 239 Visit(node->condition()); | 239 Visit(node->condition()); |
| 240 Print(" ? "); | 240 Print(" ? "); |
| 241 Visit(node->then_expression()); | 241 Visit(node->then_expression()); |
| 242 Print(" : "); | 242 Print(" : "); |
| 243 Visit(node->else_expression()); | 243 Visit(node->else_expression()); |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 PrintLiteralIndented("NAME", node->name(), false); | 911 PrintLiteralIndented("NAME", node->name(), false); |
| 912 PrintLiteralIndented("INFERRED NAME", node->inferred_name(), false); | 912 PrintLiteralIndented("INFERRED NAME", node->inferred_name(), false); |
| 913 PrintParameters(node->scope()); | 913 PrintParameters(node->scope()); |
| 914 // We don't want to see the function literal in this case: it | 914 // We don't want to see the function literal in this case: it |
| 915 // will be printed via PrintProgram when the code for it is | 915 // will be printed via PrintProgram when the code for it is |
| 916 // generated. | 916 // generated. |
| 917 // PrintStatements(node->body()); | 917 // PrintStatements(node->body()); |
| 918 } | 918 } |
| 919 | 919 |
| 920 | 920 |
| 921 void AstPrinter::VisitFunctionBoilerplateLiteral( | 921 void AstPrinter::VisitSharedFunctionInfoLiteral( |
| 922 FunctionBoilerplateLiteral* node) { | 922 SharedFunctionInfoLiteral* node) { |
| 923 IndentedScope indent("FUNC LITERAL"); | 923 IndentedScope indent("FUNC LITERAL"); |
| 924 PrintLiteralIndented("BOILERPLATE", node->boilerplate(), true); | 924 PrintLiteralIndented("SHARED INFO", node->shared_function_info(), true); |
| 925 } | 925 } |
| 926 | 926 |
| 927 | 927 |
| 928 void AstPrinter::VisitConditional(Conditional* node) { | 928 void AstPrinter::VisitConditional(Conditional* node) { |
| 929 IndentedScope indent("CONDITIONAL"); | 929 IndentedScope indent("CONDITIONAL"); |
| 930 PrintIndentedVisit("?", node->condition()); | 930 PrintIndentedVisit("?", node->condition()); |
| 931 PrintIndentedVisit("THEN", node->then_expression()); | 931 PrintIndentedVisit("THEN", node->then_expression()); |
| 932 PrintIndentedVisit("ELSE", node->else_expression()); | 932 PrintIndentedVisit("ELSE", node->else_expression()); |
| 933 } | 933 } |
| 934 | 934 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 TagScope tag(this, "FunctionLiteral"); | 1319 TagScope tag(this, "FunctionLiteral"); |
| 1320 { | 1320 { |
| 1321 AttributesScope attributes(this); | 1321 AttributesScope attributes(this); |
| 1322 AddAttribute("name", expr->name()); | 1322 AddAttribute("name", expr->name()); |
| 1323 } | 1323 } |
| 1324 VisitDeclarations(expr->scope()->declarations()); | 1324 VisitDeclarations(expr->scope()->declarations()); |
| 1325 VisitStatements(expr->body()); | 1325 VisitStatements(expr->body()); |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 | 1328 |
| 1329 void JsonAstBuilder::VisitFunctionBoilerplateLiteral( | 1329 void JsonAstBuilder::VisitSharedFunctionInfoLiteral( |
| 1330 FunctionBoilerplateLiteral* expr) { | 1330 SharedFunctionInfoLiteral* expr) { |
| 1331 TagScope tag(this, "FunctionBoilerplateLiteral"); | 1331 TagScope tag(this, "SharedFunctionInfoLiteral"); |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 | 1334 |
| 1335 void JsonAstBuilder::VisitConditional(Conditional* expr) { | 1335 void JsonAstBuilder::VisitConditional(Conditional* expr) { |
| 1336 TagScope tag(this, "Conditional"); | 1336 TagScope tag(this, "Conditional"); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 | 1339 |
| 1340 void JsonAstBuilder::VisitSlot(Slot* expr) { | 1340 void JsonAstBuilder::VisitSlot(Slot* expr) { |
| 1341 TagScope tag(this, "Slot"); | 1341 TagScope tag(this, "Slot"); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 AddAttribute("mode", Variable::Mode2String(decl->mode())); | 1517 AddAttribute("mode", Variable::Mode2String(decl->mode())); |
| 1518 } | 1518 } |
| 1519 Visit(decl->proxy()); | 1519 Visit(decl->proxy()); |
| 1520 if (decl->fun() != NULL) Visit(decl->fun()); | 1520 if (decl->fun() != NULL) Visit(decl->fun()); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 | 1523 |
| 1524 #endif // DEBUG | 1524 #endif // DEBUG |
| 1525 | 1525 |
| 1526 } } // namespace v8::internal | 1526 } } // namespace v8::internal |
| OLD | NEW |