diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/class.c | 6 | ||||
-rw-r--r-- | gcc/java/expr.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 01d50f2..3ffa76d 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,10 @@ 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi + throughout. + +2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + * class.c, expr.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. diff --git a/gcc/java/class.c b/gcc/java/class.c index 5eb245e..251873e 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1576,14 +1576,14 @@ get_dispatch_vector (tree type) HOST_WIDE_INT i; tree method; tree super = CLASSTYPE_SUPER (type); - HOST_WIDE_INT nvirtuals = tree_low_cst (TYPE_NVIRTUALS (type), 0); + HOST_WIDE_INT nvirtuals = tree_to_shwi (TYPE_NVIRTUALS (type)); vtable = make_tree_vec (nvirtuals); TYPE_VTABLE (type) = vtable; if (super != NULL_TREE) { tree super_vtable = get_dispatch_vector (super); - for (i = tree_low_cst (TYPE_NVIRTUALS (super), 0); --i >= 0; ) + for (i = tree_to_shwi (TYPE_NVIRTUALS (super)); --i >= 0; ) TREE_VEC_ELT (vtable, i) = TREE_VEC_ELT (super_vtable, i); } @@ -1593,7 +1593,7 @@ get_dispatch_vector (tree type) tree method_index = get_method_index (method); if (method_index != NULL_TREE && tree_fits_shwi_p (method_index)) - TREE_VEC_ELT (vtable, tree_low_cst (method_index, 0)) = method; + TREE_VEC_ELT (vtable, tree_to_shwi (method_index)) = method; } } diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 0720065..6dc00c6 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1050,7 +1050,7 @@ build_newarray (int atype_value, tree length) tree type = build_java_array_type (prim_type, tree_fits_shwi_p (length) == INTEGER_CST - ? tree_low_cst (length, 0) : -1); + ? tree_to_shwi (length) : -1); /* Pass a reference to the primitive type class and save the runtime some work. */ @@ -1070,7 +1070,7 @@ build_anewarray (tree class_type, tree length) tree type = build_java_array_type (class_type, tree_fits_shwi_p (length) - ? tree_low_cst (length, 0) : -1); + ? tree_to_shwi (length) : -1); return build_call_nary (promote_type (type), build_address_of (soft_anewarray_node), |