Mercurial > hg > truffle
changeset 16256:6f02ff62c3ef
new constructor (with stateAfter) for UnsafeStoreNode
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 26 Jun 2014 16:27:36 +0200 |
parents | e6919996abe9 |
children | 7e87ec3d156a |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomizedUnsafeStoreMacroNode.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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() {
--- 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; }