Lines Matching full:info
142 // passed in shared info, rather than creating a new one. in CompilationInfo()
262 InlinedFunctionInfo info(parent_id, position, UnboundScript::kNoScriptId, in TraceInlinedFunction() local
266 info.script_id = script->id(); in TraceInlinedFunction()
288 inlined_function_infos_.push_back(info); in TraceInlinedFunction()
329 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) in HOptimizedGraphBuilderWithPositions() argument
330 : HOptimizedGraphBuilder(info) { in HOptimizedGraphBuilderWithPositions()
373 DCHECK(info()->IsOptimizing()); in CreateGraph()
376 if (info()->shared_info()->HasDebugInfo()) { in CreateGraph()
383 if (info()->opt_count() > kMaxOptCount) { in CreateGraph()
388 if (!info()->closure()->PassesFilter(FLAG_hydrogen_filter)) { in CreateGraph()
397 bool should_recompile = !info()->shared_info()->has_deoptimization_support(); in CreateGraph()
403 if (!Compiler::EnsureDeoptimizationSupport(info())) { in CreateGraph()
411 DCHECK(info()->shared_info()->has_deoptimization_support()); in CreateGraph()
412 DCHECK(!info()->is_first_compile()); in CreateGraph()
414 bool optimization_disabled = info()->shared_info()->optimization_disabled(); in CreateGraph()
415 bool dont_crankshaft = info()->shared_info()->dont_crankshaft(); in CreateGraph()
420 info()->shared_info()->asm_function() && in CreateGraph()
429 bool passes_turbo_filter = info()->closure()->PassesFilter(FLAG_turbo_filter); in CreateGraph()
432 bool passes_osr_test = FLAG_turbo_osr || !info()->is_osr(); in CreateGraph()
440 os << "[compiling method " << Brief(*info()->closure()) in CreateGraph()
442 if (info()->is_osr()) os << " OSR"; in CreateGraph()
446 if (info()->shared_info()->asm_function()) { in CreateGraph()
447 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); in CreateGraph()
448 info()->MarkAsFunctionContextSpecializing(); in CreateGraph()
449 } else if (info()->has_global_object() && in CreateGraph()
451 info()->MarkAsNativeContextSpecializing(); in CreateGraph()
452 info()->MarkAsTypingEnabled(); in CreateGraph()
454 if (!info()->shared_info()->asm_function() || in CreateGraph()
456 info()->MarkAsDeoptimizationEnabled(); in CreateGraph()
460 compiler::Pipeline pipeline(info()); in CreateGraph()
462 if (!info()->code().is_null()) { in CreateGraph()
472 Scope* scope = info()->scope(); in CreateGraph()
478 if (info()->is_osr() && in CreateGraph()
492 os << "[compiling method " << Brief(*info()->closure()) in CreateGraph()
494 if (info()->is_osr()) os << " OSR"; in CreateGraph()
499 isolate()->GetHTracer()->TraceCompilation(info()); in CreateGraph()
503 AstTyper(info()->isolate(), info()->zone(), info()->closure(), in CreateGraph()
504 info()->scope(), info()->osr_ast_id(), info()->literal()) in CreateGraph()
509 if (info()->shared_info()->optimization_disabled()) { in CreateGraph()
511 info()->shared_info()->disable_optimization_reason()); in CreateGraph()
514 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) in CreateGraph()
515 ? new (info()->zone()) in CreateGraph()
516 HOptimizedGraphBuilderWithPositions(info()) in CreateGraph()
517 : new (info()->zone()) HOptimizedGraphBuilder(info()); in CreateGraph()
528 if (info()->dependencies()->HasAborted()) { in CreateGraph()
545 if (!info()->code().is_null()) { in OptimizeGraph()
622 if (!info()->code().is_null()) { in GenerateCode()
623 info()->dependencies()->Commit(info()->code()); in GenerateCode()
624 if (info()->is_deoptimization_enabled()) { in GenerateCode()
625 info()->parse_info()->context()->native_context()->AddOptimizedCode( in GenerateCode()
626 *info()->code()); in GenerateCode()
627 RegisterWeakObjectsInOptimizedCode(info()->code()); in GenerateCode()
633 DCHECK(!info()->dependencies()->HasAborted()); in GenerateCode()
647 if (info()->bailout_reason() == kNoReason) { in GenerateCode()
653 info()->SetCode(optimized_code); in GenerateCode()
657 info()->context()->native_context()->AddOptimizedCode(*info()->code()); in GenerateCode()
663 Handle<JSFunction> function = info()->closure(); in RecordOptimizationStats()
730 CompilationInfo* info, in RecordFunctionCompilation() argument
738 if (info->isolate()->logger()->is_logging_code_events() || in RecordFunctionCompilation()
739 info->isolate()->cpu_profiler()->is_profiling()) { in RecordFunctionCompilation()
740 Handle<Script> script = info->parse_info()->script(); in RecordFunctionCompilation()
741 Handle<Code> code = info->code(); in RecordFunctionCompilation()
742 if (code.is_identical_to(info->isolate()->builtins()->CompileLazy())) { in RecordFunctionCompilation()
750 : info->isolate()->heap()->empty_string(); in RecordFunctionCompilation()
752 PROFILE(info->isolate(), in RecordFunctionCompilation()
753 CodeCreateEvent(log_tag, *code, *shared, info, script_name, in RecordFunctionCompilation()
759 static bool CompileUnoptimizedCode(CompilationInfo* info) { in CompileUnoptimizedCode() argument
760 DCHECK(AllowCompilation::IsAllowed(info->isolate())); in CompileUnoptimizedCode()
761 if (!Compiler::Analyze(info->parse_info()) || in CompileUnoptimizedCode()
762 !FullCodeGenerator::MakeCode(info)) { in CompileUnoptimizedCode()
763 Isolate* isolate = info->isolate(); in CompileUnoptimizedCode()
785 static bool UseIgnition(CompilationInfo* info) { in UseIgnition() argument
787 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) { in UseIgnition()
793 IgnitionShouldFallbackToFullCodeGen(info->scope())) { in UseIgnition()
798 if (info->closure().is_null()) { in UseIgnition()
804 return info->closure()->PassesFilter(FLAG_ignition_filter); in UseIgnition()
808 static bool GenerateBaselineCode(CompilationInfo* info) { in GenerateBaselineCode() argument
809 if (FLAG_ignition && UseIgnition(info)) { in GenerateBaselineCode()
810 return interpreter::Interpreter::MakeBytecode(info); in GenerateBaselineCode()
812 return FullCodeGenerator::MakeCode(info); in GenerateBaselineCode()
817 static bool CompileBaselineCode(CompilationInfo* info) { in CompileBaselineCode() argument
818 DCHECK(AllowCompilation::IsAllowed(info->isolate())); in CompileBaselineCode()
819 if (!Compiler::Analyze(info->parse_info()) || !GenerateBaselineCode(info)) { in CompileBaselineCode()
820 Isolate* isolate = info->isolate(); in CompileBaselineCode()
829 CompilationInfo* info) { in GetUnoptimizedCodeCommon() argument
830 VMState<COMPILER> state(info->isolate()); in GetUnoptimizedCodeCommon()
831 PostponeInterruptsScope postpone(info->isolate()); in GetUnoptimizedCodeCommon()
834 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>(); in GetUnoptimizedCodeCommon()
835 Handle<SharedFunctionInfo> shared = info->shared_info(); in GetUnoptimizedCodeCommon()
836 FunctionLiteral* lit = info->literal(); in GetUnoptimizedCodeCommon()
842 if (!CompileBaselineCode(info)) return MaybeHandle<Code>(); in GetUnoptimizedCodeCommon()
843 if (info->code()->kind() == Code::FUNCTION) { // Only for full code. in GetUnoptimizedCodeCommon()
844 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); in GetUnoptimizedCodeCommon()
847 // Update the shared function info with the scope info. Allocating the in GetUnoptimizedCodeCommon()
850 ScopeInfo::Create(info->isolate(), info->zone(), info->scope()); in GetUnoptimizedCodeCommon()
853 // Update the code and feedback vector for the shared function info. in GetUnoptimizedCodeCommon()
854 shared->ReplaceCode(*info->code()); in GetUnoptimizedCodeCommon()
855 shared->set_feedback_vector(*info->feedback_vector()); in GetUnoptimizedCodeCommon()
856 if (info->has_bytecode_array()) { in GetUnoptimizedCodeCommon()
858 shared->set_function_data(*info->bytecode_array()); in GetUnoptimizedCodeCommon()
861 return info->code(); in GetUnoptimizedCodeCommon()
882 static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) { in InsertCodeIntoOptimizedCodeMap() argument
883 Handle<Code> code = info->code(); in InsertCodeIntoOptimizedCodeMap()
888 if (info->is_function_context_specializing()) return; in InsertCodeIntoOptimizedCodeMap()
890 DCHECK(!info->is_frame_specializing()); in InsertCodeIntoOptimizedCodeMap()
893 Handle<JSFunction> function = info->closure(); in InsertCodeIntoOptimizedCodeMap()
898 literals, info->osr_ast_id()); in InsertCodeIntoOptimizedCodeMap()
901 if (code->is_turbofanned() && info->is_osr()) return; in InsertCodeIntoOptimizedCodeMap()
905 !info->is_native_context_specializing()) { in InsertCodeIntoOptimizedCodeMap()
906 DCHECK(!info->is_function_context_specializing()); in InsertCodeIntoOptimizedCodeMap()
907 DCHECK(info->osr_ast_id().IsNone()); in InsertCodeIntoOptimizedCodeMap()
931 bool Compiler::Analyze(ParseInfo* info) { in Analyze() argument
932 DCHECK_NOT_NULL(info->literal()); in Analyze()
933 if (!Rewriter::Rewrite(info)) return false; in Analyze()
934 if (!Scope::Analyze(info)) return false; in Analyze()
935 if (!Renumber(info)) return false; in Analyze()
936 DCHECK_NOT_NULL(info->scope()); in Analyze()
941 bool Compiler::ParseAndAnalyze(ParseInfo* info) { in ParseAndAnalyze() argument
942 if (!Parser::ParseStatic(info)) return false; in ParseAndAnalyze()
943 return Compiler::Analyze(info); in ParseAndAnalyze()
947 static bool GetOptimizedCodeNow(CompilationInfo* info) { in GetOptimizedCodeNow() argument
948 Isolate* isolate = info->isolate(); in GetOptimizedCodeNow()
951 if (!Compiler::ParseAndAnalyze(info->parse_info())) return false; in GetOptimizedCodeNow()
955 OptimizedCompileJob job(info); in GetOptimizedCodeNow()
961 info->closure()->ShortPrint(); in GetOptimizedCodeNow()
962 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); in GetOptimizedCodeNow()
969 InsertCodeIntoOptimizedCodeMap(info); in GetOptimizedCodeNow()
970 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, in GetOptimizedCodeNow()
971 info->shared_info()); in GetOptimizedCodeNow()
976 static bool GetOptimizedCodeLater(CompilationInfo* info) { in GetOptimizedCodeLater() argument
977 Isolate* isolate = info->isolate(); in GetOptimizedCodeLater()
983 info->closure()->ShortPrint(); in GetOptimizedCodeLater()
989 CompilationHandleScope handle_scope(info); in GetOptimizedCodeLater()
990 if (!Compiler::ParseAndAnalyze(info->parse_info())) return false; in GetOptimizedCodeLater()
993 info->ReopenHandlesInNewHandleScope(); in GetOptimizedCodeLater()
994 info->parse_info()->ReopenHandlesInNewHandleScope(); in GetOptimizedCodeLater()
996 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); in GetOptimizedCodeLater()
998 OptimizedCompileJob* job = new (info->zone()) OptimizedCompileJob(info); in GetOptimizedCodeLater()
1005 info->closure()->ShortPrint(); in GetOptimizedCodeLater()
1006 if (info->is_osr()) { in GetOptimizedCodeLater()
1007 PrintF(" for concurrent OSR at %d.\n", info->osr_ast_id().ToInt()); in GetOptimizedCodeLater()
1023 CompilationInfoWithZone info(function); in GetUnoptimizedCode() local
1025 ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result, in GetUnoptimizedCode()
1026 GetUnoptimizedCodeCommon(&info), in GetUnoptimizedCode()
1042 CompilationInfoWithZone info(function); in GetLazyCode() local
1047 info.SetOptimizing(BailoutId::None(), handle(function->shared()->code())); in GetLazyCode()
1049 if (GetOptimizedCodeNow(&info)) { in GetLazyCode()
1051 return info.code(); in GetLazyCode()
1062 CompilationInfoWithZone info(function); in GetLazyCode() local
1064 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCodeCommon(&info), in GetLazyCode()
1098 bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) { in EnsureDeoptimizationSupport() argument
1099 DCHECK_NOT_NULL(info->literal()); in EnsureDeoptimizationSupport()
1100 DCHECK(info->has_scope()); in EnsureDeoptimizationSupport()
1101 Handle<SharedFunctionInfo> shared = info->shared_info(); in EnsureDeoptimizationSupport()
1104 CompilationInfoWithZone unoptimized(info->closure()); in EnsureDeoptimizationSupport()
1108 parse_info->set_literal(info->literal()); in EnsureDeoptimizationSupport()
1109 parse_info->set_scope(info->scope()); in EnsureDeoptimizationSupport()
1110 parse_info->set_context(info->context()); in EnsureDeoptimizationSupport()
1112 // If the current code has reloc info for serialization, also include in EnsureDeoptimizationSupport()
1113 // reloc info for serialization for the new code, so that deopt support in EnsureDeoptimizationSupport()
1124 info->MarkAsCompiled(); in EnsureDeoptimizationSupport()
1126 // The scope info might not have been set if a lazily compiled in EnsureDeoptimizationSupport()
1128 if (shared->scope_info() == ScopeInfo::Empty(info->isolate())) { in EnsureDeoptimizationSupport()
1130 ScopeInfo::Create(info->isolate(), info->zone(), info->scope()); in EnsureDeoptimizationSupport()
1148 CompilationInfo info(&parse_info); in CompileEvalForDebugging() local
1149 Isolate* isolate = info.isolate(); in CompileEvalForDebugging()
1158 info.MarkAsDebug(); in CompileEvalForDebugging()
1160 VMState<COMPILER> state(info.isolate()); in CompileEvalForDebugging()
1170 if (!CompileUnoptimizedCode(&info)) { in CompileEvalForDebugging()
1174 shared->ReplaceCode(*info.code()); in CompileEvalForDebugging()
1179 bool CompileForDebugging(CompilationInfo* info) { in CompileForDebugging() argument
1180 info->MarkAsDebug(); in CompileForDebugging()
1181 if (GetUnoptimizedCodeCommon(info).is_null()) { in CompileForDebugging()
1182 info->isolate()->clear_pending_exception(); in CompileForDebugging()
1201 CompilationInfoWithZone info(function); in CompileDebugCode() local
1202 return CompileForDebugging(&info); in CompileDebugCode()
1212 CompilationInfo info(&parse_info); in CompileDebugCode() local
1213 return CompileForDebugging(&info); in CompileDebugCode()
1221 CompilationInfo info(&parse_info); in CompileForLiveEdit() local
1222 PostponeInterruptsScope postpone(info.isolate()); in CompileForLiveEdit()
1223 VMState<COMPILER> state(info.isolate()); in CompileForLiveEdit()
1226 info.MarkAsFirstCompile(); in CompileForLiveEdit()
1227 info.MarkAsDebug(); in CompileForLiveEdit()
1228 info.parse_info()->set_global(); in CompileForLiveEdit()
1229 if (!Parser::ParseStatic(info.parse_info())) return; in CompileForLiveEdit()
1231 LiveEditFunctionTracker tracker(info.isolate(), parse_info.literal()); in CompileForLiveEdit()
1232 if (!CompileUnoptimizedCode(&info)) return; in CompileForLiveEdit()
1233 if (info.has_shared_info()) { in CompileForLiveEdit()
1235 ScopeInfo::Create(info.isolate(), info.zone(), info.scope()); in CompileForLiveEdit()
1236 info.shared_info()->set_scope_info(*scope_info); in CompileForLiveEdit()
1238 tracker.RecordRootFunctionInfo(info.code()); in CompileForLiveEdit()
1242 static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { in CompileToplevel() argument
1243 Isolate* isolate = info->isolate(); in CompileToplevel()
1246 ParseInfo* parse_info = info->parse_info(); in CompileToplevel()
1262 { VMState<COMPILER> state(info->isolate()); in CompileToplevel()
1271 !info->is_debug(); in CompileToplevel()
1289 DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing()); in CompileToplevel()
1291 info->MarkAsFirstCompile(); in CompileToplevel()
1299 HistogramTimer* rate = info->is_eval() in CompileToplevel()
1300 ? info->isolate()->counters()->compile_eval() in CompileToplevel()
1301 : info->isolate()->counters()->compile(); in CompileToplevel()
1305 if (!CompileBaselineCode(info)) { in CompileToplevel()
1310 DCHECK(!info->code().is_null()); in CompileToplevel()
1313 info->code(), in CompileToplevel()
1314 ScopeInfo::Create(info->isolate(), info->zone(), info->scope()), in CompileToplevel()
1315 info->feedback_vector()); in CompileToplevel()
1316 if (info->has_bytecode_array()) { in CompileToplevel()
1318 result->set_function_data(*info->bytecode_array()); in CompileToplevel()
1325 if (info->is_eval()) { in CompileToplevel()
1334 Logger::LogEventsAndTags log_tag = info->is_eval() in CompileToplevel()
1339 log_tag, *info->code(), *result, info, *script_name)); in CompileToplevel()
1350 live_edit_tracker.RecordFunctionInfo(result, lit, info->zone()); in CompileToplevel()
1384 CompilationInfo info(&parse_info); in GetFunctionFromEval() local
1393 shared_info = CompileToplevel(&info); in GetFunctionFromEval()
1512 CompilationInfo info(&parse_info); in CompileScript() local
1526 info.PrepareForSerializing(); in CompileScript()
1530 static_cast<LanguageMode>(info.language_mode() | language_mode)); in CompileScript()
1531 result = CompileToplevel(&info); in CompileScript()
1588 // On the first compile, there are no existing shared function info for in GetSharedFunctionInfo()
1596 // We found an existing shared function info. If it's already compiled, in GetSharedFunctionInfo()
1610 CompilationInfo info(&parse_info); in GetSharedFunctionInfo() local
1614 if (outer_info->will_serialize()) info.PrepareForSerializing(); in GetSharedFunctionInfo()
1615 if (outer_info->is_first_compile()) info.MarkAsFirstCompile(); in GetSharedFunctionInfo()
1616 if (outer_info->is_debug()) info.MarkAsDebug(); in GetSharedFunctionInfo()
1633 (!info.is_debug() || allow_lazy_without_ctx); in GetSharedFunctionInfo()
1641 info.SetCode(code); in GetSharedFunctionInfo()
1649 info.EnsureFeedbackVector(); in GetSharedFunctionInfo()
1651 } else if (Renumber(info.parse_info()) && GenerateBaselineCode(&info)) { in GetSharedFunctionInfo()
1654 DCHECK(!info.code().is_null()); in GetSharedFunctionInfo()
1655 scope_info = ScopeInfo::Create(info.isolate(), info.zone(), info.scope()); in GetSharedFunctionInfo()
1658 info.code()->MarkToBeExecutedOnce(isolate); in GetSharedFunctionInfo()
1665 // Create a shared function info object. in GetSharedFunctionInfo()
1669 literal->kind(), info.code(), scope_info, info.feedback_vector()); in GetSharedFunctionInfo()
1670 if (info.has_bytecode_array()) { in GetSharedFunctionInfo()
1672 result->set_function_data(*info.bytecode_array()); in GetSharedFunctionInfo()
1679 // shared function info for this function literal has been created for the in GetSharedFunctionInfo()
1683 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); in GetSharedFunctionInfo()
1691 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone()); in GetSharedFunctionInfo()
1696 existing->ReplaceCode(*info.code()); in GetSharedFunctionInfo()
1698 existing->set_feedback_vector(*info.feedback_vector()); in GetSharedFunctionInfo()
1732 // TODO(titzer): reuse the AST and scope info from this compile. in GetOptimizedCode()
1755 base::SmartPointer<CompilationInfo> info( in GetOptimizedCode() local
1761 info->SetOptimizing(osr_ast_id, current_code); in GetOptimizedCode()
1764 if (GetOptimizedCodeLater(info.get())) { in GetOptimizedCode()
1765 info.Detach(); // The background recompile job owns this now. in GetOptimizedCode()
1769 info->set_osr_frame(osr_frame); in GetOptimizedCode()
1770 if (GetOptimizedCodeNow(info.get())) return info->code(); in GetOptimizedCode()
1779 // Take ownership of compilation info. Deleting compilation info in GetConcurrentlyOptimizedCode()
1781 base::SmartPointer<CompilationInfo> info(job->info()); in GetConcurrentlyOptimizedCode() local
1782 Isolate* isolate = info->isolate(); in GetConcurrentlyOptimizedCode()
1785 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); in GetConcurrentlyOptimizedCode()
1787 Handle<SharedFunctionInfo> shared = info->shared_info(); in GetConcurrentlyOptimizedCode()
1800 } else if (info->dependencies()->HasAborted()) { in GetConcurrentlyOptimizedCode()
1803 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info.get(), shared); in GetConcurrentlyOptimizedCode()
1804 if (shared->SearchOptimizedCodeMap(info->context()->native_context(), in GetConcurrentlyOptimizedCode()
1805 info->osr_ast_id()).code == nullptr) { in GetConcurrentlyOptimizedCode()
1806 InsertCodeIntoOptimizedCodeMap(info.get()); in GetConcurrentlyOptimizedCode()
1810 info->closure()->ShortPrint(); in GetConcurrentlyOptimizedCode()
1813 return Handle<Code>(*info->code()); in GetConcurrentlyOptimizedCode()
1820 info->closure()->ShortPrint(); in GetConcurrentlyOptimizedCode()
1821 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); in GetConcurrentlyOptimizedCode()
1827 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) in CompilationPhase() argument
1828 : name_(name), info_(info) { in CompilationPhase()
1830 info_zone_start_allocation_size_ = info->zone()->allocation_size(); in CompilationPhase()
1849 bool tracing_on = info()->IsStub() in ShouldProduceTraceOutput()
1852 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); in ShouldProduceTraceOutput()