Prototyping DCE tool for JS

This commit is contained in:
Alexey Andreev
2017-03-31 20:03:41 +03:00
parent d617b1d869
commit 9e89213d66
26 changed files with 1445 additions and 22 deletions
@@ -564,9 +564,10 @@ class JsAstSerializer {
var fileChanged = false
if (location != null) {
val lastFile = fileStack.peek()
fileChanged = lastFile != location.file
val newFile = location.file
fileChanged = lastFile != newFile && newFile != null
if (fileChanged) {
fileConsumer(serialize(location.file))
fileConsumer(serialize(newFile!!))
fileStack.push(location.file)
}
val locationBuilder = Location.newBuilder()