Skip to content

Commit 9bd9968

Browse files
committed
Merge branch 'main' into update_libcxx_libcxxabi_19
2 parents 76a4466 + c08204e commit 9bd9968

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+212
-180
lines changed

.coveragerc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.mypy.ini

Lines changed: 0 additions & 16 deletions
This file was deleted.

pyproject.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[tool.coverage.run]
2+
source = [ "." ]
3+
omit = [
4+
"./test/*",
5+
"./third_party/*",
6+
"./tools/emcoverage.py",
7+
"test.py",
8+
]
9+
10+
[tool.mypy]
11+
mypy_path = "third_party/,third_party/ply,third_party/websockify"
12+
files = [ "." ]
13+
exclude = '''
14+
(?x)(
15+
cache |
16+
third_party |
17+
conf\.py |
18+
emrun\.py |
19+
site/source/_themes/ |
20+
tools/scons/site_scons/site_tools/emscripten/__init__\.py |
21+
site/source/get_wiki\.py |
22+
test/parse_benchmark_output\.py
23+
)'''
24+
25+
[[tool.mypy.overrides]]
26+
module = [
27+
"tools.create_dom_pk_codes",
28+
"tools.webidl_binder",
29+
"tools.toolchain_profiler",
30+
"tools.filelock",
31+
"tools.find_bigvars",
32+
"leb128",
33+
"ply.*",
34+
]
35+
ignore_errors = true

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
flake8==5.0.4
88
flake8-bugbear==22.9.23
99
flake8-unused-arguments==0.0.11
10-
coverage==5.5
10+
coverage[toml]==5.5
1111
mypy==0.971
1212
types-requests==2.27.14
1313
unittest-xml-reporting==3.1.0

src/library.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,18 +2181,14 @@ addToLibrary({
21812181
return x.startsWith('dynCall_') ? x : '_' + x;
21822182
},
21832183

2184-
$asyncLoad__docs: '/** @param {boolean=} noRunDep */',
2185-
$asyncLoad: (url, noRunDep) => {
2184+
$asyncLoad: (url) => {
21862185
return new Promise((resolve, reject) => {
2187-
var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
2188-
if (dep) addRunDependency(dep);
21892186
readAsync(url).then(
21902187
(arrayBuffer) => {
21912188
#if ASSERTIONS
21922189
assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
21932190
#endif
21942191
resolve(new Uint8Array(arrayBuffer));
2195-
if (dep) removeRunDependency(dep);
21962192
}, reject);
21972193
});
21982194
},

src/library_async.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ addToLibrary({
471471
emscripten_wget_data: (url, pbuffer, pnum, perror) => {
472472
return Asyncify.handleSleep((wakeUp) => {
473473
/* no need for run dependency, this is async but will not do any prepare etc. step */
474-
asyncLoad(UTF8ToString(url), /*noRunDep=*/true).then((byteArray) => {
474+
asyncLoad(UTF8ToString(url)).then((byteArray) => {
475475
// can only allocate the buffer after the wakeUp, not during an asyncing
476476
var buffer = _malloc(byteArray.length); // must be freed by caller!
477477
HEAPU8.set(byteArray, buffer);

src/library_wget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var LibraryWget = {
6565
emscripten_async_wget_data: (url, userdata, onload, onerror) => {
6666
{{{ runtimeKeepalivePush() }}}
6767
/* no need for run dependency, this is async but will not do any prepare etc. step */
68-
asyncLoad(UTF8ToString(url), /*noRunDep=*/true).then((byteArray) => {
68+
asyncLoad(UTF8ToString(url)).then((byteArray) => {
6969
{{{ runtimeKeepalivePop() }}}
7070
callUserCallback(() => {
7171
var buffer = _malloc(byteArray.length);

system/include/emscripten/heap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ size_t emscripten_get_heap_max(void);
4646
// dlmalloc and emmalloc.
4747
void *emscripten_builtin_memalign(size_t alignment, size_t size);
4848
void *emscripten_builtin_malloc(size_t size);
49+
void *emscripten_builtin_realloc(void *ptr, size_t size);
4950
void *emscripten_builtin_calloc(size_t nmemb, size_t size);
5051
void emscripten_builtin_free(void *ptr);
5152

system/lib/dlmalloc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6082,6 +6082,7 @@ int mspace_mallopt(int param_number, int value) {
60826082
// This allows an easy mechanism for hooking into memory allocation.
60836083
#if defined(__EMSCRIPTEN__) && !ONLY_MSPACES
60846084
extern __typeof(malloc) emscripten_builtin_malloc __attribute__((alias("dlmalloc")));
6085+
extern __typeof(realloc) emscripten_builtin_realloc __attribute__((alias("dlrealloc")));
60856086
extern __typeof(calloc) emscripten_builtin_calloc __attribute__((alias("dlcalloc")));
60866087
extern __typeof(free) emscripten_builtin_free __attribute__((alias("dlfree")));
60876088
extern __typeof(memalign) emscripten_builtin_memalign __attribute__((alias("dlmemalign")));

system/lib/emmalloc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,7 @@ void *emmalloc_aligned_realloc_uninitialized(void *ptr, size_t alignment, size_t
11131113
void *emmalloc_realloc(void *ptr, size_t size) {
11141114
return emmalloc_aligned_realloc(ptr, MALLOC_ALIGNMENT, size);
11151115
}
1116+
EMMALLOC_ALIAS(emscripten_builtin_realloc, emmalloc_realloc);
11161117
EMMALLOC_ALIAS(__libc_realloc, emmalloc_realloc);
11171118
EMMALLOC_ALIAS(realloc, emmalloc_realloc);
11181119

0 commit comments

Comments
 (0)