# HG changeset patch # User Josef Eisl # Date 1416249412 -3600 # Node ID ceacdac8b8b97568b67cede2144c9b29d851303e # Parent 5af19da6fae5fab91ee84b2ff58aa846acb5b0ce DelayedFrameMapBuilder: outsource SimpleVirtualStackSlot and VirtualStackSlotRange. diff -r 5af19da6fae5 -r ceacdac8b8b9 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/DelayedFrameMapBuilder.java --- 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 outObjectStackSlots) { if (slots == 0) { return null; diff -r 5af19da6fae5 -r ceacdac8b8b9 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMappingToolImpl.java --- 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 { diff -r 5af19da6fae5 -r ceacdac8b8b9 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/SimpleVirtualStackSlot.java --- /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 diff -r 5af19da6fae5 -r ceacdac8b8b9 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/VirtualStackSlotRange.java --- /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