Changeset 98887 in webkit for trunk/Source/JavaScriptCore/parser/Nodes.h
- Timestamp:
- Oct 31, 2011, 3:13:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Nodes.h
r90371 r98887 116 116 }; 117 117 118 template <typename T> 119 struct ParserArenaData : ParserArenaDeletable { 120 T data; 121 }; 122 118 123 class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> { 119 124 protected: … … 129 134 class Node : public ParserArenaFreeable { 130 135 protected: 131 Node( JSGlobalData*);136 Node(int); 132 137 133 138 public: … … 136 141 virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* destination = 0) = 0; 137 142 138 int lineNo() const { return m_line ; }143 int lineNo() const { return m_lineNumber; } 139 144 140 145 protected: 141 int m_line ;146 int m_lineNumber; 142 147 }; 143 148 144 149 class ExpressionNode : public Node { 145 150 protected: 146 ExpressionNode( JSGlobalData*, ResultType = ResultType::unknownType());151 ExpressionNode(int, ResultType = ResultType::unknownType()); 147 152 148 153 public: … … 174 179 class StatementNode : public Node { 175 180 protected: 176 StatementNode( JSGlobalData*);181 StatementNode(int); 177 182 178 183 public: … … 193 198 class NullNode : public ExpressionNode { 194 199 public: 195 NullNode( JSGlobalData*);200 NullNode(int); 196 201 197 202 private: … … 203 208 class BooleanNode : public ExpressionNode { 204 209 public: 205 BooleanNode( JSGlobalData*, bool value);210 BooleanNode(int, bool value); 206 211 207 212 private: … … 215 220 class NumberNode : public ExpressionNode { 216 221 public: 217 NumberNode( JSGlobalData*, double value);222 NumberNode(int, double value); 218 223 219 224 double value() const { return m_value; } … … 231 236 class StringNode : public ExpressionNode { 232 237 public: 233 StringNode( JSGlobalData*, const Identifier&);238 StringNode(int, const Identifier&); 234 239 235 240 const Identifier& value() { return m_value; } … … 341 346 class RegExpNode : public ExpressionNode, public ThrowableExpressionData { 342 347 public: 343 RegExpNode( JSGlobalData*, const Identifier& pattern, const Identifier& flags);348 RegExpNode(int, const Identifier& pattern, const Identifier& flags); 344 349 345 350 private: … … 352 357 class ThisNode : public ExpressionNode { 353 358 public: 354 ThisNode( JSGlobalData*);359 ThisNode(int); 355 360 356 361 private: … … 360 365 class ResolveNode : public ExpressionNode { 361 366 public: 362 ResolveNode( JSGlobalData*, const Identifier&, int startOffset);367 ResolveNode(int, const Identifier&, int startOffset); 363 368 364 369 const Identifier& identifier() const { return m_ident; } … … 377 382 class ElementNode : public ParserArenaFreeable { 378 383 public: 379 ElementNode( JSGlobalData*,int elision, ExpressionNode*);380 ElementNode( JSGlobalData*,ElementNode*, int elision, ExpressionNode*);384 ElementNode(int elision, ExpressionNode*); 385 ElementNode(ElementNode*, int elision, ExpressionNode*); 381 386 382 387 int elision() const { return m_elision; } … … 392 397 class ArrayNode : public ExpressionNode { 393 398 public: 394 ArrayNode( JSGlobalData*, int elision);395 ArrayNode( JSGlobalData*, ElementNode*);396 ArrayNode( JSGlobalData*, int elision, ElementNode*);397 398 ArgumentListNode* toArgumentList(JSGlobalData* ) const;399 ArrayNode(int, int elision); 400 ArrayNode(int, ElementNode*); 401 ArrayNode(int, int elision, ElementNode*); 402 403 ArgumentListNode* toArgumentList(JSGlobalData*, int) const; 399 404 400 405 private: … … 412 417 enum Type { Constant = 1, Getter = 2, Setter = 4 }; 413 418 414 PropertyNode(JSGlobalData*, const Identifier& name, ExpressionNode* value, Type);415 PropertyNode(JSGlobalData*, double name, ExpressionNode* value, Type);419 PropertyNode(JSGlobalData*, const Identifier&, ExpressionNode*, Type); 420 PropertyNode(JSGlobalData*, double, ExpressionNode*, Type); 416 421 417 422 const Identifier& name() const { return m_name; } … … 427 432 class PropertyListNode : public Node { 428 433 public: 429 PropertyListNode( JSGlobalData*, PropertyNode*);430 PropertyListNode( JSGlobalData*, PropertyNode*, PropertyListNode*);434 PropertyListNode(int, PropertyNode*); 435 PropertyListNode(int, PropertyNode*, PropertyListNode*); 431 436 432 437 virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0); … … 439 444 class ObjectLiteralNode : public ExpressionNode { 440 445 public: 441 ObjectLiteralNode( JSGlobalData*);442 ObjectLiteralNode( JSGlobalData*, PropertyListNode*);446 ObjectLiteralNode(int); 447 ObjectLiteralNode(int, PropertyListNode*); 443 448 444 449 private: … … 450 455 class BracketAccessorNode : public ExpressionNode, public ThrowableExpressionData { 451 456 public: 452 BracketAccessorNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, bool subscriptHasAssignments);457 BracketAccessorNode(int, ExpressionNode* base, ExpressionNode* subscript, bool subscriptHasAssignments); 453 458 454 459 ExpressionNode* base() const { return m_base; } … … 468 473 class DotAccessorNode : public ExpressionNode, public ThrowableExpressionData { 469 474 public: 470 DotAccessorNode( JSGlobalData*, ExpressionNode* base, const Identifier&);475 DotAccessorNode(int, ExpressionNode* base, const Identifier&); 471 476 472 477 ExpressionNode* base() const { return m_base; } … … 485 490 class ArgumentListNode : public Node { 486 491 public: 487 ArgumentListNode( JSGlobalData*, ExpressionNode*);488 ArgumentListNode( JSGlobalData*, ArgumentListNode*, ExpressionNode*);492 ArgumentListNode(int, ExpressionNode*); 493 ArgumentListNode(int, ArgumentListNode*, ExpressionNode*); 489 494 490 495 ArgumentListNode* m_next; … … 497 502 class ArgumentsNode : public ParserArenaFreeable { 498 503 public: 499 ArgumentsNode( JSGlobalData*);500 ArgumentsNode( JSGlobalData*,ArgumentListNode*);504 ArgumentsNode(); 505 ArgumentsNode(ArgumentListNode*); 501 506 502 507 ArgumentListNode* m_listNode; … … 505 510 class NewExprNode : public ExpressionNode, public ThrowableExpressionData { 506 511 public: 507 NewExprNode( JSGlobalData*, ExpressionNode*);508 NewExprNode( JSGlobalData*, ExpressionNode*, ArgumentsNode*);512 NewExprNode(int, ExpressionNode*); 513 NewExprNode(int, ExpressionNode*, ArgumentsNode*); 509 514 510 515 private: … … 517 522 class EvalFunctionCallNode : public ExpressionNode, public ThrowableExpressionData { 518 523 public: 519 EvalFunctionCallNode( JSGlobalData*, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);524 EvalFunctionCallNode(int, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 520 525 521 526 private: … … 527 532 class FunctionCallValueNode : public ExpressionNode, public ThrowableExpressionData { 528 533 public: 529 FunctionCallValueNode( JSGlobalData*, ExpressionNode*, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);534 FunctionCallValueNode(int, ExpressionNode*, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 530 535 531 536 private: … … 538 543 class FunctionCallResolveNode : public ExpressionNode, public ThrowableExpressionData { 539 544 public: 540 FunctionCallResolveNode( JSGlobalData*, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);545 FunctionCallResolveNode(int, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 541 546 542 547 private: … … 551 556 class FunctionCallBracketNode : public ExpressionNode, public ThrowableSubExpressionData { 552 557 public: 553 FunctionCallBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);558 FunctionCallBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 554 559 555 560 private: … … 563 568 class FunctionCallDotNode : public ExpressionNode, public ThrowableSubExpressionData { 564 569 public: 565 FunctionCallDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);570 FunctionCallDotNode(int, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 566 571 567 572 private: … … 576 581 class CallFunctionCallDotNode : public FunctionCallDotNode { 577 582 public: 578 CallFunctionCallDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);583 CallFunctionCallDotNode(int, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 579 584 580 585 private: … … 584 589 class ApplyFunctionCallDotNode : public FunctionCallDotNode { 585 590 public: 586 ApplyFunctionCallDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset);591 ApplyFunctionCallDotNode(int, ExpressionNode* base, const Identifier&, ArgumentsNode*, unsigned divot, unsigned startOffset, unsigned endOffset); 587 592 588 593 private: … … 592 597 class PrePostResolveNode : public ExpressionNode, public ThrowableExpressionData { 593 598 public: 594 PrePostResolveNode( JSGlobalData*, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset);599 PrePostResolveNode(int, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset); 595 600 596 601 protected: … … 600 605 class PostfixResolveNode : public PrePostResolveNode { 601 606 public: 602 PostfixResolveNode( JSGlobalData*, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);607 PostfixResolveNode(int, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 603 608 604 609 private: … … 610 615 class PostfixBracketNode : public ExpressionNode, public ThrowableSubExpressionData { 611 616 public: 612 PostfixBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);617 PostfixBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 613 618 614 619 private: … … 622 627 class PostfixDotNode : public ExpressionNode, public ThrowableSubExpressionData { 623 628 public: 624 PostfixDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);629 PostfixDotNode(int, ExpressionNode* base, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 625 630 626 631 private: … … 634 639 class PostfixErrorNode : public ExpressionNode, public ThrowableSubExpressionData { 635 640 public: 636 PostfixErrorNode( JSGlobalData*, ExpressionNode*, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);641 PostfixErrorNode(int, ExpressionNode*, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 637 642 638 643 private: … … 645 650 class DeleteResolveNode : public ExpressionNode, public ThrowableExpressionData { 646 651 public: 647 DeleteResolveNode( JSGlobalData*, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset);652 DeleteResolveNode(int, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset); 648 653 649 654 private: … … 655 660 class DeleteBracketNode : public ExpressionNode, public ThrowableExpressionData { 656 661 public: 657 DeleteBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, unsigned divot, unsigned startOffset, unsigned endOffset);662 DeleteBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, unsigned divot, unsigned startOffset, unsigned endOffset); 658 663 659 664 private: … … 666 671 class DeleteDotNode : public ExpressionNode, public ThrowableExpressionData { 667 672 public: 668 DeleteDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset);673 DeleteDotNode(int, ExpressionNode* base, const Identifier&, unsigned divot, unsigned startOffset, unsigned endOffset); 669 674 670 675 private: … … 677 682 class DeleteValueNode : public ExpressionNode { 678 683 public: 679 DeleteValueNode( JSGlobalData*, ExpressionNode*);684 DeleteValueNode(int, ExpressionNode*); 680 685 681 686 private: … … 687 692 class VoidNode : public ExpressionNode { 688 693 public: 689 VoidNode( JSGlobalData*, ExpressionNode*);694 VoidNode(int, ExpressionNode*); 690 695 691 696 private: … … 697 702 class TypeOfResolveNode : public ExpressionNode { 698 703 public: 699 TypeOfResolveNode( JSGlobalData*, const Identifier&);704 TypeOfResolveNode(int, const Identifier&); 700 705 701 706 const Identifier& identifier() const { return m_ident; } … … 709 714 class TypeOfValueNode : public ExpressionNode { 710 715 public: 711 TypeOfValueNode( JSGlobalData*, ExpressionNode*);716 TypeOfValueNode(int, ExpressionNode*); 712 717 713 718 private: … … 719 724 class PrefixResolveNode : public PrePostResolveNode { 720 725 public: 721 PrefixResolveNode( JSGlobalData*, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);726 PrefixResolveNode(int, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 722 727 723 728 private: … … 729 734 class PrefixBracketNode : public ExpressionNode, public ThrowablePrefixedSubExpressionData { 730 735 public: 731 PrefixBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);736 PrefixBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 732 737 733 738 private: … … 741 746 class PrefixDotNode : public ExpressionNode, public ThrowablePrefixedSubExpressionData { 742 747 public: 743 PrefixDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);748 PrefixDotNode(int, ExpressionNode* base, const Identifier&, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 744 749 745 750 private: … … 753 758 class PrefixErrorNode : public ExpressionNode, public ThrowableExpressionData { 754 759 public: 755 PrefixErrorNode( JSGlobalData*, ExpressionNode*, Operator, unsigned divot, unsigned startOffset, unsigned endOffset);760 PrefixErrorNode(int, ExpressionNode*, Operator, unsigned divot, unsigned startOffset, unsigned endOffset); 756 761 757 762 private: … … 764 769 class UnaryOpNode : public ExpressionNode { 765 770 public: 766 UnaryOpNode( JSGlobalData*, ResultType, ExpressionNode*, OpcodeID);771 UnaryOpNode(int, ResultType, ExpressionNode*, OpcodeID); 767 772 768 773 protected: … … 781 786 class UnaryPlusNode : public UnaryOpNode { 782 787 public: 783 UnaryPlusNode( JSGlobalData*, ExpressionNode*);788 UnaryPlusNode(int, ExpressionNode*); 784 789 785 790 private: … … 789 794 class NegateNode : public UnaryOpNode { 790 795 public: 791 NegateNode( JSGlobalData*, ExpressionNode*);796 NegateNode(int, ExpressionNode*); 792 797 }; 793 798 794 799 class BitwiseNotNode : public UnaryOpNode { 795 800 public: 796 BitwiseNotNode( JSGlobalData*, ExpressionNode*);801 BitwiseNotNode(int, ExpressionNode*); 797 802 }; 798 803 799 804 class LogicalNotNode : public UnaryOpNode { 800 805 public: 801 LogicalNotNode( JSGlobalData*, ExpressionNode*);806 LogicalNotNode(int, ExpressionNode*); 802 807 private: 803 808 void emitBytecodeInConditionContext(BytecodeGenerator&, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue); … … 807 812 class BinaryOpNode : public ExpressionNode { 808 813 public: 809 BinaryOpNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);810 BinaryOpNode( JSGlobalData*, ResultType, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);814 BinaryOpNode(int, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments); 815 BinaryOpNode(int, ResultType, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments); 811 816 812 817 RegisterID* emitStrcat(BytecodeGenerator& generator, RegisterID* destination, RegisterID* lhs = 0, ReadModifyResolveNode* emitExpressionInfoForMe = 0); … … 832 837 class MultNode : public BinaryOpNode { 833 838 public: 834 MultNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);839 MultNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 835 840 }; 836 841 837 842 class DivNode : public BinaryOpNode { 838 843 public: 839 DivNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);844 DivNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 840 845 }; 841 846 842 847 class ModNode : public BinaryOpNode { 843 848 public: 844 ModNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);849 ModNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 845 850 }; 846 851 847 852 class AddNode : public BinaryOpNode { 848 853 public: 849 AddNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);854 AddNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 850 855 851 856 virtual bool isAdd() const { return true; } … … 854 859 class SubNode : public BinaryOpNode { 855 860 public: 856 SubNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);861 SubNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 857 862 858 863 virtual bool isSubtract() const { return true; } … … 861 866 class LeftShiftNode : public BinaryOpNode { 862 867 public: 863 LeftShiftNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);868 LeftShiftNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 864 869 }; 865 870 866 871 class RightShiftNode : public BinaryOpNode { 867 872 public: 868 RightShiftNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);873 RightShiftNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 869 874 }; 870 875 871 876 class UnsignedRightShiftNode : public BinaryOpNode { 872 877 public: 873 UnsignedRightShiftNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);878 UnsignedRightShiftNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 874 879 }; 875 880 876 881 class LessNode : public BinaryOpNode { 877 882 public: 878 LessNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);883 LessNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 879 884 }; 880 885 881 886 class GreaterNode : public BinaryOpNode { 882 887 public: 883 GreaterNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);888 GreaterNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 884 889 }; 885 890 886 891 class LessEqNode : public BinaryOpNode { 887 892 public: 888 LessEqNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);893 LessEqNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 889 894 }; 890 895 891 896 class GreaterEqNode : public BinaryOpNode { 892 897 public: 893 GreaterEqNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);898 GreaterEqNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 894 899 }; 895 900 896 901 class ThrowableBinaryOpNode : public BinaryOpNode, public ThrowableExpressionData { 897 902 public: 898 ThrowableBinaryOpNode( JSGlobalData*, ResultType, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);899 ThrowableBinaryOpNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments);903 ThrowableBinaryOpNode(int, ResultType, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments); 904 ThrowableBinaryOpNode(int, ExpressionNode* expr1, ExpressionNode* expr2, OpcodeID, bool rightHasAssignments); 900 905 901 906 private: … … 905 910 class InstanceOfNode : public ThrowableBinaryOpNode { 906 911 public: 907 InstanceOfNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);912 InstanceOfNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 908 913 909 914 private: … … 913 918 class InNode : public ThrowableBinaryOpNode { 914 919 public: 915 InNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);920 InNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 916 921 }; 917 922 918 923 class EqualNode : public BinaryOpNode { 919 924 public: 920 EqualNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);925 EqualNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 921 926 922 927 private: … … 926 931 class NotEqualNode : public BinaryOpNode { 927 932 public: 928 NotEqualNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);933 NotEqualNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 929 934 }; 930 935 931 936 class StrictEqualNode : public BinaryOpNode { 932 937 public: 933 StrictEqualNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);938 StrictEqualNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 934 939 935 940 private: … … 939 944 class NotStrictEqualNode : public BinaryOpNode { 940 945 public: 941 NotStrictEqualNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);946 NotStrictEqualNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 942 947 }; 943 948 944 949 class BitAndNode : public BinaryOpNode { 945 950 public: 946 BitAndNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);951 BitAndNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 947 952 }; 948 953 949 954 class BitOrNode : public BinaryOpNode { 950 955 public: 951 BitOrNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);956 BitOrNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 952 957 }; 953 958 954 959 class BitXOrNode : public BinaryOpNode { 955 960 public: 956 BitXOrNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);961 BitXOrNode(int, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments); 957 962 }; 958 963 … … 960 965 class LogicalOpNode : public ExpressionNode { 961 966 public: 962 LogicalOpNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, LogicalOperator);967 LogicalOpNode(int, ExpressionNode* expr1, ExpressionNode* expr2, LogicalOperator); 963 968 964 969 private: … … 975 980 class ConditionalNode : public ExpressionNode { 976 981 public: 977 ConditionalNode( JSGlobalData*, ExpressionNode* logical, ExpressionNode* expr1, ExpressionNode* expr2);982 ConditionalNode(int, ExpressionNode* logical, ExpressionNode* expr1, ExpressionNode* expr2); 978 983 979 984 private: … … 987 992 class ReadModifyResolveNode : public ExpressionNode, public ThrowableExpressionData { 988 993 public: 989 ReadModifyResolveNode( JSGlobalData*, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset);994 ReadModifyResolveNode(int, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset); 990 995 991 996 private: … … 1001 1006 class AssignResolveNode : public ExpressionNode, public ThrowableExpressionData { 1002 1007 public: 1003 AssignResolveNode( JSGlobalData*, const Identifier&, ExpressionNode* right, bool rightHasAssignments);1008 AssignResolveNode(int, const Identifier&, ExpressionNode* right, bool rightHasAssignments); 1004 1009 1005 1010 private: … … 1014 1019 class ReadModifyBracketNode : public ExpressionNode, public ThrowableSubExpressionData { 1015 1020 public: 1016 ReadModifyBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, Operator, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset);1021 ReadModifyBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, Operator, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset); 1017 1022 1018 1023 private: … … 1029 1034 class AssignBracketNode : public ExpressionNode, public ThrowableExpressionData { 1030 1035 public: 1031 AssignBracketNode( JSGlobalData*, ExpressionNode* base, ExpressionNode* subscript, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset);1036 AssignBracketNode(int, ExpressionNode* base, ExpressionNode* subscript, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset); 1032 1037 1033 1038 private: … … 1043 1048 class AssignDotNode : public ExpressionNode, public ThrowableExpressionData { 1044 1049 public: 1045 AssignDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset);1050 AssignDotNode(int, ExpressionNode* base, const Identifier&, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset); 1046 1051 1047 1052 private: … … 1056 1061 class ReadModifyDotNode : public ExpressionNode, public ThrowableSubExpressionData { 1057 1062 public: 1058 ReadModifyDotNode( JSGlobalData*, ExpressionNode* base, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset);1063 ReadModifyDotNode(int, ExpressionNode* base, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, unsigned divot, unsigned startOffset, unsigned endOffset); 1059 1064 1060 1065 private: … … 1070 1075 class AssignErrorNode : public ExpressionNode, public ThrowableExpressionData { 1071 1076 public: 1072 AssignErrorNode( JSGlobalData*, ExpressionNode* left, Operator, ExpressionNode* right, unsigned divot, unsigned startOffset, unsigned endOffset);1077 AssignErrorNode(int, ExpressionNode* left, Operator, ExpressionNode* right, unsigned divot, unsigned startOffset, unsigned endOffset); 1073 1078 1074 1079 private: … … 1084 1089 class CommaNode : public ExpressionNode, public ParserArenaDeletable { 1085 1090 public: 1086 CommaNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2);1091 CommaNode(int, ExpressionNode* expr1, ExpressionNode* expr2); 1087 1092 1088 1093 using ParserArenaDeletable::operator new; … … 1099 1104 class ConstDeclNode : public ExpressionNode { 1100 1105 public: 1101 ConstDeclNode( JSGlobalData*, const Identifier&, ExpressionNode*);1106 ConstDeclNode(int, const Identifier&, ExpressionNode*); 1102 1107 1103 1108 bool hasInitializer() const { return m_init; } … … 1119 1124 class ConstStatementNode : public StatementNode { 1120 1125 public: 1121 ConstStatementNode( JSGlobalData*, ConstDeclNode* next);1126 ConstStatementNode(int, ConstDeclNode* next); 1122 1127 1123 1128 private: … … 1129 1134 class SourceElements : public ParserArenaDeletable { 1130 1135 public: 1131 SourceElements( JSGlobalData*);1136 SourceElements(); 1132 1137 1133 1138 void append(StatementNode*); … … 1144 1149 class BlockNode : public StatementNode { 1145 1150 public: 1146 BlockNode( JSGlobalData*, SourceElements* = 0);1151 BlockNode(int, SourceElements* = 0); 1147 1152 1148 1153 StatementNode* singleStatement() const; … … 1159 1164 class EmptyStatementNode : public StatementNode { 1160 1165 public: 1161 EmptyStatementNode( JSGlobalData*);1166 EmptyStatementNode(int); 1162 1167 1163 1168 private: … … 1169 1174 class DebuggerStatementNode : public StatementNode { 1170 1175 public: 1171 DebuggerStatementNode( JSGlobalData*);1176 DebuggerStatementNode(int); 1172 1177 1173 1178 private: … … 1177 1182 class ExprStatementNode : public StatementNode { 1178 1183 public: 1179 ExprStatementNode( JSGlobalData*, ExpressionNode*);1184 ExprStatementNode(int, ExpressionNode*); 1180 1185 1181 1186 ExpressionNode* expr() const { return m_expr; } … … 1191 1196 class VarStatementNode : public StatementNode { 1192 1197 public: 1193 VarStatementNode( JSGlobalData*, ExpressionNode*);1198 VarStatementNode(int, ExpressionNode*); 1194 1199 1195 1200 private: … … 1201 1206 class IfNode : public StatementNode { 1202 1207 public: 1203 IfNode( JSGlobalData*, ExpressionNode* condition, StatementNode* ifBlock);1208 IfNode(int, ExpressionNode* condition, StatementNode* ifBlock); 1204 1209 1205 1210 protected: … … 1212 1217 class IfElseNode : public IfNode { 1213 1218 public: 1214 IfElseNode( JSGlobalData*, ExpressionNode* condition, StatementNode* ifBlock, StatementNode* elseBlock);1219 IfElseNode(int, ExpressionNode* condition, StatementNode* ifBlock, StatementNode* elseBlock); 1215 1220 1216 1221 private: … … 1222 1227 class DoWhileNode : public StatementNode { 1223 1228 public: 1224 DoWhileNode( JSGlobalData*, StatementNode* statement, ExpressionNode*);1229 DoWhileNode(int, StatementNode*, ExpressionNode*); 1225 1230 1226 1231 private: … … 1233 1238 class WhileNode : public StatementNode { 1234 1239 public: 1235 WhileNode( JSGlobalData*, ExpressionNode*, StatementNode* statement);1240 WhileNode(int, ExpressionNode*, StatementNode*); 1236 1241 1237 1242 private: … … 1244 1249 class ForNode : public StatementNode { 1245 1250 public: 1246 ForNode( JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode* statement, bool expr1WasVarDecl);1251 ForNode(int, ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode*, bool expr1WasVarDecl); 1247 1252 1248 1253 private: … … 1258 1263 class ForInNode : public StatementNode, public ThrowableExpressionData { 1259 1264 public: 1260 ForInNode(JSGlobalData*, ExpressionNode*, ExpressionNode*, StatementNode*);1261 ForInNode(JSGlobalData*, const Identifier&, ExpressionNode*, ExpressionNode*, StatementNode*, int divot, int startOffset, int endOffset);1265 ForInNode(JSGlobalData*, int, ExpressionNode*, ExpressionNode*, StatementNode*); 1266 ForInNode(JSGlobalData*, int, const Identifier&, ExpressionNode*, ExpressionNode*, StatementNode*, int divot, int startOffset, int endOffset); 1262 1267 1263 1268 private: … … 1274 1279 class ContinueNode : public StatementNode, public ThrowableExpressionData { 1275 1280 public: 1276 ContinueNode(JSGlobalData* );1277 ContinueNode( JSGlobalData*, const Identifier&);1281 ContinueNode(JSGlobalData*, int); 1282 ContinueNode(int, const Identifier&); 1278 1283 1279 1284 private: … … 1285 1290 class BreakNode : public StatementNode, public ThrowableExpressionData { 1286 1291 public: 1287 BreakNode(JSGlobalData* );1288 BreakNode( JSGlobalData*, const Identifier&);1292 BreakNode(JSGlobalData*, int); 1293 BreakNode(int, const Identifier&); 1289 1294 1290 1295 private: … … 1296 1301 class ReturnNode : public StatementNode, public ThrowableExpressionData { 1297 1302 public: 1298 ReturnNode( JSGlobalData*, ExpressionNode* value);1303 ReturnNode(int, ExpressionNode* value); 1299 1304 1300 1305 ExpressionNode* value() { return m_value; } … … 1310 1315 class WithNode : public StatementNode { 1311 1316 public: 1312 WithNode( JSGlobalData*, ExpressionNode*, StatementNode*, uint32_t divot, uint32_t expressionLength);1317 WithNode(int, ExpressionNode*, StatementNode*, uint32_t divot, uint32_t expressionLength); 1313 1318 1314 1319 private: … … 1323 1328 class LabelNode : public StatementNode, public ThrowableExpressionData { 1324 1329 public: 1325 LabelNode( JSGlobalData*, const Identifier& name, StatementNode*);1330 LabelNode(int, const Identifier& name, StatementNode*); 1326 1331 1327 1332 private: … … 1334 1339 class ThrowNode : public StatementNode, public ThrowableExpressionData { 1335 1340 public: 1336 ThrowNode( JSGlobalData*, ExpressionNode*);1341 ThrowNode(int, ExpressionNode*); 1337 1342 1338 1343 private: … … 1344 1349 class TryNode : public StatementNode { 1345 1350 public: 1346 TryNode( JSGlobalData*, StatementNode* tryBlock, const Identifier& exceptionIdent, bool catchHasEval, StatementNode* catchBlock, StatementNode* finallyBlock);1351 TryNode(int, StatementNode* tryBlock, const Identifier& exceptionIdent, bool catchHasEval, StatementNode* catchBlock, StatementNode* finallyBlock); 1347 1352 1348 1353 private: … … 1358 1363 class ParameterNode : public ParserArenaFreeable { 1359 1364 public: 1360 ParameterNode( JSGlobalData*,const Identifier&);1361 ParameterNode( JSGlobalData*,ParameterNode*, const Identifier&);1365 ParameterNode(const Identifier&); 1366 ParameterNode(ParameterNode*, const Identifier&); 1362 1367 1363 1368 const Identifier& ident() const { return m_ident; } … … 1390 1395 typedef DeclarationStacks::FunctionStack FunctionStack; 1391 1396 1392 ScopeNode(JSGlobalData*, bool inStrictContext);1393 ScopeNode(JSGlobalData*, const SourceCode&, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, CodeFeatures, int numConstants);1397 ScopeNode(JSGlobalData*, int, bool inStrictContext); 1398 ScopeNode(JSGlobalData*, int, const SourceCode&, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, CodeFeatures, int numConstants); 1394 1399 1395 1400 using ParserArenaRefCounted::operator new; … … 1443 1448 public: 1444 1449 static const bool isFunctionNode = false; 1445 static PassRefPtr<ProgramNode> create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1450 static PassRefPtr<ProgramNode> create(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1446 1451 1447 1452 static const bool scopeIsFunction = false; 1448 1453 1449 1454 private: 1450 ProgramNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1455 ProgramNode(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1451 1456 1452 1457 virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0); … … 1456 1461 public: 1457 1462 static const bool isFunctionNode = false; 1458 static PassRefPtr<EvalNode> create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1463 static PassRefPtr<EvalNode> create(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1459 1464 1460 1465 static const bool scopeIsFunction = false; 1461 1466 1462 1467 private: 1463 EvalNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1468 EvalNode(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1464 1469 1465 1470 virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0); … … 1478 1483 public: 1479 1484 static const bool isFunctionNode = true; 1480 static FunctionBodyNode* create(JSGlobalData*, bool isStrictMode);1481 static PassRefPtr<FunctionBodyNode> create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1485 static FunctionBodyNode* create(JSGlobalData*, int, bool isStrictMode); 1486 static PassRefPtr<FunctionBodyNode> create(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1482 1487 1483 1488 FunctionParameters* parameters() const { return m_parameters.get(); } … … 1494 1499 1495 1500 private: 1496 FunctionBodyNode(JSGlobalData*, bool inStrictContext);1497 FunctionBodyNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants);1501 FunctionBodyNode(JSGlobalData*, int, bool inStrictContext); 1502 FunctionBodyNode(JSGlobalData*, int, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&, const SourceCode&, CodeFeatures, int numConstants); 1498 1503 1499 1504 Identifier m_ident; … … 1503 1508 class FuncExprNode : public ExpressionNode { 1504 1509 public: 1505 FuncExprNode( JSGlobalData*, const Identifier&, FunctionBodyNode* body, const SourceCode& source, ParameterNode* parameter= 0);1510 FuncExprNode(int, const Identifier&, FunctionBodyNode*, const SourceCode&, ParameterNode* = 0); 1506 1511 1507 1512 FunctionBodyNode* body() { return m_body; } … … 1517 1522 class FuncDeclNode : public StatementNode { 1518 1523 public: 1519 FuncDeclNode( JSGlobalData*, const Identifier&, FunctionBodyNode*, const SourceCode&, ParameterNode* = 0);1524 FuncDeclNode(int, const Identifier&, FunctionBodyNode*, const SourceCode&, ParameterNode* = 0); 1520 1525 1521 1526 FunctionBodyNode* body() { return m_body; } … … 1529 1534 class CaseClauseNode : public ParserArenaFreeable { 1530 1535 public: 1531 CaseClauseNode( JSGlobalData*,ExpressionNode*, SourceElements* = 0);1536 CaseClauseNode(ExpressionNode*, SourceElements* = 0); 1532 1537 1533 1538 ExpressionNode* expr() const { return m_expr; } … … 1542 1547 class ClauseListNode : public ParserArenaFreeable { 1543 1548 public: 1544 ClauseListNode( JSGlobalData*,CaseClauseNode*);1545 ClauseListNode( JSGlobalData*,ClauseListNode*, CaseClauseNode*);1549 ClauseListNode(CaseClauseNode*); 1550 ClauseListNode(ClauseListNode*, CaseClauseNode*); 1546 1551 1547 1552 CaseClauseNode* getClause() const { return m_clause; } … … 1555 1560 class CaseBlockNode : public ParserArenaFreeable { 1556 1561 public: 1557 CaseBlockNode( JSGlobalData*,ClauseListNode* list1, CaseClauseNode* defaultClause, ClauseListNode* list2);1562 CaseBlockNode(ClauseListNode* list1, CaseClauseNode* defaultClause, ClauseListNode* list2); 1558 1563 1559 1564 RegisterID* emitBytecodeForBlock(BytecodeGenerator&, RegisterID* input, RegisterID* destination); … … 1568 1573 class SwitchNode : public StatementNode { 1569 1574 public: 1570 SwitchNode( JSGlobalData*, ExpressionNode*, CaseBlockNode*);1575 SwitchNode(int, ExpressionNode*, CaseBlockNode*); 1571 1576 1572 1577 private:
Note:
See TracChangeset
for help on using the changeset viewer.