| 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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "ast.h" | 30 #include "ast.h" |
| 31 #include "data-flow.h" | 31 #include "data-flow.h" |
| 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" |
| 36 #include "jump-target-inl.h" |
| 35 | 37 |
| 36 namespace v8 { | 38 namespace v8 { |
| 37 namespace internal { | 39 namespace internal { |
| 38 | 40 |
| 39 | 41 |
| 40 VariableProxySentinel VariableProxySentinel::this_proxy_(true); | 42 VariableProxySentinel VariableProxySentinel::this_proxy_(true); |
| 41 VariableProxySentinel VariableProxySentinel::identifier_proxy_(false); | 43 VariableProxySentinel VariableProxySentinel::identifier_proxy_(false); |
| 42 ValidLeftHandSideSentinel ValidLeftHandSideSentinel::instance_; | 44 ValidLeftHandSideSentinel ValidLeftHandSideSentinel::instance_; |
| 43 Property Property::this_property_(VariableProxySentinel::this_proxy(), NULL, 0); | 45 Property Property::this_property_(VariableProxySentinel::this_proxy(), NULL, 0); |
| 44 Call Call::sentinel_(NULL, NULL, 0); | 46 Call Call::sentinel_(NULL, NULL, 0); |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 781 |
| 780 | 782 |
| 781 Block::Block(Block* other, ZoneList<Statement*>* statements) | 783 Block::Block(Block* other, ZoneList<Statement*>* statements) |
| 782 : BreakableStatement(other), | 784 : BreakableStatement(other), |
| 783 statements_(statements->length()), | 785 statements_(statements->length()), |
| 784 is_initializer_block_(other->is_initializer_block_) { | 786 is_initializer_block_(other->is_initializer_block_) { |
| 785 statements_.AddAll(*statements); | 787 statements_.AddAll(*statements); |
| 786 } | 788 } |
| 787 | 789 |
| 788 | 790 |
| 791 WhileStatement::WhileStatement(ZoneStringList* labels) |
| 792 : IterationStatement(labels), |
| 793 cond_(NULL), |
| 794 may_have_function_literal_(true) { |
| 795 } |
| 796 |
| 797 |
| 789 ExpressionStatement::ExpressionStatement(ExpressionStatement* other, | 798 ExpressionStatement::ExpressionStatement(ExpressionStatement* other, |
| 790 Expression* expression) | 799 Expression* expression) |
| 791 : Statement(other), expression_(expression) {} | 800 : Statement(other), expression_(expression) {} |
| 792 | 801 |
| 793 | 802 |
| 794 IfStatement::IfStatement(IfStatement* other, | 803 IfStatement::IfStatement(IfStatement* other, |
| 795 Expression* condition, | 804 Expression* condition, |
| 796 Statement* then_statement, | 805 Statement* then_statement, |
| 797 Statement* else_statement) | 806 Statement* else_statement) |
| 798 : Statement(other), | 807 : Statement(other), |
| 799 condition_(condition), | 808 condition_(condition), |
| 800 then_statement_(then_statement), | 809 then_statement_(then_statement), |
| 801 else_statement_(else_statement) {} | 810 else_statement_(else_statement) {} |
| 802 | 811 |
| 803 | 812 |
| 804 EmptyStatement::EmptyStatement(EmptyStatement* other) : Statement(other) {} | 813 EmptyStatement::EmptyStatement(EmptyStatement* other) : Statement(other) {} |
| 805 | 814 |
| 806 | 815 |
| 807 IterationStatement::IterationStatement(IterationStatement* other, | 816 IterationStatement::IterationStatement(IterationStatement* other, |
| 808 Statement* body) | 817 Statement* body) |
| 809 : BreakableStatement(other), body_(body) {} | 818 : BreakableStatement(other), body_(body) {} |
| 810 | 819 |
| 811 | 820 |
| 821 CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements) |
| 822 : label_(label), statements_(statements) { |
| 823 } |
| 824 |
| 825 |
| 812 ForStatement::ForStatement(ForStatement* other, | 826 ForStatement::ForStatement(ForStatement* other, |
| 813 Statement* init, | 827 Statement* init, |
| 814 Expression* cond, | 828 Expression* cond, |
| 815 Statement* next, | 829 Statement* next, |
| 816 Statement* body) | 830 Statement* body) |
| 817 : IterationStatement(other, body), | 831 : IterationStatement(other, body), |
| 818 init_(init), | 832 init_(init), |
| 819 cond_(cond), | 833 cond_(cond), |
| 820 next_(next), | 834 next_(next), |
| 821 may_have_function_literal_(other->may_have_function_literal_), | 835 may_have_function_literal_(other->may_have_function_literal_), |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 SetStackOverflow(); | 1143 SetStackOverflow(); |
| 1130 } | 1144 } |
| 1131 | 1145 |
| 1132 | 1146 |
| 1133 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { | 1147 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { |
| 1134 UNREACHABLE(); | 1148 UNREACHABLE(); |
| 1135 } | 1149 } |
| 1136 | 1150 |
| 1137 | 1151 |
| 1138 } } // namespace v8::internal | 1152 } } // namespace v8::internal |
| OLD | NEW |