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

Side by Side Diff: src/hydrogen.cc

Issue 52593008: Do Else() first for JoinContinuation() in IfBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 : first_false_block_; 837 : first_false_block_;
838 continuation->Capture(true_block, false_block); 838 continuation->Capture(true_block, false_block);
839 captured_ = true; 839 captured_ = true;
840 End(); 840 End();
841 } 841 }
842 842
843 843
844 void HGraphBuilder::IfBuilder::JoinContinuation(HIfContinuation* continuation) { 844 void HGraphBuilder::IfBuilder::JoinContinuation(HIfContinuation* continuation) {
845 ASSERT(!finished_); 845 ASSERT(!finished_);
846 ASSERT(!captured_); 846 ASSERT(!captured_);
847 ASSERT(did_then_);
848 if (!did_else_) Else();
847 HBasicBlock* true_block = last_true_block_ == NULL 849 HBasicBlock* true_block = last_true_block_ == NULL
848 ? first_true_block_ 850 ? first_true_block_
849 : last_true_block_; 851 : last_true_block_;
850 HBasicBlock* false_block = did_else_ && (first_false_block_ != NULL) 852 HBasicBlock* false_block = builder_->current_block();
851 ? builder_->current_block()
852 : first_false_block_;
853 if (true_block != NULL && !true_block->IsFinished()) { 853 if (true_block != NULL && !true_block->IsFinished()) {
854 ASSERT(continuation->IsTrueReachable()); 854 ASSERT(continuation->IsTrueReachable());
855 builder_->GotoNoSimulate(true_block, continuation->true_branch()); 855 builder_->GotoNoSimulate(true_block, continuation->true_branch());
856 } 856 }
857 if (false_block != NULL && !false_block->IsFinished()) { 857 if (false_block != NULL && !false_block->IsFinished()) {
858 ASSERT(continuation->IsFalseReachable()); 858 ASSERT(continuation->IsFalseReachable());
859 builder_->GotoNoSimulate(false_block, continuation->false_branch()); 859 builder_->GotoNoSimulate(false_block, continuation->false_branch());
860 } 860 }
861 captured_ = true; 861 captured_ = true;
862 End(); 862 End();
(...skipping 8961 matching lines...) Expand 10 before | Expand all | Expand 10 after
9824 if (ShouldProduceTraceOutput()) { 9824 if (ShouldProduceTraceOutput()) {
9825 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9825 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9826 } 9826 }
9827 9827
9828 #ifdef DEBUG 9828 #ifdef DEBUG
9829 graph_->Verify(false); // No full verify. 9829 graph_->Verify(false); // No full verify.
9830 #endif 9830 #endif
9831 } 9831 }
9832 9832
9833 } } // namespace v8::internal 9833 } } // 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