changeset 18446:163d1a082ccc

FrameMapBuilder: outsource FrameMappingTool.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 17 Nov 2014 17:39:16 +0100
parents 509dc57b0802
children f933c2d7521b
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMapBuilder.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappable.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingTool.java
diffstat 5 files changed, 33 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Mon Nov 17 16:53:26 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Mon Nov 17 17:39:16 2014 +0100
@@ -46,7 +46,6 @@
 import com.oracle.graal.lir.LIRInstruction.OperandMode;
 import com.oracle.graal.lir.StandardOp.MoveOp;
 import com.oracle.graal.lir.framemap.*;
-import com.oracle.graal.lir.framemap.FrameMapBuilder.*;
 import com.oracle.graal.lir.gen.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.options.*;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java	Mon Nov 17 16:53:26 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java	Mon Nov 17 17:39:16 2014 +0100
@@ -34,7 +34,6 @@
 import com.oracle.graal.lir.StandardOp.BlockEndOp;
 import com.oracle.graal.lir.StandardOp.LabelOp;
 import com.oracle.graal.lir.framemap.*;
-import com.oracle.graal.lir.framemap.FrameMapBuilder.*;
 
 /**
  * This class implements the overall container for the LIR graph and directs its construction,
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMapBuilder.java	Mon Nov 17 16:53:26 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMapBuilder.java	Mon Nov 17 17:39:16 2014 +0100
@@ -35,14 +35,6 @@
 public interface FrameMapBuilder {
 
     /**
-     * A tool to get the real stack slot from a virtual stack slot.
-     */
-    @FunctionalInterface
-    interface FrameMappingTool {
-        StackSlot getStackSlot(VirtualStackSlot slot);
-    }
-
-    /**
      * Reserves a spill slot in the frame of the method being compiled. The returned slot is aligned
      * on its natural alignment, i.e., an 8-byte spill slot is aligned at an 8-byte boundary, unless
      * overridden by a subclass.
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappable.java	Mon Nov 17 16:53:26 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappable.java	Mon Nov 17 17:39:16 2014 +0100
@@ -22,8 +22,6 @@
  */
 package com.oracle.graal.lir.framemap;
 
-import com.oracle.graal.lir.framemap.FrameMapBuilder.*;
-
 /**
  * This interface should be implemented by all classes that store virtual stack slots to convert
  * them into real stack slots when {@link FrameMapBuilder#buildFrameMap} is called. Implementors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingTool.java	Mon Nov 17 17:39:16 2014 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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.lir.framemap;
+
+import com.oracle.graal.api.code.*;
+
+/**
+ * A tool to get the real stack slot from a virtual stack slot.
+ */
+@FunctionalInterface
+public interface FrameMappingTool {
+    StackSlot getStackSlot(VirtualStackSlot slot);
+}
\ No newline at end of file