summaryrefslogtreecommitdiff
path: root/src/scalap
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-09-13 22:45:10 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-09-14 21:10:02 +1000
commita5bb6e00f051bf93fe7df4a02583eba478fa5ca1 (patch)
tree0ee00b83916dbd5b7bb8ca42956335107432ee3f /src/scalap
parent05016d9035ab9b1c866bd9f12fdd0491f1ea0cbb (diff)
downloadscala-a5bb6e00f051bf93fe7df4a02583eba478fa5ca1.tar.gz
scala-a5bb6e00f051bf93fe7df4a02583eba478fa5ca1.tar.bz2
scala-a5bb6e00f051bf93fe7df4a02583eba478fa5ca1.zip
SD-225 Use a "lzycompute" method for module initialization
The monitors and module instantation were inliuned into the module accessor method in b2e0911. However, this seems to have had a detrimental impact on performance. This might be because the module accessors are now above the "always inline" HotSpot threshold of 35 bytes, or perhaps because they contain monitor-entry/exit and exception handlers. This commit returns to the the 2.11.8 appraoch of factoring the the second check of the doublecheck locking into a method. I've done this by declaring a nested method within the accessor; this will be lifted out to the class level by lambdalift. This represents a slight deviation from the implementation strategy used for lazy accessors, which create a symbol for the slowpath method in the info transform and generate the corresponding DefDef as a class member. I don't believe this deviation is particular worrisome, though. I have bootstrapped the compiler through this commit and found that the drastic regression in compiling the shapeless test suite is solved.
Diffstat (limited to 'src/scalap')
0 files changed, 0 insertions, 0 deletions