Commit f7a408d
wasm: support js string constant esm import
Extends the Wasm ESM Integration for importing WebAssembly
modules in either the source phase or instance phase to support
importing static JS string constants from the special
import name `wasm:js/string-constants`.
PR-URL: #62198
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent af8d092 commit f7a408dCopy full SHA for f7a408d
5 files changed
+19Lines changed: 19 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- doc/api
- lib/internal/modules/esm
- test/fixtures/es-modules
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
800 | 800 | |
801 | 801 | |
802 | 802 | |
| 803 | + |
| 804 | + |
| 805 | + |
| 806 | + |
| 807 | + |
| 808 | + |
| 809 | + |
| 810 | + |
| 811 | + |
803 | 812 | |
804 | 813 | |
805 | 814 | |
|
Collapse file
lib/internal/modules/esm/translators.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/translators.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
521 | 521 | |
522 | 522 | |
523 | 523 | |
| 524 | + |
524 | 525 | |
525 | 526 | |
526 | 527 | |
|
Binary file not shown.
Collapse file
test/fixtures/es-modules/js-string-builtins.wat
Copy file name to clipboardExpand all lines: test/fixtures/es-modules/js-string-builtins.wat+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
| 8 | + |
| 9 | + |
7 | 10 | |
8 | 11 | |
9 | 12 | |
10 | 13 | |
11 | 14 | |
| 15 | + |
12 | 16 | |
13 | 17 | |
14 | 18 | |
| ||
26 | 30 | |
27 | 31 | |
28 | 32 | |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
29 | 37 | |
Collapse file
test/fixtures/es-modules/test-wasm-js-string-builtins.mjs
Copy file name to clipboardExpand all lines: test/fixtures/es-modules/test-wasm-js-string-builtins.mjs+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
0 commit comments