Node::reverse*() cleanup
porten at froglogic.com
porten at froglogic.com
Thu Oct 30 01:03:19 CET 2003
On Tue, 28 Oct 2003, Maciej Stachowiak wrote:
> > I run several tests but I can't exclude problems with e.g. lacking null
> > pointer checks. Review carefully. Linked list madness.
>
> Thanks a lot. I'll read over it later this evening.
In case you haven't found the bug I had left in I'll hereby attach a patch
by David that fixes a case that I had overseen.
Harri.
-------------- next part --------------
Index: grammar.y
===================================================================
RCS file: /home/kde/kdelibs/kjs/grammar.y,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -p -r1.54 -r1.55
--- grammar.y 29 Oct 2003 00:46:40 -0000 1.54
+++ grammar.y 29 Oct 2003 14:15:03 -0000 1.55
@@ -600,7 +600,7 @@ FunctionDeclarationInternal:
;
FunctionExpr:
- FUNCTION '(' ')' FunctionBody { $$ = new FuncExprNode(0L, $4); }
+ FUNCTION '(' ')' FunctionBody { $$ = new FuncExprNode($4); }
| FUNCTION '(' FormalParameterList ')' FunctionBody
{ $$ = new FuncExprNode($3, $5); }
Index: nodes.h
===================================================================
RCS file: /home/kde/kdelibs/kjs/nodes.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -3 -p -r1.83 -r1.84
--- nodes.h 29 Oct 2003 00:50:45 -0000 1.83
+++ nodes.h 29 Oct 2003 14:15:03 -0000 1.84
@@ -1039,8 +1039,10 @@ namespace KJS {
class FuncExprNode : public Node {
public:
+ FuncExprNode(FunctionBodyNode *b)
+ : param(0), body(b) { }
FuncExprNode(ParameterNode *p, FunctionBodyNode *b)
- : param(p->next), body(b) { p->next = 0; }
+ : param(p->next), body(b) { p->next = 0; }
virtual void ref();
virtual bool deref();
virtual Value evaluate(ExecState *exec) const;
More information about the Khtml-devel
mailing list