aboutsummaryrefslogtreecommitdiff
path: root/libjava/include/jvm.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-02-08 20:07:29 +0000
committerTom Tromey <tromey@gcc.gnu.org>2006-02-08 20:07:29 +0000
commit8b1753e3ec0f38a18b8bcd3c13e2b6b55f799099 (patch)
treedad7dc41d043dce968c02f6043b92ddb8c7cbff7 /libjava/include/jvm.h
parentb5642e202974f356bc85dafe0dfb4ab79736a48e (diff)
downloadgcc-8b1753e3ec0f38a18b8bcd3c13e2b6b55f799099.zip
gcc-8b1753e3ec0f38a18b8bcd3c13e2b6b55f799099.tar.gz
gcc-8b1753e3ec0f38a18b8bcd3c13e2b6b55f799099.tar.bz2
PR libgcj/26063, PR libgcj/17978, PR libgcj/10598:
* defineclass.cc (parse): Use _Jv_AllocRawObj. (read_constpool): Likewise. (read_one_code_attribute): Use internal function name. (handleConstantPool): Use _Jv_AllocRawObj. (handleInterfacesBegin): Likewise. (handleFieldsBegin): Likewise. (handleMethodsBegin): Likewise. (handleCodeAttribute): Likewise. (handleMethodsEnd): Likewise. * include/jvm.h (new_vtable): Use _Jv_AllocRawObj. * interpret.cc (do_allocate_static_fields): Use _Jv_AllocRawObj. Allocate reference fields separately. * link.cc (prepare_constant_time_tables): Use _Jv_AllocRawObj. (add_miranda_methods): Likewise. (generate_itable): Use _Jv_AllocBytes. (find_iindex): Likewise. (struct method_closure): New structure. (create_error_method): Use struct method_closure; allocate with _Jv_AllocBytes. (ensure_fields_laid_out): Separate reference fields from non-reference fields. * boehm.cc (_Jv_MarkObj): Mark vtable. Only mark direct fields of Class. (_Jv_MarkArray): Mark vtable. (_Jv_AllocRawObj): Don't allocate objects of size 0. * include/execution.h (_Jv_ExecutionEngine::allocate_static_fields): Added 'int' parameter. (struct _Jv_CompiledEngine): Updated. (class _Jv_InterpreterEngine): Updated. From-SVN: r110763
Diffstat (limited to 'libjava/include/jvm.h')
-rw-r--r--libjava/include/jvm.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index b0b3305..e5187f4 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -1,6 +1,6 @@
// jvm.h - Header file for private implementation information. -*- c++ -*-
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
This file is part of libgcj.
@@ -72,6 +72,7 @@ struct _Jv_VTable
{
return (2 * sizeof (void *)) + (index * vtable_elt_size ());
}
+
static _Jv_VTable *new_vtable (int count);
};
@@ -374,16 +375,12 @@ void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
void _Jv_RunMain (struct _Jv_VMInitArgs *vm_args, jclass klass,
const char *name, int argc, const char **argv, bool is_jar);
-// Delayed until after _Jv_AllocBytes is declared.
-//
-// Note that we allocate this as unscanned memory -- the vtables
-// are handled specially by the GC.
-
+// Delayed until after _Jv_AllocRawObj is declared.
inline _Jv_VTable *
_Jv_VTable::new_vtable (int count)
{
size_t size = sizeof(_Jv_VTable) + (count - 1) * vtable_elt_size ();
- return (_Jv_VTable *) _Jv_AllocBytes (size);
+ return (_Jv_VTable *) _Jv_AllocRawObj (size);
}
// Determine if METH gets an entry in a VTable.