SI-6178 reflective invocation of magic symbols#1048
SI-6178 reflective invocation of magic symbols#1048xeno-by wants to merge 1 commit intoscala:2.10.xfrom
Conversation
In Scala there are some methods that only exist in symbol tables, but don't have corresponding method entries in Java class files. To the best of my knowledge, these methods can be subdivided into four groups: 1) stuff weaved onto Any, AnyVal and AnyRef, 2) magic methods that Scala exposes to fix Java arrays, 3) compile-time methods (such as classOf and all kinds of macros), 4) miscellaneous stuff (currently only String_+). To support these magic symbols, I've modified the `checkMemberOf` validator to special case Any/AnyVal/AnyRef methods and adjusted MethodMirror and ConstructorMirror classes to use special invokers for those instead of relying on Java reflection.
|
review by @paulp, @odersky or @gkossakowski |
|
Started jenkins job pr-rangepos at https://scala-webapps.epfl.ch/jenkins/job/pr-rangepos/58/ |
|
Started jenkins job pr-scala-testsuite-linux-opt at https://scala-webapps.epfl.ch/jenkins/job/pr-scala-testsuite-linux-opt/762/ |
|
jenkins job pr-rangepos: Success - https://scala-webapps.epfl.ch/jenkins/job/pr-rangepos/58/ |
|
jenkins job pr-scala-testsuite-linux-opt: Success - https://scala-webapps.epfl.ch/jenkins/job/pr-scala-testsuite-linux-opt/762/ |
|
My review is: https://github.com/paulp/scala/tree/scalamacros/ticket/6178 I'd have just added it to the pull request if I could figure out how. Since I can't, can you add it? It's a lot easier to avoid duplication as you go than it is to clean it up later (and a lot more likely to be done by someone other than me.) And bugs often turn obvious once all the noise is stripped away, as happened here. |
|
Thanks! I'll add this commit to the ultimate pull request that will unify all the stuff currently in flight. |
|
Superceded by #1067 |
In Scala there are some methods that only exist in symbol tables,
but don't have corresponding method entries in Java class files.
To the best of my knowledge, these methods can be subdivided into four groups:
To support these magic symbols, I've modified the
checkMemberOfvalidatorto special case Any/AnyVal/AnyRef methods and adjusted MethodMirror and
ConstructorMirror classes to use special invokers for those instead of
relying on Java reflection.