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 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/asmjs/asm-js.h" | 10 #include "src/asmjs/asm-js.h" |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 EnsureFeedbackMetadata(info); | 550 EnsureFeedbackMetadata(info); |
551 } | 551 } |
552 | 552 |
553 JSFunction::EnsureLiterals(info->closure()); | 553 JSFunction::EnsureLiterals(info->closure()); |
554 | 554 |
555 TimerEventScope<TimerEventRecompileSynchronous> timer(isolate); | 555 TimerEventScope<TimerEventRecompileSynchronous> timer(isolate); |
556 RuntimeCallTimerScope runtimeTimer(isolate, | 556 RuntimeCallTimerScope runtimeTimer(isolate, |
557 &RuntimeCallStats::RecompileSynchronous); | 557 &RuntimeCallStats::RecompileSynchronous); |
558 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 558 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
559 "V8.RecompileSynchronous"); | 559 "V8.RecompileSynchronous"); |
| 560 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 561 isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
560 | 562 |
561 if (job->PrepareJob() != CompilationJob::SUCCEEDED || | 563 if (job->PrepareJob() != CompilationJob::SUCCEEDED || |
562 job->ExecuteJob() != CompilationJob::SUCCEEDED || | 564 job->ExecuteJob() != CompilationJob::SUCCEEDED || |
563 job->FinalizeJob() != CompilationJob::SUCCEEDED) { | 565 job->FinalizeJob() != CompilationJob::SUCCEEDED) { |
564 if (FLAG_trace_opt) { | 566 if (FLAG_trace_opt) { |
565 PrintF("[aborted optimizing "); | 567 PrintF("[aborted optimizing "); |
566 info->closure()->ShortPrint(); | 568 info->closure()->ShortPrint(); |
567 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); | 569 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); |
568 } | 570 } |
569 return false; | 571 return false; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 EnsureFeedbackMetadata(info); | 607 EnsureFeedbackMetadata(info); |
606 } | 608 } |
607 | 609 |
608 JSFunction::EnsureLiterals(info->closure()); | 610 JSFunction::EnsureLiterals(info->closure()); |
609 | 611 |
610 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); | 612 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
611 RuntimeCallTimerScope runtimeTimer(info->isolate(), | 613 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
612 &RuntimeCallStats::RecompileSynchronous); | 614 &RuntimeCallStats::RecompileSynchronous); |
613 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 615 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
614 "V8.RecompileSynchronous"); | 616 "V8.RecompileSynchronous"); |
| 617 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 618 isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
615 | 619 |
616 if (job->PrepareJob() != CompilationJob::SUCCEEDED) return false; | 620 if (job->PrepareJob() != CompilationJob::SUCCEEDED) return false; |
617 isolate->optimizing_compile_dispatcher()->QueueForOptimization(job); | 621 isolate->optimizing_compile_dispatcher()->QueueForOptimization(job); |
618 | 622 |
619 if (FLAG_trace_concurrent_recompilation) { | 623 if (FLAG_trace_concurrent_recompilation) { |
620 PrintF(" ** Queued "); | 624 PrintF(" ** Queued "); |
621 info->closure()->ShortPrint(); | 625 info->closure()->ShortPrint(); |
622 PrintF(" for concurrent optimization.\n"); | 626 PrintF(" for concurrent optimization.\n"); |
623 } | 627 } |
624 return true; | 628 return true; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 const int kMaxOptCount = | 686 const int kMaxOptCount = |
683 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000; | 687 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000; |
684 if (info->shared_info()->opt_count() > kMaxOptCount) { | 688 if (info->shared_info()->opt_count() > kMaxOptCount) { |
685 info->AbortOptimization(kOptimizedTooManyTimes); | 689 info->AbortOptimization(kOptimizedTooManyTimes); |
686 return MaybeHandle<Code>(); | 690 return MaybeHandle<Code>(); |
687 } | 691 } |
688 | 692 |
689 TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate); | 693 TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate); |
690 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode); | 694 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode); |
691 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode"); | 695 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode"); |
| 696 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 697 isolate, &tracing::TraceEventStatsTable::OptimizeCode); |
692 | 698 |
693 // TurboFan can optimize directly from existing bytecode. | 699 // TurboFan can optimize directly from existing bytecode. |
694 if (FLAG_turbo_from_bytecode && use_turbofan && ShouldUseIgnition(info)) { | 700 if (FLAG_turbo_from_bytecode && use_turbofan && ShouldUseIgnition(info)) { |
695 if (!Compiler::EnsureBytecode(info)) { | 701 if (!Compiler::EnsureBytecode(info)) { |
696 if (isolate->has_pending_exception()) isolate->clear_pending_exception(); | 702 if (isolate->has_pending_exception()) isolate->clear_pending_exception(); |
697 return MaybeHandle<Code>(); | 703 return MaybeHandle<Code>(); |
698 } | 704 } |
699 info->MarkAsOptimizeFromBytecode(); | 705 info->MarkAsOptimizeFromBytecode(); |
700 } | 706 } |
701 | 707 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 744 |
739 CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) { | 745 CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) { |
740 CompilationInfo* info = job->info(); | 746 CompilationInfo* info = job->info(); |
741 Isolate* isolate = info->isolate(); | 747 Isolate* isolate = info->isolate(); |
742 | 748 |
743 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); | 749 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
744 RuntimeCallTimerScope runtimeTimer(isolate, | 750 RuntimeCallTimerScope runtimeTimer(isolate, |
745 &RuntimeCallStats::RecompileSynchronous); | 751 &RuntimeCallStats::RecompileSynchronous); |
746 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 752 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
747 "V8.RecompileSynchronous"); | 753 "V8.RecompileSynchronous"); |
| 754 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 755 isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
748 | 756 |
749 Handle<SharedFunctionInfo> shared = info->shared_info(); | 757 Handle<SharedFunctionInfo> shared = info->shared_info(); |
750 shared->code()->set_profiler_ticks(0); | 758 shared->code()->set_profiler_ticks(0); |
751 | 759 |
752 DCHECK(!shared->HasDebugInfo()); | 760 DCHECK(!shared->HasDebugInfo()); |
753 | 761 |
754 // 1) Optimization on the concurrent thread may have failed. | 762 // 1) Optimization on the concurrent thread may have failed. |
755 // 2) The function may have already been optimized by OSR. Simply continue. | 763 // 2) The function may have already been optimized by OSR. Simply continue. |
756 // Except when OSR already disabled optimization for some reason. | 764 // Except when OSR already disabled optimization for some reason. |
757 // 3) The code may have already been invalidated due to dependency change. | 765 // 3) The code may have already been invalidated due to dependency change. |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 } | 962 } |
955 | 963 |
956 MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) { | 964 MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) { |
957 Isolate* isolate = function->GetIsolate(); | 965 Isolate* isolate = function->GetIsolate(); |
958 DCHECK(!isolate->has_pending_exception()); | 966 DCHECK(!isolate->has_pending_exception()); |
959 DCHECK(!function->is_compiled()); | 967 DCHECK(!function->is_compiled()); |
960 TimerEventScope<TimerEventCompileCode> compile_timer(isolate); | 968 TimerEventScope<TimerEventCompileCode> compile_timer(isolate); |
961 RuntimeCallTimerScope runtimeTimer(isolate, | 969 RuntimeCallTimerScope runtimeTimer(isolate, |
962 &RuntimeCallStats::CompileCodeLazy); | 970 &RuntimeCallStats::CompileCodeLazy); |
963 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); | 971 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); |
| 972 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 973 isolate, &tracing::TraceEventStatsTable::CompileCodeLazy); |
964 AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy()); | 974 AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy()); |
965 | 975 |
966 if (FLAG_turbo_cache_shared_code) { | 976 if (FLAG_turbo_cache_shared_code) { |
967 Handle<Code> cached_code; | 977 Handle<Code> cached_code; |
968 if (GetCodeFromOptimizedCodeMap(function, BailoutId::None()) | 978 if (GetCodeFromOptimizedCodeMap(function, BailoutId::None()) |
969 .ToHandle(&cached_code)) { | 979 .ToHandle(&cached_code)) { |
970 if (FLAG_trace_opt) { | 980 if (FLAG_trace_opt) { |
971 PrintF("[found optimized code for "); | 981 PrintF("[found optimized code for "); |
972 function->ShortPrint(); | 982 function->ShortPrint(); |
973 PrintF(" during unoptimized compile]\n"); | 983 PrintF(" during unoptimized compile]\n"); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 SharedFunctionInfo::InitFromFunctionLiteral(result, literal); | 1025 SharedFunctionInfo::InitFromFunctionLiteral(result, literal); |
1016 SharedFunctionInfo::SetScript(result, script); | 1026 SharedFunctionInfo::SetScript(result, script); |
1017 return result; | 1027 return result; |
1018 } | 1028 } |
1019 | 1029 |
1020 Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { | 1030 Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { |
1021 Isolate* isolate = info->isolate(); | 1031 Isolate* isolate = info->isolate(); |
1022 TimerEventScope<TimerEventCompileCode> timer(isolate); | 1032 TimerEventScope<TimerEventCompileCode> timer(isolate); |
1023 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode); | 1033 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode); |
1024 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); | 1034 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); |
| 1035 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 1036 isolate, &tracing::TraceEventStatsTable::CompileCode); |
1025 PostponeInterruptsScope postpone(isolate); | 1037 PostponeInterruptsScope postpone(isolate); |
1026 DCHECK(!isolate->native_context().is_null()); | 1038 DCHECK(!isolate->native_context().is_null()); |
1027 ParseInfo* parse_info = info->parse_info(); | 1039 ParseInfo* parse_info = info->parse_info(); |
1028 Handle<Script> script = parse_info->script(); | 1040 Handle<Script> script = parse_info->script(); |
1029 | 1041 |
1030 // Create a canonical handle scope before internalizing parsed values if | 1042 // Create a canonical handle scope before internalizing parsed values if |
1031 // compiling bytecode. This is required for off-thread bytecode generation. | 1043 // compiling bytecode. This is required for off-thread bytecode generation. |
1032 std::unique_ptr<CanonicalHandleScope> canonical; | 1044 std::unique_ptr<CanonicalHandleScope> canonical; |
1033 if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate)); | 1045 if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate)); |
1034 | 1046 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 // parsing statistics. | 1101 // parsing statistics. |
1090 RuntimeCallTimerScope runtimeTimer( | 1102 RuntimeCallTimerScope runtimeTimer( |
1091 isolate, parse_info->is_eval() ? &RuntimeCallStats::CompileEval | 1103 isolate, parse_info->is_eval() ? &RuntimeCallStats::CompileEval |
1092 : &RuntimeCallStats::Compile); | 1104 : &RuntimeCallStats::Compile); |
1093 HistogramTimer* rate = parse_info->is_eval() | 1105 HistogramTimer* rate = parse_info->is_eval() |
1094 ? info->isolate()->counters()->compile_eval() | 1106 ? info->isolate()->counters()->compile_eval() |
1095 : info->isolate()->counters()->compile(); | 1107 : info->isolate()->counters()->compile(); |
1096 HistogramTimerScope timer(rate); | 1108 HistogramTimerScope timer(rate); |
1097 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 1109 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
1098 parse_info->is_eval() ? "V8.CompileEval" : "V8.Compile"); | 1110 parse_info->is_eval() ? "V8.CompileEval" : "V8.Compile"); |
| 1111 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 1112 isolate, |
| 1113 (parse_info->is_eval() ? &tracing::TraceEventStatsTable::CompileEval |
| 1114 : &tracing::TraceEventStatsTable::Compile)); |
1099 | 1115 |
1100 // Allocate a shared function info object. | 1116 // Allocate a shared function info object. |
1101 DCHECK_EQ(kNoSourcePosition, lit->function_token_position()); | 1117 DCHECK_EQ(kNoSourcePosition, lit->function_token_position()); |
1102 result = NewSharedFunctionInfoForLiteral(isolate, lit, script); | 1118 result = NewSharedFunctionInfoForLiteral(isolate, lit, script); |
1103 result->set_is_toplevel(true); | 1119 result->set_is_toplevel(true); |
1104 if (parse_info->is_eval()) { | 1120 if (parse_info->is_eval()) { |
1105 // Eval scripts cannot be (re-)compiled without context. | 1121 // Eval scripts cannot be (re-)compiled without context. |
1106 result->set_allows_lazy_compilation_without_context(false); | 1122 result->set_allows_lazy_compilation_without_context(false); |
1107 } | 1123 } |
1108 parse_info->set_shared_info(result); | 1124 parse_info->set_shared_info(result); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 context, language_mode); | 1589 context, language_mode); |
1574 if (maybe_result.is_null() && FLAG_serialize_toplevel && | 1590 if (maybe_result.is_null() && FLAG_serialize_toplevel && |
1575 compile_options == ScriptCompiler::kConsumeCodeCache && | 1591 compile_options == ScriptCompiler::kConsumeCodeCache && |
1576 !isolate->debug()->is_loaded()) { | 1592 !isolate->debug()->is_loaded()) { |
1577 // Then check cached code provided by embedder. | 1593 // Then check cached code provided by embedder. |
1578 HistogramTimerScope timer(isolate->counters()->compile_deserialize()); | 1594 HistogramTimerScope timer(isolate->counters()->compile_deserialize()); |
1579 RuntimeCallTimerScope runtimeTimer(isolate, | 1595 RuntimeCallTimerScope runtimeTimer(isolate, |
1580 &RuntimeCallStats::CompileDeserialize); | 1596 &RuntimeCallStats::CompileDeserialize); |
1581 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 1597 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
1582 "V8.CompileDeserialize"); | 1598 "V8.CompileDeserialize"); |
| 1599 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 1600 isolate, &tracing::TraceEventStatsTable::CompileDeserialize); |
1583 Handle<SharedFunctionInfo> result; | 1601 Handle<SharedFunctionInfo> result; |
1584 if (CodeSerializer::Deserialize(isolate, *cached_data, source) | 1602 if (CodeSerializer::Deserialize(isolate, *cached_data, source) |
1585 .ToHandle(&result)) { | 1603 .ToHandle(&result)) { |
1586 // Promote to per-isolate compilation cache. | 1604 // Promote to per-isolate compilation cache. |
1587 compilation_cache->PutScript(source, context, language_mode, result); | 1605 compilation_cache->PutScript(source, context, language_mode, result); |
1588 return result; | 1606 return result; |
1589 } | 1607 } |
1590 // Deserializer failed. Fall through to compile. | 1608 // Deserializer failed. Fall through to compile. |
1591 } | 1609 } |
1592 } | 1610 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 if (extension == NULL && !result.is_null()) { | 1665 if (extension == NULL && !result.is_null()) { |
1648 compilation_cache->PutScript(source, context, language_mode, result); | 1666 compilation_cache->PutScript(source, context, language_mode, result); |
1649 if (FLAG_serialize_toplevel && | 1667 if (FLAG_serialize_toplevel && |
1650 compile_options == ScriptCompiler::kProduceCodeCache) { | 1668 compile_options == ScriptCompiler::kProduceCodeCache) { |
1651 HistogramTimerScope histogram_timer( | 1669 HistogramTimerScope histogram_timer( |
1652 isolate->counters()->compile_serialize()); | 1670 isolate->counters()->compile_serialize()); |
1653 RuntimeCallTimerScope runtimeTimer(isolate, | 1671 RuntimeCallTimerScope runtimeTimer(isolate, |
1654 &RuntimeCallStats::CompileSerialize); | 1672 &RuntimeCallStats::CompileSerialize); |
1655 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), | 1673 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
1656 "V8.CompileSerialize"); | 1674 "V8.CompileSerialize"); |
| 1675 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 1676 isolate, &tracing::TraceEventStatsTable::CompileSerialize); |
1657 *cached_data = CodeSerializer::Serialize(isolate, result, source); | 1677 *cached_data = CodeSerializer::Serialize(isolate, result, source); |
1658 if (FLAG_profile_deserialization) { | 1678 if (FLAG_profile_deserialization) { |
1659 PrintF("[Compiling and serializing took %0.3f ms]\n", | 1679 PrintF("[Compiling and serializing took %0.3f ms]\n", |
1660 timer.Elapsed().InMillisecondsF()); | 1680 timer.Elapsed().InMillisecondsF()); |
1661 } | 1681 } |
1662 } | 1682 } |
1663 } | 1683 } |
1664 | 1684 |
1665 if (result.is_null()) { | 1685 if (result.is_null()) { |
1666 isolate->ReportPendingMessages(); | 1686 isolate->ReportPendingMessages(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 lazy &= !(FLAG_serialize_eager && info.will_serialize()); | 1785 lazy &= !(FLAG_serialize_eager && info.will_serialize()); |
1766 | 1786 |
1767 // Consider compiling eagerly when compiling bytecode for Ignition. | 1787 // Consider compiling eagerly when compiling bytecode for Ignition. |
1768 lazy &= | 1788 lazy &= |
1769 !(FLAG_ignition && FLAG_ignition_eager && !isolate->serializer_enabled()); | 1789 !(FLAG_ignition && FLAG_ignition_eager && !isolate->serializer_enabled()); |
1770 | 1790 |
1771 // Generate code | 1791 // Generate code |
1772 TimerEventScope<TimerEventCompileCode> timer(isolate); | 1792 TimerEventScope<TimerEventCompileCode> timer(isolate); |
1773 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode); | 1793 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode); |
1774 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); | 1794 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); |
| 1795 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 1796 isolate, &tracing::TraceEventStatsTable::CompileCode); |
1775 | 1797 |
1776 // Create a canonical handle scope if compiling ignition bytecode. This is | 1798 // Create a canonical handle scope if compiling ignition bytecode. This is |
1777 // required by the constant array builder to de-duplicate common objects | 1799 // required by the constant array builder to de-duplicate common objects |
1778 // without dereferencing handles. | 1800 // without dereferencing handles. |
1779 std::unique_ptr<CanonicalHandleScope> canonical; | 1801 std::unique_ptr<CanonicalHandleScope> canonical; |
1780 if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(info.isolate())); | 1802 if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(info.isolate())); |
1781 | 1803 |
1782 if (lazy) { | 1804 if (lazy) { |
1783 info.SetCode(isolate->builtins()->CompileLazy()); | 1805 info.SetCode(isolate->builtins()->CompileLazy()); |
1784 } else if (Renumber(info.parse_info()) && GenerateUnoptimizedCode(&info)) { | 1806 } else if (Renumber(info.parse_info()) && GenerateUnoptimizedCode(&info)) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1888 DCHECK(shared->is_compiled()); | 1910 DCHECK(shared->is_compiled()); |
1889 function->set_literals(cached.literals); | 1911 function->set_literals(cached.literals); |
1890 } else if (shared->is_compiled()) { | 1912 } else if (shared->is_compiled()) { |
1891 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1913 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1892 JSFunction::EnsureLiterals(function); | 1914 JSFunction::EnsureLiterals(function); |
1893 } | 1915 } |
1894 } | 1916 } |
1895 | 1917 |
1896 } // namespace internal | 1918 } // namespace internal |
1897 } // namespace v8 | 1919 } // namespace v8 |
OLD | NEW |