This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

eliminating null pointer checks on mmu-less machines


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]