diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java index 592065c8b918488fb374cd603acde18e6d151fc7..9fca6ad543887ea7ba6d033cdf3a251fa329d9b9 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java @@ -48,7 +48,8 @@ public class Slot { } @Specialization(guards = {"name.equals(cachedInternedName)"}) - protected Object getSlotCached(Object object, @SuppressWarnings("unused") String name, @Cached("getInternedName(name)") String cachedInternedName) { + protected Object getSlotCached(Object object, @SuppressWarnings("unused") String name, + @Cached("getInternedName(name)") String cachedInternedName) { return accessSlotNode.executeAccess(castAttributable.executeObject(object), cachedInternedName); } @@ -75,7 +76,8 @@ public class Slot { } @Specialization(guards = {"name.equals(cachedInternedName)"}) - protected Object setSlotCached(Object object, @SuppressWarnings("unused") String name, Object value, @Cached("getInternedName(name)") String cachedInternedName) { + protected Object setSlotCached(Object object, @SuppressWarnings("unused") String name, Object value, + @Cached("getInternedName(name)") String cachedInternedName) { return updateSlotNode.executeUpdate(castAttributable.executeObject(object), cachedInternedName, value); } diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cutree.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cutree.java index 8c291da19ee516d98b50441e98361f0af40b22b1..2d19c386ca9008a469ccea7cbf6119c1eb27d93e 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cutree.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cutree.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 1995--2015, The R Core Team - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -30,7 +30,8 @@ public abstract class Cutree extends RExternalBuiltinNode.Arg2 { } @Specialization - protected RIntVector cutree(RAbstractIntVector mergeIn, RAbstractIntVector whichIn, @Cached("create()") GetDimAttributeNode getDimNode) { + protected RIntVector cutree(RAbstractIntVector mergeIn, RAbstractIntVector whichIn, + @Cached("create()") GetDimAttributeNode getDimNode) { RIntVector merge = mergeIn.materialize(); RIntVector which = whichIn.materialize(); int whichLen = which.getLength(); diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DoubleCentre.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DoubleCentre.java index b33d733a7cb6b25fac7190bc27dcaca9a1830b73..068f611650064146dc53d4a48a67b56d0da36a9b 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DoubleCentre.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DoubleCentre.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 1995--2015, The R Core Team - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -26,7 +26,8 @@ public abstract class DoubleCentre extends RExternalBuiltinNode.Arg1 { } @Specialization - protected RDoubleVector doubleCentre(RAbstractDoubleVector aVecAbs, @Cached("create()") GetDimAttributeNode getDimNode) { + protected RDoubleVector doubleCentre(RAbstractDoubleVector aVecAbs, + @Cached("create()") GetDimAttributeNode getDimNode) { RDoubleVector aVec = aVecAbs.materialize(); int n = getDimNode.nrows(aVec); double[] a = aVec.getDataWithoutCopying(); // does not copy diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java index 4b2e9d8c1f0dcc97b08ce4e4c2b516602ae163f4..91d39ec70e14bc02089f8b717c0820bbc0486d76 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java @@ -335,7 +335,8 @@ public abstract class Combine extends RBuiltinNode { } @Specialization(guards = "!isArguments(args)") - protected Object nonArguments(Object args, boolean recursive, @Cached("create()") Combine combine) { + protected Object nonArguments(Object args, boolean recursive, + @Cached("create()") Combine combine) { return combine.executeCombine(new RArgsValuesAndNames(new Object[]{args}, EMPTY_SIGNATURE), recursive); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DimNames.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DimNames.java index 6953af8262f8466702d2e38fc0a2a5af330a1b52..0de9caa23a61d369a9b1b29fd250c4c87f07e3f5 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DimNames.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DimNames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, 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 @@ -47,7 +47,8 @@ public abstract class DimNames extends RBuiltinNode { } @Specialization - protected Object getDimNames(RAbstractContainer container, @Cached("create()") GetDimNamesAttributeNode getDimNamesNode) { + protected Object getDimNames(RAbstractContainer container, + @Cached("create()") GetDimNamesAttributeNode getDimNamesNode) { RList names = getDimNamesNode.getDimNames(container); return nullProfile.profile(names == null) ? RNull.instance : names; } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java index 6a540311a1dd7103cf6c560e2664cfd535a3f193..a8fd09929618f8524cb481bf48a27ced1206838d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java @@ -181,7 +181,8 @@ public class EnvFunctions { } @Specialization - protected Object asEnvironment(RS4Object obj, @Cached("createGetXDataAttrNode()") GetFixedAttributeNode getXDataAttrNode) { + protected Object asEnvironment(RS4Object obj, + @Cached("createGetXDataAttrNode()") GetFixedAttributeNode getXDataAttrNode) { // generic dispatch tried already Object xData = getXDataAttrNode.execute(obj); if (xData == null || !(xData instanceof REnvironment)) { diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsUnsorted.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsUnsorted.java index aa024693a6ee438863f54b6e80be180da114b66a..c26d7aa2866a30655490715367d1d56eedab22cf 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsUnsorted.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsUnsorted.java @@ -141,7 +141,8 @@ public abstract class IsUnsorted extends RBuiltinNode { } @Specialization - protected byte isUnsorted(RAbstractComplexVector x, boolean strictly, @Cached("createCmpNode()") CmpNode cmpNode) { + protected byte isUnsorted(RAbstractComplexVector x, boolean strictly, + @Cached("createCmpNode()") CmpNode cmpNode) { int last = 0; for (int k = 1; k < x.getLength(); k++) { if (strictlyProfile.profile(strictly)) { diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java index 4ade54003a659d4aeced95f0a577113dcc1a3c18..41691b554b1a5521b91e3c006b5793578df1c485 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java @@ -100,7 +100,8 @@ public class LaFunctions { private final ConditionProfile hasComplexValues = ConditionProfile.createBinaryProfile(); @Specialization - protected Object doRg(RDoubleVector matrix, boolean onlyValues, @Cached("create()") GetDimAttributeNode getDimsNode) { + protected Object doRg(RDoubleVector matrix, boolean onlyValues, + @Cached("create()") GetDimAttributeNode getDimsNode) { int[] dims = getDimsNode.getDimensions(matrix); // copy array component of matrix as Lapack destroys it int n = dims[0]; @@ -193,7 +194,8 @@ public class LaFunctions { @RBuiltin(name = "La_rs", kind = INTERNAL, parameterNames = {"matrix", "onlyValues"}, behavior = PURE) public abstract static class Rs extends RsgAdapter { @Specialization - protected Object doRs(RDoubleVector matrix, boolean onlyValues, @Cached("create()") GetDimAttributeNode getDimsNode) { + protected Object doRs(RDoubleVector matrix, boolean onlyValues, + @Cached("create()") GetDimAttributeNode getDimsNode) { int[] dims = getDimsNode.getDimensions(matrix); int n = dims[0]; char jobv = onlyValues ? 'N' : 'V'; diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lapply.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lapply.java index 3bbe0caf7929e2e63d4b019f2debab3356104eb5..89f801a70361845bad538f6c77da4d512dd7b1fa 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lapply.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lapply.java @@ -80,7 +80,8 @@ public abstract class Lapply extends RBuiltinNode { } @Specialization - protected Object lapply(VirtualFrame frame, RAbstractVector vec, RFunction fun, @Cached("create()") GetNamesAttributeNode getNamesNode) { + protected Object lapply(VirtualFrame frame, RAbstractVector vec, RFunction fun, + @Cached("create()") GetNamesAttributeNode getNamesNode) { Object[] result = lapply.execute(frame, vec, fun); // set here else it gets overridden by the iterator evaluation return RDataFactory.createList(result, getNamesNode.getNames(vec)); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SeqFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SeqFunctions.java index 1308a933811bb1c670ed37ab6c168de4aa0acc5c..39a1d3193eaa36c94d4ff413281aa432c2d133d8 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SeqFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SeqFunctions.java @@ -525,7 +525,9 @@ public class SeqFunctions { */ @Specialization(guards = {"!isMissing(toObj)"}) protected RAbstractVector seqLengthByMissing(VirtualFrame frame, Object fromObj, Object toObj, RMissing by, RMissing lengthOut, RMissing alongWith, - @Cached("create()") AsRealNode asRealFrom, @Cached("create()") AsRealNode asRealTo, @Cached("createBinaryProfile()") ConditionProfile directionProfile) { + @Cached("create()") AsRealNode asRealFrom, + @Cached("create()") AsRealNode asRealTo, + @Cached("createBinaryProfile()") ConditionProfile directionProfile) { double from; if (isMissing(fromObj)) { from = 1.0; @@ -586,7 +588,9 @@ public class SeqFunctions { */ @Specialization(guards = {"!isMissing(byObj)"}) protected Object seqLengthMissing(VirtualFrame frame, Object fromObj, Object toObj, Object byObj, RMissing lengthOut, RMissing alongWith, - @Cached("create()") AsRealNode asRealFrom, @Cached("create()") AsRealNode asRealTo, @Cached("create()") AsRealNode asRealby) { + @Cached("create()") AsRealNode asRealFrom, + @Cached("create()") AsRealNode asRealTo, + @Cached("create()") AsRealNode asRealby) { double from; boolean allInt = true; if (isMissing(fromObj)) { @@ -778,7 +782,9 @@ public class SeqFunctions { // "by" missing @Specialization(guards = {"oneNotMissing(alongWith, lengthOut)", "oneNotMissing(fromObj, toObj)"}) protected RAbstractVector seqWithLength(VirtualFrame frame, Object fromObj, Object toObj, RMissing byObj, Object lengthOut, Object alongWith, - @Cached("create()") AsRealNode asRealFrom, @Cached("create()") AsRealNode asRealTo, @Cached("create()") AsRealNode asRealLen) { + @Cached("create()") AsRealNode asRealFrom, + @Cached("create()") AsRealNode asRealTo, + @Cached("create()") AsRealNode asRealLen) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { return RDataFactory.createEmptyIntVector(); @@ -830,7 +836,9 @@ public class SeqFunctions { // "to" missing @Specialization(guards = {"oneNotMissing(alongWith, lengthOut)", "oneNotMissing(fromObj, byObj)"}) protected RAbstractVector seqWithLength(VirtualFrame frame, Object fromObj, RMissing toObj, Object byObj, Object lengthOut, Object alongWith, - @Cached("create()") AsRealNode asRealFrom, @Cached("create()") AsRealNode asRealby, @Cached("create()") AsRealNode asRealLen) { + @Cached("create()") AsRealNode asRealFrom, + @Cached("create()") AsRealNode asRealby, + @Cached("create()") AsRealNode asRealLen) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { return RDataFactory.createEmptyIntVector(); @@ -855,7 +863,9 @@ public class SeqFunctions { // "from" missing @Specialization(guards = {"oneNotMissing(alongWith, lengthOut)", "oneNotMissing(toObj, byObj)"}) protected RAbstractVector seqWithLength(VirtualFrame frame, RMissing fromObj, Object toObj, Object byObj, Object lengthOut, Object alongWith, - @Cached("create()") AsRealNode asRealTo, @Cached("create()") AsRealNode asRealby, @Cached("create()") AsRealNode asRealLen) { + @Cached("create()") AsRealNode asRealTo, + @Cached("create()") AsRealNode asRealby, + @Cached("create()") AsRealNode asRealLen) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { return RDataFactory.createEmptyIntVector(); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UnClass.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UnClass.java index c0caf0bd8563996de9fca84587db0f1fc6c103d9..37c491068901c450a3ca6abee0de184388a5ffaa 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UnClass.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UnClass.java @@ -57,7 +57,8 @@ public abstract class UnClass extends RBuiltinNode { // TODO: this specialization could go away if connections were simple vectors (we wouldn't need // special method for setting class attributes then) @Specialization - protected Object unClass(RAbstractVector arg, @Cached("create()") GetClassAttributeNode getClassNode) { + protected Object unClass(RAbstractVector arg, + @Cached("create()") GetClassAttributeNode getClassNode) { if (getClassNode.isObject(arg)) { objectProfile.enter(); return unClassVector(arg); @@ -66,7 +67,9 @@ public abstract class UnClass extends RBuiltinNode { } @Specialization(guards = "notAbstractVector(arg)") - protected Object unClass(RAttributable arg, @Cached("create()") RemoveClassAttributeNode removeClassNode, @Cached("create()") GetClassAttributeNode getClassNode) { + protected Object unClass(RAttributable arg, + @Cached("create()") RemoveClassAttributeNode removeClassNode, + @Cached("create()") GetClassAttributeNode getClassNode) { if (getClassNode.getClassAttr(arg) != null) { objectProfile.enter(); if (arg instanceof RShareable) { diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateAttr.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateAttr.java index 3966e259a972c5da85f4531895fed8bb147fdf61..1c16ecae624a57b5918ed778d71c05eb0f0fa80e 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateAttr.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateAttr.java @@ -139,7 +139,8 @@ public abstract class UpdateAttr extends RBuiltinNode { } @Specialization - protected RAbstractContainer updateAttr(RAbstractContainer container, String name, RNull value, @Cached("create()") RemoveAttributeNode removeAttrNode) { + protected RAbstractContainer updateAttr(RAbstractContainer container, String name, RNull value, + @Cached("create()") RemoveAttributeNode removeAttrNode) { String internedName = intern.execute(name); RAbstractContainer result = (RAbstractContainer) container.getNonShared(); // the name is interned, so identity comparison is sufficient diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/Fft.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/Fft.java index b4bf5517d216c83e638f04f7e139142fa7278a16..e28bccf67dcab325f38d2b4a2abaa50decd19b15 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/Fft.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/Fft.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2015, 2016, Oracle and/or its affiliates + * Copyright (c) 2015, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -38,7 +38,8 @@ public abstract class Fft extends RExternalBuiltinNode.Arg2 { // TODO: handle more argument types (this is sufficient to run the b25 benchmarks) @Specialization - public Object execute(RAbstractComplexVector zVec, boolean inverse, @Cached("create()") GetDimAttributeNode getDimNode) { + public Object execute(RAbstractComplexVector zVec, boolean inverse, + @Cached("create()") GetDimAttributeNode getDimNode) { double[] z = zVec.materialize().getDataTemp(); int inv = inverse ? 2 : -2; int[] d = getDimNode.getDimensions(zVec); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessSlotNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessSlotNode.java index bd4dda5ac3b5c3664013d2e297b91df379fb0a03..8d211627165870f0b6c0ec426ca10c558e34988b 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessSlotNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessSlotNode.java @@ -140,7 +140,8 @@ public abstract class AccessSlotNode extends RNode { // this is really a fallback specialization but @Fallback does not work here (because of the // type of "object"?) @Specialization(guards = {"!slotAccessAllowed(object)", "!isDotData(name)"}) - protected Object getSlot(RAttributable object, String name, @Cached("create()") GetClassAttributeNode getClassNode) { + protected Object getSlot(RAttributable object, String name, + @Cached("create()") GetClassAttributeNode getClassNode) { RStringVector classAttr = getClassNode.getClassAttr(object); if (classAttr == null) { RStringVector implicitClassVec = object.getImplicitClass(); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCastNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCastNode.java index adc4cddbe02f33a07a899e64ebc190bdefc58971..78414fda334db4da6b530f787dfa15cfba76eb4b 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCastNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCastNode.java @@ -93,7 +93,8 @@ abstract class PositionCastNode extends Node { } @Specialization - protected RAbstractVector doDouble(double position, @Cached("create()") NACheck check) { + protected RAbstractVector doDouble(double position, + @Cached("create()") NACheck check) { if (mode.isSubscript()) { check.enable(position); return RInteger.valueOf(check.convertDoubleToInt(position)); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubsetNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubsetNode.java index 208b079a8a8de3fc9bfde8368d186db50322cd78..b0ff86b1d0341f2ff8ac13ca26789df5c1f8f51f 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubsetNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubsetNode.java @@ -94,7 +94,8 @@ abstract class PositionCheckSubsetNode extends PositionCheckNode { @Specialization(contains = "doLogicalMultiplesInBounds") protected RAbstractVector doLogicalGenericInBounds(PositionProfile statistics, // - int dimensionLength, RAbstractLogicalVector position, int positionLength, @Cached("create()") BranchProfile outOfBoundsProfile, + int dimensionLength, RAbstractLogicalVector position, int positionLength, + @Cached("create()") BranchProfile outOfBoundsProfile, @Cached("createCountingProfile()") LoopConditionProfile lengthProfile, @Cached("createBinaryProfile()") ConditionProfile incModProfile) { positionNACheck.enable(position); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNode.java index 21da11ada017cdd63bfd73d1d3e2d956f74f5dde..c8dc9b2cb914658800861960a70ef16d3493e127 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNode.java @@ -100,7 +100,8 @@ public abstract class ReplaceVectorNode extends Node { protected Object accessField(VirtualFrame frame, TruffleObject object, Object[] positions, Object value, @Cached("createForeignWrite(positions)") Node foreignRead, @Cached("positions.length") int cachedLength, - @Cached("create()") CastStringNode castNode, @Cached("createFirstString()") FirstStringNode firstString) { + @Cached("create()") CastStringNode castNode, + @Cached("createFirstString()") FirstStringNode firstString) { Object writtenValue = value; if (writtenValue instanceof RInteger) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/WriteIndexedVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/WriteIndexedVectorNode.java index 47861018bb261ff877b13de7b853a6f41afef533..ecf96446abf89bb5ae17b87ef1bda2427dd4a4cd 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/WriteIndexedVectorNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/WriteIndexedVectorNode.java @@ -211,7 +211,8 @@ abstract class WriteIndexedVectorNode extends Node { protected int doLogicalPosition(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, int targetDimension, Object[] positions, RAbstractLogicalVector position, int positionOffset, int positionLength, RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA, - @Cached("create()") BranchProfile wasTrue, @Cached("create()") AlwaysOnBranchProfile outOfBounds, + @Cached("create()") BranchProfile wasTrue, + @Cached("create()") AlwaysOnBranchProfile outOfBounds, @Cached("createCountingProfile()") LoopConditionProfile profile, @Cached("createBinaryProfile()") ConditionProfile incModProfile) { positionNACheck.enable(!skipNA && !position.isComplete()); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java index 09fa0a6a7f0875f63ca1038a81ba44182580a644..4eb7f700caffe6e92dc54e0045fb443e0ef8e30c 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java @@ -820,7 +820,8 @@ public final class SpecialAttributesFunctions { @Specialization(insertBefore = "setAttrInAttributable") @TruffleBoundary - protected void setDimNamesInContainer(RAbstractContainer x, RList dimNames, @Cached("createClassProfile()") ValueProfile contClassProfile) { + protected void setDimNamesInContainer(RAbstractContainer x, RList dimNames, + @Cached("createClassProfile()") ValueProfile contClassProfile) { RAbstractContainer xProfiled = contClassProfile.profile(x); xProfiled.setDimNames(dimNames); } @@ -946,7 +947,8 @@ public final class SpecialAttributesFunctions { @Specialization(insertBefore = "setAttrInAttributable", guards = "!isRAbstractVector(x)") @TruffleBoundary - protected void setRowNamesInContainer(RAbstractContainer x, RAbstractVector rowNames, @Cached("createClassProfile()") ValueProfile contClassProfile) { + protected void setRowNamesInContainer(RAbstractContainer x, RAbstractVector rowNames, + @Cached("createClassProfile()") ValueProfile contClassProfile) { RAbstractContainer xProfiled = contClassProfile.profile(x); xProfiled.setRowNames(rowNames); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticSpecial.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticSpecial.java index d65a911c9c9c4623a8c69d4098f968626840fc02..25ecda988042ac0c84421d5c573dfe322cc38cb5 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticSpecial.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticSpecial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -108,7 +108,8 @@ public abstract class BinaryArithmeticSpecial extends RNode { } @Specialization - public int doIntegers(int left, int right, @Cached("createBinaryProfile()") ConditionProfile naProfile) { + public int doIntegers(int left, int right, + @Cached("createBinaryProfile()") ConditionProfile naProfile) { if (naProfile.profile(RRuntime.isNA(left) || RRuntime.isNA(right))) { checkFullCallNeededOnNA(); return RRuntime.INT_NA; @@ -117,7 +118,8 @@ public abstract class BinaryArithmeticSpecial extends RNode { } @Specialization - public double doIntDouble(int left, double right, @Cached("createBinaryProfile()") ConditionProfile naProfile) { + public double doIntDouble(int left, double right, + @Cached("createBinaryProfile()") ConditionProfile naProfile) { if (naProfile.profile(RRuntime.isNA(left) || RRuntime.isNA(right))) { checkFullCallNeededOnNA(); return RRuntime.DOUBLE_NA; @@ -126,7 +128,8 @@ public abstract class BinaryArithmeticSpecial extends RNode { } @Specialization - public double doDoubleInt(double left, int right, @Cached("createBinaryProfile()") ConditionProfile naProfile) { + public double doDoubleInt(double left, int right, + @Cached("createBinaryProfile()") ConditionProfile naProfile) { if (naProfile.profile(RRuntime.isNA(left) || RRuntime.isNA(right))) { checkFullCallNeededOnNA(); return isNaN(left) ? Double.NaN : RRuntime.DOUBLE_NA; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanScalarNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanScalarNode.java index 3a3f0fe6d7477ce2aa7426dd4c7ae506f7867b8e..67e8a9132030280ceffc39722e3008f647e11003 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanScalarNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanScalarNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, 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 @@ -100,7 +100,8 @@ public abstract class BinaryBooleanScalarNode extends RBuiltinNode { } @Specialization(limit = "CACHE_LIMIT", guards = {"cachedClass != null", "operand.getClass() == cachedClass"}) - protected byte doCached(Object operand, @Cached("getNumericVectorClass(operand)") Class<? extends RAbstractVector> cachedClass) { + protected byte doCached(Object operand, + @Cached("getNumericVectorClass(operand)") Class<? extends RAbstractVector> cachedClass) { return castImpl(cachedClass.cast(operand)); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BoxPrimitiveNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BoxPrimitiveNode.java index a49416fa45fad366cf31ec79d7a4c810d72de8cc..a6b5c6125d15311ba25f79321d50853db541580d 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BoxPrimitiveNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BoxPrimitiveNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -68,7 +68,8 @@ public abstract class BoxPrimitiveNode extends CastNode { * check !isPrimitve. */ @Specialization(limit = "3", guards = "vector.getClass() == cachedClass") - protected static Object doCached(Object vector, @Cached("vector.getClass()") Class<?> cachedClass) { + protected static Object doCached(Object vector, + @Cached("vector.getClass()") Class<?> cachedClass) { assert (!isPrimitive(vector)); return cachedClass.cast(vector); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/RLengthNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/RLengthNode.java index 1e9af02a1fa353f8a9ab2e16d67806abc9361cdd..34bd86da77f53ca5be32f45c1e0f0aa872bf55d4 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/RLengthNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/RLengthNode.java @@ -97,7 +97,8 @@ public abstract class RLengthNode extends RNode { } @Specialization(contains = "doCachedContainer") - protected int doContainer(RAbstractContainer operand, @Cached("create()") VectorLengthProfile lengthProfile) { + protected int doContainer(RAbstractContainer operand, + @Cached("create()") VectorLengthProfile lengthProfile) { return lengthProfile.profile(operand.getLength()); } @@ -109,7 +110,8 @@ public abstract class RLengthNode extends RNode { } @Specialization - protected int getLength(REnvironment env, @Cached("create()") VectorLengthProfile lengthProfile) { + protected int getLength(REnvironment env, + @Cached("create()") VectorLengthProfile lengthProfile) { /* * This is a bit wasteful but only in the creation of the RStringVector; all the logic to * decide whether to include a name is still necessary diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/signature/CollectArgumentsNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/signature/CollectArgumentsNode.java index 9dd0e393f64ba586aa4f108978c2f2f20b9cc80d..8cae02ab03e08793add687916a8f821fb1e42617 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/signature/CollectArgumentsNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/signature/CollectArgumentsNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -64,7 +64,9 @@ public abstract class CollectArgumentsNode extends RBaseNode { @SuppressWarnings("unused") @ExplodeLoop @Specialization(limit = "CACHE_LIMIT", guards = {"cachedSignature == signature"}) - protected Object[] combineCached(VirtualFrame frame, ArgumentsSignature signature, @Cached("signature") ArgumentsSignature cachedSignature, @Cached("createArgs(signature, frame)") Node[] reads) { + protected Object[] combineCached(VirtualFrame frame, ArgumentsSignature signature, + @Cached("signature") ArgumentsSignature cachedSignature, + @Cached("createArgs(signature, frame)") Node[] reads) { Object[] result = new Object[reads.length]; for (int i = 0; i < reads.length; i++) { Object value = reads[i] instanceof ConstantNode ? ((ConstantNode) reads[i]).getValue() : ((LocalReadVariableNode) reads[i]).execute(frame); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/UnaryMapNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/UnaryMapNode.java index 07280c7c8e21cfb10240613cd02805571602e611..e759e0cb5199405ecb80f7730b96742d9a8e3f24 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/UnaryMapNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/UnaryMapNode.java @@ -338,7 +338,8 @@ public final class UnaryMapNode extends RBaseNode { } @Specialization(contains = "doScalar") - protected void doScalarVector(UnaryMapFunctionNode node, Object store, RAbstractVector operand, int operandLength, @Cached("createCountingProfile()") LoopConditionProfile profile) { + protected void doScalarVector(UnaryMapFunctionNode node, Object store, RAbstractVector operand, int operandLength, + @Cached("createCountingProfile()") LoopConditionProfile profile) { profile.profileCounted(operandLength); for (int i = 0; profile.inject(i < operandLength); ++i) { indexedAction.perform(node, store, i, operand, i); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java index bf361980c92ad6488bf88e4a65c2bd5c6a5288cd..03eda37330086b211fb655eaf8f39044fd8860df 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java @@ -206,7 +206,8 @@ public abstract class PrecedenceNode extends RBaseNode { } @Specialization(guards = {"!recursive", "args.getLength() == 1"}) - protected int doArgsValuesAndNames(RArgsValuesAndNames args, boolean recursive, @Cached("createRecursive()") PrecedenceNode precedenceNode) { + protected int doArgsValuesAndNames(RArgsValuesAndNames args, boolean recursive, + @Cached("createRecursive()") PrecedenceNode precedenceNode) { return precedenceNode.executeInteger(args.getArgument(0), recursive); } } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticNode.java index 3b1be3e005a96b103647edf074d3928cdc40cdce..175f43258d4a942db5075f7223814e49b0e46e36 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticNode.java @@ -65,7 +65,8 @@ public abstract class UnaryArithmeticNode extends UnaryNode { } @Specialization(guards = {"cachedNode != null", "cachedNode.isSupported(operand)"}) - protected Object doCached(Object operand, @Cached("createCachedFast(operand)") UnaryMapNode cachedNode) { + protected Object doCached(Object operand, + @Cached("createCachedFast(operand)") UnaryMapNode cachedNode) { return cachedNode.apply(operand); }