From 37f4e9ce3a05a5821d2a5e20af28f34355d12dfb Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 4 Feb 2013 12:11:20 +0100 Subject: thread locals instead of locks for vars in Types.scala This is one of the changes suggested by Roland in order to reduce contention caused by reflection GIL. Locks optimized away here are indirectly used for such fundamental operations as subtyping tests, so the optimization looks quite important. --- src/reflect/scala/reflect/runtime/JavaUniverseForce.scala | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/reflect/scala/reflect/runtime/JavaUniverseForce.scala') diff --git a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala index 70126e713a..5f004330c3 100644 --- a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala +++ b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala @@ -29,6 +29,19 @@ trait JavaUniverseForce { self: runtime.JavaUniverse => this.treeInfo this.gil // inaccessible: this.uniqueLock + // inaccessible: this._skolemizationLevel + // inaccessible: this._undoLog + // inaccessible: this._intersectionWitness + // inaccessible: this._volatileRecursions + // inaccessible: this._pendingVolatiles + // inaccessible: this._subsametypeRecursions + // inaccessible: this._pendingSubTypes + // inaccessible: this._basetypeRecursions + // inaccessible: this._pendingBaseTypes + // inaccessible: this._lubResults + // inaccessible: this._glbResults + // inaccessible: this._indent + // inaccessible: this._tostringRecursions // inaccessible: this.nextIdLock // inaccessible: this.freshExistentialNameLock // inaccessible: this.mirrors @@ -166,7 +179,7 @@ trait JavaUniverseForce { self: runtime.JavaUniverse => this.unwrapToStableClass this.unwrapWrapperTypes this.RecoverableCyclicReference - this.undoLog + // inaccessible: this._undoLog // inaccessible: this.numericLoBound // inaccessible: this.numericHiBound this.TypeConstraint -- cgit v1.2.3