Lines Matching full:info
181 // passed in shared info, rather than creating a new one. in Initialize()
297 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) in HOptimizedGraphBuilderWithPositions() argument
298 : HOptimizedGraphBuilder(info) { in HOptimizedGraphBuilderWithPositions()
333 DCHECK(info()->IsOptimizing()); in CreateGraph()
334 DCHECK(!info()->IsCompilingForDebugging()); in CreateGraph()
337 // shared function info. in CreateGraph()
338 DCHECK(!info()->shared_info()->optimization_disabled()); in CreateGraph()
349 if (info()->opt_count() > kMaxOptCount) { in CreateGraph()
361 Scope* scope = info()->scope(); in CreateGraph()
367 if (info()->is_osr() && in CreateGraph()
377 if (!info()->closure()->PassesFilter(FLAG_hydrogen_filter)) { in CreateGraph()
386 bool should_recompile = !info()->shared_info()->has_deoptimization_support(); in CreateGraph()
392 if (!Compiler::EnsureDeoptimizationSupport(info())) { in CreateGraph()
400 DCHECK(info()->shared_info()->has_deoptimization_support()); in CreateGraph()
403 if ((FLAG_turbo_asm && info()->shared_info()->asm_function()) || in CreateGraph()
404 info()->closure()->PassesFilter(FLAG_turbo_filter)) { in CreateGraph()
405 compiler::Pipeline pipeline(info()); in CreateGraph()
407 if (!info()->code().is_null()) { in CreateGraph()
409 info()->context()->native_context()->AddOptimizedCode(*info()->code()); in CreateGraph()
416 Handle<String> name = info()->function()->debug_name(); in CreateGraph()
419 isolate()->GetHTracer()->TraceCompilation(info()); in CreateGraph()
423 AstTyper::Run(info()); in CreateGraph()
426 ? new(info()->zone()) HOptimizedGraphBuilderWithPositions(info()) in CreateGraph()
427 : new(info()->zone()) HOptimizedGraphBuilder(info()); in CreateGraph()
430 info()->set_this_has_uses(false); in CreateGraph()
439 if (info()->HasAbortedDueToDependencyChange()) { in CreateGraph()
456 if (!info()->code().is_null()) { in OptimizeGraph()
478 if (!info()->code().is_null()) { in GenerateCode()
483 DCHECK(!info()->HasAbortedDueToDependencyChange()); in GenerateCode()
497 if (info()->bailout_reason() == kNoReason) { in GenerateCode()
502 info()->SetCode(optimized_code); in GenerateCode()
506 info()->context()->native_context()->AddOptimizedCode(*info()->code()); in GenerateCode()
512 Handle<JSFunction> function = info()->closure(); in RecordOptimizationStats()
572 // Sets the function info on a function.
606 CompilationInfo* info, in RecordFunctionCompilation() argument
614 if (info->isolate()->logger()->is_logging_code_events() || in RecordFunctionCompilation()
615 info->isolate()->cpu_profiler()->is_profiling()) { in RecordFunctionCompilation()
616 Handle<Script> script = info->script(); in RecordFunctionCompilation()
617 Handle<Code> code = info->code(); in RecordFunctionCompilation()
618 if (code.is_identical_to(info->isolate()->builtins()->CompileLazy())) { in RecordFunctionCompilation()
626 : info->isolate()->heap()->empty_string(); in RecordFunctionCompilation()
628 PROFILE(info->isolate(), in RecordFunctionCompilation()
629 CodeCreateEvent(log_tag, *code, *shared, info, script_name, in RecordFunctionCompilation()
634 Handle<Script>(info->script()), Handle<Code>(info->code()), in RecordFunctionCompilation()
635 info)); in RecordFunctionCompilation()
639 static bool CompileUnoptimizedCode(CompilationInfo* info) { in CompileUnoptimizedCode() argument
640 DCHECK(AllowCompilation::IsAllowed(info->isolate())); in CompileUnoptimizedCode()
641 DCHECK(info->function() != NULL); in CompileUnoptimizedCode()
642 if (!Rewriter::Rewrite(info)) return false; in CompileUnoptimizedCode()
643 if (!Scope::Analyze(info)) return false; in CompileUnoptimizedCode()
644 DCHECK(info->scope() != NULL); in CompileUnoptimizedCode()
646 if (!FullCodeGenerator::MakeCode(info)) { in CompileUnoptimizedCode()
647 Isolate* isolate = info->isolate(); in CompileUnoptimizedCode()
656 CompilationInfo* info) { in GetUnoptimizedCodeCommon() argument
657 VMState<COMPILER> state(info->isolate()); in GetUnoptimizedCodeCommon()
658 PostponeInterruptsScope postpone(info->isolate()); in GetUnoptimizedCodeCommon()
661 if (!Parser::Parse(info)) return MaybeHandle<Code>(); in GetUnoptimizedCodeCommon()
662 Handle<SharedFunctionInfo> shared = info->shared_info(); in GetUnoptimizedCodeCommon()
663 FunctionLiteral* lit = info->function(); in GetUnoptimizedCodeCommon()
670 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>(); in GetUnoptimizedCodeCommon()
672 CHECK_EQ(Code::FUNCTION, info->code()->kind()); in GetUnoptimizedCodeCommon()
673 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); in GetUnoptimizedCodeCommon()
675 // Update the shared function info with the scope info. Allocating the in GetUnoptimizedCodeCommon()
677 Handle<ScopeInfo> scope_info = ScopeInfo::Create(info->scope(), info->zone()); in GetUnoptimizedCodeCommon()
680 // Update the code and feedback vector for the shared function info. in GetUnoptimizedCodeCommon()
681 shared->ReplaceCode(*info->code()); in GetUnoptimizedCodeCommon()
682 if (shared->optimization_disabled()) info->code()->set_optimizable(false); in GetUnoptimizedCodeCommon()
683 shared->set_feedback_vector(*info->feedback_vector()); in GetUnoptimizedCodeCommon()
685 return info->code(); in GetUnoptimizedCodeCommon()
716 static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) { in InsertCodeIntoOptimizedCodeMap() argument
717 Handle<Code> code = info->code(); in InsertCodeIntoOptimizedCodeMap()
721 if (code->is_turbofanned() && info->is_context_specializing()) return; in InsertCodeIntoOptimizedCodeMap()
725 Handle<JSFunction> function = info->closure(); in InsertCodeIntoOptimizedCodeMap()
732 literals, info->osr_ast_id()); in InsertCodeIntoOptimizedCodeMap()
737 static bool CompileOptimizedPrologue(CompilationInfo* info) { in CompileOptimizedPrologue() argument
738 if (!Parser::Parse(info)) return false; in CompileOptimizedPrologue()
739 if (!Rewriter::Rewrite(info)) return false; in CompileOptimizedPrologue()
740 if (!Scope::Analyze(info)) return false; in CompileOptimizedPrologue()
741 DCHECK(info->scope() != NULL); in CompileOptimizedPrologue()
746 static bool GetOptimizedCodeNow(CompilationInfo* info) { in GetOptimizedCodeNow() argument
747 if (!CompileOptimizedPrologue(info)) return false; in GetOptimizedCodeNow()
749 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); in GetOptimizedCodeNow()
751 OptimizedCompileJob job(info); in GetOptimizedCodeNow()
757 info->closure()->ShortPrint(); in GetOptimizedCodeNow()
758 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); in GetOptimizedCodeNow()
764 DCHECK(!info->isolate()->has_pending_exception()); in GetOptimizedCodeNow()
765 InsertCodeIntoOptimizedCodeMap(info); in GetOptimizedCodeNow()
766 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, in GetOptimizedCodeNow()
767 info->shared_info()); in GetOptimizedCodeNow()
770 info->closure()->ShortPrint(); in GetOptimizedCodeNow()
777 static bool GetOptimizedCodeLater(CompilationInfo* info) { in GetOptimizedCodeLater() argument
778 Isolate* isolate = info->isolate(); in GetOptimizedCodeLater()
782 info->closure()->ShortPrint(); in GetOptimizedCodeLater()
788 CompilationHandleScope handle_scope(info); in GetOptimizedCodeLater()
789 if (!CompileOptimizedPrologue(info)) return false; in GetOptimizedCodeLater()
790 info->SaveHandles(); // Copy handles to the compilation handle scope. in GetOptimizedCodeLater()
792 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); in GetOptimizedCodeLater()
794 OptimizedCompileJob* job = new (info->zone()) OptimizedCompileJob(info); in GetOptimizedCodeLater()
801 info->closure()->ShortPrint(); in GetOptimizedCodeLater()
802 if (info->is_osr()) { in GetOptimizedCodeLater()
803 PrintF(" for concurrent OSR at %d.\n", info->osr_ast_id().ToInt()); in GetOptimizedCodeLater()
819 CompilationInfoWithZone info(function); in GetUnoptimizedCode() local
821 ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result, in GetUnoptimizedCode()
822 GetUnoptimizedCodeCommon(&info), in GetUnoptimizedCode()
833 CompilationInfoWithZone info(function); in GetLazyCode() local
835 VMState<COMPILER> state(info.isolate()); in GetLazyCode()
836 PostponeInterruptsScope postpone(info.isolate()); in GetLazyCode()
838 info.SetOptimizing(BailoutId::None(), in GetLazyCode()
841 info.MarkAsContextSpecializing(); in GetLazyCode()
842 info.MarkAsTypingEnabled(); in GetLazyCode()
843 info.MarkAsInliningDisabled(); in GetLazyCode()
845 if (GetOptimizedCodeNow(&info)) return info.code(); in GetLazyCode()
852 CompilationInfoWithZone info(function); in GetLazyCode() local
854 ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result, in GetLazyCode()
855 GetUnoptimizedCodeCommon(&info), Code); in GetLazyCode()
858 info.isolate()->use_crankshaft() && in GetLazyCode()
859 !info.shared_info()->optimization_disabled() && in GetLazyCode()
860 !info.isolate()->DebuggerHasBreakPoints()) { in GetLazyCode()
878 CompilationInfoWithZone info(shared); in GetUnoptimizedCode() local
879 return GetUnoptimizedCodeCommon(&info); in GetUnoptimizedCode()
902 bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) { in EnsureDeoptimizationSupport() argument
903 if (!info->shared_info()->has_deoptimization_support()) { in EnsureDeoptimizationSupport()
904 CompilationInfoWithZone unoptimized(info->shared_info()); in EnsureDeoptimizationSupport()
907 unoptimized.SetFunction(info->function()); in EnsureDeoptimizationSupport()
908 unoptimized.PrepareForCompilation(info->scope()); in EnsureDeoptimizationSupport()
909 unoptimized.SetContext(info->context()); in EnsureDeoptimizationSupport()
913 Handle<SharedFunctionInfo> shared = info->shared_info(); in EnsureDeoptimizationSupport()
917 // The scope info might not have been set if a lazily compiled in EnsureDeoptimizationSupport()
919 if (shared->scope_info() == ScopeInfo::Empty(info->isolate())) { in EnsureDeoptimizationSupport()
921 ScopeInfo::Create(info->scope(), info->zone()); in EnsureDeoptimizationSupport()
942 CompilationInfoWithZone info(function); in GetDebugCode() local
943 Isolate* isolate = info.isolate(); in GetDebugCode()
946 info.MarkAsDebug(); in GetDebugCode()
953 info.MarkCompilingForDebugging(); in GetDebugCode()
955 info.EnableDeoptimizationSupport(); in GetDebugCode()
957 info.MarkNonOptimizable(); in GetDebugCode()
959 MaybeHandle<Code> maybe_new_code = GetUnoptimizedCodeCommon(&info); in GetDebugCode()
973 CompilationInfoWithZone info(script); in CompileForLiveEdit() local
974 PostponeInterruptsScope postpone(info.isolate()); in CompileForLiveEdit()
975 VMState<COMPILER> state(info.isolate()); in CompileForLiveEdit()
977 info.MarkAsGlobal(); in CompileForLiveEdit()
978 if (!Parser::Parse(&info)) return; in CompileForLiveEdit()
980 LiveEditFunctionTracker tracker(info.isolate(), info.function()); in CompileForLiveEdit()
981 if (!CompileUnoptimizedCode(&info)) return; in CompileForLiveEdit()
982 if (!info.shared_info().is_null()) { in CompileForLiveEdit()
983 Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(), in CompileForLiveEdit()
984 info.zone()); in CompileForLiveEdit()
985 info.shared_info()->set_scope_info(*scope_info); in CompileForLiveEdit()
987 tracker.RecordRootFunctionInfo(info.code()); in CompileForLiveEdit()
991 static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { in CompileToplevel() argument
992 Isolate* isolate = info->isolate(); in CompileToplevel()
995 Handle<Script> script = info->script(); in CompileToplevel()
1003 DCHECK(info->is_eval() || info->is_global()); in CompileToplevel()
1007 { VMState<COMPILER> state(info->isolate()); in CompileToplevel()
1008 if (info->function() == NULL) { in CompileToplevel()
1012 (info->compile_options() == ScriptCompiler::kConsumeParserCache || in CompileToplevel()
1015 !Compiler::DebuggerWantsEagerCompilation(info); in CompileToplevel()
1018 (info->compile_options() == ScriptCompiler::kProduceParserCache || in CompileToplevel()
1019 info->compile_options() == ScriptCompiler::kConsumeParserCache)) { in CompileToplevel()
1024 info->SetCachedData(NULL, ScriptCompiler::kNoCompileOptions); in CompileToplevel()
1026 if (!Parser::Parse(info, parse_allow_lazy)) { in CompileToplevel()
1031 FunctionLiteral* lit = info->function(); in CompileToplevel()
1037 HistogramTimer* rate = info->is_eval() in CompileToplevel()
1038 ? info->isolate()->counters()->compile_eval() in CompileToplevel()
1039 : info->isolate()->counters()->compile(); in CompileToplevel()
1043 if (!CompileUnoptimizedCode(info)) { in CompileToplevel()
1048 DCHECK(!info->code().is_null()); in CompileToplevel()
1051 info->code(), ScopeInfo::Create(info->scope(), info->zone()), in CompileToplevel()
1052 info->feedback_vector()); in CompileToplevel()
1060 Logger::LogEventsAndTags log_tag = info->is_eval() in CompileToplevel()
1065 log_tag, *info->code(), *result, info, *script_name)); in CompileToplevel()
1066 GDBJIT(AddCode(script_name, script, info->code(), info)); in CompileToplevel()
1077 live_edit_tracker.RecordFunctionInfo(result, lit, info->zone()); in CompileToplevel()
1103 CompilationInfoWithZone info(script); in GetFunctionFromEval() local
1104 info.MarkAsEval(); in GetFunctionFromEval()
1105 if (context->IsNativeContext()) info.MarkAsGlobal(); in GetFunctionFromEval()
1106 info.SetStrictMode(strict_mode); in GetFunctionFromEval()
1107 info.SetParseRestriction(restriction); in GetFunctionFromEval()
1108 info.SetContext(context); in GetFunctionFromEval()
1112 shared_info = CompileToplevel(&info); in GetFunctionFromEval()
1199 CompilationInfoWithZone info(script); in CompileScript() local
1200 info.MarkAsGlobal(); in CompileScript()
1201 info.SetCachedData(cached_data, compile_options); in CompileScript()
1202 info.SetExtension(extension); in CompileScript()
1203 info.SetContext(context); in CompileScript()
1206 info.PrepareForSerializing(); in CompileScript()
1208 if (FLAG_use_strict) info.SetStrictMode(STRICT); in CompileScript()
1210 result = CompileToplevel(&info); in CompileScript()
1234 CompilationInfo* info, int source_length) { in CompileStreamedScript() argument
1235 Isolate* isolate = info->isolate(); in CompileStreamedScript()
1239 if (FLAG_use_strict) info->SetStrictMode(STRICT); in CompileStreamedScript()
1242 return CompileToplevel(info); in CompileStreamedScript()
1250 CompilationInfoWithZone info(script); in BuildFunctionInfo() local
1251 info.SetFunction(literal); in BuildFunctionInfo()
1252 info.PrepareForCompilation(literal->scope()); in BuildFunctionInfo()
1253 info.SetStrictMode(literal->scope()->strict_mode()); in BuildFunctionInfo()
1254 if (outer_info->will_serialize()) info.PrepareForSerializing(); in BuildFunctionInfo()
1256 Isolate* isolate = info.isolate(); in BuildFunctionInfo()
1270 !DebuggerWantsEagerCompilation(&info, allow_lazy_without_ctx); in BuildFunctionInfo()
1276 info.SetCode(code); in BuildFunctionInfo()
1278 } else if (FullCodeGenerator::MakeCode(&info)) { in BuildFunctionInfo()
1279 DCHECK(!info.code().is_null()); in BuildFunctionInfo()
1280 scope_info = ScopeInfo::Create(info.scope(), info.zone()); in BuildFunctionInfo()
1285 // Create a shared function info object. in BuildFunctionInfo()
1288 info.code(), scope_info, info.feedback_vector()); in BuildFunctionInfo()
1290 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); in BuildFunctionInfo()
1298 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone()); in BuildFunctionInfo()
1313 SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function)); in GetOptimizedCode() local
1314 Isolate* isolate = info->isolate(); in GetOptimizedCode()
1320 Handle<SharedFunctionInfo> shared = info->shared_info(); in GetOptimizedCode()
1324 // TODO(titzer): reuse the AST and scope info from this compile. in GetOptimizedCode()
1334 info->SetOptimizing(osr_ast_id, current_code); in GetOptimizedCode()
1337 if (GetOptimizedCodeLater(info.get())) { in GetOptimizedCode()
1338 info.Detach(); // The background recompile job owns this now. in GetOptimizedCode()
1342 if (GetOptimizedCodeNow(info.get())) return info->code(); in GetOptimizedCode()
1351 // Take ownership of compilation info. Deleting compilation info in GetConcurrentlyOptimizedCode()
1353 SmartPointer<CompilationInfo> info(job->info()); in GetConcurrentlyOptimizedCode() local
1354 Isolate* isolate = info->isolate(); in GetConcurrentlyOptimizedCode()
1357 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); in GetConcurrentlyOptimizedCode()
1359 Handle<SharedFunctionInfo> shared = info->shared_info(); in GetConcurrentlyOptimizedCode()
1371 } else if (info->HasAbortedDueToDependencyChange()) { in GetConcurrentlyOptimizedCode()
1376 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info.get(), shared); in GetConcurrentlyOptimizedCode()
1377 if (info->shared_info()->SearchOptimizedCodeMap( in GetConcurrentlyOptimizedCode()
1378 info->context()->native_context(), info->osr_ast_id()) == -1) { in GetConcurrentlyOptimizedCode()
1379 InsertCodeIntoOptimizedCodeMap(info.get()); in GetConcurrentlyOptimizedCode()
1383 info->closure()->ShortPrint(); in GetConcurrentlyOptimizedCode()
1386 return Handle<Code>(*info->code()); in GetConcurrentlyOptimizedCode()
1393 info->closure()->ShortPrint(); in GetConcurrentlyOptimizedCode()
1394 PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason())); in GetConcurrentlyOptimizedCode()
1400 bool Compiler::DebuggerWantsEagerCompilation(CompilationInfo* info, in DebuggerWantsEagerCompilation() argument
1402 return LiveEditFunctionTracker::IsActive(info->isolate()) || in DebuggerWantsEagerCompilation()
1403 (info->isolate()->DebuggerHasBreakPoints() && !allow_lazy_without_ctx); in DebuggerWantsEagerCompilation()
1407 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) in CompilationPhase() argument
1408 : name_(name), info_(info), zone_(info->isolate()) { in CompilationPhase()
1410 info_zone_start_allocation_size_ = info->zone()->allocation_size(); in CompilationPhase()
1429 bool tracing_on = info()->IsStub() in ShouldProduceTraceOutput()
1432 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); in ShouldProduceTraceOutput()