From 2fb507b849e2b0f86c2480bde95200f8ae30803d Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sun, 23 Sep 2012 15:07:53 +0200 Subject: SI-6277 fixes flags, annotations & privateWithin `Symbol.getFlag`, 'Symbol.hasFlag`, `Symbol.hasAllFlags`, `Symbol.annotations` and `Symbol.privateWithin` now trigger automatic initialization of symbols if they are used in a runtime reflection universe and some other conditions are met (see `Symbol.needsInitialize` for details). As the performance testing in https://github.com/scala/scala/pull/1380 shows, this commit introduces a ~2% performance regression of compilation speed. Unfortunately all known solutions to the bug at hand (A, B & C - all of those) introduce perf regressions (see the pull request linked above for details). However we're under severe time pressure, so there's no more time to explore. Therefore I suggest this is reasonable to accept this performance hit, because we've just gained 6% from removing scala.reflect.base, and even before that we were well within our performance goal for 2.10.0-final. --- test/files/run/reflection-magicsymbols-invoke.check | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/run/reflection-magicsymbols-invoke.check') diff --git a/test/files/run/reflection-magicsymbols-invoke.check b/test/files/run/reflection-magicsymbols-invoke.check index 520dc2bfbe..f5258efeb7 100644 --- a/test/files/run/reflection-magicsymbols-invoke.check +++ b/test/files/run/reflection-magicsymbols-invoke.check @@ -90,7 +90,7 @@ method $asInstanceOf: [T0]()T0 method $isInstanceOf: [T0]()Boolean method ==: (x$1: Any)Boolean method ==: (x$1: AnyRef)Boolean -method apply: (i: )T +method apply: (i: Int)T method asInstanceOf: [T0]=> T0 method clone: ()Array[T] method eq: (x$1: AnyRef)Boolean @@ -105,7 +105,7 @@ method notify: ()Unit method notifyAll: ()Unit method synchronized: [T0](x$1: T0)T0 method toString: ()java.lang.String -method update: (i: , x: )Unit +method update: (i: Int, x: T)Unit method wait: ()Unit method wait: (x$1: Long)Unit method wait: (x$1: Long, x$2: Int)Unit -- cgit v1.2.3