# HG changeset patch # User Christos Kotselidis # Date 1365447516 -7200 # Node ID 0186eb348be20cc1db129a22eb7e9f187dad19a6 # Parent 876a449f17abee33b61986e3b91a03eb607b3a1c Remove FieldWriteBarrier diff -r 876a449f17ab -r 0186eb348be2 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Mon Apr 08 20:52:04 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Mon Apr 08 20:58:36 2013 +0200 @@ -698,8 +698,6 @@ monitorSnippets.lower((MonitorEnterNode) n, tool); } else if (n instanceof MonitorExitNode) { monitorSnippets.lower((MonitorExitNode) n, tool); - } else if (n instanceof FieldWriteBarrier) { - writeBarrierSnippets.lower((FieldWriteBarrier) n, tool); } else if (n instanceof ArrayWriteBarrier) { writeBarrierSnippets.lower((ArrayWriteBarrier) n, tool); } else if (n instanceof TLABAllocateNode) { diff -r 876a449f17ab -r 0186eb348be2 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java Mon Apr 08 20:52:04 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012, 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.hotspot.nodes; - -import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; -import com.oracle.graal.nodes.type.*; - -public final class FieldWriteBarrier extends FixedWithNextNode implements Lowerable { - - @Input private ValueNode object; - - public ValueNode getObject() { - return object; - } - - public FieldWriteBarrier(ValueNode object) { - super(StampFactory.forVoid()); - this.object = object; - } - - public void lower(LoweringTool generator) { - generator.getRuntime().lower(this, generator); - } -} diff -r 876a449f17ab -r 0186eb348be2 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Mon Apr 08 20:52:04 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Mon Apr 08 20:58:36 2013 +0200 @@ -40,21 +40,6 @@ public class WriteBarrierSnippets implements Snippets { @Snippet - public static void serialFieldWriteBarrier(@Parameter("object") Object obj) { - Object object = FixedValueAnchorNode.getObject(obj); - Pointer oop = Word.fromObject(object); - Word base = (Word) oop.unsignedShiftRight(cardTableShift()); - long startAddress = cardTableStart(); - int displacement = 0; - if (((int) startAddress) == startAddress) { - displacement = (int) startAddress; - } else { - base = base.add(Word.unsigned(cardTableStart())); - } - base.writeByte(displacement, (byte) 0); - } - - @Snippet public static void serialArrayWriteBarrier(@Parameter("object") Object obj, @Parameter("location") Object location, @ConstantParameter("usePrecise") boolean usePrecise) { Object object = FixedValueAnchorNode.getObject(obj); Pointer oop; @@ -76,12 +61,10 @@ public static class Templates extends AbstractTemplates { - private final ResolvedJavaMethod serialFieldWriteBarrier; private final ResolvedJavaMethod serialArrayWriteBarrier; public Templates(CodeCacheProvider runtime, Replacements replacements, TargetDescription target) { super(runtime, replacements, target, WriteBarrierSnippets.class); - serialFieldWriteBarrier = snippet("serialFieldWriteBarrier", Object.class); serialArrayWriteBarrier = snippet("serialArrayWriteBarrier", Object.class, Object.class, boolean.class); } @@ -95,15 +78,5 @@ SnippetTemplate template = cache.get(key); template.instantiate(runtime, arrayWriteBarrier, DEFAULT_REPLACER, arguments); } - - public void lower(FieldWriteBarrier fieldWriteBarrier, @SuppressWarnings("unused") LoweringTool tool) { - ResolvedJavaMethod method = serialFieldWriteBarrier; - Key key = new Key(method); - Arguments arguments = new Arguments(); - arguments.add("object", fieldWriteBarrier.getObject()); - SnippetTemplate template = cache.get(key); - template.instantiate(runtime, fieldWriteBarrier, DEFAULT_REPLACER, arguments); - } - } }