summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/text/BreakIterator.java
diff options
context:
space:
mode:
authorRichard Sandiford <[email protected]>2015-10-07 08:09:45 +0000
committerRichard Sandiford <[email protected]>2015-10-07 08:09:45 +0000
commitd01db77a06a80459acf79e963c55e3b94106eeb3 (patch)
tree26df13af657839b7995fa4de21f93310ada1c766 /libjava/classpath/java/text/BreakIterator.java
parent5b5dce39b8c076c185ce1fa19d4800d6129f3f53 (diff)
Cache reals for 1/4, 1/6 and 1/9
We have a global 1/2 and a cached 1/3, but recalculate 1/4, 1/6 and 1/9 each time we need them. That seems a bit arbitrary and makes the folding code more noisy (especially once it's moved to match.pd). This patch caches the other three constants too. Bootstrapped & regression-tested on x86_64-linux-gnu. gcc/ * real.h (dconst_quarter, dconst_sixth, dconst_ninth): New macros. (dconst_quarter_ptr, dconst_sixth_ptr, dconst_ninth_ptr): Declare. * real.c (CACHED_FRACTION): New helper macro. (dconst_third_ptr): Use it. (dconst_quarter_ptr, dconst_sixth_ptr, dconst_ninth_ptr): New. * builtins.c (fold_builtin_sqrt): Use dconst_quarter and dconst_sixth. (fold_builtin_cbrt): Use dconst_sixth and dconst_ninth. From-SVN: r228561
Diffstat (limited to 'libjava/classpath/java/text/BreakIterator.java')
0 files changed, 0 insertions, 0 deletions