summaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 97f540aac16..33d3afdd3c0 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -698,7 +698,7 @@ build_java_array_length_access (tree node)
length = java_array_type_length (type);
if (length >= 0)
- return build_int_cst (NULL_TREE, length, 0);
+ return build_int_cst (NULL_TREE, length);
node = build3 (COMPONENT_REF, int_type_node,
build_java_indirect_ref (array_type, node,
@@ -910,7 +910,7 @@ build_newarray (int atype_value, tree length)
and save the runtime some work. However, the bytecode generator
expects to find the type_code int here. */
if (flag_emit_class_files)
- type_arg = build_int_cst (NULL_TREE, atype_value, 0);
+ type_arg = build_int_cst (NULL_TREE, atype_value);
else
type_arg = build_class_ref (prim_type);
@@ -971,7 +971,7 @@ expand_java_multianewarray (tree class_type, int ndim)
build_address_of (soft_multianewarray_node),
tree_cons (NULL_TREE, build_class_ref (class_type),
tree_cons (NULL_TREE,
- build_int_cst (NULL_TREE, ndim, 0),
+ build_int_cst (NULL_TREE, ndim),
args)),
NULL_TREE));
}
@@ -1082,7 +1082,7 @@ expand_java_pushc (int ival, tree type)
if (type == ptr_type_node && ival == 0)
value = null_pointer_node;
else if (type == int_type_node || type == long_type_node)
- value = build_int_cst (type, ival, ival < 0 ? -1 : 0);
+ value = build_int_cst (type, ival);
else if (type == float_type_node || type == double_type_node)
{
REAL_VALUE_TYPE x;
@@ -1287,7 +1287,7 @@ expand_iinc (unsigned int local_var_index, int ival, int pc)
flush_quick_stack ();
local_var = find_local_variable (local_var_index, int_type_node, pc);
- constant_value = build_int_cst (NULL_TREE, ival, ival < 0 ? -1 : 0);
+ constant_value = build_int_cst (NULL_TREE, ival);
res = fold (build2 (PLUS_EXPR, int_type_node, local_var, constant_value));
java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (local_var), local_var, res));
update_aliases (local_var, local_var_index, pc);
@@ -1358,7 +1358,7 @@ build_java_binop (enum tree_code op, tree type, tree arg1, tree arg2)
case LSHIFT_EXPR:
case RSHIFT_EXPR:
mask = build_int_cst (NULL_TREE,
- TYPE_PRECISION (TREE_TYPE (arg1)) - 1, 0);
+ TYPE_PRECISION (TREE_TYPE (arg1)) - 1);
arg2 = fold (build2 (BIT_AND_EXPR, int_type_node, arg2, mask));
break;
@@ -1539,8 +1539,7 @@ build_field_ref (tree self_value, tree self_class, tree name)
{
tree otable_index
= build_int_cst (NULL_TREE, get_symbol_table_index
- (field_decl, &TYPE_OTABLE_METHODS (output_class)),
- 0);
+ (field_decl, &TYPE_OTABLE_METHODS (output_class)));
tree field_offset
= build4 (ARRAY_REF, integer_type_node,
TYPE_OTABLE_DECL (output_class), otable_index,
@@ -1688,7 +1687,7 @@ expand_java_add_case (tree switch_expr, int match, int target_pc)
{
tree value, x;
- value = build_int_cst (TREE_TYPE (switch_expr), match, match < 0 ? -1 : 0);
+ value = build_int_cst (TREE_TYPE (switch_expr), match);
x = build3 (CASE_LABEL_EXPR, void_type_node, value, NULL_TREE,
create_artificial_label ());
@@ -1703,8 +1702,7 @@ static void
expand_java_call (int target_pc, int return_address)
{
tree target_label = lookup_label (target_pc);
- tree value = build_int_cst (NULL_TREE,
- return_address, return_address < 0 ? -1 : 0);
+ tree value = build_int_cst (NULL_TREE, return_address);
push_value (value);
flush_quick_stack ();
expand_goto (target_label);
@@ -1836,7 +1834,7 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
{
tree table_index
= build_int_cst (NULL_TREE, get_symbol_table_index
- (method, &TYPE_ATABLE_METHODS (output_class)), 0);
+ (method, &TYPE_ATABLE_METHODS (output_class)));
func = build4 (ARRAY_REF, method_ptr_type_node,
TYPE_ATABLE_DECL (output_class), table_index,
NULL_TREE, NULL_TREE);
@@ -1880,7 +1878,7 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
}
method_index *= int_size_in_bytes (method_type_node);
ref = fold (build2 (PLUS_EXPR, method_ptr_type_node,
- ref, build_int_cst (NULL_TREE, method_index, 0)));
+ ref, build_int_cst (NULL_TREE, method_index)));
ref = build1 (INDIRECT_REF, method_type_node, ref);
func = build3 (COMPONENT_REF, nativecode_ptr_type_node,
ref, lookup_field (&method_type_node, ncode_ident),
@@ -1961,7 +1959,7 @@ build_invokevirtual (tree dtable, tree method)
{
otable_index
= build_int_cst (NULL_TREE, get_symbol_table_index
- (method, &TYPE_OTABLE_METHODS (output_class)), 0);
+ (method, &TYPE_OTABLE_METHODS (output_class)));
method_index = build4 (ARRAY_REF, integer_type_node,
TYPE_OTABLE_DECL (output_class),
otable_index, NULL_TREE, NULL_TREE);
@@ -2021,14 +2019,14 @@ build_invokeinterface (tree dtable, tree method)
{
otable_index
= build_int_cst (NULL_TREE, get_symbol_table_index
- (method, &TYPE_OTABLE_METHODS (output_class)), 0);
+ (method, &TYPE_OTABLE_METHODS (output_class)));
idx = build4 (ARRAY_REF, integer_type_node,
TYPE_OTABLE_DECL (output_class), otable_index,
NULL_TREE, NULL_TREE);
}
else
idx = build_int_cst (NULL_TREE,
- get_interface_method_index (method, interface), 0);
+ get_interface_method_index (method, interface));
lookup_arg = tree_cons (NULL_TREE, dtable,
tree_cons (NULL_TREE, build_class_ref (interface),
@@ -2282,7 +2280,7 @@ build_jni_stub (tree method)
/* We call _Jv_LookupJNIMethod to find the actual underlying
function pointer. _Jv_LookupJNIMethod will throw the appropriate
exception if this function is not found at runtime. */
- tem = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, args_size, 0));
+ tem = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, args_size));
method_sig = build_java_signature (TREE_TYPE (method));
lookup_arg = tree_cons (NULL_TREE,
build_utf8_ref (unmangle_classname