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

Side by Side Diff: src/cfg.cc

Issue 159698: Enable --trace when --multipass is on. Bugfix in bailout condition.... (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 | « src/arm/cfg-arm.cc ('k') | src/ia32/cfg-ia32.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 BAILOUT("empty function body"); 61 BAILOUT("empty function body");
62 } 62 }
63 63
64 Cfg::Reset(fun); 64 Cfg::Reset(fun);
65 StatementBuilder builder; 65 StatementBuilder builder;
66 builder.VisitStatements(body); 66 builder.VisitStatements(body);
67 Cfg* cfg = builder.cfg(); 67 Cfg* cfg = builder.cfg();
68 if (cfg == NULL) { 68 if (cfg == NULL) {
69 BAILOUT("unsupported statement type"); 69 BAILOUT("unsupported statement type");
70 } 70 }
71 71 if (cfg->has_exit()) {
72 ASSERT(!cfg->has_exit()); // Return on all paths. 72 BAILOUT("control path without explicit return");
73 }
73 cfg->PrependEntryNode(fun); 74 cfg->PrependEntryNode(fun);
74 return cfg; 75 return cfg;
75 } 76 }
76 77
77 #undef BAILOUT 78 #undef BAILOUT
78 79
79 80
80 void Cfg::PrependEntryNode(FunctionLiteral* fun) { 81 void Cfg::PrependEntryNode(FunctionLiteral* fun) {
81 ASSERT(!is_empty()); 82 ASSERT(!is_empty());
82 entry_ = new EntryNode(fun, InstructionBlock::cast(entry())); 83 entry_ = new EntryNode(fun, InstructionBlock::cast(entry()));
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void ExitNode::Print() { 454 void ExitNode::Print() {
454 if (!is_marked_) { 455 if (!is_marked_) {
455 is_marked_ = true; 456 is_marked_ = true;
456 PrintF("L%d:\nExit\n\n", number()); 457 PrintF("L%d:\nExit\n\n", number());
457 } 458 }
458 } 459 }
459 460
460 #endif // DEBUG 461 #endif // DEBUG
461 462
462 } } // namespace v8::internal 463 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/cfg-arm.cc ('k') | src/ia32/cfg-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698