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

Side by Side Diff: src/hydrogen.cc

Issue 7739025: Fix an inlining bug on the 3.3 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.3
Patch Set: Created 9 years, 3 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 | « no previous file | src/version.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4330 4330
4331 empty_true->Goto(inlined_test_context()->if_true(), false); 4331 empty_true->Goto(inlined_test_context()->if_true(), false);
4332 empty_false->Goto(inlined_test_context()->if_false(), false); 4332 empty_false->Goto(inlined_test_context()->if_false(), false);
4333 } 4333 }
4334 } 4334 }
4335 4335
4336 // Fix up the function exits. 4336 // Fix up the function exits.
4337 if (inlined_test_context() != NULL) { 4337 if (inlined_test_context() != NULL) {
4338 HBasicBlock* if_true = inlined_test_context()->if_true(); 4338 HBasicBlock* if_true = inlined_test_context()->if_true();
4339 HBasicBlock* if_false = inlined_test_context()->if_false(); 4339 HBasicBlock* if_false = inlined_test_context()->if_false();
4340 if_true->SetJoinId(expr->id());
4341 if_false->SetJoinId(expr->id());
4342 ASSERT(ast_context() == inlined_test_context()); 4340 ASSERT(ast_context() == inlined_test_context());
4343 // Pop the return test context from the expression context stack. 4341 // Pop the return test context from the expression context stack.
4344 ClearInlinedTestContext(); 4342 ClearInlinedTestContext();
4345 4343
4346 // Forward to the real test context. 4344 // Forward to the real test context.
4347 HBasicBlock* true_target = TestContext::cast(ast_context())->if_true(); 4345 if (if_true->HasPredecessor()) {
4348 HBasicBlock* false_target = TestContext::cast(ast_context())->if_false(); 4346 if_true->SetJoinId(expr->id());
4349 if_true->Goto(true_target, false); 4347 HBasicBlock* true_target = TestContext::cast(ast_context())->if_true();
4350 if_false->Goto(false_target, false); 4348 if_true->Goto(true_target, false);
4349 }
4350 if (if_false->HasPredecessor()) {
4351 if_false->SetJoinId(expr->id());
4352 HBasicBlock* false_target = TestContext::cast(ast_context())->if_false();
4353 if_false->Goto(false_target, false);
4354 }
4351 4355
4352 // TODO(kmillikin): Come up with a better way to handle this. It is too 4356 // TODO(kmillikin): Come up with a better way to handle this. It is too
4353 // subtle. NULL here indicates that the enclosing context has no control 4357 // subtle. NULL here indicates that the enclosing context has no control
4354 // flow to handle. 4358 // flow to handle.
4355 set_current_block(NULL); 4359 set_current_block(NULL);
4356 4360
4357 } else if (function_return()->HasPredecessor()) { 4361 } else if (function_return()->HasPredecessor()) {
4358 function_return()->SetJoinId(expr->id()); 4362 function_return()->SetJoinId(expr->id());
4359 set_current_block(function_return()); 4363 set_current_block(function_return());
4360 } else { 4364 } else {
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
6333 } 6337 }
6334 } 6338 }
6335 6339
6336 #ifdef DEBUG 6340 #ifdef DEBUG
6337 if (graph_ != NULL) graph_->Verify(); 6341 if (graph_ != NULL) graph_->Verify();
6338 if (allocator_ != NULL) allocator_->Verify(); 6342 if (allocator_ != NULL) allocator_->Verify();
6339 #endif 6343 #endif
6340 } 6344 }
6341 6345
6342 } } // namespace v8::internal 6346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698