Граф коммитов

637 Коммитов

Автор SHA1 Сообщение Дата
Raffarti 259e2ee58f
Fix `alcCaptureSamples` (#13178)
- Properly read from the circular buffer (fixes #13173)
- Fix requested frame count check (it was failing when requested frequency was higher than source frequency)
2021-01-14 11:33:57 -08:00
Adam Leskis 63422ac7ea
[docs] Update http to https (#13225) 2021-01-12 12:31:41 -08:00
Amin Yahyaabadi 8e885f7b61
[docs] Add Windows package to the packaging section (#13149)
Fixes emscripten-core/emsdk#272

I added the packages to the bottom of the downloads page, instead of
a hidden mention in a very large note.
2021-01-11 14:45:57 -08:00
Dexter Chua dd827d65d2
Fix LZ4 file packaging support when MODULARIZE=1 (#13161)
This is based on work by @mdboom in #7107
2021-01-08 14:43:35 -08:00
Thomas Ballinger e0e4f4f31c
JSON-escape directory and file names in file_packager (#13147)
Fixes #13146 which is a directory name with a single quote in it,
that must be escaped.
2021-01-07 10:21:50 -08:00
Lukas Rieger 81ae87611e
Fix loading wasm in electron by falling back to XHR (#12921)
fixes mono/mono#20592

should fix #11671
2021-01-06 14:31:58 -08:00
Michael R. Crusoe c5928fec6e
SIMDe: upgrade to v0.7.0 (#13133) 2020-12-29 11:03:46 -08:00
Nicolas Ollinger 9c58ccb2cc
MEMFS: update directory timestamp on file create/deletion/rename (#13100) 2020-12-26 12:45:03 -08:00
Aleksey Kliger (λgeek) 3a412796da
pthread_key_create: Allocate enough memory per entry (#13015)
When calling realloc, double the amount of allocated space.
2020-12-14 11:16:29 -08:00
badlydrawnrod bb4f1dd889
[GLFW] Fix crash when using gamepad (#12984)
Background: it looks like #12279 missed one of the uses of
allocate in GLFW.
2020-12-07 16:03:17 -08:00
Basil Fierz f263265074
[GLFW] Respect GLFW_NO_API flag (#12907)
In order to support the combined use of GLFW and WebGPU, GLFW
should not assign anything to the Emscripten modules context variable.
GLFW supports not creating any OpenGL context using the windows
attribute GLFW_CLIENT_API.
2020-12-07 14:04:14 -08:00
Max Brunsfeld 26cf4d5f4b
Fix typo in loadDynamicLibrary (#12968) 2020-12-04 13:20:35 -08:00
IvanRomanovski 9b08fc1b33
Document embind linking issues (#12882)
Embind uses a global constructor which is only run when it is linked in,
which can be surprising to new users.
2020-11-30 12:38:02 -08:00
Alexey Sokolov f19bb0af79
Add Gentoo package information to packaging.md (#12859)
As requested at #12646

There are some blockers to add it to Gentoo properly:
* Incompatibility with stable LLVM and binaryen
* Dependency on npm which we can't yet handle cleanly
2020-11-22 13:12:50 -08:00
mundusnine 9814af200f
[Docs] Address inconsistency relating to WebIDL logic (#12773)
See kripken/ammo.js#342 for background.
2020-11-18 11:58:18 -08:00
Wouter van Oortmerssen 528a6ab880
[WiP] Initial changes to support wasm64 in emcc (#12658) 2020-11-16 17:41:52 -08:00
Vladimir Gamalyan 2a0f94ac11
Fix missing comma (#12723) 2020-11-06 09:57:46 -08:00
sam142 25c04d33bf
Fix an off-by-one error when converting UTF16 strings to JavaScript strings (#12631)
When strings are converted without using TextDecoder, an off-by-on error
causes an out-of-bounds memory read. Fix this by turning the while loop
into a for loop with an appropriate bounds check.

Test the marshalling with null-terminated and non-null-terminated
strings. The code is based on the test for UTF32.
2020-10-29 19:05:34 -07:00
jkae 8ee479e236
Update mktime to match C expected behavior (#12320)
Write out the date fields.

Resolves #12241
2020-10-29 15:34:29 -07:00
Sam Gao 0caed62db3
Re-increment uncaught exception count on rethrow (#12535)
In https://github.com/emscripten-core/emscripten/blob/master/src/library_exceptions.js,
the uncaught exception count is incremented and decremented exactly once during
__cxa_throw and __cxa_begin_catch respectively (as the ABI says it should be). This
however doesn't get re-incremented in the event of a rethrow, so anything that happens
between the first catch and the second catch (eg. destructors) receive the decremented
value.

In LLVM the count is incremented again in __cxa_rethrow, which curiously the ABI does
not ask us to do, but seems to be the behaviour we expect. Perhaps the ABI assumes
that rethrow calls throw under the hood. This PR brings us closer to that, and in alignment
with LLVM.

The testcase added here now emits the same correct output as a native build, which
it did not before this PR.
2020-10-22 11:32:26 -07:00
Rocco Musolino 112b38f34b
Add a check if "document" exists when looking for the script dir (#12553) 2020-10-22 09:25:44 -07:00
DhairyaBahl 181b872b5a
Adding name to authors (#12567) 2020-10-21 08:16:07 -07:00
Pawel Czarnecki eabd82cb1d
[idbfs] Properly check date equivalence (#12560)
#12409 introduced a bug.

The PR was merged with the assumption that != on Date objects compares the
date values just like the greater than operator does. Unfortunately, this checks
for object reference equivalence and will always evaluate to false in this case
since each timestamp is a separate Date object.
2020-10-20 19:17:40 -07:00
algestam c13a3c515a
Add O_NOCTTY flag to nodefs flags (#12492) 2020-10-11 18:32:31 -07:00
Doug Conmy 3cf806d250
Fix timezone returning wrong values during DST (#12330)
Calculate the non-DST-adjusted time properly.

fixes #11572

Co-authored-by: Tristan Griffin <tristan.griffin@pnp-hcl.com>
Co-authored-by: Tristan Griffin <tristangriffin@icloud.com>
2020-10-08 12:39:43 -07:00
Alon Zakai 2ee7da1cd6
Implement a more efficient vecFromJSArray (#12463)
This is a followup of #5519 and #5655 since they were closed.

It is possible to implement emscripten::vecFromJSArray more efficiently for numeric
arrays by using the optimized TypedArray.prototype.set function.

The main issue with this method is that it will silently fail(or succeed) if elements of
the array or not numbers, as it does not do any type checking but instead works as
if it called the javascript Number() function for each element. (See ToNumber for more
details)

So instead of simply updating vecFromJSArray to use this new implementation and
break code (since there's no typechecking anymore) I added a new
convertJSArrayToNumberVector (name subject to change) and improved performance
a tiny bit for vecFromJSArray by:

*    Taking the val parameter by const reference instead of copy
*    Reserving the storage of the vector
2020-10-07 11:11:03 -07:00
かめのこにょこにょこ 51e2d5fbde
[docs] Update allocate docs (#12429)
fixes #12427
2020-10-06 07:46:52 -07:00
Stephan Reiter 3fd1f0d683
Handle wasm streaming compile failure when initializing WasmOffsetConverter asynchronously (#12407)
Avoids an unhandled promise rejection error.

Fixes #12395
2020-10-02 08:22:55 -07:00
Benjamin Lee 7069998c89
[docs] Fix markdown bold text typo (#12284) 2020-09-24 09:32:09 -07:00
Marat Dukhan e2ac2a8b59
Optimize SSE2 packing intrinsics (#12301)
Avoid scalarization in implementation of
_mm_packs_epi16/_mm_packs_epi32/_mm_packus_epi16
2020-09-22 14:53:56 -07:00
Attila Oláh 9d68fc2400
Bump binaryen version to 97 (#12261) 2020-09-21 13:04:02 -07:00
j-jorge e3ae9cf1f2
Pass all -mllvm options blindly to the compiler. (#12206) 2020-09-15 13:18:13 -07:00
Georg Rottensteiner fb1acd4591
Update AUTHORS (#12166) 2020-09-11 03:26:08 -07:00
Prashanth Nethi e9ad362b55
Disabling the warning USE_PTHREADS + ALLOW_MEMORY_GROWTH conditionally using pthreads-mem-growth flag (#12103) 2020-09-09 14:06:35 -07:00
Max Weisel 51e09fe254
Fix incorrect example in javascript library docs (#12116) 2020-09-08 10:20:04 -07:00
Sean Maher ff1e14c8d3
Add NEON Simd header, SIMDe integration (#11855)
Imports the implementation of many NEON intrinsics in as a single header from the SIMDe project (https://github.com/simd-everywhere/simde) as well as documentation on how to use them. Also adds a script to update the NEON header with the latest upstream changes from SIMDe.
2020-09-03 15:44:23 -07:00
Paul m. p. P ec6d3d463a
tools/ports: supports embuilder --pic when building harfbuzz (#12062)
fixes emscripten-core/emsdk#479
2020-09-01 13:55:27 -07:00
Dan Field e5663b99dc
Remove unnecessary restrictions around RTTI from wire.h (#10914)
Fixes #6551

Removes the static_asserts that check if the type for a LightTypeID is_polymorphic.
AFAICT, LightTypeID works fine with polymorphic types, and provides the same
identity guarantees as when RTTI is enabled. Adds a test asserting such code
compiles and runs correctly.

I'm still not clear why this restriction was in place - it may have been necessary
in previous impelmentations, or perhaps with previous versions of LLVM/Clang.
However, as far as I can tell, it's not necessary now and only limits options
around doing non-RTTI builds with emscripten. Attempting to create a testcase
showing why the restrictions makes sense fails (see discussion in PR).
2020-08-24 11:54:03 -07:00
Kenneth Pouncey afbdbd2b40
Fix error being overridden incorrectly on FS.Rename (#11812) 2020-08-19 04:10:04 -07:00
Mitchell Hwang 7f5a1ac9dd
Remove trailing slash from path in PATH.basename (#11938)
When calling PATH.basename on paths with a trailing slash (i.e. /emscripten/),
an empty string will be returned instead of "emscripten". This leads to errors
with rmdir and rename called on paths with a trailing slash.

This PR looks to first normalize the path, leading to at most one trailing slash
remaining in the path, and then removing that trailing slash.

Fixes #11897
2020-08-18 11:03:20 -07:00
Alexander Köplinger ce2699a02d
Fix documentation of FS.utime (#11838)
The description for `access` and `modified` arguments was switched.
2020-08-17 10:00:29 -07:00
Antoine du Hamel 5c8213f6fe
Use Promise.resolve() in wasm loading (#11859)
Use Promise.resolve is more concise than using the Promise constructor.
2020-08-14 11:31:04 -07:00
Jia Yuan Lo a529fde384
Fix deps for recv() and send() (#11875)
Add "ntohs" to recv() and send()

fixes #11851
2020-08-13 13:49:27 -07:00
Arran Ireland 8d21da58e8
Fix #10986: webidl_binder.py drops turds (#11842)
The WebIDL.Parser() was calling yacc which is in
debug mode by default, causing it to create parser.out.
Furthermore, the pickle filename 'WebIDLGrammar.pkl'
was being passed in, which results in yacc writing its
tables to that filename.

Fixes #10986
2020-08-10 17:35:00 -07:00
Artyom Lebedev 7f41d4344b
Store exceptions metadata in wasm memory (#11518)
Fixes #11503

This allocates memory in the heap for the relevant data structures,
and JS just refers to those places. This helps make exception handling
thread-safe (however, still not 100%, see comments in the code).

This also fixes issues with the old code mixing up catch contexts
with exceptions. The new code separates out the two properly. As
a result this fixes #11776 

Further improvements after this may include rewriting this to C
so it's entirely in wasm, which could make it 100% thread-safe and
also work in standalone mode etc. (However, the new wasm
exception handling will have those properties already.)
2020-08-06 09:32:00 -07:00
Mathias Westerdahl 6cf6d45e52
Issue 11682: handle the "unwind" exception in the main loop (#11721)
This lets the browser main loop also support exiting from it like
the normal main does.
2020-08-05 12:41:16 -07:00
ShrekShao 9c5537e087
Add WEBGL_multi_draw extension (#11650)
* Add WEBGL_multi_draw extension

* use var instead of let

* Fix as suggested

* Add WebGL extension tests for WebGL_multi_draw

* python formatting

* Fix multi draw tests and related bugs

* Skip test when extension is not supported

* Fix comment text

* remove unnecessary else intent

* refactor block position

* Address some of jukka's comment

* Fix function signature

* Fix function signature suffix back to WEBGL

* Fix extension enabling schema

* Address review comments

* Fix accidentally committed change of test_browser

* python style fix
2020-08-04 11:29:32 +03:00
Philip Rideout 0c2dd4d8b3
Add prideout to AUTHORS (see recent WebGL 2 fix) (#11746) 2020-07-28 16:31:52 -07:00
Colin GUYON 7e3d2e3ee6
Fix file packager preload-cache feature not working in a Worker (#11695)
An exception was thrown when loading the data JS loader script,
due to window being unavailable in a Worker.

Tested on recent versions of Chrome, Firefox and Safari.
2020-07-23 12:54:03 -07:00
Nicholas Phillips bad9fe7f36
fix: GL_INFO_LOG_LENGTH returns 0 if there is no information log (#11685)
Fixes #11673

The webgl port of glGetShaderiv(..., GL_INFO_LOG_LENGTH) 
incorrectly returned 1 when there was no information log. The GLES 2
standard says that it should return 0 in this case. This change will make
it correctly return 0.
2020-07-21 15:58:44 -07:00