Home | History | Annotate | Download | only in src

Lines Matching defs:function

84   explicit CompilationInfoWithZone(Handle<JSFunction> function)
85 : CompilationInfo(new ParseInfo(&zone_, function)) {}
191 set_output_code_kind(Code::FUNCTION);
271 os << "--- FUNCTION SOURCE (" << shared->DebugName()->ToCString().get()
502 // Type-check the function.
663 Handle<JSFunction> function = info()->closure();
664 if (!function->IsOptimized()) {
666 int opt_count = function->shared()->opt_count();
667 function->shared()->set_opt_count(opt_count + 1);
674 function->ShortPrint();
685 code_size += function->shared()->SourceSize();
843 if (info->code()->kind() == Code::FUNCTION) { // Only for full code.
847 // Update the shared function info with the scope info. Allocating the
853 // Update the code and feedback vector for the shared function info.
866 Handle<JSFunction> function, BailoutId osr_ast_id) {
867 Handle<SharedFunctionInfo> shared(function->shared());
870 function->context()->native_context(), osr_ast_id);
873 if (cached.literals != nullptr) function->set_literals(cached.literals);
875 DCHECK(function->shared()->is_compiled());
886 // Function context specialization folds-in the function context,
889 // Frame specialization implies function context specialization.
893 Handle<JSFunction> function = info->closure();
894 Handle<SharedFunctionInfo> shared(function->shared());
895 Handle<LiteralsArray> literals(function->literals());
896 Handle<Context> native_context(function->context()->native_context());
908 Handle<SharedFunctionInfo> shared(function->shared());
1016 MaybeHandle<Code> Compiler::GetUnoptimizedCode(Handle<JSFunction> function) {
1017 DCHECK(!function->GetIsolate()->has_pending_exception());
1018 DCHECK(!function->is_compiled());
1019 if (function->shared()->is_compiled()) {
1020 return Handle<Code>(function->shared()->code());
1023 CompilationInfoWithZone info(function);
1032 MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
1033 Isolate* isolate = function->GetIsolate();
1035 DCHECK(!function->is_compiled());
1039 if (FLAG_turbo_asm && function->shared()->asm_function() &&
1042 CompilationInfoWithZone info(function);
1047 info.SetOptimizing(BailoutId::None(), handle(function->shared()->code()));
1050 DCHECK(function->shared()->is_compiled());
1058 if (function->shared()->is_compiled()) {
1059 return Handle<Code>(function->shared()->code());
1062 CompilationInfoWithZone info(function);
1070 function, result,
1080 bool Compiler::Compile(Handle<JSFunction> function, ClearExceptionFlag flag) {
1081 if (function->is_compiled()) return true;
1082 MaybeHandle<Code> maybe_code = Compiler::GetLazyCode(function);
1086 function->GetIsolate()->clear_pending_exception();
1090 function->ReplaceCode(*code);
1091 DCHECK(function->is_compiled());
1115 if (shared->code()->kind() == Code::FUNCTION &&
1127 // function is inlined before being called for the first time.
1141 bool CompileEvalForDebugging(Handle<JSFunction> function,
1144 Handle<Context> context(function->context());
1196 bool Compiler::CompileDebugCode(Handle<JSFunction> function) {
1197 Handle<SharedFunctionInfo> shared(function->shared());
1199 return CompileEvalForDebugging(function, shared);
1201 CompilationInfoWithZone info(function);
1225 // Get rid of old list of shared function infos.
1297 // rest of the function into account to avoid overlap with the
1309 // Allocate function.
1343 // the instances of the function.
1419 // may require to recompile the eval for debugging, if we find a function
1509 // Compile the function and add it to the cache.
1588 // On the first compile, there are no existing shared function info for
1596 // We found an existing shared function info. If it's already compiled,
1619 // Determine if the function can be lazily compiled. This is necessary to
1622 // if a function uses the special natives syntax, which is something the
1642 // There's no need in theory for a lazy-compiled function to have a type
1646 // parsing we might not know that, if this function was never parsed before.
1665 // Create a shared function info object.
1678 // If the outer function has been compiled before, we cannot be sure that
1679 // shared function info for this function literal has been created for the
1688 // the resulting function.
1704 MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
1709 Isolate* isolate = function->GetIsolate();
1710 Handle<SharedFunctionInfo> shared(function->shared(), isolate);
1715 function, osr_ast_id).ToHandle(&cached_code)) {
1718 function->ShortPrint();
1731 // The function was never compiled. Compile it unoptimized first.
1733 CompilationInfoWithZone unoptimized(function);
1756 new CompilationInfoWithZone(function));
1793 // 2) The function may have already been optimized by OSR. Simply continue.