| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 default: | 425 default: |
| 426 UNREACHABLE(); | 426 UNREACHABLE(); |
| 427 break; | 427 break; |
| 428 } | 428 } |
| 429 } else if (node->op() == Token::BIT_NOT) { | 429 } else if (node->op() == Token::BIT_NOT) { |
| 430 node->expression()->set_to_int32(true); | 430 node->expression()->set_to_int32(true); |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 | 433 |
| 434 | 434 |
| 435 void AstOptimizer::VisitIncrementOperation(IncrementOperation* node) { | |
| 436 UNREACHABLE(); | |
| 437 } | |
| 438 | |
| 439 | |
| 440 void AstOptimizer::VisitCountOperation(CountOperation* node) { | 435 void AstOptimizer::VisitCountOperation(CountOperation* node) { |
| 441 // Count operations assume that they work on Smis. | 436 // Count operations assume that they work on Smis. |
| 442 node->expression()->set_no_negative_zero(node->is_prefix() ? | 437 node->expression()->set_no_negative_zero(node->is_prefix() ? |
| 443 true : | 438 true : |
| 444 node->no_negative_zero()); | 439 node->no_negative_zero()); |
| 445 node->type()->SetAsLikelySmiIfUnknown(); | 440 node->type()->SetAsLikelySmiIfUnknown(); |
| 446 node->expression()->type()->SetAsLikelySmiIfUnknown(); | 441 node->expression()->type()->SetAsLikelySmiIfUnknown(); |
| 447 Visit(node->expression()); | 442 Visit(node->expression()); |
| 448 } | 443 } |
| 449 | 444 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 UNREACHABLE(); | 931 UNREACHABLE(); |
| 937 } | 932 } |
| 938 | 933 |
| 939 | 934 |
| 940 void Processor::VisitUnaryOperation(UnaryOperation* node) { | 935 void Processor::VisitUnaryOperation(UnaryOperation* node) { |
| 941 USE(node); | 936 USE(node); |
| 942 UNREACHABLE(); | 937 UNREACHABLE(); |
| 943 } | 938 } |
| 944 | 939 |
| 945 | 940 |
| 946 void Processor::VisitIncrementOperation(IncrementOperation* node) { | |
| 947 UNREACHABLE(); | |
| 948 } | |
| 949 | |
| 950 | |
| 951 void Processor::VisitCountOperation(CountOperation* node) { | 941 void Processor::VisitCountOperation(CountOperation* node) { |
| 952 USE(node); | 942 USE(node); |
| 953 UNREACHABLE(); | 943 UNREACHABLE(); |
| 954 } | 944 } |
| 955 | 945 |
| 956 | 946 |
| 957 void Processor::VisitBinaryOperation(BinaryOperation* node) { | 947 void Processor::VisitBinaryOperation(BinaryOperation* node) { |
| 958 USE(node); | 948 USE(node); |
| 959 UNREACHABLE(); | 949 UNREACHABLE(); |
| 960 } | 950 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 if (FLAG_optimize_ast && !body->is_empty()) { | 1005 if (FLAG_optimize_ast && !body->is_empty()) { |
| 1016 AstOptimizer optimizer; | 1006 AstOptimizer optimizer; |
| 1017 optimizer.Optimize(body); | 1007 optimizer.Optimize(body); |
| 1018 if (optimizer.HasStackOverflow()) return false; | 1008 if (optimizer.HasStackOverflow()) return false; |
| 1019 } | 1009 } |
| 1020 return true; | 1010 return true; |
| 1021 } | 1011 } |
| 1022 | 1012 |
| 1023 | 1013 |
| 1024 } } // namespace v8::internal | 1014 } } // namespace v8::internal |
| OLD | NEW |