Lines Matching refs:shared
246 position_ = debug_info->shared().StartPosition();
500 Handle<SharedFunctionInfo> shared(break_target->shared(), isolate_);
501 if (!EnsureBreakInfo(shared)) return;
502 PrepareFunctionForDebugExecution(shared);
504 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
576 if (location.IsSuspend() && (!IsGeneratorFunction(shared->kind()) ||
673 if (!function->shared().HasBreakInfo()) {
677 Handle<DebugInfo> debug_info(function->shared().GetDebugInfo(), isolate_);
723 bool Debug::SetBreakpoint(Handle<SharedFunctionInfo> shared,
730 if (!EnsureBreakInfo(shared)) return false;
731 PrepareFunctionForDebugExecution(shared);
733 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
766 // Obtain shared function info for the innermost function containing this
772 auto shared = Handle<SharedFunctionInfo>::cast(result);
773 if (!EnsureBreakInfo(shared)) return false;
774 PrepareFunctionForDebugExecution(shared);
776 // Find the nested shared function info that is closest to the position within
778 shared = FindClosestSharedFunctionInfoFromPosition(*source_position, script,
779 shared);
782 return SetBreakpoint(shared, break_point, source_position);
863 Handle<SharedFunctionInfo> shared = handle(function->shared(), isolate_);
864 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
873 bool Debug::SetBreakpointForFunction(Handle<SharedFunctionInfo> shared,
887 if (shared->HasWasmExportedFunctionData()) {
888 int func_index = shared->wasm_exported_function_data().function_index();
890 shared->wasm_exported_function_data().instance(), isolate_);
897 return SetBreakpoint(shared, breakpoint, &source_position);
984 void Debug::FloodWithOneShot(Handle<SharedFunctionInfo> shared,
987 if (IsBlackboxed(shared)) return;
989 if (!EnsureBreakInfo(shared)) return;
990 PrepareFunctionForDebugExecution(shared);
992 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
1077 Handle<SharedFunctionInfo> shared(function->shared(), isolate_);
1078 if (IsBlackboxed(shared)) return;
1081 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_));
1095 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_));
1162 summary.AsJavaScript().function()->shared(), isolate_);
1193 Handle<SharedFunctionInfo> shared;
1203 shared = Handle<SharedFunctionInfo>(function->shared(), isolate_);
1204 if (!EnsureBreakInfo(shared)) return;
1205 PrepareFunctionForDebugExecution(shared);
1210 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
1217 (step_action == StepOut || (IsGeneratorFunction(shared->kind()) &&
1232 if (step_action == StepOver && IsBlackboxed(shared)) step_action = StepOut;
1263 if (!shared.is_null()) {
1264 if (!location.IsReturnOrSuspend() && !IsBlackboxed(shared)) {
1269 FloodWithOneShot(shared, true);
1272 if (IsAsyncFunction(shared->kind())) {
1335 FloodWithOneShot(shared);
1342 Isolate* isolate, Handle<SharedFunctionInfo> shared) {
1344 if (!shared->HasBreakInfo()) {
1348 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate);
1404 explicit DiscardBaselineCodeVisitor(SharedFunctionInfo shared)
1405 : shared_(shared) {}
1412 if (!deopt_all && it.frame()->function().shared() != shared_) continue;
1451 void Debug::DiscardBaselineCode(SharedFunctionInfo shared) {
1453 DCHECK(shared.HasBaselineCode());
1454 Isolate* isolate = shared.GetIsolate();
1455 DiscardBaselineCodeVisitor visitor(shared);
1461 shared.FlushBaselineCode();
1466 if (fun.shared() == shared && fun.ActiveTierIsBaseline()) {
1488 SharedFunctionInfo shared = SharedFunctionInfo::cast(obj);
1489 if (shared.HasBaselineCode()) {
1490 shared.FlushBaselineCode();
1496 void Debug::DeoptimizeFunction(Handle<SharedFunctionInfo> shared) {
1498 // Deoptimize all code compiled from this shared function info including
1502 if (shared->HasBaselineCode()) {
1503 DiscardBaselineCode(*shared);
1511 if (code.Inlines(*shared)) {
1524 Handle<SharedFunctionInfo> shared) {
1529 DCHECK(shared->is_compiled());
1530 DCHECK(shared->HasDebugInfo());
1531 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
1543 DeoptimizeFunction(shared);
1546 if (shared->HasBytecodeArray()) {
1547 DCHECK(!shared->HasBaselineCode());
1548 SharedFunctionInfo::InstallDebugBytecode(shared, isolate_);
1556 *shared, RedirectActiveFunctions::Mode::kUseDebugBytecode);
1580 if (current->debug_info()->shared().IsApiFunction()) {
1600 SharedFunctionInfo shared = fun.shared();
1601 if (!shared.HasDebugInfo()) continue;
1602 if (!shared.GetDebugInfo().CanBreakAtEntry()) continue;
1613 // to shared code, we bypass CompileLazy. Perform CompileLazy here instead.
1673 Handle<SharedFunctionInfo> shared =
1675 if (!EnsureBreakInfo(shared)) return false;
1676 PrepareFunctionForDebugExecution(shared);
1678 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
1703 void NewCandidate(SharedFunctionInfo shared,
1705 if (!shared.IsSubjectToDebugging()) return;
1706 int start_position = shared.function_token_position();
1708 start_position = shared.StartPosition();
1712 if (target_position_ >= shared.EndPosition()) {
1718 if (!shared.is_toplevel() || target_position_ > shared.EndPosition()) {
1725 shared.EndPosition() == current_candidate_.EndPosition()) {
1731 if (!current_candidate_.is_toplevel() && shared.is_toplevel()) return;
1733 current_candidate_.EndPosition() < shared.EndPosition()) {
1739 current_candidate_ = shared;
1785 // Find all shared function infos of functions that are intersecting from
1884 // Go through all shared function infos associated with this script to
1886 // If there is no shared function info for this script at all, there is
1889 SharedFunctionInfo shared;
1892 shared = FindSharedFunctionInfoCandidate(position, script, isolate_);
1893 if (shared.is_null()) {
1895 // It might be that the shared function info is not available as the
1903 is_compiled_scope = shared.is_compiled_scope(isolate_);
1905 Handle<SharedFunctionInfo> shared_handle(shared, isolate_);
1907 // function in order to create this shared function info. So there can
1919 DCHECK(shared.allows_lazy_compilation());
1920 if (!Compiler::Compile(isolate_, handle(shared, isolate_),
1928 // Ensures the debug information is present for shared.
1929 bool Debug::EnsureBreakInfo(Handle<SharedFunctionInfo> shared) {
1931 // Return if we already have the break info for shared.
1932 if (shared->HasBreakInfo()) return true;
1933 if (!shared->IsSubjectToDebugging() && !CanBreakAtEntry(shared)) {
1936 IsCompiledScope is_compiled_scope = shared->is_compiled_scope(isolate_);
1938 !Compiler::Compile(isolate_, shared, Compiler::CLEAR_EXCEPTION,
1942 CreateBreakInfo(shared);
1946 void Debug::CreateBreakInfo(Handle<SharedFunctionInfo> shared) {
1949 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
1961 if (CanBreakAtEntry(shared)) flags |= DebugInfo::kCanBreakAtEntry;
1965 SharedFunctionInfo::EnsureSourcePositionsAvailable(isolate_, shared);
1969 Handle<SharedFunctionInfo> shared) {
1971 if (shared->HasDebugInfo()) return handle(shared->GetDebugInfo(), isolate_);
1974 Handle<DebugInfo> debug_info = isolate_->factory()->NewDebugInfo(shared);
1982 void Debug::InstallCoverageInfo(Handle<SharedFunctionInfo> shared,
1987 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
2066 debug_info->shared().set_script_or_debug_info(debug_info->script(),
2077 Handle<SharedFunctionInfo> shared(frame->function().shared(), isolate_);
2080 if (!shared->HasBreakInfo()) return false;
2083 Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
2302 bool Debug::IsBlackboxed(Handle<SharedFunctionInfo> shared) {
2304 if (!debug_delegate_) return !shared->IsSubjectToDebugging();
2305 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
2308 !shared->IsSubjectToDebugging() || !shared->script().IsScript();
2314 DCHECK(shared->script().IsScript());
2315 Handle<Script> script(Script::cast(shared->script()), isolate_);
2317 debug::Location start = GetDebugLocation(script, shared->StartPosition());
2318 debug::Location end = GetDebugLocation(script, shared->EndPosition());
2365 bool Debug::CanBreakAtEntry(Handle<SharedFunctionInfo> shared) {
2368 if (shared->native() || shared->IsApiFunction()) {
2370 DCHECK(!shared->IsSubjectToDebugging());
2494 Handle<SharedFunctionInfo> shared(function->shared(), isolate_);
2496 ? IsBlackboxed(shared)
2499 if (function->shared().HasBreakInfo()) {
2500 Handle<DebugInfo> debug_info(function->shared().GetDebugInfo(),
2644 DCHECK(debug_info->shared().HasBytecodeArray());
2740 function->shared().is_compiled_scope(isolate_));
2747 Handle<SharedFunctionInfo> shared(function->shared(), isolate_);
2748 Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
2755 function->shared().DebugNameCStr().get());
2762 if (!shared->HasBytecodeArray()) {
2767 DCHECK(shared->is_compiled());
2768 PrepareFunctionForDebugExecution(shared);
2847 SharedFunctionInfo shared = frame->function().shared();
2848 BytecodeArray bytecode_array = shared.GetBytecodeArray(isolate_);