mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 15:01:23 +00:00
uses (JS) const
for stack and slab declarations (#415)
This commit is contained in:
committed by
Alex Crichton
parent
791e69a5c0
commit
d179503a63
@ -47,7 +47,7 @@ and what we actually generate looks something like:
|
||||
// foo.js
|
||||
import * as wasm from './foo_bg';
|
||||
|
||||
let stack = [];
|
||||
const stack = [];
|
||||
|
||||
function addBorrowedObject(obj) {
|
||||
stack.push(obj);
|
||||
@ -135,7 +135,7 @@ different. Let's see the generated JS's slab in action:
|
||||
```js
|
||||
import * as wasm from './foo_bg'; // imports from wasm file
|
||||
|
||||
let slab = [];
|
||||
const slab = [];
|
||||
let slab_next = 0;
|
||||
|
||||
function addHeapObject(obj) {
|
||||
|
Reference in New Issue
Block a user