src/share/vm/ci/ciMethod.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -77,11 +77,11 @@
// Easy to compute, so fill them in now.
_max_stack = h_m()->max_stack();
_max_locals = h_m()->max_locals();
_code_size = h_m()->code_size();
_intrinsic_id = h_m()->intrinsic_id();
- _handler_count = h_m()->exception_table()->length() / 4;
+ _handler_count = h_m()->exception_table_length();
_uses_monitors = h_m()->access_flags().has_monitor_bytecodes();
_balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
_is_c1_compilable = !h_m()->is_not_c1_compilable();
_is_c2_compilable = !h_m()->is_not_c2_compilable();
// Lazy fields, filled in on demand. Require allocation.
@@ -196,28 +196,27 @@
}
}
}
// And load the exception table.
- typeArrayOop exc_table = me->exception_table();
+ ExceptionTable exc_table(me);
// Allocate one extra spot in our list of exceptions. This
// last entry will be used to represent the possibility that
// an exception escapes the method. See ciExceptionHandlerStream
// for details.
_exception_handlers =
(ciExceptionHandler**)arena->Amalloc(sizeof(ciExceptionHandler*)
* (_handler_count + 1));
if (_handler_count > 0) {
for (int i=0; i<_handler_count; i++) {
- int base = i*4;
_exception_handlers[i] = new (arena) ciExceptionHandler(
holder(),
- /* start */ exc_table->int_at(base),
- /* limit */ exc_table->int_at(base+1),
- /* goto pc */ exc_table->int_at(base+2),
- /* cp index */ exc_table->int_at(base+3));
+ /* start */ exc_table.start_pc(i),
+ /* limit */ exc_table.end_pc(i),
+ /* goto pc */ exc_table.handler_pc(i),
+ /* cp index */ exc_table.catch_type_index(i));
}
}
// Put an entry at the end of our list to represent the possibility
// of exceptional exit.