This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
eliminating null pointer checks on mmu-less machines
- From: Adam Megacz <adam at megacz dot com>
- To: java at gcc dot gnu dot org
- Date: 12 Sep 2003 20:46:59 -0700
- Subject: eliminating null pointer checks on mmu-less machines
- Organization: Myself
Hey, I was thinking about NullPointerException handling on machines
with no MMU. There's not much that can be done for field accesses,
but method invocations are much more common.
Is it feasible to place an object at address 0x0 whose vtable is at
least as large as the largest vtable (either set a static limit or
expand the vtable every time a class with a larger vtable is loaded),
where all vtable entries point to a method that just throws a NPE?
It seems that this would eliminate the zillions of "if ptr==NULL"
checks.
- a
--
"Education is not filling a bucket but lighting a fire." -- WB Yeats