| 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 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2473 header->SetInitialEnvironment(entry_env); | 2473 header->SetInitialEnvironment(entry_env); |
| 2474 header->AttachLoopInformation(); | 2474 header->AttachLoopInformation(); |
| 2475 return header; | 2475 return header; |
| 2476 } | 2476 } |
| 2477 | 2477 |
| 2478 | 2478 |
| 2479 void HGraphBuilder::VisitBlock(Block* stmt) { | 2479 void HGraphBuilder::VisitBlock(Block* stmt) { |
| 2480 ASSERT(!HasStackOverflow()); | 2480 ASSERT(!HasStackOverflow()); |
| 2481 ASSERT(current_block() != NULL); | 2481 ASSERT(current_block() != NULL); |
| 2482 ASSERT(current_block()->HasPredecessor()); | 2482 ASSERT(current_block()->HasPredecessor()); |
| 2483 if (stmt->block_scope() != NULL) { |
| 2484 return Bailout("ScopedBlock"); |
| 2485 } |
| 2483 BreakAndContinueInfo break_info(stmt); | 2486 BreakAndContinueInfo break_info(stmt); |
| 2484 { BreakAndContinueScope push(&break_info, this); | 2487 { BreakAndContinueScope push(&break_info, this); |
| 2485 CHECK_BAILOUT(VisitStatements(stmt->statements())); | 2488 CHECK_BAILOUT(VisitStatements(stmt->statements())); |
| 2486 } | 2489 } |
| 2487 HBasicBlock* break_block = break_info.break_block(); | 2490 HBasicBlock* break_block = break_info.break_block(); |
| 2488 if (break_block != NULL) { | 2491 if (break_block != NULL) { |
| 2489 if (current_block() != NULL) current_block()->Goto(break_block); | 2492 if (current_block() != NULL) current_block()->Goto(break_block); |
| 2490 break_block->SetJoinId(stmt->ExitId()); | 2493 break_block->SetJoinId(stmt->ExitId()); |
| 2491 set_current_block(break_block); | 2494 set_current_block(break_block); |
| 2492 } | 2495 } |
| (...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6746 } | 6749 } |
| 6747 } | 6750 } |
| 6748 | 6751 |
| 6749 #ifdef DEBUG | 6752 #ifdef DEBUG |
| 6750 if (graph_ != NULL) graph_->Verify(); | 6753 if (graph_ != NULL) graph_->Verify(); |
| 6751 if (allocator_ != NULL) allocator_->Verify(); | 6754 if (allocator_ != NULL) allocator_->Verify(); |
| 6752 #endif | 6755 #endif |
| 6753 } | 6756 } |
| 6754 | 6757 |
| 6755 } } // namespace v8::internal | 6758 } } // namespace v8::internal |
| OLD | NEW |