# HG changeset patch # User Josef Eisl # Date 1398240502 -7200 # Node ID 04234c228e4c9791781276f8c9dc17a80f6f2ecc # Parent 0349e609ca5ee5daa3eaf5984148372ed9ed38e9 Rename LIRTypeTool to PlatformKindTool. diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/spi/LIRTypeTool.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/spi/LIRTypeTool.java Wed Apr 23 10:00:29 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, 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.compiler.common.spi; - -import com.oracle.graal.api.meta.*; - -/** - * This interface can be used to access platform and VM specific kinds. - */ -public interface LIRTypeTool { - - PlatformKind getIntegerKind(int bits); - - PlatformKind getFloatingKind(int bits); - - PlatformKind getObjectKind(); -} diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/spi/PlatformKindTool.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/spi/PlatformKindTool.java Wed Apr 23 10:08:22 2014 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014, 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.compiler.common.spi; + +import com.oracle.graal.api.meta.*; + +/** + * This interface can be used to access platform and VM specific kinds. + */ +public interface PlatformKindTool { + + PlatformKind getIntegerKind(int bits); + + PlatformKind getFloatingKind(int bits); + + PlatformKind getObjectKind(); +} diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/FloatStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/FloatStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/FloatStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -68,7 +68,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { return tool.getFloatingKind(getBits()); } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IllegalStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IllegalStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IllegalStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -40,7 +40,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { throw GraalInternalError.shouldNotReachHere("illegal stamp should not reach backend"); } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -79,7 +79,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { return tool.getIntegerKind(getBits()); } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ObjectStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ObjectStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ObjectStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -63,7 +63,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { return tool.getObjectKind(); } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -54,7 +54,7 @@ * Gets a platform dependent {@link PlatformKind} that can be used to store a value of this * stamp. */ - public abstract PlatformKind getPlatformKind(LIRTypeTool tool); + public abstract PlatformKind getPlatformKind(PlatformKindTool tool); /** * Returns the union of this stamp and the given stamp. Typically used to create stamps for diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/VoidStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/VoidStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/VoidStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -45,7 +45,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { throw GraalInternalError.shouldNotReachHere("void stamp has no value"); } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/type/NarrowOopStamp.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/type/NarrowOopStamp.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/type/NarrowOopStamp.java Wed Apr 23 10:08:22 2014 +0200 @@ -76,7 +76,7 @@ } @Override - public PlatformKind getPlatformKind(LIRTypeTool tool) { + public PlatformKind getPlatformKind(PlatformKindTool tool) { return NarrowOop; } diff -r 0349e609ca5e -r 04234c228e4c graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Apr 23 10:00:29 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java Wed Apr 23 10:08:22 2014 +0200 @@ -48,7 +48,7 @@ /** * This class traverses the HIR instructions and generates LIR instructions from them. */ -public abstract class LIRGenerator implements ArithmeticLIRGenerator, LIRGeneratorTool, LIRTypeTool { +public abstract class LIRGenerator implements ArithmeticLIRGenerator, LIRGeneratorTool, PlatformKindTool { public static class Options { // @formatter:off