# HG changeset patch # User Doug Simon # Date 1381437973 -7200 # Node ID 4c70eafaa609294843571dcf20d2f52c050f4e9e # Parent 0fc653a9e01908666603bcc4a1330dfbe998bbee removed unnecessary delegating classes diff -r 0fc653a9e019 -r 4c70eafaa609 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DelegatingCodeCacheProvider.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DelegatingCodeCacheProvider.java Thu Oct 10 20:50:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.code; - -import com.oracle.graal.api.meta.*; - -/** - * A {@link CodeCacheProvider} that delegates to another {@link CodeCacheProvider}. - */ -public class DelegatingCodeCacheProvider implements CodeCacheProvider { - - private final CodeCacheProvider delegate; - - public DelegatingCodeCacheProvider(CodeCacheProvider delegate) { - this.delegate = delegate; - } - - protected CodeCacheProvider delegate() { - return delegate; - } - - public InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult) { - return delegate().addMethod(method, compResult); - } - - public String disassemble(CompilationResult compResult, InstalledCode installedCode) { - return delegate().disassemble(compResult, installedCode); - } - - public RegisterConfig lookupRegisterConfig() { - return delegate().lookupRegisterConfig(); - } - - public int getMinimumOutgoingSize() { - return delegate().getMinimumOutgoingSize(); - } - - public ForeignCallLinkage lookupForeignCall(ForeignCallDescriptor descriptor) { - return delegate().lookupForeignCall(descriptor); - } - - public boolean needsDataPatch(Constant constant) { - return delegate().needsDataPatch(constant); - } - - public TargetDescription getTarget() { - return delegate().getTarget(); - } -} diff -r 0fc653a9e019 -r 4c70eafaa609 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/DelegatingMetaAccessProvider.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/DelegatingMetaAccessProvider.java Thu Oct 10 20:50:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.meta; - -import java.lang.reflect.*; - -/** - * A {@link MetaAccessProvider} that delegates to another {@link MetaAccessProvider}. - */ -public class DelegatingMetaAccessProvider implements MetaAccessProvider { - - private final MetaAccessProvider delegate; - - public DelegatingMetaAccessProvider(MetaAccessProvider delegate) { - this.delegate = delegate; - } - - protected MetaAccessProvider delegate() { - return delegate; - } - - public ResolvedJavaType lookupJavaType(Class clazz) { - return delegate.lookupJavaType(clazz); - } - - public ResolvedJavaMethod lookupJavaMethod(Method reflectionMethod) { - return delegate.lookupJavaMethod(reflectionMethod); - } - - public ResolvedJavaMethod lookupJavaConstructor(Constructor reflectionConstructor) { - return delegate.lookupJavaConstructor(reflectionConstructor); - } - - public ResolvedJavaField lookupJavaField(Field reflectionField) { - return delegate.lookupJavaField(reflectionField); - } - - public ResolvedJavaType lookupJavaType(Constant constant) { - return delegate.lookupJavaType(constant); - } - - public Signature parseMethodDescriptor(String methodDescriptor) { - return delegate.parseMethodDescriptor(methodDescriptor); - } - - public boolean constantEquals(Constant x, Constant y) { - return delegate.constantEquals(x, y); - } - - public Integer lookupArrayLength(Constant array) { - return delegate.lookupArrayLength(array); - } - - public Constant readUnsafeConstant(Kind kind, Object base, long displacement, boolean compressible) { - return delegate.readUnsafeConstant(kind, base, displacement, compressible); - } - - public boolean isReexecutable(ForeignCallDescriptor descriptor) { - return delegate.isReexecutable(descriptor); - } - - public LocationIdentity[] getKilledLocations(ForeignCallDescriptor descriptor) { - return delegate.getKilledLocations(descriptor); - } - - public boolean canDeoptimize(ForeignCallDescriptor descriptor) { - return delegate.canDeoptimize(descriptor); - } - - public Constant encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason) { - return delegate().encodeDeoptActionAndReason(action, reason); - } -} diff -r 0fc653a9e019 -r 4c70eafaa609 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/DelegatingLoweringProvider.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/DelegatingLoweringProvider.java Thu Oct 10 20:50:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2011, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.nodes.spi; - -import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.extended.*; - -/** - * A {@link LoweringProvider} that delegates to another {@link LoweringProvider}. - */ -public class DelegatingLoweringProvider implements LoweringProvider { - - private final LoweringProvider delegate; - - public DelegatingLoweringProvider(LoweringProvider delegate) { - this.delegate = delegate; - } - - protected LoweringProvider delegate() { - return delegate; - } - - public void lower(Node n, LoweringTool tool) { - delegate().lower(n, tool); - } - - public ValueNode reconstructArrayIndex(LocationNode location) { - return delegate().reconstructArrayIndex(location); - } -}