Mercurial > hg > truffle
changeset 12621:7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 28 Oct 2013 17:03:59 +0100 |
parents | a9f750305a38 |
children | f40b8d0d9dcb 748b8381b171 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java Mon Oct 28 16:04:58 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java Mon Oct 28 17:03:59 2013 +0100 @@ -127,6 +127,12 @@ /** * Updates a given stub with respect to the registers it destroys. + * <p> + * Any entry in {@code calleeSaveInfo} that {@linkplain SaveRegistersOp#supportsRemove() + * supports} pruning will have {@code destroyedRegisters} + * {@linkplain SaveRegistersOp#remove(Set) removed} as these registers are declared as + * temporaries in the stub's {@linkplain ForeignCallLinkage linkage} (and thus will be saved by + * the stub's caller). * * @param stub the stub to update * @param destroyedRegisters the registers destroyed by the stub @@ -141,10 +147,6 @@ for (Map.Entry<LIRFrameState, SaveRegistersOp> e : calleeSaveInfo.entrySet()) { SaveRegistersOp save = e.getValue(); if (save.supportsRemove()) { - // Since the registers destroyed by the stub are declared as temporaries in the - // linkage (see ForeignCallLinkage.getTemporaries()) for the stub, the caller - // will already save these registers and so there's no need for the stub to - // save them again. save.remove(destroyedRegisters); } DebugInfo info = e.getKey() == null ? null : e.getKey().debugInfo();