Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotForeignCallLinkage.java @ 22110:e11e05cc0f2e
fixed redundant JavaFrameAnchor code around foreign calls that go through a Graal stub
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Jun 2015 20:35:08 +0200 |
parents | 0e095e2c24e2 |
children | e02fa353e88c |
comparison
equal
deleted
inserted
replaced
22109:ffa0ab14d70b | 22110:e11e05cc0f2e |
---|---|
42 DESTROYS_REGISTERS, | 42 DESTROYS_REGISTERS, |
43 PRESERVES_REGISTERS | 43 PRESERVES_REGISTERS |
44 } | 44 } |
45 | 45 |
46 /** | 46 /** |
47 * Constants for specifying whether a call is a leaf or not. A leaf function does not lock, GC | 47 * Constants for specifying whether a call is a leaf or not and whether a |
48 * or throw exceptions. That is, the thread's execution state during the call is never inspected | 48 * {@code JavaFrameAnchor} prologue and epilogue is required around the call. A leaf function |
49 * by another thread. | 49 * does not lock, GC or throw exceptions. |
50 */ | 50 */ |
51 public enum Transition { | 51 public enum Transition { |
52 /** | |
53 * A call to a leaf function that is guaranteed to not use floating point registers and will | |
54 * never have its caller stack inspected by the VM. That is, {@code JavaFrameAnchor} | |
55 * management around the call can be omitted. | |
56 */ | |
52 LEAF_NOFP, | 57 LEAF_NOFP, |
58 | |
59 /** | |
60 * A call to a leaf function that might use floating point registers but will never have its | |
61 * caller stack inspected. That is, {@code JavaFrameAnchor} management around the call can | |
62 * be omitted. | |
63 */ | |
53 LEAF, | 64 LEAF, |
54 LEAF_SP, | 65 |
66 /** | |
67 * A call to a leaf function that might use floating point registers and may have its caller | |
68 * stack inspected. That is, {@code JavaFrameAnchor} management code around the call is | |
69 * required. | |
70 */ | |
71 STACK_INSPECTABLE_LEAF, | |
72 | |
73 /** | |
74 * A function that may lock, GC or raise an exception and thus requires debug info to be | |
75 * associated with a call site to the function. The execution stack may be inspected while | |
76 * in the called function. That is, {@code JavaFrameAnchor} management code around the call | |
77 * is required. | |
78 */ | |
55 NOT_LEAF; | 79 NOT_LEAF; |
56 } | 80 } |
57 | 81 |
58 /** | 82 /** |
59 * Sentinel marker for a computed jump address. | 83 * Sentinel marker for a computed jump address. |
62 | 86 |
63 boolean isReexecutable(); | 87 boolean isReexecutable(); |
64 | 88 |
65 LocationIdentity[] getKilledLocations(); | 89 LocationIdentity[] getKilledLocations(); |
66 | 90 |
67 CallingConvention getOutgoingCallingConvention(); | |
68 | |
69 CallingConvention getIncomingCallingConvention(); | |
70 | |
71 Value[] getTemporaries(); | |
72 | |
73 long getMaxCallTargetOffset(); | |
74 | |
75 ForeignCallDescriptor getDescriptor(); | |
76 | |
77 void setCompiledStub(Stub stub); | 91 void setCompiledStub(Stub stub); |
78 | 92 |
79 /** | 93 /** |
80 * Determines if this is a call to a compiled {@linkplain Stub stub}. | 94 * Determines if this is a call to a compiled {@linkplain Stub stub}. |
81 */ | 95 */ |
83 | 97 |
84 void finalizeAddress(Backend backend); | 98 void finalizeAddress(Backend backend); |
85 | 99 |
86 long getAddress(); | 100 long getAddress(); |
87 | 101 |
88 @Override | 102 /** |
89 boolean destroysRegisters(); | 103 * Determines if the runtime function or stub might use floating point registers. If the answer |
90 | 104 * is no, then no FPU state management prologue or epilogue needs to be emitted around the call. |
91 @Override | 105 */ |
92 boolean canDeoptimize(); | |
93 | |
94 boolean mayContainFP(); | 106 boolean mayContainFP(); |
95 | 107 |
108 /** | |
109 * Determines if a {@code JavaFrameAnchor} needs to be set up and torn down around this call. | |
110 */ | |
96 boolean needsJavaFrameAnchor(); | 111 boolean needsJavaFrameAnchor(); |
97 | 112 |
98 /** | 113 /** |
99 * Gets the VM symbol associated with the target {@linkplain #getAddress() address} of the call. | 114 * Gets the VM symbol associated with the target {@linkplain #getAddress() address} of the call. |
100 */ | 115 */ |