| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #define AST_NODE_LIST(V) \ | 97 #define AST_NODE_LIST(V) \ |
| 98 V(Declaration) \ | 98 V(Declaration) \ |
| 99 STATEMENT_NODE_LIST(V) \ | 99 STATEMENT_NODE_LIST(V) \ |
| 100 EXPRESSION_NODE_LIST(V) | 100 EXPRESSION_NODE_LIST(V) |
| 101 | 101 |
| 102 // Forward declarations | 102 // Forward declarations |
| 103 class TargetCollector; | 103 class TargetCollector; |
| 104 class MaterializedLiteral; | 104 class MaterializedLiteral; |
| 105 | 105 |
| 106 #define DEF_FORWARD_DECLARATION(type) class type; | 106 #define DEF_FORWARD_DECLARATION(type) class type; |
| 107 NODE_LIST(DEF_FORWARD_DECLARATION) | 107 AST_NODE_LIST(DEF_FORWARD_DECLARATION) |
| 108 #undef DEF_FORWARD_DECLARATION | 108 #undef DEF_FORWARD_DECLARATION |
| 109 | 109 |
| 110 | 110 |
| 111 // Typedef only introduced to avoid unreadable code. | 111 // Typedef only introduced to avoid unreadable code. |
| 112 // Please do appreciate the required space in "> >". | 112 // Please do appreciate the required space in "> >". |
| 113 typedef ZoneList<Handle<String> > ZoneStringList; | 113 typedef ZoneList<Handle<String> > ZoneStringList; |
| 114 | 114 |
| 115 | 115 |
| 116 class AstNode: public ZoneObject { | 116 class AstNode: public ZoneObject { |
| 117 public: | 117 public: |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 | 1700 |
| 1701 // If a stack-overflow exception is encountered when visiting a | 1701 // If a stack-overflow exception is encountered when visiting a |
| 1702 // node, calling SetStackOverflow will make sure that the visitor | 1702 // node, calling SetStackOverflow will make sure that the visitor |
| 1703 // bails out without visiting more nodes. | 1703 // bails out without visiting more nodes. |
| 1704 void SetStackOverflow() { stack_overflow_ = true; } | 1704 void SetStackOverflow() { stack_overflow_ = true; } |
| 1705 | 1705 |
| 1706 | 1706 |
| 1707 // Individual nodes | 1707 // Individual nodes |
| 1708 #define DEF_VISIT(type) \ | 1708 #define DEF_VISIT(type) \ |
| 1709 virtual void Visit##type(type* node) = 0; | 1709 virtual void Visit##type(type* node) = 0; |
| 1710 NODE_LIST(DEF_VISIT) | 1710 AST_NODE_LIST(DEF_VISIT) |
| 1711 #undef DEF_VISIT | 1711 #undef DEF_VISIT |
| 1712 | 1712 |
| 1713 private: | 1713 private: |
| 1714 bool stack_overflow_; | 1714 bool stack_overflow_; |
| 1715 }; | 1715 }; |
| 1716 | 1716 |
| 1717 | 1717 |
| 1718 } } // namespace v8::internal | 1718 } } // namespace v8::internal |
| 1719 | 1719 |
| 1720 #endif // V8_AST_H_ | 1720 #endif // V8_AST_H_ |
| OLD | NEW |