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

Side by Side Diff: src/prettyprinter.cc

Issue 25315002: Revert "Defer allocation of native function literals." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « src/parser.cc ('k') | src/typing.cc » ('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 // 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 292
293 void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) { 293 void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
294 Print("("); 294 Print("(");
295 PrintFunctionLiteral(node); 295 PrintFunctionLiteral(node);
296 Print(")"); 296 Print(")");
297 } 297 }
298 298
299 299
300 void PrettyPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) { 300 void PrettyPrinter::VisitSharedFunctionInfoLiteral(
301 SharedFunctionInfoLiteral* node) {
301 Print("("); 302 Print("(");
302 PrintLiteral(node->name(), false); 303 PrintLiteral(node->shared_function_info(), true);
303 Print(")"); 304 Print(")");
304 } 305 }
305 306
306 307
307 void PrettyPrinter::VisitConditional(Conditional* node) { 308 void PrettyPrinter::VisitConditional(Conditional* node) {
308 Visit(node->condition()); 309 Visit(node->condition());
309 Print(" ? "); 310 Print(" ? ");
310 Visit(node->then_expression()); 311 Visit(node->then_expression());
311 Print(" : "); 312 Print(" : ");
312 Visit(node->else_expression()); 313 Visit(node->else_expression());
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 PrintLiteralIndented("NAME", node->name(), false); 975 PrintLiteralIndented("NAME", node->name(), false);
975 PrintLiteralIndented("INFERRED NAME", node->inferred_name(), false); 976 PrintLiteralIndented("INFERRED NAME", node->inferred_name(), false);
976 PrintParameters(node->scope()); 977 PrintParameters(node->scope());
977 // We don't want to see the function literal in this case: it 978 // We don't want to see the function literal in this case: it
978 // will be printed via PrintProgram when the code for it is 979 // will be printed via PrintProgram when the code for it is
979 // generated. 980 // generated.
980 // PrintStatements(node->body()); 981 // PrintStatements(node->body());
981 } 982 }
982 983
983 984
984 void AstPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) { 985 void AstPrinter::VisitSharedFunctionInfoLiteral(
985 IndentedScope indent(this, "NATIVE FUNC LITERAL"); 986 SharedFunctionInfoLiteral* node) {
986 PrintLiteralIndented("NAME", node->name(), false); 987 IndentedScope indent(this, "FUNC LITERAL");
988 PrintLiteralIndented("SHARED INFO", node->shared_function_info(), true);
987 } 989 }
988 990
989 991
990 void AstPrinter::VisitConditional(Conditional* node) { 992 void AstPrinter::VisitConditional(Conditional* node) {
991 IndentedScope indent(this, "CONDITIONAL"); 993 IndentedScope indent(this, "CONDITIONAL");
992 PrintIndentedVisit("CONDITION", node->condition()); 994 PrintIndentedVisit("CONDITION", node->condition());
993 PrintIndentedVisit("THEN", node->then_expression()); 995 PrintIndentedVisit("THEN", node->then_expression());
994 PrintIndentedVisit("ELSE", node->else_expression()); 996 PrintIndentedVisit("ELSE", node->else_expression());
995 } 997 }
996 998
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 } 1160 }
1159 1161
1160 1162
1161 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1163 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1162 IndentedScope indent(this, "THIS-FUNCTION"); 1164 IndentedScope indent(this, "THIS-FUNCTION");
1163 } 1165 }
1164 1166
1165 #endif // DEBUG 1167 #endif // DEBUG
1166 1168
1167 } } // namespace v8::internal 1169 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698