[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:03:02 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 21d9041b7d37975c192847b2694bfae4a9a1ec5c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 18 21:13:32 2003 +0000
Reviewed by Dave.
- fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
* kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
first parameter is a variable declaration list. Call reverseList as we do in other constructors
that take lists that are built backwards.
* kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index c646887..fd3fdb9 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2003-10-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
+
+ * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
+ first parameter is a variable declaration list. Call reverseList as we do in other constructors
+ that take lists that are built backwards.
+ * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
+
=== Safari-110 ===
=== Safari-109 ===
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index c646887..fd3fdb9 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-10-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
+
+ * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
+ first parameter is a variable declaration list. Call reverseList as we do in other constructors
+ that take lists that are built backwards.
+ * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
+
=== Safari-110 ===
=== Safari-109 ===
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index 7760dad..9189599 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -1987,6 +1987,18 @@ void WhileNode::processVarDecls(ExecState *exec)
// ------------------------------ ForNode --------------------------------------
+VarDeclListNode *ForNode::reverseList(VarDeclListNode *list)
+{
+ VarDeclListNode *head = 0;
+ VarDeclListNode *next;
+ for (VarDeclListNode *n = list; n; n = next) {
+ next = n->list;
+ n->list = head;
+ head = n;
+ }
+ return head;
+}
+
void ForNode::ref()
{
Node::ref();
diff --git a/JavaScriptCore/kjs/nodes.h b/JavaScriptCore/kjs/nodes.h
index fd7255f..6b3dee1 100644
--- a/JavaScriptCore/kjs/nodes.h
+++ b/JavaScriptCore/kjs/nodes.h
@@ -639,6 +639,7 @@ namespace KJS {
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
+ friend class ForNode;
friend class VarStatementNode;
VarDeclListNode *list;
VarDeclNode *var;
@@ -732,12 +733,15 @@ namespace KJS {
public:
ForNode(Node *e1, Node *e2, Node *e3, StatementNode *s) :
expr1(e1), expr2(e2), expr3(e3), statement(s) {}
+ ForNode(VarDeclListNode *e1, Node *e2, Node *e3, StatementNode *s) :
+ expr1(reverseList(e1)), expr2(e2), expr3(e3), statement(s) {}
virtual void ref();
virtual bool deref();
virtual Completion execute(ExecState *exec);
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
+ static VarDeclListNode *reverseList(VarDeclListNode *);
Node *expr1, *expr2, *expr3;
StatementNode *statement;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list