OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 Visit(stmts->at(i)); | 643 Visit(stmts->at(i)); |
644 CHECK_BAILOUT; | 644 CHECK_BAILOUT; |
645 } | 645 } |
646 } | 646 } |
647 | 647 |
648 | 648 |
649 void CodeGenSelector::VisitDeclaration(Declaration* decl) { | 649 void CodeGenSelector::VisitDeclaration(Declaration* decl) { |
650 if (decl->fun() != NULL) { | 650 if (decl->fun() != NULL) { |
651 ProcessExpression(decl->fun(), Expression::kValue); | 651 ProcessExpression(decl->fun(), Expression::kValue); |
652 } | 652 } |
653 Variable* var = decl->proxy()->var(); | |
654 ASSERT_NOT_NULL(var); | |
655 if ((!var->is_global() && decl->fun() != NULL)) { | |
656 BAILOUT("Non-global function declaration"); | |
657 } | |
658 if ((!var->is_global() && | |
659 var->slot() != NULL && | |
660 var->slot()->type() == Slot::LOOKUP)) { | |
661 BAILOUT("Lookup slot encountered in declaration"); | |
662 } | |
663 } | 653 } |
664 | 654 |
665 | 655 |
666 void CodeGenSelector::VisitBlock(Block* stmt) { | 656 void CodeGenSelector::VisitBlock(Block* stmt) { |
667 VisitStatements(stmt->statements()); | 657 VisitStatements(stmt->statements()); |
668 } | 658 } |
669 | 659 |
670 | 660 |
671 void CodeGenSelector::VisitExpressionStatement(ExpressionStatement* stmt) { | 661 void CodeGenSelector::VisitExpressionStatement(ExpressionStatement* stmt) { |
672 ProcessExpression(stmt->expression(), Expression::kEffect); | 662 ProcessExpression(stmt->expression(), Expression::kEffect); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 | 1098 |
1109 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1099 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
1110 BAILOUT("ThisFunction"); | 1100 BAILOUT("ThisFunction"); |
1111 } | 1101 } |
1112 | 1102 |
1113 #undef BAILOUT | 1103 #undef BAILOUT |
1114 #undef CHECK_BAILOUT | 1104 #undef CHECK_BAILOUT |
1115 | 1105 |
1116 | 1106 |
1117 } } // namespace v8::internal | 1107 } } // namespace v8::internal |
OLD | NEW |