Mercurial > hg > graal-jvmci-8
changeset 19904:15ef790fec92
NewObjectSnippets: work around problems with late binding of snippet parameters in GraphBuilderPlugins.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 17 Mar 2015 13:07:12 +0100 |
parents | d15769a7e444 |
children | 658efd741fa6 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Tue Mar 17 17:16:04 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Tue Mar 17 13:07:12 2015 +0100 @@ -157,7 +157,8 @@ public static native Object newInstance(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub); @Snippet - public static Object allocateInstanceDynamic(Class<?> type, @ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @ConstantParameter String typeContext) { + public static Object allocateInstanceDynamic(Class<?> type, @ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, + @SuppressWarnings("unused") @ConstantParameter String typeContext) { KlassPointer hub = ClassGetHubNode.readClass(type); if (probability(FAST_PATH_PROBABILITY, !hub.isNull())) { if (probability(FAST_PATH_PROBABILITY, isInstanceKlassFullyInitialized(hub))) { @@ -170,7 +171,11 @@ */ if (probability(FAST_PATH_PROBABILITY, (layoutHelper & 1) == 0)) { Word prototypeMarkWord = hub.readWord(prototypeMarkWordOffset(), PROTOTYPE_MARK_WORD_LOCATION); - return allocateInstance(layoutHelper, hub, prototypeMarkWord, fillContents, threadRegister, false, typeContext); + /* + * FIXME(je,ds): we should actually pass typeContext instead of "" but late + * binding of parameters is not yet supported by the GraphBuilderPlugin system. + */ + return allocateInstance(layoutHelper, hub, prototypeMarkWord, fillContents, threadRegister, false, ""); } } }