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: Patch: gcj optimizations


> 
> We could also inline things like Math.sin, Math.cos, etc.  Doing that
> would require figuring out how to connect gcj to the builtin function
> infrastructure in gcc.  This might be tricky; for instance I think
> we'd want to fall back on calling `java.lang.Math.cos' instead of
> calling plain `cos' if the builtin is disabled.

Isn't java.lang.Math.cos specified that it is permitted to be native in
the first place?  It is only java.lang.StrictMath.cos which must be
implemented in Java. (Likewise for the other functions in
Math/StrictMath).  The only thing you might need to worry about with a
native implementation of Math is whether the native method (or inlined
machine instruction, on platforms that support it) is accurate enough to
meet the specifications.

> 
> Tom
> 

-- 
This signature intentionally left boring.

Eric Blake             ebb9@email.byu.edu
  BYU student, free software programmer


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