| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 void AstOptimizer::VisitFunctionLiteral(FunctionLiteral* node) { | 206 void AstOptimizer::VisitFunctionLiteral(FunctionLiteral* node) { |
| 207 has_function_literal_ = true; | 207 has_function_literal_ = true; |
| 208 | 208 |
| 209 if (node->name()->length() == 0) { | 209 if (node->name()->length() == 0) { |
| 210 // Anonymous function. | 210 // Anonymous function. |
| 211 func_name_inferrer_.AddFunction(node); | 211 func_name_inferrer_.AddFunction(node); |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 | 215 |
| 216 void AstOptimizer::VisitFunctionBoilerplateLiteral( | 216 void AstOptimizer::VisitSharedFunctionInfoLiteral( |
| 217 FunctionBoilerplateLiteral* node) { | 217 SharedFunctionInfoLiteral* node) { |
| 218 USE(node); | 218 USE(node); |
| 219 } | 219 } |
| 220 | 220 |
| 221 | 221 |
| 222 void AstOptimizer::VisitConditional(Conditional* node) { | 222 void AstOptimizer::VisitConditional(Conditional* node) { |
| 223 node->condition()->set_no_negative_zero(true); | 223 node->condition()->set_no_negative_zero(true); |
| 224 Visit(node->condition()); | 224 Visit(node->condition()); |
| 225 Visit(node->then_expression()); | 225 Visit(node->then_expression()); |
| 226 Visit(node->else_expression()); | 226 Visit(node->else_expression()); |
| 227 } | 227 } |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 void Processor::VisitDebuggerStatement(DebuggerStatement* node) {} | 797 void Processor::VisitDebuggerStatement(DebuggerStatement* node) {} |
| 798 | 798 |
| 799 | 799 |
| 800 // Expressions are never visited yet. | 800 // Expressions are never visited yet. |
| 801 void Processor::VisitFunctionLiteral(FunctionLiteral* node) { | 801 void Processor::VisitFunctionLiteral(FunctionLiteral* node) { |
| 802 USE(node); | 802 USE(node); |
| 803 UNREACHABLE(); | 803 UNREACHABLE(); |
| 804 } | 804 } |
| 805 | 805 |
| 806 | 806 |
| 807 void Processor::VisitFunctionBoilerplateLiteral( | 807 void Processor::VisitSharedFunctionInfoLiteral( |
| 808 FunctionBoilerplateLiteral* node) { | 808 SharedFunctionInfoLiteral* node) { |
| 809 USE(node); | 809 USE(node); |
| 810 UNREACHABLE(); | 810 UNREACHABLE(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 | 813 |
| 814 void Processor::VisitConditional(Conditional* node) { | 814 void Processor::VisitConditional(Conditional* node) { |
| 815 USE(node); | 815 USE(node); |
| 816 UNREACHABLE(); | 816 UNREACHABLE(); |
| 817 } | 817 } |
| 818 | 818 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 optimizer.Optimize(body); | 952 optimizer.Optimize(body); |
| 953 if (optimizer.HasStackOverflow()) { | 953 if (optimizer.HasStackOverflow()) { |
| 954 return false; | 954 return false; |
| 955 } | 955 } |
| 956 } | 956 } |
| 957 return true; | 957 return true; |
| 958 } | 958 } |
| 959 | 959 |
| 960 | 960 |
| 961 } } // namespace v8::internal | 961 } } // namespace v8::internal |
| OLD | NEW |