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

Side by Side Diff: src/prettyprinter.cc

Issue 6606006: [Isolates] Merge 6500:6700 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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/preparser.cc ('k') | src/regexp.js » ('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 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 Print(" }"); 290 Print(" }");
291 } 291 }
292 292
293 293
294 void PrettyPrinter::VisitSlot(Slot* node) { 294 void PrettyPrinter::VisitSlot(Slot* node) {
295 switch (node->type()) { 295 switch (node->type()) {
296 case Slot::PARAMETER: 296 case Slot::PARAMETER:
297 Print("parameter[%d]", node->index()); 297 Print("parameter[%d]", node->index());
298 break; 298 break;
299 case Slot::LOCAL: 299 case Slot::LOCAL:
300 Print("frame[%d]", node->index()); 300 Print("local[%d]", node->index());
301 break; 301 break;
302 case Slot::CONTEXT: 302 case Slot::CONTEXT:
303 Print(".context[%d]", node->index()); 303 Print("context[%d]", node->index());
304 break; 304 break;
305 case Slot::LOOKUP: 305 case Slot::LOOKUP:
306 Print(".context["); 306 Print("lookup[");
307 PrintLiteral(node->var()->name(), false); 307 PrintLiteral(node->var()->name(), false);
308 Print("]"); 308 Print("]");
309 break; 309 break;
310 default: 310 default:
311 UNREACHABLE(); 311 UNREACHABLE();
312 } 312 }
313 } 313 }
314 314
315 315
316 void PrettyPrinter::VisitVariableProxy(VariableProxy* node) { 316 void PrettyPrinter::VisitVariableProxy(VariableProxy* node) {
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 982
983 void AstPrinter::VisitCatchExtensionObject(CatchExtensionObject* node) { 983 void AstPrinter::VisitCatchExtensionObject(CatchExtensionObject* node) {
984 IndentedScope indent("CatchExtensionObject"); 984 IndentedScope indent("CatchExtensionObject");
985 PrintIndentedVisit("KEY", node->key()); 985 PrintIndentedVisit("KEY", node->key());
986 PrintIndentedVisit("VALUE", node->value()); 986 PrintIndentedVisit("VALUE", node->value());
987 } 987 }
988 988
989 989
990 void AstPrinter::VisitSlot(Slot* node) { 990 void AstPrinter::VisitSlot(Slot* node) {
991 PrintIndented("SLOT "); 991 PrintIndented("SLOT ");
992 switch (node->type()) { 992 PrettyPrinter::VisitSlot(node);
993 case Slot::PARAMETER:
994 Print("parameter[%d]", node->index());
995 break;
996 case Slot::LOCAL:
997 Print("frame[%d]", node->index());
998 break;
999 case Slot::CONTEXT:
1000 Print(".context[%d]", node->index());
1001 break;
1002 case Slot::LOOKUP:
1003 Print(".context[");
1004 PrintLiteral(node->var()->name(), false);
1005 Print("]");
1006 break;
1007 default:
1008 UNREACHABLE();
1009 }
1010 Print("\n"); 993 Print("\n");
1011 } 994 }
1012 995
1013 996
1014 void AstPrinter::VisitVariableProxy(VariableProxy* node) { 997 void AstPrinter::VisitVariableProxy(VariableProxy* node) {
1015 PrintLiteralWithModeIndented("VAR PROXY", node->AsVariable(), node->name(), 998 PrintLiteralWithModeIndented("VAR PROXY", node->AsVariable(), node->name(),
1016 node->type()); 999 node->type());
1017 Variable* var = node->var(); 1000 Variable* var = node->var();
1018 if (var != NULL && var->rewrite() != NULL) { 1001 if (var != NULL && var->rewrite() != NULL) {
1019 IndentedScope indent(this); 1002 IndentedScope indent(this);
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 AddAttribute("mode", Variable::Mode2String(decl->mode())); 1520 AddAttribute("mode", Variable::Mode2String(decl->mode()));
1538 } 1521 }
1539 Visit(decl->proxy()); 1522 Visit(decl->proxy());
1540 if (decl->fun() != NULL) Visit(decl->fun()); 1523 if (decl->fun() != NULL) Visit(decl->fun());
1541 } 1524 }
1542 1525
1543 1526
1544 #endif // DEBUG 1527 #endif // DEBUG
1545 1528
1546 } } // namespace v8::internal 1529 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698