aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-07 11:22:01 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-07 11:22:01 +0300
commitb77574ea1c25e2630dcde000ae0fa32b01f8311e (patch)
tree25d0596d63efb0ff399389baa31a6dc880199401 /lib
parent9bb1a84d6bef8fa95d025d65bd0c2772bceca404 (diff)
downloadtracifyjs-b77574ea1c25e2630dcde000ae0fa32b01f8311e.tar.gz
tracifyjs-b77574ea1c25e2630dcde000ae0fa32b01f8311e.zip
fixed tests (need to drop the toplevel block in "expected" if it's a single statement)
Diffstat (limited to 'lib')
-rw-r--r--lib/ast.js3
-rw-r--r--lib/compress.js2
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 7b2a3271..4e0c08b1 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -232,9 +232,6 @@ var AST_Scope = DEFNODE("Scope", "variables functions uses_with uses_eval parent
}, AST_Block);
var AST_Toplevel = DEFNODE("Toplevel", null, {
- initialize: function() {
- this.required = true;
- },
$documentation: "The toplevel scope"
}, AST_Scope);
diff --git a/lib/compress.js b/lib/compress.js
index d8def866..a7563b98 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -473,7 +473,7 @@ function Compressor(options, false_by_default) {
SQUEEZE(AST_BlockStatement, function(self, compressor){
self = self.clone();
self.body = tighten_body(self.body, compressor);
- if (self.body.length == 1 && !self.required)
+ if (self.body.length == 1)
return self.body[0];
return self;
});