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-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
740 PostponeInterruptsScope postpone(info->isolate()); | 740 PostponeInterruptsScope postpone(info->isolate()); |
741 | 741 |
742 // Parse and update CompilationInfo with the results. | 742 // Parse and update CompilationInfo with the results. |
743 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>(); | 743 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>(); |
744 Handle<SharedFunctionInfo> shared = info->shared_info(); | 744 Handle<SharedFunctionInfo> shared = info->shared_info(); |
745 FunctionLiteral* lit = info->literal(); | 745 FunctionLiteral* lit = info->literal(); |
746 shared->set_language_mode(lit->language_mode()); | 746 shared->set_language_mode(lit->language_mode()); |
747 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); | 747 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); |
748 MaybeDisableOptimization(shared, lit->dont_optimize_reason()); | 748 MaybeDisableOptimization(shared, lit->dont_optimize_reason()); |
749 | 749 |
750 if (FLAG_ignition && info->closure()->PassesFilter(FLAG_ignition_filter) && | 750 if (FLAG_ignition && |
751 !shared->IsApiFunction() && !shared->HasBuiltinFunctionId() && | |
Michael Starzinger
2015/11/02 14:08:43
Can SharedFunctionInfo::IsApiFunction() really hap
rmcilroy
2015/11/02 17:55:38
Yeah, this doesn't seem to happen, at least in the
| |
752 info->closure()->PassesFilter(FLAG_ignition_filter) && | |
751 ScriptPassesFilter(FLAG_ignition_script_filter, info->script())) { | 753 ScriptPassesFilter(FLAG_ignition_script_filter, info->script())) { |
752 // Compile bytecode for the interpreter. | 754 // Compile bytecode for the interpreter. |
753 if (!GenerateBytecode(info)) return MaybeHandle<Code>(); | 755 if (!GenerateBytecode(info)) return MaybeHandle<Code>(); |
754 } else { | 756 } else { |
755 // Compile unoptimized code. | 757 // Compile unoptimized code. |
756 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>(); | 758 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>(); |
757 | 759 |
758 CHECK_EQ(Code::FUNCTION, info->code()->kind()); | 760 CHECK_EQ(Code::FUNCTION, info->code()->kind()); |
759 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); | 761 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); |
760 } | 762 } |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1793 } | 1795 } |
1794 | 1796 |
1795 #if DEBUG | 1797 #if DEBUG |
1796 void CompilationInfo::PrintAstForTesting() { | 1798 void CompilationInfo::PrintAstForTesting() { |
1797 PrintF("--- Source from AST ---\n%s\n", | 1799 PrintF("--- Source from AST ---\n%s\n", |
1798 PrettyPrinter(isolate()).PrintProgram(literal())); | 1800 PrettyPrinter(isolate()).PrintProgram(literal())); |
1799 } | 1801 } |
1800 #endif | 1802 #endif |
1801 } // namespace internal | 1803 } // namespace internal |
1802 } // namespace v8 | 1804 } // namespace v8 |
OLD | NEW |