summaryrefslogtreecommitdiff
path: root/test/files/run/t6028.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2016-09-27 16:58:25 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-09-29 11:49:36 -0700
commit493e22f321d6e7774e74419242b6e3d61eff6bad (patch)
tree5f7ae7fcf7563213a98a6aeb7d43f80ff55796f3 /test/files/run/t6028.check
parentd04cda14d722ff365b4c3b543de008d93772410b (diff)
downloadscala-493e22f321d6e7774e74419242b6e3d61eff6bad.tar.gz
scala-493e22f321d6e7774e74419242b6e3d61eff6bad.tar.bz2
scala-493e22f321d6e7774e74419242b6e3d61eff6bad.zip
Emit local module like lazy val
The motivation is to use the new fine-grained lock scoping that local lazies have since #5294. Fixes scala/scala-dev#235 Co-Authored-By: Jason Zaugg <jzaugg@gmail.com>
Diffstat (limited to 'test/files/run/t6028.check')
-rw-r--r--test/files/run/t6028.check17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check
index 903ea3b753..05634fa8eb 100644
--- a/test/files/run/t6028.check
+++ b/test/files/run/t6028.check
@@ -15,7 +15,7 @@ package <empty> {
}
};
def bar(barParam: Int): Object = {
- @volatile var MethodLocalObject$module: runtime.VolatileObjectRef = scala.runtime.VolatileObjectRef.zero();
+ lazy <artifact> val MethodLocalObject$module: scala.runtime.LazyRef = new scala.runtime.LazyRef();
T.this.MethodLocalObject$1(barParam, MethodLocalObject$module)
};
def tryy(tryyParam: Int): Function0 = {
@@ -54,13 +54,14 @@ package <empty> {
<synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer;
<synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer
};
- final private[this] def MethodLocalObject$lzycompute$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): Unit = T.this.synchronized[Unit](if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null))
- MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1));
- final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = {
- if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null))
- T.this.MethodLocalObject$lzycompute$1(barParam$1, MethodLocalObject$module$1);
- (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type](): T#MethodLocalObject$2.type)
- };
+ final <artifact> private[this] def MethodLocalObject$lzycompute$1(barParam$1: Int, MethodLocalObject$module$1: scala.runtime.LazyRef): T#MethodLocalObject$2.type = MethodLocalObject$module$1.synchronized[T#MethodLocalObject$2.type](if (MethodLocalObject$module$1.initialized())
+ MethodLocalObject$module$1.value().$asInstanceOf[T#MethodLocalObject$2.type]()
+ else
+ MethodLocalObject$module$1.initialize(new T#MethodLocalObject$2.type(T.this, barParam$1)).$asInstanceOf[T#MethodLocalObject$2.type]());
+ final private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: scala.runtime.LazyRef): T#MethodLocalObject$2.type = if (MethodLocalObject$module$1.initialized())
+ MethodLocalObject$module$1.value().$asInstanceOf[T#MethodLocalObject$2.type]()
+ else
+ T.this.MethodLocalObject$lzycompute$1(barParam$1, MethodLocalObject$module$1);
@SerialVersionUID(value = 0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable {
def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): <$anon: Function0> = {
$anonfun$tryy$1.super.<init>();