--- api/pthread/src/Java/bglpthread.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ api/pthread/src/Java/bglpthread.java 2021-01-24 10:19:30.017962237 -0700
@@ -123,7 +123,7 @@ public class bglpthread extends Thread {
// Yield the processor
public static int sched_yield() {
- yield();
+ Thread.yield();
return 0;
}
--- api/srfi18/src/Java/jthread.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ api/srfi18/src/Java/jthread.java 2021-01-24 10:19:59.402882259 -0700
@@ -123,7 +123,7 @@ public class jthread extends Thread {
// Yield the processor
public static int sched_yield() {
- yield();
+ Thread.yield();
return 0;
}
--- api/ssl/src/Makefile.orig 2020-11-09 00:06:14.000000000 -0700
+++ api/ssl/src/Makefile 2021-01-24 10:21:22.369671180 -0700
@@ -90,24 +90,44 @@ INCLUDES = $(C_SRC_DIR)/bglssl.h $(C_SRC
#*---------------------------------------------------------------------*/
#* Java objects */
#*---------------------------------------------------------------------*/
+ifeq ($(JAVA_VERSION), 14)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 13)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 12)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 11)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 10)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
ifeq ($(JAVA_VERSION), 1.9)
JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
else
- ifeq ($(JAVA_VERSION), 1.8)
- JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
- else
- ifeq ($(JAVA_VERSION), 1.7)
- JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
- else
- ifeq ($(JAVA_VERSION), 1.6)
- JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
- else
- ifeq ($(JAVA_VERSION), 1.5)
- JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
- endif
- endif
- endif
- endif
+ifeq ($(JAVA_VERSION), 1.8)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 1.7)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 1.6)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+else
+ifeq ($(JAVA_VERSION), 1.5)
+ JAVA_CLASSES_SRC+=$(CLASS_DIR)/certificate.java $(CLASS_DIR)/private_key.java
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+endif
endif
#*---------------------------------------------------------------------*/
--- bde/jas/produce.scm.orig 2020-11-09 00:07:31.000000000 -0700
+++ bde/jas/produce.scm 2021-01-24 10:18:58.958050998 -0700
@@ -24,8 +24,8 @@
fields methods attributes )
(outshort outchan #xCAFE)
(outshort outchan #xBABE)
- (outshort outchan 3)
- (outshort outchan 45)
+ (outshort outchan 0)
+ (outshort outchan 52)
(produce-pool outchan pool-size (reverse pool))
(outshort outchan flags)
(outshort outchan me)
--- comptime/Jas/produce.scm.orig 2020-11-09 00:06:14.000000000 -0700
+++ comptime/Jas/produce.scm 2021-01-24 10:18:58.959050996 -0700
@@ -24,8 +24,8 @@
fields methods attributes )
(outshort outchan #xCAFE)
(outshort outchan #xBABE)
- (outshort outchan 3)
- (outshort outchan 45)
+ (outshort outchan 0)
+ (outshort outchan 52)
(produce-pool outchan pool-size (reverse pool))
(outshort outchan flags)
(outshort outchan me)
--- comptime/SawJvm/out.scm.orig 2020-11-09 00:06:14.000000000 -0700
+++ comptime/SawJvm/out.scm 2021-01-24 10:21:57.449582777 -0700
@@ -473,7 +473,7 @@
(define (localvar me::jvm r b e id);
(with-access::rtl_reg r (type var)
(when (and (local? var) (local-user? var))
- (let ( (user-name (symbol->string (local-id var)))
+ (let ( (user-name (bigloo-mangle (symbol->string (local-id var))))
(type (compile-type me type)) )
(code! me `(localvar ,b ,e ,user-name ,type ,id)) ))))
--- configure.orig 2020-11-09 00:06:14.000000000 -0700
+++ configure 2021-01-24 10:23:54.802287045 -0700
@@ -109,7 +109,7 @@ zip=zip
jar="jar cmf"
zflags=
javac=javac
-jcflags=-O
+jcflags="-deprecation -source 1.8 -target 1.8"
java=java
jflags=
jvflags=-noverify
@@ -3255,7 +3255,7 @@ if [ $action = "all" -o $action = "biglo
--jflags=$jflags \
--jvflags=$jvflags \
--javac=$javac \
- --jcflags=$jcflags \
+ --jcflags="$jcflags" \
--cpsep="$cpsep"` || exit 1
if [ $jtest != 0 ]; then
@@ -3266,7 +3266,17 @@ if [ $action = "all" -o $action = "biglo
fi
java_version=`$javac -version 2>&1 | head -n 1` || exit 1
- if $echo "$java_version" | grep "1.9" > /dev/null
+ if $echo "$java_version" | grep "14." > /dev/null
+ then java_version=14
+ elif $echo "$java_version" | grep "13." > /dev/null
+ then java_version=13
+ elif $echo "$java_version" | grep "12." > /dev/null
+ then java_version=12
+ elif $echo "$java_version" | grep "11." > /dev/null
+ then java_version=11
+ elif $echo "$java_version" | grep "10." > /dev/null
+ then java_version=10
+ elif $echo "$java_version" | grep "1.9" > /dev/null
then java_version=1.9
elif $echo "$java_version" | grep "1.8" > /dev/null
then java_version=1.8
@@ -4624,7 +4634,7 @@ if [ $action = "all" -o $action = "Makef
if [ "$java_configured" = "no" ]; then
$autoconfdir/javatest --java=$java --jflags=$jflags --jvflags=$jvflags \
- --javac=$javac --jcflags=$jcflags --user=$user --tmp=$buildtmp
+ --javac=$javac --jcflags="$jcflags" --user=$user --tmp=$buildtmp
if [ $? != 0 ]; then
$echo "*** ERROR:configure:Can't configure JVM back-end"
--- jigloo/jigloo.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ jigloo/jigloo.java 2021-01-24 10:18:58.961050990 -0700
@@ -21,7 +21,7 @@ public abstract class jigloo {
static PrintStream out = System.out;
static int verbose = 0;
static boolean directives = true;
- static Hashtable arrays = new Hashtable();
+ static Hashtable<String, Class> arrays = new Hashtable<String, Class>();
static boolean isInterface = false;
@@ -121,17 +121,17 @@ public abstract class jigloo {
emit( " \"" + field.getName() + "\")\n" );
}
- static void jigloo_method( Class owner, Method method, Hashtable overrides ) {
+ static void jigloo_method( Class owner, Method method, Hashtable<String, Integer> overrides ) {
int mod = method.getModifiers();
if( ! Modifier.isNative( mod ) ) {
- Integer override_index= (Integer)overrides.get( method.getName() );
+ Integer override_index= overrides.get( method.getName() );
emit( " (method " );
jigloo_modifiers( mod );
emit( method.getName() );
if( override_index.intValue() != 0 ) {
emit( override_index.toString() );
overrides.put( method.getName(),
- new Integer( override_index.intValue() + 1 ) );
+ Integer.valueOf( override_index.intValue() + 1 ) );
}
jigloo_type( method.getReturnType() );
emit( " " );
@@ -208,14 +208,14 @@ public abstract class jigloo {
Constructor[] all_constructors = a_class.getConstructors();
Field[] all_fields = a_class.getFields();
Method[] all_methods = a_class.getMethods();
- Hashtable overrides = new Hashtable();
+ Hashtable<String, Integer> overrides = new Hashtable<String, Integer>();
// handling overrides
for( int i = 0; i < all_methods.length; i++ ) {
- Integer override_count = (Integer)overrides.get( all_methods[i].getName() );
+ Integer override_count = overrides.get( all_methods[i].getName() );
overrides.put( all_methods[i].getName(),
- new Integer( (override_count == null) ? 0 : 1 ) );
+ Integer.valueOf( (override_count == null) ? 0 : 1 ) );
}
--- jigloo/Makefile.orig 2020-11-09 00:06:14.000000000 -0700
+++ jigloo/Makefile 2021-01-24 10:18:58.961050990 -0700
@@ -133,4 +133,4 @@ pop:
#* .java --> .class */
#*---------------------------------------------------------------------*/
.java.class:
- @ $(JAVAC) $*.java
+ @ $(JAVAC) $(JCFLAGS) $*.java
--- runtime/Jlib/cnst.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/cnst.java 2021-01-24 10:18:58.962050987 -0700
@@ -6,7 +6,7 @@ public class cnst extends obj
{
public final int value;
- private static final Hashtable table = new Hashtable();
+ private static final Hashtable<Integer, cnst> table = new Hashtable<Integer, cnst>();
public cnst( final int value )
{
@@ -15,11 +15,11 @@ public class cnst extends obj
public static cnst make_cnst( final int value )
{
- final Integer key = new Integer( value );
- final Object r = table.get( key );
+ final Integer key = Integer.valueOf( value );
+ final cnst r = table.get( key );
if (r != null)
- return (cnst)r;
+ return r;
final cnst result = new cnst( value );
--- runtime/Jlib/date.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/date.java 2021-01-24 10:26:33.417887275 -0700
@@ -21,7 +21,7 @@ public class date extends obj {
if( !istz ) {
calendar = new GregorianCalendar( y, mon, d, h, min, s );
final TimeZone tmz = calendar.getTimeZone();
- timezone = -tmz.getRawOffset() / 1000;
+ timezone = tmz.getOffset(calendar.getTimeInMillis()) / 1000;
} else {
final TimeZone tmz = new SimpleTimeZone( 0, "UTC" );
calendar = new GregorianCalendar( tmz );
@@ -35,21 +35,21 @@ public class date extends obj {
public date( final long seconds ) {
calendar = new GregorianCalendar();
final Date d = new Date();
-
- d.setTime( seconds * 1000 );
+ final long milliseconds = seconds * 1000;
+ d.setTime( milliseconds );
calendar.setTime( d );
final TimeZone tmz = calendar.getTimeZone();
- timezone = -tmz.getRawOffset() / 1000;
+ timezone = tmz.getOffset( milliseconds ) / 1000;
}
public date( final long nseconds, boolean _b ) {
calendar = new GregorianCalendar();
final Date d = new Date();
-
- d.setTime( nseconds / _b ? 1000000 : 1000 );
+ final long milliseconds = nseconds / 1000000;
+ d.setTime( milliseconds );
calendar.setTime( d );
final TimeZone tmz = calendar.getTimeZone();
- timezone = -tmz.getRawOffset() / 1000;
+ timezone = tmz.getOffset( milliseconds ) / 1000;
nsec = _b ? (nseconds % 1000000) : (nseconds % 1000);
}
}
--- runtime/Jlib/dlopen.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/dlopen.java 2021-01-24 10:18:58.962050987 -0700
@@ -22,7 +22,7 @@ import java.lang.reflect.*;
public abstract class dlopen {
private static final String NO_ERROR_YET = "No error (yet)";
private static String bgl_dload_error = NO_ERROR_YET;
- private static final Hashtable dlopen_table = new Hashtable();
+ private static final Hashtable<byte[], Boolean> dlopen_table = new Hashtable<byte[], Boolean>();
static String prefix( final byte[] filename ) {
final int len = filename.length;
@@ -190,7 +190,7 @@ public abstract class dlopen {
synchronized( dlopen_table ) {
if( !(dlopen_table.contains( filename )) ) {
Object res = dload_inner( filename, init_sym, mod_sym );
- dlopen_table.put( filename, new Boolean( true ) );
+ dlopen_table.put( filename, Boolean.valueOf( true ) );
return res;
} else {
return foreign.BUNSPEC;
--- runtime/Jlib/foreign.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/foreign.java 2021-01-24 11:44:12.623838942 -0700
@@ -3537,17 +3537,17 @@ public final class foreign
return new bigloo.date(ns, s, min, h, d, mon - 1, y, tz, istz, dst);
}
- public static date bgl_update_date(date, long ns, int s,
+ public static date bgl_update_date(date dt, long ns, int s,
int min, int h, int d, int mon,
int y, int tz, boolean istz, int dst)
{
date tmp = bgl_make_date( ns, s, min, h, d, mon,
y, tz, istz, dst);
- date.nsec = tmp.nsec;
- date.calendar = tmp.calendar;
- date.timezone = tmp.timezone;
- return date;
+ dt.nsec = tmp.nsec;
+ dt.calendar = tmp.calendar;
+ dt.timezone = tmp.timezone;
+ return dt;
}
@@ -3579,7 +3579,7 @@ public final class foreign
return d;
}
- public static date bgl_milliseconds_to_date(long sec)
+ public static date bgl_milliseconds_to_utc_date(long sec)
{
date d = new bigloo.date(sec * 1000000, true);
d.calendar.setTimeZone(new SimpleTimeZone(0, "UTC"));
@@ -5088,7 +5088,7 @@ public final class foreign
throw v;
}
- private static Boolean err_lock = new Boolean( true );
+ private static Boolean err_lock = Boolean.valueOf( true );
public static void notify_exception( Throwable e ) throws Throwable {
if( e instanceof ClassCastException ) {
--- runtime/Jlib/JDK16.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/JDK16.java 2021-01-24 10:18:58.963050984 -0700
@@ -19,7 +19,7 @@ import java.lang.reflect.*;
public class JDK16 extends JDK {
// JDK1.6 methods
- public Method getDeclaredMethodImpl( Class c, byte[] m ) throws Exception {
+ public Method getDeclaredMethodImpl( Class<?> c, byte[] m ) throws Exception {
return c.getDeclaredMethod( new String( m ) );
}
--- runtime/Jlib/JDK.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/JDK.java 2021-01-24 10:18:58.964050981 -0700
@@ -49,8 +49,8 @@ public abstract class JDK {
private static JDK getImpl(String classname) {
try {
- Class c = Class.forName(classname);
- return (JDK)c.newInstance();
+ Class<?> c = Class.forName(classname);
+ return JDK.class.cast(c.getDeclaredConstructor().newInstance());
} catch (Exception x) {
return null;
}
@@ -58,7 +58,7 @@ public abstract class JDK {
// Static methods
- public static Method getDeclaredMethod(Class c, byte[] m)
+ public static Method getDeclaredMethod(Class<?> c, byte[] m)
throws Exception {
return impl.getDeclaredMethodImpl(c, m);
}
@@ -90,7 +90,7 @@ public abstract class JDK {
return impl.passwordImpl( prompt );
}
- public abstract Method getDeclaredMethodImpl(Class c, byte[] m)
+ public abstract Method getDeclaredMethodImpl(Class<?> c, byte[] m)
throws Exception;
public abstract Object invokeImpl(Method m) throws Exception;
--- runtime/Jlib/output_pipe_port.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/output_pipe_port.java 2021-01-24 10:18:58.964050981 -0700
@@ -42,7 +42,7 @@ public class output_pipe_port extends ou
static String[] tokenizer( byte[] s ) {
int len = s.length;
- Vector v = new Vector();
+ ArrayList<String> v = new ArrayList<String>();
// if | then offset = 2, otherwise, if pipe: offset = 5
int offset = (s[0] == (byte)'|') ? 2 : 5;
int i = skip_whitespace( s, offset );
@@ -69,7 +69,7 @@ public class output_pipe_port extends ou
i = skip_whitespace( s, j + 1 );
}
- return (String[])(v.toArray( new String[ v.size() ] ));
+ return v.toArray( new String[ v.size() ] );
}
static String[] make_cmd( byte[] s ) {
--- runtime/Jlib/process.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/process.java 2021-01-24 10:18:58.964050981 -0700
@@ -12,6 +12,7 @@ package bigloo;
import java.io.IOException;
import java.lang.Process;
+import java.util.ArrayList;
import java.util.Vector;
/*---------------------------------------------------------------------*/
@@ -27,7 +28,7 @@ public class process extends obj
/*--- non static fields -----------------------------------------------*/
private final Process process;
private final int index;
- private final Vector flushers;
+ private final Vector<flusher> flushers;
public obj input_port;
public obj output_port;
public obj error_port;
@@ -101,7 +102,7 @@ public class process extends obj
: "NUL:" ).getBytes();
// building the command arguments
- final Vector cmd_vector = new Vector();
+ final ArrayList<String> cmd_vector = new ArrayList<String>();
if (host != null)
{
@@ -165,9 +166,7 @@ public class process extends obj
cmd_vector.add( cmd );
}
- final String[] argv = new String[cmd_vector.size()];
-
- cmd_vector.copyInto( argv );
+ final String[] argv = cmd_vector.toArray( new String[cmd_vector.size()] );
// Construct the process environment variable list
aux = benv;
@@ -214,7 +213,7 @@ public class process extends obj
if ((boutput == bigloo.foreign.BUNSPEC) ||
(berror == bigloo.foreign.BUNSPEC))
{
- flushers = new Vector();
+ flushers = new Vector<flusher>();
if (boutput == bigloo.foreign.BUNSPEC)
flushers.add( new flusher( process.getInputStream(), System.out ) );
if (berror == bigloo.foreign.BUNSPEC)
@@ -312,7 +311,7 @@ public class process extends obj
process.waitFor();
if (flushers != null)
while (!flushers.isEmpty())
- ((flusher)flushers.remove( 0 )).join();
+ flushers.remove( 0 ).join();
}
catch (InterruptedException _i)
{
--- runtime/Jlib/weakptr.java.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Jlib/weakptr.java 2021-01-24 10:18:58.964050981 -0700
@@ -4,10 +4,10 @@ import java.lang.ref.WeakReference;
public class weakptr extends obj {
- public WeakReference ref;
+ public WeakReference<Object> ref;
public weakptr(final Object data){
- ref = new WeakReference(data);
+ ref = new WeakReference<Object>(data);
}
public Object getData(){
@@ -16,7 +16,7 @@ public class weakptr extends obj {
}
public void setData(Object o){
- ref = new WeakReference(o);
+ ref = new WeakReference<Object>(o);
}
public void write( final output_port p ) {
--- runtime/Makefile.orig 2020-11-09 00:06:14.000000000 -0700
+++ runtime/Makefile 2021-01-24 10:28:05.481655201 -0700
@@ -108,30 +108,51 @@ C_CLIB = $(CLIB:%=Clib/%.c)
#* Java objects */
#*---------------------------------------------------------------------*/
JDK_LIBS = JDK
+
+ifeq ($(JAVA_VERSION), 14)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 13)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 12)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 11)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 10)
+ JDK_LIBS += JDK16
+else
ifeq ($(JAVA_VERSION), 1.9)
- JDK_LIBS += JDK16
- else
- ifeq ($(JAVA_VERSION), 1.8)
- JDK_LIBS += JDK16
- else
- ifeq ($(JAVA_VERSION), 1.7)
- JDK_LIBS += JDK16
- else
- ifeq ($(JAVA_VERSION), 1.6)
- JDK_LIBS += JDK16
- else
- ifeq ($(JAVA_VERSION), 1.5)
- JDK_LIBS += JDK15
- else
- ifeq ($(JAVA_VERSION), 1.4)
- JDK_LIBS += JDK14
- else
- JDK_LIBS += JDK13
- endif
- endif
- endif
- endif
- endif
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 1.8)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 1.7)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 1.6)
+ JDK_LIBS += JDK16
+else
+ifeq ($(JAVA_VERSION), 1.5)
+ JDK_LIBS += JDK15
+else
+ifeq ($(JAVA_VERSION), 1.4)
+ JDK_LIBS += JDK14
+else
+ JDK_LIBS += JDK13
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+endif
+endif
endif
JLIB = foreign buffer configure stackwriter\