--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java 2018-12-11 11:13:31.000000000 -0800 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java 2018-12-11 11:13:31.000000000 -0800 @@ -109,34 +109,42 @@ } public Providers copyWith(MetaAccessProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(substitution, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, stampProvider); } public Providers copyWith(CodeCacheProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, substitution, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, stampProvider); } public Providers copyWith(ConstantReflectionProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, codeCache, substitution, constantFieldProvider, foreignCalls, lowerer, replacements, stampProvider); } public Providers copyWith(ConstantFieldProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, codeCache, constantReflection, substitution, foreignCalls, lowerer, replacements, stampProvider); } public Providers copyWith(ForeignCallsProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, substitution, lowerer, replacements, stampProvider); } public Providers copyWith(LoweringProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, substitution, replacements, stampProvider); } public Providers copyWith(Replacements substitution) { + assert this.getClass() == Providers.class : "must override in " + getClass(); return new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, substitution, stampProvider); } public Providers copyWith(StampProvider substitution) { + assert this.getClass() == Providers.class : "must override"; return new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, substitution); } }