[PATCH] Fix PR java/15576, class initialization optimization disable
Andrew Pinski
pinskia@physics.uc.edu
Fri Nov 5 15:52:00 GMT 2004
This patch cleans up a little the class initialization and fixes
it so that it works with the tree-ssa/gimplifier. What needed
to be done was to add a DECL_EXPR for the decl so that the
initializer was expanded and also we needed to ignore DECL_EXPR
in check_init as nobody else in the java front-end uses it and
the variable was only a scaler type with a constant initializer.
I also think this optimization can now be turned on for class file
to native compiling as we now do it function at a time compiling for
them (I think we don't do unit-at-a-time yet though) but that is for
another patch.
Built on powerpc-darwin. I am in the middle of testing it. OK if
everthing passes?
Thanks,
Andrew Pinski
ChangeLog:
* check-init.c (check_init): Ignore DECL_EXPR.
* expr.c (always_initialize_class_p): Reenable.
(build_class_init): Use a variable to store the decl. Also use
boolean_false_node instead of integer_zero_node.
* parse.y (attach_init_test_initialization_flags): Add a decl_expr
to the block.
Patch:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp1.diff.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041105/7991c635/attachment.txt>
-------------- next part --------------
More information about the Java-patches
mailing list