src/share/vm/ci/ciMethodBlocks.cpp

changeset 2462
8012aa3ccede
parent 2314
f95d63e2154a
child 6876
710a3c8b516e
     1.1 --- a/src/share/vm/ci/ciMethodBlocks.cpp	Wed Jan 12 13:59:18 2011 -0800
     1.2 +++ b/src/share/vm/ci/ciMethodBlocks.cpp	Thu Jan 13 22:15:41 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -175,15 +175,15 @@
    1.11        case Bytecodes::_tableswitch :
    1.12          {
    1.13            cur_block->set_control_bci(bci);
    1.14 -          Bytecode_tableswitch* switch_ = Bytecode_tableswitch_at(s.cur_bcp());
    1.15 -          int len = switch_->length();
    1.16 +          Bytecode_tableswitch sw(&s);
    1.17 +          int len = sw.length();
    1.18            ciBlock *dest;
    1.19            int dest_bci;
    1.20            for (int i = 0; i < len; i++) {
    1.21 -            dest_bci = s.cur_bci() + switch_->dest_offset_at(i);
    1.22 +            dest_bci = s.cur_bci() + sw.dest_offset_at(i);
    1.23              dest = make_block_at(dest_bci);
    1.24            }
    1.25 -          dest_bci = s.cur_bci() + switch_->default_offset();
    1.26 +          dest_bci = s.cur_bci() + sw.default_offset();
    1.27            make_block_at(dest_bci);
    1.28            if (s.next_bci() < limit_bci) {
    1.29              dest = make_block_at(s.next_bci());
    1.30 @@ -194,15 +194,15 @@
    1.31        case Bytecodes::_lookupswitch:
    1.32          {
    1.33            cur_block->set_control_bci(bci);
    1.34 -          Bytecode_lookupswitch* switch_ = Bytecode_lookupswitch_at(s.cur_bcp());
    1.35 -          int len = switch_->number_of_pairs();
    1.36 +          Bytecode_lookupswitch sw(&s);
    1.37 +          int len = sw.number_of_pairs();
    1.38            ciBlock *dest;
    1.39            int dest_bci;
    1.40            for (int i = 0; i < len; i++) {
    1.41 -            dest_bci = s.cur_bci() + switch_->pair_at(i)->offset();
    1.42 +            dest_bci = s.cur_bci() + sw.pair_at(i).offset();
    1.43              dest = make_block_at(dest_bci);
    1.44            }
    1.45 -          dest_bci = s.cur_bci() + switch_->default_offset();
    1.46 +          dest_bci = s.cur_bci() + sw.default_offset();
    1.47            dest = make_block_at(dest_bci);
    1.48            if (s.next_bci() < limit_bci) {
    1.49              dest = make_block_at(s.next_bci());

mercurial