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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // non-context (stack-allocated) locals. | 642 // non-context (stack-allocated) locals. |
643 if (expr->starts_initialization_block()) BAILOUT("initialization block"); | 643 if (expr->starts_initialization_block()) BAILOUT("initialization block"); |
644 | 644 |
645 Token::Value op = expr->op(); | 645 Token::Value op = expr->op(); |
646 if (op == Token::INIT_CONST) BAILOUT("initialize constant"); | 646 if (op == Token::INIT_CONST) BAILOUT("initialize constant"); |
647 if (op != Token::ASSIGN && op != Token::INIT_VAR) { | 647 if (op != Token::ASSIGN && op != Token::INIT_VAR) { |
648 BAILOUT("compound assignment"); | 648 BAILOUT("compound assignment"); |
649 } | 649 } |
650 | 650 |
651 Variable* var = expr->target()->AsVariableProxy()->AsVariable(); | 651 Variable* var = expr->target()->AsVariableProxy()->AsVariable(); |
652 if (var == NULL || var->is_global()) BAILOUT("non-variable assignment"); | 652 if (var == NULL) BAILOUT("non-variable assignment"); |
653 | 653 |
654 ASSERT(var->slot() != NULL); | 654 if (!var->is_global()) { |
655 Slot::Type type = var->slot()->type(); | 655 ASSERT(var->slot() != NULL); |
656 if (type != Slot::PARAMETER && type != Slot::LOCAL) { | 656 Slot::Type type = var->slot()->type(); |
657 BAILOUT("non-parameter/non-local slot assignment"); | 657 if (type != Slot::PARAMETER && type != Slot::LOCAL) { |
| 658 BAILOUT("non-parameter/non-local slot assignment"); |
| 659 } |
658 } | 660 } |
659 | 661 |
660 Visit(expr->value()); | 662 Visit(expr->value()); |
661 } | 663 } |
662 | 664 |
663 | 665 |
664 void CodeGenSelector::VisitThrow(Throw* expr) { | 666 void CodeGenSelector::VisitThrow(Throw* expr) { |
665 BAILOUT("Throw"); | 667 BAILOUT("Throw"); |
666 } | 668 } |
667 | 669 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 | 710 |
709 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 711 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
710 BAILOUT("ThisFunction"); | 712 BAILOUT("ThisFunction"); |
711 } | 713 } |
712 | 714 |
713 #undef BAILOUT | 715 #undef BAILOUT |
714 #undef CHECK_BAILOUT | 716 #undef CHECK_BAILOUT |
715 | 717 |
716 | 718 |
717 } } // namespace v8::internal | 719 } } // namespace v8::internal |
OLD | NEW |