Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created March 17, 2011 07:25
Show Gist options
  • Save yuroyoro/873972 to your computer and use it in GitHub Desktop.
Save yuroyoro/873972 to your computer and use it in GitHub Desktop.
scalaのlazy valってこんな風に初期化されるんですぜ(2.9)
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: Main.scala
import scala.Predef$;
import scala.ScalaObject;
import scala.collection.immutable.StringLike;
import scala.runtime.BoxedUnit;
import scala.util.Random$;
public final class Main$
implements ScalaObject
{
public String what()
{
if((bitmap$0 & 1) == 0)
synchronized(this)
{
if((bitmap$0 & 1) == 0)
{
what = Predef$.MODULE$.augmentString("(((((((( \uFF1B\uFF9F\u0414\uFF9F))))))))\uFF76\uFF9E\uFF78\uFF76\uFF9E\uFF78\uFF8C\uFF9E\uFF99\uFF8C\uFF9E\uFF99\uFF76\uFF9E\uFF80\uFF76\uFF9E\uFF80\uFF8C\uFF9E\uFF99\uFF8C\uFF9E\uFF99 ").$times(Random$.MODULE$.nextInt(4));
bitmap$0 = bitmap$0 | 1;
}
BoxedUnit _tmp = BoxedUnit.UNIT;
}
return what;
}
public void main(String args[])
{
Predef$.MODULE$.println(what());
}
private Main$()
{
}
public static final Main$ MODULE$ = this;
private String what;
public volatile int bitmap$0;
static
{
new Main$();
}
}
object Main{
lazy val what = "(((((((( ;゚Д゚))))))))ガクガクブルブルガタガタブルブル "* util.Random.nextInt(4)
def main(args:Array[String]) = {
println( what )
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment