diff options
Diffstat (limited to 'gcc/java/java-gimplify.c')
-rw-r--r-- | gcc/java/java-gimplify.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c index 53582411353..790cb13c039 100644 --- a/gcc/java/java-gimplify.c +++ b/gcc/java/java-gimplify.c @@ -28,12 +28,13 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "tree.h" #include "java-tree.h" #include "tree-dump.h" -#include "tree-gimple.h" +#include "gimple.h" #include "toplev.h" static tree java_gimplify_block (tree); static enum gimplify_status java_gimplify_modify_expr (tree *); -static enum gimplify_status java_gimplify_self_mod_expr (tree*, tree*, tree *); +static enum gimplify_status java_gimplify_self_mod_expr (tree *, gimple_seq *, + gimple_seq *); static void dump_java_tree (enum tree_dump_index, tree); @@ -53,8 +54,7 @@ java_genericize (tree fndecl) /* Gimplify a Java tree. */ int -java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) { enum tree_code code = TREE_CODE (*expr_p); @@ -68,9 +68,6 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, *expr_p = java_replace_reference (*expr_p, /* want_lvalue */ false); return GS_UNHANDLED; - /* We don't handle GIMPLE_MODIFY_STMT, as MODIFY_EXPRs with java - semantics should only be generated by the front-end, and never - by anything after gimplification. */ case MODIFY_EXPR: return java_gimplify_modify_expr (expr_p); @@ -142,7 +139,7 @@ java_gimplify_modify_expr (tree *modify_expr_p) { tree new_lhs = java_replace_reference (lhs, /* want_lvalue */ true); tree new_rhs = build1 (NOP_EXPR, TREE_TYPE (new_lhs), rhs); - modify_expr = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (new_lhs), + modify_expr = build2 (MODIFY_EXPR, TREE_TYPE (new_lhs), new_lhs, new_rhs); modify_expr = build1 (NOP_EXPR, lhs_type, modify_expr); } @@ -160,8 +157,8 @@ java_gimplify_modify_expr (tree *modify_expr_p) between the reading and the writing. */ static enum gimplify_status -java_gimplify_self_mod_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_self_mod_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED, + gimple_seq *post_p ATTRIBUTE_UNUSED) { tree lhs = TREE_OPERAND (*expr_p, 0); @@ -180,7 +177,7 @@ java_gimplify_block (tree java_block) { tree decls = BLOCK_VARS (java_block); tree body = BLOCK_EXPR_BODY (java_block); - tree outer = gimple_current_bind_expr (); + gimple outer = gimple_current_bind_expr (); tree block; /* Don't bother with empty blocks. */ @@ -199,10 +196,10 @@ java_gimplify_block (tree java_block) routines generate info for the variables in that block. */ TREE_USED (block) = 1; - if (outer != NULL_TREE) + if (outer != NULL) { - outer = BIND_EXPR_BLOCK (outer); - BLOCK_SUBBLOCKS (outer) = chainon (BLOCK_SUBBLOCKS (outer), block); + tree b = gimple_bind_block (outer); + BLOCK_SUBBLOCKS (b) = chainon (BLOCK_SUBBLOCKS (b), block); } BLOCK_EXPR_BODY (java_block) = NULL_TREE; |