From: Tim Wilkinson (tim@transvirtual.com)
Date: Tue Feb 16 1999 - 18:18:46 EST
This is the patch that make GCJ work with the Custom VM - it's 104 lines
and give you an idea of what's being changed.
Tim
---- diff -r -u0 ./class.c ../../../../egcs-19990214/gcc/java/class.c --- ./class.c Thu Feb 4 23:58:04 1999 +++ ../../../../egcs-19990214/gcc/java/class.c Mon Feb 15 19:45:32 1999@@ -568,0 +569,3 @@ +#if HAVE_KAFFE_CUSTOM + buffer[i] = name_ptr[i]; +#else /* HAVE_KAFFE_CUSTOM */ @@ -569,0 +573 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -892,0 +897,7 @@ +#if HAVE_KAFFE_CUSTOM + if (METHOD_NATIVE (mdecl)) { + /* We don't output a symbol for native code - we link this in Kaffe */ + accflags &= ~ACC_TRANSLATED; + } + else +#endif /* HAVE_KAFFE_CUSTOM */ @@ -902,0 +914,11 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD_VALUE (minit, "idx", build_int_2 (0, 0)); + PUSH_FIELD_VALUE (minit, "stacksz", build_int_2 (0, 0)); + PUSH_FIELD_VALUE (minit, "localsz", build_int_2 (0, 0)); + PUSH_FIELD_VALUE (minit, "ncode", code); + PUSH_FIELD_VALUE (minit, "ncode_start", null_pointer_node); + PUSH_FIELD_VALUE (minit, "ncode_end", null_pointer_node); + PUSH_FIELD_VALUE (minit, "class", this_class_addr); + PUSH_FIELD_VALUE (minit, "lines", null_pointer_node); + PUSH_FIELD_VALUE (minit, "exception_table", null_pointer_node); +#else /* HAVE_KAFFE_CUSTOM */ @@ -903,0 +926 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -1041,0 +1065 @@ +#if !HAVE_KAFFE_CUSTOM /* This just breaks stuff elsewhere */ @@ -1044,0 +1069 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -1133,0 +1159,3 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD_VALUE (cons, "name", build_utf8_ref (identifier_subst(DECL_NAME (type_decl), "", '.', '/', ""))); +#else /* HAVE_KAFFE_CUSTOM */ @@ -1134,0 +1163 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -1157,0 +1187,5 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD_VALUE (cons, "total_interface_count", build_int_2 (interface_len, 0)); + PUSH_FIELD_VALUE (cons, "state", integer_zero_node); + PUSH_FIELD_VALUE (cons, "vmflags", integer_zero_node); +#else /* HAVE_KAFFE_CUSTOM */ @@ -1160,0 +1195 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -1643,0 +1679,3 @@ +#if HAVE_KAFFE_CUSTOM + else +#else /* HAVE_KAFFE_CUSTOM */ @@ -1647,0 +1686 @@ +#endif /* HAVE_KAFFE_CUSTOM */ diff -r -u0 ./decl.c ../../../../egcs-19990214/gcc/java/decl.c --- ./decl.c Sat Jan 23 13:49:43 1999 +++ ../../../../egcs-19990214/gcc/java/decl.c Mon Feb 15 16:32:37 1999
@@ -603,0 +604,3 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD (class_type_node, field, "next", ptr_type_node); +#else /* HAVE_KAFFE_CUSTOM */ @@ -604,0 +608 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -620,0 +625,5 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD (class_type_node, field, "total_interface_count", short_type_node); + PUSH_FIELD (class_type_node, field, "state", byte_type_node); + PUSH_FIELD (class_type_node, field, "vmflags", byte_type_node); +#else /* HAVE_KAFFE_CUSTOM */ @@ -622,0 +632 @@ +#endif /* HAVE_KAFFE_CUSTOM */ @@ -682,0 +693,11 @@ +#if HAVE_KAFFE_CUSTOM + PUSH_FIELD (method_type_node, field, "idx", short_type_node); + PUSH_FIELD (method_type_node, field, "stacksz", unsigned_short_type_node); + PUSH_FIELD (method_type_node, field, "localsz", unsigned_short_type_node); + PUSH_FIELD (method_type_node, field, "ncode", nativecode_ptr_type_node); + PUSH_FIELD (method_type_node, field, "ncode_start", nativecode_ptr_type_node); + PUSH_FIELD (method_type_node, field, "ncode_end", nativecode_ptr_type_node); + PUSH_FIELD (method_type_node, field, "class", class_ptr_type); + PUSH_FIELD (method_type_node, field, "lines", ptr_type_node); + PUSH_FIELD (method_type_node, field, "exception_table", ptr_type_node); +#else /* HAVE_KAFFE_CUSTOM */ @@ -683,0 +705 @@ +#endif /* HAVE_KAFFE_CUSTOM */ diff -r -u0 ./expr.c ../../../../egcs-19990214/gcc/java/expr.c --- ./expr.c Mon Jan 25 02:32:17 1999 +++ ../../../../egcs-19990214/gcc/java/expr.c Mon Feb 15 15:33:32 1999
@@ -1366,0 +1367,3 @@ +#if HAVE_KAFFE_CUSTOM + if (is_compiled_class (self_type) && !METHOD_NATIVE(method)) +#else /* HAVE_KAFFE_CUSTOM */ @@ -1367,0 +1371 @@ +#endif /* HAVE_KAFFE_CUSTOM */ diff -r -u0 ./jcf.h ../../../../egcs-19990214/gcc/java/jcf.h --- ./jcf.h Sun Jan 31 23:00:39 1999 +++ ../../../../egcs-19990214/gcc/java/jcf.h Mon Feb 15 15:07:49 1999
@@ -281,0 +282,5 @@ +/* + * Define for use with Kaffe OpenVM. + */ +#define HAVE_KAFFE_CUSTOM 1 +
-- Tim Wilkinson Tel: +1 510 704 1660 Transvirtual Technologies, Inc., Fax: +1 510 704 1893 Berkeley, CA, USA. Email: tim@transvirtual.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:58:09 EDT