OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/ast/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 } | 786 } |
787 | 787 |
788 | 788 |
789 static bool UseIgnition(CompilationInfo* info) { | 789 static bool UseIgnition(CompilationInfo* info) { |
790 // Cannot use Ignition when the {function_data} is already used. | 790 // Cannot use Ignition when the {function_data} is already used. |
791 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) { | 791 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) { |
792 return false; | 792 return false; |
793 } | 793 } |
794 | 794 |
795 // TODO(4681): Generators are not yet supported. | 795 // TODO(4681): Generators are not yet supported. |
796 if (info->has_shared_info() && info->shared_info()->is_generator()) { | 796 if ((info->has_shared_info() && info->shared_info()->is_generator()) || |
| 797 (info->has_literal() && IsGeneratorFunction(info->literal()->kind()))) { |
797 return false; | 798 return false; |
798 } | 799 } |
799 | 800 |
800 // Checks whether top level functions should be passed by the filter. | 801 // Checks whether top level functions should be passed by the filter. |
801 if (info->closure().is_null()) { | 802 if (info->closure().is_null()) { |
802 Vector<const char> filter = CStrVector(FLAG_ignition_filter); | 803 Vector<const char> filter = CStrVector(FLAG_ignition_filter); |
803 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); | 804 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); |
804 } | 805 } |
805 | 806 |
806 // Finally respect the filter. | 807 // Finally respect the filter. |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1965 | 1966 |
1966 #if DEBUG | 1967 #if DEBUG |
1967 void CompilationInfo::PrintAstForTesting() { | 1968 void CompilationInfo::PrintAstForTesting() { |
1968 PrintF("--- Source from AST ---\n%s\n", | 1969 PrintF("--- Source from AST ---\n%s\n", |
1969 PrettyPrinter(isolate()).PrintProgram(literal())); | 1970 PrettyPrinter(isolate()).PrintProgram(literal())); |
1970 } | 1971 } |
1971 #endif | 1972 #endif |
1972 | 1973 |
1973 } // namespace internal | 1974 } // namespace internal |
1974 } // namespace v8 | 1975 } // namespace v8 |
OLD | NEW |