< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CompressionNode.java

Print this page

        

*** 120,132 **** if (forValue.isConstant()) { if (GeneratePIC.getValue(tool.getOptions())) { // We always want uncompressed constants return this; } ! int stableDimension = ((ConstantNode) forValue).getStableDimension(); ! boolean isDefaultStable = ((ConstantNode) forValue).isDefaultStable(); ! return ConstantNode.forConstant(stamp(), convert(forValue.asConstant(), tool.getConstantReflection()), stableDimension, isDefaultStable, tool.getMetaAccess()); } else if (forValue instanceof CompressionNode) { CompressionNode other = (CompressionNode) forValue; if (op != other.op && encoding.equals(other.encoding)) { return other.getValue(); } --- 120,132 ---- if (forValue.isConstant()) { if (GeneratePIC.getValue(tool.getOptions())) { // We always want uncompressed constants return this; } ! ! ConstantNode constant = (ConstantNode) forValue; ! return ConstantNode.forConstant(stamp(), convert(constant.getValue(), tool.getConstantReflection()), constant.getStableDimension(), constant.isDefaultStable(), tool.getMetaAccess()); } else if (forValue instanceof CompressionNode) { CompressionNode other = (CompressionNode) forValue; if (op != other.op && encoding.equals(other.encoding)) { return other.getValue(); }
*** 134,159 **** return this; } @Override public void generate(NodeLIRBuilderTool gen) { - LIRGeneratorTool hsGen = gen.getLIRGeneratorTool(); boolean nonNull; ! if (getValue().stamp() instanceof AbstractObjectStamp) { ! nonNull = StampTool.isPointerNonNull(getValue().stamp()); } else { // metaspace pointers are never null nonNull = true; } Value result; switch (op) { case Compress: ! result = hsGen.emitCompress(gen.operand(getValue()), encoding, nonNull); break; case Uncompress: ! result = hsGen.emitUncompress(gen.operand(getValue()), encoding, nonNull); break; default: throw GraalError.shouldNotReachHere(); } --- 134,159 ---- return this; } @Override public void generate(NodeLIRBuilderTool gen) { boolean nonNull; ! if (value.stamp() instanceof AbstractObjectStamp) { ! nonNull = StampTool.isPointerNonNull(value.stamp()); } else { // metaspace pointers are never null nonNull = true; } + LIRGeneratorTool tool = gen.getLIRGeneratorTool(); Value result; switch (op) { case Compress: ! result = tool.emitCompress(gen.operand(value), encoding, nonNull); break; case Uncompress: ! result = tool.emitUncompress(gen.operand(value), encoding, nonNull); break; default: throw GraalError.shouldNotReachHere(); }
< prev index next >