You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2005/10/05 04:20:10 UTC
svn commit: r294974 [4/25] - in
/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm: ./ jchevm/
jchevm/doc/ jchevm/etc/ jchevm/include/ jchevm/java/ jchevm/java/org/
jchevm/java/org/dellroad/ jchevm/java/org/dellroad/jc/
jchevm/java/org/dellroad/...
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/Makefile.am
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/Makefile.am?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/Makefile.am (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/Makefile.am Tue Oct 4 19:19:16 2005
@@ -0,0 +1,33 @@
+## $Id: Makefile.am,v 1.8 2005/04/29 00:49:30 archiecobbs Exp $
+
+jcetcdir= $(sysconfdir)
+
+dist_jcetc_DATA= jc.conf
+
+EXTRA_DIST= gdb.userdef regen.sh makedist.sh jc.xpm \
+ classpath.spec.in jcvm.spec.in
+
+rpms: classpath-rpm jcvm-rpm
+
+classpath-rpm: rpmdirs
+ DIR=`pwd`; \
+ rpmbuild -bb --clean --define "_topdir $${DIR}/rpm" classpath.spec
+
+jcvm-rpm: rpmdirs
+ DIR=`pwd`; \
+ cp $(srcdir)/jc.xpm $${DIR}/rpm/SOURCES; \
+ rpmbuild -bb --clean --define "_topdir $${DIR}/rpm" jcvm.spec
+
+rpmdirs:
+ @for DIR in rpm rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS; do \
+ [ -d "$${DIR}" ] || mkdir "$${DIR}"; \
+ done
+ @RESULT="true"; \
+ for TGZ in classpath-$(CLASSPATH_VERSION) jc-$(VERSION); do \
+ if ! [ -f rpm/SOURCES/$$TGZ.tar.gz ]; then \
+ echo Please copy $$TGZ.tar.gz into rpm/SOURCES; \
+ RESULT="false"; \
+ fi; \
+ done; \
+ $$RESULT
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/classpath.spec.in
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/classpath.spec.in?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/classpath.spec.in (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/classpath.spec.in Tue Oct 4 19:19:16 2005
@@ -0,0 +1,66 @@
+# $Id: classpath.spec.in,v 1.1 2005/03/20 20:13:57 archiecobbs Exp $
+
+%define version_num @CLASSPATH_VERSION@
+%define release_num 1
+
+Summary: GNU Classpath Java class libraries
+Name: classpath
+Version: %{version_num}
+Release: %{release_num}
+Group: Development/Tools
+Copyright: GPL+exception
+URL: http://www.classpath.org/
+BuildRoot: %{_tmppath}/%{name}-root
+BuildRequires: jikes, zip
+Packager: Archie Cobbs <ar...@dellroad.org>
+Source: ftp://ftp.gnu.org/pub/gnu/classpath/classpath-%{version_num}.tar.gz
+
+%description
+GNU Classpath, Essential Libraries for Java, is a GNU project to create
+free core class libraries for use with virtual machines and compilers
+for the Java programming language.
+
+%prep
+%setup -n classpath-%{version_num}
+
+%build
+pushd ${RPM_BUILD_DIR}/classpath-%{version_num}
+# Determine if we can build the GTK stuff
+GTKPEER='disable'
+if pkg-config --exists 'gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 libart-2.0 gdk-pixbuf-2.0'; then
+ GTKPEER='enable'
+fi
+%configure --with-jikes --enable-jni --${GTKPEER}-gtk-peer
+make
+popd
+
+%install
+pushd ${RPM_BUILD_DIR}/classpath-%{version_num}
+%{makeinstall}
+popd
+
+pushd ${RPM_BUILD_ROOT}/%{_infodir}
+rm -f dir
+for i in *; do
+ mv $i classpath-$i
+done
+popd
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf ${RPM_BUILD_ROOT}
+
+%files
+%defattr(-,root,root)
+%doc AUTHORS COPYING LICENSE README THANKYOU
+%{_libdir}/classpath
+%dir %{_datadir}/classpath
+%{_libdir}/security/classpath.security
+%{_datadir}/classpath/glibj.zip
+%doc %{_datadir}/classpath/api
+%doc %{_datadir}/classpath/examples
+%doc %{_infodir}/*
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/gdb.userdef
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/gdb.userdef?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/gdb.userdef (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/gdb.userdef Tue Oct 4 19:19:16 2005
@@ -0,0 +1,361 @@
+# $Id: gdb.userdef,v 1.14 2005/05/08 21:03:50 archiecobbs Exp $
+
+#
+# Note: for these commands to work, you must set $env to point
+# to the thread structure for a live thread, e.g.:
+#
+# (gdb) set $env = _jc_vms_list.lh_first->threads.alive_list.lh_first
+#
+# You can use "setenv" to try to do this automatically, or "setenv2"
+# to do it manually (the "env" is usually obvious in stack traces).
+#
+
+define setenv
+ if _jc_vms_list.lh_first == 0
+ printf "sorry, the vm is not initialized yet\n"
+ else
+ set $env = _jc_vms_list.lh_first->threads.alive_list.lh_first
+ set $vm = $env->vm
+ print $vm
+ print $env
+ end
+end
+
+document setenv
+ Attempt to automatically set the $env and $vm variables.
+end
+
+define setenv2
+ set $env = (_jc_env *)$arg0
+ set $vm = $env->vm
+ print $vm
+ print $env
+end
+
+document setenv
+ Set $env from the supplied argument, and derive $vm too.
+end
+
+define search_method_tree
+ set $addr = $arg0
+ set $tree = &$env->vm->method_tree
+ set $node = $tree->root
+ set $found = 0
+ while $found == 0 && $node != 0
+ set $method = (_jc_method *)((char *)$node - $tree->offset)
+ if $addr <= $method->function
+ set $node = $node->left
+ else
+ if $addr > $method->u.exec.function_end
+ set $node = $node->right
+ else
+ set $found = 1
+ end
+ end
+ end
+ if $found == 0
+ set $method = (_jc_method *)0
+ end
+end
+
+define print_java_stack_frame
+ set $method = (_jc_method *)$arg0
+ if $method == (void *)0
+ set $addr = (_jc_method *)$arg1
+ printf " %p not found\n", $addr
+ else
+ if $method->class == 0
+ printf " function `%s' (method %p)\n", $method->name, $method
+ else
+ set $class = $method->class
+ printf " %s.%s(", $class->name, $method->name
+ if $class->u.nonarray.source_file == 0
+ printf "Unknown"
+ else
+ printf "%s", $class->u.nonarray.source_file
+ end
+ set $jline = 0
+ if ($method->access_flags & 0x2000) != 0
+ set $i = 0
+ set $found = 0
+ set $pctr = (int)$arg1
+ while !$found && $i < $method->u.code.num_linemaps
+ if $pctr >= $method->u.code.linemaps[$i].index && ($i == $method->u.code.num_linemaps - 1 || $pctr < $method->u.code.linemaps[$i + 1].index)
+ set $jline = $method->u.code.linemaps[$i].line
+ set $found = 1
+ end
+ set $i = $i + 1
+ end
+ else
+ set $index = 0
+ set $found = 0
+ set $addr = (_jc_method *)$arg1
+ while !$found && $index < $method->u.exec.u.pc_map.len
+ set $info = &$method->u.exec.u.pc_map.map[$index]
+ set $next = &$method->u.exec.u.pc_map.map[$index + 1]
+ if $addr > $info->pc && $addr <= $next->pc
+ set $jline = $info->jline
+ set $found = 1
+ end
+ set $index = $index + 1
+ end
+ end
+ if $jline != 0
+ printf ":%d", $jline
+ end
+ printf ")"
+ if ($method->access_flags & 0x2000) == 0
+ printf " pc=%p ", $addr
+ end
+ printf " ((_jc_method *)%p)\n", $method
+ end
+ end
+end
+
+define jline
+ search_method_tree $arg0
+ print_java_stack_frame $method $arg0
+end
+
+document jline
+ Determine the Java method and line number corresponding to a PC location.
+ The method must be in the method table. The PC should be given as the
+ first argument.
+end
+
+define pstack
+ set $s = $env->java_stack
+ set $p = ((void **)$ebp)[1]
+ set $f = ((void **)$ebp)[0]
+ while $s != 0
+ set $s = (_jc_java_stack *)$s
+ if $s->interp
+ set $s = (_jc_interp_stack *)$s
+ set $method = $s->method
+ print_java_stack_frame $method *$s->pcp
+ set $s = (_jc_interp_stack *)$s->jstack.next
+ else
+ set $s = (_jc_exec_stack *)$s
+ search_method_tree $p
+ if $method == &$env->vm->invoke_method
+ set $s = (_jc_exec_stack *)$s->jstack.next
+ if $s != 0
+ set $p = $s->pc
+ set $f = $s->frame
+ end
+ else
+ if $method != 0
+ print_java_stack_frame $method $p
+ end
+ end
+ set $p = ((void **)$f)[1]
+ set $f = ((void **)$f)[0]
+ end
+ end
+end
+
+document pstack
+ Print Java stack for the current thread. The $env variable must be
+ set consistently with the currently selected thread. The top frame
+ may not be present if its an executable method.
+end
+
+define follow_bp
+ set $bp = $ebp
+ set $p = (void *)0xffffffff
+ while $bp != 0
+ printf "bp = %p pc = %p\n", $bp, $p
+ set $p = ((void **)$bp)[1]
+ set $bp = ((void **)$bp)[0]
+ end
+end
+
+document follow_bp
+ Follow chain of base pointers (i386 only).
+end
+
+define pthrowable
+ set $obj = (_jc_object *)$arg0
+ printf "%s", $obj->type->name
+ set $string = (_jc_object *)((char *)$obj + $env->vm->boot.fields.Throwable.detailMessage->offset)
+ if $string != 0x0
+ printf "detail@%p", $string
+ printf ": "
+ pstring $string
+ else
+ printf "\n"
+ end
+end
+
+document pthrowable
+ Display an exception object.
+ The first parameter is the address of a java.lang.Throwable object.
+end
+
+define pstring
+ set $obj = (_jc_object *)$arg0
+ set $type = (_jc_type *)$env->vm->boot.types.String
+ set $value = *(_jc_char_array **)((char *)$obj + $type->u.nonarray.fields[4]->offset)
+ set $offset = *(jint *)((char *)$obj + $type->u.nonarray.fields[7]->offset)
+ set $count = *(jint *)((char *)$obj + $type->u.nonarray.fields[6]->offset)
+ set $i = $offset
+ printf "\""
+ while $i < $offset + $count
+ printf "%c", (char)($value->elems[$i])
+ set $i = $i + 1
+ end
+ printf "\"\n"
+end
+
+document pstring
+ Print the contents of a Java string object.
+ The first parameter is the address of a java.lang.String object.
+end
+
+define ptype
+ set $type = (_jc_type *)$arg0
+ printf "%s\n", $type->name
+ if ($type->flags & 0x0040)
+ printf " LOADED\n"
+ end
+ if ($type->flags & 0x0400)
+ printf " RESOLVED\n"
+ end
+ if ($type->flags & 0x0800)
+ printf " INITIALIZED\n"
+ end
+end
+
+document ptype
+ Print basic info about a type.
+end
+
+define pobj
+ printf "%p is a %s\n", (void *)$arg0, ((_jc_object *)$arg0)->type->name
+end
+
+document pobj
+ Print the type of an object.
+end
+
+define pmethod
+ set $accnames = { "public", "privat", "prtctd", "static", "finall", "synchr", "voltle", "trnsnt", "native", "intrfc", "abstrt", "strict" }
+ set $method = (_jc_method *)$arg0
+ set $i = 1
+ while $i < 12
+ if (($method->access_flags & (1 << $i)) != 0)
+ printf "%s ", $accnames[$i]
+ end
+ set $i = $i << 1
+ end
+ printf "%s.%s%s\n", $method->class->name, $method->name, $method->signature
+ printf " type=%s\n", ($method->access_flags & 0x0100) ? (($method->access_flags & 0x1000) ? "JCNI native" : "JNI native") : ($method->access_flags & 0x2000) ? "interpreted" : "executable"
+ printf " function=%p\n", $method->function
+ if ($method->access_flags & 0x0100)
+ printf "nativefunc=%p\n", $method->function
+ end
+end
+
+document pmethod
+ Print information about a method.
+end
+
+define heap_block
+ set $page_size = 4096
+ set $mem = (char *)$arg0
+ set $heap = &$env->vm->heap
+ set $heap_start = (char *)$heap->pages
+ set $heap_end = $heap_start + ($page_size * $heap->num_pages)
+ printf "Address %p:\n", $mem
+ if $mem < $heap_start || $mem >= $heap_end
+ printf "Address does not lie within the heap (%p - %p)\n", $heap_start, $heap_end
+ else
+ set $page_num = ($mem - $heap_start) / $page_size
+ printf "\tPage number:\t%d\n", $page_num
+ set $ppw = (sizeof(_jc_word) * 8) / 2
+ set $type = ($heap->page_bits[$page_num / $ppw] >> (($page_num % $ppw) * 2)) & 0x03
+ printf "\tPage type:\t"
+ if $type == 0
+ printf "FREE\n"
+ else
+ if $type == 2
+ printf "LARGE\n"
+ else
+ if $type == 1
+ printf "SMALL\n"
+ set $i = 0
+ set $found = 0
+ while $i < $heap->num_sizes && !$found
+ set $size = &$heap->sizes[$i]
+ set $page = $size->pages
+ set $pnum = ((char *)$page - $heap_start) / $page_size
+ while $page != 0 && $pnum != $page_num
+ set $page = $page->u.next
+ set $pnum = ((char *)$page - $heap_start) / $page_size
+ end
+ if $page != 0
+ set $found = 1
+ else
+ set $i = $i + 1
+ end
+ end
+ if $found
+ printf "\tSize index:\t%d\n", $i
+ printf "\tBlock size:\t%d\n", $size->size
+ printf "\tOffset:\t\t%d\n", $size->offset
+ printf "\tBlock index:\t%d\n", ((char *)$mem - ((char *)$page + $size->offset)) / $size->size
+ printf "\tBlock offset:\t%d\n", ((char *)$mem - ((char *)$page + $size->offset)) % $size->size
+ else
+ printf "\t*** page not found in any small page list ***\n"
+ end
+ else
+ printf "FINALIZABLE\n"
+ end
+ end
+ end
+ end
+end
+
+document heap_block
+ Print info about the heap block that contains a memory address.
+ The first parameter is the memory address in the heap.
+end
+
+define show_pages
+ set $page_size = 4096
+ set $heap = &$env->vm->heap
+ set $heap_start = (char *)$heap->pages
+ set $heap_end = $heap_start + ($page_size * $heap->num_pages)
+ printf "Small heap pages:\n"
+ set $i = 0
+ while $i < $heap->num_sizes
+ printf " Block size index [%d]\n", $i
+ set $size = &$heap->sizes[$i]
+ printf " Size of each block:\t\t%d bytes\n", $size->size
+ printf " Number of blocks:\t\t%d\n", $size->num_blocks
+ printf " Offset to first block:\t%d bytes\n", $size->offset
+ printf " Length of live_bits[]:\t%d words\n", $size->num_bit_words
+ printf " Pages:\n"
+ set $page = $size->pages
+ while $page != 0
+ set $pnum = ((char *)$page - $heap_start) / $page_size
+ printf " %4d %p\t", $pnum, $page
+ set $j = 0
+ while $j < $size->num_bit_words
+ printf " %08x", ((_jc_small_page *)$page)->live_bits[$j]
+ set $j = $j + 1
+ if $j % 6 == 0 && $j < $size->num_bit_words
+ printf "\n\t\t\t"
+ end
+ end
+ printf "\n"
+ set $page = $page->u.next
+ end
+ set $i = $i + 1
+ end
+end
+
+document show_pages
+ Show heap pages.
+end
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.conf
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.conf?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.conf (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.conf Tue Oct 4 19:19:16 2005
@@ -0,0 +1,23 @@
+# $Id: jc.conf,v 1.1 2005/01/09 02:06:55 archiecobbs Exp $
+
+#
+# This is the system-wide ".jc" file. Define here any desired
+# default command line flags. This file is processed before
+# the per-user ~/.jc file, so settings in the latter file can
+# override settings in this file; command line flags can override
+# both this file and ~/.jc.
+#
+
+#
+# Some examples (documented in the online manual):
+#
+# classpath=.:/foo/bar:/jan/foo.zip
+# property=jc.heap.size=67108864
+# property=jc.code.generation.enabled=false
+# property=jc.bootstrap.generate.only=true
+# property=jc.include.line.numbers=false
+# property=jc.resolve.native.directly=true
+# property=jc.gen.inline.verbose=true
+# verbose=gen,gc
+#
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.xpm
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.xpm?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.xpm (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jc.xpm Tue Oct 4 19:19:16 2005
@@ -0,0 +1,385 @@
+/* XPM */
+/* $Id: jc.xpm,v 1.1 2005/01/07 19:13:23 archiecobbs Exp $ */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"60 60 317 2",
+/* colors */
+" c #000000",
+" . c #E3E3EC",
+" X c #F3F3FF",
+" o c #E1E1EA",
+" O c #F1F1FD",
+" + c #DFDFE8",
+" @ c #ADADAD",
+" # c #EFEFFB",
+" $ c #DDDDE6",
+" % c #EDEDF9",
+" & c #DBDBE4",
+" * c #E7E7F3",
+" = c #FAFAFF",
+" - c #E5E5F1",
+" ; c #E8E8EA",
+" : c #F8F8FD",
+" > c #E3E3EF",
+" , c #9F9F9F",
+" < c #E1E1ED",
+" 1 c #F4F4F9",
+" 2 c #9D9D9D",
+" 3 c #E2E2E4",
+" 4 c #EFEFFE",
+" 5 c #EDEDFC",
+" 6 c #EBEBFA",
+" 7 c #EEEEF3",
+" 8 c #E9E9F8",
+" 9 c #F6F6FE",
+" 0 c #8D8D8D",
+" q c #F4F4FC",
+" w c #D2D2D4",
+" e c #F2F2FA",
+" r c #D0D0D2",
+" t c #CECED0",
+" y c #EEEEF6",
+" u c #858585",
+" i c #D8D8DD",
+" p c #818181",
+" a c #E8E8F0",
+" s c #D6D6DB",
+" d c #7F7F7F",
+" f c #E6E6EE",
+" g c #D4D4D9",
+" h c #E4E4EC",
+" j c #F4F4FF",
+" k c #D2D2D7",
+" l c #F2F2FD",
+" z c #E0E0E8",
+" x c #F0F0FB",
+" c c #EEEEF9",
+" v c #DCDCE4",
+" b c #ECECF7",
+" n c #DADAE2",
+" m c #EAEAF5",
+" M c #D8D8E0",
+" N c #E8E8F3",
+" B c #FBFBFF",
+" V c #E6E6F1",
+" C c #6D6D6D",
+" Z c #F9F9FD",
+" A c #E4E4EF",
+" S c #6B6B6B",
+" D c #F7F7FB",
+" F c #E2E2ED",
+" G c #696969",
+" H c #E0E0EB",
+" J c #F0F0FE",
+" K c #DEDEE9",
+" L c #EEEEFC",
+" P c #F1F1F5",
+" I c #ECECFA",
+" U c #EAEAF8",
+" Y c #E8E8F6",
+" T c #E6E6F4",
+" R c #E4E4F2",
+" E c #F7F7FE",
+" W c #F5F5FC",
+" Q c #D1D1D2",
+" ! c #F1F1F8",
+" ~ c #CFCFD0",
+" ^ c #EFEFF6",
+" / c #CDCDCE",
+" ( c #515151",
+" ) c #E7E7EE",
+" _ c #494949",
+" ` c #D5D5D9",
+" ' c #F5F5FF",
+" ] c #D3D3D7",
+" [ c #F3F3FD",
+" { c #D1D1D5",
+" } c #F1F1FB",
+" | c #EFEFF9",
+". c #F2F2F2",
+".. c #DDDDE4",
+".X c #EDEDF7",
+".o c #F0F0F0",
+".O c #DBDBE2",
+".+ c #EBEBF5",
+".@ c #3D3D3D",
+".# c #EEEEEE",
+".$ c #D9D9E0",
+".% c #E9E9F3",
+".& c #FCFCFF",
+".* c #D7D7DE",
+".= c #E7E7F1",
+".- c #393939",
+".; c #FAFAFD",
+".: c #E5E5EF",
+".> c #373737",
+"., c #E3E3ED",
+".< c #E6E6E6",
+".1 c #E1E1EB",
+".2 c #E4E4E4",
+".3 c #F1F1FE",
+".4 c #DFDFE9",
+".5 c #EFEFFC",
+".6 c #DDDDE7",
+".7 c #EDEDFA",
+".8 c #DBDBE5",
+".9 c #EBEBF8",
+".0 c #2B2B2B",
+".q c #E9E9F6",
+".w c #E7E7F4",
+".e c #EAEAED",
+".r c #D8D8D8",
+".t c #E5E5F2",
+".y c #F8F8FE",
+".u c #D6D6D6",
+".i c #E3E3F0",
+".p c #F6F6FC",
+".a c #D2D2D2",
+".s c #F2F2F8",
+".d c #1F1F1F",
+".f c #CECECE",
+".g c #EBEBFB",
+".h c #CCCCCC",
+".j c #E9E9F9",
+".k c #ECECF2",
+".l c #CACACA",
+".z c #C6C6C6",
+".x c #F6F6FF",
+".c c #D4D4D7",
+".v c #F4F4FD",
+".b c #D2D2D5",
+".n c #F2F2FB",
+".m c #D0D0D3",
+".M c #F0F0F9",
+".N c #CECED1",
+".B c #EEEEF7",
+".V c #090909",
+".C c #ECECF5",
+".Z c #DADAE0",
+".A c #070707",
+".S c #EAEAF3",
+".D c #FDFDFF",
+".F c #D8D8DE",
+".G c #050505",
+".H c #E8E8F1",
+".J c #FBFBFD",
+".K c #D6D6DC",
+".L c #010101",
+".P c #E4E4ED",
+".I c #B2B2B2",
+".U c #E2E2EB",
+".Y c #F2F2FE",
+".T c #E0E0E9",
+".R c #F0F0FC",
+".E c #DEDEE7",
+".W c #EEEEFA",
+".Q c #DCDCE5",
+".! c #ECECF8",
+".~ c #DADAE3",
+".^ c #A8A8A8",
+"./ c #EAEAF6",
+".( c #E8E8F4",
+".) c #6F6F70",
+"._ c #A4A4A4",
+".` c #E6E6F2",
+".' c #E9E9EB",
+".] c #F9F9FE",
+".[ c #E4E4F0",
+".{ c #F7F7FC",
+".} c #E2E2EE",
+".| c #F5F5FA",
+"X c #F3F3F8",
+"X. c #9C9C9C",
+"XX c #EEEEFD",
+"Xo c #EAEAF9",
+"XO c #E8E8F7",
+"X+ c #F7F7FF",
+"X@ c #F5F5FD",
+"X# c #D3D3D5",
+"X$ c #8C8C8C",
+"X% c #F3F3FB",
+"X& c #D1D1D3",
+"X* c #CFCFD1",
+"X= c #CDCDCF",
+"X- c #EBEBF3",
+"X; c #FEFEFF",
+"X: c #E9E9F1",
+"X> c #D7D7DC",
+"X, c #D5D5DA",
+"X< c #D3D3D8",
+"X1 c #E3E3EB",
+"X2 c #F1F1FC",
+"X3 c #DFDFE7",
+"X4 c #EFEFFA",
+"X5 c #767676",
+"X6 c #DDDDE5",
+"X7 c #EDEDF8",
+"X8 c #DBDBE3",
+"X9 c #EBEBF6",
+"X0 c #D9D9E1",
+"Xq c #E9E9F4",
+"Xw c #3B3B3C",
+"Xe c #D7D7DF",
+"Xr c #E7E7F2",
+"Xt c #FAFAFE",
+"Xy c #E5E5F0",
+"Xu c #F8F8FC",
+"Xi c #E3E3EE",
+"Xp c #E1E1EC",
+"Xa c #686868",
+"Xs c #DFDFEA",
+"Xd c #EFEFFD",
+"Xf c #666666",
+"Xg c #F2F2F6",
+"Xh c #EDEDFB",
+"Xj c #2D2D2E",
+"Xk c #EBEBF9",
+"Xl c #EEEEF2",
+"Xz c #E9E9F7",
+"Xx c #E7E7F5",
+"Xc c #E5E5F3",
+"Xv c #F8F8FF",
+"Xb c #F6F6FD",
+"Xn c #585858",
+"Xm c #F4F4FB",
+"XM c #565656",
+"XN c #F2F2F9",
+"XB c #D0D0D1",
+"XV c #CECECF",
+"XC c #CCCCCD",
+"XZ c #505050",
+"XA c #ECECF3",
+"XS c #FFFFFF",
+"XD c #FDFDFD",
+"XF c #FBFBFB",
+"XG c #D6D6DA",
+"XH c #D4D4D8",
+"XJ c #F4F4FE",
+"XK c #D2D2D6",
+"XL c #F2F2FC",
+"XP c #444444",
+"XI c #E0E0E7",
+"XU c #F0F0FA",
+"XY c #DEDEE5",
+"XT c #EEEEF8",
+"XR c #DCDCE3",
+"XE c #ECECF6",
+"XW c #DADAE1",
+"XQ c #EDEDED",
+"X! c #D8D8DF",
+"X~ c #3A3A3A",
+"X^ c #FBFBFE",
+"X/ c #D6D6DD",
+"X( c #E6E6F0",
+"X) c #B4B4B5",
+"X_ c #E9E9E9",
+"X` c #F7F7FA",
+"X' c #E2E2EC",
+"X] c #E5E5E5",
+"X[ c #F2F2FF",
+"X{ c #E0E0EA",
+"X} c #F0F0FD",
+"X| c #DEDEE8",
+"o c #EEEEFB",
+"o. c #DCDCE6",
+"oX c #DFDFDF",
+"oo c #ECECF9",
+"oO c #E8E8F5",
+"o+ c #D9D9D9",
+"o@ c #E6E6F3",
+"o# c #F9F9FF",
+"o$ c #262626",
+"o% c #E4E4F1",
+"o& c #F7F7FD",
+"o* c #F5F5FB",
+"o= c #F3F3F9",
+"o- c #D1D1D1",
+"o; c #F1F1F7",
+"o: c #EFEFF5",
+"o> c #CDCDCD",
+"o, c #EAEAFA",
+"o< c #E8E8F8",
+"o1 c #161616",
+"o2 c #C7C7C7",
+"o3 c #C5C5C5",
+"o4 c #D5D5D8",
+"o5 c #F5F5FE",
+"o6 c #D3D3D6",
+"o7 c #101010",
+"o8 c #F3F3FC",
+"o9 c #D1D1D4",
+"o0 c #F1F1FA",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/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jcvm.spec.in?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jcvm.spec.in (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/jcvm.spec.in Tue Oct 4 19:19:16 2005
@@ -0,0 +1,63 @@
+# $Id: jcvm.spec.in,v 1.5 2005/03/21 14:10:50 archiecobbs Exp $
+
+%define version_num @VERSION@
+%define release_num 1
+%define classpath_ver @CLASSPATH_VERSION@
+%define classpath_home %{_prefix}
+
+Summary: The JC Virtual Machine
+Name: jcvm
+Version: %{version_num}
+Release: %{release_num}
+Group: Development/Tools
+Copyright: LGPL
+URL: http://jcvm.sourceforge.net/
+BuildRoot: %{_tmppath}/%{name}-root
+Icon: jc.xpm
+Packager: Archie Cobbs <ar...@dellroad.org>
+Source: http://internap.dl.sourceforge.net/sourceforge/jcvm/jc-%{version_num}.tar.gz
+ExclusiveArch: i386 i486 i586 i686
+Requires: classpath >= %{classpath_ver}
+
+%description
+JC is a Java virtual machine implementation that converts class files
+into C source files using the Soot Java bytecode analysis framework,
+compiles them with GCC, and loads them using a built-in ELF object file
+loader. JC utilizes the GNU Classpath class library and provides a fairly
+complete Java runtime including sophisticated optimizations to increase
+runtime performance. JC also includes a bytecode interpreter, and supports
+execution in either or mixed modes.
+
+%prep
+%setup -n jc-%{version}
+
+%build
+%configure --with-classpath=%{classpath_home}
+make
+
+%install
+%{makeinstall}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf ${RPM_BUILD_ROOT}
+
+%files
+%defattr(-,root,root)
+%doc AUTHORS CHANGES LGPL-2.1 LICENSE README
+%{_bindir}/cfdump
+%{_bindir}/jc
+%{_bindir}/jcgen
+%{_bindir}/jcjavah
+%{_datadir}/jc
+%docdir %{_datadir}/jc/doc
+%{_includedir}/jc
+%{_libdir}/jc
+%{_libdir}/libjc.*
+%config %{_sysconfdir}/jc.conf
+%doc %{_mandir}/man1/jc.1.gz
+%doc %{_infodir}/jc.info*
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/makedist.sh
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/makedist.sh?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/makedist.sh (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/makedist.sh Tue Oct 4 19:19:16 2005
@@ -0,0 +1,31 @@
+#!/bin/sh
+# $Id: makedist.sh,v 1.11 2005/03/19 19:55:02 archiecobbs Exp $
+
+PREFIX=/usr/local
+
+if [ ! -f etc/makedist.sh ]; then
+ echo '***' run me from the top level directory please
+ exit 1
+fi
+
+if [ `id -u` -ne 0 ]; then
+ echo '***' you must be root
+ exit 1
+fi
+
+if [ ! -w ${PREFIX}/share/classpath/glibj.zip ]; then
+ echo '***' you must build and install classpath first
+ exit 1
+fi
+
+rm -f java/jc.zip java/api.tgz
+
+sh etc/regen.sh
+(cd tools && make && make install) || exit 1
+(cd java && make && make install) || exit 1
+(cd soot && make && make install) || exit 1
+(cd include && make && make install) || exit 1
+(cd libjc/native && make hfiles) || exit 1
+(cd jsrc && make jsrc.tgz) || exit 1
+make dist
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/regen.sh
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/regen.sh?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/regen.sh (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/etc/regen.sh Tue Oct 4 19:19:16 2005
@@ -0,0 +1,65 @@
+#!/bin/sh
+# $Id: regen.sh,v 1.7 2005/03/26 03:25:44 archiecobbs Exp $
+
+#
+# Script to regenerate all the GNU auto* gunk.
+# Run this from the top directory of the source tree.
+#
+# This is customized for my FreeBSD machine. It probably
+# won't work right on your machine, please edit to suit.
+#
+# If it looks like I don't know what I'm doing here, you're right.
+#
+
+if [ ! -f libjc/Makefile.am ]; then
+ echo '***' run me from the top level directory please
+ exit 1
+fi
+
+echo "cleaning up"
+find . -name 'Makefile.in' -print | xargs rm -f
+rm -rf autom4te*.cache scripts aclocal.m4 configure
+rm -f include/config.h.in include/config.h
+rm -f install-sh missing
+mkdir scripts
+
+LIBTOOLIZE="libtoolize"
+ACLOCAL="aclocal"
+AUTOHEADER="autoheader"
+AUTOMAKE="automake"
+AUTOCONF="autoconf"
+
+if [ `uname -s` = 'FreeBSD' ]; then
+# LIBTOOLIZE="libtoolize15"
+# ACLOCAL="aclocal18"
+ ACLOCAL_ARGS="-I /usr/local/share/libtool15/libltdl/ -I /usr/local/share/automake18"
+# AUTOHEADER="autoheader259"
+# AUTOMAKE="automake18"
+# AUTOCONF="autoconf259"
+fi
+
+echo "running libtoolize"
+${LIBTOOLIZE} -c -f
+
+echo "running aclocal"
+${ACLOCAL} ${ACLOCAL_ARGS} -I scripts
+
+echo "running autoheader"
+${AUTOHEADER} -I include -I libjc/arch -I libjc/native
+
+echo "running automake"
+${AUTOMAKE} --add-missing -c --foreign
+
+echo "running autoconf"
+${AUTOCONF} -f -i
+cp scripts/install-sh install-sh
+cp scripts/missing missing
+
+echo "running configure"
+if [ `uname -s` = 'FreeBSD' ]; then
+ export LDFLAGS=-L/usr/local/lib ;
+ export CPPFLAGS=-I/usr/local/include;
+fi
+
+./configure --enable-werror --enable-assertions
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/Makefile.am
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/Makefile.am?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/Makefile.am (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/Makefile.am Tue Oct 4 19:19:16 2005
@@ -0,0 +1,14 @@
+## $Id: Makefile.am,v 1.6 2005/04/02 03:34:07 archiecobbs Exp $
+
+noinst_HEADERS= config.h.in jc_machdep.h.in queue.h
+
+jc_includedir= $(includedir)/jc
+
+jc_include_HEADERS= jc_defs.h \
+ jc_arraydefs.h \
+ jc_invoke.h \
+ jni.h \
+ jni_machdep.h
+
+nodist_jc_include_HEADERS= jc_machdep.h
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_arraydefs.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_arraydefs.h?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_arraydefs.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_arraydefs.h Tue Oct 4 19:19:16 2005
@@ -0,0 +1,87 @@
+
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: jc_arraydefs.h,v 1.1.1.1 2004/02/20 05:15:10 archiecobbs Exp $
+ */
+
+#ifndef _JC_ARRAYDEFS_H_
+#define _JC_ARRAYDEFS_H_
+
+/*
+ * The purpose of this file is to define a macro that declares external
+ * '_jc_type' structures corresponding to all of the array types (up
+ * to 255 dimensions) for a given base type. Although all dimensionalities
+ * are declared, only the dimensionalities actually used are created.
+ *
+ * As a special case, for 1-dimensional arrays the dimension may be
+ * omitted.
+ */
+
+// This macro declares one array type for a given base type
+#define _JC_DECL_ARRAYS_1(type, dims, suffix) \
+extern _jc_type _jc_ ## type ## $array ## dims ## $ ## suffix;
+
+// This macro declares ten array types for a given base type
+#define _JC_DECL_ARRAYS_10(type, prefix, suffix) \
+_JC_DECL_ARRAYS_1(type, prefix ## 0, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 1, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 2, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 3, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 4, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 5, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 6, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 7, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 8, suffix); \
+_JC_DECL_ARRAYS_1(type, prefix ## 9, suffix)
+
+// This macro declares all 255 array types for a given base type
+#define _JC_DECL_ARRAYS(type, suffix) \
+_JC_DECL_ARRAYS_1(type, , suffix); /* "$array" same as "$array1" */\
+_JC_DECL_ARRAYS_10(type, , suffix); \
+_JC_DECL_ARRAYS_10(type, 1, suffix); \
+_JC_DECL_ARRAYS_10(type, 2, suffix); \
+_JC_DECL_ARRAYS_10(type, 3, suffix); \
+_JC_DECL_ARRAYS_10(type, 4, suffix); \
+_JC_DECL_ARRAYS_10(type, 5, suffix); \
+_JC_DECL_ARRAYS_10(type, 6, suffix); \
+_JC_DECL_ARRAYS_10(type, 7, suffix); \
+_JC_DECL_ARRAYS_10(type, 8, suffix); \
+_JC_DECL_ARRAYS_10(type, 9, suffix); \
+_JC_DECL_ARRAYS_10(type, 10, suffix); \
+_JC_DECL_ARRAYS_10(type, 11, suffix); \
+_JC_DECL_ARRAYS_10(type, 12, suffix); \
+_JC_DECL_ARRAYS_10(type, 13, suffix); \
+_JC_DECL_ARRAYS_10(type, 14, suffix); \
+_JC_DECL_ARRAYS_10(type, 15, suffix); \
+_JC_DECL_ARRAYS_10(type, 16, suffix); \
+_JC_DECL_ARRAYS_10(type, 17, suffix); \
+_JC_DECL_ARRAYS_10(type, 18, suffix); \
+_JC_DECL_ARRAYS_10(type, 19, suffix); \
+_JC_DECL_ARRAYS_10(type, 20, suffix); \
+_JC_DECL_ARRAYS_10(type, 21, suffix); \
+_JC_DECL_ARRAYS_10(type, 22, suffix); \
+_JC_DECL_ARRAYS_10(type, 23, suffix); \
+_JC_DECL_ARRAYS_10(type, 24, suffix); \
+_JC_DECL_ARRAYS_1(type, 250, suffix); \
+_JC_DECL_ARRAYS_1(type, 251, suffix); \
+_JC_DECL_ARRAYS_1(type, 252, suffix); \
+_JC_DECL_ARRAYS_1(type, 253, suffix); \
+_JC_DECL_ARRAYS_1(type, 254, suffix); \
+_JC_DECL_ARRAYS_1(type, 255, suffix)
+
+#endif /* _JC_ARRAYDEFS_H_ */
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_defs.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_defs.h?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_defs.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_defs.h Tue Oct 4 19:19:16 2005
@@ -0,0 +1,1199 @@
+
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: jc_defs.h,v 1.39 2005/05/08 21:12:07 archiecobbs Exp $
+ */
+
+#ifndef _JC_DEFS_H_
+#define _JC_DEFS_H_
+
+#ifndef __GNUC__ /* XXX check gcc version here too */
+#error "GCC is required"
+#endif
+
+#include "jc_machdep.h"
+#include "jc_arraydefs.h"
+
+/************************************************************************
+ * Definitions *
+ ************************************************************************/
+
+/*
+ * Binary compatibility version for this header file. This should
+ * be incremented after each incompatible change to this file.
+ */
+#define _JC_LIBJC_VERSION 0x000c
+
+/* C stuff */
+#define _JC_NULL ((void *)0)
+#define _JC_OFFSETOF(s, f) ((_jc_word)&((s *)0)->f)
+
+/* Access flags */
+#define _JC_ACC_PUBLIC 0x0001
+#define _JC_ACC_PRIVATE 0x0002
+#define _JC_ACC_PROTECTED 0x0004
+#define _JC_ACC_STATIC 0x0008
+#define _JC_ACC_FINAL 0x0010
+#define _JC_ACC_SUPER 0x0020
+#define _JC_ACC_SYNCHRONIZED 0x0020
+#define _JC_ACC_VOLATILE 0x0040
+#define _JC_ACC_TRANSIENT 0x0080
+#define _JC_ACC_NATIVE 0x0100
+#define _JC_ACC_INTERFACE 0x0200
+#define _JC_ACC_ABSTRACT 0x0400
+#define _JC_ACC_STRICT 0x0800
+#define _JC_ACC_MASK 0x0fff
+
+/* Additional flags stored with access flags */
+#define _JC_ACC_JCNI 0x1000 /* JCNI native method (!JNI) */
+#define _JC_ACC_INTERP 0x2000 /* interpreted class/method */
+#define _JC_ACC_PCMAP 0x4000 /* method pc map created */
+
+/*
+ * Flags for 'flags' field of the '_jc_type' structure,
+ * and unique indicies for the various primitive Java types.
+ */
+#define _JC_TYPE_INVALID 0x0000
+#define _JC_TYPE_BOOLEAN 0x0001
+#define _JC_TYPE_BYTE 0x0002
+#define _JC_TYPE_CHAR 0x0003
+#define _JC_TYPE_SHORT 0x0004
+#define _JC_TYPE_INT 0x0005
+#define _JC_TYPE_LONG 0x0006
+#define _JC_TYPE_FLOAT 0x0007
+#define _JC_TYPE_DOUBLE 0x0008
+#define _JC_TYPE_VOID 0x0009
+#define _JC_TYPE_REFERENCE 0x000a
+#define _JC_TYPE_MAX 0x000b
+#define _JC_TYPE_MASK 0x000f
+#define _JC_TYPE_ARRAY 0x0010
+
+#define _JC_TYPE_SKIPWORD 0x0020
+#define _JC_TYPE_LOADED 0x0040
+#define _JC_TYPE_INIT_ERROR 0x0080 /* class init error */
+
+#define _JC_TYPE_VERIFIED 0x0100
+#define _JC_TYPE_PREPARED 0x0200
+#define _JC_TYPE_RESOLVED 0x0400
+#define _JC_TYPE_INITIALIZED 0x8000
+
+/* Fixed parameters for hash tables */
+#define _JC_IMETHOD_HASHSIZE 128 /* must be power of 2 */
+#define _JC_INSTANCEOF_HASHSIZE 128 /* must be power of 2 */
+
+/************************************************************************
+ * Typedefs *
+ ************************************************************************/
+
+typedef struct _jc_object _jc_object;
+
+typedef struct _jc_env _jc_env;
+typedef struct _jc_splay_node _jc_splay_node;
+typedef struct _jc_class_loader _jc_class_loader;
+typedef struct _jc_array_type _jc_array_type;
+typedef struct _jc_nonarray_type _jc_nonarray_type;
+typedef struct _jc_classfile _jc_classfile;
+typedef struct _jc_super_info _jc_super_info;
+typedef struct _jc_elf _jc_elf;
+
+typedef struct _jc_type _jc_type;
+typedef struct _jc_method _jc_method;
+typedef struct _jc_method_exec _jc_method_exec;
+typedef struct _jc_method_code _jc_method_code;
+typedef struct _jc_linenum_info _jc_linenum_info;
+typedef struct _jc_pc_map_info _jc_pc_map_info;
+typedef struct _jc_array _jc_array;
+typedef struct _jc_object_array _jc_object_array;
+typedef union _jc_value _jc_value;
+typedef struct _jc_linenum _jc_linenum;
+typedef struct _jc_catch_frame _jc_catch_frame;
+typedef struct _jc_pc_map _jc_pc_map;
+typedef struct _jc_env_head _jc_env_head;
+
+typedef struct _jc_field _jc_field;
+typedef struct _jc_trap_info _jc_trap_info;
+typedef struct _jc_class_depend _jc_class_depend;
+typedef struct _jc_inner_class _jc_inner_class;
+
+typedef struct _jc_lookup _jc_lookup;
+typedef struct _jc_iinc _jc_iinc;
+typedef struct _jc_linemap _jc_linemap;
+typedef struct _jc_lookupswitch _jc_lookupswitch;
+typedef union _jc_insn_info _jc_insn_info;
+typedef struct _jc_multianewarray _jc_multianewarray;
+typedef struct _jc_tableswitch _jc_tableswitch;
+typedef struct _jc_interp_trap _jc_interp_trap;
+
+/************************************************************************
+ * Structures *
+ ************************************************************************/
+
+/*
+ * Java value. This differs from a JNI 'jvalue' in that if the value is a
+ * Java object, then the 'l' field points directly to the object, whereas
+ * in a 'jvalue' the 'l' field is a native reference to the object.
+ */
+union _jc_value {
+ jboolean z;
+ jbyte b;
+ jchar c;
+ jshort s;
+ jint i;
+ jlong j;
+ jfloat f;
+ jdouble d;
+ _jc_object *l;
+ _jc_word _dummy; /* ensure size/alignment */
+};
+
+/*
+ * One splay search tree node.
+ */
+struct _jc_splay_node {
+ _jc_splay_node *left;
+ _jc_splay_node *right;
+ jboolean inserted;
+};
+
+/* Object head */
+struct _jc_object {
+ _jc_word lockword;
+ _jc_type *type;
+};
+
+/* Array head */
+struct _jc_array {
+ _jc_word lockword;
+ _jc_type *type;
+ const jint length;
+};
+
+/*
+ * Scalar arrays.
+ */
+#define _JC_DECLARE_SCALAR_ARRAY(type0, ctype) \
+struct _jc_ ## type0 ## _array { \
+ _jc_word lockword; \
+ _jc_type *type; \
+ const jint length; \
+ ctype elems[0]; \
+}; \
+typedef struct _jc_ ## type0 ## _array _jc_ ## type0 ## _array;
+
+_JC_DECLARE_SCALAR_ARRAY(boolean, jboolean);
+_JC_DECLARE_SCALAR_ARRAY(byte, jbyte);
+_JC_DECLARE_SCALAR_ARRAY(char, jchar);
+_JC_DECLARE_SCALAR_ARRAY(short, jshort);
+_JC_DECLARE_SCALAR_ARRAY(int, jint);
+_JC_DECLARE_SCALAR_ARRAY(long, jlong);
+_JC_DECLARE_SCALAR_ARRAY(float, jfloat);
+_JC_DECLARE_SCALAR_ARRAY(double, jdouble);
+
+/*
+ * Reference arrays.
+ *
+ * Elements are indexed backwards, i.e., 0 is elems[-1], 1 is elems[-2], etc.
+ * An easy way to convert between the two is one's complement, i.e., ~i.
+ * See also _JC_REF_ELEMENT() macro.
+ */
+struct _jc_object_array {
+ _jc_object *elems[0];
+ _jc_word lockword;
+ _jc_type *type;
+ const jint length;
+};
+
+/************************************************************************
+ * Interpreted Method Info *
+ ************************************************************************/
+
+struct _jc_iinc {
+ jint index;
+ jint value;
+};
+
+struct _jc_multianewarray {
+ _jc_type *type;
+ unsigned char dims;
+};
+
+struct _jc_lookup {
+ jint match;
+ _jc_uint16 target;
+};
+
+struct _jc_lookupswitch {
+ _jc_uint16 default_target;
+ _jc_uint16 num_pairs;
+ _jc_lookup pairs[0];
+};
+
+struct _jc_tableswitch {
+ jint low;
+ jint high;
+ _jc_uint16 default_target;
+ _jc_uint16 targets[0];
+};
+
+struct _jc_interp_trap {
+ _jc_uint16 start;
+ _jc_uint16 end;
+ _jc_uint16 target;
+ _jc_type *type;
+};
+
+struct _jc_linemap {
+ _jc_uint16 index;
+ _jc_uint16 line;
+};
+
+union _jc_insn_info {
+ _jc_method *method;
+ _jc_field *field;
+ _jc_iinc iinc;
+ _jc_multianewarray multianewarray;
+ _jc_type *type;
+ _jc_lookupswitch *lookupswitch;
+ _jc_tableswitch *tableswitch;
+ _jc_uint16 target;
+ _jc_uint16 local;
+ _jc_value constant;
+ const char *utf8;
+};
+
+/************************************************************************
+ * Methods, Fields, Types, Etc. *
+ ************************************************************************/
+
+/* Field descriptor */
+struct _jc_field {
+ const char *name;
+ const char *signature;
+ _jc_type *class;
+ _jc_type *type;
+ _jc_uint16 access_flags;
+ int offset; /* in object or class_fields */
+ void *initial_value; /* initialized static only */
+};
+
+/* Executable method info */
+struct _jc_linenum_info {
+ _jc_linenum *table;
+ _jc_uint16 len;
+};
+
+struct _jc_pc_map_info {
+ _jc_pc_map *map;
+ _jc_uint16 len;
+};
+
+struct _jc_method_exec {
+ union {
+ _jc_linenum_info linenum; /* from generated code */
+ _jc_pc_map_info pc_map; /* computed at runtime */
+ } u;
+ _jc_uint16 trap_table_len;
+ _jc_trap_info *trap_table;
+ const void *function_end;
+ _jc_splay_node node; /* in vm->method_tree */
+};
+
+/* Interpreted method info */
+struct _jc_method_code {
+ unsigned char *opcodes;
+ _jc_insn_info *info;
+ _jc_interp_trap *traps;
+ _jc_linemap *linemaps;
+ _jc_uint16 max_stack;
+ _jc_uint16 max_locals;
+ _jc_uint16 num_traps;
+ _jc_uint16 num_linemaps;
+ _jc_uint16 num_insns;
+ _jc_uint16 num_params2;
+};
+
+/* Method descriptor */
+struct _jc_method {
+ const char *name;
+ const char *signature;
+ _jc_type *class;
+ _jc_type **param_types;
+ _jc_type *return_type;
+ unsigned char *param_ptypes;
+ jlong signature_hash;
+ _jc_type **exceptions;
+ const void *function; /* code or interp trampoline */
+ _jc_word vtable_index; /* index in vtable, mtable */
+ _jc_uint16 access_flags;
+ _jc_uint16 num_parameters;
+ _jc_uint16 num_exceptions;
+ const void *native_function;
+ union {
+ _jc_method_exec exec; /* if executable */
+ _jc_method_code code; /* if interpreted */
+ } u;
+};
+
+/* Type info specific to array types */
+struct _jc_array_type {
+ jint dimensions;
+ _jc_type *base_type;
+ _jc_type *element_type;
+};
+
+/*
+ * Type info specific to non-array types
+ *
+ * The field and method lists must be sorted by name, then signature.
+ */
+struct _jc_nonarray_type {
+ jshort block_size_index; /* _JC_LIBJC_VERSION */
+ _jc_uint16 num_vmethods;
+ _jc_uint16 num_fields;
+ _jc_uint16 num_methods;
+ _jc_uint16 num_virtual_refs;
+ _jc_uint16 num_inner_classes;
+ _jc_uint32 instance_size;
+ jlong hash;
+ const char *source_file;
+ _jc_field **fields;
+ _jc_method **methods;
+ _jc_type ***instanceof_hash_table;
+ void *class_fields;
+ _jc_inner_class *inner_classes;
+ _jc_type *outer_class;
+ int num_class_depends;
+ _jc_class_depend *class_depends;
+
+ /* These fields are filled in at run-time */
+ union {
+ _jc_elf *elf; /* if executable */
+ _jc_classfile *cfile; /* if interpreted */
+ } u;
+ _jc_env *initializing_thread;
+ _jc_super_info *supers;
+ _jc_method **mtable; /* "method vtable" */
+};
+
+/* Java type info */
+struct _jc_type {
+ const char *name;
+ _jc_type *superclass;
+ _jc_uint16 access_flags;
+ _jc_uint16 flags;
+
+ /* Interfaces info */
+ _jc_uint16 num_interfaces;
+ _jc_type **interfaces;
+ _jc_method ***imethod_hash_table;
+ const void **imethod_quick_table;
+
+ /* Specific array/non-array info */
+ union {
+ _jc_nonarray_type nonarray;
+ _jc_array_type array;
+ } u;
+
+ /* These fields are filled in at run-time */
+ _jc_class_loader *loader;
+ _jc_word initial_lockword;
+ _jc_object *instance; /* java.lang.Class instance */
+ _jc_splay_node node; /* in loader->defined_types */
+
+ /* Pointers to method functions */
+ const void *vtable[0];
+};
+
+/* Class dependency info */
+struct _jc_class_depend {
+ const char *name;
+ jlong hash;
+};
+
+/* Inner class info */
+struct _jc_inner_class {
+ _jc_type *type;
+ _jc_uint16 access_flags;
+};
+
+/* Line number table entry */
+struct _jc_linenum {
+ _jc_uint32 cline; /* c line number */
+ _jc_uint16 jline; /* java line number */
+};
+
+/* Trap table entry */
+struct _jc_trap_info {
+ _jc_type *type; /* (sub)class of Throwable */
+ _jc_uint16 start; /* starting trap region */
+ _jc_uint16 end; /* ending trap region */
+};
+
+/* Exception catcher */
+struct _jc_catch_frame {
+ _jc_catch_frame *next; /* next deeper catch frame */
+ const _jc_method *method; /* method doing the catching */
+ volatile _jc_uint16 region; /* current method trap region */
+ sigjmp_buf context; /* how to catch the exception */
+};
+
+/* Thread information made visible to generated code */
+struct _jc_env_head {
+ _jc_catch_frame *catch_list; /* exception traps */
+ _jc_object *pending; /* posted exception */
+ _jc_object *caught; /* caught exception */
+};
+
+/************************************************************************
+ * Macros *
+ ************************************************************************/
+
+/*
+ * Define the start of the line number table. We force it into the .data
+ * section and build it one element at a time via _JC_LINE_NUMBER().
+ * This macro must immediately preceed the function itself. The function
+ * must not contain any static data that would go into the .data section.
+ */
+#define _JC_LINENUM_TABLE(class, method) \
+static _jc_linenum _jc_ ## class ## $linenum_table$ ## method[] \
+ __attribute__ ((section(".data"))) = { }
+
+/*
+ * Line number table entry. This allows us to map a C source line number
+ * to a Java source line number for exception traces and to determine if
+ * thrown exceptions are caught within the method's various trap ranges.
+ * In turn, ELF debug sections allow us to map PC values to C line numbers.
+ */
+#define _JC_LINE_NUMBER(_jline) \
+ do { \
+ static volatile _jc_linenum _linenum \
+ __attribute__ ((section(".data"))) = { \
+ .cline= __LINE__, \
+ .jline= _jline, \
+ }; \
+ asm volatile ("" : : ); \
+ } while (0)
+
+/*
+ * Trap table entry.
+ */
+#define _JC_TRAP(_type, _start, _end) \
+ { \
+ .type= (_type), \
+ .start= (_start), \
+ .end= (_end), \
+ }
+
+/*
+ * Set the current trap region.
+ */
+#define _JC_TRAP_REGION(catch, _region) \
+ do { \
+ asm volatile ("" : : ); \
+ (catch).region = (_region); \
+ asm volatile ("" : : ); \
+ } while (0)
+
+/*
+ * Macro to establish a return point for C functions catching exceptions.
+ * The second parameter points to a local _jc_catch_frame structure. The
+ * _JC_CANCEL_TRAPS() macro must be called before this function exits.
+ *
+ * Because the target list is 'const' it will go into the .rodata section
+ * and so won't interfere with the line number table.
+ */
+#define _JC_DEFINE_TRAPS(env, catch, method_info, targets...) \
+ do { \
+ _jc_env_head *const _eh = (_jc_env_head *)(env); \
+ static const void *const _targets[] \
+ /* __attribute__ ((section(".rodata"))) */ \
+ = { _JC_NULL, targets }; \
+ int _target_index; \
+ \
+ (catch).next = _eh->catch_list; \
+ _eh->catch_list = &(catch); \
+ (catch).method = (method_info); \
+ (catch).region = 0; \
+ if ((_target_index = sigsetjmp((catch).context, 0)) != 0) \
+ goto *_targets[_target_index]; \
+ } while (0)
+
+/*
+ * Methods that use _JC_DEFINE_TRAPS() must use this macro before
+ * returning to the caller.
+ */
+#define _JC_CANCEL_TRAPS(env, catch) \
+ do { \
+ _jc_env_head *const _eh = (_jc_env_head *)(env); \
+ \
+ _eh->catch_list = (catch).next; \
+ } while (0)
+
+/*
+ * Retrieve the last exception caught. The "last caught exception" is
+ * not traced by GC and so must be copied into a safe place immediately
+ * after the exception is caught.
+ */
+#define _JC_CAUGHT_EXCEPTION(env) \
+ ({ \
+ _jc_env_head *const _eh = (_jc_env_head *)(env); \
+ \
+ _eh->caught; \
+ })
+
+/*
+ * Explicit null pointer check. This is used in cases where we must check
+ * for a null pointer but where invoking the method won't necessarily
+ * cause a signal to be generated (the only case is invoke-nonvirtual).
+ */
+#define _JC_EXPLICIT_NULL_CHECK(env, obj) \
+ do { \
+ _jc_object *const _obj0 = (_jc_object *)(obj); \
+ \
+ *((volatile char *)_obj0); \
+ } while (0)
+
+/*
+ * Stack overflow check.
+ *
+ * This is performed at the beginning of each method. We simply try
+ * to reference a memory address further "up" the (unallocated) stack.
+ * When the stack gets almost full, this reference will hit the guard
+ * page and cause a fault which we trap with a signal handler.
+ */
+#if _JC_DOWNWARD_STACK
+#define _JC_STACK_OVERFLOW_CHECK(env) \
+ (void)(((volatile char *)&(env))[-_JC_STACK_OVERFLOW_MARGIN])
+#else
+#define _JC_STACK_OVERFLOW_CHECK(env) \
+ (void)(((volatile char *)&(env))[_JC_STACK_OVERFLOW_MARGIN])
+#endif
+
+/*
+ * Thread periodic check.
+ *
+ * When one thread needs to cause other threads to do a periodic check,
+ * we unmap a page of memory referenced by all executing threads when
+ * taking backward branches. This causes them to quickly receive a signal.
+ */
+#define _JC_PERIODIC_CHECK(env) \
+ do { \
+ extern volatile _jc_word _jc_check_address; \
+ \
+ (void)(_jc_check_address); \
+ } while (0)
+
+/*
+ * Notify of an "active use" of a class or interface, which causes
+ * the class or interface to be initialized if it hasn't been already.
+ *
+ * This is required before the first static field access, static
+ * method invocation, or instance creation of a class.
+ *
+ * Warning: this macro is included in other macros and so must use
+ * unique internal variable names.
+ */
+#define _JC_ACTIVE_USE(env, class) \
+ do { \
+ _jc_type *const _type0 = &_jc_ ## class ## $type.type; \
+ \
+ if ((_type0->flags & _JC_TYPE_INITIALIZED) == 0) \
+ _jc_cs_initialize_type((env), _type0); \
+ } while (0)
+
+/*
+ * Invoke the virtual method 'meth' of class 'class' using object 'obj'.
+ */
+#define _JC_INVOKE_VIRTUAL(env, class, meth, obj, args...) \
+ ({ \
+ _jc_ ## class ## $object *const _obj = (obj); \
+ \
+ (*_obj->vtype->vtable.class.meth)((env), _obj , ## args); \
+ })
+
+/*
+ * Invoke the non-virtual method 'meth' of class 'class' using object 'obj'.
+ * If 'nullchk' is non-zero, an explicit null pointer check will be done.
+ */
+#define _JC_INVOKE_NONVIRTUAL(env, class, meth, nullchk, obj, args...) \
+ ({ \
+ _jc_env *const _env = (env); \
+ _jc_ ## class ## $object *const _obj \
+ = (struct _jc_ ## class ## $object *)(obj); \
+ \
+ if (nullchk) \
+ _JC_EXPLICIT_NULL_CHECK(_env, _obj); \
+ _jc_ ## class ## $method$ ## meth(_env, _obj , ## args); \
+ })
+
+/*
+ * Invoke a static method 'meth' of class 'class'. If 'omitchk' is
+ * non-zero then no class initialization is performed.
+ */
+#define _JC_INVOKE_STATIC(env, class, meth, omitchk, args...) \
+ ({ \
+ _jc_env *const _env = (env); \
+ \
+ if (!(omitchk)) \
+ _JC_ACTIVE_USE(_env, class); \
+ _jc_ ## class ## $method$ ## meth(_env , ## args); \
+ })
+
+/*
+ * Invoke an interface method with parameter types 'pdecl', returning
+ * 'rtype', and having method signature hash 'sighash', on object 'obj'.
+ *
+ * First we try the "quick" lookup table, and if that fails, fall back
+ * to searching the interface method hash table.
+ */
+#define _JC_INVOKE_INTERFACE(env, obj, hash, rtype, pdecl, args...) \
+ ({ \
+ _jc_env *const _env = (env); \
+ const jlong _hash = (hash); \
+ _jc_object *const _obj = (_jc_object *)(obj); \
+ _jc_type *const _type = _obj->type; \
+ const jint _bucket = (jint)(_hash) & (_JC_IMETHOD_HASHSIZE - 1);\
+ rtype (*_func) pdecl _JC_JCNI_ATTR; \
+ \
+ if ((_func = _type->imethod_quick_table[_bucket]) == _JC_NULL) \
+ _func = _jc_cs_lookup_interface(_env, _obj, _hash); \
+ (*_func)(_env, _obj , ## args); \
+ })
+
+/*
+ * Access a static field 'field' of class 'class'. If 'omitchk' is
+ * non-zero then no class initialization is performed.
+ */
+#define _JC_STATIC_FIELD(env, class, field, omitchk) \
+ (*({ \
+ if (!(omitchk)) \
+ _JC_ACTIVE_USE((env), class); \
+ &_jc_ ## class ## $class_fields.field; \
+ }))
+
+/*
+ * Access a reference instance field 'field' of class 'class' from
+ * object 'obj'.
+ */
+#define _JC_REF_FIELD(env, obj, class, field) \
+ (*({ \
+ _jc_ ## class ## $object *const _obj \
+ = (struct _jc_ ## class ## $object *)(obj); \
+ \
+ &_obj->refs[-1].class.field; \
+ }))
+
+/*
+ * Access a non-reference instance field 'field' of class 'class' from
+ * object 'obj'.
+ */
+#define _JC_PRIM_FIELD(env, obj, class, field) \
+ (*({ \
+ _jc_ ## class ## $object *const _obj \
+ = (struct _jc_ ## class ## $object *)(obj); \
+ \
+ &_obj->nonrefs.class.field; \
+ }))
+
+/*
+ * Return an intern'd String created from the supplied UTF-8 C string.
+ * This macro is used for embedding String constants in the code.
+ *
+ * Note the static variable which constitutes an implicit object
+ * reference within the code that must be accounted for during GC.
+ *
+ * We must put this reference in the .rodata section so it won't
+ * interfere with the line number table. Since we don't actually load
+ * the .rodata with read-only protection, this won't cause problems.
+ */
+#define _JC_STRING(env, utf8) \
+ ({ \
+ static _jc_object *_obj __attribute__ ((section(".rodata"))); \
+ \
+ if (_obj == _JC_NULL) \
+ _obj = _jc_cs_intern_string_utf8((env), &_obj, (utf8)); \
+ (struct _jc_java_lang_String$object *)_obj; \
+ })
+
+/*
+ * Compare two long values.
+ */
+#define _JC_LCMP(x, y) \
+ ({ \
+ const jlong _x = (x); \
+ const jlong _y = (y); \
+ \
+ (_x > _y) - (_x < _y); \
+ })
+
+/*
+ * Compare two floating point values, with result 'greater than' if
+ * either value is NaN.
+ */
+#define _JC_FCMPG(x, y) \
+ ({ \
+ const jfloat _x = (x); \
+ const jfloat _y = (y); \
+ \
+ (_x != _x || _y != _y) ? 1 : (_x > _y) - (_x < _y); \
+ })
+#define _JC_DCMPG(x, y) \
+ ({ \
+ const jdouble _x = (x); \
+ const jdouble _y = (y); \
+ \
+ (_x != _x || _y != _y) ? 1 : (_x > _y) - (_x < _y); \
+ })
+
+/*
+ * Compare two floating point values, with result 'less than' if
+ * either value is NaN.
+ */
+#define _JC_FCMPL(x, y) \
+ ({ \
+ const jfloat _x = (x); \
+ const jfloat _y = (y); \
+ \
+ (_x != _x || _y != _y) ? -1 : (_x > _y) - (_x < _y); \
+ })
+#define _JC_DCMPL(x, y) \
+ ({ \
+ const jdouble _x = (x); \
+ const jdouble _y = (y); \
+ \
+ (_x != _x || _y != _y) ? -1 : (_x > _y) - (_x < _y); \
+ })
+
+/*
+ * Zero-filled arithmetic right shift for 'int' and 'long'.
+ */
+#define _JC_IUSHR(x, y) \
+ ({ \
+ const jint _x = (x); \
+ const jint _y = (y) & 0x1f; \
+ \
+ (jint)(((_jc_uint32)_x) >> _y); \
+ })
+#define _JC_LUSHR(x, y) \
+ ({ \
+ const jlong _x = (x); \
+ const jlong _y = (y) & 0x3f; \
+ \
+ (jlong)(((_jc_uint64)_x) >> _y); \
+ })
+
+/*
+ * Signed-extended arithmetic right shift for 'int' and 'long'.
+ */
+#if _JC_SIGNED_RIGHT_SHIFT
+#define _JC_ISHR(x, y) \
+ ({ \
+ const jint _x = (x); \
+ const jint _y = (y) & 0x1f; \
+ \
+ _x >> _y; \
+ })
+#define _JC_LSHR(x, y) \
+ ({ \
+ const jlong _x = (x); \
+ const jlong _y = (y) & 0x3f; \
+ \
+ _x >> _y; \
+ })
+#else /* !_JC_SIGNED_RIGHT_SHIFT */
+#define _JC_ISHR(x, y) \
+ ({ \
+ const jint _x = (x); \
+ const jint _y = (y) & 0x1f; \
+ jint _result; \
+ \
+ _result = _x >> _y; \
+ if (_x < 0) \
+ _result |= ~0 << (32 - _y); \
+ _result; \
+ })
+#define _JC_LSHR(x, y) \
+ ({ \
+ const jlong _x = (x); \
+ const jlong _y = (y) & 0x3f; \
+ jlong _result; \
+ \
+ _result = _x >> _y; \
+ if (_x < 0) \
+ _result |= ~0 << (64 - _y); \
+ _result; \
+ })
+#endif /* !_JC_SIGNED_RIGHT_SHIFT */
+
+/*
+ * Conversion from floating point -> integral types.
+ */
+#define _JC_CAST_FLT2INT(env, vtype, ctype, value) \
+ ({ \
+ const vtype _val = (value); \
+ const ctype _min = (ctype)(_JC_JLONG(1) \
+ << (sizeof(ctype) * 8 - 1)); \
+ const ctype _max = ~_min; \
+ \
+ _val >= _max ? _max : \
+ _val <= _min ? _min : \
+ _val != _val ? 0 : \
+ (ctype)_val; \
+ })
+
+/*
+ * Access an element in an array of type 'type', where 'type' is one of
+ * 'boolean', 'byte', 'char', 'short', 'int', 'long', 'float', or 'double'.
+ */
+#define _JC_PRIM_ELEMENT(env, type, array, index, chklo, chkhi) \
+ (*({ \
+ _jc_env *const _env = (env); \
+ _jc_ ## type ## _array *const _obj \
+ = (struct _jc_ ## type ## _array *)(array); \
+ const jint _index = (index); \
+ \
+ if ((chklo) && _index < 0) \
+ _jc_cs_throw_array_index_exception(_env, _index); \
+ if ((chkhi) && _index >= _obj->length) \
+ _jc_cs_throw_array_index_exception(_env, _index); \
+ &_obj->elems[index]; \
+ }))
+
+/*
+ * Access an element in an array of objects. Note that the array grows
+ * backwards in memory from the base of the object.
+ */
+#define _JC_REF_ELEMENT(env, array, index, chklo, chkhi) \
+ (*({ \
+ _jc_env *const _env = (env); \
+ _jc_object_array *const _obj \
+ = (struct _jc_object_array *)(array); \
+ const jint _index = (index); \
+ \
+ if ((chklo) && _index < 0) \
+ _jc_cs_throw_array_index_exception(_env, _index); \
+ if ((chkhi) && _index >= _obj->length) \
+ _jc_cs_throw_array_index_exception(_env, _index); \
+ &_obj->elems[~(index)]; \
+ }))
+
+/*
+ * Check type compatibility before storing to a reference array.
+ * This will also cause a NullPointerException if 'array' is null.
+ */
+#define _JC_ARRAYSTORE_CHECK(env, ary, obj) \
+ do { \
+ _jc_env *const _env = (env); \
+ _jc_type *const _etype = (ary)->type->u.array.element_type; \
+ _jc_object *const _obj = (obj); \
+ \
+ if (_obj != _JC_NULL && !_jc_cs_instanceof(_env, _obj, _etype)) \
+ _jc_cs_throw_array_store_exception(_env, _obj, _etype); \
+ } while (0)
+
+/*
+ * Get the length of an array. This is a read-only value.
+ */
+#define _JC_ARRAY_LENGTH(env, array) \
+ ({ \
+ _jc_array *const _obj = (_jc_array *)(array); \
+ \
+ _obj->length; \
+ })
+
+/*
+ * Create a new object of type 'class'.
+ */
+#define _JC_NEW(env, class) \
+ ({ \
+ _jc_cs_new_object(env, &_jc_ ## class ## $type.type); \
+ })
+
+/*
+ * Same as _JC_NEW() but for stack-allocated objects.
+ */
+#define _JC_STACK_NEW(env, mem, class) \
+ ({ \
+ _jc_cs_init_object(env, mem, &_jc_ ## class ## $type.type); \
+ })
+
+/*
+ * Create a new N-dimensional array of 'type', where 'type' is one of
+ * 'boolean', 'byte', 'char', 'short', 'int', 'long', 'float', or 'double',
+ * and having length 'size', where N is 'dims'.
+ *
+ * Only the first array dimension is instantiated.
+ *
+ * Note: 'dims' must be a plain decimal integer constant with no
+ * leading zeroes.
+ */
+#define _JC_NEW_PRIM_ARRAY(env, type, dims, size) \
+ ((_jc_ ## type ## _array *)_jc_cs_new_array(env, \
+ &_jc_ ## type ## $array ## dims ## $prim$type, size))
+
+/*
+ * Same as _JC_NEW_PRIM_ARRAY() but for stack-allocated arrays.
+ */
+#define _JC_STACK_NEW_PRIM_ARRAY(env, mem, type, dims, size) \
+ ({ \
+ const jint _size = (size); \
+ \
+ (_jc_ ## type ## _array *)_jc_cs_init_array(env, \
+ mem, &_jc_ ## type ## $array ## dims ## $prim$type, _size); \
+ })
+
+/*
+ * Create a new N-dimensional array of objects of class 'class'
+ * having length 'size', where N is 'dims'.
+ *
+ * Only the first array dimension is instantiated.
+ *
+ * Note: 'dims' must be a plain decimal integer constant with no
+ * leading zeroes.
+ */
+#define _JC_NEW_REF_ARRAY(env, class, dims, size) \
+ ((_jc_object_array *)_jc_cs_new_array(env, \
+ &_jc_ ## class ## $array ## dims ## $type, size))
+
+/*
+ * Same as _JC_NEW_REF_ARRAY() but for stack-allocated arrays.
+ */
+#define _JC_STACK_NEW_REF_ARRAY(env, mem, class, dims, size) \
+ ({ \
+ const jint _size = (size); \
+ \
+ (_jc_object_array *)_jc_cs_init_array(env, \
+ mem, &_jc_ ## class ## $array ## dims ## $type, _size); \
+ })
+
+/*
+ * Create a new multi-dimensional array of 'base_class' objects having
+ * dimensions 'dims'. There must be 'dims' subsequent parameters to the
+ * macro giving the sub-array sizes (or -1 for no subarray creation).
+ * If -1 appears, all following sizes must also be -1.
+ *
+ * Note: 'dims' must be a plain decimal integer constant with no
+ * leading zeroes.
+ */
+#define _JC_NEW_REF_MULTIARRAY(env, base_class, dims, nsizes, sizes...) \
+ ({ \
+ const jint _sizes[] = { sizes }; \
+ \
+ _jc_cs_new_multiarray((env), \
+ &_jc_ ## base_class ## $array ## dims ## $type, \
+ (nsizes), _sizes); \
+ })
+
+/*
+ * Same as _JC_NEW_REF_MULTIARRAY() but for stack-allocated arrays.
+ */
+#define _JC_STACK_NEW_REF_MULTIARRAY(env, mem, base_class, dims, nsizes, sizes...)\
+ ({ \
+ const jint _sizes[] = { sizes }; \
+ \
+ _jc_cs_init_multiarray((env), \
+ mem, &_jc_ ## base_class ## $array ## dims ## $type, \
+ (nsizes), _sizes); \
+ })
+
+/*
+ * Create a new multi-dimensional array of 'type' having dimensions 'dims'
+ * and lengths 'sizes', where 'type' is one of 'boolean', 'byte', 'char',
+ * 'short', 'int', 'long', 'float', or 'double'.
+ *
+ * Note: 'dims' must be a plain decimal integer constant.
+ */
+#define _JC_NEW_PRIM_MULTIARRAY(env, type, dims, nsizes, sizes...) \
+ ({ \
+ int _sizes[] = { sizes }; \
+ \
+ _jc_cs_new_multiarray((env), \
+ &_jc_ ## type ## $array ## dims ## $prim$type, \
+ (nsizes), _sizes); \
+ })
+
+/*
+ * Same as _JC_NEW_PRIM_MULTIARRAY() but for stack-allocated arrays.
+ */
+#define _JC_STACK_NEW_PRIM_MULTIARRAY(env, mem, type, dims, nsizes, sizes...)\
+ ({ \
+ int _sizes[] = { sizes }; \
+ \
+ _jc_cs_init_multiarray((env), \
+ mem, &_jc_ ## type ## $array ## dims ## $prim$type, \
+ (nsizes), _sizes); \
+ })
+
+/*
+ * Determine if the object 'obj' is an instance of 'type'.
+ */
+#define _JC_INSTANCEOF(env, obj, type) \
+ _jc_cs_instanceof((env), (_jc_object *)(obj), (type))
+
+/*
+ * Determine if the object 'obj' is an instance of 'type'
+ * when 'type' is known to be a final class.
+ */
+#define _JC_INSTANCEOF_FINAL(env, obj, typ) \
+ ({ \
+ _jc_object *const _obj = (obj); \
+ _jc_type *const _type = (typ); \
+ \
+ _obj != _JC_NULL && _obj->type == _type; \
+ })
+
+/*
+ * Cast 'obj' to type 'type', which must not be primitive.
+ */
+#define _JC_CAST(env, type, obj) \
+ ({ \
+ _jc_env *const _env = (env); \
+ _jc_object *const _obj = (obj); \
+ _jc_type *const _type = (type); \
+ \
+ if (_obj != _JC_NULL && !_jc_cs_instanceof(_env, _obj, _type)) \
+ _jc_cs_throw_class_cast_exception(_env, _obj, _type); \
+ _obj; \
+ })
+
+/*
+ * Optimization of _JC_CAST() where 'type' is a type with no sub-types.
+ */
+#define _JC_CAST_FINAL(env, typ, obj) \
+ ({ \
+ _jc_env *const _env = (env); \
+ _jc_object *const _obj = (obj); \
+ _jc_type *const _type = (typ); \
+ \
+ if (_obj != _JC_NULL && _obj->type != _type) \
+ _jc_cs_throw_class_cast_exception(_env, _obj, _type); \
+ _obj; \
+ })
+
+/*
+ * Resolve and invoke a native method.
+ *
+ * 'jvalp' points to a _jc_value into which the return value is copied.
+ * This should only be used within the generated native method function.
+ * 'params' should include the instance object iff method is not static.
+ */
+#define _JC_INVOKE_NATIVE_METHOD(env, minfo, jvalp, params...) \
+ _jc_cs_invoke_native_method((env), (minfo), (jvalp) , ## params)
+
+/*
+ * This macro "implements" abstract methods.
+ * It causes an AbstractMethodError to be thrown.
+ */
+#define _JC_ABSTRACT_METHOD(env, minfo) \
+ _jc_cs_throw_abstract_method_error((env), (minfo))
+
+/*
+ * Enter/exit object monitor.
+ */
+#define _JC_MONITOR_ENTER(env, obj) \
+ _jc_cs_monitorenter((env), (_jc_object *)(obj))
+#define _JC_MONITOR_EXIT(env, obj) \
+ _jc_cs_monitorexit((env), (_jc_object *)(obj))
+
+/*
+ * Throw an exception.
+ */
+#define _JC_THROW(env, obj) \
+ _jc_cs_throw((env), (_jc_object *)(obj))
+
+/************************************************************************
+ * External data *
+ ************************************************************************/
+
+/* Primitive classes */
+extern _jc_type _jc_boolean$prim$type;
+extern _jc_type _jc_byte$prim$type;
+extern _jc_type _jc_char$prim$type;
+extern _jc_type _jc_short$prim$type;
+extern _jc_type _jc_int$prim$type;
+extern _jc_type _jc_long$prim$type;
+extern _jc_type _jc_float$prim$type;
+extern _jc_type _jc_double$prim$type;
+extern _jc_type _jc_void$prim$type;
+
+/* Primitive array classes */
+_JC_DECL_ARRAYS(boolean, prim$type);
+_JC_DECL_ARRAYS(byte, prim$type);
+_JC_DECL_ARRAYS(char, prim$type);
+_JC_DECL_ARRAYS(short, prim$type);
+_JC_DECL_ARRAYS(int, prim$type);
+_JC_DECL_ARRAYS(long, prim$type);
+_JC_DECL_ARRAYS(float, prim$type);
+_JC_DECL_ARRAYS(double, prim$type);
+
+/* C support functions */
+extern void _jc_cs_initialize_type(_jc_env *env, _jc_type *type)
+ _JC_JCNI_ATTR;
+extern jboolean _jc_cs_instanceof(_jc_env *env, _jc_object *obj,
+ _jc_type *type) _JC_JCNI_ATTR;
+extern _jc_object *_jc_cs_intern_string_utf8(_jc_env *env,
+ _jc_object **refp, const char *utf8)
+ _JC_JCNI_ATTR;
+extern void _jc_cs_invoke_native_method(_jc_env *env,
+ _jc_method *minfo, _jc_value *retval, ...)
+ _JC_JCNI_ATTR;
+extern const void *_jc_cs_lookup_interface(_jc_env *env, _jc_object *obj,
+ jlong sig_hash) _JC_JCNI_ATTR;
+extern void _jc_cs_monitorenter(_jc_env *env, _jc_object *obj)
+ _JC_JCNI_ATTR;
+extern void _jc_cs_monitorexit(_jc_env *env, _jc_object *obj)
+ _JC_JCNI_ATTR;
+extern _jc_array *_jc_cs_new_array(_jc_env *env, _jc_type *type,
+ jint size) _JC_JCNI_ATTR;
+extern _jc_array *_jc_cs_init_array(_jc_env *env, void *mem,
+ _jc_type *type, jint size) _JC_JCNI_ATTR;
+extern _jc_array *_jc_cs_new_multiarray(_jc_env *env, _jc_type *type,
+ jint num_sizes, const jint *sizes)
+ _JC_JCNI_ATTR;
+extern _jc_array *_jc_cs_init_multiarray(_jc_env *env, void *mem,
+ _jc_type *type, jint num_sizes,
+ const jint *sizes) _JC_JCNI_ATTR;
+extern _jc_object *_jc_cs_new_object(_jc_env *env, _jc_type *type)
+ _JC_JCNI_ATTR;
+extern _jc_object *_jc_cs_init_object(_jc_env *env, void *mem,
+ _jc_type *type) _JC_JCNI_ATTR;
+extern void _jc_cs_panic(_jc_env *env, const char *fmt, ...)
+ __attribute__ ((noreturn)) _JC_JCNI_ATTR;
+extern void _jc_cs_throw(_jc_env *env, _jc_object *obj)
+ __attribute__ ((noreturn)) _JC_JCNI_ATTR;
+extern void _jc_cs_throw_abstract_method_error(_jc_env *env,
+ _jc_method *minfo) __attribute__ ((noreturn))
+ _JC_JCNI_ATTR;
+extern void _jc_cs_throw_array_index_exception(_jc_env *env,
+ jint indx) __attribute__ ((noreturn))
+ _JC_JCNI_ATTR;
+extern void _jc_cs_throw_array_store_exception(_jc_env *env,
+ _jc_object *obj, _jc_type *type)
+ __attribute__ ((noreturn)) _JC_JCNI_ATTR;
+extern void _jc_cs_throw_class_cast_exception(_jc_env *env,
+ _jc_object *obj, _jc_type *type)
+ __attribute__ ((noreturn)) _JC_JCNI_ATTR;
+extern void _jc_cs_throw_null_pointer_exception(_jc_env *env)
+ __attribute__ ((noreturn)) _JC_JCNI_ATTR;
+extern jdouble _jc_cs_fmod(jdouble x, jdouble y) _JC_JCNI_ATTR;
+
+/* Empty interface method lookup tables */
+extern const void *_jc_empty_quick_table[_JC_IMETHOD_HASHSIZE];
+extern _jc_method **_jc_empty_imethod_table[_JC_IMETHOD_HASHSIZE];
+
+#endif /* _JC_DEFS_H_ */
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_invoke.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_invoke.h?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_invoke.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_invoke.h Tue Oct 4 19:19:16 2005
@@ -0,0 +1,38 @@
+
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: jc_invoke.h,v 1.1 2005/01/13 04:44:59 archiecobbs Exp $
+ */
+
+/*
+ * VM printer function type.
+ */
+typedef int _jc_printer(FILE *stream, const char *fmt, va_list args);
+
+/*
+ * Return values from _jc_invoke()
+ */
+#define _JC_RETURN_NORMAL 0 /* normal return */
+#define _JC_RETURN_EXCEPTION 1 /* exception thrown */
+#define _JC_RETURN_ERROR 2 /* error during startup */
+
+/*
+ * Invoke the JC Java virtual machine.
+ */
+extern int _jc_invoke(int ac, const char **av,
+ int ignoreUnrecognized, _jc_printer *printer);
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_machdep.h.in
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_machdep.h.in?rev=294974&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_machdep.h.in (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/include/jc_machdep.h.in Tue Oct 4 19:19:16 2005
@@ -0,0 +1,172 @@
+
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: jc_machdep.h.in,v 1.3 2005/05/10 01:19:23 archiecobbs Exp $
+ */
+
+#ifndef _JC_MACHDEP_H_
+#define _JC_MACHDEP_H_
+
+#include "jni_machdep.h"
+
+/************************************************************************
+ * Machine specific C definitions *
+ ************************************************************************/
+
+/*
+ * Goal: declare sigsetjmp()/siglongjmp().
+ */
+
+#include <setjmp.h>
+
+/*
+ * Goal: define these C types:
+ *
+ * _jc_uint16 Unsigned 16 bit type
+ * _jc_uint32 Unsigned 32 bit type
+ * _jc_uint64 Unsigned 64 bit type
+ */
+
+#if defined(__i386__) || defined(__sparc__)
+
+typedef unsigned short _jc_uint16;
+typedef unsigned int _jc_uint32;
+typedef unsigned long long _jc_uint64;
+
+/* Remove namespace pollution */
+#undef i386
+
+#else
+#error "Unsupported architecture for defining C types"
+#endif
+
+/*
+ * Goal:
+ *
+ * 1. Typedef '_jc_word' as the unsigned integral type that can be
+ * accessed atomically and is such that sizeof(_jc_word) == sizeof(void *).
+ * 2. #define _JC_SIGNED_RIGHT_SHIFT to 1 if right shifts are signed,
+ * otherwise zero.
+ * 3. #define _JC_JLONG() as how to create a 'jlong' constant in C.
+ */
+
+#if defined(__ia64__) || defined(__alpha__) || defined(__i386__) || defined(__sparc__)
+
+typedef unsigned int _jc_word;
+#define _JC_SIGNED_RIGHT_SHIFT 1
+#define _JC_JLONG(x) (x ## LL)
+
+#else
+#error "Unsupported architecture for various architecture specific stuff"
+#endif
+
+/*
+ * Goal: define how to put together bytes to make float and double constants.
+ */
+
+#if defined(__ia64__) || defined(__i386__)
+
+/* Little endian machines */
+#define _JC_DCONST(b0,b1,b2,b3,b4,b5,b6,b7) \
+ ({ \
+ const union { \
+ unsigned char b[8]; \
+ jdouble d; \
+ } u = { .b= { b7,b6,b5,b4,b3,b2,b1,b0 } }; \
+ u.d; \
+ })
+#define _JC_FCONST(b0,b1,b2,b3) \
+ ({ \
+ const union { \
+ unsigned char b[4]; \
+ jfloat f; \
+ } u = { .b= { b3,b2,b1,b0 } }; \
+ u.f; \
+ })
+
+#elif defined(__alpha__) ||defined(__sparc__)
+
+/* Big endian machines */
+#define _JC_DCONST(b0,b1,b2,b3,b4,b5,b6,b7) \
+ ({ \
+ const union { \
+ unsigned char b[8]; \
+ jdouble d; \
+ } u = { .b= { b0,b1,b2,b3,b4,b5,b6,b7 } }; \
+ u.d; \
+ })
+#define _JC_FCONST(b0,b1,b2,b3) \
+ ({ \
+ const union { \
+ unsigned char b[4]; \
+ jfloat f; \
+ } u = { .b= { b0,b1,b2,b3 } }; \
+ u.f; \
+ })
+
+#else
+#error "Unsupported architecture for _JC_DCONST/_JC_FCONST"
+#endif
+
+/*
+ * Goal: define _JC_DOWNWARD_STACK to 1 if the stack grows downward,
+ * otherwize define it to 0.
+ */
+
+#if defined(__i386__)
+
+#define _JC_DOWNWARD_STACK 1
+
+#else
+#error "Don't know stack direction for _JC_DOWNWARD_STACK"
+#endif
+
+/*
+ * Goal: define _JC_STACK_OVERFLOW_MARGIN, which is (at least) enough
+ * stack bytes sufficient to catch a signal and then construct and
+ * throw a StackOverflowError. I.e., when the amount of stack space
+ * remaining gets this low or lower, we throw a StackOverflowError.
+ */
+
+#define _JC_STACK_OVERFLOW_MARGIN (8 * 1024)
+
+/*
+ * Goal: define _JC_THREAD_LOCAL_SUPPORT to zero or one.
+ */
+#define _JC_THREAD_LOCAL_SUPPORT @_JC_THREAD_LOCAL_SUPPORT@
+
+/*
+ * Goal: define _JC_JCNI_ATTR function attributes for any modified
+ * JCNI calling conventions. It's OK to define _JC_JCNI_ATTR as nothing.
+ */
+
+/* Default to normal calling conventions */
+#define _JC_JCNI_ATTR
+
+#if defined(__i386__)
+
+#if __GNUC__ >= 3
+#undef _JC_JCNI_ATTR
+#define _JC_JCNI_ATTR __attribute__ ((regparm(3)))
+#define _JC_I386_REGPARM 1
+#else
+#define _JC_I386_REGPARM 0
+#endif
+
+#endif
+
+#endif /* _JC_MACHDEP_H_ */