Changeset 13591 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Mar 30, 2006, 5:13:22 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r13339 r13591 133 133 LabelStack ls; 134 134 private: 135 JSValue *evaluate(ExecState */*exec*/) { return jsUndefined(); }135 JSValue *evaluate(ExecState*) { return jsUndefined(); } 136 136 int m_lastLine; 137 137 }; … … 140 140 public: 141 141 NullNode() {} 142 JSValue *evaluate(ExecState *exec);142 JSValue* evaluate(ExecState*); 143 143 virtual void streamTo(SourceStream &s) const; 144 144 }; … … 147 147 public: 148 148 BooleanNode(bool v) : value(v) {} 149 JSValue *evaluate(ExecState *exec);149 JSValue* evaluate(ExecState*); 150 150 virtual void streamTo(SourceStream &s) const; 151 151 private: … … 156 156 public: 157 157 NumberNode(double v) : value(v) {} 158 JSValue *evaluate(ExecState *exec);158 JSValue* evaluate(ExecState*); 159 159 virtual void streamTo(SourceStream &s) const; 160 160 private: … … 165 165 public: 166 166 StringNode(const UString *v) { value = *v; } 167 JSValue *evaluate(ExecState *exec);167 JSValue* evaluate(ExecState*); 168 168 virtual void streamTo(SourceStream &s) const; 169 169 private: … … 175 175 RegExpNode(const UString &p, const UString &f) 176 176 : pattern(p), flags(f) { } 177 JSValue *evaluate(ExecState *exec);177 JSValue* evaluate(ExecState*); 178 178 virtual void streamTo(SourceStream &s) const; 179 179 private: … … 184 184 public: 185 185 ThisNode() {} 186 JSValue *evaluate(ExecState *exec);186 JSValue* evaluate(ExecState*); 187 187 virtual void streamTo(SourceStream &s) const; 188 188 }; … … 191 191 public: 192 192 ResolveNode(const Identifier &s) : ident(s) { } 193 JSValue *evaluate(ExecState *exec);193 JSValue* evaluate(ExecState*); 194 194 virtual void streamTo(SourceStream &s) const; 195 195 … … 205 205 public: 206 206 GroupNode(Node *g) : group(g) { } 207 virtual JSValue *evaluate(ExecState *exec);207 virtual JSValue* evaluate(ExecState*); 208 208 virtual Node *nodeInsideAllParens(); 209 209 virtual void streamTo(SourceStream &s) const; … … 219 219 ElementNode(ElementNode *l, int e, Node *n) 220 220 : next(l->next), elision(e), node(n) { l->next = this; } 221 JSValue *evaluate(ExecState *exec);221 JSValue* evaluate(ExecState*); 222 222 virtual void streamTo(SourceStream &s) const; 223 223 PassRefPtr<ElementNode> releaseNext() { return next.release(); } … … 232 232 class ArrayNode : public Node { 233 233 public: 234 ArrayNode(int e) : el ement(0), elision(e), opt(true) { }234 ArrayNode(int e) : elision(e), opt(true) { } 235 235 ArrayNode(ElementNode *ele) 236 236 : element(ele->next), elision(0), opt(false) { Parser::removeNodeCycle(element.get()); ele->next = 0; } 237 237 ArrayNode(int eli, ElementNode *ele) 238 238 : element(ele->next), elision(eli), opt(true) { Parser::removeNodeCycle(element.get()); ele->next = 0; } 239 JSValue *evaluate(ExecState *exec);239 JSValue* evaluate(ExecState*); 240 240 virtual void streamTo(SourceStream &s) const; 241 241 private: … … 249 249 PropertyNameNode(double d) : numeric(d) { } 250 250 PropertyNameNode(const Identifier &s) : str(s) { } 251 JSValue *evaluate(ExecState *exec);251 JSValue* evaluate(ExecState*); 252 252 virtual void streamTo(SourceStream &s) const; 253 253 private: … … 261 261 PropertyNode(PropertyNameNode *n, Node *a, Type t) 262 262 : name(n), assign(a), type(t) { } 263 JSValue *evaluate(ExecState *exec);263 JSValue* evaluate(ExecState*); 264 264 virtual void streamTo(SourceStream &s) const; 265 265 friend class PropertyListNode; … … 277 277 PropertyListNode(PropertyNode *n, PropertyListNode *l) 278 278 : node(n), next(l->next) { l->next = this; } 279 JSValue *evaluate(ExecState *exec);279 JSValue* evaluate(ExecState*); 280 280 virtual void streamTo(SourceStream &s) const; 281 281 PassRefPtr<PropertyListNode> releaseNext() { return next.release(); } … … 289 289 class ObjectLiteralNode : public Node { 290 290 public: 291 ObjectLiteralNode() : list(0){ }291 ObjectLiteralNode() { } 292 292 ObjectLiteralNode(PropertyListNode *l) : list(l->next) { Parser::removeNodeCycle(list.get()); l->next = 0; } 293 JSValue *evaluate(ExecState *exec);293 JSValue* evaluate(ExecState*); 294 294 virtual void streamTo(SourceStream &s) const; 295 295 private: … … 300 300 public: 301 301 BracketAccessorNode(Node *e1, Node *e2) : expr1(e1), expr2(e2) {} 302 JSValue *evaluate(ExecState *exec);302 JSValue* evaluate(ExecState*); 303 303 virtual void streamTo(SourceStream &s) const; 304 304 … … 316 316 public: 317 317 DotAccessorNode(Node *e, const Identifier &s) : expr(e), ident(s) { } 318 JSValue *evaluate(ExecState *exec);318 JSValue* evaluate(ExecState*); 319 319 virtual void streamTo(SourceStream &s) const; 320 320 … … 335 335 ArgumentListNode(ArgumentListNode *l, Node *e) 336 336 : next(l->next), expr(e) { l->next = this; } 337 JSValue *evaluate(ExecState *exec);338 List evaluateList(ExecState * exec);337 JSValue* evaluate(ExecState*); 338 List evaluateList(ExecState *); 339 339 virtual void streamTo(SourceStream &s) const; 340 340 PassRefPtr<ArgumentListNode> releaseNext() { return next.release(); } … … 348 348 class ArgumentsNode : public Node { 349 349 public: 350 ArgumentsNode() : list(0){ }350 ArgumentsNode() { } 351 351 ArgumentsNode(ArgumentListNode *l) 352 352 : list(l->next) { Parser::removeNodeCycle(list.get()); l->next = 0; } 353 JSValue *evaluate(ExecState *exec);353 JSValue* evaluate(ExecState*); 354 354 List evaluateList(ExecState *exec) { return list ? list->evaluateList(exec) : List(); } 355 355 virtual void streamTo(SourceStream &s) const; … … 360 360 class NewExprNode : public Node { 361 361 public: 362 NewExprNode(Node *e) : expr(e) , args(0){}362 NewExprNode(Node *e) : expr(e) {} 363 363 NewExprNode(Node *e, ArgumentsNode *a) : expr(e), args(a) {} 364 JSValue *evaluate(ExecState *exec);364 JSValue* evaluate(ExecState*); 365 365 virtual void streamTo(SourceStream &s) const; 366 366 private: … … 372 372 public: 373 373 FunctionCallValueNode(Node *e, ArgumentsNode *a) : expr(e), args(a) {} 374 JSValue *evaluate(ExecState *exec);374 JSValue* evaluate(ExecState*); 375 375 virtual void streamTo(SourceStream &s) const; 376 376 private: … … 382 382 public: 383 383 FunctionCallResolveNode(const Identifier& i, ArgumentsNode *a) : ident(i), args(a) {} 384 JSValue *evaluate(ExecState *exec);384 JSValue* evaluate(ExecState*); 385 385 virtual void streamTo(SourceStream &s) const; 386 386 private: … … 392 392 public: 393 393 FunctionCallBracketNode(Node *b, Node *s, ArgumentsNode *a) : base(b), subscript(s), args(a) {} 394 JSValue *evaluate(ExecState *exec);394 JSValue* evaluate(ExecState*); 395 395 virtual void streamTo(SourceStream &s) const; 396 396 protected: … … 409 409 public: 410 410 FunctionCallDotNode(Node *b, const Identifier &i, ArgumentsNode *a) : base(b), ident(i), args(a) {} 411 JSValue *evaluate(ExecState *exec);411 JSValue* evaluate(ExecState*); 412 412 virtual void streamTo(SourceStream &s) const; 413 413 protected: … … 426 426 public: 427 427 PostfixResolveNode(const Identifier& i, Operator o) : m_ident(i), m_oper(o) {} 428 JSValue *evaluate(ExecState *exec);428 JSValue* evaluate(ExecState*); 429 429 virtual void streamTo(SourceStream &s) const; 430 430 private: … … 436 436 public: 437 437 PostfixBracketNode(Node *b, Node *s, Operator o) : m_base(b), m_subscript(s), m_oper(o) {} 438 JSValue *evaluate(ExecState *exec);438 JSValue* evaluate(ExecState*); 439 439 virtual void streamTo(SourceStream &s) const; 440 440 private: … … 447 447 public: 448 448 PostfixDotNode(Node *b, const Identifier& i, Operator o) : m_base(b), m_ident(i), m_oper(o) {} 449 JSValue *evaluate(ExecState *exec);449 JSValue* evaluate(ExecState*); 450 450 virtual void streamTo(SourceStream &s) const; 451 451 private: … … 458 458 public: 459 459 DeleteResolveNode(const Identifier& i) : m_ident(i) {} 460 JSValue *evaluate(ExecState *exec);460 JSValue* evaluate(ExecState*); 461 461 virtual void streamTo(SourceStream &s) const; 462 462 private: … … 467 467 public: 468 468 DeleteBracketNode(Node *base, Node *subscript) : m_base(base), m_subscript(subscript) {} 469 JSValue *evaluate(ExecState *exec);469 JSValue* evaluate(ExecState*); 470 470 virtual void streamTo(SourceStream &s) const; 471 471 private: … … 477 477 public: 478 478 DeleteDotNode(Node *base, const Identifier& i) : m_base(base), m_ident(i) {} 479 JSValue *evaluate(ExecState *exec);479 JSValue* evaluate(ExecState*); 480 480 virtual void streamTo(SourceStream &s) const; 481 481 private: … … 487 487 public: 488 488 DeleteValueNode(Node *e) : m_expr(e) {} 489 JSValue *evaluate(ExecState *exec);489 JSValue* evaluate(ExecState*); 490 490 virtual void streamTo(SourceStream &s) const; 491 491 private: … … 496 496 public: 497 497 VoidNode(Node *e) : expr(e) {} 498 JSValue *evaluate(ExecState *exec);498 JSValue* evaluate(ExecState*); 499 499 virtual void streamTo(SourceStream &s) const; 500 500 private: … … 505 505 public: 506 506 TypeOfResolveNode(const Identifier& i) : m_ident(i) {} 507 JSValue *evaluate(ExecState *exec);507 JSValue* evaluate(ExecState*); 508 508 virtual void streamTo(SourceStream &s) const; 509 509 private: … … 514 514 public: 515 515 TypeOfValueNode(Node *e) : m_expr(e) {} 516 JSValue *evaluate(ExecState *exec);516 JSValue* evaluate(ExecState*); 517 517 virtual void streamTo(SourceStream &s) const; 518 518 private: … … 523 523 public: 524 524 PrefixResolveNode(const Identifier& i, Operator o) : m_ident(i), m_oper(o) {} 525 JSValue *evaluate(ExecState *exec);525 JSValue* evaluate(ExecState*); 526 526 virtual void streamTo(SourceStream &s) const; 527 527 private: … … 533 533 public: 534 534 PrefixBracketNode(Node *b, Node *s, Operator o) : m_base(b), m_subscript(s), m_oper(o) {} 535 JSValue *evaluate(ExecState *exec);535 JSValue* evaluate(ExecState*); 536 536 virtual void streamTo(SourceStream &s) const; 537 537 private: … … 544 544 public: 545 545 PrefixDotNode(Node *b, const Identifier& i, Operator o) : m_base(b), m_ident(i), m_oper(o) {} 546 JSValue *evaluate(ExecState *exec);546 JSValue* evaluate(ExecState*); 547 547 virtual void streamTo(SourceStream &s) const; 548 548 private: … … 555 555 public: 556 556 UnaryPlusNode(Node *e) : expr(e) {} 557 JSValue *evaluate(ExecState *exec);557 JSValue* evaluate(ExecState*); 558 558 virtual void streamTo(SourceStream &s) const; 559 559 private: … … 564 564 public: 565 565 NegateNode(Node *e) : expr(e) {} 566 JSValue *evaluate(ExecState *exec);566 JSValue* evaluate(ExecState*); 567 567 virtual void streamTo(SourceStream &s) const; 568 568 private: … … 573 573 public: 574 574 BitwiseNotNode(Node *e) : expr(e) {} 575 JSValue *evaluate(ExecState *exec);575 JSValue* evaluate(ExecState*); 576 576 virtual void streamTo(SourceStream &s) const; 577 577 private: … … 582 582 public: 583 583 LogicalNotNode(Node *e) : expr(e) {} 584 JSValue *evaluate(ExecState *exec);584 JSValue* evaluate(ExecState*); 585 585 virtual void streamTo(SourceStream &s) const; 586 586 private: … … 591 591 public: 592 592 MultNode(Node *t1, Node *t2, char op) : term1(t1), term2(t2), oper(op) {} 593 JSValue *evaluate(ExecState *exec);593 JSValue* evaluate(ExecState*); 594 594 virtual void streamTo(SourceStream &s) const; 595 595 private: … … 602 602 public: 603 603 AddNode(Node *t1, Node *t2, char op) : term1(t1), term2(t2), oper(op) {} 604 JSValue *evaluate(ExecState *exec);604 JSValue* evaluate(ExecState*); 605 605 virtual void streamTo(SourceStream &s) const; 606 606 private: … … 614 614 ShiftNode(Node *t1, Operator o, Node *t2) 615 615 : term1(t1), term2(t2), oper(o) {} 616 JSValue *evaluate(ExecState *exec);616 JSValue* evaluate(ExecState*); 617 617 virtual void streamTo(SourceStream &s) const; 618 618 private: … … 626 626 RelationalNode(Node *e1, Operator o, Node *e2) : 627 627 expr1(e1), expr2(e2), oper(o) {} 628 JSValue *evaluate(ExecState *exec);628 JSValue* evaluate(ExecState*); 629 629 virtual void streamTo(SourceStream &s) const; 630 630 private: … … 638 638 EqualNode(Node *e1, Operator o, Node *e2) 639 639 : expr1(e1), expr2(e2), oper(o) {} 640 JSValue *evaluate(ExecState *exec);640 JSValue* evaluate(ExecState*); 641 641 virtual void streamTo(SourceStream &s) const; 642 642 private: … … 650 650 BitOperNode(Node *e1, Operator o, Node *e2) : 651 651 expr1(e1), expr2(e2), oper(o) {} 652 JSValue *evaluate(ExecState *exec);652 JSValue* evaluate(ExecState*); 653 653 virtual void streamTo(SourceStream &s) const; 654 654 private: … … 665 665 BinaryLogicalNode(Node *e1, Operator o, Node *e2) : 666 666 expr1(e1), expr2(e2), oper(o) {} 667 JSValue *evaluate(ExecState *exec);667 JSValue* evaluate(ExecState*); 668 668 virtual void streamTo(SourceStream &s) const; 669 669 private: … … 680 680 ConditionalNode(Node *l, Node *e1, Node *e2) : 681 681 logical(l), expr1(e1), expr2(e2) {} 682 JSValue *evaluate(ExecState *exec);682 JSValue* evaluate(ExecState*); 683 683 virtual void streamTo(SourceStream &s) const; 684 684 private: … … 692 692 AssignResolveNode(const Identifier &ident, Operator oper, Node *right) 693 693 : m_ident(ident), m_oper(oper), m_right(right) {} 694 JSValue *evaluate(ExecState *exec);694 JSValue* evaluate(ExecState*); 695 695 virtual void streamTo(SourceStream &s) const; 696 696 protected: … … 704 704 AssignBracketNode(Node *base, Node *subscript, Operator oper, Node *right) 705 705 : m_base(base), m_subscript(subscript), m_oper(oper), m_right(right) {} 706 JSValue *evaluate(ExecState *exec);706 JSValue* evaluate(ExecState*); 707 707 virtual void streamTo(SourceStream &s) const; 708 708 protected: … … 717 717 AssignDotNode(Node *base, const Identifier& ident, Operator oper, Node *right) 718 718 : m_base(base), m_ident(ident), m_oper(oper), m_right(right) {} 719 JSValue *evaluate(ExecState *exec);719 JSValue* evaluate(ExecState*); 720 720 virtual void streamTo(SourceStream &s) const; 721 721 protected: … … 729 729 public: 730 730 CommaNode(Node *e1, Node *e2) : expr1(e1), expr2(e2) {} 731 JSValue *evaluate(ExecState *exec);731 JSValue* evaluate(ExecState*); 732 732 virtual void streamTo(SourceStream &s) const; 733 733 private: … … 755 755 public: 756 756 AssignExprNode(Node *e) : expr(e) {} 757 JSValue *evaluate(ExecState *exec);757 JSValue* evaluate(ExecState*); 758 758 virtual void streamTo(SourceStream &s) const; 759 759 private: … … 765 765 enum Type { Variable, Constant }; 766 766 VarDeclNode(const Identifier &id, AssignExprNode *in, Type t); 767 JSValue *evaluate(ExecState *exec);767 JSValue* evaluate(ExecState*); 768 768 virtual void processVarDecls(ExecState *exec); 769 769 virtual void streamTo(SourceStream &s) const; … … 780 780 VarDeclListNode(VarDeclListNode *l, VarDeclNode *v) 781 781 : next(l->next), var(v) { l->next = this; } 782 JSValue *evaluate(ExecState *exec);782 JSValue* evaluate(ExecState*); 783 783 virtual void processVarDecls(ExecState *exec); 784 784 virtual void streamTo(SourceStream &s) const; … … 937 937 class CaseClauseNode : public Node { 938 938 public: 939 CaseClauseNode(Node *e) : expr(e) , next(0){ }939 CaseClauseNode(Node *e) : expr(e) { } 940 940 CaseClauseNode(Node *e, StatListNode *l) 941 941 : expr(e), next(l->next) { Parser::removeNodeCycle(next.get()); l->next = 0; } 942 JSValue *evaluate(ExecState *exec);942 JSValue* evaluate(ExecState*); 943 943 Completion evalStatements(ExecState *exec); 944 944 virtual void processVarDecls(ExecState *exec); … … 955 955 ClauseListNode(ClauseListNode *n, CaseClauseNode *c) 956 956 : clause(c), next(n->next) { n->next = this; } 957 JSValue *evaluate(ExecState *exec);957 JSValue* evaluate(ExecState*); 958 958 CaseClauseNode *getClause() const { return clause.get(); } 959 959 ClauseListNode *getNext() const { return next.get(); } … … 971 971 public: 972 972 CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d, ClauseListNode *l2); 973 JSValue *evaluate(ExecState *exec);973 JSValue* evaluate(ExecState*); 974 974 Completion evalBlock(ExecState *exec, JSValue *input); 975 975 virtual void processVarDecls(ExecState *exec); … … 1032 1032 ParameterNode(ParameterNode *next, const Identifier &i) 1033 1033 : id(i), next(next->next) { next->next = this; } 1034 JSValue *evaluate(ExecState *exec);1034 JSValue* evaluate(ExecState*); 1035 1035 Identifier ident() { return id; } 1036 1036 ParameterNode *nextParam() { return next.get(); } … … 1074 1074 public: 1075 1075 FuncDeclNode(const Identifier &i, FunctionBodyNode *b) 1076 : ident(i), param(0),body(b) { }1076 : ident(i), body(b) { } 1077 1077 FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b) 1078 1078 : ident(i), param(p->next), body(b) { Parser::removeNodeCycle(param.get()); p->next = 0; }
Note:
See TracChangeset
for help on using the changeset viewer.