[Pkg-javascript-commits] [uglifyjs] 27/77: AST_Do nodes: walk body before condition

Jonas Smedegaard dr at jones.dk
Tue May 19 00:02:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.18
in repository uglifyjs.

commit 6b23cbc8522bdc6d28e1abb44eb2d1d6eb6b697a
Author: Mihai Bazon <mihai at bazon.net>
Date:   Tue Jan 6 12:27:23 2015 +0200

    AST_Do nodes: walk body before condition
---
 lib/ast.js | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/lib/ast.js b/lib/ast.js
index 051cd2f..2eb8cc8 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -205,21 +205,27 @@ var AST_DWLoop = DEFNODE("DWLoop", "condition", {
     $documentation: "Base class for do/while statements",
     $propdoc: {
         condition: "[AST_Node] the loop condition.  Should not be instanceof AST_Statement"
-    },
-    _walk: function(visitor) {
-        return visitor._visit(this, function(){
-            this.condition._walk(visitor);
-            this.body._walk(visitor);
-        });
     }
 }, AST_IterationStatement);
 
 var AST_Do = DEFNODE("Do", null, {
     $documentation: "A `do` statement",
+    _walk: function(visitor) {
+        return visitor._visit(this, function(){
+            this.body._walk(visitor);
+            this.condition._walk(visitor);
+        });
+    }
 }, AST_DWLoop);
 
 var AST_While = DEFNODE("While", null, {
     $documentation: "A `while` statement",
+    _walk: function(visitor) {
+        return visitor._visit(this, function(){
+            this.condition._walk(visitor);
+            this.body._walk(visitor);
+        });
+    }
 }, AST_DWLoop);
 
 var AST_For = DEFNODE("For", "init condition step", {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list