mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 05:46:42 +08:00
re GNATS gcj/122 (SP mismatch error from certain code constructs)
Thu Jan 6 00:54:10 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_byecode_conditional): Fixed indentation in method invocation and typo in conditional expression. (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue the appropriate NOTE_POP. * parse.y (patch_binop): Shift value mask to feature the right type. (This is a fix for the PR #122: http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00000.html) From-SVN: r31277
This commit is contained in:
parent
bd3a924b10
commit
6b924cc558
@ -1,3 +1,12 @@
|
||||
Thu Jan 6 00:54:10 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* jcf-write.c (generate_byecode_conditional): Fixed indentation in
|
||||
method invocation and typo in conditional expression.
|
||||
(generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
|
||||
the appropriate NOTE_POP.
|
||||
* parse.y (patch_binop): Shift value mask to feature the right
|
||||
type.
|
||||
|
||||
1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* class.c (assume_compiled, assume_compiled_node): Add static
|
||||
@ -48,12 +57,6 @@
|
||||
patch_throw_statement, check_thrown_exceptions,
|
||||
patch_conditional_expr): Likewise.
|
||||
|
||||
1999-12-17 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
|
||||
fixes PR gcj/119.
|
||||
(process_file): Use `\n\' at end of each line in string.
|
||||
|
||||
Fri Dec 24 00:25:29 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* Makefile.in (LIBDEPS): Added gcc's errors.o
|
||||
@ -87,6 +90,12 @@ Fri Dec 24 00:25:29 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
and lookup class candidate.
|
||||
(java_pre_expand_clinit): Removed unnecessary local variable.
|
||||
|
||||
1999-12-17 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
|
||||
fixes PR gcj/119.
|
||||
(process_file): Use `\n\' at end of each line in string.
|
||||
|
||||
Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* expr.c (expand_invoke): Layout the loaded class before
|
||||
|
@ -1160,7 +1160,8 @@ generate_bytecode_conditional (exp, true_label, false_label,
|
||||
}
|
||||
break;
|
||||
case TRUTH_NOT_EXPR:
|
||||
generate_bytecode_conditional (TREE_OPERAND (exp, 0), false_label, true_label,
|
||||
generate_bytecode_conditional (TREE_OPERAND (exp, 0),
|
||||
false_label, true_label,
|
||||
! true_branch_first, state);
|
||||
break;
|
||||
case TRUTH_ANDIF_EXPR:
|
||||
@ -1238,7 +1239,7 @@ generate_bytecode_conditional (exp, true_label, false_label,
|
||||
}
|
||||
if (integer_zerop (exp1) || integer_zerop (exp0))
|
||||
{
|
||||
generate_bytecode_insns (integer_zerop (exp1) ? exp0 : exp0,
|
||||
generate_bytecode_insns (integer_zerop (exp1) ? exp0 : exp1,
|
||||
STACK_TARGET, state);
|
||||
op = op + (OPCODE_ifnull - OPCODE_if_acmpeq);
|
||||
negop = (op & 1) ? op - 1 : op + 1;
|
||||
@ -1622,6 +1623,10 @@ generate_bytecode_insns (exp, target, state)
|
||||
define_jcf_label (else_label, state);
|
||||
generate_bytecode_insns (TREE_OPERAND (exp, 2), target, state);
|
||||
define_jcf_label (end_label, state);
|
||||
|
||||
/* COND_EXPR can be used in a binop. The stack must be adjusted. */
|
||||
if (TREE_TYPE (exp) != void_type_node)
|
||||
NOTE_POP (TYPE_PRECISION (TREE_TYPE (exp)) > 32 ? 2 : 1);
|
||||
}
|
||||
break;
|
||||
case CASE_EXPR:
|
||||
|
@ -9850,13 +9850,11 @@ patch_binop (node, wfl_op1, wfl_op2)
|
||||
type of the left-hand operand */
|
||||
prom_type = TREE_TYPE (op1);
|
||||
|
||||
/* Shift int only up to 0x1f and long up to 0x3f */
|
||||
if (prom_type == int_type_node)
|
||||
op2 = fold (build (BIT_AND_EXPR, int_type_node, op2,
|
||||
build_int_2 (0x1f, 0)));
|
||||
else
|
||||
op2 = fold (build (BIT_AND_EXPR, int_type_node, op2,
|
||||
build_int_2 (0x3f, 0)));
|
||||
/* Shift int only up to 0x1f and long up to 0x3f. The bytecode
|
||||
generator should take care of removing this operation. FIXME */
|
||||
op2 = fold (build (BIT_AND_EXPR, prom_type, convert (prom_type, op2),
|
||||
(prom_type == int_type_node ? build_int_2 (0x1f, 0) :
|
||||
convert (prom_type, build_int_2 (0x3f, 0)))));
|
||||
|
||||
/* The >>> operator is a >> operating on unsigned quantities */
|
||||
if (code == URSHIFT_EXPR && ! flag_emit_class_files)
|
||||
|
Loading…
Reference in New Issue
Block a user