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

Side by Side Diff: src/hydrogen.cc

Issue 17444011: Fix to_boolean type feedback for unary and binary ops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
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 8142 matching lines...) Expand 10 before | Expand all | Expand 10 after
8153 HBasicBlock* if_true = inlined_test_context()->if_true(); 8153 HBasicBlock* if_true = inlined_test_context()->if_true();
8154 HBasicBlock* if_false = inlined_test_context()->if_false(); 8154 HBasicBlock* if_false = inlined_test_context()->if_false();
8155 8155
8156 HEnterInlined* entry = function_state()->entry(); 8156 HEnterInlined* entry = function_state()->entry();
8157 8157
8158 // Pop the return test context from the expression context stack. 8158 // Pop the return test context from the expression context stack.
8159 ASSERT(ast_context() == inlined_test_context()); 8159 ASSERT(ast_context() == inlined_test_context());
8160 ClearInlinedTestContext(); 8160 ClearInlinedTestContext();
8161 delete target_state; 8161 delete target_state;
8162 8162
8163 TestContext* test_context = TestContext::cast(ast_context());
8164
8163 // Forward to the real test context. 8165 // Forward to the real test context.
8164 if (if_true->HasPredecessor()) { 8166 if (if_true->HasPredecessor()) {
8165 entry->RegisterReturnTarget(if_true, zone()); 8167 entry->RegisterReturnTarget(if_true, zone());
8166 if_true->SetJoinId(ast_id); 8168 if_true->SetJoinId(ast_id);
8167 HBasicBlock* true_target = TestContext::cast(ast_context())->if_true(); 8169 HBasicBlock* true_target = test_context->if_true();
8168 if_true->Goto(true_target, function_state()); 8170 if_true->Goto(true_target, function_state());
8169 } 8171 }
8170 if (if_false->HasPredecessor()) { 8172 if (if_false->HasPredecessor()) {
8171 entry->RegisterReturnTarget(if_false, zone()); 8173 entry->RegisterReturnTarget(if_false, zone());
8172 if_false->SetJoinId(ast_id); 8174 if_false->SetJoinId(ast_id);
8173 HBasicBlock* false_target = TestContext::cast(ast_context())->if_false(); 8175 HBasicBlock* false_target = test_context->if_false();
8174 if_false->Goto(false_target, function_state()); 8176 if_false->Goto(false_target, function_state());
8175 } 8177 }
8176 set_current_block(NULL); 8178 set_current_block(NULL);
8177 return true; 8179 return true;
8178 8180
8179 } else if (function_return()->HasPredecessor()) { 8181 } else if (function_return()->HasPredecessor()) {
8180 function_state()->entry()->RegisterReturnTarget(function_return(), zone()); 8182 function_state()->entry()->RegisterReturnTarget(function_return(), zone());
8181 function_return()->SetJoinId(ast_id); 8183 function_return()->SetJoinId(ast_id);
8182 set_current_block(function_return()); 8184 set_current_block(function_return());
8183 } else { 8185 } else {
(...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
11584 } 11586 }
11585 } 11587 }
11586 11588
11587 #ifdef DEBUG 11589 #ifdef DEBUG
11588 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11590 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11589 if (allocator_ != NULL) allocator_->Verify(); 11591 if (allocator_ != NULL) allocator_->Verify();
11590 #endif 11592 #endif
11591 } 11593 }
11592 11594
11593 } } // namespace v8::internal 11595 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698