| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 | 237 |
| 238 void AstOptimizer::VisitObjectLiteral(ObjectLiteral* node) { | 238 void AstOptimizer::VisitObjectLiteral(ObjectLiteral* node) { |
| 239 for (int i = 0; i < node->properties()->length(); i++) { | 239 for (int i = 0; i < node->properties()->length(); i++) { |
| 240 Visit(node->properties()->at(i)->key()); | 240 Visit(node->properties()->at(i)->key()); |
| 241 Visit(node->properties()->at(i)->value()); | 241 Visit(node->properties()->at(i)->value()); |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 void AstOptimizer::VisitCatchExtensionObject(CatchExtensionObject* node) { |
| 247 Visit(node->key()); |
| 248 Visit(node->value()); |
| 249 } |
| 250 |
| 251 |
| 246 void AstOptimizer::VisitAssignment(Assignment* node) { | 252 void AstOptimizer::VisitAssignment(Assignment* node) { |
| 247 switch (node->op()) { | 253 switch (node->op()) { |
| 248 case Token::INIT_VAR: | 254 case Token::INIT_VAR: |
| 249 case Token::INIT_CONST: | 255 case Token::INIT_CONST: |
| 250 case Token::ASSIGN: | 256 case Token::ASSIGN: |
| 251 // No type can be infered from the general assignment. | 257 // No type can be infered from the general assignment. |
| 252 break; | 258 break; |
| 253 case Token::ASSIGN_BIT_OR: | 259 case Token::ASSIGN_BIT_OR: |
| 254 case Token::ASSIGN_BIT_XOR: | 260 case Token::ASSIGN_BIT_XOR: |
| 255 case Token::ASSIGN_BIT_AND: | 261 case Token::ASSIGN_BIT_AND: |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 UNREACHABLE(); | 683 UNREACHABLE(); |
| 678 } | 684 } |
| 679 | 685 |
| 680 | 686 |
| 681 void Processor::VisitObjectLiteral(ObjectLiteral* node) { | 687 void Processor::VisitObjectLiteral(ObjectLiteral* node) { |
| 682 USE(node); | 688 USE(node); |
| 683 UNREACHABLE(); | 689 UNREACHABLE(); |
| 684 } | 690 } |
| 685 | 691 |
| 686 | 692 |
| 693 void Processor::VisitCatchExtensionObject(CatchExtensionObject* node) { |
| 694 USE(node); |
| 695 UNREACHABLE(); |
| 696 } |
| 697 |
| 698 |
| 687 void Processor::VisitAssignment(Assignment* node) { | 699 void Processor::VisitAssignment(Assignment* node) { |
| 688 USE(node); | 700 USE(node); |
| 689 UNREACHABLE(); | 701 UNREACHABLE(); |
| 690 } | 702 } |
| 691 | 703 |
| 692 | 704 |
| 693 void Processor::VisitThrow(Throw* node) { | 705 void Processor::VisitThrow(Throw* node) { |
| 694 USE(node); | 706 USE(node); |
| 695 UNREACHABLE(); | 707 UNREACHABLE(); |
| 696 } | 708 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 if (optimizer.HasStackOverflow()) { | 796 if (optimizer.HasStackOverflow()) { |
| 785 return false; | 797 return false; |
| 786 } | 798 } |
| 787 } | 799 } |
| 788 } | 800 } |
| 789 return true; | 801 return true; |
| 790 } | 802 } |
| 791 | 803 |
| 792 | 804 |
| 793 } } // namespace v8::internal | 805 } } // namespace v8::internal |
| OLD | NEW |