OLD | NEW |
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 5361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5372 } | 5372 } |
5373 | 5373 |
5374 ASSERT(ast_context()->IsValue()); | 5374 ASSERT(ast_context()->IsValue()); |
5375 HBasicBlock* materialize_false = graph()->CreateBasicBlock(); | 5375 HBasicBlock* materialize_false = graph()->CreateBasicBlock(); |
5376 HBasicBlock* materialize_true = graph()->CreateBasicBlock(); | 5376 HBasicBlock* materialize_true = graph()->CreateBasicBlock(); |
5377 CHECK_BAILOUT(VisitForControl(expr->expression(), | 5377 CHECK_BAILOUT(VisitForControl(expr->expression(), |
5378 materialize_false, | 5378 materialize_false, |
5379 materialize_true)); | 5379 materialize_true)); |
5380 | 5380 |
5381 if (materialize_false->HasPredecessor()) { | 5381 if (materialize_false->HasPredecessor()) { |
5382 materialize_false->SetJoinId(expr->expression()->id()); | 5382 materialize_false->SetJoinId(expr->MaterializeFalseId()); |
5383 set_current_block(materialize_false); | 5383 set_current_block(materialize_false); |
5384 Push(graph()->GetConstantFalse()); | 5384 Push(graph()->GetConstantFalse()); |
5385 } else { | 5385 } else { |
5386 materialize_false = NULL; | 5386 materialize_false = NULL; |
5387 } | 5387 } |
5388 | 5388 |
5389 if (materialize_true->HasPredecessor()) { | 5389 if (materialize_true->HasPredecessor()) { |
5390 materialize_true->SetJoinId(expr->expression()->id()); | 5390 materialize_true->SetJoinId(expr->MaterializeTrueId()); |
5391 set_current_block(materialize_true); | 5391 set_current_block(materialize_true); |
5392 Push(graph()->GetConstantTrue()); | 5392 Push(graph()->GetConstantTrue()); |
5393 } else { | 5393 } else { |
5394 materialize_true = NULL; | 5394 materialize_true = NULL; |
5395 } | 5395 } |
5396 | 5396 |
5397 HBasicBlock* join = | 5397 HBasicBlock* join = |
5398 CreateJoin(materialize_false, materialize_true, expr->id()); | 5398 CreateJoin(materialize_false, materialize_true, expr->id()); |
5399 set_current_block(join); | 5399 set_current_block(join); |
5400 if (join != NULL) return ast_context()->ReturnValue(Pop()); | 5400 if (join != NULL) return ast_context()->ReturnValue(Pop()); |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7033 } | 7033 } |
7034 } | 7034 } |
7035 | 7035 |
7036 #ifdef DEBUG | 7036 #ifdef DEBUG |
7037 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7037 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7038 if (allocator_ != NULL) allocator_->Verify(); | 7038 if (allocator_ != NULL) allocator_->Verify(); |
7039 #endif | 7039 #endif |
7040 } | 7040 } |
7041 | 7041 |
7042 } } // namespace v8::internal | 7042 } } // namespace v8::internal |
OLD | NEW |