Skip to content

Commit ac1bfc2

Browse files
committed
Update Truffle and fix deprecation warnings
1 parent 6ad04b2 commit ac1bfc2

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
2323
package com.oracle.truffle.r.engine.interop;
2424

2525
import java.util.List;
26+
import java.util.function.Supplier;
2627

2728
import com.oracle.truffle.api.CallTarget;
2829
import com.oracle.truffle.api.CompilerDirectives;
@@ -472,7 +473,16 @@ public Object execute(VirtualFrame frame) {
472473
});
473474
}
474475

475-
static class Check extends RootNode {
476+
public static final Supplier<RootNode> CHECK_FACTORY = new CheckFactory();
477+
478+
private static final class CheckFactory implements Supplier<RootNode> {
479+
@Override
480+
public RootNode get() {
481+
return new Check();
482+
}
483+
}
484+
485+
private static final class Check extends RootNode {
476486

477487
Check() {
478488
super(null);

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RForeignAccessFactoryImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -122,7 +122,7 @@ public ForeignAccess getForeignAccess(RTruffleObject obj) {
122122
} else if (obj instanceof RInteropNA) {
123123
return RInteropNAMRForeign.ACCESS;
124124
} else if (obj instanceof RAbstractAtomicVector) {
125-
return ForeignAccess.create(new RAbstractVectorAccessFactory(), new RAbstractVectorAccessFactory.Check());
125+
return ForeignAccess.createAccess(new RAbstractVectorAccessFactory(), RAbstractVectorAccessFactory.CHECK_FACTORY);
126126
} else {
127127
ForeignAccess access = FFI_RForeignAccessFactoryImpl.getForeignAccess(obj);
128128
if (access != null) {

com.oracle.truffle.r.ffi.processor/src/com/oracle/truffle/r/ffi/processor/FFIProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -223,7 +223,7 @@ private void generateCallClass(ExecutableElement m) throws IOException {
223223
String callName = name + "Call";
224224
JavaFileObject fileObj = processingEnv.getFiler().createSourceFile("com.oracle.truffle.r.ffi.impl.upcalls." + callName);
225225
Writer w = fileObj.openWriter();
226-
w.append("// GENERATED by FFIProcessor; DO NOT EDIT\n");
226+
w.append("// GENERATED by com.oracle.truffle.r.ffi.processor.FFIProcessor class; DO NOT EDIT\n");
227227
w.append("\n");
228228
w.append("package com.oracle.truffle.r.ffi.impl.upcalls;\n");
229229
w.append("\n");
@@ -406,7 +406,7 @@ private void generateCallClass(ExecutableElement m) throws IOException {
406406
w.append(" }\n");
407407
w.append(" }\n");
408408
w.append("\n");
409-
w.append(" private static final ForeignAccess ACCESS = ForeignAccess.create(new " + callName + "Factory(), null);\n");
409+
w.append(" private static final ForeignAccess ACCESS = ForeignAccess.createAccess(new " + callName + "Factory(), null);\n");
410410
w.append("\n");
411411
w.append(" @Override\n");
412412
w.append(" public ForeignAccess getForeignAccess() {\n");

mx.fastr/suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name" : "truffle",
99
"subdir" : True,
10-
"version" : "4d3ea021801626309a82734dbf2153f7bf9942a8",
10+
"version" : "ab426fd70e30026d6988d512d5afcd3cc29cd565",
1111
"urls" : [
1212
{"url" : "https://github.com/graalvm/graal", "kind" : "git"},
1313
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},

0 commit comments

Comments
 (0)