# HG changeset patch # User Lukas Stadler # Date 1403792856 -7200 # Node ID 6f02ff62c3effeaff938f0530b0b2ca9f8f410ec # Parent e6919996abe980c0a7a60bf81fae9e38b1798000 new constructor (with stateAfter) for UnsafeStoreNode diff -r e6919996abe9 -r 6f02ff62c3ef graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Thu Jun 26 16:27:36 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Thu Jun 26 16:27:36 2014 +0200 @@ -41,9 +41,14 @@ @Input(InputType.State) private FrameState stateAfter; public UnsafeStoreNode(ValueNode object, ValueNode offset, ValueNode value, Kind accessKind, LocationIdentity locationIdentity) { + this(object, offset, value, accessKind, locationIdentity, null); + } + + public UnsafeStoreNode(ValueNode object, ValueNode offset, ValueNode value, Kind accessKind, LocationIdentity locationIdentity, FrameState stateAfter) { super(StampFactory.forVoid(), object, offset, accessKind, locationIdentity); + this.value = value; + this.stateAfter = stateAfter; assert accessKind != Kind.Void && accessKind != Kind.Illegal; - this.value = value; } public FrameState stateAfter() { diff -r e6919996abe9 -r 6f02ff62c3ef graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java Thu Jun 26 16:27:36 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java Thu Jun 26 16:27:36 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -61,10 +61,7 @@ locationIdentity = ObjectLocationIdentity.create(locationArgument.asConstant()); } - UnsafeStoreNode unsafeStoreNode = graph().add( - new UnsafeStoreNode(objectArgument, offsetArgument, valueArgument, this.getTargetMethod().getSignature().getParameterKind(VALUE_ARGUMENT_INDEX), locationIdentity)); - unsafeStoreNode.setStateAfter(this.stateAfter()); - return unsafeStoreNode; + return new UnsafeStoreNode(objectArgument, offsetArgument, valueArgument, this.getTargetMethod().getSignature().getParameterKind(VALUE_ARGUMENT_INDEX), locationIdentity, stateAfter()); } return this; }