diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-17 15:19:39 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-17 15:19:39 +0000 |
commit | 638e4b601d7a084f2a2b51c2aa8f50341e8dc0f7 (patch) | |
tree | b4740b1c9b8809e0eb41a3c75d252ad2c54600a1 /gcc/java/verify-glue.c | |
parent | f8520ad797ec8cbb3919b39111f411babfe46e86 (diff) | |
download | gcc-638e4b601d7a084f2a2b51c2aa8f50341e8dc0f7.tar.gz |
gcc:
* tree.h (struct tree_label_decl): Removed old "java" fields.
gcc/java:
* java-tree.h (LABEL_TYPE_STATE): Removed.
(load_type_state): Removed.
(LABEL_PC): Removed.
(LABEL_VERIFIED): Removed.
(type_states): Declare.
* expr.c (type_states): New global.
(load_type_state): Now static. Use type_states. Changed
argument.
(lookup_label): Don't set LABEL_PC.
(expand_byte_code): Don't use LABEL_VERIFIED.
(note_instructions): Initialize type_states.
* verify-glue.c (vfy_note_stack_depth): Rewrote.
(vfy_note_stack_type): Use type_states.
(vfy_note_local_type): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127587 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/verify-glue.c')
-rw-r--r-- | gcc/java/verify-glue.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/java/verify-glue.c b/gcc/java/verify-glue.c index 7b16e16473a..3dfe608808c 100644 --- a/gcc/java/verify-glue.c +++ b/gcc/java/verify-glue.c @@ -393,37 +393,41 @@ vfy_get_primitive_type (int type) void vfy_note_stack_depth (vfy_method *method, int pc, int depth) { - tree label = lookup_label (pc); - LABEL_TYPE_STATE (label) = make_tree_vec (method->max_locals + depth); + tree val = make_tree_vec (method->max_locals + depth); + VEC_replace (tree, type_states, pc, val); + /* Called for side effects. */ + lookup_label (pc); } void vfy_note_stack_type (vfy_method *method, int pc, int slot, vfy_jclass type) { - tree label, vec; + tree vec; slot += method->max_locals; if (type == object_type_node) type = object_ptr_type_node; - label = lookup_label (pc); - vec = LABEL_TYPE_STATE (label); + vec = VEC_index (tree, type_states, pc); TREE_VEC_ELT (vec, slot) = type; + /* Called for side effects. */ + lookup_label (pc); } void vfy_note_local_type (vfy_method *method ATTRIBUTE_UNUSED, int pc, int slot, vfy_jclass type) { - tree label, vec; + tree vec; if (type == object_type_node) type = object_ptr_type_node; - label = lookup_label (pc); - vec = LABEL_TYPE_STATE (label); + vec = VEC_index (tree, type_states, pc); TREE_VEC_ELT (vec, slot) = type; + /* Called for side effects. */ + lookup_label (pc); } void |