Skip to content

Commit

Permalink
feat: add opcode instructions counter (#1)
Browse files Browse the repository at this point in the history
* add opcode counter

* remove static

* update generated

* fix

* fix prettier

* remove prepack
  • Loading branch information
leanmendoza authored and menduz committed May 4, 2023
1 parent d9b8540 commit d497c33
Show file tree
Hide file tree
Showing 7 changed files with 695 additions and 44 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Javascript/Typescript bindings for QuickJS, a modern Javascript interpreter,
compiled to WebAssembly.

- Safely evaluate untrusted Javascript (up to ES2020).
- Create and manipulate values inside the QuickJS runtime ([more][values]).
- Expose host functions to the QuickJS runtime ([more][functions]).
Expand Down
338 changes: 330 additions & 8 deletions ts/generated/emscripten-module.WASM_DEBUG_ASYNCIFY.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

338 changes: 330 additions & 8 deletions ts/generated/emscripten-module.WASM_DEBUG_SYNC.js

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions ts/generated/emscripten-module.WASM_RELEASE_ASYNCIFY.js

Large diffs are not rendered by default.

25 changes: 13 additions & 12 deletions ts/generated/emscripten-module.WASM_RELEASE_SYNC.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions ts/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export async function newQuickJSWASMModule(
wasmModule.type = "sync"
const ffi = new QuickJSFFI(wasmModule)

// call once to compile it
ffi.QTS_ResetOpcodeCounter()
ffi.QTS_GetOpcodeCounter()

return new QuickJSWASMModule(wasmModule, ffi)
}

Expand Down

0 comments on commit d497c33

Please sign in to comment.