PATCH: Turn off inlining for Java synchronized methods
Andrew Haley
aph@redhat.com
Thu Apr 10 13:26:00 GMT 2003
I'm checking this in to the branch and the trunk.
Andrew.
2003-04-10 Andrew Haley <aph@redhat.com>
* tree-inline.c (inlinable_function_p): Disable inlining for
synchronized methods.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.38.2.5
diff -c -2 -p -r1.38.2.5 tree-inline.c
*** tree-inline.c 14 Mar 2003 14:53:52 -0000 1.38.2.5
--- tree-inline.c 10 Apr 2003 13:24:37 -0000
*************** inlinable_function_p (fn, id)
*** 945,948 ****
--- 945,954 ----
inlinable = 0;
+ #ifdef INLINER_FOR_JAVA
+ /* Synchronized methods can't be inlined. This is a bug. */
+ if (METHOD_SYNCHRONIZED (fn))
+ return 0;
+ #endif /* INLINER_FOR_JAVA */
+
/* We may be here either because fn is declared inline or because
we use -finline-functions. For the second case, we are more
More information about the Gcc-patches
mailing list