Mercurial > hg > truffle
comparison src/share/vm/ci/bcEscapeAnalyzer.cpp @ 2165:a7367756024b
Merge
author | twisti |
---|---|
date | Fri, 21 Jan 2011 01:16:13 -0800 |
parents | bb2c2878f134 8012aa3ccede |
children | 548597e74aa4 |
comparison
equal
deleted
inserted
replaced
2164:bb2c2878f134 | 2165:a7367756024b |
---|---|
767 fall_through = false; | 767 fall_through = false; |
768 break; | 768 break; |
769 case Bytecodes::_tableswitch: | 769 case Bytecodes::_tableswitch: |
770 { | 770 { |
771 state.spop(); | 771 state.spop(); |
772 Bytecode_tableswitch* switch_ = Bytecode_tableswitch_at(s.cur_bcp()); | 772 Bytecode_tableswitch sw(&s); |
773 int len = switch_->length(); | 773 int len = sw.length(); |
774 int dest_bci; | 774 int dest_bci; |
775 for (int i = 0; i < len; i++) { | 775 for (int i = 0; i < len; i++) { |
776 dest_bci = s.cur_bci() + switch_->dest_offset_at(i); | 776 dest_bci = s.cur_bci() + sw.dest_offset_at(i); |
777 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); | 777 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); |
778 successors.push(_methodBlocks->block_containing(dest_bci)); | 778 successors.push(_methodBlocks->block_containing(dest_bci)); |
779 } | 779 } |
780 dest_bci = s.cur_bci() + switch_->default_offset(); | 780 dest_bci = s.cur_bci() + sw.default_offset(); |
781 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); | 781 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); |
782 successors.push(_methodBlocks->block_containing(dest_bci)); | 782 successors.push(_methodBlocks->block_containing(dest_bci)); |
783 assert(s.next_bci() == limit_bci, "branch must end block"); | 783 assert(s.next_bci() == limit_bci, "branch must end block"); |
784 fall_through = false; | 784 fall_through = false; |
785 break; | 785 break; |
786 } | 786 } |
787 case Bytecodes::_lookupswitch: | 787 case Bytecodes::_lookupswitch: |
788 { | 788 { |
789 state.spop(); | 789 state.spop(); |
790 Bytecode_lookupswitch* switch_ = Bytecode_lookupswitch_at(s.cur_bcp()); | 790 Bytecode_lookupswitch sw(&s); |
791 int len = switch_->number_of_pairs(); | 791 int len = sw.number_of_pairs(); |
792 int dest_bci; | 792 int dest_bci; |
793 for (int i = 0; i < len; i++) { | 793 for (int i = 0; i < len; i++) { |
794 dest_bci = s.cur_bci() + switch_->pair_at(i)->offset(); | 794 dest_bci = s.cur_bci() + sw.pair_at(i).offset(); |
795 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); | 795 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); |
796 successors.push(_methodBlocks->block_containing(dest_bci)); | 796 successors.push(_methodBlocks->block_containing(dest_bci)); |
797 } | 797 } |
798 dest_bci = s.cur_bci() + switch_->default_offset(); | 798 dest_bci = s.cur_bci() + sw.default_offset(); |
799 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); | 799 assert(_methodBlocks->is_block_start(dest_bci), "branch destination must start a block"); |
800 successors.push(_methodBlocks->block_containing(dest_bci)); | 800 successors.push(_methodBlocks->block_containing(dest_bci)); |
801 fall_through = false; | 801 fall_through = false; |
802 break; | 802 break; |
803 } | 803 } |