summaryrefslogtreecommitdiff
path: root/test/files/run/hashCodeBoxesRunTime.scala
Commit message (Collapse)AuthorAgeFilesLines
* Remove the duplicate implem of hash codes for numbers.Sébastien Doeraene2016-04-211-29/+0
| | | | | | | | | | | | | | | | Previously, there were two separate implementations of hash code for boxed number classes: * One in Statics, used by the codegen of case class methods. * One in ScalaRunTime + BoxesRunTime, used by everything else. This commit removes the variant implemented in ScalaRunTime + BoxesRunTime, and always uses Statics instead. We use Statics because the one from ScalaRunTime causes an unnecessary module load. The entry point ScalaRunTime.hash() is kept, as deprecated, for bootstrapping reasons.
* Remove dead-code runtime hash() methods.Sébastien Doeraene2016-04-131-2/+3
| | | | | | | | | | | | | ScalaRunTime had a bunch of overloads of the `hash()` method, but only the `Any` version is ever used by the codegen. Worse, their implementation was not in sync with the actual implementations in BoxesRunTime, called by the `Any` version. For example, hash(0x80000000L) != hash(0x80000000L: Any) This commit simply removes all of this dead code. Similarly, we remove BoxesRunTime.hashFromObject(), which was never called either.
* Cull extraneous whitespace.Paul Phillips2013-09-181-6/+6
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* Revert recent commits.Paul Phillips2012-05-091-0/+28
| | | | | This reverts commit 9b6f51d3ae6ddc6571d3101ea715e25a05aa8adb. This reverts commit b5919100e785df58bde35bb24abe9d60b4da08a2.
* removes redundant hash implementation from BoxesRunTime.javaDominik Gruntz2012-05-091-28/+0
|
* Begone t1737...Hubert Plociniczak2011-11-021-6/+6
|
* Unique's seeming victory is overruled by commit...Paul Phillips2010-02-041-1/+1
| | | | | | Unique's seeming victory is overruled by committee. It is "distinct", not "unique", wherein lies the nub. No review.
* Striking while the iron is hot, renamed removeD...Paul Phillips2010-02-031-1/+1
| | | | | | | | | Striking while the iron is hot, renamed removeDuplicates to unique and deprecated removeDuplicates. The debate between distinct and unique was vigorous but unique won by a freckle. (Dark horse 'nub' was disqualified for taking performance enhancers.) The only thing which might need review is the choice of name, but review by odersky.
* Breaks down the hash function in BoxesRunTime b...Paul Phillips2009-11-091-0/+28
Breaks down the hash function in BoxesRunTime by type so we can do as much as possible at compile time. Documents various trouble points I've identified with trying to get the hashCodes aligned. Test case exercises the hashCode functions. Deleted all the code associated with previous equality adventures. Don't worry, I can put anything back if it turns out we have to change course again, but for now it's noise. Also, gives return types to the box and unbox methods which are added to the primitive companions, so e.g. Int.box(5) now returns a j.l.Integer instead of an Object.