Commit 48a840d9 by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

[multiple changes]

2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.

2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (java_expand_classes): Reverse the package list once.
	(java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
	reduction.
	(patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
	the `==' and `!=' operators.

From-SVN: r33240
parent 20c8a6c2
2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
2000-04-18 Tom Tromey <tromey@cygnus.com>
PR gcj/211:
......@@ -22,6 +26,14 @@
* gjavah.c (decompile_method): Use print_field_name.
Fixes PR gcj/205.
2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_expand_classes): Reverse the package list once.
(java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
reduction.
(patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
the `==' and `!=' operators.
2000-04-05 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/140:
......
......@@ -3539,9 +3539,9 @@ maybe_make_nested_class_name (name)
if (CPC_INNER_P ())
{
make_nested_class_name (GET_CPC_LIST ());
obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name));
obstack_grow0 (&temporary_obstack,
IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name));
id = get_identifier (obstack_finish (&temporary_obstack));
if (ctxp->package)
QUALIFIED_P (id) = 1;
......@@ -8239,6 +8239,12 @@ java_expand_classes ()
java_layout_classes ();
java_parse_abort_on_error ();
/* The list of packages declaration seen so far needs to be
reversed, so that package declared in a file being compiled gets
priority over packages declared as a side effect of parsing other
files.*/
package_list = nreverse (package_list);
saved_ctxp = ctxp_for_generation;
for (; ctxp_for_generation; ctxp_for_generation = ctxp_for_generation->next)
{
......@@ -10963,8 +10969,7 @@ java_complete_lhs (node)
nn = java_complete_tree (wfl_op1);
if (nn == error_mark_node)
return error_mark_node;
if ((cn = patch_string (nn)))
nn = cn;
TREE_OPERAND (node, 0) = nn;
}
if (TREE_CODE (node) != PLUS_EXPR || !JSTRING_P (wfl_op2))
......@@ -10972,8 +10977,7 @@ java_complete_lhs (node)
nn = java_complete_tree (wfl_op2);
if (nn == error_mark_node)
return error_mark_node;
if ((cn = patch_string (nn)))
nn = cn;
TREE_OPERAND (node, 1) = nn;
}
return force_evaluation_order (patch_binop (node, wfl_op1, wfl_op2));
......@@ -12089,7 +12093,7 @@ patch_binop (node, wfl_op1, wfl_op2)
tree op2 = TREE_OPERAND (node, 1);
tree op1_type = TREE_TYPE (op1);
tree op2_type = TREE_TYPE (op2);
tree prom_type = NULL_TREE;
tree prom_type = NULL_TREE, cn;
int code = TREE_CODE (node);
/* If 1, tell the routine that we have to return error_mark_node
......@@ -12367,6 +12371,18 @@ patch_binop (node, wfl_op1, wfl_op2)
/* 15.20 Equality Operator */
case EQ_EXPR:
case NE_EXPR:
/* It's time for us to patch the strings. */
if ((cn = patch_string (op1)))
{
op1 = cn;
op1_type = TREE_TYPE (op1);
}
if ((cn = patch_string (op2)))
{
op2 = cn;
op2_type = TREE_TYPE (op2);
}
/* 15.20.1 Numerical Equality Operators == and != */
/* Binary numeric promotion is performed on the operands */
if (JNUMERIC_TYPE_P (op1_type) && JNUMERIC_TYPE_P (op2_type))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment