History log of /llvm-project/clang/lib/Interpreter/Wasm.cpp (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# a174aa1e 29-Nov-2024 Anutosh Bhat <andersonbhat491@gmail.com>

[clang-repl] Fix generation of wasm binaries while running clang-repl in browser (#117978)

Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>


Revision tags: llvmorg-19.1.4
# 752dbd61 19-Nov-2024 Anutosh Bhat <andersonbhat491@gmail.com>

[clang-repl] Improve flags responsible for generating shared wasm binaries (#116735)

There are a couple changes in this PR that help getting clang-repl to
run in the browser. Using a jupyterlite in

[clang-repl] Improve flags responsible for generating shared wasm binaries (#116735)

There are a couple changes in this PR that help getting clang-repl to
run in the browser. Using a jupyterlite instance for the example pasted
below

1) Updating flags responsible for generating shared wasm binaries that
need to be dynamically loaded Most Importantly as can be seen in the
changes `shared` and `allow-undefined` are crucial.



![image](https://github.com/user-attachments/assets/1183fd44-8951-496a-899a-e4af39a48447)

2) While exiting we encounter this.



![image](https://github.com/user-attachments/assets/9487a3f4-7200-471d-ba88-09e98ccbc47a)


Now as can be seen here


https://github.com/llvm/llvm-project/blob/cd418030de7ae75750bc4e48d1238baf03c675e5/clang/lib/Interpreter/Interpreter.cpp#L421-L430

We call cleanUP in the destructor. Now cleanUP through
IncrementalExecutor tries to deinitialize the JIT which wasn't even
intialized as runCtors in wasm.cpp is a no-op


https://github.com/llvm/llvm-project/blob/cd418030de7ae75750bc4e48d1238baf03c675e5/clang/lib/Interpreter/IncrementalExecutor.cpp#L94-L101


https://github.com/llvm/llvm-project/blob/cd418030de7ae75750bc4e48d1238baf03c675e5/clang/lib/Interpreter/Wasm.cpp#L107-L109

show more ...


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 9a9546e3 02-Jul-2024 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Support wasm execution (#86402)

This commit introduces support for running clang-repl and executing C++
code interactively inside a Javascript engine using WebAssembly when
built with

[clang-repl] Support wasm execution (#86402)

This commit introduces support for running clang-repl and executing C++
code interactively inside a Javascript engine using WebAssembly when
built with Emscripten. This is achieved by producing WASM "shared
libraries" that can be loaded by the Emscripten runtime using dlopen()

More discussion is available in https://reviews.llvm.org/D158140

Co-authored-by: Anubhab Ghosh <anubhabghosh.me@gmail.com>

show more ...