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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
779 if (!Compiler::Analyze(info->parse_info()) || | 779 if (!Compiler::Analyze(info->parse_info()) || |
780 !FullCodeGenerator::MakeCode(info)) { | 780 !FullCodeGenerator::MakeCode(info)) { |
781 Isolate* isolate = info->isolate(); | 781 Isolate* isolate = info->isolate(); |
782 if (!isolate->has_pending_exception()) isolate->StackOverflow(); | 782 if (!isolate->has_pending_exception()) isolate->StackOverflow(); |
783 return false; | 783 return false; |
784 } | 784 } |
785 return true; | 785 return true; |
786 } | 786 } |
787 | 787 |
788 | 788 |
789 static bool UseIgnition(CompilationInfo* info) { | 789 static bool UseIgnition(CompilationInfo* info) { |
Michael Starzinger
2016/03/15 14:19:13
As discussed offline: We now need to guard and bla
rmcilroy
2016/03/15 17:31:46
Yup, missed this. Done.
| |
790 // Cannot use Ignition when the {function_data} is already used. | |
791 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) { | |
792 return false; | |
793 } | |
794 | |
795 // TODO(4681): Generators are not yet supported. | 790 // TODO(4681): Generators are not yet supported. |
796 if ((info->has_shared_info() && info->shared_info()->is_generator()) || | 791 if ((info->has_shared_info() && info->shared_info()->is_generator()) || |
797 (info->has_literal() && IsGeneratorFunction(info->literal()->kind()))) { | 792 (info->has_literal() && IsGeneratorFunction(info->literal()->kind()))) { |
798 return false; | 793 return false; |
799 } | 794 } |
800 | 795 |
801 // Checks whether top level functions should be passed by the filter. | 796 // Checks whether top level functions should be passed by the filter. |
802 if (info->closure().is_null()) { | 797 if (info->closure().is_null()) { |
803 Vector<const char> filter = CStrVector(FLAG_ignition_filter); | 798 Vector<const char> filter = CStrVector(FLAG_ignition_filter); |
804 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); | 799 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1966 | 1961 |
1967 #if DEBUG | 1962 #if DEBUG |
1968 void CompilationInfo::PrintAstForTesting() { | 1963 void CompilationInfo::PrintAstForTesting() { |
1969 PrintF("--- Source from AST ---\n%s\n", | 1964 PrintF("--- Source from AST ---\n%s\n", |
1970 PrettyPrinter(isolate()).PrintProgram(literal())); | 1965 PrettyPrinter(isolate()).PrintProgram(literal())); |
1971 } | 1966 } |
1972 #endif | 1967 #endif |
1973 | 1968 |
1974 } // namespace internal | 1969 } // namespace internal |
1975 } // namespace v8 | 1970 } // namespace v8 |
OLD | NEW |