Skip to content

Instantly share code, notes, and snippets.

@paulp
Created May 12, 2012 14:42
Show Gist options
  • Save paulp/2666898 to your computer and use it in GitHub Desktop.
Save paulp/2666898 to your computer and use it in GitHub Desktop.
% cat a.scala
trait Foo { def f = 5 }
% scalac ./a.scala -Xprint:all
[[syntax trees at end of parser]] // a.scala
package <empty> {
abstract trait Foo extends scala.AnyRef {
def $init$() = {
()
};
def f = 5
}
}
[[syntax trees at end of namer]] // a.scala: tree is unchanged since parser
[[syntax trees at end of packageobjects]] // a.scala: tree is unchanged since parser
[[syntax trees at end of typer]] // a.scala
package <empty> {
abstract trait Foo extends scala.AnyRef {
def /*Foo*/$init$(): Unit = {
()
};
def f: Int = 5
}
}
[[syntax trees at end of patmat]] // a.scala: tree is unchanged since typer
[[syntax trees at end of superaccessors]] // a.scala: tree is unchanged since typer
[[syntax trees at end of extmethods]] // a.scala: tree is unchanged since typer
[[syntax trees at end of pickler]] // a.scala: tree is unchanged since typer
[[syntax trees at end of refchecks]] // a.scala: tree is unchanged since typer
[[syntax trees at end of selectiveanf]] // a.scala: tree is unchanged since typer
[[syntax trees at end of selectivecps]] // a.scala: tree is unchanged since typer
[[syntax trees at end of uncurry]] // a.scala
package <empty> {
abstract trait Foo extends Object {
def /*Foo*/$init$(): Unit = {
()
};
def f(): Int = 5
}
}
[[syntax trees at end of tailcalls]] // a.scala: tree is unchanged since uncurry
[[syntax trees at end of specialize]] // a.scala: tree is unchanged since uncurry
[[syntax trees at end of explicitouter]] // a.scala: tree is unchanged since uncurry
[[syntax trees at end of erasure]] // a.scala
package <empty> {
abstract trait Foo extends Object {
def f(): Int
};
abstract trait Foo$class extends Object with Foo {
def /*Foo$class*/$init$(): Unit = {
()
};
def f(): Int = 5
}
}
[[syntax trees at end of posterasure]] // a.scala: tree is unchanged since erasure
[[syntax trees at end of lazyvals]] // a.scala: tree is unchanged since erasure
[[syntax trees at end of lambdalift]] // a.scala: tree is unchanged since erasure
[[syntax trees at end of constructors]] // a.scala
package <empty> {
abstract trait Foo extends Object {
def f(): Int
};
abstract trait Foo$class extends Object with Foo {
def f(): Int = 5;
def /*Foo$class*/$init$(): Unit = {
()
}
}
}
[[syntax trees at end of flatten]] // a.scala: tree is unchanged since constructors
[[syntax trees at end of mixin]] // a.scala
package <empty> {
abstract trait Foo extends Object {
def f(): Int
};
abstract trait Foo$class extends {
def f($this: Foo): Int = 5;
def /*Foo$class*/$init$($this: Foo): Unit = {
()
}
}
}
[[syntax trees at end of cleanup]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of icode]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of inliner]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of inlineExceptionHandlers]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of closelim]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of dce]] // a.scala: tree is unchanged since mixin
[[syntax trees at end of jvm]] // a.scala: tree is unchanged since mixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment