diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java index 1bce5b339efe8e3d0e31ef878a81b9ebae5367db..649e80683655b6e50ae51f8aa4fa6d0bec054025 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java @@ -633,7 +633,6 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess { } else { return result; } - } @TruffleBoundary diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java index b32e60821d0c3486273a0bf49c082d6311db437e..59607e867f7c9825c2221de98ec83cb48d64df3b 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.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 @@ -87,7 +87,6 @@ public final class TruffleRLanguage extends TruffleLanguage<RContext> { } catch (ExitException ex) { System.exit(ex.getStatus()); } - } } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLDotSymbolMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLDotSymbolMR.java index 3342f4a737ae56c2d35cc346a46e3d94a7565624..2a0374f7ec0579720527ad2c13a8c172abc4716a 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLDotSymbolMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLDotSymbolMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -38,5 +38,4 @@ public class DLLDotSymbolMR { return receiver instanceof DLL.DotSymbol; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLInfoMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLInfoMR.java index 92a4118c055bfe7c4c27ff88caf52213eb8e25ba..1161da07d4d358c104533b8a6b5393044edb5193 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLInfoMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/DLLInfoMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -38,5 +38,4 @@ public class DLLInfoMR { return receiver instanceof DLL.DLLInfo; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArray.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArray.java index 582860ac3d948d2448f6aa8427f61f3027b9467d..e963bddd8e37d4a34fbe92902a8f61f1cd26aade 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArray.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -33,5 +33,4 @@ public class NativeCharArray extends NativeUInt8Array { public NativeCharArray(byte[] bytes) { super(bytes, true); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArrayMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArrayMR.java index 5e8e040221f1f747c101648f8d2ea91dc2143e50..63a819b58992c1e52442843a366166e3fb52e51f 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArrayMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeCharArrayMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -74,5 +74,4 @@ public class NativeCharArrayMR { return receiver instanceof NativeCharArray; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeDoubleArray.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeDoubleArray.java index 471fe62d1a061b11ee3879509c8ffa8fd7598b59..1268562ed46d84e51cd5339a4be79ae64715b1a4 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeDoubleArray.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeDoubleArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -35,5 +35,4 @@ public class NativeDoubleArray extends NativeNACheck implements RTruffleObject { public NativeDoubleArray(double[] value) { this(null, value); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArray.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArray.java index ee20f7db3ef49404a4408daef761af4e795fac82..217f5fa0169424bd5bc72ead54127ed0bead6d3a 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArray.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -35,5 +35,4 @@ public class NativeIntegerArray extends NativeNACheck implements RTruffleObject public NativeIntegerArray(int[] value) { this(null, value); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArrayMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArrayMR.java index 70115e5f2dca80144eeb71fdee370b8ab1a8d545..ed06bb6f140574611d4338a43462242c6acc3617 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArrayMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeIntegerArrayMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -58,5 +58,4 @@ public class NativeIntegerArrayMR { return receiver instanceof NativeIntegerArray; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArray.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArray.java index bc1e41f398dbfcab2819e660432117dd6286b330..01f3f46c1b265e9dbe67ba13aaa36a49a5285714 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArray.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -52,5 +52,4 @@ public class NativeLogicalArray extends NativeNACheck implements RTruffleObject } data[index] = newVal; } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArrayMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArrayMR.java index eb9d9bdae5988b38c75cd26dfba03e86c8d929ea..63612d60f40c714d524072465597482e94dfc8cb 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArrayMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeLogicalArrayMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -60,5 +60,4 @@ public class NativeLogicalArrayMR { return receiver instanceof NativeLogicalArray; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeNACheck.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeNACheck.java index 2eaad54125ea328ba342e4635f02634daacb892d..5d05ca62d81b769471452086d111723257ec6c83 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeNACheck.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeNACheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -46,5 +46,4 @@ public class NativeNACheck { vec.setComplete(false); } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArray.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArray.java index 8e452be22a8d57901913b6eaf659381bacbcdc05..dfd1e629cde7c7249590644ead7331e65a20ee44 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArray.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -27,5 +27,4 @@ public class NativeRawArray extends NativeUInt8Array { public NativeRawArray(byte[] bytes) { super(bytes, false); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArrayMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArrayMR.java index 4aac34a0afab0c8aeaaba389b4cd3129992afaac..b694a9f56f6656d334821a3142c24c1ceb4d8914 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArrayMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeRawArrayMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -67,5 +67,4 @@ public class NativeRawArrayMR { return receiver instanceof NativeRawArray; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeUInt8Array.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeUInt8Array.java index 2c8eddabdc7e5a8212846d2759478af031e96b8a..d8c54ac6e3b12b6943778e32eb9f70f276d65b18 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeUInt8Array.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/NativeUInt8Array.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -114,5 +114,4 @@ public abstract class NativeUInt8Array implements RTruffleObject { } return bytes; } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RDoubleMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RDoubleMR.java index 2cacef289c49c07e09543f6894cc1fdf69a4b125..518f0d36b11211a655a83641bdc1d89c3c034f33 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RDoubleMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RDoubleMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -67,5 +67,4 @@ public class RDoubleMR { return receiver instanceof RDouble; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java index 8f9ab7d176f7d28c7f146c6fee1a5ada9946749d..5372d38a23acdb1431a705ce8c7d29471d0d19da 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -109,5 +109,4 @@ public class REnvironmentMR { return receiver instanceof REnvironment; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RExternalPtrMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RExternalPtrMR.java index 3d21bccdf2f6a6d0a2b6dece2a5b38aa99b09598..9df56f2454ca8b1565c93c52b3eb8a10cd8ea703 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RExternalPtrMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RExternalPtrMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -38,5 +38,4 @@ public class RExternalPtrMR { return receiver instanceof RExternalPtr; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RForeignAccessFactoryImpl.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RForeignAccessFactoryImpl.java index f6c10285be41d94fda9cab193dd84ce31a342769..11559c31bc4ad818a8b31b6a04defef4ba89cb84 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RForeignAccessFactoryImpl.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RForeignAccessFactoryImpl.java @@ -239,7 +239,6 @@ public final class RForeignAccessFactoryImpl implements RForeignAccessFactory { } return foreignAccess; } - } /** @@ -286,5 +285,4 @@ public final class RForeignAccessFactoryImpl implements RForeignAccessFactory { public Class<? extends TruffleLanguage<RContext>> getTruffleLanguage() { return TruffleRLanguage.class; } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RFunctionMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RFunctionMR.java index f74aee87f9c372fa61e130bb3f2f357440b30867..8001e760664966b084c5d2bf830e1bbef491ca2d 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RFunctionMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RFunctionMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -84,5 +84,4 @@ public class RFunctionMR { return receiver instanceof RFunction; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RIntegerMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RIntegerMR.java index 94d2c602606c42318d4474d8efa00f8d14594c2e..2519b3736c17b4dd0ac85fc8883351afc3008289 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RIntegerMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RIntegerMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -67,5 +67,4 @@ public class RIntegerMR { return receiver instanceof RInteger; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RListMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RListMR.java index d694fbe0c4a3530bf847223c4379d3ee2fccdd9f..be2017c3720fd630b50e3a9a8e8394c019fa9a4a 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RListMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RListMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -123,5 +123,4 @@ public class RListMR { return receiver instanceof RList; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RNullMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RNullMR.java index 3617627450508b9135b4a19f69ee8304bad77be0..be1ae97f401b4cccd3808ec0589258dfe4ac4298 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RNullMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RNullMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -60,5 +60,4 @@ public class RNullMR { return receiver instanceof RNull; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPairListMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPairListMR.java index 42c294dd8a40dc6ab5333df483e725aefda37a1f..8aab5a3e3b0d9320309034089022709d4750b9cc 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPairListMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPairListMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -84,5 +84,4 @@ public class RPairListMR { return receiver instanceof RPairList; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RSymbolMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RSymbolMR.java index 2eb3cb9661492abbde68aa3821eeb7a614028ec9..b7cff8ea42faf4cb92065c348e1f560d237780a3 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RSymbolMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RSymbolMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -38,5 +38,4 @@ public class RSymbolMR { return receiver instanceof RSymbol; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RUnboundValueMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RUnboundValueMR.java index ff0c179f53dafceb6e7ea0ca17e89896190b0fd2..2f6ad858cbcbfc8bc82d85e418d37c3e8436bb73 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RUnboundValueMR.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RUnboundValueMR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -60,5 +60,4 @@ public class RUnboundValueMR { return receiver instanceof RUnboundValue; } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/UnsafeAdapter.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/UnsafeAdapter.java index e80c125a9fe68c1cb1d8bc11f799d19549d85021..1306e9bc7c547df11ce4f730b10e23749e689518 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/UnsafeAdapter.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/UnsafeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -42,5 +42,4 @@ class UnsafeAdapter { } } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleC.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleC.java index 3fd7b1a82a544f0d26155bc2d60579aa51895cbe..9c5d86b065c1187113c9664dd7b705afdad03553 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleC.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleC.java @@ -79,5 +79,4 @@ class TruffleC implements CRFFI { public CRFFINode createCRFFINode() { return new TruffleCRFFINode(); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCAccess.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCAccess.java index a835741a541a4c3f326358a4fff502f2d54ab9e4..8fc6bd51721bec5f74b62b3eda047f5c0e0d2f12 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCAccess.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -50,5 +50,4 @@ public class TruffleCAccess { return "caccess_" + name().toLowerCase(); } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCall.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCall.java index 7aaea96863cbd4389cd66491670a22d2bf05a9f0..5fd056c445db51ec1bd1eba916d7c1780a689e53 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCall.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCall.java @@ -74,7 +74,6 @@ class TruffleCall implements CallRFFI { @Override public void beforeDestroy(RContext contextA) { } - } static ContextStateImpl newContextState() { @@ -136,7 +135,6 @@ class TruffleCall implements CallRFFI { jniCall.invokeVoidCall(nativeCallInfo, args); return RNull.instance; } - } /** @@ -151,7 +149,7 @@ class TruffleCall implements CallRFFI { public abstract Object execute(NativeCallInfo nativeCallInfo, Object[] args, RContext context); @Specialization(guards = {"context == cachedContext"}) - protected Object invokeCallCached(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") RContext context, // + protected Object invokeCallCached(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") RContext context, @SuppressWarnings("unused") @Cached("getInstance()") RContext cachedContext, @Cached("createExecute(0).createNode()") Node messageNode, @SuppressWarnings("unused") @Cached("ensureReady(nativeCallInfo)") boolean ready) { @@ -185,7 +183,6 @@ class TruffleCall implements CallRFFI { public static InvokeTruffle create() { return InvokeTruffleNodeGen.create(); } - } /** @@ -195,21 +192,21 @@ class TruffleCall implements CallRFFI { public abstract Object execute(NativeCallInfo nativeCallInfo, Object[] args, boolean voidCall); @Specialization(guards = {"isJNICall(nativeCallInfo)", "!voidCall"}) - protected Object invokeCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, // + protected Object invokeCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, @Cached("new()") InvokeJNI invokeJNI) { return invokeJNI.invokeCall(nativeCallInfo, args); } @Specialization(guards = {"isJNICall(nativeCallInfo)", "voidCall"}) - protected Object invokeVoidCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, // + protected Object invokeVoidCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, @Cached("new()") InvokeJNI invokeJNI) { return invokeJNI.invokeVoidCall(nativeCallInfo, args); } @Specialization(guards = "!isJNICall(nativeCallInfo)") - protected Object invokeCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, // + protected Object invokeCall(NativeCallInfo nativeCallInfo, Object[] args, @SuppressWarnings("unused") boolean voidCall, @Cached("create()") InvokeTruffle invokeTruffle) { return invokeTruffle.execute(nativeCallInfo, args, RContext.getInstance()); } @@ -217,7 +214,6 @@ class TruffleCall implements CallRFFI { public static boolean isJNICall(NativeCallInfo nativeCallInfo) { return nativeCallInfo.address.value instanceof Long; } - } private static class TruffleCallRFFINode extends CallRFFINode { @@ -245,7 +241,6 @@ class TruffleCall implements CallRFFI { // TODO Truffleize new JNI_CallRFFINode().setInteractive(interactive); } - } /** @@ -261,5 +256,4 @@ class TruffleCall implements CallRFFI { public CallRFFINode createCallRFFINode() { return new TruffleCallRFFINode(); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCallHelper.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCallHelper.java index 2daf1027e71e2c4417abbf0132afe938e5f5546e..420b4218e7b55c868b73c880a4fd5a45476be0e4 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCallHelper.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleCallHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -146,7 +146,5 @@ public class TruffleCallHelper extends JavaUpCallsRFFI { } else { throw RInternalError.shouldNotReachHere(); } - } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleDLL.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleDLL.java index ad4f27fe6853712641b65dd1bcedeadccd464c99..60a2e4e00ee28115ad70ee83e550dd8e70533e53 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleDLL.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleDLL.java @@ -140,7 +140,6 @@ class TruffleDLL extends JNI_DLL implements DLLRFFI { parseStatusMap = null; } } - } private static TruffleDLL truffleDLL; @@ -346,5 +345,4 @@ class TruffleDLL extends JNI_DLL implements DLLRFFI { return super.dlclose(handle); } } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TrufflePkgInit.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TrufflePkgInit.java index c73897234ac24c90c3f35384dd688bd6a88d50ac..26d01e6f739901449907ca802c2fd8c5c5a16341 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TrufflePkgInit.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TrufflePkgInit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -86,7 +86,6 @@ class TrufflePkgInit { } catch (Throwable t) { throw RInternalError.shouldNotReachHere(); } - } @SuppressWarnings("unused") @@ -115,5 +114,4 @@ class TrufflePkgInit { public int forceSymbols(DLLInfo dllInfo, int value) { return DLL.forceSymbols(dllInfo, value); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleRFFIContextState.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleRFFIContextState.java index bd937ee2872fc4ece8f61621267aa7d1a754dc6f..4df65f0d27c3b9f6d3241ef26a3353fa9f3b7590 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleRFFIContextState.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleRFFIContextState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -66,5 +66,4 @@ class TruffleRFFIContextState implements ContextState { callState.beforeDestroy(context); statsState.beforeDestroy(context); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleStats.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleStats.java index 5b1e109739e81e9de6d10eebe6682106e75ed578..431ff9d40ae71946343591c156a573a5154e17d0 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleStats.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleStats.java @@ -104,7 +104,7 @@ public class TruffleStats implements StatsRFFI { public abstract int execute(double[] a, int nseg, int n, int nspn, int isn, double[] work, int[] iwork, RContext context); @Specialization(guards = "context == cachedContext") - protected int executeWorkCached(double[] a, int nseg, int n, int nspn, int isn, double[] work, int[] iwork, @SuppressWarnings("unused") RContext context, // + protected int executeWorkCached(double[] a, int nseg, int n, int nspn, int isn, double[] work, int[] iwork, @SuppressWarnings("unused") RContext context, @SuppressWarnings("unused") @Cached("getInstance()") RContext cachedContext, @Cached("createMessageNode()") Node messageNode, @Cached("lookupWork()") SymbolHandle fftWork) { @@ -146,7 +146,7 @@ public class TruffleStats implements StatsRFFI { protected abstract void execute(int n, int[] pmaxf, int[] pmaxp, RContext context); @Specialization(guards = "context == cachedContext") - protected void executeFactorCached(int n, int[] pmaxf, int[] pmaxp, @SuppressWarnings("unused") RContext context, // + protected void executeFactorCached(int n, int[] pmaxf, int[] pmaxp, @SuppressWarnings("unused") RContext context, @SuppressWarnings("unused") @Cached("getInstance()") RContext cachedContext, @Cached("createMessageNode()") Node messageNode, @Cached("lookupFactor()") SymbolHandle fftFactor) { @@ -196,12 +196,10 @@ public class TruffleStats implements StatsRFFI { public void executeFactor(int n, int[] pmaxf, int[] pmaxp) { executeFactor.execute(n, pmaxf, pmaxp, RContext.getInstance()); } - } @Override public FFTNode createFFTNode() { return new Truffle_FFTNode(); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleUserRng.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleUserRng.java index bb9120ef2dea0a27272afa47b9a07c66f33c96cc..41c8dacbd0c378c4b2380f127d4e9deab08d10e6 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleUserRng.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/TruffleUserRng.java @@ -104,5 +104,4 @@ public class TruffleUserRng implements UserRngRFFI { public UserRngRFFINode createUserRngRFFINode() { return new TruffleUserRngRFFINode(); } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/Truffle_RFFIFactory.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/Truffle_RFFIFactory.java index 2bf1a5c7f7a0d0fc6dd10a434d9ab320e07e4db7..8af33a15658061790ebdf5d51b566acb3fd62dd8 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/Truffle_RFFIFactory.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ffi/Truffle_RFFIFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -99,5 +99,4 @@ public class Truffle_RFFIFactory extends JNI_RFFIFactory implements RFFI { } return truffleStatsRFFI; } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java index c1f46024b85c0c6d56b9d85448b95cdbb95b5d57..cc668a856e86c2abd0db1876c3b47278f2739e20 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -77,7 +77,6 @@ public class EmbeddedConsoleHandler implements ConsoleHandler { } else { delegate.println(s); } - } @Override @@ -89,7 +88,6 @@ public class EmbeddedConsoleHandler implements ConsoleHandler { } else { delegate.print(s); } - } @Override @@ -102,7 +100,6 @@ public class EmbeddedConsoleHandler implements ConsoleHandler { } else { delegate.printErrorln(s); } - } @Override @@ -114,7 +111,6 @@ public class EmbeddedConsoleHandler implements ConsoleHandler { } else { delegate.printError(s); } - } @Override @@ -145,12 +141,10 @@ public class EmbeddedConsoleHandler implements ConsoleHandler { if (delegate != null) { delegate.setPrompt(prompt); } - } @Override public String getInputDescription() { return "<embedded input>"; } - } diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java index 1891e67ee86527391bec13005ac0d1e67ce8e588..d0031dd9f6d0c394ef56f41ec992a90c4ae36d50 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -125,5 +125,4 @@ public class REmbedded { private static void R_Suicide(String msg) { Utils.rSuicideDefault(msg); } - } diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java index 8aca802a24be27ab35c04541f29133abeaf55720..c6778622c5382b7f4a19c6f0fa547d62e0919b26 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/MethodsListDispatch.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. */ @@ -98,8 +98,8 @@ public class MethodsListDispatch { @Specialization @TruffleBoundary - protected Object callGetClassFromCache(RAbstractStringVector klass, REnvironment table, // - @Cached("createPckgAttrAccess()") GetFixedAttributeNode klassPckgAttrAccess, // + protected Object callGetClassFromCache(RAbstractStringVector klass, REnvironment table, + @Cached("createPckgAttrAccess()") GetFixedAttributeNode klassPckgAttrAccess, @Cached("createPckgAttrAccess()") GetFixedAttributeNode valPckgAttrAccess) { String klassString = klass.getLength() == 0 ? RRuntime.STRING_NA : klass.getDataAt(0); @@ -334,7 +334,6 @@ public class MethodsListDispatch { String gpckg = checkSingleString(castToVector.execute(gpckgObj), false, "The \"package\" slot in generic function object", this, classHierarchyNode); ok = pckg.equals(gpckg); } - } else { ok = true; } diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/SubstituteDirect.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/SubstituteDirect.java index f8aaae671a57a121eeaea1f2edfefd714c2f0d5e..10d1a2d64a118f833b65410ea08c6c0f6f205510 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/SubstituteDirect.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/SubstituteDirect.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -51,7 +51,7 @@ public abstract class SubstituteDirect extends RExternalBuiltinNode.Arg2 { @Specialization @TruffleBoundary - protected static Object substituteDirect(Object object, RList list, // + protected static Object substituteDirect(Object object, RList list, @Cached("new()") RList2EnvNode list2Env) { REnvironment env = RDataFactory.createNewEnv(null); env.setParent(REnvironment.baseEnv()); diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cdist.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cdist.java index b736f81e92c81b68fe967081313ae3fbe637fc8b..9664f3ba0886b898ed9862962c2e6e9a4a59c48c 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cdist.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cdist.java @@ -143,7 +143,6 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { return Math.sqrt(dist); } - }, MAXIMUM { @Override @@ -176,7 +175,6 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { return dist; } - }, MANHATTAN { @Override @@ -210,7 +208,6 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { return dist; } - }, CANBERRA { @Override @@ -252,7 +249,6 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { return dist; } - }, BINARY { @Override @@ -295,7 +291,6 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { return (double) dist / count; } - }, MINKOWSKI { @Override @@ -328,10 +323,8 @@ public abstract class Cdist extends RExternalBuiltinNode.Arg4 { } return Math.pow(dist, 1.0 / p); } - }; public abstract double dist(double[] x, int nr, int nc, int i1, int i2, double p); } - } diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/ToolsText.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/ToolsText.java index 76547e37fbfde8ce7e17909e5f2b7b5930ef8c5b..07b4e918d890c597ae8e702e89bf52060b846625 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/ToolsText.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/ToolsText.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2015, 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. */ @@ -100,7 +100,6 @@ public class ToolsText { RError.warning(this, RError.Message.GENERIC, "IO error during file append"); // shouldn't happen, just continue with false result } - } } catch (IOException ex) { // just return logical false diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/CountFields.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/CountFields.java index d42310206f651776710b9f9c9bb05d038a5c0f37..3e898dc731637e138cbf18255152c20d5e0dc14b 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/CountFields.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/CountFields.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -150,7 +150,6 @@ public final class CountFields extends RExternalBuiltinNode { } nfields++; } - } } /* diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/ObjectSize.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/ObjectSize.java index 60567136c8c3cc2fd5abd7cb9e596a6ada0d9145..46b2c62146024cecb24ae79e2fd6c4269a0fd4a0 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/ObjectSize.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/ObjectSize.java @@ -47,7 +47,6 @@ public abstract class ObjectSize extends RExternalBuiltinNode.Arg1 { return false; } } - } private static final MyIgnoreObjectHandler ignoreObjectHandler = new MyIgnoreObjectHandler(); diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprof.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprof.java index c33cfab250c8d98a67b346e54b0f9fd39618e499..d852a9982c7d0af34acb3e6ab11b8b7b678b276b 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprof.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprof.java @@ -136,7 +136,6 @@ public abstract class Rprof extends RExternalBuiltinNode.Arg8 implements RDataFa } else { profState.memoryQuad.nodes += size; } - } @Override @@ -180,7 +179,6 @@ public abstract class Rprof extends RExternalBuiltinNode.Arg8 implements RDataFa } } } - } /** @@ -236,7 +234,6 @@ public abstract class Rprof extends RExternalBuiltinNode.Arg8 implements RDataFa } return null; } - }); } @@ -247,7 +244,6 @@ public abstract class Rprof extends RExternalBuiltinNode.Arg8 implements RDataFa @Override public void onReturnExceptional(EventContext context, VirtualFrame frame, Throwable exception) { } - } /** @@ -356,8 +352,6 @@ public abstract class Rprof extends RExternalBuiltinNode.Arg8 implements RDataFa RDataFactory.setTracingState(false); MemoryCopyTracer.setTracingState(false); } - } - } } diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprofmem.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprofmem.java index 79c09d66f2df8b13e7fb76e00ec680c307119cf9..e96b554c9dca7fd74c1add7b9f09ccdd29569959 100644 --- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprofmem.java +++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Rprofmem.java @@ -102,7 +102,6 @@ public abstract class Rprofmem extends RExternalBuiltinNode.Arg3 implements RDat } } } - } static final RObjectSize.IgnoreObjectHandler myIgnoreObjectHandler = new MyIgnoreObjectHandler(); @@ -139,7 +138,6 @@ public abstract class Rprofmem extends RExternalBuiltinNode.Arg3 implements RDat profmemState.pageCount = (int) pcs; } } - } private static final class RprofmemState extends RprofState { @@ -166,5 +164,4 @@ public abstract class Rprofmem extends RExternalBuiltinNode.Arg3 implements RDat closeAndResetOut(); } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/RBuiltinPackage.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/RBuiltinPackage.java index 5f4f34202f86871f0219335628e97acf8c9752f6..980ba240c7bf383fc3686e52e2830f07cbc5e08d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/RBuiltinPackage.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/RBuiltinPackage.java @@ -145,7 +145,8 @@ public abstract class RBuiltinPackage { } } - protected void add(Class<?> builtinClass, Supplier<RBuiltinNode> constructor) { + protected void add(Class<?> builtinClass, + Supplier<RBuiltinNode> constructor) { add(builtinClass, constructor, null); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Abbrev.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Abbrev.java index 66b265248d07db9cba90963185681d91f64c38a3..33c348630cebdb9a158e215880926a1f16ac676d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Abbrev.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Abbrev.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (c) 1997-2014, The R Core Team - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -170,5 +170,4 @@ public abstract class Abbrev extends RBuiltinNode { } return s.toString(); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/All.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/All.java index dc1fe548ee4c845ec196c1ff1aa6e2df4984beb5..6f117ef49d84ed3c124eeef424b548f20537a0b1 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/All.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/All.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 @@ -43,5 +43,4 @@ public abstract class All extends Quantifier { protected byte op(Object vector, Object naRm) { throw RInternalError.shouldNotReachHere(); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Any.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Any.java index f610412b15a1c8140ad32c72e0dc76ada9620630..7cf2116f10e4ea11bd8f28a7e47d51d0e6d35bb4 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Any.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Any.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 @@ -43,5 +43,4 @@ public abstract class Any extends Quantifier { protected byte op(Object vector, Object naRm) { throw RInternalError.shouldNotReachHere(); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsCharacter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsCharacter.java index 0647798f20c5882e87ec5eae7de86e27c288b717..04ca61957f575f005bc3c24ecad9ee162543fbae 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsCharacter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsCharacter.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 @@ -85,5 +85,4 @@ public abstract class AsCharacter extends RBuiltinNode { } return RDataFactory.createStringVector(data, complete); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsComplex.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsComplex.java index d62792b3b69f6136611edd494fd1b510a695db74..814a0ec2350ab367521531643647bade7e4a1565 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsComplex.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsComplex.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 @@ -58,5 +58,4 @@ public abstract class AsComplex extends RBuiltinNode { return (RAbstractComplexVector) v.copyDropAttributes(); } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Assign.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Assign.java index 412402d336550b872d7d1cb4fd363d4d94d6ce38..658e91d839ae71f6f2fee68f0009df72913f1ff8 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Assign.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Assign.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 @@ -106,7 +106,7 @@ public abstract class Assign extends RBuiltinNode { * The general case that requires searching the environment hierarchy. */ @Specialization - protected Object assign(RAbstractStringVector xVec, Object value, REnvironment envir, byte inherits, // + protected Object assign(RAbstractStringVector xVec, Object value, REnvironment envir, byte inherits, @Cached("createBinaryProfile()") ConditionProfile inheritsProfile, @Cached("create()") ShareObjectNode share) { String x = checkVariable(xVec); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Attributes.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Attributes.java index 41a244f231512aea273734c48b29acbdf8bb28d7..31586b70dfd4794b64d3ff8f98dfcba869811b6f 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Attributes.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Attributes.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 @@ -57,7 +57,7 @@ public abstract class Attributes extends RBuiltinNode { @Child private SetNamesAttributeNode setNamesNode = SetNamesAttributeNode.create(); @Specialization - protected Object attributesNull(RAbstractContainer container, // + protected Object attributesNull(RAbstractContainer container, @Cached("createBinaryProfile()") ConditionProfile hasAttributesProfile) { if (hasAttributesProfile.profile(hasAttributes(container))) { return createResult(container, container instanceof RLanguage); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BaseGammaFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BaseGammaFunctions.java index 40a318d36f2fc26c6e474ee32c1775c8a8e6f465..576d36eda1da32515b1562e92e8ab3cef8bb72f1 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BaseGammaFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BaseGammaFunctions.java @@ -99,7 +99,6 @@ public class BaseGammaFunctions { protected RDoubleVector lgamma(RAbstractLogicalVector x) { return lgamma(RClosures.createLogicalToDoubleVector(x)); } - } @RBuiltin(name = "digamma", kind = PRIMITIVE, parameterNames = {"x"}, dispatch = MATH_GROUP_GENERIC, behavior = PURE) @@ -156,7 +155,6 @@ public class BaseGammaFunctions { protected RDoubleVector digamma(RAbstractLogicalVector x) { return digamma(RClosures.createLogicalToDoubleVector(x)); } - } @NodeChildren({@NodeChild(value = "x"), @NodeChild(value = "n"), @NodeChild(value = "kode"), @NodeChild(value = "ans")}) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java index ec5dd5de2709877c968124a144661283dd242ce7..dd7550312ed07f7cb873a2a063c00a9b7704cb5d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java @@ -244,7 +244,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == LOGICAL_PRECEDENCE", "args.length > 1", "!isDataFrame(args)"}) - protected Object allLogical(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allLogical(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastLogicalNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -254,7 +254,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == INT_PRECEDENCE", "args.length > 1", "!isDataFrame(args)"}) - protected Object allInt(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allInt(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastIntegerNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -264,7 +264,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == DOUBLE_PRECEDENCE", "args.length > 1", "!isDataFrame(args)"}) - protected Object allDouble(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allDouble(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastDoubleNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -274,7 +274,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == STRING_PRECEDENCE", "args.length> 1", "!isDataFrame(args)"}) - protected Object allString(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allString(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastStringNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -284,7 +284,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == COMPLEX_PRECEDENCE", "args.length > 1", "!isDataFrame(args)"}) - protected Object allComplex(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allComplex(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastComplexNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -294,7 +294,7 @@ public abstract class Bind extends RBaseNode { } @Specialization(guards = {"precedence == LIST_PRECEDENCE", "args.length > 1", "!isDataFrame(args)"}) - protected Object allList(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, // + protected Object allList(int deparseLevel, Object[] args, RArgsValuesAndNames promiseArgs, @SuppressWarnings("unused") int precedence, @Cached("create()") CastListNode cast, @Cached("create()") SetDimAttributeNode setDimNode, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode, @@ -578,7 +578,6 @@ public abstract class Bind extends RBaseNode { } } } - } Object colDimResultNames = allColDimNamesNull ? RNull.instance : RDataFactory.createStringVector(colDimNamesArray, vecNamesComplete); setDimNode.setDimensions(result, resultDimensions); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BitwiseFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BitwiseFunctions.java index 91ae3bcef8477a3601a7730d84f3fb443f90213a..ae96659c840be4306e46f65b4fa4b2e01beabf9e 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BitwiseFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BitwiseFunctions.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2015, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -141,7 +141,6 @@ public class BitwiseFunctions { protected Function<Object, String> getArgType() { return x -> typeofA.execute(x).getName(); } - } @RBuiltin(name = "bitwiseAnd", kind = INTERNAL, parameterNames = {"a", "b"}, behavior = PURE) @@ -163,7 +162,6 @@ public class BitwiseFunctions { protected Object differentTypes(Object a, Object b) { throw RError.error(this, RError.Message.SAME_TYPE, "a", "b"); } - } @RBuiltin(name = "bitwiseOr", kind = INTERNAL, parameterNames = {"a", "b"}, behavior = PURE) @@ -233,7 +231,6 @@ public class BitwiseFunctions { protected Object bitwShiftRChar(RAbstractIntVector a, RAbstractStringVector n) { return makeNA(a.getLength()); } - } @RBuiltin(name = "bitwiseShiftL", kind = INTERNAL, parameterNames = {"a", "n"}, behavior = PURE) @@ -263,7 +260,6 @@ public class BitwiseFunctions { protected Object bitwShiftLChar(RAbstractVector a, RAbstractStringVector n) { return makeNA(a.getLength()); } - } @RBuiltin(name = "bitwiseNot", kind = INTERNAL, parameterNames = {"a"}, behavior = PURE) @@ -278,6 +274,5 @@ public class BitwiseFunctions { protected Object bitwNot(RAbstractIntVector a) { return bitNot(a); } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BrowserFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BrowserFunctions.java index 5c37669fc64c35f1e3976bb620341e7f679bef1d..207e01ce5d4a49d0fd63ce567e2f5e3e000d2ee4 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BrowserFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BrowserFunctions.java @@ -124,7 +124,6 @@ public class BrowserFunctions { protected Object browserText(int n) { return getHelperState(n).text; } - } @RBuiltin(name = "browserCondition", kind = INTERNAL, parameterNames = {"n"}, behavior = COMPLEX) @@ -135,7 +134,6 @@ public class BrowserFunctions { protected Object browserCondition(int n) { return getHelperState(n).condition; } - } @RBuiltin(name = "browserSetDebug", visibility = OFF, kind = INTERNAL, parameterNames = {"n"}, behavior = COMPLEX) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java index 740b2ba9ea94321533f8f0f327224332b327b894..109ddc233bd053d03bc66ec90a3f0fc9d9e0e74b 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Capabilities.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 @@ -72,7 +72,6 @@ public abstract class Capabilities extends RBuiltinNode { } return result; } - } private static final RStringVector NAMES = RDataFactory.createStringVector(Capability.rNames(), RDataFactory.COMPLETE_VECTOR); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Ceiling.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Ceiling.java index 01b231cd43e0799039db08895c8497ea620e2a0a..fe31a7244f53d9a75ca0c110079125ba326e33e9 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Ceiling.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Ceiling.java @@ -81,5 +81,4 @@ public abstract class Ceiling extends UnaryArithmeticBuiltinNode { public Object calculateUnboxed(Object op) { return super.calculateUnboxed(op); } - } 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 021f7bd900f511ce9c80f6325cd099d980eaa572..4b2e9d8c1f0dcc97b08ce4e4c2b516602ae163f4 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 @@ -121,12 +121,12 @@ public abstract class Combine extends RBuiltinNode { } @Specialization(contains = "combineSimple", limit = "1", guards = {"!recursive", "args.getSignature() == cachedSignature", "cachedPrecedence == precedence(args, cachedSignature.getLength())"}) - protected Object combineCached(RArgsValuesAndNames args, @SuppressWarnings("unused") boolean recursive, // - @Cached("args.getSignature()") ArgumentsSignature cachedSignature, // - @Cached("precedence( args, cachedSignature.getLength())") int cachedPrecedence, // - @Cached("createCast(cachedPrecedence)") CastNode cast, // - @Cached("create()") BranchProfile naNameBranch, // - @Cached("create()") NACheck naNameCheck, // + protected Object combineCached(RArgsValuesAndNames args, @SuppressWarnings("unused") boolean recursive, + @Cached("args.getSignature()") ArgumentsSignature cachedSignature, + @Cached("precedence( args, cachedSignature.getLength())") int cachedPrecedence, + @Cached("createCast(cachedPrecedence)") CastNode cast, + @Cached("create()") BranchProfile naNameBranch, + @Cached("create()") NACheck naNameCheck, @Cached("createBinaryProfile()") ConditionProfile hasNamesProfile, @Cached("create()") GetNamesAttributeNode getNamesNode) { CompilerAsserts.partialEvaluationConstant(cachedSignature); @@ -156,11 +156,11 @@ public abstract class Combine extends RBuiltinNode { @TruffleBoundary @Specialization(limit = "COMBINE_CACHED_LIMIT", contains = "combineCached", guards = {"!recursive", "cachedPrecedence == precedence(args)"}) - protected Object combine(RArgsValuesAndNames args, @SuppressWarnings("unused") boolean recursive, // - @Cached("precedence(args, args.getLength())") int cachedPrecedence, // - @Cached("createCast(cachedPrecedence)") CastNode cast, // - @Cached("create()") BranchProfile naNameBranch, // - @Cached("create()") NACheck naNameCheck, // + protected Object combine(RArgsValuesAndNames args, @SuppressWarnings("unused") boolean recursive, + @Cached("precedence(args, args.getLength())") int cachedPrecedence, + @Cached("createCast(cachedPrecedence)") CastNode cast, + @Cached("create()") BranchProfile naNameBranch, + @Cached("create()") NACheck naNameCheck, @Cached("createBinaryProfile()") ConditionProfile hasNamesProfile, @Cached("create()") GetNamesAttributeNode getNamesNode) { return combineCached(args, false, args.getSignature(), cachedPrecedence, cast, naNameBranch, naNameCheck, hasNamesProfile, getNamesNode); @@ -168,7 +168,7 @@ public abstract class Combine extends RBuiltinNode { @Specialization(guards = "recursive") protected Object combineRecursive(RArgsValuesAndNames args, @SuppressWarnings("unused") boolean recursive, - @Cached("create()") Combine recursiveCombine, // + @Cached("create()") Combine recursiveCombine, @Cached("createBinaryProfile()") ConditionProfile useNewArgsProfile) { return combineRecursive(args, recursiveCombine, useNewArgsProfile); } @@ -473,8 +473,8 @@ public abstract class Combine extends RBuiltinNode { } @Specialization(guards = "needsCopy(vector)") - protected RAbstractVector noCopy(RAbstractVector vector, // - @Cached("createBinaryProfile()") ConditionProfile hasNamesProfile, // + protected RAbstractVector noCopy(RAbstractVector vector, + @Cached("createBinaryProfile()") ConditionProfile hasNamesProfile, @Cached("createBinaryProfile()") ConditionProfile hasDimNamesProfile) { RVector<?> materialized = vector.materialize(); RVector<?> result = materialized.copyDropAttributes(); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CompileFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CompileFunctions.java index 81f98d696d9c836f6365d9e5c56163c0284a7718..fd951173e3a2144253f774b7499ef39acffe8451 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CompileFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CompileFunctions.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 @@ -60,6 +60,5 @@ public class CompileFunctions { protected byte enableJIT(@SuppressWarnings("unused") int level) { return 0; } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConditionFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConditionFunctions.java index 14d191a2e99094dd2e9296e8e1f546ed7a5c982d..d9d86038cfa8c8d85b183a42bf9458079eb4bac6 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConditionFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConditionFunctions.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2015, 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. */ @@ -119,7 +119,6 @@ public class ConditionFunctions { protected void restart(CastBuilder casts) { casts.arg("restart").mustBe(instanceOf(RList.class), RError.Message.BAD_RESTART); } - } @RBuiltin(name = ".addRestart", kind = INTERNAL, parameterNames = "restart", behavior = COMPLEX) @@ -147,7 +146,6 @@ public class ConditionFunctions { RErrorHandling.addRestart(restart); return RNull.instance; } - } @RBuiltin(name = ".getRestart", kind = INTERNAL, parameterNames = "restart", behavior = COMPLEX) @@ -181,7 +179,6 @@ public class ConditionFunctions { return RNull.instance; // not reached } } - } @RBuiltin(name = ".signalCondition", kind = INTERNAL, parameterNames = {"condition", "msg", "call"}, behavior = COMPLEX) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java index 3f7d79a652b56f7e1e3917f31e5d819a040d586d..ef10df7ffd66c8a41fd13f2d209b6586391cca38 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ConnectionFunctions.java @@ -222,7 +222,6 @@ public abstract class ConnectionFunctions { throw RError.error(this, RError.Message.CANNOT_OPEN_CONNECTION); } } - } /* @@ -266,7 +265,6 @@ public abstract class ConnectionFunctions { protected GZFile() { super(RCompression.Type.GZIP); } - } @RBuiltin(name = "bzfile", kind = INTERNAL, parameterNames = {"description", "open", "encoding", "compression"}, behavior = IO) @@ -274,7 +272,6 @@ public abstract class ConnectionFunctions { protected BZFile() { super(RCompression.Type.BZIP2); } - } @RBuiltin(name = "xzfile", kind = INTERNAL, parameterNames = {"description", "open", "encoding", "compression"}, behavior = IO) @@ -282,7 +279,6 @@ public abstract class ConnectionFunctions { protected XZFile() { super(RCompression.Type.XZ); } - } @RBuiltin(name = "textConnection", kind = INTERNAL, parameterNames = {"description", "text", "open", "env", "encoding"}, behavior = IO) @@ -330,7 +326,6 @@ public abstract class ConnectionFunctions { throw RInternalError.shouldNotReachHere(); } } - } @RBuiltin(name = "textConnectionValue", kind = INTERNAL, parameterNames = {"con"}, behavior = IO) @@ -461,7 +456,6 @@ public abstract class ConnectionFunctions { } return RNull.instance; } - } @RBuiltin(name = "isOpen", kind = INTERNAL, parameterNames = {"con", "rw"}, behavior = IO) @@ -491,7 +485,6 @@ public abstract class ConnectionFunctions { } return RDataFactory.createLogicalVectorFromScalar(result); } - } @RBuiltin(name = "close", visibility = OFF, kind = INTERNAL, parameterNames = {"con", "type"}, behavior = IO) @@ -542,7 +535,6 @@ public abstract class ConnectionFunctions { throw RError.error(this, RError.Message.ERROR_READING_CONNECTION, x.getMessage()); } } - } @RBuiltin(name = "writeLines", visibility = OFF, kind = INTERNAL, parameterNames = {"text", "con", "sep", "useBytes"}, behavior = IO) @@ -565,7 +557,6 @@ public abstract class ConnectionFunctions { } return RNull.instance; } - } @RBuiltin(name = "flush", visibility = OFF, kind = INTERNAL, parameterNames = {"con"}, behavior = IO) @@ -604,7 +595,6 @@ public abstract class ConnectionFunctions { RConnection.fromIndex(connection).pushBack(data, newLine); return RNull.instance; } - } @RBuiltin(name = "pushBackLength", kind = INTERNAL, parameterNames = {"con"}, behavior = IO) @@ -618,7 +608,6 @@ public abstract class ConnectionFunctions { protected int pushBackLength(int connection) { return RConnection.fromIndex(connection).pushBackLength(); } - } @RBuiltin(name = "clearPushBack", visibility = OFF, kind = INTERNAL, parameterNames = {"con"}, behavior = IO) @@ -634,7 +623,6 @@ public abstract class ConnectionFunctions { RConnection.fromIndex(connection).pushBackClear(); return RNull.instance; } - } @RBuiltin(name = "readChar", kind = INTERNAL, parameterNames = {"con", "nchars", "useBytes"}, behavior = IO) @@ -670,7 +658,6 @@ public abstract class ConnectionFunctions { boolean ncharsEmpty(RAbstractIntVector nchars) { return nchars.getLength() == 0; } - } @RBuiltin(name = "writeChar", visibility = OFF, kind = INTERNAL, parameterNames = {"object", "con", "nchars", "sep", "useBytes"}, behavior = IO) @@ -1011,7 +998,6 @@ public abstract class ConnectionFunctions { } return buffer; } - } @RBuiltin(name = "writeBin", visibility = OFF, kind = INTERNAL, parameterNames = {"object", "con", "size", "swap", "useBytes"}, behavior = IO) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMax.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMax.java index 58cf95204c494529cf4eaff9eeb2710b2657b99c..e4361df035ecd435a63193cbddd67d85b9267624 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMax.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMax.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -67,7 +67,7 @@ public abstract class CumMax extends RBuiltinNode { } @Specialization - protected RAbstractIntVector cummaxIntSequence(RIntSequence v, // + protected RAbstractIntVector cummaxIntSequence(RIntSequence v, @Cached("createBinaryProfile()") ConditionProfile negativeStrideProfile) { if (negativeStrideProfile.profile(v.getStride() < 0)) { // all numbers are smaller than the first one @@ -120,5 +120,4 @@ public abstract class CumMax extends RBuiltinNode { } return RDataFactory.createIntVector(cmaxV, na.neverSeenNA(), getNamesNode.getNames(v)); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMin.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMin.java index b99ad15b12cf41a05b9bb5278ef605be97215766..dc49c6a1ce40cb1692295e40e83d66b0fab90fa1 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMin.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CumMin.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -67,7 +67,7 @@ public abstract class CumMin extends RBuiltinNode { } @Specialization - protected RAbstractIntVector cumminIntSequence(RIntSequence v, // + protected RAbstractIntVector cumminIntSequence(RIntSequence v, @Cached("createBinaryProfile()") ConditionProfile negativeStrideProfile) { if (negativeStrideProfile.profile(v.getStride() > 0)) { // all numbers are bigger than the first one @@ -120,5 +120,4 @@ public abstract class CumMin extends RBuiltinNode { } return RDataFactory.createIntVector(cminV, na.neverSeenNA(), getNamesNode.getNames(v)); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Dim.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Dim.java index 95cb519bd8e14fe633c8a23426a03118a603379e..f9af807d25e52c27151f9c6437185a71c28e7762 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Dim.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Dim.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 @@ -40,7 +40,7 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractContainer; public abstract class Dim extends RBuiltinNode { @Specialization - protected Object dim(RAbstractContainer container, // + protected Object dim(RAbstractContainer container, @Cached("createBinaryProfile()") ConditionProfile hasDimensionsProfile, @Cached("create()") GetDimAttributeNode getDimsNode) { int[] dims = getDimsNode.getDimensions(container); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DuplicatedFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DuplicatedFunctions.java index 24acef240f44bff271e3b80a8e4bcb1df53537db..d137a43dd3201dd02b3b54b718642402b75f0997 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DuplicatedFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DuplicatedFunctions.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -164,6 +164,5 @@ public class DuplicatedFunctions { protected int anyDuplicatedEmpty(RAbstractVector x, Object incomparables, byte fromLast) { return 0; } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DynLoadFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DynLoadFunctions.java index 943bd6ee74737e7f78df1db20db0fa42b51ab274..2d29673449b4527b3914687f694f5e2e6c106058 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DynLoadFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DynLoadFunctions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -83,7 +83,6 @@ public class DynLoadFunctions { throw RInternalError.shouldNotReachHere(ex); } } - } @RBuiltin(name = "dyn.unload", visibility = OFF, kind = INTERNAL, parameterNames = {"lib"}, behavior = COMPLEX) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EncodingFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EncodingFunctions.java index 410c597fc5bdaea06780415692fa3abe648417c1..9e6d68c9d4c68752bb3aefbe97a02b8b438172a1 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EncodingFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EncodingFunctions.java @@ -50,7 +50,6 @@ public class EncodingFunctions { // TODO implement properly return RDataFactory.createStringVectorFromScalar("unknown"); } - } @RBuiltin(name = "setEncoding", kind = INTERNAL, parameterNames = {"x", "value"}, behavior = PURE) @@ -68,6 +67,5 @@ public class EncodingFunctions { // TODO implement properly return x; } - } } 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 492de2059bebd686ce332451bbdd290ddbe774ce..6a540311a1dd7103cf6c560e2664cfd535a3f193 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 @@ -169,7 +169,7 @@ public class EnvFunctions { } @Specialization - protected REnvironment asEnvironment(RList list, // + protected REnvironment asEnvironment(RList list, @Cached("new()") RList2EnvNode list2Env) { REnvironment env = RDataFactory.createNewEnv(null); env.setParent(REnvironment.emptyEnv()); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java index e6194ce93d9c6568b63a2b4d8fd126805d4eb31f..3dd5c7dd8d9a6158a069930370f5d63a5afbce2d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -214,7 +214,6 @@ public class FileFunctions { return false; } } - } } @@ -249,7 +248,6 @@ public class FileFunctions { } return RDataFactory.createLogicalVector(status, RDataFactory.COMPLETE_VECTOR); } - } @RBuiltin(name = "file.info", kind = INTERNAL, parameterNames = {"fn", "extra_cols"}, behavior = IO) @@ -474,7 +472,6 @@ public class FileFunctions { protected Object doFileLink(RAbstractStringVector vecFrom, RAbstractStringVector vecTo) { return doFileLink(vecFrom, vecTo, false); } - } @RBuiltin(name = "file.symlink", kind = INTERNAL, parameterNames = {"from", "to"}, behavior = IO) @@ -484,7 +481,6 @@ public class FileFunctions { protected Object doFileSymLink(RAbstractStringVector vecFrom, RAbstractStringVector vecTo) { return doFileLink(vecFrom, vecTo, true); } - } @RBuiltin(name = "file.remove", kind = INTERNAL, parameterNames = {"file"}, behavior = IO) @@ -514,7 +510,6 @@ public class FileFunctions { } return RDataFactory.createLogicalVector(status, RDataFactory.COMPLETE_VECTOR); } - } @RBuiltin(name = "file.rename", kind = INTERNAL, parameterNames = {"from", "to"}, behavior = IO) @@ -550,7 +545,6 @@ public class FileFunctions { } return RDataFactory.createLogicalVector(status, RDataFactory.COMPLETE_VECTOR); } - } @RBuiltin(name = "file.exists", kind = INTERNAL, parameterNames = {"file"}, behavior = IO) @@ -577,7 +571,6 @@ public class FileFunctions { } return RDataFactory.createLogicalVector(status, RDataFactory.COMPLETE_VECTOR); } - } // TODO Implement all the options @@ -687,7 +680,6 @@ public class FileFunctions { Arrays.sort(data); return RDataFactory.createStringVector(data, RDataFactory.COMPLETE_VECTOR); } - } private boolean check(boolean value, String argName) { @@ -855,7 +847,6 @@ public class FileFunctions { if (j != inputs.length - 1) { path += fsep; } - } result[i] = path; } @@ -1177,9 +1168,7 @@ public class FileFunctions { } catch (IOException ex) { return 0; } - } - } @RBuiltin(name = "dir.create", visibility = OFF, kind = INTERNAL, parameterNames = {"path", "showWarnings", "recursive", "mode"}, behavior = IO) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Floor.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Floor.java index e40d8ffd95367b1cd3606e71ef53f9382000f888..ad9d29a490270da298dbea69223320e3d80f820c 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Floor.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Floor.java @@ -81,5 +81,4 @@ public abstract class Floor extends UnaryArithmeticBuiltinNode { public Object calculateUnboxed(Object op) { return super.calculateUnboxed(op); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ForceAndCall.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ForceAndCall.java index 3c588edb416a69990413180f5622ba22918e58d1..6c887d5b429a4b99aa93b88879760ea4404a9e99 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ForceAndCall.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ForceAndCall.java @@ -62,7 +62,7 @@ public abstract class ForceAndCall extends RBuiltinNode { } @Specialization(guards = "cachedN == n") - protected Object forceAndCall(VirtualFrame frame, @SuppressWarnings("unused") int n, RFunction fun, RArgsValuesAndNames args, // + protected Object forceAndCall(VirtualFrame frame, @SuppressWarnings("unused") int n, RFunction fun, RArgsValuesAndNames args, @Cached("n") int cachedN) { if (!fun.isBuiltin()) { flattenFirstArgs(frame, cachedN, args); @@ -106,5 +106,4 @@ public abstract class ForceAndCall extends RBuiltinNode { CompilerDirectives.transferToInterpreter(); throw RError.nyi(this, "generic case of forceAndCall"); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Formals.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Formals.java index 13749fcbc3c370ec9bc8d607a079f77c1ce63b23..bf66ca987b5084ad4646e9f6be7c9696d80d838c 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Formals.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Formals.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -45,8 +45,8 @@ public abstract class Formals extends RBuiltinNode { @SuppressWarnings("unused") @Specialization(limit = "3", guards = "fun == cachedFunction") - protected Object formalsCached(RFunction fun, // - @Cached("fun") RFunction cachedFunction, // + protected Object formalsCached(RFunction fun, + @Cached("fun") RFunction cachedFunction, @Cached("createFormals(fun)") Object formals) { return formals; } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java index a25872ef517840128479cdda2e2a640b2b183c2c..1414d6169950dbcc6fcf4148756d5b2b9f01a609 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -335,7 +335,6 @@ public class FrameFunctions { nodes.add(ConstantNode.create(head)); names.add(ArgumentsSignature.VARARG_NAME); } - } else if (arg instanceof PromiseNode) { nodes.add(((PromiseNode) arg).getPromiseExpr().asRNode()); names.add(sig.getName(i)); @@ -678,7 +677,7 @@ public class FrameFunctions { } @Specialization(guards = "n == 1") - protected REnvironment parentFrameDirect(VirtualFrame frame, @SuppressWarnings("unused") int n, // + protected REnvironment parentFrameDirect(VirtualFrame frame, @SuppressWarnings("unused") int n, @Cached("new()") GetCallerFrameNode getCaller) { return REnvironment.frameToEnvironment(getCaller.execute(frame)); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GetOldClass.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GetOldClass.java index b0820a927cc0fa1444fc16fa9b14ff258fe5f274..26ce406f1cf720e2da49ce66c5a1b3db8d5ff58d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GetOldClass.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GetOldClass.java @@ -26,7 +26,6 @@ import static com.oracle.truffle.r.runtime.builtins.RBehavior.PURE; import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE; import com.oracle.truffle.api.dsl.Specialization; -import com.oracle.truffle.api.nodes.Node.Child; import com.oracle.truffle.api.profiles.ConditionProfile; import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetClassAttributeNode; import com.oracle.truffle.r.nodes.builtin.RBuiltinNode; diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GrepFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GrepFunctions.java index 5685606cb72602bd367f07eabb12b1666c1514e0..762279f9518609c0750dd83411679b2fc07e79a3 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GrepFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/GrepFunctions.java @@ -210,7 +210,6 @@ public class GrepFunctions { } return pcre; } - } private abstract static class GrepAdapter extends CommonCodeAdapter { @@ -593,7 +592,6 @@ public class GrepFunctions { char c = input.charAt(i); sb.append(upper ? Character.toUpperCase(c) : (lower ? Character.toLowerCase(c) : c)); } - } else if (p1 == 'U') { upper = true; lower = false; @@ -1016,7 +1014,6 @@ public class GrepFunctions { assert firstInfo.captureNames.length > 0; return RDataFactory.createStringVector(firstInfo.captureNames, RDataFactory.COMPLETE_VECTOR); } - } @RBuiltin(name = "agrep", kind = INTERNAL, parameterNames = {"pattern", "x", "ignore.case", "value", "costs", "bounds", "useBytes", "fixed"}, behavior = PURE) @@ -1114,7 +1111,6 @@ public class GrepFunctions { d[i][j] = min3(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost); } - } // Step 7 diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java index 7d4077d857cbb8216a7206c87de87fb8ce63885c..c30b36ab7e5ad1f285953e338957c3fa5f2c1f79 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -175,7 +175,6 @@ public class HiddenInternalFunctions { } catch (PutException ex) { throw RError.error(RError.SHOW_CALLER, ex); } - } return RNull.instance; } @@ -466,5 +465,4 @@ public class HiddenInternalFunctions { return RNull.instance; } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsListFactor.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsListFactor.java index ef9753318c478405b2f7b1117a6d6228cbc0876f..f7e53501ecb610c53a12c010ad8830382a539cde 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsListFactor.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsListFactor.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2000--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. */ @@ -45,7 +45,7 @@ public abstract class IsListFactor extends RBuiltinNode { } @Specialization(guards = "list.getLength() > 0") - protected boolean islistfactor(RAbstractListVector list, // + protected boolean islistfactor(RAbstractListVector list, @Cached("new()") IsFactorNode isFactor) { for (int i = 0; i < list.getLength(); i++) { Object value = list.getDataAt(i); @@ -80,7 +80,7 @@ public abstract class IsListFactor extends RBuiltinNode { } @Specialization(guards = "recursive == node.recursive") - protected byte isListFactor(Object value, @SuppressWarnings("unused") boolean recursive, // + protected byte isListFactor(Object value, @SuppressWarnings("unused") boolean recursive, @Cached("createNode(recursive)") IsListFactorInternal node) { return RRuntime.asLogical(node.execute(value)); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsTypeFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsTypeFunctions.java index ad9e3470a938118b7d8915451fa77b59e7809d78..bc49575eb2215a6c18979df1bec75c80252e7d80 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsTypeFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/IsTypeFunctions.java @@ -79,7 +79,6 @@ public class IsTypeFunctions { protected void createCasts(CastBuilder casts) { casts.arg("x").conf(c -> c.allowNull().mustNotBeMissing(null, RError.Message.ARGUMENT_MISSING, "x")); } - } @RBuiltin(name = "is.array", kind = PRIMITIVE, parameterNames = {"x"}, behavior = PURE) 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 925244d81e1028df7ad0c3b3fdea4dd05f1ce0af..aa024693a6ee438863f54b6e80be180da114b66a 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 @@ -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 @@ -163,5 +163,4 @@ public abstract class IsUnsorted extends RBuiltinNode { protected byte isUnsortedFallback(Object x, Object strictly) { return RRuntime.LOGICAL_NA; } - } 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 bdc10f0d379636fd814581fb027a3a017528caf8..2ebe07c347d173b3b84bebf105e04f9266a82cdb 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 @@ -92,7 +92,6 @@ public class LaFunctions { casts.arg("matrix").asDoubleVector(false, true, false).mustBe(squareMatrix(), RError.Message.MUST_BE_SQUARE_NUMERIC, "x"); casts.arg("onlyValues").defaultError(RError.Message.INVALID_ARGUMENT, "only.values").asLogicalVector().findFirst().notNA().map(toBoolean()); } - } @RBuiltin(name = "La_rg", kind = INTERNAL, parameterNames = {"matrix", "onlyValues"}, behavior = PURE) @@ -189,7 +188,6 @@ public class LaFunctions { } return RDataFactory.createComplexVector(s, RDataFactory.COMPLETE_VECTOR, new int[]{n, n}); } - } @RBuiltin(name = "La_rs", kind = INTERNAL, parameterNames = {"matrix", "onlyValues"}, behavior = PURE) @@ -246,7 +244,6 @@ public class LaFunctions { return RDataFactory.createList(data, names); } - } @RBuiltin(name = "La_qr", kind = INTERNAL, parameterNames = {"in"}, behavior = PURE) @@ -649,6 +646,5 @@ public class LaFunctions { } return b; } - } } 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 4cd34ed9f441d06c369bdfc1c72c98880a2d1d24..3bbe0caf7929e2e63d4b019f2debab3356104eb5 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 @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -140,12 +140,12 @@ public abstract class Lapply extends RBuiltinNode { } @Specialization - protected Object[] cachedLApply(VirtualFrame frame, Object vector, RFunction function, // - @Cached("createIndexSlot(frame)") FrameSlot indexSlot, // - @Cached("createVectorSlot(frame)") FrameSlot vectorSlot, // - @Cached("create()") RLengthNode lengthNode, // - @Cached("createCountingProfile()") LoopConditionProfile loop, // - @Cached("createCallNode(vectorSlot, indexSlot)") RCallNode firstCallNode, // + protected Object[] cachedLApply(VirtualFrame frame, Object vector, RFunction function, + @Cached("createIndexSlot(frame)") FrameSlot indexSlot, + @Cached("createVectorSlot(frame)") FrameSlot vectorSlot, + @Cached("create()") RLengthNode lengthNode, + @Cached("createCountingProfile()") LoopConditionProfile loop, + @Cached("createCallNode(vectorSlot, indexSlot)") RCallNode firstCallNode, @Cached("createCallNode(vectorSlot, indexSlot)") RCallNode callNode) { // TODO: R switches to double if x.getLength() is greater than 2^31-1 frame.setObject(vectorSlot, vector); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lengths.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lengths.java index a798172fa77b927d988537a0fa02bb0658e63e6f..e8b4549af008e25a149ead00af1308ddcf1f608f 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lengths.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Lengths.java @@ -88,7 +88,7 @@ public abstract class Lengths extends RBuiltinNode { return createResult(xa, data, useNames); } - private RIntVector createResult(RAbstractVector x, int[] data, boolean useNames) { + private static RIntVector createResult(RAbstractVector x, int[] data, boolean useNames) { RIntVector result = RDataFactory.createIntVector(data, RDataFactory.COMPLETE_VECTOR); if (useNames) { copyNames(x, result); @@ -97,7 +97,7 @@ public abstract class Lengths extends RBuiltinNode { } @TruffleBoundary - private void copyNames(RAbstractVector x, RIntVector result) { + private static void copyNames(RAbstractVector x, RIntVector result) { result.copyNamesFrom(x); } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ListBuiltin.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ListBuiltin.java index 5f79770abc4bab1dd4eb45e30e926df69022f24c..2d945ceecfa1af3c142ced1274a1f83b73471621 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ListBuiltin.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ListBuiltin.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 @@ -82,14 +82,14 @@ public abstract class ListBuiltin extends RBuiltinNode { * This specialization unrolls the loop that shares the list elements, uses a different * {@link ShareObjectNode} for each element, and keeps a cached version of the name vector. */ - @Specialization(limit = "CACHE_LIMIT", guards = {"!args.isEmpty()", // - "args.getLength() <= MAX_SHARE_OBJECT_NODES", // - "cachedLength == args.getLength()", // + @Specialization(limit = "CACHE_LIMIT", guards = {"!args.isEmpty()", + "args.getLength() <= MAX_SHARE_OBJECT_NODES", + "cachedLength == args.getLength()", "cachedSignature == args.getSignature()"}) @ExplodeLoop - protected RList listCached(RArgsValuesAndNames args, // - @Cached("args.getLength()") int cachedLength, // - @SuppressWarnings("unused") @Cached("args.getSignature()") ArgumentsSignature cachedSignature, // + protected RList listCached(RArgsValuesAndNames args, + @Cached("args.getLength()") int cachedLength, + @SuppressWarnings("unused") @Cached("args.getSignature()") ArgumentsSignature cachedSignature, @Cached("cachedArgNameVector(cachedSignature)") RStringVector cachedArgNames) { Object[] argArray = args.getArguments(); for (int i = 0; i < cachedLength; i++) { diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LoadSaveFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LoadSaveFunctions.java index 9aa2ec787c84e2c7ac48a950fa499c87d2526946..c607fbbbf5844b16a494cde7b44f4b1c77185f70 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LoadSaveFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LoadSaveFunctions.java @@ -149,7 +149,6 @@ public class LoadSaveFunctions { default: } - } catch (IOException ex) { throw RError.error(this, RError.Message.FILE_OPEN_ERROR); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeNames.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeNames.java index b4abbf0f4c72b779b3168498ab5d45867807016b..60c4ed1f56c3e6b0dcb6761445537868d2edd2b3 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeNames.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeNames.java @@ -171,5 +171,4 @@ public abstract class MakeNames extends RBuiltinNode { return newNames != null ? newNames : names; } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeUnique.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeUnique.java index d456c795fae43a462f4491e68ecb9fb00c51137f..ac65cdbbd8f45aad3086052a56b11873450e0926 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeUnique.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeUnique.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -98,5 +98,4 @@ public abstract class MakeUnique extends RBuiltinNode { private static String concat(String s1, String sep, int index) { return s1 + sep + index; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Mapply.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Mapply.java index 372547fa0f8364b32aa5a51ea702a98dcaeaae62..a71c27e486613d27c3e58d720bbf888a696ac62a 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Mapply.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Mapply.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 @@ -312,6 +312,5 @@ public abstract class Mapply extends RBuiltinNode { return true; } } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java index 2a8369465f6c1330f6da4b55e5c67a0dca713758..b950ea128f04fbab771e66aa9734749ec98aa9a0 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java @@ -149,7 +149,7 @@ public abstract class Match extends RBuiltinNode { } @Specialization - protected Object matchList(RAbstractListVector x, Object table, Object nomatchObj, Object incomparables, // + protected Object matchList(RAbstractListVector x, Object table, Object nomatchObj, Object incomparables, @Cached("create()") CastStringNode cast) { return matchRecursive(cast.execute(x), table, nomatchObj, incomparables); } @@ -333,9 +333,9 @@ public abstract class Match extends RBuiltinNode { } @Specialization(guards = "x.getLength() == 1") - protected int matchSizeOne(RAbstractStringVector x, RAbstractStringVector table, int nomatch, @SuppressWarnings("unused") Object incomparables, // - @Cached("create()") NAProfile naProfile, // - @Cached("create()") BranchProfile foundProfile, // + protected int matchSizeOne(RAbstractStringVector x, RAbstractStringVector table, int nomatch, @SuppressWarnings("unused") Object incomparables, + @Cached("create()") NAProfile naProfile, + @Cached("create()") BranchProfile foundProfile, @Cached("create()") BranchProfile notFoundProfile) { String element = x.getDataAt(0); int length = table.getLength(); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MatchFun.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MatchFun.java index a147ebce5d8d28ff9da96a6394e2b5b852ef2777..38db2c425fdbe62e2f9ba62b14e69ede7eb20b09 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MatchFun.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MatchFun.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 @@ -71,8 +71,8 @@ public abstract class MatchFun extends RBuiltinNode { } @Specialization - protected static RFunction matchFun(VirtualFrame frame, RPromise funPromise, boolean descend, // - @Cached("new()") PromiseHelperNode promiseHelper, // + protected static RFunction matchFun(VirtualFrame frame, RPromise funPromise, boolean descend, + @Cached("new()") PromiseHelperNode promiseHelper, @Cached("createInternal()") MatchFunInternal internal) { Object funValue = promiseHelper.evaluate(frame, funPromise); return internal.execute(frame, funPromise, funValue, descend); @@ -125,8 +125,8 @@ public abstract class MatchFun extends RBuiltinNode { @SuppressWarnings("unused") @Specialization(limit = "LIMIT", guards = {"funValue.getLength() == 1", "funValue.getDataAt(0) == cachedName"}) - protected RFunction matchfunCached(VirtualFrame frame, RPromise funPromise, RAbstractStringVector funValue, boolean descend, // - @Cached("firstString(funValue)") String cachedName, // + protected RFunction matchfunCached(VirtualFrame frame, RPromise funPromise, RAbstractStringVector funValue, boolean descend, + @Cached("firstString(funValue)") String cachedName, @Cached("createLookup(cachedName, descend)") ReadVariableNode lookup) { return checkResult(lookup.execute(frame, getCallerFrame.execute(frame))); } @@ -138,8 +138,8 @@ public abstract class MatchFun extends RBuiltinNode { @SuppressWarnings("unused") @Specialization(limit = "LIMIT", guards = {"funValue.getName() == cachedName"}) - protected RFunction matchfunCached(VirtualFrame frame, RPromise funPromise, RSymbol funValue, boolean descend, // - @Cached("firstString(funValue)") String cachedName, // + protected RFunction matchfunCached(VirtualFrame frame, RPromise funPromise, RSymbol funValue, boolean descend, + @Cached("firstString(funValue)") String cachedName, @Cached("createLookup(cachedName, descend)") ReadVariableNode lookup) { return checkResult(lookup.execute(frame, getCallerFrame.execute(frame))); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Max.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Max.java index 77bf214173a7afaccab6774615aa496602e993ac..87af6c78a00152a5ac0b6e01cb3841e8dc255ab2 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Max.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Max.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 @@ -64,7 +64,7 @@ public abstract class Max extends RBuiltinNode { } @Specialization(contains = "maxLengthOne") - protected Object max(RArgsValuesAndNames args, boolean naRm, // + protected Object max(RArgsValuesAndNames args, boolean naRm, @Cached("create()") Combine combine) { return reduce.executeReduce(combine.executeCombine(args, false), naRm, false); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Merge.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Merge.java index c9d99c5e7c2671b6946f99f8e3511332b497a13b..cef620df871e6e3f8e62b05bdd1356ff770671c6 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Merge.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Merge.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (c) 1997-2014, The R Core Team - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -204,5 +204,4 @@ public abstract class Merge extends RBuiltinNode { return ans; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Min.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Min.java index 3da49f67fdc8e361b2150ff9c6997523c2e23d20..bf7926db2930958723b940240d772d759d44ba22 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Min.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Min.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 @@ -64,7 +64,7 @@ public abstract class Min extends RBuiltinNode { } @Specialization(contains = "minLengthOne") - protected Object min(RArgsValuesAndNames args, boolean naRm, // + protected Object min(RArgsValuesAndNames args, boolean naRm, @Cached("create()") Combine combine) { return reduce.executeReduce(combine.executeCombine(args, false), naRm, false); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NormalizePath.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NormalizePath.java index 52cbff0ce02ceead8e3e77bc4bb77cd657abcbd7..528fb50198c01634224630cfb5e8082016abbdf5 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NormalizePath.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NormalizePath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -99,5 +99,4 @@ public abstract class NormalizePath extends RBuiltinNode { } return RDataFactory.createStringVector(results, RDataFactory.COMPLETE_VECTOR); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NumericalFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NumericalFunctions.java index 9b5e393999ebdab07cd19e2da0a9927019a8d669..887b5f16ddffcf1e00cbbf2c895078f4d0b2d013 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NumericalFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/NumericalFunctions.java @@ -53,7 +53,6 @@ public class NumericalFunctions { protected Object dummySpec(@SuppressWarnings("unused") Object value) { return null; } - } @RBuiltin(name = "abs", kind = PRIMITIVE, parameterNames = {"x"}, dispatch = MATH_GROUP_GENERIC, behavior = PURE) @@ -287,7 +286,6 @@ public class NumericalFunctions { public double op(double op) { return Math.signum(op); } - } @RBuiltin(name = "sqrt", kind = PRIMITIVE, parameterNames = {"x"}, dispatch = MATH_GROUP_GENERIC, behavior = PURE) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Order.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Order.java index 028e7514a3d3eab324507aa4970b4ec74008144a..1dde2ca238caaf365de383a0c59043638f1b6ea2 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Order.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Order.java @@ -6,7 +6,7 @@ * Copyright (c) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka * Copyright (c) 1995-2014, The R Core Team * Copyright (c) 2002-2008, The R Foundation - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -257,7 +257,7 @@ public abstract class Order extends RPrecedenceBuiltinNode { } @Specialization(guards = {"!oneVec(args)", "!noVec(args)"}) - Object orderMulti(byte naLast, boolean decreasing, RArgsValuesAndNames args, // + Object orderMulti(byte naLast, boolean decreasing, RArgsValuesAndNames args, @Cached("createEqualityProfile()") ValueProfile lengthProfile) { int n = preprocessVectors(args, lengthProfile); @@ -506,7 +506,6 @@ public abstract class Order extends RPrecedenceBuiltinNode { if (!((dv.getDataAt(a)) > dv.getDataAt(b) || (dv.getDataAt(a) == dv.getDataAt(b) && a > b))) { break; } - } indx[j] = indx[j - h]; j -= h; @@ -535,7 +534,6 @@ public abstract class Order extends RPrecedenceBuiltinNode { if (!((dv.getDataAt(a)) > dv.getDataAt(b) || (dv.getDataAt(a) == dv.getDataAt(b) && a > b))) { break; } - } indx[j] = indx[j - h]; j -= h; @@ -642,7 +640,6 @@ public abstract class Order extends RPrecedenceBuiltinNode { if (!(gt(dv.getDataAt(a), dv.getDataAt(b)) || (eq(dv.getDataAt(a), dv.getDataAt(b)) && a > b))) { break; } - } indx[j] = indx[j - h]; j -= h; diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PMinMax.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PMinMax.java index 53bd066f8ff61e7b5a911420132f70ebcf697357..3dc425ca9cd3f1eb88f88c50847d5825fdde8b06 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PMinMax.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PMinMax.java @@ -222,12 +222,12 @@ public abstract class PMinMax extends RBuiltinNode { } @Specialization(guards = {"isDoublePrecedence(args)", "args.getLength() ==2"}) - protected RDoubleVector pMinMaxTwoDouble(boolean naRm, RArgsValuesAndNames args, // - @Cached("create()") NACheck naCheckX, // - @Cached("create()") NACheck naCheckY, // - @Cached("create()") CastDoubleNode castX, // - @Cached("create()") CastDoubleNode castY, // - @Cached("create()") CastToVectorNode castVectorX, // + protected RDoubleVector pMinMaxTwoDouble(boolean naRm, RArgsValuesAndNames args, + @Cached("create()") NACheck naCheckX, + @Cached("create()") NACheck naCheckY, + @Cached("create()") CastDoubleNode castX, + @Cached("create()") CastDoubleNode castY, + @Cached("create()") CastToVectorNode castVectorX, @Cached("create()") CastToVectorNode castVectorY) { Object[] argValues = args.getArguments(); RAbstractDoubleVector x = (RAbstractDoubleVector) castVectorX.execute(castX.execute(argValues[0])); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Parse.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Parse.java index 07a3c5f15a5a4458d230723f3b594788c05983c8..4a39e005809dc00097c988d13570251dee949e7a 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Parse.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Parse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -242,7 +242,6 @@ public abstract class Parse extends RBuiltinNode { } else { throw RInternalError.unimplemented("attribute of type " + data.getClass().getSimpleName()); } - } setSrcRefAttrNode.execute(exprs, RDataFactory.createList(srcrefData)); int[] wholeSrcrefData = new int[8]; @@ -256,5 +255,4 @@ public abstract class Parse extends RBuiltinNode { setWholeSrcRefAttrNode.execute(exprs, RDataFactory.createIntVector(wholeSrcrefData, RDataFactory.COMPLETE_VECTOR)); setSrcFileAttrNode.execute(exprs, srcFile); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Pretty.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Pretty.java index d8ac15a131963e7966667b54bba76c137767ed6c..b1881322b5ec87bb91d8bdbf810a45cc9442b1bb 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Pretty.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Pretty.java @@ -208,5 +208,4 @@ public abstract class Pretty extends RBuiltinNode { } return unit; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PrintFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PrintFunctions.java index cd77e962271bf23188e42337d6689bed320e0e10..4e4786a07b180c8a30a8e3296b88cd642866b3df 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PrintFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/PrintFunctions.java @@ -90,7 +90,7 @@ public class PrintFunctions { } @Specialization(guards = "isS4(o)") - protected Object printDefaultS4(VirtualFrame frame, RTypedValue o, Object digits, boolean quote, Object naPrint, Object printGap, boolean right, Object max, boolean useSource, boolean noOpt, // + protected Object printDefaultS4(VirtualFrame frame, RTypedValue o, Object digits, boolean quote, Object naPrint, Object printGap, boolean right, Object max, boolean useSource, boolean noOpt, @Cached("createShowFunction(frame)") RFunction showFunction) { if (noOpt) { // S4 should only be called in case noOpt is true diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quantifier.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quantifier.java index 3ae66a186c491bf20a9f717c6112fa0e994037be..6836747194f314abaecbf45019de8a627b28371f 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quantifier.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quantifier.java @@ -110,7 +110,7 @@ public abstract class Quantifier extends RBuiltinNode { @Specialization(limit = "1", guards = {"cachedLength == args.getLength()", "cachedLength < MAX_CACHED_LENGTH"}) @ExplodeLoop - protected byte opCachedLength(RArgsValuesAndNames args, boolean naRm, // + protected byte opCachedLength(RArgsValuesAndNames args, boolean naRm, @Cached("args.getLength()") int cachedLength) { Object[] arguments = args.getArguments(); @@ -177,5 +177,4 @@ public abstract class Quantifier extends RBuiltinNode { falseBranch.enter(); return result; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quit.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quit.java index 588120597682c4a6fd8224d6b5f650b54672de76..30d73cb3be9603add4e504a2591c80907bbbffdc 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quit.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Quit.java @@ -73,5 +73,4 @@ public abstract class Quit extends RBuiltinNode { RCleanUp.cleanUp(ask, status, RRuntime.fromLogical(runLast)); throw RInternalError.shouldNotReachHere("cleanup returned"); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Range.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Range.java index 5c2486f07d81052ab6848c023ba071e89b6cfe56..1fc6d58be8307d0d84c261b89ca335991ebf43f5 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Range.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Range.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 @@ -80,7 +80,7 @@ public abstract class Range extends RBuiltinNode { } @Specialization(contains = "rangeLengthOne") - protected RVector<?> range(RArgsValuesAndNames args, boolean naRm, boolean finite, // + protected RVector<?> range(RArgsValuesAndNames args, boolean naRm, boolean finite, @Cached("create()") Combine combine) { Object combined = combine.executeCombine(args, false); Object min = minReduce.executeReduce(combined, naRm, finite); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RawFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RawFunctions.java index 7970afbc7987085077daa93ab3d8a498eb6d670a..3a5414d396c6ffa846dda211718eecbe2a92ac36 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RawFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RawFunctions.java @@ -70,7 +70,6 @@ public class RawFunctions { } return RDataFactory.createRawVector(data); } - } @RBuiltin(name = "rawToChar", kind = INTERNAL, parameterNames = {"x", "multiple"}, behavior = PURE) @@ -104,7 +103,6 @@ public class RawFunctions { } return result; } - } @RBuiltin(name = "rawShift", kind = INTERNAL, parameterNames = {"x", "n"}, behavior = PURE) @@ -116,7 +114,7 @@ public class RawFunctions { } @Specialization - protected RRawVector rawShift(RAbstractRawVector x, int n, // + protected RRawVector rawShift(RAbstractRawVector x, int n, @Cached("createBinaryProfile()") ConditionProfile negativeShiftProfile) { byte[] data = new byte[x.getLength()]; if (negativeShiftProfile.profile(n < 0)) { @@ -130,7 +128,6 @@ public class RawFunctions { } return RDataFactory.createRawVector(data); } - } // TODO the rest of the functions diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadDCF.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadDCF.java index 3c1ad54b14bf787141c5d69fd8934a4408543f7f..f5723074288a2a5e1d6c23fe82a544559bf575e4 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadDCF.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadDCF.java @@ -133,5 +133,4 @@ public abstract class ReadDCF extends RBuiltinNode { } return false; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadREnviron.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadREnviron.java index 9e1e4254095043506393fe601b13f967269166ab..4ee6dbbd2502a83640dfc8e70d59f4419f199da8 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadREnviron.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/ReadREnviron.java @@ -61,5 +61,4 @@ public abstract class ReadREnviron extends RBuiltinNode { } return result; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RegFinalizer.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RegFinalizer.java index 138e031e775682ac80b4a777a8d7ed90940e8eec..079bd5fdcb2ea7fe4e1b73189f411c788b47d8c7 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RegFinalizer.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/RegFinalizer.java @@ -61,5 +61,4 @@ public abstract class RegFinalizer extends RBuiltinNode { // TODO the actual work return RNull.instance; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/S3DispatchFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/S3DispatchFunctions.java index af2a1c06d97844d84e11e5508c55af787c58926f..fe0c2dcfdeb9a00ad2a338387495faa551340ffa 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/S3DispatchFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/S3DispatchFunctions.java @@ -292,6 +292,5 @@ public abstract class S3DispatchFunctions extends RBuiltinNode { RAbstractContainer enclosingArg = (RAbstractContainer) arg; return enclosingArg.getClassHierarchy(); } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Scan.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Scan.java index d9396a717a28d8f3084ab5a169a2ab44bc4fa0ac..86377c5a1a09d11f700faff80ddd8072a8617d71 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Scan.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Scan.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995, 1996, Robert Gentleman and Ross Ihaka * Copyright (c) 1998-2013, The R Core Team - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -199,7 +199,6 @@ public abstract class Scan extends RBuiltinNode { } else { return scanVector(what, nmax, nlines, flush, strip == RRuntime.LOGICAL_TRUE, blSkip, data); } - } catch (IOException x) { throw RError.error(this, RError.Message.CANNOT_READ_CONNECTION); } @@ -415,7 +414,6 @@ public abstract class Scan extends RBuiltinNode { if (lines == maxLines) { break; } - } if (n > 0 && n < nc) { @@ -482,7 +480,6 @@ public abstract class Scan extends RBuiltinNode { if (lines == maxLines) { break; } - } if (!data.quiet) { String s = String.format("Read %d item%s", n, (n == 1) ? "" : "s"); 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 f084a5321264d74c638cc7f36cb46ea1ebd92560..94bc6f9162937d8df8693ff5dc54b4098f30ae51 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 @@ -127,7 +127,7 @@ public class SeqFunctions { public abstract static class SeqFastPath extends FastPathAdapter { @Specialization(guards = {"!hasClass(args, getClassAttributeNode)"}) @SuppressWarnings("unused") - protected Object seqNoClassAndNumeric(VirtualFrame frame, RArgsValuesAndNames args, // + protected Object seqNoClassAndNumeric(VirtualFrame frame, RArgsValuesAndNames args, @Cached("createSeqIntForFastPath()") SeqInt seqInt, @Cached("lookupSeqInt()") RFunction seqIntFunction, @Cached("createBinaryProfile()") ConditionProfile isNumericProfile, @@ -188,7 +188,6 @@ public class SeqFunctions { } return false; } - } /** @@ -199,7 +198,7 @@ public class SeqFunctions { public abstract static class SeqDefaultFastPath extends FastPathAdapter { @SuppressWarnings("unused") @Specialization(guards = {"fromCheck.execute(fromObj)", "toCheck.execute(toObj)", "byCheck.execute(byObj)"}) - protected Object seqDefaultNumeric(VirtualFrame frame, Object fromObj, Object toObj, Object byObj, Object lengthOut, Object alongWith, // + protected Object seqDefaultNumeric(VirtualFrame frame, Object fromObj, Object toObj, Object byObj, Object lengthOut, Object alongWith, @Cached("createSeqIntForFastPath()") SeqInt seqInt, @Cached("createIsMissingOrNumericNode()") IsMissingOrNumericNode fromCheck, @Cached("createIsMissingOrNumericNode()") IsMissingOrNumericNode toCheck, @@ -215,7 +214,6 @@ public class SeqFunctions { protected Object seqDefaultFallback(VirtualFrame frame, Object fromObj, Object toObj, Object byObj, Object lengthOut, Object alongWith) { return null; } - } @TypeSystemReference(RTypesFlatLayout.class) @@ -374,7 +372,7 @@ public class SeqFunctions { * Treat {@code lengthOut==NULL} as {@link RMissing}. */ @Specialization - protected RAbstractVector seqLengthByMissing(VirtualFrame frame, Object from, Object to, Object by, RNull lengthOut, RMissing alongWith, // + protected RAbstractVector seqLengthByMissing(VirtualFrame frame, Object from, Object to, Object by, RNull lengthOut, RMissing alongWith, @Cached("createSeqInt()") SeqInt seqIntNodeRecursive) { return (RAbstractVector) seqIntNodeRecursive.execute(frame, from, to, by, RMissing.instance, alongWith); } @@ -390,7 +388,7 @@ public class SeqFunctions { */ @Specialization(guards = "validDoubleParams(fromVec, toVec)") - protected RAbstractVector seqLengthByMissingDouble(VirtualFrame frame, RAbstractDoubleVector fromVec, RAbstractDoubleVector toVec, RMissing by, RMissing lengthOut, RMissing alongWith, // + protected RAbstractVector seqLengthByMissingDouble(VirtualFrame frame, RAbstractDoubleVector fromVec, RAbstractDoubleVector toVec, RMissing by, RMissing lengthOut, RMissing alongWith, @Cached("createBinaryProfile()") ConditionProfile directionProfile) { double from = fromVec.getDataAt(0); double to = toVec.getDataAt(0); @@ -399,7 +397,7 @@ public class SeqFunctions { } @Specialization(guards = "validIntParams(fromVec, toVec)") - protected RAbstractVector seqLengthByMissingInt(VirtualFrame frame, RAbstractIntVector fromVec, RAbstractIntVector toVec, RMissing by, RMissing lengthOut, RMissing alongWith, // + protected RAbstractVector seqLengthByMissingInt(VirtualFrame frame, RAbstractIntVector fromVec, RAbstractIntVector toVec, RMissing by, RMissing lengthOut, RMissing alongWith, @Cached("createBinaryProfile()") ConditionProfile directionProfile) { int from = fromVec.getDataAt(0); int to = toVec.getDataAt(0); @@ -415,7 +413,7 @@ public class SeqFunctions { * previous specializations. */ @Specialization(guards = {"!isMissing(toObj)"}) - protected RAbstractVector seqLengthByMissing(VirtualFrame frame, Object fromObj, Object toObj, RMissing by, RMissing lengthOut, RMissing alongWith, // + 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) { double from; if (isMissing(fromObj)) { @@ -439,7 +437,7 @@ public class SeqFunctions { */ @Specialization(guards = {"validDoubleParams(fromVec, toVec)", "!isMissing(byObj)"}) - protected Object seqLengthMissing(VirtualFrame frame, RAbstractDoubleVector fromVec, RAbstractDoubleVector toVec, Object byObj, RMissing lengthOut, RMissing alongWith, // + protected Object seqLengthMissing(VirtualFrame frame, RAbstractDoubleVector fromVec, RAbstractDoubleVector toVec, Object byObj, RMissing lengthOut, RMissing alongWith, @Cached("create()") AsRealNode asRealby) { validateLength(frame, byObj, "by"); double by = asRealby.execute(byObj); @@ -447,7 +445,7 @@ public class SeqFunctions { } @Specialization(guards = {"validIntParams(fromVec, toVec)", "validIntParam(byVec)", "byVec.getDataAt(0) != 0"}) - protected RAbstractVector seqLengthMissing(VirtualFrame frame, RAbstractIntVector fromVec, RAbstractIntVector toVec, RAbstractIntVector byVec, RMissing lengthOut, RMissing alongWith, // + protected RAbstractVector seqLengthMissing(VirtualFrame frame, RAbstractIntVector fromVec, RAbstractIntVector toVec, RAbstractIntVector byVec, RMissing lengthOut, RMissing alongWith, @Cached("createBinaryProfile()") ConditionProfile directionProfile) { int by = byVec.getDataAt(0); int from = fromVec.getDataAt(0); @@ -476,7 +474,7 @@ public class SeqFunctions { * See comment in {@link #seqLengthByMissing}. */ @Specialization(guards = {"!isMissing(byObj)"}) - protected Object seqLengthMissing(VirtualFrame frame, Object fromObj, Object toObj, Object byObj, RMissing lengthOut, RMissing alongWith, // + 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) { double from; boolean allInt = true; @@ -570,7 +568,7 @@ public class SeqFunctions { */ @Specialization(guards = "!isMissing(lengthOut)") - protected RAbstractVector seqJustLength(VirtualFrame frame, RMissing from, RMissing to, RMissing by, Object lengthOut, RMissing alongWith, // + protected RAbstractVector seqJustLength(VirtualFrame frame, RMissing from, RMissing to, RMissing by, Object lengthOut, RMissing alongWith, @Cached("create()") AsRealNode asRealLen) { int n = checkLength(frame, lengthOut, asRealLen); return n == 0 ? RDataFactory.createEmptyIntVector() : RDataFactory.createIntSequence(1, 1, n); @@ -643,14 +641,12 @@ public class SeqFunctions { } else { return false; } - } @Fallback protected boolean isIntegralNumericNode(Object obj) { return false; } - } @TypeSystemReference(RTypesFlatLayout.class) @@ -682,7 +678,6 @@ public class SeqFunctions { protected int getIntegralNumeric(Object obj) { throw RInternalError.shouldNotReachHere(); } - } public static GetIntegralNumericNode createGetIntegralNumericNode() { @@ -699,7 +694,7 @@ public class SeqFunctions { // common idiom @Specialization(guards = {"fromCheck.execute(fromObj)", "lengthCheck.execute(lengthOut)"}) - protected RAbstractVector seqWithFromLengthIntegralNumeric(VirtualFrame frame, Object fromObj, RMissing toObj, RMissing byObj, Object lengthOut, RMissing alongWith, // + protected RAbstractVector seqWithFromLengthIntegralNumeric(VirtualFrame frame, Object fromObj, RMissing toObj, RMissing byObj, Object lengthOut, RMissing alongWith, @Cached("createGetIntegralNumericNode()") GetIntegralNumericNode getIntegralNumericNode, @Cached("createIsIntegralNumericNodeNoLengthCheck()") IsIntegralNumericNode fromCheck, @Cached("createIsIntegralNumericNodeLengthCheck()") IsIntegralNumericNode lengthCheck) { @@ -714,7 +709,7 @@ 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, // + 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) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { @@ -766,7 +761,7 @@ 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, // + 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) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { @@ -791,7 +786,7 @@ 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, // + 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) { int lout = checkLengthAlongWith(frame, lengthOut, alongWith, asRealLen); if (lout == 0) { @@ -976,6 +971,5 @@ public class SeqFunctions { return result; } } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java index 5ae7ffb89f7a1ab8b17d4e5daa0635965c4c9112..eba314bde024d8553dd4316fca31ddeb9492ad6e 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -171,7 +171,6 @@ public class SerializeFunctions { byte[] data = RSerialize.serialize(object, type, RSerialize.DEFAULT_VERSION, null); return RDataFactory.createRawVector(data); } - } @RBuiltin(name = "serializeb", kind = INTERNAL, parameterNames = {"object", "con", "xdr", "version", "refhook"}, behavior = IO) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Signif.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Signif.java index ab16eabfefc03f867755b9279689d2da52a7ec9b..6ec1fc1d5e8c7db52f187dcc8905b6e7ff09bc20 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Signif.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Signif.java @@ -141,5 +141,4 @@ public abstract class Signif extends RBuiltinNode { BigDecimal bigDecimalVal = new BigDecimal(val, new MathContext(digits, RoundingMode.HALF_UP)); return bigDecimalVal.doubleValue(); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StandardGeneric.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StandardGeneric.java index 2a590e3749181816039b058a24c41352711c8f37..241c5ff0c6e325897adb3af7268dcb7519438571 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StandardGeneric.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StandardGeneric.java @@ -6,7 +6,7 @@ * Copyright (c) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka * Copyright (c) 1995-2014, The R Core Team * Copyright (c) 2002-2008, The R Foundation - * Copyright (c) 2015, 2016, Oracle and/or its affiliates + * Copyright (c) 2015, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -188,5 +188,4 @@ public abstract class StandardGeneric extends RBuiltinNode { } throw RError.error(this, RError.Message.STD_GENERIC_WRONG_CALL, fname); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StartsEndsWithFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StartsEndsWithFunctions.java index 9ea94076c7455af0b21d980e3045ea682af01039..361eaeb24a56e85928d45bac0790fbf8e50c4635 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StartsEndsWithFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/StartsEndsWithFunctions.java @@ -111,5 +111,4 @@ public class StartsEndsWithFunctions { return doIt(x, prefix, false); } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Strrep.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Strrep.java index 1e68622ebcfe72396d2ceca6c685baca99c6dc44..42746aea682f166ace97507fa447cc4fc884eaaf 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Strrep.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Strrep.java @@ -25,6 +25,7 @@ package com.oracle.truffle.r.nodes.builtin.base; import static com.oracle.truffle.r.runtime.builtins.RBehavior.PURE; import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL; +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.r.nodes.builtin.CastBuilder; import com.oracle.truffle.r.nodes.builtin.RBuiltinNode; @@ -89,7 +90,8 @@ public abstract class Strrep extends RBuiltinNode { return result; } - private void copyNames(RAbstractStringVector xVec, RStringVector result) { + @TruffleBoundary + private static void copyNames(RAbstractStringVector xVec, RStringVector result) { result.copyNamesFrom(xVec); } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Sum.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Sum.java index e15b7281023d22e3d3b6bf591260f638d5d17ee5..e28676426c4afbcf6105c2b6a652e1e96a14228b 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Sum.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Sum.java @@ -109,7 +109,7 @@ public abstract class Sum extends RBuiltinNode { } @Specialization(contains = {"sumLengthOneRDoubleVector", "sumLengthOne"}) - protected Object sum(RArgsValuesAndNames args, boolean naRm, // + protected Object sum(RArgsValuesAndNames args, boolean naRm, @Cached("create()") Combine combine) { return reduce.executeReduce(combine.executeCombine(args, false), naRm, false); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SysFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SysFunctions.java index 2beaa5d5e3e655d14757d39d0dde6f58dbe2b775..e62c27d3e45cdc1ca7a0623ead849a614c8377ac 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SysFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SysFunctions.java @@ -125,7 +125,6 @@ public class SysFunctions { return RDataFactory.createStringVector(data, complete); } } - } /** @@ -156,7 +155,6 @@ public class SysFunctions { RBuiltinPackages.loadDefaultPackageOverrides(RContext.getInstance().getNamespaceName()); } } - } } @@ -283,7 +281,6 @@ public class SysFunctions { } return s; } - } @RBuiltin(name = "Sys.chmod", visibility = OFF, kind = INTERNAL, parameterNames = {"paths", "octmode", "use_umask"}, behavior = IO) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Tabulate.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Tabulate.java index 582627f4b9b7d3be906f4c1c5a090ea596ea7381..f6ac5b31210db26838958d33ad7ecafc6cb2f19d 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Tabulate.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Tabulate.java @@ -49,5 +49,4 @@ public abstract class Tabulate extends RBuiltinNode { } return RDataFactory.createIntVector(ans, RDataFactory.COMPLETE_VECTOR); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TempFile.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TempFile.java index c62ad801313fe5f131a94889cfa5eda506324b31..1d365eb082516038eb1ddecddd036f6add06b110 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TempFile.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TempFile.java @@ -65,5 +65,4 @@ public abstract class TempFile extends RBuiltinNode { } return RDataFactory.createStringVector(data, RDataFactory.COMPLETE_VECTOR); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TrigExpFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TrigExpFunctions.java index 3666ba6a6e934ec52a5aa0745b234931afeec283..21efb2c61f2f6a0184dfa5fb9533a81314a41570 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TrigExpFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/TrigExpFunctions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -170,7 +170,6 @@ public class TrigExpFunctions { } return Math.sin(norm * Math.PI); } - } @RBuiltin(name = "cos", kind = PRIMITIVE, parameterNames = {"x"}, dispatch = MATH_GROUP_GENERIC, behavior = PURE) @@ -541,7 +540,7 @@ public class TrigExpFunctions { } @Specialization - protected RDoubleVector atan2(double y, RAbstractDoubleVector x, // + protected RDoubleVector atan2(double y, RAbstractDoubleVector x, @Cached("createCountingProfile()") LoopConditionProfile profile) { xNACheck.enable(x); yNACheck.enable(y); @@ -549,7 +548,7 @@ public class TrigExpFunctions { } @Specialization - protected RDoubleVector atan2(RAbstractDoubleVector y, double x, // + protected RDoubleVector atan2(RAbstractDoubleVector y, double x, @Cached("createCountingProfile()") LoopConditionProfile profile) { xNACheck.enable(x); yNACheck.enable(y); @@ -557,7 +556,7 @@ public class TrigExpFunctions { } @Specialization - protected RDoubleVector atan2(RAbstractDoubleVector y, RAbstractDoubleVector x, // + protected RDoubleVector atan2(RAbstractDoubleVector y, RAbstractDoubleVector x, @Cached("createCountingProfile()") LoopConditionProfile profile) { int xLength = x.getLength(); int yLength = y.getLength(); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Unlist.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Unlist.java index 094558ecff279e58aeee18fe4b1aa10c538d951f..4c7d7f36efcf7a969d41eefcf88a8ca622979fc2 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Unlist.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Unlist.java @@ -767,7 +767,7 @@ public abstract class Unlist extends RBuiltinNode { return list.getLength() == 1 && list.getDataAt(0) == RNull.instance; } - private Object handlePairList(Object o) { + private static Object handlePairList(Object o) { return o instanceof RPairList ? ((RPairList) o).toRList() : o; } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java index 30ca1d44d95a5934edd6b0b2be253baf13e545c2..95cb88093e116c5b93305e3e6c69878202d88da6 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java @@ -66,15 +66,15 @@ public abstract class UpdateClass extends RBuiltinNode { } @Specialization(limit = "CACHE_LIMIT", guards = "cachedClassName == className") - protected Object setClassCached(RAbstractContainer arg, @SuppressWarnings("unused") String className, // - @Cached("className") String cachedClassName, // + protected Object setClassCached(RAbstractContainer arg, @SuppressWarnings("unused") String className, + @Cached("className") String cachedClassName, @Cached("fromMode(className)") RType cachedMode, @Cached("create()") GetClassAttributeNode getClassNode) { return setClassInternal(arg, cachedClassName, cachedMode, getClassNode); } @Specialization(contains = "setClassCached") - protected Object setClass(RAbstractContainer arg, String className, // + protected Object setClass(RAbstractContainer arg, String className, @Cached("create()") TypeFromModeNode typeFromMode, @Cached("create()") GetClassAttributeNode getClassNode) { RType mode = typeFromMode.execute(className); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateDimNames.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateDimNames.java index 35adf33049ff8328091ce27e59d1947407474c8e..d521f8a0edbac77d286ce14594ef8e9fbfb7db73 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateDimNames.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateDimNames.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 @@ -89,7 +89,7 @@ public abstract class UpdateDimNames extends RBuiltinNode { } @Specialization - protected RAbstractContainer updateDimnamesNull(RAbstractContainer container, @SuppressWarnings("unused") RNull list, // + protected RAbstractContainer updateDimnamesNull(RAbstractContainer container, @SuppressWarnings("unused") RNull list, @Cached("createDimNames()") RemoveFixedAttributeNode remove) { RAbstractContainer result = (RAbstractContainer) container.getNonShared(); remove.execute(result); @@ -97,13 +97,13 @@ public abstract class UpdateDimNames extends RBuiltinNode { } @Specialization(guards = "list.getLength() == 0") - protected RAbstractContainer updateDimnamesEmpty(RAbstractContainer container, @SuppressWarnings("unused") RList list, // + protected RAbstractContainer updateDimnamesEmpty(RAbstractContainer container, @SuppressWarnings("unused") RList list, @Cached("createDimNames()") RemoveFixedAttributeNode remove) { return updateDimnamesNull(container, RNull.instance, remove); } @Specialization(guards = "list.getLength() > 0") - protected RAbstractContainer updateDimnames(RAbstractContainer container, RList list, // + protected RAbstractContainer updateDimnames(RAbstractContainer container, RList list, @Cached("create()") SetDimNamesAttributeNode setDimNamesNode) { RAbstractContainer result = (RAbstractContainer) container.getNonShared(); setDimNamesNode.setDimNames(result, convertToListOfStrings(list)); @@ -115,5 +115,4 @@ public abstract class UpdateDimNames extends RBuiltinNode { CompilerDirectives.transferToInterpreter(); throw RError.error(this, RError.Message.DIMNAMES_LIST); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Utf8ToInt.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Utf8ToInt.java index 78f43eea82748a79a23c81341b4ddeb75fd6cacb..c1ba6395b156a309c7a5619dd38cdb7cfe8f0a0f 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Utf8ToInt.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Utf8ToInt.java @@ -62,5 +62,4 @@ public abstract class Utf8ToInt extends RBuiltinNode { } return ret; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Warning.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Warning.java index 19b63fbff07f76ef87fccae9c5038fd70c4ad9e8..bfb083d1593de793b7015cbe6c2e6a72882a1d0e 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Warning.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Warning.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 @@ -55,5 +55,4 @@ public abstract class Warning extends RBuiltinNode { RErrorHandling.warningcallInternal(call, message, immediate, noBreakWarning); return message; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/IsElementFastPath.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/IsElementFastPath.java index 63a1876788b7fe1d3456d3f6d7febe0c2bf550f5..677dda88272d4a71965c93d95ecc94e5cd6c0368 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/IsElementFastPath.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/IsElementFastPath.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 @@ -38,8 +38,8 @@ import com.oracle.truffle.r.runtime.ops.na.NACheck; public abstract class IsElementFastPath extends RFastPathNode { @Specialization(guards = "el.getLength() == 1") - protected Byte iselementOne(RAbstractStringVector el, RAbstractStringVector set, // - @Cached("create()") BranchProfile trueProfile, // + protected Byte iselementOne(RAbstractStringVector el, RAbstractStringVector set, + @Cached("create()") BranchProfile trueProfile, @Cached("create()") BranchProfile falseProfile) { String element = el.getDataAt(0); int length = set.getLength(); @@ -59,8 +59,8 @@ public abstract class IsElementFastPath extends RFastPathNode { } @Specialization(guards = "el.getLength() == 1") - protected Byte iselementOne(RAbstractDoubleVector el, RAbstractDoubleVector set, // - @Cached("create()") BranchProfile trueProfile, // + protected Byte iselementOne(RAbstractDoubleVector el, RAbstractDoubleVector set, + @Cached("create()") BranchProfile trueProfile, @Cached("create()") BranchProfile falseProfile) { double element = el.getDataAt(0); int length = set.getLength(); @@ -75,16 +75,16 @@ public abstract class IsElementFastPath extends RFastPathNode { } @Specialization(guards = "el.getLength() == 1") - protected Byte isElementOneSequence(RAbstractDoubleVector el, RIntSequence set, // + protected Byte isElementOneSequence(RAbstractDoubleVector el, RIntSequence set, @Cached("createBinaryProfile()") ConditionProfile profile) { double element = el.getDataAt(0); return RRuntime.asLogical(profile.profile(element >= set.getStart() && element <= set.getEnd())); } @Specialization(contains = "isElementOneSequence", guards = "el.getLength() == 1") - protected Byte iselementOne(RAbstractDoubleVector el, RAbstractIntVector set, // - @Cached("create()") NACheck na, // - @Cached("create()") BranchProfile trueProfile, // + protected Byte iselementOne(RAbstractDoubleVector el, RAbstractIntVector set, + @Cached("create()") NACheck na, + @Cached("create()") BranchProfile trueProfile, @Cached("create()") BranchProfile falseProfile) { double element = el.getDataAt(0); int length = set.getLength(); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/MatrixFastPath.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/MatrixFastPath.java index c05be3b0a49f316fb4616322450e6cd8a394bdb1..056af9a7e51954303bca4e6b688660ec1ddcfa10 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/MatrixFastPath.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/MatrixFastPath.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 @@ -47,14 +47,14 @@ public abstract class MatrixFastPath extends RFastPathNode { } @Specialization - protected Object matrix(RAbstractVector data, Object nrow, Object ncol, @SuppressWarnings("unused") RMissing byrow, Object dimnames, // - @Cached("create()") CastIntegerNode castRow, // - @Cached("create()") CastIntegerNode castCol, // - @Cached("createFirst()") FirstIntNode firstRow, // - @Cached("createFirst()") FirstIntNode firstCol, // - @Cached("createBinaryProfile()") ConditionProfile rowMissingProfile, // - @Cached("createBinaryProfile()") ConditionProfile colMissingProfile, // - @Cached("createBinaryProfile()") ConditionProfile dimMissingProfile, // + protected Object matrix(RAbstractVector data, Object nrow, Object ncol, @SuppressWarnings("unused") RMissing byrow, Object dimnames, + @Cached("create()") CastIntegerNode castRow, + @Cached("create()") CastIntegerNode castCol, + @Cached("createFirst()") FirstIntNode firstRow, + @Cached("createFirst()") FirstIntNode firstCol, + @Cached("createBinaryProfile()") ConditionProfile rowMissingProfile, + @Cached("createBinaryProfile()") ConditionProfile colMissingProfile, + @Cached("createBinaryProfile()") ConditionProfile dimMissingProfile, @Cached("createMatrix()") Matrix matrix) { boolean rowMissing = rowMissingProfile.profile(nrow == RMissing.instance); boolean colMissing = colMissingProfile.profile(ncol == RMissing.instance); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/VectorFastPaths.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/VectorFastPaths.java index 2105efc452b0e5c1c48a0199ca446fbd6ff5a4a1..102ef1d27c37093bf6c1f0397cb15de855d964bb 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/VectorFastPaths.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/fastpaths/VectorFastPaths.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 @@ -42,7 +42,7 @@ public abstract class VectorFastPaths { } @Specialization - protected RAbstractIntVector get(int length, // + protected RAbstractIntVector get(int length, @Cached("createBinaryProfile()") ConditionProfile emptyProfile) { if (emptyProfile.profile(length == 0)) { return RDataFactory.createIntVector(0); @@ -53,7 +53,7 @@ public abstract class VectorFastPaths { } @Specialization - protected RAbstractIntVector get(double length, // + protected RAbstractIntVector get(double length, @Cached("createBinaryProfile()") ConditionProfile emptyProfile) { if (!Double.isNaN(length)) { return get((int) length, emptyProfile); @@ -76,7 +76,7 @@ public abstract class VectorFastPaths { } @Specialization - protected RAbstractDoubleVector get(int length, // + protected RAbstractDoubleVector get(int length, @Cached("createBinaryProfile()") ConditionProfile emptyProfile) { if (emptyProfile.profile(length == 0)) { return RDataFactory.createDoubleVector(0); @@ -87,7 +87,7 @@ public abstract class VectorFastPaths { } @Specialization - protected RAbstractDoubleVector get(double length, // + protected RAbstractDoubleVector get(double length, @Cached("createBinaryProfile()") ConditionProfile emptyProfile) { if (!Double.isNaN(length)) { return get((int) length, emptyProfile); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java index ce574740684cddb53bcd2983f1495d6190491a3b..ddd2f3bd7a8b00a12bb440caf1af03a056d82d30 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java @@ -646,8 +646,8 @@ public class CallAndExternalFunctions { */ @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("lookupBuiltin(symbol)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } @@ -658,8 +658,8 @@ public class CallAndExternalFunctions { */ @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol"}) - protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("extractSymbolInfo(frame, symbol)") NativeCallInfo nativeCallInfo) { return callRFFINode.invokeCall(nativeCallInfo, args.getArguments()); } @@ -668,7 +668,7 @@ public class CallAndExternalFunctions { * {@code .NAME = string}, no package specified. */ @Specialization - protected Object callNamedFunction(String symbol, RArgsValuesAndNames args, @SuppressWarnings("unused") RMissing packageName, // + protected Object callNamedFunction(String symbol, RArgsValuesAndNames args, @SuppressWarnings("unused") RMissing packageName, @Cached("createRegisteredNativeSymbol(CallNST)") DLL.RegisteredNativeSymbol rns) { return callNamedFunctionWithPackage(symbol, args, null, rns); } @@ -678,7 +678,7 @@ public class CallAndExternalFunctions { * define that symbol. */ @Specialization - protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, // + protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, @Cached("createRegisteredNativeSymbol(CallNST)") DLL.RegisteredNativeSymbol rns) { DLL.SymbolHandle func = DLL.findSymbol(symbol, packageName, rns); if (func == DLL.SYMBOL_NOT_FOUND) { @@ -693,7 +693,6 @@ public class CallAndExternalFunctions { protected Object dotCallFallback(Object symbol, Object args, Object packageName) { throw fallback(symbol); } - } /** @@ -756,16 +755,16 @@ public class CallAndExternalFunctions { @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("lookupBuiltin(symbol)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol"}) - protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("extractSymbolInfo(frame, symbol)") NativeCallInfo nativeCallInfo) { Object list = encodeArgumentPairList(args, nativeCallInfo.name); return callRFFINode.invokeCall(nativeCallInfo, new Object[]{list}); @@ -778,7 +777,7 @@ public class CallAndExternalFunctions { } @Specialization - protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, // + protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, @Cached("createRegisteredNativeSymbol(ExternalNST)") DLL.RegisteredNativeSymbol rns) { DLL.SymbolHandle func = DLL.findSymbol(symbol, packageName, rns); if (func == DLL.SYMBOL_NOT_FOUND) { @@ -831,16 +830,16 @@ public class CallAndExternalFunctions { @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("lookupBuiltin(symbol)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol"}) - protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, // - @Cached("symbol") RList cached, // + protected Object callNamedFunction(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, Object packageName, + @Cached("symbol") RList cached, @Cached("extractSymbolInfo(frame, symbol)") NativeCallInfo nativeCallInfo) { Object list = encodeArgumentPairList(args, nativeCallInfo.name); // TODO: provide proper values for the CALL, OP and RHO parameters @@ -854,7 +853,7 @@ public class CallAndExternalFunctions { } @Specialization - protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, // + protected Object callNamedFunctionWithPackage(String symbol, RArgsValuesAndNames args, String packageName, @Cached("createRegisteredNativeSymbol(ExternalNST)") DLL.RegisteredNativeSymbol rns) { DLL.SymbolHandle func = DLL.findSymbol(symbol, packageName, rns); if (func == DLL.SYMBOL_NOT_FOUND) { @@ -893,8 +892,8 @@ public class CallAndExternalFunctions { @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == f", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList f, RArgsValuesAndNames args, RMissing packageName, // - @Cached("f") RList cached, // + protected Object doExternal(VirtualFrame frame, RList f, RArgsValuesAndNames args, RMissing packageName, + @Cached("f") RList cached, @Cached("lookupBuiltin(f)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } @@ -950,8 +949,8 @@ public class CallAndExternalFunctions { @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == f", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList f, RArgsValuesAndNames args, RMissing packageName, // - @Cached("f") RList cached, // + protected Object doExternal(VirtualFrame frame, RList f, RArgsValuesAndNames args, RMissing packageName, + @Cached("f") RList cached, @Cached("lookupBuiltin(f)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java index da3d8bc976f5a0182b1150772112be72372070e2..893f18f7ad5c6e35f5d6153b52befa2f835834b5 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java @@ -183,7 +183,6 @@ public class FortranAndCFunctions { } return RDataFactory.createStringVector(listArgNames, RDataFactory.COMPLETE_VECTOR); } - } /** @@ -208,8 +207,8 @@ public class FortranAndCFunctions { @SuppressWarnings("unused") @Specialization(limit = "1", guards = {"cached == symbol", "builtin != null"}) - protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, RMissing encoding, // - @Cached("symbol") RList cached, // + protected Object doExternal(VirtualFrame frame, RList symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, RMissing encoding, + @Cached("symbol") RList cached, @Cached("lookupBuiltin(symbol)") RExternalBuiltinNode builtin) { return builtin.call(frame, args); } @@ -222,7 +221,7 @@ public class FortranAndCFunctions { } @Specialization - protected RList c(RAbstractStringVector symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, @SuppressWarnings("unused") RMissing encoding, // + protected RList c(RAbstractStringVector symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, @SuppressWarnings("unused") RMissing encoding, @Cached("create()") BranchProfile errorProfile) { String libName = checkPackageArg(rPackage, errorProfile); DLL.RegisteredNativeSymbol rns = new DLL.RegisteredNativeSymbol(DLL.NativeSymbolType.Fortran, null, null); @@ -259,7 +258,7 @@ public class FortranAndCFunctions { @SuppressWarnings("unused") @Specialization - protected RList c(RAbstractStringVector symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, RMissing encoding, // + protected RList c(RAbstractStringVector symbol, RArgsValuesAndNames args, byte naok, byte dup, Object rPackage, RMissing encoding, @Cached("create()") BranchProfile errorProfile) { String libName = null; if (!(rPackage instanceof RMissing)) { @@ -277,6 +276,5 @@ public class FortranAndCFunctions { } return dispatch(this, new NativeCallInfo(symbol.getDataAt(0), func, rns.getDllInfo()), naok, dup, args); } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/WriteTable.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/WriteTable.java index ec1805d01241ed3bb8f1f4eca46d9d7d28950803..60e548ee53dfb157b334cbc75ffcf27e50d7e150 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/WriteTable.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/WriteTable.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -127,7 +127,6 @@ public abstract class WriteTable extends RExternalBuiltinNode.Arg11 { } con.writeString(ceol, false); } - } } catch (IOException | IllegalArgumentException ex) { throw RError.error(RError.SHOW_CALLER, RError.Message.GENERIC, ex.getMessage()); diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/AnyVectorToStringVectorWriter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/AnyVectorToStringVectorWriter.java index 3e0b1acd76e8b16ad4d795c12c0b7d648b0c20ba..5282e1d86e05f9d9fda1a0aec8f1c9a7bba188e0 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/AnyVectorToStringVectorWriter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/AnyVectorToStringVectorWriter.java @@ -126,5 +126,4 @@ public class AnyVectorToStringVectorWriter extends Writer implements PrettyWrite } return sv; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorMetrics.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorMetrics.java index a61fa53ca9d6449547f86b0ca60ed9cc1f5b8dbc..584dc52adfc715e978d4f42dac5fa7a776226227 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorMetrics.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorMetrics.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 @@ -46,5 +46,4 @@ public final class ComplexVectorMetrics extends FormatMetrics { this.di = di; this.ei = ei; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinter.java index f6015f470b58b2554110ad66d0d7bacff97f5b28..8181e251d47ba78d1833ad929d41922146e86163 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinter.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (c) 1997-2013, The R Core Team - * Copyright (c) 2016, Oracle and/or its affiliates + * Copyright (c) 2016, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -176,7 +176,6 @@ public final class ComplexVectorPrinter extends VectorPrinter<RAbstractComplexVe if (sd.nsig > mxns) { mxns = sd.nsig; /* max sig digits */ } - } /* imaginary part */ diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorMetrics.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorMetrics.java index 38552d8d0b079d74dd655ff6cbe00cc04a8a113e..4bc1747d4282be34f2ba45845cf1dd208eebb863 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorMetrics.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorMetrics.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 @@ -38,5 +38,4 @@ public final class DoubleVectorMetrics extends FormatMetrics { this.d = d; this.e = e; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/FormatMetrics.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/FormatMetrics.java index a8293eb81f293bebbbd1bb591d4a94c1dd719005..052d4675874c6853669d8229963763e069e200ca 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/FormatMetrics.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/FormatMetrics.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 @@ -46,5 +46,4 @@ public class FormatMetrics { public int getAdjustedMaxWidth() { return maxWidth; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ListPrinter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ListPrinter.java index c86cafe1db361ba2bd4ca6db5f6b5abe9442a0bf..e0915c3817a13782ed7cb185ede7219c3ddad633 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ListPrinter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ListPrinter.java @@ -201,7 +201,6 @@ final class ListPrinter extends AbstractValuePrinter<RAbstractListVector> { tagbuf.append(String.format("$`%s`", ss)); } } - } else { if (taglen + indexWidth(i) > TAGBUFLEN) { if (taglen <= TAGBUFLEN) { @@ -227,7 +226,6 @@ final class ListPrinter extends AbstractValuePrinter<RAbstractListVector> { out.printf("\n [ reached getOption(\"max.print\") -- omitted %d entries ]", ns - npr); } - } else { /* ns = length(s) == 0 */ diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/NullPrinter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/NullPrinter.java index 2e64fe897ee1334b135e94e359e7cb6d07f7892a..a61e47cd2d22b7e06f2bf7210c131082d373f820 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/NullPrinter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/NullPrinter.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 @@ -41,5 +41,4 @@ final class NullPrinter extends AbstractValuePrinter<RNull> { protected void printValue(RNull value, PrintContext printCtx) throws IOException { printCtx.output().print(RRuntime.NULL); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/PrettyPrintWriter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/PrettyPrintWriter.java index 2a2abfe9c20fddd3185af34c9486e8064baa1cf1..675bb97080f397e81113ed17aa37d1a63bad2182 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/PrettyPrintWriter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/PrettyPrintWriter.java @@ -102,5 +102,4 @@ public class PrettyPrintWriter extends PrintWriter implements PrettyWriter { return null; } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/StringPrettyWriter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/StringPrettyWriter.java index 0967e765c4cd33c6bf32111943144def88f33baf..de109409424251285af7b61c24615bf440702913 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/StringPrettyWriter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/StringPrettyWriter.java @@ -65,5 +65,4 @@ public class StringPrettyWriter extends StringWriter implements PrettyWriter { public String getPrintReport() { return toString(); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java index 054694527590d54bc10a70afcb427ac8d5a1c36a..25ed8d70c102e14d16e7ca9169e9da484852b2a2 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java @@ -628,5 +628,4 @@ public final class ValuePrinterNode extends RBaseNode { } }).call(value); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java index 1415244a6ac382626e0a2ce9bc137ad67b8d8b7e..8d22e642dc0c79fe3ba570a2051ec08446a1c659 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java @@ -282,7 +282,6 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri if (rpr < r) { out.printf("\n [ reached getOption(\"max.print\") -- omitted %d rows ]", r - rpr); } - } private void printMatrix(int offset, int rpr, int r, int c, @@ -696,7 +695,6 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri } hasDimNames = true; } - } RAbstractStringVector getDimNamesAt(int dimLevel) { diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java index 0b7624082455fb742d7d5aba3718958da56b3113..a65602428e16c18ff456d1962ae2c505078b4be6 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -54,7 +54,6 @@ public class ContextSystemFunctionFactory extends SystemFunctionFactory { CompilerDirectives.transferToInterpreterAndInvalidate(); contextRNode = insert(FastRContextFactory.RNodeGen.create()); } - } @Specialization @@ -73,7 +72,6 @@ public class ContextSystemFunctionFactory extends SystemFunctionFactory { CompilerDirectives.transferToInterpreterAndInvalidate(); contextRscriptNode = insert(FastRContextFactory.RscriptNodeGen.create()); } - } @Specialization @@ -102,5 +100,4 @@ public class ContextSystemFunctionFactory extends SystemFunctionFactory { CompilerDirectives.transferToInterpreter(); throw RError.error(RError.NO_CALLER, RError.Message.GENERIC, command + " cannot be executed in a context"); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunction.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunction.java index 5ac50544b48058f5ec04a7f250edd6be0489e5d3..a045122de665406cca5d5bfd8055822a482bd2d2 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunction.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -52,5 +52,4 @@ public abstract class SystemFunction extends RBuiltinNode { visibility.execute(frame, intern); return result; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunctionFactory.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunctionFactory.java index 424c395ed99bb0888971dc7cfa92e74c2333732c..e751d26204ce05973c8790d36a1d8bb833709100 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunctionFactory.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/SystemFunctionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -66,7 +66,6 @@ public abstract class SystemFunctionFactory { if (RContext.getInstance().stateREnvVars.getMap().get("FASTR_LOG_SYSTEM") != null) { System.out.printf("FastR system (%s): %s%n", useKind, command); } - } @TruffleBoundary @@ -195,5 +194,4 @@ public abstract class SystemFunctionFactory { } return false; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRContext.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRContext.java index aa78158d736e78f0f48b1a16f99e900caaf71ee0..afe6563893bb3378fd0cad02e00a5fc4316aa962 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRContext.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRContext.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 @@ -132,7 +132,6 @@ public class FastRContext { } return RDataFactory.createIntVector(data, RDataFactory.COMPLETE_VECTOR); } - } @RBuiltin(name = ".fastr.context.join", visibility = OFF, kind = PRIMITIVE, parameterNames = {"handle"}, behavior = COMPLEX) @@ -161,7 +160,6 @@ public class FastRContext { } return RNull.instance; } - } /** @@ -224,7 +222,6 @@ public class FastRContext { } return RDataFactory.createList(results); } - } @RBuiltin(name = ".fastr.context.r", kind = PRIMITIVE, visibility = OFF, parameterNames = {"args", "env", "intern"}, behavior = COMPLEX) @@ -295,7 +292,6 @@ public class FastRContext { protected Object rscript(@SuppressWarnings("unused") RMissing args, RAbstractStringVector env, boolean intern) { return rscript(RDataFactory.createEmptyStringVector(), env, intern); } - } private static ContextInfo createContextInfo(RContext.ContextKind contextKind) { @@ -317,7 +313,6 @@ public class FastRContext { protected int createChannel(int key) { return RChannel.createChannel(key); } - } @RBuiltin(name = ".fastr.channel.get", kind = PRIMITIVE, parameterNames = {"key"}, behavior = COMPLEX) @@ -332,7 +327,6 @@ public class FastRContext { protected int getChannel(int key) { return RChannel.getChannel(key); } - } @RBuiltin(name = ".fastr.channel.close", visibility = OFF, kind = PRIMITIVE, parameterNames = {"id"}, behavior = COMPLEX) @@ -348,7 +342,6 @@ public class FastRContext { RChannel.closeChannel(id); return RNull.instance; } - } @RBuiltin(name = ".fastr.channel.send", visibility = OFF, kind = PRIMITIVE, parameterNames = {"id", "data"}, behavior = COMPLEX) @@ -364,7 +357,6 @@ public class FastRContext { RChannel.send(id, data); return RNull.instance; } - } @RBuiltin(name = ".fastr.channel.receive", kind = PRIMITIVE, parameterNames = {"id"}, behavior = COMPLEX) @@ -379,7 +371,6 @@ public class FastRContext { protected Object receive(int id) { return RChannel.receive(id); } - } @RBuiltin(name = ".fastr.channel.poll", kind = PRIMITIVE, parameterNames = {"id"}, behavior = COMPLEX) @@ -394,7 +385,6 @@ public class FastRContext { protected Object poll(int id) { return RChannel.poll(id); } - } @RBuiltin(name = ".fastr.channel.select", kind = PRIMITIVE, parameterNames = {"ids"}, behavior = COMPLEX) @@ -425,5 +415,4 @@ public class FastRContext { } } } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRDebug.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRDebug.java index 9ad0b4fcb9612dfdc2063665d27ba7ca639a0a66..e867b73ba1900ccd5040a1f346128a42fa1e48b5 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRDebug.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRDebug.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 @@ -51,5 +51,4 @@ public abstract class FastRDebug extends RBuiltinNode { } return RNull.instance; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRPkgSource.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRPkgSource.java index 618bbb712bb3780eed6e61a807bcab4389d1e6d3..d072a3ad7688d02a242fa9763e46443b29037c8c 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRPkgSource.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRPkgSource.java @@ -182,5 +182,4 @@ public abstract class FastRPkgSource extends RBuiltinNode { private static Path dirPath() { return FileSystems.getDefault().getPath(REnvVars.rHome(), PKGSOURCE_PROJECT); } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStackTrace.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStackTrace.java index 4a8992097a404aaa398de4cb0023dbb4b124f691..fbc559dc1a4a373de901ed544c2f28d9bc068a0b 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStackTrace.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStackTrace.java @@ -56,5 +56,4 @@ public abstract class FastRStackTrace extends RBuiltinNode { RContext.getInstance().getConsoleHandler().print(Utils.createStackTrace(printFrameContents)); return RNull.instance; } - } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStats.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStats.java index d0886976b712755dfebd50126d4ee3e1c5fe8362..dc521a05ffc1375c069d2b463954d8228e13d1cc 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStats.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRStats.java @@ -110,7 +110,6 @@ public class FastRStats { } catch (IOException ex) { throw RError.error(this, RError.Message.GENERIC, String.format("Rprofmem: cannot open profile file '%s'", filenameVec.getDataAt(0))); } - } return RNull.instance; } @@ -155,9 +154,7 @@ public class FastRStats { AttributeTracer.setTracingState(false); closeAndResetOut(); } - } - } @RBuiltin(name = ".fastr.stats.typecounts", visibility = OFF, kind = PRIMITIVE, parameterNames = {"filename", "append"}, behavior = COMPLEX) @@ -198,7 +195,6 @@ public class FastRStats { } catch (IOException ex) { throw RError.error(this, RError.Message.GENERIC, String.format("Rprofmem: cannot open profile file '%s'", filenameVec.getDataAt(0))); } - } return RNull.instance; } @@ -253,7 +249,6 @@ public class FastRStats { public String toString() { return Integer.toString(count); } - } private Map<Class<? extends RTypedValue>, SortedMap<Integer, Counter>> typecountsMap; @@ -291,7 +286,6 @@ public class FastRStats { closeAndResetOut(); } } - } @RBuiltin(name = ".fastr.stats.funcounts", visibility = OFF, kind = PRIMITIVE, parameterNames = {"filename", "append", "timing", "threshold", "histograms"}, behavior = COMPLEX) @@ -336,7 +330,6 @@ public class FastRStats { } catch (IOException ex) { throw RError.error(this, RError.Message.GENERIC, String.format("Rprofmem: cannot open profile file '%s'", filenameVec.getDataAt(0))); } - } return RNull.instance; } @@ -416,7 +409,6 @@ public class FastRStats { private static double percent(long a, long b) { return ((double) a * 100) / b; } - } private static final class SortableCounter implements Comparable<SortableCounter> { @@ -440,8 +432,6 @@ public class FastRStats { return myInvocations < otherInvocations ? 1 : (myInvocations > otherInvocations ? -1 : 0); } } - } - } } diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRSyntaxTree.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRSyntaxTree.java index 0a2a9930f4d4f4adc756ec74feb8e880f36bb076..580be8e81f89dc0d86ce4039640f9a6cd79abca6 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRSyntaxTree.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRSyntaxTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -99,7 +99,6 @@ public abstract class FastRSyntaxTree extends RBuiltinNode { printnl(); return true; } - }); break; @@ -158,7 +157,6 @@ public abstract class FastRSyntaxTree extends RBuiltinNode { depth--; return null; } - }; visitor.accept(root.getBody()); break; diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java index e7547b6770aa0fa8ce6a671e03ff560846843eb0..e2ead78ab4f671cb31cc1e16b71d9b7e9306a683 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.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 @@ -106,7 +106,6 @@ public class FastRTrace { throw RError.error(this, RError.Message.ARG_MUST_BE_CLOSURE); } } - } @RBuiltin(name = ".fastr.trace", visibility = CUSTOM, kind = PRIMITIVE, parameterNames = {"what", "tracer", "exit", "at", "print", "signature", "where"}, behavior = COMPLEX) @@ -172,7 +171,6 @@ public class FastRTrace { } TraceHandling.enableStatementTrace(func, tracer, exit, at, print); } - } @RBuiltin(name = ".fastr.untrace", visibility = OFF, kind = PRIMITIVE, parameterNames = {"what", "signature", "where"}, behavior = COMPLEX) diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNodeTest.java index 3ab1c524bd645a7433532a374d2ece8a840d099b..ab6890dc71921b4181e468da93ee62f673b80d98 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNodeTest.java @@ -82,28 +82,28 @@ public class ExtractVectorNodeTest extends TestBase { // replace rectangle with rectangle indices vector = generateInteger(20, true); vector.setDimensions(new int[]{5, 4}); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{2, 3, 4}, true), RDataFactory.createIntVector(new int[]{2, 3}, true)); assertIndicies(vector, 6, 7, 8, 11, 12, 13); // replace box with box indices vector = generateInteger(9, true); vector.setDimensions(new int[]{3, 3}); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{2, 3}, true), RDataFactory.createIntVector(new int[]{2, 3}, true)); assertIndicies(vector, 4, 5, 7, 8); // replace three dimensions vector = generateInteger(24, true); vector.setDimensions(new int[]{2, 3, 4}); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2}, true)); assertIndicies(vector, 9); // replace three dimensions vector = generateInteger(24, true); vector.setDimensions(new int[]{2, 3, 4}); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2, 3}, true), RDataFactory.createIntVector(new int[]{2, 3, 4}, true)); assertIndicies(vector, 9, 11, 15, 17, 21, 23); @@ -125,7 +125,7 @@ public class ExtractVectorNodeTest extends TestBase { // extract scalar with logical vector with NA vector = generateInteger(4, true); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE, RRuntime.LOGICAL_NA}, false)}); assertIndicies(vector, 0, RRuntime.INT_NA, 2, RRuntime.INT_NA); @@ -146,25 +146,25 @@ public class ExtractVectorNodeTest extends TestBase { // extract scalar with logical scalar vector = generateInteger(3, true); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE}, true)}); assertIndicies(vector, 0, 1, 2); // extract scalar with integer vector with NA vector = generateInteger(4, true); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, new Object[]{RDataFactory.createIntVector(new int[]{1, RRuntime.INT_NA}, false)}); assertIndicies(vector, 0, RRuntime.INT_NA); // extract scalar with logical vector vector = generateInteger(4, true); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE, RRuntime.LOGICAL_FALSE}, true)}); assertIndicies(vector, 0, 2); // extract vector indexed by logical vector vector = generateInteger(4, true); - vector = executeExtract(ElementAccessMode.SUBSET, vector, // + vector = executeExtract(ElementAccessMode.SUBSET, vector, new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE, RRuntime.LOGICAL_FALSE}, true)}); assertIndicies(vector, 0, 2); @@ -301,7 +301,7 @@ public class ExtractVectorNodeTest extends TestBase { } private static NodeHandle<ExtractVectorNode> create(ElementAccessMode mode, boolean exact, boolean dropDimension) { - return createHandle(ExtractVectorNode.create(mode, false), // + return createHandle(ExtractVectorNode.create(mode, false), (node, args) -> node.apply(null, args[0], (Object[]) args[1], RLogical.valueOf(exact), RLogical.valueOf(dropDimension))); } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNodeTest.java index 8884df7446550e5f95b01546f691a4d2ecae6d0c..063a5f35abfd48880789808d97992b806383e6c8 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/ReplaceVectorNodeTest.java @@ -83,28 +83,28 @@ public class ReplaceVectorNodeTest extends TestBase { // replace rectangle with rectangle indices vector = generateInteger(20, true); vector.setDimensions(new int[]{5, 4}); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), RDataFactory.createIntVector(new int[]{2, 3, 4}, true), RDataFactory.createIntVector(new int[]{2, 3}, true)); assertIndicies(vector, 0, 1, 2, 3, 4, 5, -1, -1, -1, 9, 10, -1, -1, -1, 14, 15, 16, 17, 18, 19); // replace box with box indices vector = generateInteger(9, true); vector.setDimensions(new int[]{3, 3}); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), RDataFactory.createIntVector(new int[]{2, 3}, true), RDataFactory.createIntVector(new int[]{2, 3}, true)); assertIndicies(vector, 0, 1, 2, 3, -1, -1, 6, -1, -1); // replace three dimensions vector = generateInteger(24, true); vector.setDimensions(new int[]{2, 3, 4}); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2}, true)); assertIndicies(vector, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23); // replace three dimensions vector = generateInteger(24, true); vector.setDimensions(new int[]{2, 3, 4}); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), RDataFactory.createIntVector(new int[]{2}, true), RDataFactory.createIntVector(new int[]{2, 3}, true), RDataFactory.createIntVector(new int[]{2, 3, 4}, true)); assertIndicies(vector, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, 10, -1, 12, 13, 14, -1, 16, -1, 18, 19, 20, -1, 22, -1); } @@ -139,19 +139,19 @@ public class ReplaceVectorNodeTest extends TestBase { // replace scalar with logical scalar vector = generateInteger(3, true); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE}, true)}); assertIndicies(vector, -1, -1, -1); // replace scalar with logical vector vector = generateInteger(4, true); - executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), // + executeReplace(ElementAccessMode.SUBSET, vector, RInteger.valueOf(-1), new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE, RRuntime.LOGICAL_FALSE}, true)}); assertIndicies(vector, -1, 1, -1, 3); // replace vector indexed by logical vector vector = generateInteger(4, true); - executeReplace(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{-1, -2}, true), // + executeReplace(ElementAccessMode.SUBSET, vector, RDataFactory.createIntVector(new int[]{-1, -2}, true), new Object[]{RDataFactory.createLogicalVector(new byte[]{RRuntime.LOGICAL_TRUE, RRuntime.LOGICAL_FALSE}, true)}); assertIndicies(vector, -1, 1, -2, 3); @@ -297,7 +297,7 @@ public class ReplaceVectorNodeTest extends TestBase { } private static NodeHandle<ReplaceVectorNode> create(ElementAccessMode mode) { - return createHandle(ReplaceVectorNode.create(mode, false), // + return createHandle(ReplaceVectorNode.create(mode, false), (node, args) -> node.apply(null, args[0], (Object[]) args[1], args[2])); } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringCompareNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringCompareNodeTest.java index f53efd6f78b01ac3ea8b7f01f506eb1227d4ab05..2f6c991611688d85770fd5ba02941ad47293f980 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringCompareNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringCompareNodeTest.java @@ -87,13 +87,13 @@ public class StringCompareNodeTest extends TestBase { } private static boolean executeCompare(boolean exact, String a, String b) { - NodeHandle<CompareStringNode> handle = createHandle(exact ? CompareStringNode.createEquals() : CompareStringNode.createStartsWith(), // + NodeHandle<CompareStringNode> handle = createHandle(exact ? CompareStringNode.createEquals() : CompareStringNode.createStartsWith(), (node, args) -> node.executeCompare((String) args[0], (String) args[1])); return (Boolean) handle.call(a, b); } private static boolean executeHashCompare(String a, String b) { - NodeHandle<StringEqualsNode> handle = createHandle(CompareStringNode.createEquals(), // + NodeHandle<StringEqualsNode> handle = createHandle(CompareStringNode.createEquals(), (node, args) -> node.executeCompare((String) args[0], ((String) args[0]).hashCode(), (String) args[1])); return (Boolean) handle.call(a, b); } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringSearchNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringSearchNodeTest.java index da20001af68711ec6e0ef3efe82408a9c281becc..b21b9db9f9ccd197dd66130195cef4a90acabda7 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringSearchNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/StringSearchNodeTest.java @@ -115,7 +115,7 @@ public class StringSearchNodeTest extends TestBase { private NodeHandle<SearchFirstStringNode> handle; private void create() { - handle = createHandle(SearchFirstStringNode.createNode(true, false), // + handle = createHandle(SearchFirstStringNode.createNode(true, false), (node, args) -> { RAbstractStringVector target = (RAbstractStringVector) args[0]; return node.apply(target, (RAbstractStringVector) args[1], target.getLength(), null); diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/CastUtilsTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/CastUtilsTest.java index 0a3b8863dddbb96a8e4e91810dd0991447eed207..00c93678c1e568fb04532789c84c1b124bc5354d 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/CastUtilsTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/CastUtilsTest.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 @@ -124,5 +124,4 @@ public class CastUtilsTest { Assert.assertEquals(CastUtils.Cast.Coverage.none, CastUtils.Casts.isConvertible(Not.negateType(Object.class), Not.negateType(String.class), false)); Assert.assertEquals(CastUtils.Cast.Coverage.none, CastUtils.Casts.isConvertible(Not.negateType(RAbstractIntVector.class), RAbstractIntVector.class, false)); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/TypeExprTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/TypeExprTest.java index c417e4e73e0165eab37e86ab64a1c90d9045e2bf..b6d7a40bdc34855dcee43e92887d6ac4b8711ed9 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/TypeExprTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/TypeExprTest.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 @@ -77,5 +77,4 @@ public class TypeExprTest { private static Set<Type> toSet(Type... classes) { return new HashSet<>(Arrays.asList(classes)); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinterTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinterTest.java index abcae0def58652dc65cfeee08144cd360aed8f01..79daba50af8aa04c5ceb8c7457751df125f6f40f 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinterTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/ComplexVectorPrinterTest.java @@ -34,5 +34,4 @@ public class ComplexVectorPrinterTest { public void testEncodeComplex() { assertEquals("3.14159265358979e-05+3.1415926535898e-06i", ComplexVectorPrinter.encodeComplex(RDataFactory.createComplex(Math.PI / 100000, Math.PI / 1000000))); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorPrinterTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorPrinterTest.java index 533826a89198871cbe1b0c4a04171081acc9232d..e3f29a6a3eb9e93ffa05f680b9b5ed56d16ddacd 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorPrinterTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/builtin/base/printer/DoubleVectorPrinterTest.java @@ -32,5 +32,4 @@ public class DoubleVectorPrinterTest { public void testEncodeReal() { assertEquals("3.14159265358979e-06", DoubleVectorPrinter.encodeReal(Math.PI / 1000000)); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ArgumentFilterSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ArgumentFilterSampler.java index 979813ce02f49487c5fb8184e851ffc1c7fa4bc7..6132d830f6ec9e0059ba08ee26b8d1cf5cc631df 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ArgumentFilterSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ArgumentFilterSampler.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 @@ -60,7 +60,6 @@ public interface ArgumentFilterSampler<T, R> extends ArgumentFilter<T, R> { Samples<S> otherSamples = other.collectSamples(inputType); return Samples.<T> anything().and(thisSamples).or(otherSamples); } - }; } } @@ -99,7 +98,6 @@ public interface ArgumentFilterSampler<T, R> extends ArgumentFilter<T, R> { Samples<T> otherSamples = other.collectSamples(inputType); return Samples.<T> anything().and(thisSamples).or(otherSamples); } - }; } @@ -246,7 +244,6 @@ public interface ArgumentFilterSampler<T, R> extends ArgumentFilter<T, R> { default InverseArgumentFilterSampler<T, R> not() { return new InverseArgumentFilterSampler<>(this); } - } class InverseArgumentFilterSampler<T, R extends T> extends InverseArgumentFilter<T, R> implements ArgumentFilterSampler<T, Object> { @@ -338,7 +335,5 @@ public interface ArgumentFilterSampler<T, R> extends ArgumentFilter<T, R> { InverseArgumentFilterSampler<T, S> other = (InverseArgumentFilterSampler<T, S>) o; return new InverseArgumentFilterSampler<>(other.orig.or(this.orig)); } - } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java index 43aa139fef2f0ab669fbe85567b1a3e135320956..58c4a898ee8cb144c1eab078be85446f5e0af998 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.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 @@ -101,7 +101,6 @@ public class CastUtils { return none; } } - }, partial { @Override @@ -151,7 +150,6 @@ public class CastUtils { return none; } } - }, none { @Override @@ -197,7 +195,6 @@ public class CastUtils { return none; } } - }, full { @Override @@ -285,7 +282,6 @@ public class CastUtils { public Coverage coverage() { return coverage; } - } public static class Casts { @@ -413,7 +409,6 @@ public class CastUtils { public static TypeExpr inputsAsTypeExpr(Set<Cast> casts) { return casts.stream().map(c -> TypeExpr.atom(c.inputType())).reduce((res, t) -> t.or(res)).orElse(TypeExpr.NOTHING); } - } public static Set<List<Type>> argumentProductSet(List<TypeExpr> argTypeSets) { @@ -639,7 +634,6 @@ public class CastUtils { } else { return Optional.of((T) vectorOrScalar); } - } public static Optional<Class<?>> vectorElementType(Object vector) { @@ -663,7 +657,6 @@ public class CastUtils { } else { return Optional.empty(); } - } public static Set<?> sampleValuesForTypeExpr(TypeExpr te) { @@ -834,6 +827,5 @@ public class CastUtils { } else { return predicate; } - } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/FilterSamplerFactory.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/FilterSamplerFactory.java index e1c486f861275ad6a8832032af14246269736f1e..59383992110284b1e53a6b4cf6c5e41972a9f5b6 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/FilterSamplerFactory.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/FilterSamplerFactory.java @@ -143,7 +143,6 @@ public final class FilterSamplerFactory return thisSamples.and(otherSamples); } - }; } @@ -181,7 +180,6 @@ public final class FilterSamplerFactory Samples otherSamples = rightFilter.collectSamples(inputType); return Samples.<Object> anything().and(thisSamples).or(otherSamples); } - }; } @@ -213,7 +211,6 @@ public final class FilterSamplerFactory Samples thisSamples = toNegate.collectSamples(inputType); return thisSamples.swap(); } - }; } @@ -464,5 +461,4 @@ public final class FilterSamplerFactory throw RInternalError.unimplemented("TODO: more operations here"); } } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/Not.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/Not.java index acd12d51cff722aa8065fa176ab1fb5b97bb09af..0583db597d22d79ed8015ae0fb7b3dfc8215da2d 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/Not.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/Not.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 @@ -97,5 +97,4 @@ public final class Not<T> implements Type, TypeAndInstanceCheck { public Optional<Class<?>> classify() { return Optional.empty(); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TestCasts.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TestCasts.java index 61a372bc9e838373c29cbbb31452048e4a6ef0ad..5905be7bfb65ea815020bdf2e812a8e2e8ba3700 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TestCasts.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TestCasts.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 @@ -458,5 +458,4 @@ public class TestCasts extends TestBase { } testCompilation(new Object[]{RDataFactory.createIntVectorFromScalar(1)}, new Root("ComplexPipeline3SingleInt")); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeAndInstanceCheck.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeAndInstanceCheck.java index 79aa15bb7f490c73c8761c4ef8e5cb5a64fe1382..d9c58b69394b7708052a4b8218d23d3b69771fa1 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeAndInstanceCheck.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeAndInstanceCheck.java @@ -70,5 +70,4 @@ public interface TypeAndInstanceCheck { return positiveCoverage.transpose(positiveFromCls, positiveToCls, fromPositive, toPositive); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeConjunction.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeConjunction.java index c3af5c1c031779c012de971f8625983d84cb487c..6e56be18befc96f63c4996049f47836167f72492 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeConjunction.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeConjunction.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 @@ -113,5 +113,4 @@ public final class TypeConjunction implements WildcardType, TypeAndInstanceCheck TypeConjunction other = (TypeConjunction) obj; return upperBounds.equals(other.upperBounds); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeExpr.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeExpr.java index a462d9311b4c998c8eb7295c7a2c7b486a12bab8..7f8ca9c660e744076e79afa7cdbfd31a236179db 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeExpr.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/TypeExpr.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 @@ -198,5 +198,4 @@ public final class TypeExpr { public String toString() { return disjNormForm.toString(); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentFilterSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentFilterSampler.java index b13fcca6431a62fb68517c2ad5fed0e8d3d00427..b8ad3169c5b5799560fd67407ac48bdb5c41a597 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentFilterSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentFilterSampler.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 @@ -83,5 +83,4 @@ public class ValuePredicateArgumentFilterSampler<T> extends ValuePredicateArgume @SuppressWarnings("unused") Class<T> commonAncestorClass, Set<Class<?>> resultClasses) { return new ValuePredicateArgumentFilterSampler<>(CastUtils.getPredefStepDesc(), predicate, Collections.emptySet(), negativeSamples, resultClasses); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentMapperSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentMapperSampler.java index f38dfbcdb3d82f00c2086e860ed828a2750e04b5..26a790eaf46f06d82b7c29a855c8471c21675ff7 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentMapperSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/ValuePredicateArgumentMapperSampler.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 @@ -87,5 +87,4 @@ public class ValuePredicateArgumentMapperSampler<T, R> extends ValuePredicateArg return combined; } } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/VectorPredicateArgumentFilterSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/VectorPredicateArgumentFilterSampler.java index dc28199b3136fd0511e827aada72e6f3ea76a512..8676a5c2b0adbc094bbba2fd7394c6bf420a46b6 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/VectorPredicateArgumentFilterSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/VectorPredicateArgumentFilterSampler.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 @@ -79,5 +79,4 @@ public class VectorPredicateArgumentFilterSampler<T extends RAbstractVector> ext public TypeExpr trueBranchType() { return TypeExpr.ANYTHING; } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryArithmeticNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryArithmeticNodeTest.java index ce538982b09d76218ae36524e3cb873e9f26cc20..7ba9410133cc0e33392bf4e59cf21fcc370f0d94 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryArithmeticNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryArithmeticNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -386,7 +386,7 @@ public class BinaryArithmeticNodeTest extends BinaryVectorTest { } private static NodeHandle<BinaryArithmeticNode> create(BinaryArithmeticFactory factory) { - return createHandle(BinaryArithmeticNode.create(factory, null), // + return createHandle(BinaryArithmeticNode.create(factory, null), (node, args) -> node.executeBuiltin(null, args[0], args[1])); } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryBooleanNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryBooleanNodeTest.java index 5403b51d50ff9cadd251426f1a3850e8e0fb0f80..5203cde2f69cdcb4ed28b2bf79dfa67dcdc5f81c 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryBooleanNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryBooleanNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -299,7 +299,7 @@ public class BinaryBooleanNodeTest extends BinaryVectorTest { } private static NodeHandle<BinaryBooleanNode> create(BooleanOperationFactory factory) { - return createHandle(BinaryBooleanNode.create(factory), // + return createHandle(BinaryBooleanNode.create(factory), (node, args) -> node.execute(null, args[0], args[1])); } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryVectorTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryVectorTest.java index bef771f86526ca63f776f2c740730fd81b18c92b..53f4921f9b4548ed1cec08accfa627fc3e0949ee 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryVectorTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/BinaryVectorTest.java @@ -81,8 +81,8 @@ public class BinaryVectorTest extends TestBase { * We keep the fields @DataPoint instead of the ALL_VECTORS field in order to have better error * messages. */ - public static final RAbstractVector[] ALL_VECTORS = new RAbstractVector[]{PRIMITIVE_LOGICAL, PRIMITIVE_INTEGER, PRIMITIVE_DOUBLE, // - PRIMITIVE_COMPLEX, EMPTY_LOGICAL, EMPTY_INTEGER, EMPTY_DOUBLE, EMPTY_COMPLEX, SEQUENCE_INT, SEQUENCE_DOUBLE, FOUR_LOGICAL, FOUR_INT, // + public static final RAbstractVector[] ALL_VECTORS = new RAbstractVector[]{PRIMITIVE_LOGICAL, PRIMITIVE_INTEGER, PRIMITIVE_DOUBLE, + PRIMITIVE_COMPLEX, EMPTY_LOGICAL, EMPTY_INTEGER, EMPTY_DOUBLE, EMPTY_COMPLEX, SEQUENCE_INT, SEQUENCE_DOUBLE, FOUR_LOGICAL, FOUR_INT, FOUR_COMPLEX, NOT_COMPLETE_LOGICAL, NOT_COMPLETE_INT, NOT_COMPLETE_DOUBLE, NOT_COMPLETE_COMPLEX, ONE, TWO, THREE, FIVE}; protected Matcher<Object> isEmptyVectorOf(RType type) { diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java index eccc3ed746eba4396b7d76046a17ccfa3401f2ca..c6091bd38e4716a8664480efaba6eebb9816433c 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java @@ -422,7 +422,6 @@ class ChimneySweeping extends SingleBuiltinDiagnostics { } isOriginal = false; } - } private void evalArgsWithSampleCombinations(List<List<Object>> argSampleCombinations) { @@ -502,7 +501,6 @@ class ChimneySweeping extends SingleBuiltinDiagnostics { } else { System.out.print('!'); } - } catch (Throwable e) { if (!printedErrors.contains(e.getMessage())) { String call = ".Internal(" + builtinName + "(" + sb + "))"; @@ -574,7 +572,6 @@ class ChimneySweeping extends SingleBuiltinDiagnostics { } }).collect(Collectors.toList()); } - } static List<List<Object>> mergeValidAndSampleArgs(RList validArgs, List<List<Object>> sampleArgsList) { diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/DefaultArgsExtractor.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/DefaultArgsExtractor.java index f7ccff7b8f7bd9a25acb213a673153795ea78f32..cc63af538efe11861c189cf3399bd85babd03ae4 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/DefaultArgsExtractor.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/DefaultArgsExtractor.java @@ -101,16 +101,13 @@ class DefaultArgsExtractor { } else { samplesMap.put(name, Samples.anything(defVal)); } - } else if (defVal instanceof RSymbol) { continue; } else { samplesMap.put(name, Samples.anything(defVal)); } } - } - } catch (Throwable t) { printer.accept("Warning: Unable to evaluate formal arguments of function " + functionName); } finally { diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/RBuiltinDiagnostics.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/RBuiltinDiagnostics.java index 68c1d2fbb89915697668339ad8a30a0f55cc5cbf..62a2998e3dcf351e6402798ea5cdb4d8e60dc3c5 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/RBuiltinDiagnostics.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/RBuiltinDiagnostics.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 @@ -313,7 +313,6 @@ public class RBuiltinDiagnostics { } return as; } - } private static int getRealParamIndex(Class<?>[] parTypes, int i) { @@ -463,5 +462,4 @@ public class RBuiltinDiagnostics { } } } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/UnaryArithmeticNodeTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/UnaryArithmeticNodeTest.java index 5a7ef2b6e1eeb41b379c803ec9e26d2326f66b67..d729c5df6da3160301223a1c6fb97c2b15d4e60d 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/UnaryArithmeticNodeTest.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/UnaryArithmeticNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -246,7 +246,7 @@ public class UnaryArithmeticNodeTest extends BinaryVectorTest { } private static NodeHandle<UnaryArithmeticNode> create(UnaryArithmeticFactory factory) { - return createHandle(UnaryArithmeticNodeGen.create(factory, null), // + return createHandle(UnaryArithmeticNodeGen.create(factory, null), (node, args) -> node.execute(args[0])); } } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/BypassNodeGenSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/BypassNodeGenSampler.java index 32540f59b3e7d34604b2bb8d25f66085726b98cc..255e3ea814ddfe15c4c0494cc49ee2cc6b12fd22 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/BypassNodeGenSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/BypassNodeGenSampler.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 @@ -74,5 +74,4 @@ public class BypassNodeGenSampler extends CastNodeSampler<BypassNodeGen> { } return samples; } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/CastToVectorNodeGenSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/CastToVectorNodeGenSampler.java index f1d3b69b7d5f4090414a54453c29c309a301a134..14e7e7d935012269d79ca4dfdb5a8f633099ad67 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/CastToVectorNodeGenSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/CastToVectorNodeGenSampler.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 @@ -67,5 +67,4 @@ public class CastToVectorNodeGenSampler extends CastNodeSampler<CastToVectorNode public Samples<?> collectSamples(TypeExpr inputType, Samples<?> downStreamSamples) { return downStreamSamples; } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/FindFirstNodeGenSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/FindFirstNodeGenSampler.java index 41c209dffdb66291a1e90a5e2d980801ad43e158..a7a41d91c8a2f63d23e2bccd654949a522adfa36 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/FindFirstNodeGenSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/FindFirstNodeGenSampler.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 @@ -84,7 +84,6 @@ public class FindFirstNodeGenSampler extends CastNodeSampler<FindFirstNodeGen> { return new Samples<>("findFirst-withDef", defaultPositiveSamples, defaultNegativeSamples, posMembership); } - } private boolean testVectorForNoDefaultValCase(Object x) { @@ -129,5 +128,4 @@ public class FindFirstNodeGenSampler extends CastNodeSampler<FindFirstNodeGen> { return rt; } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/MapNodeSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/MapNodeSampler.java index 1377ac3fc050fd79d3ae51ebbe837ed76c1dceed..3a62d8e3f158ca13982bcc7655a0f5ff507d7ffd 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/MapNodeSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/MapNodeSampler.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,5 +47,4 @@ public class MapNodeSampler extends CastNodeSampler<MapNode> { public Samples<?> collectSamples(TypeExpr inputType, Samples<?> downStreamSamples) { return mapFn.collectSamples(downStreamSamples); } - } diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/NonNANodeGenSampler.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/NonNANodeGenSampler.java index c88b88024c8ff916d82da7081ba386c7c21afd8d..41d275152e506aa33a8f99129ad43a668e190388 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/NonNANodeGenSampler.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/unary/NonNANodeGenSampler.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 @@ -82,5 +82,4 @@ public class NonNANodeGenSampler extends CastNodeSampler<NonNANodeGen> { Samples<Object> combined = defaultSamples.and(mappedSamples); return combined; } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/InlineCacheNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/InlineCacheNode.java index 257db87ef50139aa820860f3da170204fa0117e9..6e2a429df7de0232229a2e0536f1a2e0b900471f 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/InlineCacheNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/InlineCacheNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -61,9 +61,9 @@ public abstract class InlineCacheNode extends RBaseNode { @SuppressWarnings("unused") @Specialization(limit = "maxPicDepth", guards = "value == cachedValue") - protected Object doCached(Frame frame, Object value, // - @Cached("value") Object cachedValue, // - @Cached("createBinaryProfile()") ConditionProfile isVirtualFrameProfile, // + protected Object doCached(Frame frame, Object value, + @Cached("value") Object cachedValue, + @Cached("createBinaryProfile()") ConditionProfile isVirtualFrameProfile, @Cached("cache(cachedValue)") RNode reified) { VirtualFrame vf; if (isVirtualFrameProfile.profile(frame instanceof VirtualFrame)) { 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 81c6c2ef97eebefb8c5efa7a355bd814bf556d83..bd4dda5ac3b5c3664013d2e297b91df379fb0a03 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 @@ -113,7 +113,7 @@ public abstract class AccessSlotNode extends RNode { @Specialization(guards = {"slotAccessAllowed(object)"}) protected Object getSlotS4Cached(RAttributable object, String name, - @Cached("createAttrAccess()") GetAttributeNode attrAccess, // + @Cached("createAttrAccess()") GetAttributeNode attrAccess, @Cached("create()") InitAttributesNode initAttrNode, @Cached("create()") GetClassAttributeNode getClassNode) { Object value = attrAccess.execute(initAttrNode.execute(object), name); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/UpdateSlotNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/UpdateSlotNode.java index 6cd9f319cb4dfda349a0105b1be5dcce89ed2a09..9f5e173e2d8419a5529513d5399c55e35dd33c11 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/UpdateSlotNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/UpdateSlotNode.java @@ -6,7 +6,7 @@ * Copyright (c) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka * Copyright (c) 1995-2014, The R Core Team * Copyright (c) 2002-2008, The R Foundation - * Copyright (c) 2015, 2016, Oracle and/or its affiliates + * Copyright (c) 2015, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -46,8 +46,8 @@ public abstract class UpdateSlotNode extends RNode { } @Specialization(guards = {"!isData(name)"}) - protected Object updateSlotS4Cached(RAttributable object, String name, Object value, // - @Cached("createAttrUpdate()") SetAttributeNode attributeUpdate, // + protected Object updateSlotS4Cached(RAttributable object, String name, Object value, + @Cached("createAttrUpdate()") SetAttributeNode attributeUpdate, @Cached("create()") InitAttributesNode initAttributes) { assert Utils.isInterned(name); attributeUpdate.execute(initAttributes.execute(object), name, prepareValue(value)); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java index 0a70b646516a39021a6709818020b48120918378..a1905a771a8c5eee723c38df14953c62796c8497 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java @@ -213,7 +213,6 @@ final class CachedExtractVectorNode extends CachedVectorNode { default: return trySubsetPrimitive(extractedVector); } - } else { writeVectorNode.apply(extractedVector, extractedVectorLength, positions, vector, vectorLength, dimensions); RBaseNode.reportWork(this, 1); @@ -427,7 +426,6 @@ final class CachedExtractVectorNode extends CachedVectorNode { foundNames = (RAbstractStringVector) newNames; } } - } } return foundNames; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedReplaceVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedReplaceVectorNode.java index d1453fcae8e2071afd83f0180bdb97fa1ef5c814..5838aa1f2edde01f6e59c800eb8ccefff2d03a5b 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedReplaceVectorNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedReplaceVectorNode.java @@ -539,7 +539,7 @@ final class CachedReplaceVectorNode extends CachedVectorNode { // TODO (chumer) this is way to complicated at the moment // its not yet worth compiling it we need a better attribute system @TruffleBoundary - private RVector<?> resizeVector(RAbstractVector vector, int size) { + private static RVector<?> resizeVector(RAbstractVector vector, int size) { RStringVector oldNames = vector.getNames(); RVector<?> res = vector.copyResized(size, true).materialize(); if (vector instanceof RVector) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNode.java index c86bb8ea230a03ad1f112810f5d7e49f4635329a..9d20e403c3a744767da57f245b7ca73ddd8036c9 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/ExtractVectorNode.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 @@ -105,11 +105,11 @@ public abstract class ExtractVectorNode extends Node { @SuppressWarnings("unused") @Specialization(guards = {"isForeignObject(object)", "positions.length == cachedLength"}) - protected Object accessField(VirtualFrame frame, TruffleObject object, Object[] positions, Object exact, Object dropDimensions, // - @Cached("createForeignRead(positions)") Node foreignRead, // - @Cached("positions.length") int cachedLength, // - @Cached("create()") CastStringNode castNode, // - @Cached("createFirstString()") FirstStringNode firstString, // + protected Object accessField(VirtualFrame frame, TruffleObject object, Object[] positions, Object exact, Object dropDimensions, + @Cached("createForeignRead(positions)") Node foreignRead, + @Cached("positions.length") int cachedLength, + @Cached("create()") CastStringNode castNode, + @Cached("createFirstString()") FirstStringNode firstString, @Cached("createClassProfile()") ValueProfile positionProfile) { Object position = positionProfile.profile(positions[0]); try { 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 6c5796d09e068872905e94aedce081ba692e69d1..adc4cddbe02f33a07a899e64ebc190bdefc58971 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 @@ -103,8 +103,8 @@ abstract class PositionCastNode extends Node { } @Specialization - protected RAbstractVector doDouble(RAbstractDoubleVector position, // - @Cached("createIntegerCast()") CastIntegerNode cast, // + protected RAbstractVector doDouble(RAbstractDoubleVector position, + @Cached("createIntegerCast()") CastIntegerNode cast, @Cached("create()") BoxPrimitiveNode box) { if (mode.isSubscript()) { // double gets casted to integer for subscript diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCharacterLookupNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCharacterLookupNode.java index 70e086e85722e0917405de4db7f6f82244cd5526..dbe39a3f17a56e743450227ff992883257b36447 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCharacterLookupNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCharacterLookupNode.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 @@ -79,7 +79,6 @@ final class PositionCharacterLookupNode extends Node { emptyProfile.enter(); throw noDimNames(); } - } return result; } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java index b7fe92ffd5b67a4fe256fb013c1406ab65a32577..dfe5493cb8ead7bdfe125b44c114b37616d0640b 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java @@ -276,7 +276,6 @@ abstract class PositionCheckNode extends Node { } return RDataFactory.createDoubleVector(iv, doublePos.isComplete()); } - } public boolean isEmptyPosition(Object position) { @@ -286,5 +285,4 @@ abstract class PositionCheckNode extends Node { Object castPosition = positionClassProfile.profile(position); return castPosition instanceof RAbstractContainer && ((RAbstractContainer) castPosition).getLength() == 0; } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubscriptNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubscriptNode.java index b9a139b1f5830af9c600477e097fcb1da5dc4206..597de75756e45caae79fdefdaa6a4d933ac3f1e1 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubscriptNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckSubscriptNode.java @@ -158,7 +158,6 @@ abstract class PositionCheckSubscriptNode extends PositionCheckNode { } else { throw RError.error(this, RError.Message.SELECT_MORE_1); } - } } 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 99ad2b78cab1e9f3630e33e9a8c1345da56e6735..5ae6b0a5ace21817c6ecf16a8ad188cac4f8fdee 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 @@ -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,7 @@ abstract class PositionCheckSubsetNode extends PositionCheckNode { } @Specialization(guards = {"isMultiplesOf(dimensionLength, positionLength)", "positionLength <= dimensionLength"}) - protected RAbstractVector doLogicalMultiplesInBounds(PositionProfile statistics, int dimensionLength, RAbstractLogicalVector position, int positionLength, // + protected RAbstractVector doLogicalMultiplesInBounds(PositionProfile statistics, int dimensionLength, RAbstractLogicalVector position, int positionLength, @Cached("createCountingProfile()") LoopConditionProfile lengthProfile) { assert positionLength > 0; positionNACheck.enable(position); @@ -93,7 +93,7 @@ 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) { positionNACheck.enable(position); int positionIndex = 0; @@ -130,12 +130,12 @@ abstract class PositionCheckSubsetNode extends PositionCheckNode { } @Specialization(/* contains = "doSequence" */) - protected RAbstractVector doDouble(PositionProfile profile, int dimensionLength, RAbstractDoubleVector position, int positionLength, // - @Cached("create()") BranchProfile seenZeroProfile, // - @Cached("create()") BranchProfile seenPositiveProfile, // - @Cached("create()") BranchProfile seenNegativeProfile, // - @Cached("create()") BranchProfile seenOutOfBounds, // - @Cached("create()") NullProfile hasNamesProfile, // + protected RAbstractVector doDouble(PositionProfile profile, int dimensionLength, RAbstractDoubleVector position, int positionLength, + @Cached("create()") BranchProfile seenZeroProfile, + @Cached("create()") BranchProfile seenPositiveProfile, + @Cached("create()") BranchProfile seenNegativeProfile, + @Cached("create()") BranchProfile seenOutOfBounds, + @Cached("create()") NullProfile hasNamesProfile, @Cached("createCountingProfile()") LoopConditionProfile lengthProfile, @Cached("create()") GetNamesAttributeNode getNamesNode, @Cached("create()") SetNamesAttributeNode setNamesNode) { @@ -203,14 +203,14 @@ abstract class PositionCheckSubsetNode extends PositionCheckNode { } @Specialization(/* contains = "doSequence" */) - protected RAbstractVector doInteger(PositionProfile profile, int dimensionLength, RAbstractIntVector position, int positionLength, // - @Cached("create()") BranchProfile seenZeroProfile, // - @Cached("create()") BranchProfile seenPositiveProfile, // - @Cached("create()") BranchProfile seenNegativeProfile, // - @Cached("createBinaryProfile()") ConditionProfile seenNAFlagProfile, // - @Cached("createBinaryProfile()") ConditionProfile seenPositiveFlagProfile, // - @Cached("createBinaryProfile()") ConditionProfile seenNegativeFlagProfile, // - @Cached("create()") BranchProfile seenOutOfBounds, // + protected RAbstractVector doInteger(PositionProfile profile, int dimensionLength, RAbstractIntVector position, int positionLength, + @Cached("create()") BranchProfile seenZeroProfile, + @Cached("create()") BranchProfile seenPositiveProfile, + @Cached("create()") BranchProfile seenNegativeProfile, + @Cached("createBinaryProfile()") ConditionProfile seenNAFlagProfile, + @Cached("createBinaryProfile()") ConditionProfile seenPositiveFlagProfile, + @Cached("createBinaryProfile()") ConditionProfile seenNegativeFlagProfile, + @Cached("create()") BranchProfile seenOutOfBounds, @Cached("createCountingProfile()") LoopConditionProfile lengthProfile) { positionNACheck.enable(position); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveExtractSubscriptNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveExtractSubscriptNode.java index 0f24866aaed3ec576d504f9e62fb41d9245713d5..685ce25e8478d7e79f3dbc64fc72fbce06004720 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveExtractSubscriptNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveExtractSubscriptNode.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 @@ -66,7 +66,7 @@ abstract class RecursiveExtractSubscriptNode extends RecursiveSubscriptNode { @Specialization(contains = "doDefault") @SuppressWarnings("unused") - protected Object doRecursive(VirtualFrame frame, Object vector, Object[] positions, Object originalFirstPosition, int positionLength, Object exact, Object dropDimensions, // + protected Object doRecursive(VirtualFrame frame, Object vector, Object[] positions, Object originalFirstPosition, int positionLength, Object exact, Object dropDimensions, @Cached("createPositionCast()") PositionCastNode positionCast) { Object firstPosition = positionCast.execute(originalFirstPosition); Object currentVector = vector; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveReplaceSubscriptNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveReplaceSubscriptNode.java index f21d85a6448bfa2b493e89aa9544010756b2e0c0..7f6498d58080baaaff29dd21491450aef6bf50e8 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveReplaceSubscriptNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/RecursiveReplaceSubscriptNode.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 @@ -73,7 +73,7 @@ abstract class RecursiveReplaceSubscriptNode extends RecursiveSubscriptNode { */ @Specialization(contains = "doDefault") @SuppressWarnings("unused") - protected Object doRecursive(VirtualFrame frame, Object vector, Object[] positions, Object originalFirstPosition, int positionLength, Object value, // + protected Object doRecursive(VirtualFrame frame, Object vector, Object[] positions, Object originalFirstPosition, int positionLength, Object value, @Cached("createPositionCast()") PositionCastNode positionCast) { Object firstPosition = positionCast.execute(originalFirstPosition); Object[] positionStack = new Object[positionLength]; 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 5fc03e937e0d3d1a82a0ed368d9f92bec13c6bcf..21da11ada017cdd63bfd73d1d3e2d956f74f5dde 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 @@ -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 @@ -97,9 +97,9 @@ public abstract class ReplaceVectorNode extends Node { @SuppressWarnings("unused") @Specialization(guards = {"isForeignObject(object)", "positions.length == cachedLength"}) - protected Object accessField(VirtualFrame frame, TruffleObject object, Object[] positions, Object value, // - @Cached("createForeignWrite(positions)") Node foreignRead, // - @Cached("positions.length") int cachedLength, // + 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) { Object writtenValue = value; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/SearchFirstStringNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/SearchFirstStringNode.java index 751a795d6d42723765e7b01c9a52ff8bad2de5e1..5121a386687f6e84853670eef87ef1cb2df5f201 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/SearchFirstStringNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/SearchFirstStringNode.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 @@ -115,7 +115,7 @@ final class SearchFirstStringNode extends Node { return null; } - private boolean isCacheValid(RAbstractStringVector target, int targetLength, // + private boolean isCacheValid(RAbstractStringVector target, int targetLength, RAbstractStringVector elements, int elementsLength, int[] cached) { int cachedLength = cached.length; if (elementsLength != cachedLength) { 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 4b3a19907c7d4ba592ee63ebe20d076e1632b40f..5c7e80a72e139c0ad771e32f73ce753d7a27844b 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 @@ -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 @@ -124,7 +124,7 @@ abstract class WriteIndexedVectorNode extends Node { return false; } - public final void apply(RAbstractVector left, int leftLength, // + public final void apply(RAbstractVector left, int leftLength, Object[] positions, RTypedValue right, int rightLength, int[] positionTargetDimensions) { assert left.getLength() == leftLength; assert totalDimensions == positions.length : "totalDimensions must be constant per vector write node"; @@ -152,16 +152,16 @@ abstract class WriteIndexedVectorNode extends Node { firstTargetDimension = dimensionValueProfile.profile(positionTargetDimensions[dimensionIndex]); } - applyImpl(left, leftStore, 0, leftLength, positionTargetDimensions, firstTargetDimension, // - positions, initialPositionOffset, // + applyImpl(left, leftStore, 0, leftLength, positionTargetDimensions, firstTargetDimension, + positions, initialPositionOffset, right, rightStore, 0, rightLength, false); } private final ConditionProfile positionMatchesTargetDimensionsProfile = ConditionProfile.createBinaryProfile(); private int applyImpl(// - RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, int targetDimension, // - Object[] positions, int positionOffset, // + RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, int targetDimension, + Object[] positions, int positionOffset, RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA) { Object position = positionClassProfile.profile(positions[dimensionIndex]); @@ -173,8 +173,8 @@ abstract class WriteIndexedVectorNode extends Node { } else { newPositionOffset = positionOffsetProfile.profile(positionOffset / targetDimension); } - return execute(left, leftStore, leftBase, leftLength, targetDimensions, targetDimension, // - positions, position, newPositionOffset, positionLength, // + return execute(left, leftStore, leftBase, leftLength, targetDimensions, targetDimension, + positions, position, newPositionOffset, positionLength, right, rightStore, rightBase, rightLength, parentNA); } @@ -186,15 +186,15 @@ abstract class WriteIndexedVectorNode extends Node { } } - protected abstract int execute(RAbstractVector left, Object leftStore, int storeBase, int storeLength, Object targetDimensions, int targetDimension, // - Object[] positions, Object position, int positionOffset, int positionLength, // + protected abstract int execute(RAbstractVector left, Object leftStore, int storeBase, int storeLength, Object targetDimensions, int targetDimension, + Object[] positions, Object position, int positionOffset, int positionLength, RTypedValue right, Object rightStore, int valueBase, int valueLength, boolean parentNA); @SuppressWarnings("unused") @Specialization - protected int doMissing(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, int targetDimension, // - Object[] positions, RMissing position, int positionOffset, int positionLength, // - RAbstractContainer right, Object rightStore, int rightBase, int rightLength, boolean parentNA, // + protected int doMissing(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, int targetDimension, + Object[] positions, RMissing position, int positionOffset, int positionLength, + RAbstractContainer right, Object rightStore, int rightBase, int rightLength, boolean parentNA, @Cached("createCountingProfile()") LoopConditionProfile profile) { initRightIndexCheck(rightBase, targetDimension, leftLength, rightLength); @@ -202,18 +202,18 @@ abstract class WriteIndexedVectorNode extends Node { profile.profileCounted(targetDimension); for (int positionValue = 0; profile.inject(positionValue < targetDimension); positionValue += 1) { rightIndex = applyInner(// - left, leftStore, leftBase, leftLength, targetDimensions, // - positions, positionOffset, positionValue, // + left, leftStore, leftBase, leftLength, targetDimensions, + positions, positionOffset, positionValue, right, rightStore, rightLength, rightIndex, parentNA); } return rightIndex; } @Specialization - 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, // + 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("createCountingProfile()") LoopConditionProfile profile) { positionNACheck.enable(!skipNA && !position.isComplete()); @@ -239,8 +239,8 @@ abstract class WriteIndexedVectorNode extends Node { isNA = true; } rightIndex = applyInner(// - left, leftStore, leftBase, leftLength, targetDimensions, // - positions, positionOffset, i, // + left, leftStore, leftBase, leftLength, targetDimensions, + positions, positionOffset, i, right, rightStore, rightLength, rightIndex, isNA || parentNA); } positionIndex = Utils.incMod(positionIndex, positionLength); @@ -257,12 +257,12 @@ abstract class WriteIndexedVectorNode extends Node { * @throws SlowPathException */ @Specialization(rewriteOn = SlowPathException.class) - protected int doIntegerSequencePosition(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, @SuppressWarnings("unused") int targetDimension, // - Object[] positions, RIntSequence position, int positionOffset, int positionLength, // - RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA, // - @Cached("create()") IntValueProfile startProfile, // - @Cached("create()") IntValueProfile strideProfile, // - @Cached("createBinaryProfile()") ConditionProfile conditionProfile, // + protected int doIntegerSequencePosition(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, @SuppressWarnings("unused") int targetDimension, + Object[] positions, RIntSequence position, int positionOffset, int positionLength, + RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA, + @Cached("create()") IntValueProfile startProfile, + @Cached("create()") IntValueProfile strideProfile, + @Cached("createBinaryProfile()") ConditionProfile conditionProfile, @Cached("createCountingProfile()") LoopConditionProfile profile) throws SlowPathException { // skip NA check. sequences never contain NA values. int rightIndex = rightBase; @@ -280,8 +280,8 @@ abstract class WriteIndexedVectorNode extends Node { profile.profileCounted(positionLength); for (int positionValue = start; profile.inject(ascending ? positionValue < end : positionValue > end); positionValue += stride) { rightIndex = applyInner(// - left, leftStore, leftBase, leftLength, targetDimensions, // - positions, positionOffset, positionValue, // + left, leftStore, leftBase, leftLength, targetDimensions, + positions, positionOffset, positionValue, right, rightStore, rightLength, rightIndex, parentNA); } return rightIndex; @@ -307,9 +307,9 @@ abstract class WriteIndexedVectorNode extends Node { * store. This might not be always true and could benefit from more investigation. */ @Specialization(contains = "doIntegerSequencePosition") - protected int doIntegerPosition(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, @SuppressWarnings("unused") int targetDimension, // - Object[] positions, RAbstractIntVector position, int positionOffset, int positionLength, // - RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA, // + protected int doIntegerPosition(RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, @SuppressWarnings("unused") int targetDimension, + Object[] positions, RAbstractIntVector position, int positionOffset, int positionLength, + RTypedValue right, Object rightStore, int rightBase, int rightLength, boolean parentNA, @Cached("createCountingProfile()") LoopConditionProfile lengthProfile) { positionNACheck.enable(position); int rightIndex = rightBase; @@ -326,8 +326,8 @@ abstract class WriteIndexedVectorNode extends Node { } } rightIndex = applyInner(// - left, leftStore, leftBase, leftLength, targetDimensions, // - positions, positionOffset, positionValue - 1, // + left, leftStore, leftBase, leftLength, targetDimensions, + positions, positionOffset, positionValue - 1, right, rightStore, rightLength, rightIndex, isNA || parentNA); } return rightIndex; @@ -335,8 +335,8 @@ abstract class WriteIndexedVectorNode extends Node { @SuppressWarnings("all") private int applyInner(// - RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, // - Object[] positions, int positionOffset, int positionValue, // + RAbstractVector left, Object leftStore, int leftBase, int leftLength, Object targetDimensions, + Object[] positions, int positionOffset, int positionValue, RTypedValue right, Object rightStore, int rightLength, int rightIndex, boolean isNA) { int newTargetIndex = leftBase + positionValue * positionOffset; if (dimensionIndex == 0) { @@ -371,8 +371,8 @@ abstract class WriteIndexedVectorNode extends Node { // generate another for-loop for other dimensions int nextTargetDimension = innerVectorNode.dimensionValueProfile.profile(((int[]) targetDimensions)[innerVectorNode.dimensionIndex]); return innerVectorNode.applyImpl(// - left, leftStore, newTargetIndex, leftLength, targetDimensions, nextTargetDimension, // - positions, positionOffset, // + left, leftStore, newTargetIndex, leftLength, targetDimensions, nextTargetDimension, + positions, positionOffset, right, rightStore, rightIndex, rightLength, isNA); } } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/AttributeIterativeAccessNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/AttributeIterativeAccessNode.java index 525c7491fe44c695ec4b011174e7c4b84e092a0e..5c3512aab3dc47b5d441e89dde30cfaf9ffd1e71 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/AttributeIterativeAccessNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/AttributeIterativeAccessNode.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 @@ -82,5 +82,4 @@ public abstract class AttributeIterativeAccessNode extends RBaseNode { protected static Object readProperty(DynamicObject attrs, Shape shape, final Property prop) { return prop.get(attrs, shape); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java index 78faca3c4d6bfe0b214b34a5ee689421b0ccad47..312e5a7de419c353ac5b8a5446d7e8eac69f192e 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/CopyAttributesNode.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 @@ -199,16 +199,16 @@ public abstract class CopyAttributesNode extends RBaseNode { } @Specialization(guards = {"leftLength < rightLength", "containsMetadata(left) || containsMetadata(right)"}) - protected RAbstractVector copyShorter(RAbstractVector target, RAbstractVector left, @SuppressWarnings("unused") int leftLength, RAbstractVector right, @SuppressWarnings("unused") int rightLength, // - @Cached("create()") CopyOfRegAttributesNode copyOfReg, // - @Cached("createBinaryProfile()") ConditionProfile rightNotResultProfile, // - @Cached("create()") BranchProfile leftHasDimensions, // - @Cached("create()") BranchProfile rightHasDimensions, // - @Cached("create()") BranchProfile noDimensions, // - @Cached("createNames()") SetFixedAttributeNode putNames, // - @Cached("createDim()") SetFixedAttributeNode putDim, // - @Cached("create()") InitAttributesNode initAttributes, // - @Cached("createBinaryProfile()") ConditionProfile hasNames, // + protected RAbstractVector copyShorter(RAbstractVector target, RAbstractVector left, @SuppressWarnings("unused") int leftLength, RAbstractVector right, @SuppressWarnings("unused") int rightLength, + @Cached("create()") CopyOfRegAttributesNode copyOfReg, + @Cached("createBinaryProfile()") ConditionProfile rightNotResultProfile, + @Cached("create()") BranchProfile leftHasDimensions, + @Cached("create()") BranchProfile rightHasDimensions, + @Cached("create()") BranchProfile noDimensions, + @Cached("createNames()") SetFixedAttributeNode putNames, + @Cached("createDim()") SetFixedAttributeNode putDim, + @Cached("create()") InitAttributesNode initAttributes, + @Cached("createBinaryProfile()") ConditionProfile hasNames, @Cached("createBinaryProfile()") ConditionProfile hasDimNames, @Cached("create()") GetDimAttributeNode getLeftDimsNode, @Cached("create()") GetDimAttributeNode getRightDimsNode, @@ -256,15 +256,15 @@ public abstract class CopyAttributesNode extends RBaseNode { } @Specialization(guards = {"leftLength > rightLength", "containsMetadata(left) || containsMetadata(right)"}) - protected RAbstractVector copyLonger(RAbstractVector target, RAbstractVector left, @SuppressWarnings("unused") int leftLength, RAbstractVector right, @SuppressWarnings("unused") int rightLength, // - @Cached("create()") CopyOfRegAttributesNode copyOfReg, // - @Cached("create()") BranchProfile leftHasDimensions, // - @Cached("create()") BranchProfile rightHasDimensions, // - @Cached("create()") BranchProfile noDimensions, // - @Cached("createNames()") SetFixedAttributeNode putNames, // - @Cached("createDim()") SetFixedAttributeNode putDim, // - @Cached("create()") InitAttributesNode initAttributes, // - @Cached("createBinaryProfile()") ConditionProfile hasNames, // + protected RAbstractVector copyLonger(RAbstractVector target, RAbstractVector left, @SuppressWarnings("unused") int leftLength, RAbstractVector right, @SuppressWarnings("unused") int rightLength, + @Cached("create()") CopyOfRegAttributesNode copyOfReg, + @Cached("create()") BranchProfile leftHasDimensions, + @Cached("create()") BranchProfile rightHasDimensions, + @Cached("create()") BranchProfile noDimensions, + @Cached("createNames()") SetFixedAttributeNode putNames, + @Cached("createDim()") SetFixedAttributeNode putDim, + @Cached("create()") InitAttributesNode initAttributes, + @Cached("createBinaryProfile()") ConditionProfile hasNames, @Cached("createBinaryProfile()") ConditionProfile hasDimNames, @Cached("create()") GetDimAttributeNode getLeftDimsNode, @Cached("create()") GetDimAttributeNode getRightDimsNode, diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/HasFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/HasFixedAttributeNode.java index fdff7b2c0f7c3418a2847f03020d043e0473e74f..ec1a84268eac98fc227bd131fdeeccf9d340e78a 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/HasFixedAttributeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/HasFixedAttributeNode.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 @@ -105,5 +105,4 @@ public abstract class HasFixedAttributeNode extends FixedAttributeAccessNode { return recursive.execute(attributes); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveAttributeNode.java index 7556cd1613c14159e1d1e8ca7310a8241ab76976..ae2dd9904e268fd3f78d3114bf9e111d93a175fd 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveAttributeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveAttributeNode.java @@ -100,7 +100,5 @@ public abstract class RemoveAttributeNode extends AttributeAccessNode { emptyAttrProfile.enter(); x.initAttributes(null); } - } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java index f2cffdb68baf38fe5996a37d4cc3f2bebebbee73..a88a6bf2615bbb663dbb8e7133192e95dc09a5dd 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/RemoveFixedAttributeNode.java @@ -117,7 +117,5 @@ public abstract class RemoveFixedAttributeNode extends FixedAttributeAccessNode emptyAttrProfile.enter(); x.initAttributes(null); } - } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java index 10c91bce2499c7bd5398c7adaa29d225fa3bcd79..8a8459086e495ab6bd45bd3def4026b343952725 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.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 @@ -150,5 +150,4 @@ public abstract class SetFixedAttributeNode extends FixedAttributeAccessNode { updateRefCountNode.execute(value); } - } 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 c704588bb64b8d3b0a50369c98dbd9202fa57fe4..09fa0a6a7f0875f63ca1038a81ba44182580a644 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 @@ -283,7 +283,6 @@ public final class SpecialAttributesFunctions { x.initAttributes(null); } } - } public abstract static class SetNamesAttributeNode extends SetSpecialAttributeNode { @@ -585,7 +584,6 @@ public final class SpecialAttributesFunctions { throw RError.error(this, RError.Message.DIMS_DONT_MATCH_LENGTH, length, vectorLength); } } - } public abstract static class RemoveDimAttributeNode extends RemoveSpecialAttributeNode { @@ -603,7 +601,6 @@ public final class SpecialAttributesFunctions { protected void removeAttrFallback(DynamicObject attrs) { super.removeAttrFallback(attrs); } - } public abstract static class GetDimAttributeNode extends GetFixedAttributeNode { @@ -713,7 +710,6 @@ public final class SpecialAttributesFunctions { throw RError.error(RError.SHOW_CALLER2, RError.Message.OBJECT_NOT_MATRIX); } } - } public abstract static class SetDimNamesAttributeNode extends SetSpecialAttributeNode { @@ -828,7 +824,6 @@ public final class SpecialAttributesFunctions { RAbstractContainer xProfiled = contClassProfile.profile(x); xProfiled.setDimNames(dimNames); } - } public abstract static class RemoveDimNamesAttributeNode extends RemoveSpecialAttributeNode { @@ -894,7 +889,6 @@ public final class SpecialAttributesFunctions { @Cached("createClassProfile()") ValueProfile xTypeProfile) { return xTypeProfile.profile(x).getDimNames(); } - } public abstract static class SetRowNamesAttributeNode extends SetSpecialAttributeNode { @@ -956,7 +950,6 @@ public final class SpecialAttributesFunctions { RAbstractContainer xProfiled = contClassProfile.profile(x); xProfiled.setRowNames(rowNames); } - } public abstract static class RemoveRowNamesAttributeNode extends RemoveSpecialAttributeNode { @@ -1028,7 +1021,6 @@ public final class SpecialAttributesFunctions { protected Object getVectorRowNames(RAbstractContainer x) { return x.getRowNames(); } - } public abstract static class SetClassAttributeNode extends SetSpecialAttributeNode { @@ -1113,7 +1105,6 @@ public final class SpecialAttributesFunctions { @Cached("create()") RemoveClassAttributeNode removeClassNode) { removeClassNode.execute(x); } - } public abstract static class RemoveClassAttributeNode extends RemoveSpecialAttributeNode { @@ -1131,7 +1122,6 @@ public final class SpecialAttributesFunctions { protected void removeAttrFallback(DynamicObject attrs) { super.removeAttrFallback(attrs); } - } public abstract static class GetClassAttributeNode extends GetFixedAttributeNode { @@ -1157,7 +1147,5 @@ public final class SpecialAttributesFunctions { RStringVector result = v instanceof RStringVector ? (RStringVector) v : x.getImplicitClass(); return result != null ? result : RDataFactory.createEmptyStringVector(); } - } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/TypeFromModeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/TypeFromModeNode.java index e135aee931d8150329d0e36f0583ad088dbf0214..f44b724a1de132f9d5fa001283a452ed6e831f30 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/TypeFromModeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/TypeFromModeNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 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 @@ -42,8 +42,8 @@ public abstract class TypeFromModeNode extends Node { @SuppressWarnings("unused") @Specialization(limit = "CACHE_LIMIT", guards = "mode == cachedMode") - protected RType getTypeCAched(String mode, // - @Cached("mode") String cachedMode, // + protected RType getTypeCAched(String mode, + @Cached("mode") String cachedMode, @Cached("fromMode(mode)") RType type) { return type; } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java index c31cd1da74a52ee0c2792e5dba579aafb2a7be56..825f77d54cfdd8d53e6650d6d168b04568570be3 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/UnaryCopyAttributesNode.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 @@ -81,16 +81,16 @@ public abstract class UnaryCopyAttributesNode extends RBaseNode { } @Specialization(guards = {"!copyAllAttributes || target != source", "containsMetadata(source)"}) - protected RAbstractVector copySameLength(RAbstractVector target, RAbstractVector source, // - @Cached("create()") CopyOfRegAttributesNode copyOfReg, // - @Cached("createDim()") RemoveFixedAttributeNode removeDim, // - @Cached("createDimNames()") RemoveFixedAttributeNode removeDimNames, // - @Cached("create()") InitAttributesNode initAttributes, // - @Cached("createNames()") SetFixedAttributeNode putNames, // - @Cached("createDim()") SetFixedAttributeNode putDim, // - @Cached("createDimNames()") SetFixedAttributeNode putDimNames, // - @Cached("createBinaryProfile()") ConditionProfile noDimensions, // - @Cached("createBinaryProfile()") ConditionProfile hasNamesSource, // + protected RAbstractVector copySameLength(RAbstractVector target, RAbstractVector source, + @Cached("create()") CopyOfRegAttributesNode copyOfReg, + @Cached("createDim()") RemoveFixedAttributeNode removeDim, + @Cached("createDimNames()") RemoveFixedAttributeNode removeDimNames, + @Cached("create()") InitAttributesNode initAttributes, + @Cached("createNames()") SetFixedAttributeNode putNames, + @Cached("createDim()") SetFixedAttributeNode putDim, + @Cached("createDimNames()") SetFixedAttributeNode putDimNames, + @Cached("createBinaryProfile()") ConditionProfile noDimensions, + @Cached("createBinaryProfile()") ConditionProfile hasNamesSource, @Cached("createBinaryProfile()") ConditionProfile hasDimNames, @Cached("create()") GetDimAttributeNode getDimsNode) { RVector<?> result = target.materialize(); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java index 5c4f5aba504eedb5ab86c6d5609f4f3b088057c7..d7496e23c62855076f561a549910bac0ec4e5ce6 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryArithmeticNode.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 @@ -78,15 +78,15 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode { } @Specialization(limit = "CACHE_LIMIT", guards = {"cached != null", "cached.isSupported(left, right)"}) - protected Object doNumericVectorCached(Object left, Object right, // + protected Object doNumericVectorCached(Object left, Object right, @Cached("createFastCached(left, right)") BinaryMapNode cached) { return cached.apply(left, right); } @Specialization(contains = "doNumericVectorCached", guards = {"isNumericVector(left)", "isNumericVector(right)"}) @TruffleBoundary - protected Object doNumericVectorGeneric(Object left, Object right, // - @Cached("binary.createOperation()") BinaryArithmetic arithmetic, // + protected Object doNumericVectorGeneric(Object left, Object right, + @Cached("binary.createOperation()") BinaryArithmetic arithmetic, @Cached("new(createCached(arithmetic, left, right))") GenericNumericVectorNode generic) { RAbstractVector leftVector = (RAbstractVector) left; RAbstractVector rightVector = (RAbstractVector) right; @@ -106,7 +106,7 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode { @Specialization @SuppressWarnings("unused") - protected Object doUnary(Object left, RMissing right, // + protected Object doUnary(Object left, RMissing right, @Cached("createUnaryArithmeticNode()") UnaryArithmeticNode unaryNode) { return unaryNode.execute(left); } @@ -127,7 +127,7 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode { } @Specialization(guards = {"isNumericVector(right)"}) - protected static Object doLeftNull(@SuppressWarnings("unused") RNull left, Object right, // + protected static Object doLeftNull(@SuppressWarnings("unused") RNull left, Object right, @Cached("createClassProfile()") ValueProfile classProfile) { if (((RAbstractVector) classProfile.profile(right)).getRType() == RType.Complex) { return RDataFactory.createEmptyComplexVector(); @@ -137,7 +137,7 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode { } @Specialization(guards = {"isNumericVector(left)"}) - protected static Object doRightNull(Object left, RNull right, // + protected static Object doRightNull(Object left, RNull right, @Cached("createClassProfile()") ValueProfile classProfile) { return doLeftNull(right, left, classProfile); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanNode.java index 642a2c0c210b294cc505dd133e7ada3d3cb8ac44..2464725d5b8e47e3c3b9bb2baecbcf50204d6451 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanNode.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 @@ -88,15 +88,15 @@ public abstract class BinaryBooleanNode extends RBuiltinNode { } @Specialization(limit = "CACHE_LIMIT", guards = {"cached != null", "cached.isSupported(left, right)"}) - protected Object doNumericVectorCached(Object left, Object right, // + protected Object doNumericVectorCached(Object left, Object right, @Cached("createFastCached(left, right)") BinaryMapNode cached) { return cached.apply(left, right); } @Specialization(contains = "doNumericVectorCached", guards = "isSupported(left, right)") @TruffleBoundary - protected Object doNumericVectorGeneric(Object left, Object right, // - @Cached("factory.createOperation()") BooleanOperation operation, // + protected Object doNumericVectorGeneric(Object left, Object right, + @Cached("factory.createOperation()") BooleanOperation operation, @Cached("new(createCached(operation, left, right))") GenericNumericVectorNode generic) { RAbstractVector leftVector = (RAbstractVector) left; RAbstractVector rightVector = (RAbstractVector) right; @@ -130,7 +130,7 @@ public abstract class BinaryBooleanNode extends RBuiltinNode { } @Specialization(guards = {"isSymbolOrLang(left) || isSymbolOrLang(right)"}) - protected Object doSymbol(VirtualFrame frame, Object left, Object right, // + protected Object doSymbol(VirtualFrame frame, Object left, Object right, @Cached("createRecursive()") BinaryBooleanNode recursive) { Object recursiveLeft = left; if (isSymbolOrLang(left)) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanSpecial.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanSpecial.java index 1a93af53656d1dc6c0d57ab6e5dd3892d7492a18..d2f20e7dc55291c899d70ea270a008d20919a044 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanSpecial.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/BinaryBooleanSpecial.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 @@ -88,5 +88,4 @@ public abstract class BinaryBooleanSpecial extends RNode { public void doFallback(Object left, Object right) { throw RSpecialFactory.throwFullCallNeeded(); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/CastTypeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/CastTypeNode.java index 245067ec8469059f34357adc436ef56abbfef8a0..3b823312a6187ee801e7e9346a400331215b565e 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/CastTypeNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/binary/CastTypeNode.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -43,8 +43,8 @@ public abstract class CastTypeNode extends BinaryNode { @SuppressWarnings("unused") @Specialization(guards = {"typeof.execute(value) != type", "type == cachedType", "!isNull(cast)"}, limit = "NUMBER_OF_TYPES") - protected static Object doCast(RAbstractVector value, RType type, // - @Cached("type") RType cachedType, // + protected static Object doCast(RAbstractVector value, RType type, + @Cached("type") RType cachedType, @Cached("createCast(cachedType)") CastNode cast) { return cast.execute(value); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ArgumentFilter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ArgumentFilter.java index 005315e5ec1539329e94abff71f65b8aaa39a0e0..4f90f01ccf446325b826a7cc42736feb3fda675e 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ArgumentFilter.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ArgumentFilter.java @@ -43,10 +43,8 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } - } interface ArgumentValueFilter<T> extends NarrowingArgumentFilter<T, T> { @@ -65,7 +63,6 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } @@ -83,7 +80,6 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } @@ -101,7 +97,6 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } @@ -112,10 +107,8 @@ public interface ArgumentFilter<T, R> { public boolean test(T arg) { return !ArgumentValueFilter.this.test(arg); } - }; } - } interface ArgumentTypeFilter<T, R extends T> extends NarrowingArgumentFilter<T, R> { @@ -135,7 +128,6 @@ public interface ArgumentFilter<T, R> { return other.test((R) arg); } } - }; } @@ -154,14 +146,12 @@ public interface ArgumentFilter<T, R> { return other.test((R) arg); } } - }; } default InverseArgumentFilter<T, R> not() { return new InverseArgumentFilter<>(this); } - } class InverseArgumentFilter<T, R extends T> implements ArgumentFilter<T, Object> { @@ -195,7 +185,6 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } @@ -213,14 +202,11 @@ public interface ArgumentFilter<T, R> { return other.test(arg); } } - }; } public <S extends T> InverseArgumentFilter<T, T> and(InverseArgumentFilter<T, S> other) { return new InverseArgumentFilter<>(other.orig.or(this.orig)); } - } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/TypePredicateArgumentFilter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/TypePredicateArgumentFilter.java index 7039100cfeba7597f792fc97087049e1a3db5d42..0bbf0c91f6ba2f1c31418b6c545a5689bc2ffef7 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/TypePredicateArgumentFilter.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/TypePredicateArgumentFilter.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 @@ -35,5 +35,4 @@ public class TypePredicateArgumentFilter<T, R extends T> extends AbstractPredica public static <T, R extends T> TypePredicateArgumentFilter<T, R> fromLambda(Predicate<? super T> predicate) { return new TypePredicateArgumentFilter<>(predicate); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentFilter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentFilter.java index d59ba742832614c52875e1de16af88e3c5a4833b..b3ae8175a0bdda03408fec24fd7ede8271054469 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentFilter.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentFilter.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 @@ -35,5 +35,4 @@ public class ValuePredicateArgumentFilter<T> extends AbstractPredicateArgumentFi public static <T> ValuePredicateArgumentFilter<T> fromLambda(Predicate<? super T> predicate) { return new ValuePredicateArgumentFilter<>(predicate); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentMapper.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentMapper.java index c7cae7f3f0852f9c6f491d3586a81185b957787d..599fba22106eb1bdf440b0ad5ec40e10e3477b31 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentMapper.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ValuePredicateArgumentMapper.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 @@ -40,5 +40,4 @@ public class ValuePredicateArgumentMapper<T, R> implements ArgumentMapper<T, R> public static <T, R> ValuePredicateArgumentMapper<T, R> fromLambda(Function<T, R> mapper) { return new ValuePredicateArgumentMapper<>(mapper); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/VectorPredicateArgumentFilter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/VectorPredicateArgumentFilter.java index 23ee19681bf47a7eb830275c0e433eaef763651c..d0fb8a0dfcfe002fcd67e416573892a7d9b3d2aa 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/VectorPredicateArgumentFilter.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/VectorPredicateArgumentFilter.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 @@ -31,5 +31,4 @@ public class VectorPredicateArgumentFilter<T extends RAbstractVector> extends Va public VectorPredicateArgumentFilter(Predicate<T> valuePredicate) { super(valuePredicate); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java index 94badcc9ef9aa51e4b3350e89ee6363823f6ba74..a5d0b2e43e37ac9a1b4561d27abed52785d20261 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.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 @@ -167,7 +167,6 @@ public abstract class Filter<T, R extends T> { public <D> D accept(SubjectVisitor<D> visitor, byte operation) { return visitor.visit(this, operation); } - } public static final class NATest implements Subject { @@ -181,7 +180,6 @@ public abstract class Filter<T, R extends T> { public <D> D accept(SubjectVisitor<D> visitor, byte operation) { return visitor.visit(this, operation); } - } public static final class StringLength implements Subject { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineStep.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineStep.java index a13c29fc1cad2114fe791f136ffc9d55f9f91550..a253a907b280a9608138be1440860a102ed882ff 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineStep.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineStep.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 @@ -85,7 +85,6 @@ public abstract class PipelineStep<T, R> { public MessageData getDefaultMessage() { return defaultMessage; } - } public static final class DefaultErrorStep<T> extends DefaultMessageStep<T> { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java index 62a36d3fe0dbd00861a40a3e90e59a382b70cbcd..b4a6b63bbc6a128d60df7c906e6c26a57d762745 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.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 @@ -736,7 +736,6 @@ public final class PipelineToCastNode { throw RInternalError.unimplemented("TODO: more operations here"); } } - } public interface ArgumentMapperFactory { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/ArgCastBuilder.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/ArgCastBuilder.java index 3811fe65a1a8c14bd7f061d0f9b35a05eded4909..6ff73bb1fab346efdcf8b842956a56366326cd5a 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/ArgCastBuilder.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/ArgCastBuilder.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 @@ -78,5 +78,4 @@ public class ArgCastBuilder<T, THIS> { public <R, THAT extends ArgCastBuilder<R, THAT>> THAT alias(Function<THIS, THAT> aliaser) { return aliaser.apply((THIS) this); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/HeadPhaseBuilder.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/HeadPhaseBuilder.java index c4c3a362e60a82a424c75a505ee01aca9c351561..7248195f5929cd72ffc74fde254075821df3d0bb 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/HeadPhaseBuilder.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/HeadPhaseBuilder.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 @@ -134,5 +134,4 @@ public final class HeadPhaseBuilder<T> extends ArgCastBuilder<T, HeadPhaseBuilde pipelineBuilder().appendNotNA(naReplacement, null, null, null); return this; } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/InitialPhaseBuilder.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/InitialPhaseBuilder.java index 7f6d3923f831bd495ec9be66d0acbc55933de585..9b0cbf6d2917fa6616a161c70cb4556958d1856a 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/InitialPhaseBuilder.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/fluent/InitialPhaseBuilder.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 @@ -221,5 +221,4 @@ public class InitialPhaseBuilder<T> extends ArgCastBuilder<T, InitialPhaseBuilde pipelineBuilder().appendAsAttributable(preserveNames, preserveDimensions, preserveAttributes); return new HeadPhaseBuilder<>(pipelineBuilder()); } - } 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 8e95b4d88ee8894e2589fdae8c976ce1f91b26d0..1e9af02a1fa353f8a9ab2e16d67806abc9361cdd 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 @@ -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 @@ -90,8 +90,8 @@ public abstract class RLengthNode extends RNode { } @Specialization(guards = {"cachedClass != null", "cachedClass == operand.getClass()"}) - protected int doCachedContainer(Object operand, // - @Cached("getContainerClass(operand)") Class<? extends RAbstractContainer> cachedClass, // + protected int doCachedContainer(Object operand, + @Cached("getContainerClass(operand)") Class<? extends RAbstractContainer> cachedClass, @Cached("create()") VectorLengthProfile lengthProfile) { return lengthProfile.profile(cachedClass.cast(operand).getLength()); } @@ -135,8 +135,8 @@ public abstract class RLengthNode extends RNode { } @Specialization(guards = "isForeignObject(object)") - protected int getForeignSize(VirtualFrame frame, TruffleObject object, // - @Cached("createHasSize()") Node hasSizeNode, // + protected int getForeignSize(VirtualFrame frame, TruffleObject object, + @Cached("createHasSize()") Node hasSizeNode, @Cached("createGetSize()") Node getSizeNode) { try { if (!(boolean) ForeignAccess.send(hasSizeNode, frame, object)) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/AsRealNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/AsRealNode.java index 63ac38812df9812ada58db08c12afb391ddc3175..cfca08ce67c7e0a3170bbd9f667709baf99665ab 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/AsRealNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/AsRealNode.java @@ -90,7 +90,5 @@ public abstract class AsRealNode extends Node { } else { return false; } - } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java index 7f2731c16c21bafacd51dcdc50294d4ba343fa98..e4d4d6172bd38663779bdd0a7fd6cc274250602e 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java @@ -114,8 +114,8 @@ public abstract class ClassHierarchyNode extends UnaryNode { } @Specialization - protected RStringVector getClassHrAttributable(RAttributable arg, // - @Cached("createBinaryProfile()") ConditionProfile attrStorageProfile, // + protected RStringVector getClassHrAttributable(RAttributable arg, + @Cached("createBinaryProfile()") ConditionProfile attrStorageProfile, @Cached("createClassProfile()") ValueProfile argProfile) { DynamicObject attributes; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java index 9e0477b8a488117f4f6559bda63218b693398cb2..33b8ab931997bb60c4d40eacdc3ffea50a0676ea 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java @@ -204,7 +204,6 @@ public final class FunctionDefinitionNode extends RRootNode implements RSyntaxNo if (directBuiltin != null && directBuiltin.isSplitCaller()) { return true; } - } for (RSyntaxElement arg : arguments) { if (arg != null && accept(arg)) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java index 35e8fbfd39fdcc815ca2ddb0c5e00243abd81a49..c8ac9b569c14a8e5701b7fdb1dc64b69c7267abe 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java @@ -250,7 +250,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization(guards = "isDefaultDispatch(function)") - public Object call(VirtualFrame frame, RFunction function, // + public Object call(VirtualFrame frame, RFunction function, @Cached("createUninitializedCall()") FunctionDispatch call) { return call.execute(frame, function, lookupVarArgs(frame), null, null); } @@ -273,13 +273,13 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization(guards = {"explicitArgs == null", "isInternalGenericDispatch(function)"}) - public Object callInternalGeneric(VirtualFrame frame, RFunction function, // - @Cached("createDispatchArgument(0)") RNode dispatchArgument, // - @Cached("new()") TemporarySlotNode dispatchTempSlot, // - @Cached("create()") ClassHierarchyNode classHierarchyNode, // - @Cached("createWithError()") S3FunctionLookupNode dispatchLookup, // - @Cached("createIdentityProfile()") ValueProfile builtinProfile, // - @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfile, // + public Object callInternalGeneric(VirtualFrame frame, RFunction function, + @Cached("createDispatchArgument(0)") RNode dispatchArgument, + @Cached("new()") TemporarySlotNode dispatchTempSlot, + @Cached("create()") ClassHierarchyNode classHierarchyNode, + @Cached("createWithError()") S3FunctionLookupNode dispatchLookup, + @Cached("createIdentityProfile()") ValueProfile builtinProfile, + @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfile, @Cached("createBinaryProfile()") ConditionProfile resultIsBuiltinProfile) { RBuiltinDescriptor builtin = builtinProfile.profile(function.getRBuiltin()); Object dispatchObject = dispatchArgument.execute(frame); @@ -315,13 +315,13 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization(guards = {"explicitArgs != null", "isInternalGenericDispatch(function)"}) - public Object callInternalGenericExplicit(VirtualFrame frame, RFunction function, // - @Cached("create()") ClassHierarchyNode classHierarchyNode, // - @Cached("createWithError()") S3FunctionLookupNode dispatchLookup, // - @Cached("createIdentityProfile()") ValueProfile builtinProfile, // - @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfile, // - @Cached("createBinaryProfile()") ConditionProfile resultIsBuiltinProfile, // - @Cached("createPromiseHelper()") PromiseCheckHelperNode promiseHelperNode, // + public Object callInternalGenericExplicit(VirtualFrame frame, RFunction function, + @Cached("create()") ClassHierarchyNode classHierarchyNode, + @Cached("createWithError()") S3FunctionLookupNode dispatchLookup, + @Cached("createIdentityProfile()") ValueProfile builtinProfile, + @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfile, + @Cached("createBinaryProfile()") ConditionProfile resultIsBuiltinProfile, + @Cached("createPromiseHelper()") PromiseCheckHelperNode promiseHelperNode, @Cached("createUninitializedExplicitCall()") FunctionDispatch call) { RBuiltinDescriptor builtin = builtinProfile.profile(function.getRBuiltin()); RArgsValuesAndNames argAndNames = (RArgsValuesAndNames) explicitArgs.execute(frame); @@ -368,20 +368,20 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS @CompilationFinal private boolean summaryGroupHasNaRmCached; @Specialization(guards = "isGroupGenericDispatch(function)") - public Object callGroupGeneric(VirtualFrame frame, RFunction function, // - @Cached("createArguments()") CallArgumentsNode callArguments, // - @Cached("create()") ClassHierarchyNode classHierarchyNodeX, // - @Cached("createWithException()") S3FunctionLookupNode dispatchLookupX, // - @Cached("create()") ClassHierarchyNode classHierarchyNodeY, // - @Cached("createWithException()") S3FunctionLookupNode dispatchLookupY, // - @Cached("createIdentityProfile()") ValueProfile builtinProfile, // - @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfileX, // - @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfileY, // - @Cached("createBinaryProfile()") ConditionProfile mismatchProfile, // - @Cached("createBinaryProfile()") ConditionProfile resultIsBuiltinProfile, // - @Cached("createBinaryProfile()") ConditionProfile summaryGroupNaRmProfile, // - @Cached("createBinaryProfile()") ConditionProfile summaryGroupProfile, // - @Cached("createPromiseHelper()") PromiseCheckHelperNode promiseHelperNode, // + public Object callGroupGeneric(VirtualFrame frame, RFunction function, + @Cached("createArguments()") CallArgumentsNode callArguments, + @Cached("create()") ClassHierarchyNode classHierarchyNodeX, + @Cached("createWithException()") S3FunctionLookupNode dispatchLookupX, + @Cached("create()") ClassHierarchyNode classHierarchyNodeY, + @Cached("createWithException()") S3FunctionLookupNode dispatchLookupY, + @Cached("createIdentityProfile()") ValueProfile builtinProfile, + @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfileX, + @Cached("createBinaryProfile()") ConditionProfile implicitTypeProfileY, + @Cached("createBinaryProfile()") ConditionProfile mismatchProfile, + @Cached("createBinaryProfile()") ConditionProfile resultIsBuiltinProfile, + @Cached("createBinaryProfile()") ConditionProfile summaryGroupNaRmProfile, + @Cached("createBinaryProfile()") ConditionProfile summaryGroupProfile, + @Cached("createPromiseHelper()") PromiseCheckHelperNode promiseHelperNode, @Cached("createUninitializedExplicitCall()") FunctionDispatch call) { Object[] args = explicitArgs != null ? ((RArgsValuesAndNames) explicitArgs.execute(frame)).getArguments() : callArguments.evaluateFlattenObjects(frame, lookupVarArgs(frame)); @@ -523,7 +523,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization(guards = "!isRTypedValue(function)") - public Object call(VirtualFrame frame, TruffleObject function, // + public Object call(VirtualFrame frame, TruffleObject function, @Cached("createForeignCall()") ForeignCall foreignCall) { return foreignCall.execute(frame, function); } @@ -661,9 +661,9 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization(limit = "CACHE_SIZE", guards = "function.getTarget() == cachedTarget") - protected Object dispatch(VirtualFrame frame, RFunction function, Object varArgs, Object s3Args, Object s3DefaultArguments, // - @Cached("function.getTarget()") @SuppressWarnings("unused") RootCallTarget cachedTarget, // - @Cached("createCacheNode(cachedTarget)") LeafCallNode leafCall, // + protected Object dispatch(VirtualFrame frame, RFunction function, Object varArgs, Object s3Args, Object s3DefaultArguments, + @Cached("function.getTarget()") @SuppressWarnings("unused") RootCallTarget cachedTarget, + @Cached("createCacheNode(cachedTarget)") LeafCallNode leafCall, @Cached("createArguments(cachedTarget)") PrepareArguments prepareArguments) { RArgsValuesAndNames orderedArguments = prepareArguments.execute(frame, (RArgsValuesAndNames) varArgs, (S3DefaultArguments) s3DefaultArguments, originalCall); return leafCall.execute(frame, function, orderedArguments, (S3Args) s3Args); @@ -707,7 +707,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS } @Specialization - protected Object dispatchFallback(VirtualFrame frame, RFunction function, Object varArgs, Object s3Args, Object s3DefaultArguments, // + protected Object dispatchFallback(VirtualFrame frame, RFunction function, Object varArgs, Object s3Args, Object s3DefaultArguments, @Cached("createGenericCall()") GenericCall generic) { return generic.execute(frame.materialize(), function, varArgs, s3Args, s3DefaultArguments); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/ReuseNonSharedNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/ReuseNonSharedNode.java index 2c16f2947c28624c1d292ec29d591ea2674a714f..dda1306eb2a7120dca13660a086e6fcd7bb873c3 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/ReuseNonSharedNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/ReuseNonSharedNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -45,8 +45,8 @@ public abstract class ReuseNonSharedNode extends Node { public abstract Object execute(Object value); @Specialization - protected RShareable getStorage(RSharingAttributeStorage value, // - @Cached("createBinaryProfile()") ConditionProfile isSharedProfile, // + protected RShareable getStorage(RSharingAttributeStorage value, + @Cached("createBinaryProfile()") ConditionProfile isSharedProfile, @Cached("createClassProfile()") ValueProfile copyProfile) { if (isSharedProfile.profile(value.isShared())) { RShareable res = copyProfile.profile(value).copy(); @@ -57,7 +57,7 @@ public abstract class ReuseNonSharedNode extends Node { } @Specialization(contains = "getStorage") - protected static RShareable getRShareable(RShareable value, // + protected static RShareable getRShareable(RShareable value, @Cached("createBinaryProfile()") ConditionProfile isSharedProfile) { if (isSharedProfile.profile(value.isShared())) { RShareable res = value.copy(); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/UpdateShareableChildValueNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/UpdateShareableChildValueNode.java index 5a5a903247df6a7bc4e65da814296a21479f43e4..7787564d54026369851f40c0c19a5d2b13548305 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/UpdateShareableChildValueNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/opt/UpdateShareableChildValueNode.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 @@ -98,5 +98,4 @@ public abstract class UpdateShareableChildValueNode extends RBaseNode { protected static boolean isFallback(Object owner, Object value) { return !(value instanceof RShareable) || !(owner instanceof RShareable); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java index 476d02bada8e22c5d41723fd882cdb0bbc2266ac..80b354423480cb2b7819a20ccea9f900aabd1361 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -119,5 +119,4 @@ public class RInstrumentation { } } } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/DispatchGeneric.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/DispatchGeneric.java index ea03075c9a6fe23cf2c4ba80440876339b94c4c8..ffaa9c8bc3a258a36fe8bb69c5dc6d75bc663ffc 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/DispatchGeneric.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/DispatchGeneric.java @@ -6,7 +6,7 @@ * Copyright (c) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka * Copyright (c) 1995-2014, The R Core Team * Copyright (c) 2002-2008, The R Foundation - * Copyright (c) 2015, 2016, Oracle and/or its affiliates + * Copyright (c) 2015, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -83,9 +83,9 @@ public abstract class DispatchGeneric extends RBaseNode { @SuppressWarnings("unused") @Specialization(guards = "equalClasses(classes, cachedClasses)") protected Object dispatchCached(VirtualFrame frame, REnvironment mtable, RStringVector classes, RFunction fdef, String fname, - @Cached("classes") RStringVector cachedClasses, // - @Cached("createDispatchString(cachedClasses)") String dispatchString, // - @Cached("createTableRead(dispatchString)") LocalReadVariableNode tableRead, // + @Cached("classes") RStringVector cachedClasses, + @Cached("createDispatchString(cachedClasses)") String dispatchString, + @Cached("createTableRead(dispatchString)") LocalReadVariableNode tableRead, @Cached("createClassProfile()") ValueProfile frameAccessProfile) { RFunction method = (RFunction) tableRead.execute(frame, mtable.getFrame(frameAccessProfile)); return dispatchInternal(frame, mtable, classes, fdef, fname, method); diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/LoadMethod.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/LoadMethod.java index 298d82873a04bbefda07c6788471b543234a7c10..748dd665f74f59189f17a4bb285a2631bf21adb4 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/LoadMethod.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/objects/LoadMethod.java @@ -6,7 +6,7 @@ * Copyright (c) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka * Copyright (c) 1995-2014, The R Core Team * Copyright (c) 2002-2008, The R Foundation - * Copyright (c) 2015, 2016, Oracle and/or its affiliates + * Copyright (c) 2015, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -67,8 +67,8 @@ abstract class LoadMethod extends RBaseNode { private final BranchProfile noSourceAttr = BranchProfile.create(); @Specialization - protected RFunction loadMethod(VirtualFrame frame, RFunction fdef, String fname, // - @Cached("createClassProfile()") ValueProfile regFrameAccessProfile, // + protected RFunction loadMethod(VirtualFrame frame, RFunction fdef, String fname, + @Cached("createClassProfile()") ValueProfile regFrameAccessProfile, @Cached("createClassProfile()") ValueProfile methodsFrameAccessProfile) { DynamicObject attributes = fdef.getAttributes(); assert attributes != null; // should have at least class attribute @@ -133,11 +133,9 @@ abstract class LoadMethod extends RBaseNode { // slow path ret = (RFunction) RContext.getEngine().evalFunction(currentFunction, frame.materialize(), caller, null, fdef, fname, REnvironment.frameToEnvironment(frame.materialize())); } - } else { ret = fdef; } return ret; } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/BinaryMapNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/BinaryMapNode.java index 029608fbef96911b8aab5dd0c7ff8fcf2d14b254..7ed25db22d9a8235dbb537ef594983591cce0788 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/BinaryMapNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/primitive/BinaryMapNode.java @@ -431,7 +431,7 @@ public final class BinaryMapNode extends RBaseNode { @Specialization(contains = "doScalarScalar", guards = {"leftLength == 1"}) @SuppressWarnings("unused") - protected void doScalarVector(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // + protected void doScalarVector(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, @Cached("createCountingProfile()") LoopConditionProfile profile) { profile.profileCounted(rightLength); for (int i = 0; profile.inject(i < rightLength); ++i) { @@ -441,7 +441,7 @@ public final class BinaryMapNode extends RBaseNode { @Specialization(contains = "doScalarScalar", guards = {"rightLength == 1"}) @SuppressWarnings("unused") - protected void doVectorScalar(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // + protected void doVectorScalar(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, @Cached("createCountingProfile()") LoopConditionProfile profile) { profile.profileCounted(leftLength); for (int i = 0; profile.inject(i < leftLength); ++i) { @@ -451,7 +451,7 @@ public final class BinaryMapNode extends RBaseNode { @Specialization(guards = {"leftLength == rightLength"}) @SuppressWarnings("unused") - protected void doSameLength(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // + protected void doSameLength(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, @Cached("createCountingProfile()") LoopConditionProfile profile) { profile.profileCounted(leftLength); for (int i = 0; profile.inject(i < leftLength); ++i) { @@ -464,8 +464,8 @@ public final class BinaryMapNode extends RBaseNode { } @Specialization(contains = {"doVectorScalar", "doScalarVector", "doSameLength"}, guards = {"multiplesMinMax(leftLength, rightLength)"}) - protected void doMultiplesLeft(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // - @Cached("createCountingProfile()") LoopConditionProfile leftProfile, // + protected void doMultiplesLeft(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, + @Cached("createCountingProfile()") LoopConditionProfile leftProfile, @Cached("createCountingProfile()") LoopConditionProfile rightProfile) { int j = 0; rightProfile.profileCounted(rightLength / leftLength); @@ -479,8 +479,8 @@ public final class BinaryMapNode extends RBaseNode { } @Specialization(contains = {"doVectorScalar", "doScalarVector", "doSameLength"}, guards = {"multiplesMinMax(rightLength, leftLength)"}) - protected void doMultiplesRight(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // - @Cached("createCountingProfile()") LoopConditionProfile leftProfile, // + protected void doMultiplesRight(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, + @Cached("createCountingProfile()") LoopConditionProfile leftProfile, @Cached("createCountingProfile()") LoopConditionProfile rightProfile) { int j = 0; leftProfile.profileCounted(leftLength / rightLength); @@ -507,7 +507,7 @@ public final class BinaryMapNode extends RBaseNode { } @Specialization(guards = {"!multiples(leftLength, rightLength)"}) - protected void doNoMultiples(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, // + protected void doNoMultiples(BinaryMapFunctionNode node, Object store, RAbstractVector left, int leftLength, RAbstractVector right, int rightLength, @Cached("createCountingProfile()") LoopConditionProfile profile) { int j = 0; int k = 0; 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 95fd29c2c776af28bdb963134a6b3b415ca3a22e..07280c7c8e21cfb10240613cd02805571602e611 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 @@ -206,7 +206,7 @@ public final class UnaryMapNode extends RBaseNode { } @TruffleBoundary - private void copyAttributesInternal(RVector<?> result, RAbstractVector attributeSource) { + private static void copyAttributesInternal(RVector<?> result, RAbstractVector attributeSource) { result.copyRegAttributesFrom(attributeSource); result.copyNamesFrom(attributeSource); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java index 11eea1b0ed5cffcebfbe5ba22fc19fb2aef4cb22..00a0678e90084e096d056dc9b8e8d2ec4cb8a1c0 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.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 @@ -115,7 +115,7 @@ public abstract class CastComplexNode extends CastBaseNode { } @Specialization - protected RComplex doCharacter(String operand, // + protected RComplex doCharacter(String operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { naCheck.enable(operand); if (naCheck.check(operand) || emptyStringProfile.profile(operand.isEmpty())) { @@ -164,7 +164,7 @@ public abstract class CastComplexNode extends CastBaseNode { } @Specialization - protected RComplexVector doStringVector(RStringVector operand, // + protected RComplexVector doStringVector(RStringVector operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { naCheck.enable(operand); double[] ddata = new double[operand.getLength() << 1]; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleBaseNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleBaseNode.java index fa706c4d013c7a781391beb75912f55a7f8fe5ce..86b4afa0308aa0ee8ff456edba298987dab7a23c 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleBaseNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleBaseNode.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 @@ -98,7 +98,7 @@ public abstract class CastDoubleBaseNode extends CastBaseNode { } @Specialization - protected double doString(String operand, // + protected double doString(String operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { if (naProfile.isNA(operand) || emptyStringProfile.profile(operand.isEmpty())) { return RRuntime.DOUBLE_NA; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleNode.java index 9e5e541a9d2839cd2ac67f88b782a58a864ec385..7d3922f68eadb96f02f8a5aca34ad7f73e54bcd5 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastDoubleNode.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 @@ -92,7 +92,7 @@ public abstract class CastDoubleNode extends CastDoubleBaseNode { } @Specialization - protected RDoubleVector doStringVector(RStringVector operand, // + protected RDoubleVector doStringVector(RStringVector operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { naCheck.enable(operand); double[] ddata = new double[operand.getLength()]; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerBaseNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerBaseNode.java index 5e3b5b5aa16d0650fcd6cd5a22389a84cb0d50e3..9f715e3836e42e393e5f342e825b9f9dd7e6fa3a 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerBaseNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerBaseNode.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 @@ -93,7 +93,7 @@ public abstract class CastIntegerBaseNode extends CastBaseNode { } @Specialization - protected int doCharacter(String operand, // + protected int doCharacter(String operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { naCheck.enable(operand); if (naCheck.check(operand) || emptyStringProfile.profile(operand.isEmpty())) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java index 59245636fa3c80316e0febe0fa94e27645bd9ebe..506169e0075b79f73b127e549bf332ab67542ab5 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.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 @@ -124,7 +124,7 @@ public abstract class CastIntegerNode extends CastIntegerBaseNode { } @Specialization - protected RIntVector doStringVector(RAbstractStringVector operand, // + protected RIntVector doStringVector(RAbstractStringVector operand, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { naCheck.enable(operand); int[] idata = new int[operand.getLength()]; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java index 69d13990142a7dcd8d52515c28c579f65576df7a..5ef5ca20530477fdd9cb099ffc0bf2b58f33e485 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.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 @@ -126,8 +126,8 @@ public abstract class CastRawNode extends CastBaseNode { } @Specialization - protected RRaw doString(String operand, // - @Cached("create()") NAProfile naProfile, // + protected RRaw doString(String operand, + @Cached("create()") NAProfile naProfile, @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile) { int intValue; if (naProfile.isNA(operand) || emptyStringProfile.profile(operand.isEmpty())) { @@ -198,8 +198,8 @@ public abstract class CastRawNode extends CastBaseNode { } @Specialization - protected RRawVector doStringVector(RStringVector operand, // - @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile, // + protected RRawVector doStringVector(RStringVector operand, + @Cached("createBinaryProfile()") ConditionProfile emptyStringProfile, @Cached("create()") NAProfile naProfile) { naCheck.enable(operand); byte[] bdata = new byte[operand.getLength()]; diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/FindFirstNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/FindFirstNode.java index df6dc13ea2a8cbf28b8cd0ed72d5df0d69d99959..e5c9f3cc86ee783b454cfc857687907d81609d74 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/FindFirstNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/FindFirstNode.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 @@ -105,5 +105,4 @@ public abstract class FindFirstNode extends CastNode { protected boolean nonVector(Object x) { return x != RNull.instance && x != RMissing.instance && !(x instanceof RAbstractVector); } - } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/NonNANode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/NonNANode.java index 5fec2dfc86a5f1000c52245ae71df02a0dc0492f..f709a59d66a730e3adc7cad28e463431066cd07a 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/NonNANode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/NonNANode.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 @@ -222,5 +222,4 @@ public abstract class NonNANode extends CastNode { protected Object onPossiblyIncompleteContainer(RAbstractRawVector x) { return x; } - } 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 099c92d01c627bf347906433943f6176983108dd..bf361980c92ad6488bf88e4a65c2bd5c6a5288cd 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 @@ -152,7 +152,7 @@ public abstract class PrecedenceNode extends RBaseNode { } @Specialization(guards = "recursive") - protected int doListRecursive(RList val, boolean recursive, // + protected int doListRecursive(RList val, boolean recursive, @Cached("createRecursive()") PrecedenceNode precedenceNode) { int precedence = -1; for (int i = 0; i < val.getLength(); i++) { @@ -162,7 +162,7 @@ public abstract class PrecedenceNode extends RBaseNode { } @Specialization(guards = "recursive") - protected int doPairListRecursive(RPairList list, boolean recursive, // + protected int doPairListRecursive(RPairList list, boolean recursive, @Cached("createRecursive()") PrecedenceNode precedenceNode) { int precedence = -1; for (RPairList item : list) { diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/TypeofNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/TypeofNode.java index 175f08ba663325d20de37f6492b6a90287d4d7b8..4b38a39d77b5b0ee36e2a2b5036320f13001c9cd 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/TypeofNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/TypeofNode.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 @@ -63,7 +63,7 @@ public abstract class TypeofNode extends UnaryNode { } @Specialization(guards = {"operand.getClass() == cachedClass"}, limit = "NUMBER_OF_CACHED_CLASSES") - protected static RType doCachedTyped(Object operand, // + protected static RType doCachedTyped(Object operand, @Cached("getTypedValueClass(operand)") Class<? extends RTypedValue> cachedClass) { return cachedClass.cast(operand).getRType(); } diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticBuiltinNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticBuiltinNode.java index 7e8b17533657a0ce0ce556d17f317bc94bda0842..30a73667726f4ce93ffccb7cce8b61ae19bdf4ee 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticBuiltinNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/UnaryArithmeticBuiltinNode.java @@ -83,7 +83,6 @@ public abstract class UnaryArithmeticBuiltinNode extends RBuiltinNode implements public RComplex op(double re, double im) { return UnaryArithmeticBuiltinNode.this.op(re, im); } - }; } 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 b2717f3ec840501767046fbac61de65393ddf025..3b1be3e005a96b103647edf074d3928cdc40cdce 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 @@ -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 @@ -95,8 +95,8 @@ public abstract class UnaryArithmeticNode extends UnaryNode { @Specialization(contains = "doCached", guards = {"isNumericVector(operand)"}) @TruffleBoundary - protected Object doGeneric(Object operand, // - @Cached("unary.createOperation()") UnaryArithmetic arithmetic, // + protected Object doGeneric(Object operand, + @Cached("unary.createOperation()") UnaryArithmetic arithmetic, @Cached("new(createCached(arithmetic, operand, minPrecedence), minPrecedence)") GenericNumericVectorNode generic) { RAbstractVector operandVector = (RAbstractVector) operand; return generic.get(arithmetic, operandVector).apply(operandVector); diff --git a/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java b/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java index daf4dc919c5483233650e057ea6873da7b99e54b..49faef68c64479c4f57a3e36e0b32f82c07262f7 100644 --- a/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java +++ b/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java @@ -87,7 +87,7 @@ public class GenerateRParserProcessor extends AbstractProcessor { int rc = new ProcessBuilder(command).directory(parserSrcDir).redirectError(tempFile).start().waitFor(); if (rc != 0) { String out = new String(Files.readAllBytes(tempFile.toPath())); - processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, // + processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, String.format("Parser failed to execute command %s. Return code %s.%nOutput:%s", Arrays.toString(command), rc, out), element); return false; } diff --git a/com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/DefaultRParserFactory.java b/com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/DefaultRParserFactory.java index 8ae13887054b18e04ce49927c2079f59fdf87e7e..38f9cdc524a0b9f5edf2b7d81e6dba286ce9eb1e 100644 --- a/com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/DefaultRParserFactory.java +++ b/com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/DefaultRParserFactory.java @@ -97,12 +97,10 @@ public class DefaultRParserFactory extends RParserFactory { throw new ParseException(e, source, token, substring, e.line); } } - } @Override protected <T> Parser<T> createParser() { return new DefaultParser<>(); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFI.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFI.java index 1e9616f6e8e2980452105f5d91536dd91390a54d..eb76d0fb7fac997632e30bf934b5f2fd6e32d4d6 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFI.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFI.java @@ -1013,7 +1013,6 @@ public class JavaUpCallsRFFI implements UpCallsRFFI { result = RContext.getEngine().evalFunction(f, env == REnvironment.globalEnv() ? null : ((REnvironment) env).getFrame(), RCaller.topLevel, argsList.getNames(), argsList.getDataNonShared()); } - } else { // just return value result = expr; @@ -1239,7 +1238,6 @@ public class JavaUpCallsRFFI implements UpCallsRFFI { // TODO incomplete return new ParseResult(ParseStatus.PARSE_ERROR.ordinal(), RNull.instance); } - } @Override @@ -1490,7 +1488,6 @@ public class JavaUpCallsRFFI implements UpCallsRFFI { // TODO: is it OK to pass "" if path is null? return RSrcref.createLloc(ss, path == null ? "" : path); } - } @Override @@ -1622,5 +1619,4 @@ public class JavaUpCallsRFFI implements UpCallsRFFI { System.out.println("object " + x); System.out.println("class " + x.getClass()); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFIFactory.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFIFactory.java index d9666616f0199f060d9b5b5e9372722362f4d63a..6bf0183d8e85302127526f6631c99f81662030f6 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFIFactory.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/JavaUpCallsRFFIFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -28,5 +28,4 @@ public class JavaUpCallsRFFIFactory extends UpCallsRFFIFactory { public UpCallsRFFI getUpcallsRFFI() { return new JavaUpCallsRFFI(); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/RFFIUtils.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/RFFIUtils.java index 94bb5bd7e0b00f77fe845dd6eddd3d25688e3cc0..fa21f16be67c76d37887a304de50831c867f8f4d 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/RFFIUtils.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/RFFIUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -199,5 +199,4 @@ public class RFFIUtils { public static IOException ioex(String errMsg) throws IOException { throw new IOException(errMsg); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Call.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Call.java index 7aae50716574d0dfd8ea5be6e62a49f5bcdd7fb7..865f20619a28548366d37295b6cb5d7a48207324 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Call.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Call.java @@ -141,7 +141,6 @@ public class JNI_Call implements CallRFFI { } } } - } private static final boolean ForceRTLDGlobal = false; @@ -182,7 +181,6 @@ public class JNI_Call implements CallRFFI { if (traceEnabled()) { traceDownCallReturn("initialize", null); } - } } @@ -222,5 +220,4 @@ public class JNI_Call implements CallRFFI { public CallRFFINode createCallRFFINode() { return new JNI_CallRFFINode(); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_PCRE.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_PCRE.java index 7ddfbc4b4367672b27f892e18660395cfce4bac6..f2bb99d0a828ee3419c5d69c137b4a70b08741e3 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_PCRE.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_PCRE.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 @@ -86,5 +86,4 @@ public class JNI_PCRE implements PCRERFFI { public PCRERFFINode createPCRERFFINode() { return new JNI_PCRERFFINode(); } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_RFFIFactory.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_RFFIFactory.java index 546352c06e575d232651f15035f761377b5f2cc3..5729b0653039ee4191394d06ab64e5eefcc4ffaf 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_RFFIFactory.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_RFFIFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -225,5 +225,4 @@ public class JNI_RFFIFactory extends RFFIFactory implements RFFI { } return miscRFFI; } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Stats.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Stats.java index 4162ce88a19b9f673dd3e91b103cd6d9e8cf2ed1..86040e7f39d36ce702448dced65b79c85b17e75c 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Stats.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNI_Stats.java @@ -64,7 +64,6 @@ public class JNI_Stats implements StatsRFFI { assert fftAddress != DLL.SYMBOL_NOT_FOUND; return fftAddress; } - } @Override diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/LLVM_IR.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/LLVM_IR.java index 804ccd512c35c5bd479666a18a381b25a47a94fb..89f9b2f3aab13c58e63ddbc6b6add8b7ea37fff6 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/LLVM_IR.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/LLVM_IR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -93,5 +93,4 @@ public abstract class LLVM_IR { throw RInternalError.unimplemented("LLVM_IR_Access for Linux"); } } - } diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/MachOAccess.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/MachOAccess.java index ff31c4479da49a7430efc4adcbc0b0503294471f..cbc7fe7691ba9f45936619c40e2668ec98feb516 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/MachOAccess.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/truffle/MachOAccess.java @@ -142,7 +142,6 @@ final class MachOAccess implements AutoCloseable { flags = readInt(); reserved = readInt(); } - } private enum LC_TYPE { @@ -283,7 +282,6 @@ final class MachOAccess implements AutoCloseable { sections[i] = new Section64(this); } } - } private final class Section64 { @@ -386,7 +384,6 @@ final class MachOAccess implements AutoCloseable { } return symbol; } - } private class NList64 { @@ -449,5 +446,4 @@ final class MachOAccess implements AutoCloseable { final long hw = readInt(); return hw << 32 | (lw & 0xFFFFFFFFL); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/DefaultResourceHandlerFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/DefaultResourceHandlerFactory.java index bc3a8db00d9cee4b415f25ff0769c7108e9cb373..618db886292158291c7492907638055b3bd57215 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/DefaultResourceHandlerFactory.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/DefaultResourceHandlerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -110,5 +110,4 @@ class DefaultResourceHandlerFactory extends ResourceHandlerFactory implements Ha return null; } } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java index 767d9529d17dc088decc4f2074ea812f7b27f6bf..925e1f39042c3510b80c4d18eb2f1cdbcb18bd93 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -89,7 +89,6 @@ public enum FastROptions { System.exit(2); return false; } - } public String getStringValue() { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RChannel.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RChannel.java index db41454ae064fd8a4a98ef1d178ddd4a0476359b..595a9c69e2ecea41e936c904830f9792b6251517 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RChannel.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RChannel.java @@ -92,7 +92,6 @@ public class RChannel { if (keys[i] == 0 && freeSlot == -1) { freeSlot = i; } - } if (freeSlot != -1) { keys[freeSlot] = key; @@ -290,7 +289,6 @@ public class RChannel { public RSyntaxElement getSerializedExpr() { return serializedExpr; } - } protected static class SerializedFunction { @@ -334,7 +332,6 @@ public class RChannel { public byte[] getSerializedAttributable() { return serializedAttributable; } - } } @@ -422,7 +419,6 @@ public class RChannel { REnvironment env = p.getFrame() == null ? REnvironment.globalEnv() : REnvironment.frameToEnvironment(p.getFrame()); return new SerializedPromise(convertPrivate(env), RUnboundValue.instance, p.getClosure().getExpr().asRSyntaxNode()); } - } private SerializedFunction convertPrivateFunction(Object msg) throws IOException { @@ -563,7 +559,6 @@ public class RChannel { throw RError.error(RError.SHOW_CALLER2, RError.Message.GENERIC, "error serializing message for channel transmission"); } } - } private static class Input extends TransmitterCommon { @@ -700,6 +695,5 @@ public class RChannel { throw RError.error(RError.SHOW_CALLER2, RError.Message.GENERIC, "error unserializing msg from the channel"); } } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java index 5069b1fd910103e0225d7f9f780375cce6cf36a3..3e303f3c0ecc0ebc8d6e602a23a5d8a95873d045 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (c) 1997-2014, The R Core Team - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -103,7 +103,6 @@ public class RCleanUp { } catch (Throwable t) { RInternalError.reportError(t); } - } // TODO run exit finalizers (FFI) // TODO clean tmpdir diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCmdOptions.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCmdOptions.java index 657de9e74701338bfaad2c4e7fccf1be75fddc62..56b321b10bc4e1795db1cf39e613eb82158b6e9e 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCmdOptions.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCmdOptions.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 @@ -48,7 +48,6 @@ public final class RCmdOptions { public String usage() { return "\nUsage: [--options] [-e expr [-e expr2 ...] | file] [args]\n"; } - }, EITHER { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCompression.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCompression.java index 377025a8ea8213da398be4e09185790208ef52bb..4cd19d58d717319b3708bed8aee98e1818ba806f 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCompression.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCompression.java @@ -245,5 +245,4 @@ public class RCompression { } throw new IOException(); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java index 9ea7f2f3880b01aa0a49b411257f50b9c50a5525..426f5b569e5d7806695bf84bc7a7f996cb021f94 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java @@ -595,7 +595,6 @@ public class RDeparse { needsParens = true; break; } - } needsParens = mainOp.prec > arginfo.prec || (mainOp.prec == arginfo.prec && isLeft == mainOp.rightassoc); break; @@ -940,7 +939,6 @@ public class RDeparse { append(attrName); } } - } if (dotName != null) { append(dotName); diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java index 519dd20f0efa51ec85238c895bb384f46435aa7f..b481ebf1cf0c6644a105cbfaa674950f85b70e96 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java @@ -786,6 +786,5 @@ public final class RError extends RuntimeException { this.message = message; hasArgs = message.indexOf('%') >= 0; } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInterfaceCallbacks.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInterfaceCallbacks.java index 6b95eeb7dc6075365e7acf11eb3bfa002edfaef3..6a1b49c4a52bbb360fa8ec77292a4e96c9e88c94 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInterfaceCallbacks.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInterfaceCallbacks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -51,5 +51,4 @@ public enum RInterfaceCallbacks { private static void override(String name) { RInterfaceCallbacks.valueOf(name).overridden = true; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalCode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalCode.java index 5abb022ae2315b9730dbdc2bc582100f064bfc01..a5287eceb233aed86d7ad08ace8a7944c00dd45b 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalCode.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalCode.java @@ -106,7 +106,5 @@ public final class RInternalCode { public static ContextStateImpl newContextState() { return new ContextStateImpl(); } - } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java index babe770339419589c084e9006cdd0f1ed434b69e..4342d43ff2b671d87988cf957959583b2bc324f5 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RRuntime.java @@ -905,5 +905,4 @@ public class RRuntime { private static boolean hasDims(RAbstractContainer xa) { return xa.hasDimensions(); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java index a02451ec0ba66ab803163bf597c9c6b7284c5502..0c171118ede834f66f139028513543cb516212a5 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java @@ -269,7 +269,6 @@ public class RSerialize { protected static IOException formatError(byte format, boolean ok) throws IOException { throw new IOException("serialized stream format " + (ok ? "not implemented" : "not recognized") + ": " + format); } - } public static final int DEFAULT_VERSION = 2; @@ -2236,7 +2235,6 @@ public class RSerialize { if (i != arguments.length - 1) { state.openPairList(); } - } state.linkPairList(arguments.length); } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSource.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSource.java index 01fa26e6309fc3813856486d1178c7e193a2b66f..a58a4912b3d11f67221caeb96465b75fab48bf1d 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSource.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSource.java @@ -92,7 +92,6 @@ public class RSource { Internal(String text) { this.string = text; } - } /** diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSrcref.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSrcref.java index e52c909053bdcab09bc9948fc8ca76734223400e..911ee913029030ab83a7e411cc94f16c8567a998 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSrcref.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSrcref.java @@ -110,5 +110,4 @@ public class RSrcref { lloc.setAttr(RRuntime.R_SRCFILE, srcfile); return lloc; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java index f47143a9ed80e0b390153fbfc51fe46f580b2639..9bb2fb9d4f8e06129cc41295aeae915fdf31d113 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java @@ -502,7 +502,6 @@ public final class Utils { } return null; } - } /** @@ -940,5 +939,4 @@ public final class Utils { public static String stringFormat(String format, Object... objects) { return String.format(format, objects); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/CompressedConnections.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/CompressedConnections.java index f914930fdb4de04ac1e9da3ec2c2496def98c4c4..7bf6d1af13b9fb97d677e675c67c74b63b24618f 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/CompressedConnections.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/CompressedConnections.java @@ -277,5 +277,4 @@ public class CompressedConnections { RCompression.bzipCompressToFile(data, ((BasePathRConnection) base).path, append); } } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java index 25922b8644237f0845edce7260dae41b5560c662..2d00f37c27ddb2dbc508ce613d16692e333d038a 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/ConnectionSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -553,8 +553,8 @@ public class ConnectionSupport { /** * {@code gzfile} can open other connection classes, and this isn't known initially. */ - public final void updateConnectionClass(ConnectionClass conClass) { - this.conClass = conClass; + public final void updateConnectionClass(ConnectionClass newConClass) { + this.conClass = newConClass; } protected void openNonLazyConnection() throws IOException { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java index 8c85df0c7d046d60b1a27ae91d5f3c1bb2b917bd..9434f758c41dffdab375149fbc3da7d08555a24d 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/TextConnections.java @@ -232,7 +232,6 @@ public class TextConnections { appendedLines.toArray(appendedData); appendData(appendedData); } - } void appendData(String[] appendedData) { @@ -315,7 +314,6 @@ public class TextConnections { public void write(int b) { throw RInternalError.unimplemented(); } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AgentObjectSizeFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AgentObjectSizeFactory.java index 152f88fedcaf6a89df664d6b227145d0d8c2b8cb..884bd82b483ac87d172232764e2f24536d3431dd 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AgentObjectSizeFactory.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AgentObjectSizeFactory.java @@ -166,7 +166,6 @@ public class AgentObjectSizeFactory extends ObjectSizeFactory { } catch (Throwable t) { throw RInternalError.shouldNotReachHere(t); } - } private static boolean isNa(Object elem) { @@ -224,5 +223,4 @@ public class AgentObjectSizeFactory extends ObjectSizeFactory { public void registerTypeCustomizer(Class<?> klass, TypeCustomizer typeCustomizer) { customizerMap.put(klass, typeCustomizer); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AttributeTracer.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AttributeTracer.java index 9870df63790960ef7085d8a7f0d01d43fa08b6e4..75a453e0216e80492818fd04b9a18a204024b7f0 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AttributeTracer.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/AttributeTracer.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 @@ -82,5 +82,4 @@ public final class AttributeTracer { */ void reportAttributeChange(AttributeTracer.Change change, DynamicObject attrs, Object value); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/ObjSizeAgent.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/ObjSizeAgent.java index b6756248470bea75bf369bfd2859bd071c11de48..4f45134311b0127ffb315c49e259a7877f742b75 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/ObjSizeAgent.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/ObjSizeAgent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -48,5 +48,4 @@ public class ObjSizeAgent { static boolean isInitialized() { return instrumentation != null; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/OutputAgentObjectSizeFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/OutputAgentObjectSizeFactory.java index 4d7279743c01e4518d20124db73a4676a5c65a0a..9fbc0f23015c5e6552a9a9f2cdf8efacb9a07979 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/OutputAgentObjectSizeFactory.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/OutputAgentObjectSizeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -44,7 +44,6 @@ public class OutputAgentObjectSizeFactory extends AgentObjectSizeFactory { } catch (IOException ex) { Utils.rSuicide(ex.getMessage()); } - } @Override diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RAttributesLayout.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RAttributesLayout.java index 523100966ba101fd359421ba7c15423cbd3684e2..a44c45ec7e53a2b1c5573d9b8e95511b6b98a377 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RAttributesLayout.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RAttributesLayout.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 @@ -277,7 +277,6 @@ public final class RAttributesLayout { return new Iter(attrs, properties.iterator()); } } - } public interface RAttribute { @@ -335,6 +334,5 @@ public final class RAttributesLayout { Object value = p.get(attrs, shape); return new AttrInstance((String) p.getKey(), value); } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RDataFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RDataFactory.java index a510e07cfe371fa797a0ad3fcc3bfc871880ae60..db2e0bbd3fef317ff7794efdc6eb9b36947646ac 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RDataFactory.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RDataFactory.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 @@ -558,5 +558,4 @@ public final class RDataFactory { public static void addListener(Listener listener) { listeners.addLast(listener); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RObjectSize.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RObjectSize.java index 14b70ab39912d6a656926780f59ffe37d48e3daa..3f813b0a58c03db6fa93cb94ac1c78e1d84ec84c 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RObjectSize.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RObjectSize.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -114,7 +114,6 @@ public class RObjectSize { public long getObjectSize(Object obj) { return 0; } - }; // TODO construct proper customizers for some of these. @@ -129,5 +128,4 @@ public class RObjectSize { registerTypeCustomizer(RCaller.class, IGNORE); registerTypeCustomizer(SEXPTYPE.class, IGNORE); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java index 0acdfa456ccea7a5f58254b3acee4a93a649f5df..e40efafa8eb52cfaef95ee52765ad52b2f30401d 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java @@ -281,7 +281,6 @@ public abstract class RVector<ArrayT> extends RSharingAttributeStorage implement attributes = null; } } - } @Override diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/closures/RClosures.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/closures/RClosures.java index bd3f40ac11731afc1c04da8fef21b95171ccb93f..8260e9b21a901e441fd281c74e7624324865bd01 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/closures/RClosures.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/closures/RClosures.java @@ -24,7 +24,6 @@ package com.oracle.truffle.r.runtime.data.closures; import com.oracle.truffle.r.runtime.data.RComplex; import com.oracle.truffle.r.runtime.data.RDouble; -import com.oracle.truffle.r.runtime.data.RFactor; import com.oracle.truffle.r.runtime.data.RInteger; import com.oracle.truffle.r.runtime.data.RLogical; import com.oracle.truffle.r.runtime.data.RRaw; @@ -137,7 +136,6 @@ public class RClosures { assert levels.getElementClass() == RRaw.class; return new RFactorToIntVectorClosure(factor, createRawToIntVector((RAbstractRawVector) levels), withNames); } - } } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/CharSXPWrapper.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/CharSXPWrapper.java index f7e83255eb8c99e1c347db8bc76d5f03fadcf6c2..161a93b520a4d41b676bf864830e1df530eb7461 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/CharSXPWrapper.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/CharSXPWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -51,5 +51,4 @@ public final class CharSXPWrapper { public static Object create(String contents) { return new CharSXPWrapper(contents); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java index 4e1bc8f75b7ac4927119d2a625a7c4bf5880faca..6e8eee8c9bc69726d8e2173c57dd2f951f33056e 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java @@ -92,7 +92,6 @@ public class DLL { } list = null; } - } /** @@ -127,7 +126,6 @@ public class DLL { this.fun = fun; this.numArgs = numArgs; } - } public static class RegisteredNativeSymbol { @@ -148,7 +146,6 @@ public class DLL { public static RegisteredNativeSymbol any() { return new RegisteredNativeSymbol(NativeSymbolType.Any, null, null); } - } public static final class DLLInfo implements RTruffleObject { @@ -239,7 +236,6 @@ public class DLL { public String toString() { return String.format("name: %s, path: %s, dynamicLookup: %b, forceSymbols %b", name, path, dynamicLookup, forceSymbols); } - } public static class SymbolInfo { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/FFIRootNode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/FFIRootNode.java index 00c8ed1b5f521e25244303b467ad901847642534..5985c20786ce0077477c5822c4dad0d98b5b987d 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/FFIRootNode.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/FFIRootNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -55,5 +55,4 @@ public final class FFIRootNode extends RootNode { public static RootCallTarget createCallTarget() { return Truffle.getRuntime().createCallTarget(new FFIRootNode()); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/instrument/InstrumentationState.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/instrument/InstrumentationState.java index cf8ff63d1cfb0127224309737983045c17058f0a..8c91575ef9aa6eeb2b24945ca3b2e4999fa84c9d 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/instrument/InstrumentationState.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/instrument/InstrumentationState.java @@ -177,7 +177,6 @@ public final class InstrumentationState implements RContext.ContextState { } return helperStateList.get(nn - 1); } - } /** diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/TOMS708.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/TOMS708.java index 4ce3b2c8b2cfeb4290b9e1c25efb16c5714c484d..19206418b41ffda9a77ea0508fbf99bf8890758a 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/TOMS708.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/TOMS708.java @@ -783,7 +783,6 @@ public final class TOMS708 { } else { ans *= c * (b / apb); } - } else { /* ------ a0 < 1 < b0 < 8 ------ */ double u = gamln1(a0); @@ -815,7 +814,6 @@ public final class TOMS708 { ans = exp(z) * (a0 / a) * (gam1(b0) + 1.0) / t; } } - } else { /* ------ a0 < 1 < 8 <= b0 ------ */ double u = gamln1(a0) + algdiv(a0, b0); @@ -1374,13 +1372,11 @@ public final class TOMS708 { debugPrintf(" => q_r=%.15f\n", q * exp(-logR)); return q * exp(-logR); } - } else { double p = exp(z) * g * (0.5 - j + 0.5); debugPrintf(" => q_r=%.15f\n", (0.5 - p + 0.5) * exp(-logR)); return /* q/r = */(0.5 - p + 0.5) * exp(-logR); } - } else { /* L50: ---- (x >= 1.1) ---- Continued Fraction Expansion */ @@ -2153,7 +2149,6 @@ public final class TOMS708 { } return log(w) - n * log(b) + (gamln(a) + algdiv(a, b)); } - } else { /* ----------------------------------------------------------------------- */ // L60: A >= 8 diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Geom.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Geom.java index 0ab8fbae5f3c4995e681ba1c9cb9e4b2ea51e167..4acb4afa73a5a90dd86de5d29c10a78f99c36556 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Geom.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Geom.java @@ -66,7 +66,6 @@ public final class Geom { /* add a fuzz to ensure left continuity, but value must be >= 0 */ return RMath.fmax2(0, Math.ceil(DPQ.rdtclog(p, lowerTail, logP) / RMath.log1p(-prob) - 1 - 1e-12)); } - } public static final class DGeom implements Function2_1 { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNBeta.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNBeta.java index ae7182e481207b1f17368ca997635eedcdfba42e..d86194fb0d00a76b67e03da76b793d81711d0460 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNBeta.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNBeta.java @@ -57,7 +57,6 @@ public final class PNBeta implements Function4_2 { /* include standalone case */ return (logP ? RMath.log1p(-ans) : (1. - ans)); } - } /* diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNChisq.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNChisq.java index 817566420ac26d55b51ef563ba6acec8acb1c7d1..921f20f53ca1a9d3fa985837f722a8cfbb24fb51 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNChisq.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/PNChisq.java @@ -190,7 +190,6 @@ public final class PNChisq implements Function3_2 { term / ans, (isR ? "<= reltol" : "")); break; /* out completely */ } - } /* evaluate the next term of the */ @@ -224,7 +223,6 @@ public final class PNChisq implements Function3_2 { term = v * t; ans += term; } - } /* for(n ...) */ if (isIt) { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Pt.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Pt.java index 142b3e0f1ed07f067217324f2292bb9a05cb1c5c..0dbd730adabd06aeffc5052ceae336875cf2a8de 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Pt.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/Pt.java @@ -80,6 +80,5 @@ public final class Pt implements Function2_2 { val /= 2.; return DPQ.rdcval(val, newLowerTail); } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RBeta.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RBeta.java index 550441cae91c0078fbf965c6e50844ea6e734526..ada66bc887e642e60643f82a6b6dd81850839cd6 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RBeta.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nmath/distr/RBeta.java @@ -145,5 +145,4 @@ public final class RBeta extends RandFunction2_Double { return Double.MAX_VALUE; } } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/DuplicationHelper.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/DuplicationHelper.java index fe149932f22e1755178bb8754f13b8a1befdd956..5cbfa26e93daec1d1bde2f01d419a3cb2965c635 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/DuplicationHelper.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/DuplicationHelper.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -89,5 +89,4 @@ public class DuplicationHelper { } return ds; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RNode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RNode.java index 3150d973f414b378247a3e21ff430bdb95d87c4f..c07a69b8732adb872af3e47997557920784ccb4e 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RNode.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RNode.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 @@ -250,5 +250,4 @@ public abstract class RNode extends RBaseNode implements RInstrumentableNode { public RType executeType(VirtualFrame frame) throws UnexpectedResultException { return RTypesGen.expectRType(execute(frame)); } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java index fa6e33017ba7329a1d9810df5051c8da746174dc..61f4d37db613eaea17888de632841a8ede12bb57 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java @@ -6,7 +6,7 @@ * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation * Copyright (c) 2012-2013, Purdue University - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -722,7 +722,6 @@ public abstract class BinaryArithmetic extends Operation { } return res; } - } private static class CPow2 extends Node { @@ -758,7 +757,6 @@ public abstract class BinaryArithmetic extends Operation { } return RDataFactory.createComplex(real, imag); } - } } @@ -863,7 +861,6 @@ public abstract class BinaryArithmetic extends Operation { } return RDataFactory.createComplex(real, imag); } - } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/RRNG.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/RRNG.java index 28b845bc33c215403cf214cfd2a27a4a58ff08e1..7ab4c8007bc955514a23a30604fd170cedddcd11 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/RRNG.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/RRNG.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -174,7 +174,6 @@ public class RRNG { public static ContextStateImpl newContextState() { return new ContextStateImpl(); } - } private static ContextStateImpl getContextState() { diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mm/MarsagliaMulticarry.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mm/MarsagliaMulticarry.java index 34a99d4b2dd3af536988be92f5aff6509eea1f04..191ee776dfc972a77dd623cd7500304e29b213e6 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mm/MarsagliaMulticarry.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mm/MarsagliaMulticarry.java @@ -5,7 +5,7 @@ * * Copyright (c) 1995-2012, The R Core Team * Copyright (c) 2003, The R Foundation - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -64,5 +64,4 @@ public final class MarsagliaMulticarry extends RNGInitAdapter { public int getNSeed() { return 2; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mt/MersenneTwister.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mt/MersenneTwister.java index 1bccf6eb4b973a527f1af77f564e3f2528df80ca..5dccbdbf286c1c39b5472db7c3b1862ae03cdf6c 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mt/MersenneTwister.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/mt/MersenneTwister.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 1997-2002, Makoto Matsumoto and Takuji Nishimura - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -215,5 +215,4 @@ public final class MersenneTwister extends RNGInitAdapter { public int getNSeed() { return 1 + N; } - } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java index b8490dfaae54f03a4c1fae79f647be644b5ce418..599d905eb34d8ad18c977fbd2b17d26992d600fd 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -71,7 +71,6 @@ public final class UserRNG implements RandomNumberGenerator { private void setSymbolHandle(DLLInfo dllInfo) { this.symbolHandle = findSymbol(symbol, dllInfo, optional); } - } private int nSeeds = 0; @@ -110,7 +109,6 @@ public final class UserRNG implements RandomNumberGenerator { public Object execute(VirtualFrame frame) { return userRngRFFINode.rand(); } - } private RootCallTarget callGeneric; @@ -198,5 +196,4 @@ public final class UserRNG implements RandomNumberGenerator { public void setISeed(int[] seeds) { // TODO: userRNG seems to be not using iseed? } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ArithmeticWhiteList.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ArithmeticWhiteList.java index a4127493b5facbafdd7052dae2f6b7a030413046..23a9f595234ab11c08dfe3c16de287e0003a717a 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ArithmeticWhiteList.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ArithmeticWhiteList.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 @@ -92,5 +92,4 @@ public class ArithmeticWhiteList { WHITELIST.add("c(1i,1i,1i)/FALSE", "[1] NaN+NaNi NaN+NaNi NaN+NaNi\n", "[1] NaN+Infi NaN+Infi NaN+Infi\n"); WHITELIST.add("c(1i,1i,1i)/c(FALSE,FALSE,FALSE)", "[1] NaN+NaNi NaN+NaNi NaN+NaNi\n", "[1] NaN+Infi NaN+Infi NaN+Infi\n"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java index 41dae04b593a65a62026803eb8b2a263b936961d..7909f4fa60e7b4135016253271c9878c3eb420a3 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/TestBase.java @@ -212,7 +212,6 @@ public class TestBase { } catch (Throwable ex) { throw new AssertionError("R initialization failure", ex); } - } @Override @@ -237,7 +236,6 @@ public class TestBase { } catch (IOException ex) { throw new RuntimeException(ex); } - } @Override diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_Encodingassign_.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_Encodingassign_.java index 1ec1d428fc74771914f817979a7d277bb032a0ec..e9d22e5b58ec64c27203e7d5c7fcdc770e246836 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_Encodingassign_.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_Encodingassign_.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -30,5 +30,4 @@ public class TestBuiltin_Encodingassign_ extends TestBase { assertEval(Output.IgnoreErrorContext, "{ x<-\"foo\"; Encoding(x)<-42 }"); assertEval(Output.IgnoreErrorContext, "{ x<-\"foo\"; Encoding(x)<-character() }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_agrep.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_agrep.java index 2a993c5e008e5702571fa45eb184ee0f6e745979..6783dd4542a4eee573c233e2539b279928a70a65 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_agrep.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_agrep.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -50,5 +50,4 @@ public class TestBuiltin_agrep extends TestBase { assertEval("{ .Internal(agrepl(character(), \"42\", F, F, NULL, NULL, F, F)) }"); assertEval("{ .Internal(agrepl(\"7\", 42, F, F, NULL, NULL, F, F)) }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_anyNA.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_anyNA.java index 4b36de5ed4b3ff0531c106d3a2e6413b7d2274db..faeee96e0600fc36d72a1047bf8a240945ff9999 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_anyNA.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_anyNA.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -41,5 +41,4 @@ public class TestBuiltin_anyNA extends TestBase { assertEval("anyNA(list(a = c(1, 2, 3), b = 'a'), recursive = TRUE)"); assertEval("anyNA(list(a = c(1, NA, 3), b = 'a'), recursive = TRUE)"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_array.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_array.java index c59d7c4c04748914777a44ed2f9dac95b652b373..4d67fec7e1f7d17db99a127db8f504fd7089a0b8 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_array.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_array.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -167,5 +167,4 @@ public class TestBuiltin_array extends TestBase { assertEval("{ .Internal(array(NA, 1, NULL)) }"); assertEval("{ f<-function() 42; .Internal(array(f, 1, NULL)) }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dimassign.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dimassign.java index f76298ead2b14bf7a33e0e1fee0011b14932c8af..539ebde4556625483a39e3ecf70c3350fc65e12c 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dimassign.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dimassign.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -76,5 +76,4 @@ public class TestBuiltin_dimassign extends TestBase { public void testdimassign12() { assertEval("b <- c(a=1+2i,b=3+4i);dim(b) <- c(2,1);attributes(x)"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_matmul.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_matmul.java index d0438b0f616b85034b7700bfb3a54819b9e3b577..c39dd82dc1fac6e77356e86553283128b424b09c 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_matmul.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_matmul.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 @@ -34,5 +34,4 @@ public class TestBuiltin_matmul extends TestBase { assertEval("m1 <- matrix(1:6,3,2,dimnames=list(c('a','b','c'),c('c1','c2')));m2 <- matrix(c(3,4),2,1,dimnames=list(c('a2','b2'),c('col'))); m1 %*% m2; "); assertEval("vec <- c(1,2); names(vec) <- c('a','b'); mat <- matrix(c(8,3),1,2,dimnames=list('row',c('c1','c2'))); vec %*% mat; "); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_pairlist.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_pairlist.java index 5c44cfe13b3b3ffc5126d1bea67ea46041fb5854..5d6b713414af6baa17a461cb3fe198ea70fa51b9 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_pairlist.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_pairlist.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -27,5 +27,4 @@ public class TestBuiltin_pairlist extends TestBase { public void testPairList() { assertEval("{ x<-7; y<-c(foo=42); z<-pairlist(x, y); list(z, typeof(z)) }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seq_along.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seq_along.java index 7f161af7bcb2d0c988a7e1b3bd574eb47de0e5c1..05336f48d283b2d79a9cf35e956063adb96586e7 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seq_along.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seq_along.java @@ -131,5 +131,4 @@ public class TestBuiltin_seq_along extends TestBase { assertEval("argv <- list(structure(list(num = 1:4, fac = structure(11:14, .Label = c('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'), class = 'factor'), date = structure(c(15065, 15066, 15067, 15068), class = 'Date'), pv = structure(list(1:3, 4:5, 6:7, 8:10), class = c('package_version', 'numeric_version'))), .Names = c('num', 'fac', 'date', 'pv'), row.names = c(NA, -4L), class = 'data.frame'));" + "do.call('seq_along', argv)"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seqint.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seqint.java index 230d15ca399fe8eda21145ec3998decd184d56cd..51307af886e6deb8f6f6eaf1686ed54474c84d01 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seqint.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_seqint.java @@ -156,5 +156,4 @@ public class TestBuiltin_seqint extends TestBase { public void testseqint29() { assertEval(Output.IgnoreErrorContext, "argv <- list(NaN);do.call('seq.int', argv)"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_setS4Object.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_setS4Object.java index 6e97897494f4ef361aa6fb24f55a7d6abcbcaa7e..e12192437ae334b6311f7a951b835eb153b47c8a 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_setS4Object.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_setS4Object.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -108,5 +108,4 @@ public class TestBuiltin_setS4Object extends TestBase { assertEval("{ x<-42; asS4(x, TRUE, logical()) }"); assertEval("{ x<-42; asS4(x, TRUE, c(1,2)) }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_starts_endsWith.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_starts_endsWith.java index e88b1ec52e7f601d142c481c67bd3793365c3477..36ec8320681356ff9337be2ac0b4d72ae07df5fd 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_starts_endsWith.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_starts_endsWith.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 @@ -48,5 +48,4 @@ public class TestBuiltin_starts_endsWith extends TestBase { assertEval("{ endsWith(2, \"1\") }"); assertEval("{ endsWith(2, 1) }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysnframe.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysnframe.java index 5f649bd730c986c1d7a6b175a0c89ad2400655e9..9768a4400c17d06708764827ed0f12fdc952cb48 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysnframe.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysnframe.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2012-2014, Purdue University - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -26,5 +26,4 @@ public class TestBuiltin_sysnframe extends TestBase { assertEval(Ignored.ImplementationError, "{ u <- function() sys.nframe() ; f <- function(x) x ; g <- function(y) f(y) ; h <- function(z=u()) g(z) ; h() }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparent.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparent.java index 038a16b47df073553f6a46afdc133357111f486c..f6d40ab92e4b702788ead839b40a248c70c9f89e 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparent.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparent.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2012-2014, Purdue University - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -43,5 +43,4 @@ public class TestBuiltin_sysparent extends TestBase { assertEval(Ignored.ImplementationError, "{ v <- function() sys.parent() ; u<- function() v(); f <- function(x) x ; g <- function(y) f(y) ; h <- function(z=u()) g(z) ; h() }"); assertEval("{ f <- function(x) { print(sys.parent()); x }; g <- function(x) f(x); m <- function() g(g(sys.parent())); callm <- function() m(); callm() }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparents.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparents.java index 36ab58b4bb0b9d6cedc8daaac30abd88644395d7..30a6f7b95b1380ace9ecccb76181c28b708d83e6 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparents.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_sysparents.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2012-2014, Purdue University - * Copyright (c) 2013, 2016, Oracle and/or its affiliates + * Copyright (c) 2013, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -26,5 +26,4 @@ public class TestBuiltin_sysparents extends TestBase { assertEval(Ignored.ImplementationError, "{ u <- function() sys.parents() ; f <- function(x) x ; g <- function(y) f(y) ; h <- function(z=u()) g(z) ; h() }"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_zzfile.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_zzfile.java index b3db1793f86d90d0b93a8e558cda4078154e9e1b..a0ea027404345fe1387f2acc24d52aee709440f5 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_zzfile.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_zzfile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -40,5 +40,4 @@ public class TestBuiltin_zzfile extends TestBase { "{ f <- tempfile(); c <- %0zfile(f); writeLines(as.character(1:50), c); close(c); c <- %0zfile(f, \"a\"); writeLines(as.character(51:70), c); close(c); readLines(f) }", CTYPES)); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/GnuROneShotRSession.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/GnuROneShotRSession.java index ca975f003358d15f9742f6fb499be7d48ebbc9fe..3601a1216d95331d537b24c89cb3a1132a7c0d4f 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/GnuROneShotRSession.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/GnuROneShotRSession.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 @@ -126,5 +126,4 @@ public class GnuROneShotRSession implements RSession { public String name() { return "GnuR one-shot"; } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleParsing.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleParsing.java index e206954cd8f51da54f11a000758599c0dda65ae5..1d9e17f0416909d1e864954ae096845ffe536d09 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleParsing.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleParsing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -116,5 +116,4 @@ public class TestSimpleParsing extends TestBase { assertEval("if (FALSE) foo(NULL) <- 123"); assertEval("if (FALSE) foo(123) <- 123"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java index 100c10c4a63eb4988187a279cce71a8b4b83c9f9..cbfb94721e853e1bd2a0d6212038a069a4f28ad8 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java @@ -2380,5 +2380,4 @@ public class TestSimpleVectors extends TestBase { assertEval("v <- 1:8; dim(v) <- c(2,2,2); dimnames(v) <- list(foo=c('a','b'), bar=c('x','y'), baz=c('u','v')); v[,,2,drop=FALSE]"); assertEval("v <- 1:8; dim(v) <- c(2,2,2); dimnames(v) <- list(foo=c('a','b'), bar=c('x','y'), baz=c('u','v')); v[,,1,drop=TRUE]"); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestTrace.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestTrace.java index 5a09217420b34d17cd213b0a9538913e0936e053..dcb73c6ab5d357903a2074430cb0e275ddd39637 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestTrace.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestTrace.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 @@ -50,5 +50,4 @@ public class TestTrace extends TestBase { public void testCondTrace() { assertEval(template("f <- function(x) {}; %0(f, tracer=quote(if (x == 3 || x == 7) print(x))); g <- function() for (i in 1:10) f(i); g()", TRACE_VARIANTS)); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestRPackages.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestRPackages.java index c4c4d3b6bcf7b4b15f023cf46e04601eaed2620e..e25c359840854577f5b7270e2a7e2d44c68a29a6 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestRPackages.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestRPackages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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,6 @@ public abstract class TestRPackages extends TestBase { private PackagePath(Path path) { this.path = path; } - } /** diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestVanillaPackage.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestVanillaPackage.java index 9140c43235c4680adf7613c8b8a38430031694e7..7bd9ce16caef3b0c1edee6585f1dbd04d4e6f303 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestVanillaPackage.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rpackages/TestVanillaPackage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -60,5 +60,4 @@ public class TestVanillaPackage extends TestRPackages { public void testQualifiedReplacement() { assertEval(TestBase.template("{ library(\"vanilla\", lib.loc = \"%0\"); r<-42; vanilla::foo(r)<-7; detach(\"package:vanilla\"); r }", new String[]{TestRPackages.libLoc()})); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRTckTest.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRTckTest.java index e8b14d8fe62005c4714bd2b54f68223ae82c5797..1a3821aa2873bf320b2029c2b2f0ffdd0edfb479 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRTckTest.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tck/FastRTckTest.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 @@ -470,5 +470,4 @@ public class FastRTckTest extends TruffleTCK { public String multiplyCode(String firstName, String secondName) { return firstName + '*' + secondName; } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/AnalyzeExpectedTestOutput.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/AnalyzeExpectedTestOutput.java index 17bf41a39d88abe4b81e6fb575d48835067fd791..967b67050be1ad4816e2f2a11e917a8125474e97 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/AnalyzeExpectedTestOutput.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/AnalyzeExpectedTestOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 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 @@ -166,7 +166,6 @@ public class AnalyzeExpectedTestOutput { System.out.printf("file %d:%n", i + 1); System.out.println(subMapExpected); } - } } } @@ -180,5 +179,4 @@ public class AnalyzeExpectedTestOutput { } return !expectedInfo.output.equals(actualInfo.output); } - } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/ShowLLVMIR.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/ShowLLVMIR.java index e14ba5b36d8f2b4e34f4362d662d8a17e2d54bad..cb525d80dbc464f98c6ded71d488197d086ddaaa 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/ShowLLVMIR.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/tools/ShowLLVMIR.java @@ -122,12 +122,10 @@ public class ShowLLVMIR { } catch (Exception e) { System.err.println(e); } - } private static void usage() { System.err.print("usage: -o objfile"); System.exit(1); } - }