OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "parser.h" | 32 #include "parser.h" |
33 #include "scopes.h" | 33 #include "scopes.h" |
34 #include "string-stream.h" | 34 #include "string-stream.h" |
35 #include "ast-inl.h" | 35 #include "ast-inl.h" |
36 #include "jump-target-inl.h" | 36 #include "jump-target-inl.h" |
37 | 37 |
38 namespace v8 { | 38 namespace v8 { |
39 namespace internal { | 39 namespace internal { |
40 | 40 |
41 | 41 |
42 VariableProxySentinel VariableProxySentinel::this_proxy_(true); | 42 AstSentinels::AstSentinels() |
43 VariableProxySentinel VariableProxySentinel::identifier_proxy_(false); | 43 : this_proxy_(true), |
44 ValidLeftHandSideSentinel ValidLeftHandSideSentinel::instance_; | 44 identifier_proxy_(false), |
45 Property Property::this_property_(VariableProxySentinel::this_proxy(), NULL, 0); | 45 valid_left_hand_side_sentinel_(), |
46 Call Call::sentinel_(NULL, NULL, 0); | 46 this_property_(&this_proxy_, NULL, 0), |
| 47 call_sentinel_(NULL, NULL, 0) { |
| 48 } |
47 | 49 |
48 | 50 |
49 // ---------------------------------------------------------------------------- | 51 // ---------------------------------------------------------------------------- |
50 // All the Accept member functions for each syntax tree node type. | 52 // All the Accept member functions for each syntax tree node type. |
51 | 53 |
52 #define DECL_ACCEPT(type) \ | 54 #define DECL_ACCEPT(type) \ |
53 void type::Accept(AstVisitor* v) { v->Visit##type(this); } | 55 void type::Accept(AstVisitor* v) { v->Visit##type(this); } |
54 AST_NODE_LIST(DECL_ACCEPT) | 56 AST_NODE_LIST(DECL_ACCEPT) |
55 #undef DECL_ACCEPT | 57 #undef DECL_ACCEPT |
56 | 58 |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 } | 768 } |
767 | 769 |
768 | 770 |
769 Statement::Statement(Statement* other) | 771 Statement::Statement(Statement* other) |
770 : AstNode(other), statement_pos_(other->statement_pos_) {} | 772 : AstNode(other), statement_pos_(other->statement_pos_) {} |
771 | 773 |
772 | 774 |
773 Expression::Expression(Expression* other) | 775 Expression::Expression(Expression* other) |
774 : AstNode(other), | 776 : AstNode(other), |
775 bitfields_(other->bitfields_), | 777 bitfields_(other->bitfields_), |
776 type_(other->type_) {} | 778 type_(other->type_) { |
| 779 } |
777 | 780 |
778 | 781 |
779 BreakableStatement::BreakableStatement(BreakableStatement* other) | 782 BreakableStatement::BreakableStatement(BreakableStatement* other) |
780 : Statement(other), labels_(other->labels_), type_(other->type_) {} | 783 : Statement(other), labels_(other->labels_), type_(other->type_) {} |
781 | 784 |
782 | 785 |
783 Block::Block(Block* other, ZoneList<Statement*>* statements) | 786 Block::Block(Block* other, ZoneList<Statement*>* statements) |
784 : BreakableStatement(other), | 787 : BreakableStatement(other), |
785 statements_(statements->length()), | 788 statements_(statements->length()), |
786 is_initializer_block_(other->is_initializer_block_) { | 789 is_initializer_block_(other->is_initializer_block_) { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 SetStackOverflow(); | 1146 SetStackOverflow(); |
1144 } | 1147 } |
1145 | 1148 |
1146 | 1149 |
1147 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { | 1150 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { |
1148 UNREACHABLE(); | 1151 UNREACHABLE(); |
1149 } | 1152 } |
1150 | 1153 |
1151 | 1154 |
1152 } } // namespace v8::internal | 1155 } } // namespace v8::internal |
OLD | NEW |