# HG changeset patch # User Doug Simon # Date 1417006993 -3600 # Node ID 8a2e6bc4384cda3f83e818017293f7ec3310c3cf # Parent cdb9c605051ad1f38cd458f41a35a1dad0246e96 removed unused ResolvedJavaMethod.newInstance(...) diff -r cdb9c605051a -r 8a2e6bc4384c graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ResolvedJavaMethod.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ResolvedJavaMethod.java Wed Nov 26 13:57:50 2014 +0100 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ResolvedJavaMethod.java Wed Nov 26 14:03:13 2014 +0100 @@ -207,16 +207,6 @@ JavaConstant invoke(JavaConstant receiver, JavaConstant[] arguments); /** - * Uses the constructor represented by this object to create and initialize a new instance of - * the constructor's declaring class, with the specified initialization parameters. This method - * is similar to a reflective instantiation by {@link Constructor#newInstance}. - * - * @param arguments The arguments for the constructor. - * @return The newly created and initialized object. - */ - JavaConstant newInstance(JavaConstant[] arguments); - - /** * Gets the encoding of (that is, a constant representing the value of) this method. * * @return a constant representing a reference to this method diff -r cdb9c605051a -r 8a2e6bc4384c graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethodImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethodImpl.java Wed Nov 26 13:57:50 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethodImpl.java Wed Nov 26 14:03:13 2014 +0100 @@ -723,27 +723,6 @@ } } - @Override - public JavaConstant newInstance(JavaConstant[] arguments) { - assert isConstructor(); - Constructor javaConstructor = toJavaConstructor(); - javaConstructor.setAccessible(true); - - Object[] objArguments = new Object[arguments.length]; - for (int i = 0; i < arguments.length; i++) { - objArguments[i] = HotSpotObjectConstantImpl.asBoxedValue(arguments[i]); - } - - try { - Object objResult = javaConstructor.newInstance(objArguments); - assert objResult != null; - return HotSpotObjectConstantImpl.forObject(objResult); - - } catch (IllegalAccessException | InvocationTargetException | InstantiationException ex) { - throw new IllegalArgumentException(ex); - } - } - /** * Allocates a compile id for this method by asking the VM for one. *