summaryrefslogtreecommitdiff
path: root/src/detach
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-01-25 15:04:53 +0100
committerMartin Odersky <odersky@gmail.com>2012-01-25 15:04:53 +0100
commitc749710859d32252291802d55d48abe518ddd118 (patch)
treefef90dd9afa4c595b533cb137d27c64b66cb2ce6 /src/detach
parent65a1e8bd2dbd796bedc0232615cfc3caf18fd4b3 (diff)
downloadscala-c749710859d32252291802d55d48abe518ddd118.tar.gz
scala-c749710859d32252291802d55d48abe518ddd118.tar.bz2
scala-c749710859d32252291802d55d48abe518ddd118.zip
Making reflection thread-safe.
The idea is that all operations that need to be synchronized are overriden in classes reflect.runtime.Synchronized*. Sometimes this applies to operations defined in SymbolTable, which can be directly overridden. Sometimes it is more convenient to generate SynchronizedClazz subclasses of SymbolTable classes Clazz. In the latter case, all instance creation must go over factory methods that can be overridden in the Synchronized traits.
Diffstat (limited to 'src/detach')
-rw-r--r--src/detach/plugin/scala/tools/detach/Detach.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/detach/plugin/scala/tools/detach/Detach.scala b/src/detach/plugin/scala/tools/detach/Detach.scala
index e9cd474b82..fee2c5a273 100644
--- a/src/detach/plugin/scala/tools/detach/Detach.scala
+++ b/src/detach/plugin/scala/tools/detach/Detach.scala
@@ -735,7 +735,7 @@ abstract class Detach extends PluginComponent
iface.sourceFile = clazz.sourceFile
iface setFlag (ABSTRACT | TRAIT | INTERFACE) // Java interface
val iparents = List(ObjectClass.tpe, RemoteClass.tpe, ScalaObjectClass.tpe)
- iface setInfo ClassInfoType(iparents, new Scope, iface)
+ iface setInfo ClassInfoType(iparents, newScope, iface)
// methods must throw RemoteException
iface addAnnotation remoteAnnotationInfo
@@ -749,7 +749,7 @@ abstract class Detach extends PluginComponent
// Variant 2: un-/exportObject
//val cparents = List(ObjectClass.tpe, iface.tpe,
// UnreferencedClass.tpe, ScalaObjectClass.tpe)
- iclaz setInfo ClassInfoType(cparents, new Scope, iclaz)
+ iclaz setInfo ClassInfoType(cparents, newScope, iclaz)
val proxy = (iface, iclaz, new mutable.HashMap[Symbol, Symbol])
proxies(clazz) = proxy
proxy