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

Merge upstream 3.1.56 #64

Merged
merged 1,524 commits into from
Apr 12, 2024
Merged
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jan 22, 2024

  1. embind: Ensure embind works under c++11. (emscripten-core#21100)

    We no longer need to test c++17 since that is the default used, but we
    should ensure we maintain compatibility with c++11.
    brendandahl authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    8d4e172 View commit details
    Browse the repository at this point in the history
  2. Fix C++ function signatures in mimalloc (emscripten-core#21127)

    The C++ functions that take `std::nothrow_t` all take a reference.
    Without this change I'm seeing function signature mismatches because the
    final argument is not pointer-width.  I'm guessing this simply went
    unnoticed because most platforms don't do signature checking in the
    linker and this just happens to work.
    
    e.g.  `_ZnwjRKSt9nothrow_t` which demangles to `operator new(unsigned
    int, std::nothrow_t const&)`
    
    See upstream bug at microsoft/mimalloc#840.
    sbc100 authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    dcdbc8a View commit details
    Browse the repository at this point in the history
  3. Bump github/codeql-action from 2.22.5 to 3.23.1 (emscripten-core#21134)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.5 to 3.23.1.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@74483a3...0b21cf2)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    638edfa View commit details
    Browse the repository at this point in the history
  4. [test] Pass filename explicitly to compile_btest helper. NFC (emscr…

    …ipten-core#21103)
    
    This allows us to use `compiler_for` to determine whether to run
    `EMCC` or `EMXX` appropriately.
    sbc100 authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    c701ee3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    61ad49f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    da25bce View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Use single quotes in JS code where possible. NFC (emscripten-core#21133)

    For some reason this actually saves on code size too.
    sbc100 authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    7e6366d View commit details
    Browse the repository at this point in the history
  2. WebGPU: Fill out webgpu-externs.js (emscripten-core#21144)

    Fixes test browser.test_webgpu_basic_rendering_closure by fixing
    wgpuShaderModuleGetCompilationInfo (compilationInfo.messages.length).
    
    Fixes: emscripten-core#20415
    kainino0x authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    3e0d3ae View commit details
    Browse the repository at this point in the history
  3. Remove second argument to ErrnoError. NFC (emscripten-core#21136)

    There was only one single place (out of hundreds) where this was set
    and one single place in `doStat` where it was read.
    
    I removed the `doStat` workaround by updating `mayLookup` instead.
    sbc100 authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    b25e4c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    50a7531 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Convert test_stat_fail_alongtheway to a file based test (emscripten-c…

    …ore#21138)
    
    Also remove the special logging and just use assert which fails
    fast and gives a backtrace.
    sbc100 authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    fb4bdc7 View commit details
    Browse the repository at this point in the history
  2. Minor webidl binder fixes (emscripten-core#21152)

    Split out from emscripten-core#21151.
    
    The only semantic change here is the fix the type of second argument to
    to the array member getter function (previously it was using
    `m.type` which is the array type itself, but that second argument to the
    setter function is actually the inner type `m.type.inner`.
    
    This enables the type of this argument to be checked correctly, which in
    turn required a minor fix to the test case.  This only effects
    `IDL_CHECKS=all` builds.
    sbc100 authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    cf909d3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0eb6567 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d5973e9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    89111ea View commit details
    Browse the repository at this point in the history
  6. Remove use of demangleAll helper function (emscripten-core#21156)

    This was used to demangle C++ symbols JS stacktraces.  However for
    a long time now native symbols in JS backtraces are already demanged
    because names in the name section are in demangled form.  So this
    function has not done anything for a very long time.
    
    As a followup I think we can probably completely remove the
    `DEMANGLE_SUPPORT` settings.
    sbc100 authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    373b22d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dae7467 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c365580 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3958a80 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Configuration menu
    Copy the full SHA
    80fb9d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c4d76b8 View commit details
    Browse the repository at this point in the history
  3. Acorn optimizer: Allow top-level await expressions (emscripten-core#2…

    …1117)
    
    `-pthread` + `-sEXPORT_ES6` emits a top-level await expression
    in the main worker file after commit 49ab23a. Ensure the Acorn
    optimizer is aware of this.
    kleisauke authored Jan 25, 2024
    Configuration menu
    Copy the full SHA
    ddd6176 View commit details
    Browse the repository at this point in the history
  4. fix wgpu get dimension bug (emscripten-core#21173)

    Co-authored-by: Jerry.Zhuang <[email protected]>
    xdestiny110 and Jerry.Zhuang authored Jan 25, 2024
    Configuration menu
    Copy the full SHA
    b8b8775 View commit details
    Browse the repository at this point in the history
  5. Avoid unnecessary dependency on SYSCALLS object. NFC (emscripten-co…

    …re#21170)
    
    I noticed that `proc_exit` was depending on `SYSCALLS` even though
    it wasn't actually using `SYSCALLS`.
    sbc100 authored Jan 25, 2024
    Configuration menu
    Copy the full SHA
    8635504 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. embind: Fix method pointers for AOT JS generation. (emscripten-core#2…

    …1168)
    
    Previously, AOT JS glue code for method pointers used the address of the
    method pointer as a unique ID to match JS glue with the binding. However,
    sometimes static initializers malloc different sizes when running
    the AOT generation code versus when the code is run normally. This caused
    the method pointer address to be different and the binding didn't match up.
    
    Instead of using the function pointer or the method pointer address we now
    use a generated signature for the invoker to match up the glue code. This
    works for both types of pointers and also has the advantage that many
    of the glue code functions are nearly identical and can be reusued (closure
    arguments make them behave differently).
    
    Fixes emscripten-core#20994
    brendandahl authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    6ae900e View commit details
    Browse the repository at this point in the history
  2. [wasm64] Error on -fsanitize=address + wasm64 (emscripten-core#21180)

    This chance also includes a couple of minor fixes to asan + memory64
    that helped me to confirm that it really doesn't work yet.
    
    See emscripten-core#21177
    sbc100 authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    70e698d View commit details
    Browse the repository at this point in the history
  3. [wasm64] Enable freetype test. NFC (emscripten-core#21179)

    The poppler test also seesm to work fine under wasm64, just not the >4Gb
    mode.
    sbc100 authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    a50cb95 View commit details
    Browse the repository at this point in the history
  4. [ci] Split browser64_4gb into its own runner (emscripten-core#21182)

    Also add test_TextDecoder to the list of test.
    sbc100 authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    a23fdef View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2024

  1. Configuration menu
    Copy the full SHA
    72c3be3 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Configuration menu
    Copy the full SHA
    f1ff06a View commit details
    Browse the repository at this point in the history
  2. Remove unused arguments from test_emmalloc_trim. NFC (emscripten-core…

    …#21181)
    
    This test was originally added with these unused args. Perhaps while
    it was being developed in was parameterized, but is not anymore.
    sbc100 authored Jan 28, 2024
    Configuration menu
    Copy the full SHA
    8b90561 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Fix GL.getSource bug introduced in emscripten-core#21184 (emscripten-…

    …core#21197)
    
    This only seems to show up in `browser.test_sdl_ogl_regal`.
    sbc100 authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    4eb71a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cfdc30e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce5114b View commit details
    Browse the repository at this point in the history
  4. Allow-list 7 more WebGL extensions (emscripten-core#21185)

    These 6 extensions don't add any entry points, so shouldn't require any
    Emscripten support (aside from having any enums present in gl2ext.h,
    which they do):
    
    - EXT_conservative_depth
    - NV_shader_noperspective_interpolation
    - EXT_depth_clamp
    - WEBGL_blend_func_extended
    - WEBGL_compressed_texture_etc
    - WEBGL_compressed_texture_etc1
    
    Finally:
    
    - WEBGL_compressed_texture_astc does add an entry point
    getSupportedProfiles() in WebGL. This is a WEBGL_ extension, so it is
    still safe to allow-list without implementing a C version of that
    function. There is no corresponding GLES entry point for this; instead,
    profile support is indicated by the presence of
    KHR_texture_compression_astc_{ldr,hdr}. Emscripten should emulate those
    extensions by checking getSupportedProfiles(), but I haven't implemented
    this. Applications can still use the WEBGL_ version directly.
    
      WEBGL_compressed_texture_astc guarantees support for the LDR profile
      (since HDR is a superset of LDR, and there are only two profiles), so
      applications that only need LDR don't need to call this function. It
      can also be easily called using EM_ASM in applications that do use the
      HDR profile.
    
    Fixes emscripten-core#21183
    kainino0x authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    0e5b3a8 View commit details
    Browse the repository at this point in the history
  5. Run unsafe_optimizations.js again after closure (emscripten-core#21196)

    This allows `unsafe_optimizations.js` to cleanup some thing that
    closure compiler was able to remove usages of.
    
    Split out from emscripten-core#21195
    sbc100 authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    1cd1031 View commit details
    Browse the repository at this point in the history
  6. Mark test_itimer_proxy_to_pthread as flaky. NFC (emscripten-core#21175)

    This test recently flaked on window too.
    sbc100 authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    93a23bc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    312db46 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Configuration menu
    Copy the full SHA
    9ef3189 View commit details
    Browse the repository at this point in the history
  2. Don't force the use of imported memory under WASM2JS (emscripten-core…

    …#21195)
    
    Setting `IMPORTED_MEMORY` can have other implications and don't want t
    by default just because we chose WASM2JS.
    
    The there is a very minor code size regression here that only effects
    WASM2JS, but when combined with emscripten-core#21196 the overall effect is still a
    win.
    
    See emscripten-core#21071
    sbc100 authored Jan 30, 2024
    Configuration menu
    Copy the full SHA
    4aefde3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    75892b3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d660cca View commit details
    Browse the repository at this point in the history
  5. [debug] Use two digits for the temporary file counter. NFC (emscripte…

    …n-core#21207)
    
    This means that filenames will sort correctly under normal sorting rules.
    sbc100 authored Jan 30, 2024
    Configuration menu
    Copy the full SHA
    450602a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    329aa7f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f7651be View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. Configuration menu
    Copy the full SHA
    b64f144 View commit details
    Browse the repository at this point in the history
  2. Use JS naming convention for JS-only symbol. NFC (emscripten-core#21188)

    The `emscripten_` naming convention is something we use for native
    function and this symbol is not visible to native code.
    sbc100 authored Jan 31, 2024
    Configuration menu
    Copy the full SHA
    7983522 View commit details
    Browse the repository at this point in the history
  3. Run more of out tests with -sNO_DEFAULT_TO_CXX (emscripten-core#21096)

    We were previously only applying this flag to tests that use
    `self.build` (i.e. most test).  Now we apply it to and even larger set.
    
    The code size changes here only occur in debug builds where we enumerate
    all known JS symbols, and there are come JS symbols are the C++ only.
    sbc100 authored Jan 31, 2024
    Configuration menu
    Copy the full SHA
    659988f View commit details
    Browse the repository at this point in the history
  4. Some fixes for library_webgl.js in CAN_ADDRESS_GB mode (emscripten-co…

    …re#21220)
    
    This is an overall size win too after compression.
    sbc100 authored Jan 31, 2024
    Configuration menu
    Copy the full SHA
    876ae7c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9e46ec0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    449c94f View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    2e77af2 View commit details
    Browse the repository at this point in the history
  2. Fix emscripten_webgl_make_context_current under wasm64/CAN_ADDRESS_2GB (

    emscripten-core#21228)
    
    The first problem here was that
    emscripten_webgl_make_context_current_calling_thread had the
    wrong signature.
    
    The second issue was use of `>> 2` on a pointer in
    `emscripten_webgl_do_create_context` which doesn't work under wasm64
    or CAN_ADDRESS_2GB.
    sbc100 authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    ec2ce4c View commit details
    Browse the repository at this point in the history
  3. [embuilder] Add support for '*' wildcard for matching library names (e…

    …mscripten-core#21236)
    
    This is very useful for doing things like `./embuild build libGL*` to
    `./embuilder clean libc*`.
    sbc100 authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    a9ebfb7 View commit details
    Browse the repository at this point in the history
  4. [test] Remove also_wasm2js btest argument. NFC (emscripten-core#21232)

    This only have one user, and we have a cleaner mechanism for doing
    this these days in terms of the decorator.
    sbc100 authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    013f742 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    71d452a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f6a7e5f View commit details
    Browse the repository at this point in the history
  7. embind - Fix reading various bindings types from val on wasm64. (emsc…

    …ripten-core#21225)
    
    - The function simpleReadValueFromPointer was always reading pointers as
    i32 numbers which was incorrect on wasm64.
    - Decoding of std::wstring was using a right shift to read pointers. Right
      shift was truncating numbers larger than i32 and causing misreads.
    - Added tests to execute readValueFromPointer on all the binding types
      to ensure these don't break on wasm64.
    brendandahl authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    1fc7d9d View commit details
    Browse the repository at this point in the history
  8. Move internal webgl signatures to a separate file. NFC (emscripten-co…

    …re#21239)
    
    This is in preparation for enabling these functions under wasm64.
    sbc100 authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    384ab3c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fe8421d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    81fe157 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. embind: Use optional return type for vector and maps. (emscripten-cor…

    …e#21102)
    
    This helps create better TypeScript definitions for what
    is actually returned.
    brendandahl authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    8418fbe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    01be75a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2b9870c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8747ab0 View commit details
    Browse the repository at this point in the history
  5. Fix test_cubegeom_pre_relocatable (emscripten-core#21240)

    This test was broken by emscripten-core#21103 but when unnoticed because we run our
    browser tests with swiftshader enabled, which skips this test.
    sbc100 authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    380a9dd View commit details
    Browse the repository at this point in the history
  6. Consistent use of ValueError when parsing settings. NFC (emscripten-c…

    …ore#21245)
    
    This is in preparation for a change to avoid using json parsing for
    settings by default.
    
    It also adds more context to the errors since when the ValueError
    is caught higher up we print nice error messages.
    sbc100 authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    28707b1 View commit details
    Browse the repository at this point in the history
  7. [wasm64] Fix wasm64 memory read in Fetch.js (emscripten-core#21246)

    This bug only showed up under wasm64 when the address of the fetch
    object was between 2Gb and 4Gb.  This causes the JS ">> 2" operation to
    generate a negative number becuase the high bit is set:
    
    ```
    $ node
    > a = 2**31 + 10
    2147483658
    > a >> 2
    -536870910
    >
    ```
    
    In `browser64_4gb` mode this bug resulted in a read from the first 4gb
    of memory somewhere, which results a in 0 whereas read from a negative
    address yields `undefined`.
    sbc100 authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    f065b75 View commit details
    Browse the repository at this point in the history
  8. Fix broken compilation of regal tests (emscripten-core#21248)

    This should have been part of emscripten-core#21096.  These failures don't show up in
    CI because they are disabled under swiftshader.
    sbc100 authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    7514cc2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3bca209 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e279a10 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. Re-enable preprocessing of pre/post JS file. NFC (emscripten-core#21227)

    This change got reverted in emscripten-core#19006 so this time we make the
    preprocessing optional.
    
    This is useful as it allows things like `{{{ POINTER_SIZE }}}`
    and `{{{ makeGetValue(..) }}}` to be used in pre/post JS files, just
    like they can be in JS library files.
    
    This change allows threadprofiler.js to be fixed such that it works
    under wasm64.
    
    Fixes: emscripten-core#21226
    sbc100 authored Feb 3, 2024
    Configuration menu
    Copy the full SHA
    d73ad54 View commit details
    Browse the repository at this point in the history
  2. Fix glDrawElements under CAN_ADDRESS_2GB (emscripten-core#21251)

    This is partially a workround for emscripten-core#21250
    sbc100 authored Feb 3, 2024
    Configuration menu
    Copy the full SHA
    aef8142 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    bcba080 View commit details
    Browse the repository at this point in the history
  2. docs: Remove discussion of using Travis CI. (emscripten-core#21256)

    These are outdated and the docker images mentioned here haven't
    been updated in 4 years.
    waywardmonkeys authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    4b3988d View commit details
    Browse the repository at this point in the history
  3. [test] Simplify post_manual_reftest. NFC (emscripten-core#21243)

    Rather than embedding `reftest.js` directly in the html, simply include
    it via script src attribute.
    sbc100 authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    50d2d32 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1e79d01 View commit details
    Browse the repository at this point in the history
  5. Simplify get_subresource_location. NFC (emscripten-core#21260)

    This function only ever gets called with no arguments.
    
    I also confirmed that when we use a memory init file, that file always
    exists.
    sbc100 authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    00e107f View commit details
    Browse the repository at this point in the history
  6. Improve manual_wasm_instantiate.html (emscripten-core#21258)

    Modernize this test a little by using fetch API and JS spread operator.
    sbc100 authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    89c2a83 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6cdb695 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Configuration menu
    Copy the full SHA
    58a03c7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97053db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c735ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3495d9a View commit details
    Browse the repository at this point in the history
  5. Use rest and spread operators in multi-threaded code. NFC (emscripten…

    …-core#21270)
    
    These operators are available everywhere that we can run mutli-threaded
    code.
    sbc100 authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    31e823d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1b2a2ab View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d4ddcf0 View commit details
    Browse the repository at this point in the history
  8. Cleanup generate_traditional_runtime_html. NFC (emscripten-core#21267)

    - Use fetch() over XHR.
    - No need for tryParseAsDataURI. This code is already in a `not
      settings.SINGLE_FILE` block which means URL for the wasm binary
      will never be data URI.  See `get_subresource_location`.
    sbc100 authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    288d475 View commit details
    Browse the repository at this point in the history
  9. WebGPU: Swapchain getCurrentTexture (emscripten-core#21271)

    * WebGPU: added GetCurrentTexture method to swapchain.
    
    * WebGPU: fix for GetCurrentTexture signature.
    coopersimon authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    c47d060 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Configuration menu
    Copy the full SHA
    bbbbdb1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5516dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    21f2533 View commit details
    Browse the repository at this point in the history
  4. Update EMSCRIPTEN_WEBGL_CONTEXT_HANDLE to handle full pointer range (e…

    …mscripten-core#21281)
    
    In particular this changes the return type of
    `emscripten_webgl_create_context` such that negative values can no
    longer be returned.
    
    This allows pointers (specifically 32-bit pointers over 2gb) to be
    returned which is needed for pthread builds.
    
    The only valid failure return code for `emscripten_webgl_create_context`
    is now 0/NULL.  As it happens this function never fails with anything
    except 0 so this should not be an impactful change.
    
    Split out from emscripten-core#21268
    
    Fixes: emscripten-core#21278
    sbc100 authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    38f9ad8 View commit details
    Browse the repository at this point in the history
  5. [Docs] Document EXPORT_ES6 implicit behavior (emscripten-core#21274)

    * It is implicitly enabled for .mjs output.
    * MODULARIZE is implicitly enabled when EXPORT_ES6 is set.
    waywardmonkeys authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    b166f25 View commit details
    Browse the repository at this point in the history
  6. Remove redundant step in promise change. NFC (emscripten-core#21285)

    This stop in the chain is only need if the offset converter is needed.
    sbc100 authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    c02cc3d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b037fd3 View commit details
    Browse the repository at this point in the history
  8. Make use of JS rest and spread operators throughout the codebase. NFC (

    …emscripten-core#21283)
    
    Following up on emscripten-core#21270.  These operators were introduced way before
    our current default set of browser versions.  Anyone targeting an
    browser so old as to not support these will already be on the
    transpilation path.
    sbc100 authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    7bba399 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. [NFC] Assert we do not use --low-memory-unused when STACK_FIRST (emsc…

    …ripten-core#21291)
    
    Assuming low memory was unused when the stack was first - which is where low
    memory is - would be wrong. We never did that wrong thing as we only use that
    optimization when not optimizing. Add an assertion + tests to prevent regressions.
    kripken authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    7080012 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fdc2ea7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a3144a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    746fb02 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3bb85de View commit details
    Browse the repository at this point in the history
  6. [test] Remove some unneeded -sINITIAL_MEMORY settings. NFC (emscrip…

    …ten-core#21295)
    
    I think the reason a lot of these are no longer needed is because
    the default pthread stack size is less that it used to be.
    sbc100 authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    9c93641 View commit details
    Browse the repository at this point in the history
  7. Fix broken JS glue for AUDIO_WORKLETS with EXPORT_ES6 (emscripten-cor…

    …e#21192)
    
    WASM Audio Worklets with EXPORT_ES6 may break at runtime:
    
      test.js:989 Uncaught (in promise) TypeError: Cannot set property wasmTable of #<Object> which has only a getter
          at receiveInstance (test.js:989:25)
          at receiveInstantiationResult (test.js:1011:5)
    
    The read-only getter at issue is created in ASSERTIONS-enabled
    builds, and conflicts with the current way of exporting wasmTable
    on the Module object.
    
    Exporting wasmTable via EXPORTED_RUNTIME_METHODS prevents the getter
    from being created in normal builds. In MINIMAL_RUNTIME builds, we
    make sure to delete the getter before manually exporting as before.
    
    We also prevent an ES6 Audio Worklet from loading the .wasm binary
    via `new URL()`, as `URL` is unavailable in AudioWorkletGlobalScope.
    kangtastic authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    2a00e26 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    690df83 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fffb5f6 View commit details
    Browse the repository at this point in the history
  10. Fix MAIN_THREAD_EM_ASM_INT + CAN_ADDRESS_2GB (emscripten-core#21292)

    We were using the sign bit of an integer to distinguish between data
    pointers and fixed JS function indexes, but that doesn't work once
    that data address can be larger than 2^31.
    
    Technically this is very unlikely in practice since in order to get
    an EM_ASM address over 2^31 you would either need 2Gb of static data
    to be using `-sGLOBAL_BASE=2gb` like we do in the tests.
    
    An alternative approach here would be assume we have fewer than
    `GLOBAL_BASE` (1024 is most cases) proxied JS library functions and then
    we could assume that small integers we JS library functions and larger
    ones were data pointers (EM_ASM functions).  However that seems fragile
    too.  Passing an extra argument around seems like a small cost here.
    sbc100 authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    e96d976 View commit details
    Browse the repository at this point in the history
  11. WebGPU: Remove unused signalValue argument (emscripten-core#21299)

    This was never implemented and was removed from Dawn and upstream webgpu.h a long time ago (and the JS API even longer ago).
    
    (This will be a tiny breaking change for a few apps but we're not stable
    and still need to do many more breaking changes.)
    kainino0x authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    6daa18b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    01d0fc4 View commit details
    Browse the repository at this point in the history
  13. Move __glGenObject to GL.genObject. NFC (emscripten-core#21302)

    This function logically belongs alongside getNewId.
    
    Split out from emscripten-core#18874
    sbc100 authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    f89e972 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9c8073d View commit details
    Browse the repository at this point in the history
  15. [test] Fix test_pthread_run_on_main_thread under asan. NFC (emscripte…

    …n-core#21301)
    
    The output of this test is racey without this change and has been failing on the
    emscripten-releases waterfall in the asan configuration.
    
    We only just started caring about the precise output in emscripten-core#21296.
    sbc100 authored Feb 8, 2024
    Configuration menu
    Copy the full SHA
    833448b View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Configuration menu
    Copy the full SHA
    c06a2b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ee4350 View commit details
    Browse the repository at this point in the history
  3. Add --quiet option to file_packager (emscripten-core#21307)

    This suppressed the `Remember to build the main file with ..` message
    that is otherwise printed to stderr.
    
    This also allows the tests to assert that no stderr is produced in
    successful cases.
    sbc100 authored Feb 9, 2024
    Configuration menu
    Copy the full SHA
    7a5d1d8 View commit details
    Browse the repository at this point in the history
  4. [wasm64] Fix emscripten_get_preloaded_image_data (emscripten-core#21308)

    Here we extract an inner JS function that take a JS string so that the
    externally facing once can assume its being passed a pointer.
    sbc100 authored Feb 9, 2024
    Configuration menu
    Copy the full SHA
    b67eb49 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7459cab View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Add option to emit TypeScript definitions for Wasm module exports. (e…

    …mscripten-core#21279)
    
    The new flag `--emit-tsd <filename>` will generate a TypeScript defintion
    file for any Wasm module exports. If embind is also used the definitions
    for those types will also be included in the same file.
    
    This still doesn't give the full picture of Wasm module e.g. missing
    HEAP<N> and the various helper functions defined in JS.
    brendandahl authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    57ba793 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bde14c View commit details
    Browse the repository at this point in the history
  3. Don't define JS versions of abort or __assert_fail in standalone mode (

    …emscripten-core#21317)
    
    In STANDALONE_WASM mode these functions are defined in libstandalonewasm
    and not in JS.
    
    The JS definitions meant they were not able to be added to
    EXPORTED_FUNCTIONS.
    
    Fixes: emscripten-core#21312
    sbc100 authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    52e5687 View commit details
    Browse the repository at this point in the history
  4. embind- Fix tsgen failure from merge. (emscripten-core#21320)

    Forgot to pull in the upstream branch before updating this test.
    brendandahl authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    75b82ae View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Don't include main.c in libSDL_mixer (emscripten-core#21322)

    This was broken when sdl2_mixer was updated recently in in emscripten-core#21013.
    
    Fixes: emscripten-core#21321
    sbc100 authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    0cb21d5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa57899 View commit details
    Browse the repository at this point in the history
  3. Update emsymbolizer and emsize tests (emscripten-core#21305)

    LLVM rev 8b0f47bfa updated section addresses to use binary offsets in linked
    wasm files, which is reflected in the llvm-size (and thus emsize) tool. It
    also made llvm-objdump display file offsets rather than section offsets when
    disassembling binaries. Update the emsize and emsymbolizer tests accordingly
    (expect section addresses in emsize, and use file rather than section offsets
    in the emsymbolizer test, since the offsets are read from objdump output).
    dschuff authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    0671dfc View commit details
    Browse the repository at this point in the history
  4. [wasm64] Fix makeHEAPView for addresses over 4gb (emscripten-core#21324)

    This enables all the cubegeom tests to pass
    sbc100 authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d666035 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    41e471e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4b9a5f7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0e0b62f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    81bf014 View commit details
    Browse the repository at this point in the history
  9. Refactor makeHEAPView to use getHeapOffset. NFC (emscripten-core#…

    …21332)
    
    The code for calculating the offsets was being duplicated here.
    
    Also, optimize getHeapOffset to avoid any shifting when size is 1.
    sbc100 authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    24697df View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Configuration menu
    Copy the full SHA
    eddd4f9 View commit details
    Browse the repository at this point in the history
  2. [test] Improve test_sdl2_key and test_sdl2_mouse. NFC (emscripten-cor…

    …e#21336)
    
    The TEST_EMSCRIPTEN_SDL_SETEVENTHANDLER macro is copied over from
    `test_sdl_key.c` (the SDL1 version) but its not applicable with SDL2.
    
    Remove the 3 second delay from test_sdl_mouse/test_sdl2_mouse.  I ran
    these tests many times without any issues.  We can perhaps revive with
    something less long but I can't really see how a delay here could be
    useful in practice.
    sbc100 authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    2185f45 View commit details
    Browse the repository at this point in the history
  3. library_idbfs.js: Handle transaction.onabort in reconcile() (emsc…

    …ripten-core#21326)
    
    If the transaction aborts (which can happen due to, for example, a QuotaExceededError), `onabort` must be handled to ensure that the `callback` actually gets called.
    past-due authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    ff35d3f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    145b146 View commit details
    Browse the repository at this point in the history
  5. Allow comments in response files. (emscripten-core#21330)

    It can be useful to have comments in a response file for exported
    symbols to explain what some stuff might be in there for.
    waywardmonkeys authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    7baa690 View commit details
    Browse the repository at this point in the history
  6. Site: Remove old, unused copy of theme layout (emscripten-core#21338)

    This was added in 2014, not used.
    waywardmonkeys authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    4aab0cc View commit details
    Browse the repository at this point in the history
  7. Fix asan.test_main_thread_em_asm_pthread (emscripten-core#21339)

    Without this change this tests fails to compile with `em++: error:
    -pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly`.
    
    This test was recently added in emscripten-core#21292 and this wasn't caught
    immediately because we don't run the `asan` suite during CI.
    sbc100 authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    5ace027 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9710247 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0f4a1fa View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a94e43a View commit details
    Browse the repository at this point in the history
  11. Move demangle helper to library_legacy.js (emscripten-core#21346)

    Followup to emscripten-core#21156
    
    We no longer use this function anywhere in emscripten.
    sbc100 authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    971e903 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    a95c44e View commit details
    Browse the repository at this point in the history
  2. Unify handling of deprecated settings (emscripten-core#21355)

    Unlike `LEGACY_SETTINGS`, deprecated settings can continue to be used
    and the values passed in will continue to be honored.
    
    Once folks have stopped using them we can move them to
    `LEGACY_SETTINGS`.
    sbc100 authored Feb 15, 2024
    Configuration menu
    Copy the full SHA
    ed336f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    58bd6d9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cbf8ea7 View commit details
    Browse the repository at this point in the history
  5. Remove unused src/library_cyberdwarf.js (emscripten-core#21356)

    The rest of the cyberdwarf support was removed back in emscripten-core#12195
    sbc100 authored Feb 15, 2024
    Configuration menu
    Copy the full SHA
    14b27ec View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ee97739 View commit details
    Browse the repository at this point in the history
  7. [test] Simplify new KeyboardEvent calls in test_browser.py. NFC (emsc…

    …ripten-core#21351)
    
    Closure knows about these property bags so there is no need to quote
    the keys.
    sbc100 authored Feb 15, 2024
    Configuration menu
    Copy the full SHA
    59e6b8f View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Configuration menu
    Copy the full SHA
    7cdfa8d View commit details
    Browse the repository at this point in the history
  2. Always free allocaed memory in mmunmap. (emscripten-core#21363)

    Without this change we were returning early from `__syscall_munmap`
    if `_munmap_js` failed.  This could happen if `fd` was no longer a valid
    open file descriptor.  However, even in this case we still want to go
    ahead and free any allocated memory.
    
    Fixes: emscripten-core#21360
    sbc100 authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    71c3d00 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Use isfile rather than exists when checking for config files (ems…

    …cripten-core#21361)
    
    This avoids trying parse non-files.
    
    Also, explicitly log when we are not using a config file at all.
    sbc100 authored Feb 17, 2024
    Configuration menu
    Copy the full SHA
    e0c3ce6 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Configuration menu
    Copy the full SHA
    d67fa99 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4856d55 View commit details
    Browse the repository at this point in the history
  3. Update glfw port to 1.0.5 (emscripten-core#21369)

    This update includes a fix for a memory corruption bug.
    ypujante authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    23d8972 View commit details
    Browse the repository at this point in the history
  4. [test] Add EMTEST_SKIP_NETWORK_TESTS (emscripten-core#21380)

    I was doing some work on an airplane over the weekend and I found this
    useful.
    sbc100 authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    b5eca2f View commit details
    Browse the repository at this point in the history
  5. Feedback from emscripten-core#21380

    I accidentally hit submit before applying this change.
    sbc100 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    fe92a1b View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    3319a31 View commit details
    Browse the repository at this point in the history
  2. Fix python error when building with audio worklets enabled (emscripte…

    …n-core#21340)
    
    MIN_EDGE_VERSION was removed (emscripten-core#20881), so we do not need it in the
    feature matrix.
    FrancoisRecisio authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5355b8d View commit details
    Browse the repository at this point in the history
  3. Cleanup cpuprofiler.js. NFC (emscripten-core#21387)

    - Use mathod syntax
    - Cleanup long line
    sbc100 authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    dc4e54a View commit details
    Browse the repository at this point in the history
  4. Fix typo in embind.js (emscripten-core#21384)

    nonexistant ==> nonexistent
    
    Fixes: emscripten-core#21372
    wojdyr authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    919afc5 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Avoid calling addCxaCatch when not linking as C++ (emscripten-core#21386

    )
    
    For the test I was unable to figure out a way to generate a call to
    `__cxa_find_matching_catch` withing hand coding it like this.
    
    This doesn't fix emscripten-core#21381 but it makes the error message way less
    confusing.
    sbc100 authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    52d401b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9df292 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ad6cfa2 View commit details
    Browse the repository at this point in the history
  4. [test] Remove redundante/broken call to glTexImage2D. NFC (emscripten…

    …-core#21394)
    
    This line was fixed/patched in 2736a26 but I think the old line
    was mistakenly left in.
    sbc100 authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    bf76ba4 View commit details
    Browse the repository at this point in the history
  5. Simplify test_gl_subdata and test_float_tex. NFC (emscripten-core#21393)

    Also, remove test_std_cout_new.cpp completely.  This test seems to
    be based on the code from these other two tests but doesn't seem to
    server any useful purpose anymore.  Its was first added in ad285f6.
    sbc100 authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    b4f224e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    587c9b6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9e8f698 View commit details
    Browse the repository at this point in the history
  8. Run test_subdata in webgl2 mode. (emscripten-core#21398)

    This involved improving the emulation in glTexSubImage2D.
    
    Sadly I needed to disable this new tests in 4gb+ mode since it runs
    into a chromium bug.
    sbc100 authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    34c83d8 View commit details
    Browse the repository at this point in the history
  9. file_packager.py: Handle failure to get cached package (emscripten-co…

    …re#21328)
    
    In certain scenarios (such as when quota is exceeded), it's possible for a metadata entry to exist, but the package data to be missing - and `event.target.result` will be undefined.
    
    Check for and properly handle this by calling `errback`, so that the `preloadFallback` gets triggered.
    past-due authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    0059aae View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. [test] Simplify test_openjpeg. NFC (emscripten-core#21401)

    This change simplifies the test in 2 ways:
    
    1. Remove the "extra testing" part of the test that tries to run the
       test again if `ALLOW_MEMORY_GROWTH` is set.  The only test modes that
       have `ALLOW_MEMORY_GROWTH` are the santizier modes and it seems odd
       for an individual test to decide to disable this.
    2. Remove the alternate `is_sanitizing` method of running the test.
       I believe this was only needed becuase of (1), and so can be safely
       removed.
    
    By removing this complexity this test now has less nesting and is more
    directly readable and more similar to other tests.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    6b93444 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab9aa4c View commit details
    Browse the repository at this point in the history
  3. Fix webgl tracing issues (emscripten-core#21389)

    The webgl tracing mechanism was assuming a fixed number of arguments for
    a given function whereas some webgl function can take variable number of
    arguments.
    
    Fix this by using the rest operator.  This is not as slow as using
    `arguments`.  Also, performance is not really an issue here since we are
    about to serialize all the arguments to string and send to the console
    which will vastly out weight the cost of using spread here.
    
    I believe the comments here about hot and cold functions as well as the
    comment at about the cost of using `arguments` were copied from the
    cpuprofiler.js but they don't apply here.
    
    Also, avoid serializing the entire heap, which can cause chrome to hang.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    7f75c75 View commit details
    Browse the repository at this point in the history
  4. [test] Add reftest helper method for browser tests. NFC (emscripten…

    …-core#21392)
    
    This makes it easy distinguish reference tests from other btests.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    a71c02c View commit details
    Browse the repository at this point in the history
  5. Fix EM_JS macro in the face of recent llvm change (emscripten-core#21403

    )
    
    A recent change to llvm (llvm/llvm-project#81539)
    means that the `used` attribute on data forces the segment to be
    present in the output file, even if it's not used.
    
    The usage here in `em_js.h` was assuming that the data was not incldued
    in the final output.  This change makes the symbol non-static instead
    of used, which is enough to force clang to keep the data around but
    not the linker (which is exactly the effect we want).
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    b69e44c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    135baa3 View commit details
    Browse the repository at this point in the history
  7. Mark test_itimer_pthread as flaky. NFC (emscripten-core#21404)

    This should have been marked as such when the other itimer tests were.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    38d185e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    72d980b View commit details
    Browse the repository at this point in the history
  9. Use JS class for FSStream, FSNode and LazyUint8Array. NFC (emscripte…

    …n-core#21406)
    
    Converting each of these to classes led to code size savings.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    0c070c4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6797625 View commit details
    Browse the repository at this point in the history
  11. Fix test_openjpeg under wasm64. NFC (emscripten-core#21408)

    openjpeg was assuming a different signature for getopt_long which
    was not problem under wasm32.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    dab2412 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    643959b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c6eacb9 View commit details
    Browse the repository at this point in the history
  14. Fix for resize events when building with ASSERTIONS (emscripten-core#…

    …21362)
    
    Building with ASSERTIONS is failing the safe heap checks when e.detail is undefined.
    cwoffenden authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    56fc942 View commit details
    Browse the repository at this point in the history
  15. [emval] Reduce C++ -> JS calls in emscripten::val lifetime management (

    …emscripten-core#21366)
    
    Related to emscripten-core#21300, but some obviously good incremental wins to reduce the cost of ref counting:
    
    1. Have C++ consistently avoid inc/dec for the special reserved values that don't need to be counted, this saves decref calls every time such a `val` object goes out of scope.
    2. Add an rvalue reference version of toWireType for `emscripten::val` that can transfer ownership to JS. This saves one call to incref and one call to decref for the case of a c++ function with return type `emscripten::val`  
    
    The cost seems to be single-digit bytes to the WASM.
    mrolig5267319 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    e37f83b View commit details
    Browse the repository at this point in the history
  16. [test] Make use of is_wasm2js helper (emscripten-core#21413)

    Also, don't check for `WASM2JS` settings.  That is a private setting
    that cannot be set on the command line.
    sbc100 authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    f302d4c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    96124ff View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2024

  1. Configuration menu
    Copy the full SHA
    e6be4f5 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Configuration menu
    Copy the full SHA
    b5b7fed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    018e16f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e875ed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3efadf4 View commit details
    Browse the repository at this point in the history
  5. [emrun] Use GNU command line flag names (emscripten-core#21424)

    For example `--no-browser` vs `--no_browser`.
    
    Continue to support the old style but don't advertise these.
    sbc100 authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    aedf661 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    30263b4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ccad71b View commit details
    Browse the repository at this point in the history
  8. Round down any canvas-relative mouse event coordinates (fixes SAFE_HE…

    …AP asserts) (emscripten-core#21429)
    
    When using a custom target the coordinates may be doubles, which causes SAFE_HEAP to assert. These are truncated to avoid this (which is what happens anyway, only now it's explicit).
    cwoffenden authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    4ecb306 View commit details
    Browse the repository at this point in the history
  9. Cleanup src/library_sdl.js. NFC (emscripten-core#21416)

    - Wrap long lines
    - Format comments
    - Use method syntax
    - Remove unnecessary `SDL_audio`/`SDL_unicode`/`SDL_ttfContext` accessor
      functions.
    sbc100 authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    92eebb5 View commit details
    Browse the repository at this point in the history
  10. Remove remaining uses of eval in the JS compiler (emscripten-core#2…

    …1423)
    
    Use `vm.runInCurrentContext` instead.
    
    We already use this in the preprocessor, but not we also use it for
    macro expansion and loading of the compiler code itself.
    
    This change should facilitate future changes to the JS compiler, such
    as changing the compiler itself to use JS modules.
    sbc100 authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    dba8ca0 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Configuration menu
    Copy the full SHA
    97e3525 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a3b9509 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7dbbbaa View commit details
    Browse the repository at this point in the history
  4. Allow HEAPX symbols in EXPORT_RUNTIME_METHODS (emscripten-core#21439)

    - Factor out updateMemoryViews.
    - Enable HEAPXX exports to be specified in EXPORT_RUNTIME_METHODS.
    - Add all HEAP symbosl to EXPORT_RUNTIME_METHODS unless in STRICT mode.
    
    Replaces emscripten-core#21407
    sbc100 authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    40252f5 View commit details
    Browse the repository at this point in the history
  5. Add name section and object symbol table support to emsymbolizer (ems…

    …cripten-core#21367)
    
    With llvm/llvm-project#82083, llvm-symbolizer works
    correctly with name sections, so emsymbolizer can use it. Also do the
    same for object files with symbol tables.
    Object files do not currently work correctly in llvm-symbolizer where code addresses overlap with
    data addresses; when that is fixed, emsymbolizer will start working, but we should add a test for it.
    dschuff authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    c0cda71 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1b3950d View commit details
    Browse the repository at this point in the history
  7. [wasm2js] Remove all handling for external memory file (emscripten-co…

    …re#21217)
    
    We have a lot of support code and complexity in emscripten for handling
    of external memory files.  However, its only ever used in wasm2js mode
    which is a legacy mode.  The only reason we continue to support it here
    IIUC is because its slightly more space efficient than embedding the
    data as base64.
    
    For small programs like hello_world this is an over codesize win.  For
    larger programs there is a regression in overall size in proportion to
    the amount of static data in the program.
    sbc100 authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    07010b9 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Limit isCurrentContextWebGL2 usage. NFC (emscripten-core#21444)

    I observed that this helper macro is only needed when webgl2 is
    supported.
    
    In fact, it would be a bug if it was used when webgl2 was not supported.
    sbc100 authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    c3d33aa View commit details
    Browse the repository at this point in the history
  2. Update expected binaryen version to 116 (emscripten-core#21446)

    After WebAssembly/binaryen#6358, we need to
    update this to pass the tests.
    aheejin authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    6105e76 View commit details
    Browse the repository at this point in the history
  3. Update val.h.rst (emscripten-core#21449)

    Update typo in EM_ASYNC_JS code sample
    patrickkettner authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    e1b138a View commit details
    Browse the repository at this point in the history
  4. Update Binaryen version to 117 (emscripten-core#21451)

    After WebAssembly/binaryen#6358, I tried to
    update this to 117, but it looks due to some unfinished builds I ended
    up updating it to 116
    (emscripten-core#21446 (comment)).
    This brings it up to 117.
    aheejin authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    e25fa53 View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. [circleci] Create run-tests-firefox task. NFC (emscripten-core#21452)

    This allows use to create different firefox test runs, just like
    we already can for chrome.
    sbc100 authored Feb 29, 2024
    Configuration menu
    Copy the full SHA
    e55ea43 View commit details
    Browse the repository at this point in the history
  2. Update test_sdl_canvas (emscripten-core#21453)

    When I run this test locally in firefox I was getting 2785 as the
    sum value.  I believe this is because the test includes SDL1 font
    rendering which can depend on the system fonts you have installed.
    sbc100 authored Feb 29, 2024
    Configuration menu
    Copy the full SHA
    cbb7a11 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    165133b View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Another library_webgl.js cleanup. NFC (emscripten-core#21458)

    Similar to emscripten-core#21457 but this one actually as a code size saving
    sbc100 authored Mar 1, 2024
    Configuration menu
    Copy the full SHA
    bb77856 View commit details
    Browse the repository at this point in the history
  2. Avoid garbage-free WebGL APIs when memory size is over 2gb. (emscript…

    …en-core#21445)
    
    Both chrome and firefox see have some issues with passing 2gb+ and 4gb+
    offsets to these APIs.
    
    Once the browser issues are addressed we can lift these restrictions
    over time.
    
    Fixes: emscripten-core#20533
    sbc100 authored Mar 1, 2024
    Configuration menu
    Copy the full SHA
    4de9bbb View commit details
    Browse the repository at this point in the history
  3. Update GLFW contrib port to v1.1.0 (GLFW 3.4.0) (emscripten-core#21455)

    On Feb 23rd 2024, GLFW released a new version 3.4.0. This is the changes in contrib.glfw3 (https://github.com/pongasoft/emscripten-glfw) to implement the new apis/features added to 3.4
    
    Release notes for the port: https://github.com/pongasoft/emscripten-glfw/releases/tag/v1.1.0
    ypujante authored Mar 1, 2024
    Configuration menu
    Copy the full SHA
    e8262f6 View commit details
    Browse the repository at this point in the history
  4. Initial new INITIAL_HEAP setting (emscripten-core#21071)

    Changes in default behavior:
    1) INITIAL_HEAP is the new default for most builds.
       This means that there is an increase in the effective
       initial memory used by "sizeof(stack) + sizeof(static data)".
       In typical small applications this should be on the order
       of half a megabyte.
    2) Because we cannot precisely calculate the amount
       of initial memory now, ASAN support will use
       the conservative upper estimate of MAXIMUM_MEMORY.
       This only affects ALLOW_MEMORY_GROWTH=0 builds.
    
    This change does not yet enable INITIAL_HEAP for builds
    that instantiate the memory in JS, e. g. with threading.
    SingleAccretion authored Mar 1, 2024
    Configuration menu
    Copy the full SHA
    22a1c04 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5198d44 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    53f661c View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Improve ES6 support in TypeScript definitions generation (emscripten-…

    …core#21460)
    
    Users building with --emit-tsd and the EXPORT_ES6 setting should get
    TypeScript definitions accounting for the fact that ES6 modules
    include a default export that is a functor to instantiate and access
    the wasm module in question
    
    When generating TS definitions, query the EXPORT_ES6 setting and,
    if present, add the appropriate exports to the output
    
    Include options param in default functor export for `--emit-tsd`.
    This serves as a starting point for incluing all options such as
    `locateFile` (and the slew of others), without requiring manually
    iterating through them
    
    Update tests to include factory function
    jnickg authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    c8a1890 View commit details
    Browse the repository at this point in the history
  2. Fix Getting WebGPU Context in pthread (emscripten-core#21467)

    Failed to run compiled WGPU code clips:
     wgpu::SurfaceDescriptor surfDesc{};
     surfDesc.nextInChain = &canvasDesc;
     wgpu::Surface surface = instance.CreateSurface(&surfDesc);
    
    The reason is that it cannot call getContext from correct canvas
    object.
    
    This PR fixed the problem and add correct build flags for
    webgpu_basic_rendering test in pthread.
    shaoboyan authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    2a9af50 View commit details
    Browse the repository at this point in the history
  3. Honor WEBGL_USE_GARBAGE_FREE_APIS (emscripten-core#21462)

    Followup to emscripten-core#21445.  I overlooked some of the webgl2-only paths.
    sbc100 authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    e0bd10a View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    d278e2d View commit details
    Browse the repository at this point in the history
  2. [test] Disable asan.test_externref_emjs_dynlink. NFC (emscripten-core…

    …#21490)
    
    This test is failing due to a crash in LLVM that was introduced
    in llvm/llvm-project#83196.
    sbc100 authored Mar 7, 2024
    Configuration menu
    Copy the full SHA
    d9a8f7f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cf81dbe View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2024

  1. Configuration menu
    Copy the full SHA
    34d8a98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d35f425 View commit details
    Browse the repository at this point in the history
  3. [wasm64] Enable SDL2 tests under wasm64 (emscripten-core#21489)

    I think the recent SDL2 version bump must have fixed the issues we
    were previously seeing.  See emscripten-core#21337 and emscripten-core#20417.
    sbc100 authored Mar 8, 2024
    Configuration menu
    Copy the full SHA
    bc53e33 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    086c84a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    71cee0e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    74a368a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1d725b3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    112f487 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2024

  1. Configuration menu
    Copy the full SHA
    696b4f2 View commit details
    Browse the repository at this point in the history
  2. [test] Remove EMTEST_LACKS_THREAD_SUPPORT (emscripten-core#21496)

    All the browsers we test against these days support threads
    sbc100 authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    2ba2078 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    8b94b9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0e41b1 View commit details
    Browse the repository at this point in the history
  3. Re-enable test_dlfcn_em_asm. NFC (emscripten-core#21500)

    This test was disabled due to EM_ASM not working in side modules but
    that was fixed in emscripten-core#18228.
    sbc100 authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    67bb39d View commit details
    Browse the repository at this point in the history
  4. Remove unused genArgSequence and needsQuoting. NFC (emscripten-core#2…

    …1505)
    
    The usage of genArgSequence removed in emscripten-core#17420.
    
    The usage of needsQuoting was removed in emscripten-core#17462
    sbc100 authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    0b8b752 View commit details
    Browse the repository at this point in the history
  5. Avoid generating empty statement in receiveI64ParamAsI53 (emscripten-…

    …core#21487)
    
    Fixes a few Closure lint warnings. (Though of course there are very many
    other Closure warnings.)
    kainino0x authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    44b3031 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa0079f View commit details
    Browse the repository at this point in the history
  7. Fix acorn-optimizer error when destructuring array with empty elements (

    emscripten-core#21501)
    
    This fixes cases like this:
    
    function ([, a]) { }
    
    In such arrays it is possible to have empty elements, which must be skipped.
    nsfisis authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    25125ce View commit details
    Browse the repository at this point in the history
  8. Run JS linter on src/*.mjs files. NFC (emscripten-core#21510)

    As of today all `.mjs` files are part of the compiler itself and don't
    contains preproccess macros, so that are safe to be run through linter
    tools.
    sbc100 authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    64feaf1 View commit details
    Browse the repository at this point in the history
  9. [test] Add skipExecIf which just skips the running of the test (ems…

    …cripten-core#21499)
    
    This means that even in CI when we might skip certain tests for graphics
    or sounds we still get some assurance that the test code compiles.
    sbc100 authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    a589a22 View commit details
    Browse the repository at this point in the history
  10. Avoid use of port 8088 in socket tests. NFC (emscripten-core#21512)

    This port is used by the goma compiler webserver which causes these
    tests to fail on machines that are running the goma compiler.
    sbc100 authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    92cb07a View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. Remove check for file type of .a files. NFC (emscripten-core#21513)

    Instead just pass them through the linker like other inputs.
    
    See emscripten-core#21128
    sbc100 authored Mar 12, 2024
    Configuration menu
    Copy the full SHA
    dd53c6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b55292 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Only check for WebAssembly support in debug builds. NFC (emscripten-c…

    …ore#21511)
    
    Also, avoid the use of `abort` in this case since abort itself depends
    on `WebAssembly.RuntimeError`.
    
    Fixes: emscripten-core#21484
    sbc100 authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    5f9ee69 View commit details
    Browse the repository at this point in the history
  2. Fix unconditional usage of requests import (emscripten-core#21523)

    On systems that don't have the requests python we cannot catch
    this exception.
    sbc100 authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    18ff548 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. Configuration menu
    Copy the full SHA
    5d1c39d View commit details
    Browse the repository at this point in the history
  2. Use DEPRECATED_SETTINGS for RUNTIME_LINKED_LIBS (emscripten-core#21522)

    And also for CLOSURE_WARNINGS
    sbc100 authored Mar 14, 2024
    Configuration menu
    Copy the full SHA
    cf90417 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Configuration menu
    Copy the full SHA
    d04dfba View commit details
    Browse the repository at this point in the history