This is the mail archive of the java-patches@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]

Re: Don't generate NullPointerExceptions for arraylength and arrayload


Andrew Haley wrote:
> This removes the special case code that throws a NullPointerException
> bease on the type of an arrayref.  This trick no longer works because
> in the bytecode front end we now use the same variable decl for every
> object.  In ancy case, this optimization just provided a fast path to
> throw a NullPointerException.
> 
> This is a regression from 3.x.

[...]

> -  if (type == ptr_type_node)
> -    return build3 (CALL_EXPR, int_type_node, 
> -                  build_address_of (soft_nullpointer_node),
> -                  NULL_TREE, NULL_TREE);
> -

Doesn't doing this make "Array_3 -O3 bytecode -> native"
fail for you?

Thanks,
Ranjit.

-- 
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/


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