Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make explicit where WebAssembly actually depends on JIT #17688

Conversation

rkirsling
Copy link
Member

@rkirsling rkirsling commented Sep 12, 2023

fb59fe5

Make explicit where WebAssembly actually depends on JIT
https://bugs.webkit.org/show_bug.cgi?id=261458

Reviewed by Justin Michaud.

As a step toward removing our WebAssembly implementation's JIT dependence,
this patch makes it possible to build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration.

Such a build will of course encounter runtime issues, since this patch does not implement replacement functionality;
however, it is still useful to clearly demarcate which code is dependent on JIT and thereby discontinue our assumption
that ENABLE(WEBASSEMBLY) implies ENABLE(JIT).

* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::CatchInfo::CatchInfo):
* Source/JavaScriptCore/jit/JITExceptions.cpp:
(JSC::genericUnwind):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/LLIntData.h:
(JSC::LLInt::getCodePtr):
(JSC::LLInt::getWide16CodePtr):
(JSC::LLInt::getWide32CodePtr):
(JSC::LLInt::getWide32CodeFunctionPtr):
* Source/JavaScriptCore/runtime/InitializeThreading.cpp:
(JSC::initialize):
* Source/JavaScriptCore/wasm/WasmBinding.cpp:
* Source/JavaScriptCore/wasm/WasmBinding.h:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::runWithDowncast):
* Source/JavaScriptCore/wasm/WasmCallee.h:
* Source/JavaScriptCore/wasm/WasmEntryPlan.cpp:
(JSC::Wasm::EntryPlan::prepare):
* Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):
* Source/JavaScriptCore/wasm/WasmFormat.h:
* Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp:
(JSC::Wasm::IPIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmThunks.cpp:
* Source/JavaScriptCore/wasm/WasmThunks.h:
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
* Source/JavaScriptCore/wasm/js/JSToWasm.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::createStub):
(JSC::JSWebAssemblyModule::clearJSCallICs):
(JSC::JSWebAssemblyModule::finalizeUnconditionally):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h:
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
* Source/JavaScriptCore/wasm/js/WasmToJS.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:

Canonical link: https://commits.webkit.org/268172@main

9342ad5

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@rkirsling rkirsling requested a review from a team as a code owner September 12, 2023 07:35
@rkirsling rkirsling self-assigned this Sep 12, 2023
@rkirsling rkirsling added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Sep 12, 2023
@rkirsling rkirsling force-pushed the eng/Make-explicit-where-WebAssembly-actually-depends-on-JIT branch from 78c75b5 to 7ffd39d Compare September 13, 2023 04:00
@rkirsling rkirsling force-pushed the eng/Make-explicit-where-WebAssembly-actually-depends-on-JIT branch from 7ffd39d to 6b871cb Compare September 13, 2023 06:35
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@rkirsling rkirsling removed the merging-blocked Applied to prevent a change from being merged label Sep 14, 2023
@rkirsling rkirsling force-pushed the eng/Make-explicit-where-WebAssembly-actually-depends-on-JIT branch from 6b871cb to 9342ad5 Compare September 14, 2023 01:30
Copy link
Contributor

@justinmichaud justinmichaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@justinmichaud justinmichaud added the merge-queue Applied to send a pull request to merge-queue label Sep 20, 2023
https://bugs.webkit.org/show_bug.cgi?id=261458

Reviewed by Justin Michaud.

As a step toward removing our WebAssembly implementation's JIT dependence,
this patch makes it possible to build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration.

Such a build will of course encounter runtime issues, since this patch does not implement replacement functionality;
however, it is still useful to clearly demarcate which code is dependent on JIT and thereby discontinue our assumption
that ENABLE(WEBASSEMBLY) implies ENABLE(JIT).

* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::CatchInfo::CatchInfo):
* Source/JavaScriptCore/jit/JITExceptions.cpp:
(JSC::genericUnwind):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/LLIntData.h:
(JSC::LLInt::getCodePtr):
(JSC::LLInt::getWide16CodePtr):
(JSC::LLInt::getWide32CodePtr):
(JSC::LLInt::getWide32CodeFunctionPtr):
* Source/JavaScriptCore/runtime/InitializeThreading.cpp:
(JSC::initialize):
* Source/JavaScriptCore/wasm/WasmBinding.cpp:
* Source/JavaScriptCore/wasm/WasmBinding.h:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::runWithDowncast):
* Source/JavaScriptCore/wasm/WasmCallee.h:
* Source/JavaScriptCore/wasm/WasmEntryPlan.cpp:
(JSC::Wasm::EntryPlan::prepare):
* Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):
* Source/JavaScriptCore/wasm/WasmFormat.h:
* Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp:
(JSC::Wasm::IPIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmThunks.cpp:
* Source/JavaScriptCore/wasm/WasmThunks.h:
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
* Source/JavaScriptCore/wasm/js/JSToWasm.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::createStub):
(JSC::JSWebAssemblyModule::clearJSCallICs):
(JSC::JSWebAssemblyModule::finalizeUnconditionally):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h:
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
* Source/JavaScriptCore/wasm/js/WasmToJS.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:

Canonical link: https://commits.webkit.org/268172@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Make-explicit-where-WebAssembly-actually-depends-on-JIT branch from 9342ad5 to fb59fe5 Compare September 20, 2023 02:40
@webkit-commit-queue
Copy link
Collaborator

Committed 268172@main (fb59fe5): https://commits.webkit.org/268172@main

Reviewed commits have been landed. Closing PR #17688 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit fb59fe5 into WebKit:main Sep 20, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 20, 2023
@rkirsling rkirsling deleted the eng/Make-explicit-where-WebAssembly-actually-depends-on-JIT branch September 20, 2023 02:58
mmitchel pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Jul 12, 2024
* According to latest comment [1] and the mentioned pull request
[2], build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration is
supported, so original issue already fixed in current version, the
EXTRA_OECMAKE setting is not needed anymore.

* This EXTRA_OECMAKE setting causes following configure error on
beaglebone-yocto, remove the setting to let the configure process decide
the configuration:
CMake Error at Source/cmake/WebKitFeatures.cmake:312 (message):
  ENABLE_JIT conflicts with ENABLE_C_LOOP.  You must disable one or the
  other.

[YOCTO #15254]

[1] WebKit/WebKit#17447
[2] WebKit/WebKit#17688

(From OE-Core rev: d3e174a584f73c585220db843cd009d4ba0c43bf)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
mmitchel pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Jul 14, 2024
* According to latest comment [1] and the mentioned pull request
[2], build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration is
supported, so original issue already fixed in current version, the
EXTRA_OECMAKE setting is not needed anymore.

* This EXTRA_OECMAKE setting causes following configure error on
beaglebone-yocto, remove the setting to let the configure process decide
the configuration:
CMake Error at Source/cmake/WebKitFeatures.cmake:312 (message):
  ENABLE_JIT conflicts with ENABLE_C_LOOP.  You must disable one or the
  other.

[YOCTO #15254]

[1] WebKit/WebKit#17447
[2] WebKit/WebKit#17688

(From OE-Core rev: feeadc65bdae8ad9ba6f5e5fefa7a2466479fe87)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
mmitchel pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Jul 16, 2024
* According to latest comment [1] and the mentioned pull request
[2], build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration is
supported, so original issue already fixed in current version, the
EXTRA_OECMAKE setting is not needed anymore.

* This EXTRA_OECMAKE setting causes following configure error on
beaglebone-yocto, remove the setting to let the configure process decide
the configuration:
CMake Error at Source/cmake/WebKitFeatures.cmake:312 (message):
  ENABLE_JIT conflicts with ENABLE_C_LOOP.  You must disable one or the
  other.

[YOCTO #15254]

[1] WebKit/WebKit#17447
[2] WebKit/WebKit#17688

(From OE-Core rev: feeadc65bdae8ad9ba6f5e5fefa7a2466479fe87)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Jul 17, 2024
* According to latest comment [1] and the mentioned pull request
[2], build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration is
supported, so original issue already fixed in current version, the
EXTRA_OECMAKE setting is not needed anymore.

* This EXTRA_OECMAKE setting causes following configure error on
beaglebone-yocto, remove the setting to let the configure process decide
the configuration:
CMake Error at Source/cmake/WebKitFeatures.cmake:312 (message):
  ENABLE_JIT conflicts with ENABLE_C_LOOP.  You must disable one or the
  other.

[YOCTO #15254]

[1] WebKit/WebKit#17447
[2] WebKit/WebKit#17688

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
halstead pushed a commit to yoctoproject/poky that referenced this pull request Jul 17, 2024
* According to latest comment [1] and the mentioned pull request
[2], build an ENABLE(WEBASSEMBLY) && !ENABLE(JIT) configuration is
supported, so original issue already fixed in current version, the
EXTRA_OECMAKE setting is not needed anymore.

* This EXTRA_OECMAKE setting causes following configure error on
beaglebone-yocto, remove the setting to let the configure process decide
the configuration:
CMake Error at Source/cmake/WebKitFeatures.cmake:312 (message):
  ENABLE_JIT conflicts with ENABLE_C_LOOP.  You must disable one or the
  other.

[YOCTO #15254]

[1] WebKit/WebKit#17447
[2] WebKit/WebKit#17688

(From OE-Core rev: feeadc65bdae8ad9ba6f5e5fefa7a2466479fe87)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
5 participants