[webkit-changes] [WebKit/WebKit] 6e2471: Web Inspector: Debugger: symbolic breakpoints shou...
Devin Rousso
noreply at github.com
Fri Sep 16 17:22:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6e24711b797d54de605cf9034c26f86ccc7d1c4e
https://github.com/WebKit/WebKit/commit/6e24711b797d54de605cf9034c26f86ccc7d1c4e
Author: Devin Rousso <drousso at apple.com>
Date: 2022-09-16 (Fri, 16 Sep 2022)
Changed paths:
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-insensitive-expected.txt
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-insensitive.html
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-sensitive-expected.txt
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-sensitive.html
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-insensitive-expected.txt
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-insensitive.html
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-sensitive-expected.txt
A LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-sensitive.html
M LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-insensitive.html
M Source/JavaScriptCore/dfg/DFGThunks.cpp
M Source/JavaScriptCore/dfg/DFGThunks.h
M Source/JavaScriptCore/ftl/FTLThunks.cpp
M Source/JavaScriptCore/ftl/FTLThunks.h
M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
M Source/JavaScriptCore/jit/JIT.cpp
M Source/JavaScriptCore/jit/JIT.h
M Source/JavaScriptCore/jit/JITCall.cpp
M Source/JavaScriptCore/jit/JITCode.cpp
M Source/JavaScriptCore/jit/JITCode.h
M Source/JavaScriptCore/jit/JITOpcodes.cpp
M Source/JavaScriptCore/jit/JITPropertyAccess.cpp
M Source/JavaScriptCore/jit/JITThunks.cpp
M Source/JavaScriptCore/jit/JITThunks.h
M Source/JavaScriptCore/jit/JSInterfaceJIT.h
M Source/JavaScriptCore/jit/SpecializedThunkJIT.h
M Source/JavaScriptCore/jit/ThunkGenerator.h
M Source/JavaScriptCore/jit/ThunkGenerators.cpp
M Source/JavaScriptCore/jit/ThunkGenerators.h
M Source/JavaScriptCore/runtime/VM.cpp
M Source/JavaScriptCore/runtime/VM.h
Log Message:
-----------
Web Inspector: Debugger: symbolic breakpoints should work with intrinsic functions
https://bugs.webkit.org/show_bug.cgi?id=243994
<rdar://problem/99037335>
Reviewed by Yusuke Suzuki.
This should bring symbolic breakpoint "coverage" up even higher, possibly even to 100%.
* Source/JavaScriptCore/jit/ThunkGenerator.h:
* Source/JavaScriptCore/jit/ThunkGenerators.h:
* Source/JavaScriptCore/jit/ThunkGenerators.cpp:
(JSC::handleExceptionGenerator):
(JSC::handleExceptionWithCallFrameRollbackGenerator):
(JSC::popThunkStackPreservesAndHandleExceptionGenerator):
(JSC::checkExceptionGenerator):
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::virtualThunkForRegularCall):
(JSC::virtualThunkForTailCall):
(JSC::virtualThunkForConstructConstruct):
(JSC::nativeForGenerator):
(JSC::nativeCallGenerator):
(JSC::nativeTailCallGenerator):
(JSC::nativeTailCallWithoutSavedTagsGenerator):
(JSC::nativeConstructGenerator):
(JSC::internalFunctionCallGenerator):
(JSC::internalFunctionConstructGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::stringGetByValGenerator):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::stringPrototypeCodePointAtThunkGenerator):
(JSC::clz32ThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::floorThunkGenerator):
(JSC::ceilThunkGenerator):
(JSC::truncThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::expThunkGenerator):
(JSC::logThunkGenerator):
(JSC::absThunkGenerator):
(JSC::imulThunkGenerator):
(JSC::randomThunkGenerator):
(JSC::boundFunctionCallGenerator):
(JSC::remoteFunctionCallGenerator):
(JSC::nativeCallWithDebuggerHookGenerator): Deleted.
(JSC::nativeConstructWithDebuggerHookGenerator): Deleted.
* Source/JavaScriptCore/jit/JITThunks.h:
* Source/JavaScriptCore/jit/JITThunks.cpp:
(JSC::JITThunks::ctiNativeCall):
(JSC::JITThunks::ctiNativeConstruct):
(JSC::JITThunks::ctiNativeTailCall):
(JSC::JITThunks::ctiNativeTailCallWithoutSavedTags):
(JSC::JITThunks::ctiInternalFunctionCall):
(JSC::JITThunks::ctiInternalFunctionConstruct):
(JSC::JITThunks::ctiStubImpl):
(JSC::JITThunks::ctiStub):
(JSC::JITThunks::ctiSlowPathFunctionStub):
(JSC::JITThunks::hostFunctionStub):
(JSC::JITThunks::ctiNativeCallWithDebuggerHook): Deleted.
(JSC::JITThunks::ctiNativeConstructWithDebuggerHook): Deleted.
* Source/JavaScriptCore/dfg/DFGThunks.h:
* Source/JavaScriptCore/dfg/DFGThunks.cpp:
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):
* Source/JavaScriptCore/ftl/FTLThunks.h:
* Source/JavaScriptCore/ftl/FTLThunks.cpp:
(JSC::FTL::osrExitGenerationThunkGenerator):
(JSC::FTL::lazySlowPathGenerationThunkGenerator):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::consistencyCheckGenerator):
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::returnFromBaselineGenerator):
* Source/JavaScriptCore/jit/JITOpcodes.cpp:
(JSC::JIT::valueIsFalseyGenerator):
(JSC::JIT::valueIsTruthyGenerator):
(JSC::JIT::op_throw_handlerGenerator):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::op_check_traps_handlerGenerator):
* Source/JavaScriptCore/jit/JITPropertyAccess.cpp:
(JSC::JIT::slow_op_get_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_get_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_put_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_put_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_del_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_del_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_get_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_get_by_id_with_this_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::slow_op_put_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::slow_op_resolve_scopeGenerator):
(JSC::JIT::generateOpGetFromScopeThunk):
(JSC::JIT::slow_op_get_from_scopeGenerator):
(JSC::JIT::slow_op_put_to_scopeGenerator):
(JSC::JIT::slow_op_get_by_val_with_this_callSlowOperationThenCheckExceptionGenerator):
* Source/JavaScriptCore/runtime/VM.h:
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::VM::thunkGeneratorForIntrinsic):
(JSC::VM::getCTIStub):
(JSC::VM::getHostFunction):
(JSC::VM::getCTIInternalFunctionTrampolineFor):
Instead of having entirely separate ways to generate JIT thunks with debugger hooks (e.g. having a
`ctiNativeCallWithDebuggerHook` alongside a `ctiNativeCall`), require that all `ThunkGenerator` have
a `IncludeDebuggerHook` as a second paramenter, including that in the hash when caching the result.
This way, there only one path to generating JIT thunks (and future engineers will be reminded to
consider the debugging story (if any) instead of potentially leaving that aside). Only JIT thunks
generated by generators defined in `VM::thunkGeneratorForIntrinsic` currently need to use this new
`IncludeDebuggerHook` parameter, as otherwise they either aren't a `NativeExecutable` entry point or
go down the already supported path for `NativeJITCode`/`NativeDOMJITCode`.
* Source/JavaScriptCore/jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::emitDebuggerHook): Added.
Add a utility function to emit JIT code that calls into `operationDebuggerWillCallNativeExecutable`.
* Source/JavaScriptCore/jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::checkArgCount): Added.
Separate the argument count check into it's own callable utility function so that the existing
callsites can wait to invoke it until after any debugger hooks are added.
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::functionName):
(Inspector::ReplacedThunk::~ReplacedThunk):
(Inspector::InspectorDebuggerAgent::addSymbolicBreakpoint):
(Inspector::InspectorDebuggerAgent::didCreateNativeExecutable):
* Source/JavaScriptCore/jit/JITCode.h:
(JSC::JITCode::canSwapCodePtrWithArityCheckForDebugger const): Added.
* Source/JavaScriptCore/jit/JITCode.cpp:
(JSC::JITCode::swapCodePtrWithArityCheckForDebugger): Added.
(JSC::DirectJITCode::swapCodePtrWithArityCheckForDebugger): Added.
Add a way for the `Debugger` (really the `InspectorDebuggerAgent`) to replace the `m_withArityCheck`
of `DirectJITCode` with a version generated with `IncludeDebuggerHook::Yes`.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-insensitive.html: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-insensitive-expected.txt: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-sensitive.html: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-exact-case-sensitive-expected.txt: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-insensitive.html: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-insensitive-expected.txt: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-sensitive.html: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-intrinsic-js-regex-case-sensitive-expected.txt: Added.
* LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-insensitive.html:
Drive-by: Fix incorrect symbol name.
Canonical link: https://commits.webkit.org/254576@main
More information about the webkit-changes
mailing list