Initial import of sablevm, version 1.1.1:

SableVM is a portable bytecode interpreter written in C, and implementing
the Java virtual machine specification, second edition.  Its goals are to
be reasonably small, fast and efficient, as well as providing a well
designed and robust platform for conducting research.

SableVM implements many innovative techniques, including:
* 3 flavors of threaded interpretation (switched, threaded and inlined).
* Bidirectional object layout.
* Spinlock-free thin locks.
* Sparse interface vtables.
* Low-cost maps for precise garbage collection.

This package is slightly based on the one found in pkgsrc-wip, made by
pancake AT phreaker.net.
This commit is contained in:
jmmv 2004-03-28 20:42:07 +00:00
parent 82f02da866
commit 56571642f5
8 changed files with 202 additions and 0 deletions

11
lang/sablevm/DESCR Normal file
View file

@ -0,0 +1,11 @@
SableVM is a portable bytecode interpreter written in C, and implementing
the Java virtual machine specification, second edition. Its goals are to
be reasonably small, fast and efficient, as well as providing a well
designed and robust platform for conducting research.
SableVM implements many innovative techniques, including:
* 3 flavors of threaded interpretation (switched, threaded and inlined).
* Bidirectional object layout.
* Spinlock-free thin locks.
* Sparse interface vtables.
* Low-cost maps for precise garbage collection.

46
lang/sablevm/Makefile Normal file
View file

@ -0,0 +1,46 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
#
DISTNAME= sablevm-1.1.1
CATEGORIES= lang
MASTER_SITES= http://devel.sablevm.org/download/1.1.1/
MAINTAINER= pancake@phreaker.net
HOMEPAGE= http://www.sablevm.org/
COMMENT= SableVM free Java virtual machine
DEPENDS+= unzip>=5.50:../../archivers/unzip
DEPENDS+= sablevm-classpath-1.1.1:../../lang/sablevm-classpath
GNU_CONFIGURE= yes
USE_BUILDLINK3= yes
USE_GNU_TOOLS+= make
USE_LIBTOOL= yes
CONFIGURE_ARGS+= --disable-signals-for-exceptions
EVAL_PREFIX+= PREFIX.sablevm-classpath=sablevm-classpath
PREFIX.sablevm-classpath_DEFAULT= ${LOCALBASE}
pre-configure:
cd ${WRKSRC} && ${AUTOHEADER}
cd ${WRKSRC} && ${AUTOCONF}
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/sablevm
${LN} -s ${PREFIX.sablevm-classpath}/lib/sablevm-classpath \
${PREFIX}/lib/sablevm/sablevm-classpath
${LN} -s ${PREFIX.sablevm-classpath}/share/sablevm-classpath \
${PREFIX}/share/sablevm/sablevm-classpath
.if !exists(/usr/include/semaphore.h)
LDFLAGS+= -lsemaphore
BUILDLINK_TRANSFORM+= l:rt:semaphore:
.include "../../devel/pthread-sem/buildlink3.mk"
.endif
.include "../../devel/libffi/buildlink3.mk"
.include "../../devel/libtool/buildlink3.mk"
.include "../../devel/popt/buildlink3.mk"
.include "../../mk/autoconf.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

19
lang/sablevm/PLIST Normal file
View file

@ -0,0 +1,19 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/28 20:42:07 jmmv Exp $
bin/java-sablevm
bin/sablevm
include/jni.h
include/jni_system_specific.h
lib/libsablevm.a
lib/libsablevm.la
lib/libsablevm.so
lib/libsablevm.so.1
lib/libsablevm.so.1.9
lib/sablevm/sablevm-classpath
man/man1/java-sablevm.1
man/man1/sablevm.1
share/sablevm/AUTHORS
share/sablevm/COPYING.LIB
share/sablevm/LICENSE
share/sablevm/sablevm-classpath
@dirrm share/sablevm
@dirrm lib/sablevm

8
lang/sablevm/distinfo Normal file
View file

@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
SHA1 (sablevm-1.1.1.tar.gz) = 3067ebc8c05a60dd7b1979193be0fa4d5422f4c4
Size (sablevm-1.1.1.tar.gz) = 554037 bytes
SHA1 (patch-aa) = 25e7b6748c4f5c8b327e20763ca5bf302e2bb795
SHA1 (patch-ab) = 033d725794a2fae8aef57dd971cdff2a9832e9ab
SHA1 (patch-ac) = 12d430397863ef7774fbb57831e10b31296c73e1
SHA1 (patch-ad) = 7a157ce19ac27d489565b4035273864314a07c96

View file

@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
--- Makefile.in.orig 2004-03-20 23:05:06.000000000 +0100
+++ Makefile.in
@@ -580,7 +580,7 @@ uninstall-info: uninstall-info-recursive
java-sablevm: java-sablevm.m4.sh
rm -f java-sablevm
- m4 -P java-sablevm.m4.sh -DSABLEVM_BINARY=@bindir@/sablevm >java-sablevm
+ m4 -P -DSABLEVM_BINARY=@bindir@/sablevm java-sablevm.m4.sh >java-sablevm
chmod a-w java-sablevm
ChangeLog:

View file

@ -0,0 +1,51 @@
$NetBSD: patch-ab,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
Index: configure.ac
===================================================================
--- configure.ac (revision 1860)
+++ configure.ac (working copy)
@@ -18,6 +18,7 @@
AC_DEFINE(_REENTRANT,1,link with reentrant library functions)
AC_DEFINE(_POSIX_C_SOURCE,199506L,link with POSIX library functions)
+AC_DEFINE(_XOPEN_SOURCE,500,link with XOpen library functions)
dnl *** uncomment if you want to insert a magic value in every object instance for debugging ***
dnl AC_DEFINE(MAGIC,1,put "SableVM" in every instance)
@@ -90,12 +91,6 @@
enable_signals_for_exceptions=no
fi])
-case "$enable_signals_for_exceptions" in
- no) ;;
- yes) AC_DEFINE(_SABLEVM_SIGNALS_FOR_EXCEPTIONS,1,use signals to detect exceptions) ;;
- *) AC_MSG_ERROR(bad value \"${enable_signals_for_exceptions}\" for --enable-signals-for-exceptions) ;;
-esac
-
dnl garbage collection
AC_ARG_WITH(gc,
[ --with-gc=TYPE use given garbage collector (none,copying)],,
@@ -200,7 +195,23 @@
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
+AC_CHECK_TYPE(siginfo_t, have_siginfo=yes;
+ AC_DEFINE(HAVE_SIGINFO, [],
+ [Define to 1 if you have siginfo support]),
+ have_siginfo=no, [#include <signal.h>])
+dnl Handle signals for exceptions based on the availability of siginfo_t.
+if test "$have_siginfo" = no; then
+ enable_signals_for_exceptions=no
+ AC_MSG_WARN([siginfo not available; disabled use of signals])
+fi
+
+case "$enable_signals_for_exceptions" in
+ no) ;;
+ yes) AC_DEFINE(_SABLEVM_SIGNALS_FOR_EXCEPTIONS,1,use signals to detect exceptions) ;;
+ *) AC_MSG_ERROR(bad value \"${enable_signals_for_exceptions}\" for --enable-signals-for-exceptions) ;;
+esac
+
dnl Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP

View file

@ -0,0 +1,42 @@
$NetBSD: patch-ac,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
Index: src/libsablevm/error.c
===================================================================
--- src/libsablevm/error.c (revision 1888)
+++ src/libsablevm/error.c (working copy)
@@ -78,6 +78,8 @@
----------------------------------------------------------------------
*/
+#if defined(HAVE_SIGINFO)
+
static void
_svmf_internal_sigaction (int signo, siginfo_t * info, void *ignored)
{
@@ -306,6 +308,8 @@
}
}
+#endif /* HAVE_SIGINFO */
+
/*
----------------------------------------------------------------------
_svmf_error_init
@@ -386,6 +390,8 @@
#endif /* _SABLEVM_INLINABILITY_TESTING */
+#if defined(HAVE_SIGINFO)
+
/* use extended info version */
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = _svmf_internal_sigaction;
@@ -448,6 +454,8 @@
#endif /* _SABLEVM_INLINABILITY_TESTING */
+#endif /* HAVE_SIGINFO */
+
return JNI_OK;
error:

View file

@ -0,0 +1,12 @@
$NetBSD: patch-ad,v 1.1.1.1 2004/03/28 20:42:08 jmmv Exp $
--- src/libsablevm/invoke_interface.c.orig 2004-03-20 23:02:04.000000000 +0100
+++ src/libsablevm/invoke_interface.c
@@ -220,6 +220,7 @@ JNI_CreateJavaVM (JavaVM **pvm, void **p
}
_svmf_set_current_env (env);
+ _svmm_cond_init (vm->threads.vm_destruction_cond);
vm->threads.user = env;
vm->threads.next_thread_id = 1; /* thread IDs must start at 1
(i.e. no ID == 0) */