8000 Fix #1795: Essentials of Scala.js-defined JS classes. by sjrd · Pull Request #1809 · scala-js/scala-js · GitHub
[go: up one dir, main page]

Skip to content

Fix #1795: Essentials of Scala.js-defined JS classes. #1809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 24, 2015
10 changes: 5 additions & 5 deletions ci/checksizes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ REVERSI_OPT_GZ_SIZE=$(stat '-c%s' "$REVERSI_OPT.gz")

case $FULLVER in
2.10.2)
REVERSI_PREOPT_EXPECTEDSIZE=689000
REVERSI_PREOPT_EXPECTEDSIZE=690000
REVERSI_OPT_EXPECTEDSIZE=155000
REVERSI_PREOPT_GZ_EXPECTEDSIZE=92000
REVERSI_OPT_GZ_EXPECTEDSIZE=42000
;;
2.11.7)
REVERSI_PREOPT_EXPECTEDSIZE=629000
REVERSI_PREOPT_EXPECTEDSIZE=630000
REVERSI_OPT_EXPECTEDSIZE=146000
REVERSI_PREOPT_GZ_EXPECTEDSIZE=87000
REVERSI_OPT_GZ_EXPECTEDSIZE=40000
;;
2.12.0-M2)
REVERSI_PREOPT_EXPECTEDSIZE=625000
REVERSI_OPT_EXPECTEDSIZE=145000
REVERSI_PREOPT_EXPECTEDSIZE=626000
REVERSI_OPT_EXPECTEDSIZE=146000
REVERSI_PREOPT_GZ_EXPECTEDSIZE=86000
REVERSI_OPT_GZ_EXPECTEDSIZE=39000
REVERSI_OPT_GZ_EXPECTEDSIZE=40000
;;
esac

Expand Down
15 changes: 1 addition & 14 deletions cli/src/main/scala/org/scalajs/cli/Scalajsp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ object Scalajsp {

private case class Options(
infos: Boolean = false,
desugar: Boolean = false,
showReflProxy: Boolean = false,
jar: Option[File] = None,
fileNames: Seq[String] = Seq.empty)
Expand All @@ -47,10 +46,6 @@ object Scalajsp {
.valueName("<jar>")
.action { (x, c) => c.copy(jar = Some(x)) }
.text("Read *.sjsir file(s) from the given JAR.")
opt[Unit]('d', "desugar")
.action { (_, c) => c.copy(desugar = true) }
.text("Desugar JS trees. Generates ECMAScript5 code. However, " +
"the generated runtime type information will be wrong.")
opt[Unit]('i', "infos")
.action { (_, c) => c.copy(infos = true) }
.text("Show DCE infos instead of trees")
Expand Down Expand Up @@ -102,15 +97,7 @@ object Scalajsp {
else filterOutReflProxies(tree)
}

if (opts.desugar) {
val pseudoLinked = LinkedClass(info, outTree, ancestors = Nil)
val printer = new JSTreePrinter(stdout)
val emitter = new ScalaJSClassEmitter(Semantics.Defaults,
OutputMode.ECMAScript51Isolated,
LinkingUnit.GlobalInfo.SafeApproximation)
printer.printTopLevelTree(emitter.genClassDef(pseudoLinked))
} else
new IRTreePrinter(stdout).printTopLevelTree(outTree)
new IRTreePrinter(stdout).printTopLevelTree(outTree)
}

stdout.flush()
Expand Down
Loading
0