changeset 18455:ceacdac8b8b9

DelayedFrameMapBuilder: outsource SimpleVirtualStackSlot and VirtualStackSlotRange.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 17 Nov 2014 19:36:52 +0100
parents 5af19da6fae5
children c7fd88183eef
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/DelayedFrameMapBuilder.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingToolImpl.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/SimpleVirtualStackSlot.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/VirtualStackSlotRange.java
diffstat 4 files changed, 93 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/DelayedFrameMapBuilder.java	Mon Nov 17 19:34:08 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/DelayedFrameMapBuilder.java	Mon Nov 17 19:36:52 2014 +0100
@@ -62,38 +62,6 @@
         return slot;
     }
 
-    static class SimpleVirtualStackSlot extends VirtualStackSlot {
-
-        private static final long serialVersionUID = 7654295701165421750L;
-
-        public SimpleVirtualStackSlot(LIRKind lirKind) {
-            super(lirKind);
-        }
-
-    }
-
-    static class VirtualStackSlotRange extends VirtualStackSlot {
-
-        private static final long serialVersionUID = 5152592950118317121L;
-        private final BitSet objects;
-        private final int slots;
-
-        public VirtualStackSlotRange(int slots, BitSet objects) {
-            super(LIRKind.reference(Kind.Object));
-            this.slots = slots;
-            this.objects = (BitSet) objects.clone();
-        }
-
-        public int getSlots() {
-            return slots;
-        }
-
-        public BitSet getObjects() {
-            return (BitSet) objects.clone();
-        }
-
-    }
-
     public VirtualStackSlot allocateStackSlots(int slots, BitSet objects, List<VirtualStackSlot> outObjectStackSlots) {
         if (slots == 0) {
             return null;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingToolImpl.java	Mon Nov 17 19:34:08 2014 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingToolImpl.java	Mon Nov 17 19:36:52 2014 +0100
@@ -26,8 +26,6 @@
 
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.compiler.common.*;
-import com.oracle.graal.lir.framemap.DelayedFrameMapBuilder.SimpleVirtualStackSlot;
-import com.oracle.graal.lir.framemap.DelayedFrameMapBuilder.VirtualStackSlotRange;
 
 public class FrameMappingToolImpl implements FrameMappingTool {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/SimpleVirtualStackSlot.java	Mon Nov 17 19:36:52 2014 +0100
@@ -0,0 +1,39 @@
+/*
+ * 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.*;
+import com.oracle.graal.api.meta.*;
+
+/**
+ * Represents a {@link VirtualStackSlot virtual stack slot} for a specific {@link LIRKind kind}.
+ */
+class SimpleVirtualStackSlot extends VirtualStackSlot {
+
+    private static final long serialVersionUID = 7654295701165421750L;
+
+    public SimpleVirtualStackSlot(LIRKind lirKind) {
+        super(lirKind);
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/VirtualStackSlotRange.java	Mon Nov 17 19:36:52 2014 +0100
@@ -0,0 +1,54 @@
+/*
+ * 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 java.util.*;
+
+import com.oracle.graal.api.code.*;
+import com.oracle.graal.api.meta.*;
+
+/**
+ * Represents a {@link #getSlots() numbered} range of {@link VirtualStackSlot virtual stack slot} of
+ * size {@link TargetDescription#wordSize}.
+ */
+class VirtualStackSlotRange extends VirtualStackSlot {
+
+    private static final long serialVersionUID = 5152592950118317121L;
+    private final BitSet objects;
+    private final int slots;
+
+    public VirtualStackSlotRange(int slots, BitSet objects) {
+        super(LIRKind.reference(Kind.Object));
+        this.slots = slots;
+        this.objects = (BitSet) objects.clone();
+    }
+
+    public int getSlots() {
+        return slots;
+    }
+
+    public BitSet getObjects() {
+        return (BitSet) objects.clone();
+    }
+
+}
\ No newline at end of file