Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WASM Bindings optimizations and fixes (#41808)
* Fix MarshalTypedArrayByte and re-enable it. Re-enable TestFunctionApply * Re-enable MarshalTypedArray * Detect when the managed wrapper for a JS object has been collected and create a new one * Remove debugging code * Maintain a small pool of temporary root instances to minimize GC pressure. Improve benchmark * Don't use release_roots in call_method due to varargs overhead * Various call_method optimizations * Checkpoint: Don't rely on finally block for teardown in call path, because it has a performance cost * Checkpoint: Unboxing fast path for primitives * Checkpoint: Fix unboxing fast path * Update bindings to use bound static methods instead of call_method in various places * Address PR feedback * Revert sample and add separate proj for benchmark * Fix benchmark * Revert test change * Fix passing mono object ptrs to bound functions Fix passing strings across the boundary Fix JS strings being truncated at the first null when passed to mono * Implement unboxing for chars Slightly optimize the unboxing slow path * Don't allocate a root buffer for arguments if nothing needs to be rooted. Reuse scratch native buffer across calls unless re-entrant to avoid per-invoke malloc * Fix whitespace damage from merge * Tweaks to try and prevent boxing/gc * Fix typo * Add some tests * Fix test failures * Add more error handling and diagnostic messages Fix a couple broken tests * Repair merge damage * Remove bindings benchmark * Use TypedArray.fill 3-argument version to zero memory * Checkpoint: Introduce format strings * Fix interpolated strings * Test refactoring * Checkpoint: Add more test coverage for bindings and interop * Checkpoint: Enum marshaling works * Improve test coverage * Checkpoint: Unify unboxing of primitive types * Checkpoint: Unify unboxing of primitive types * Checkpoint: Restore fn to satisfy runtime-test.js * Checkpoint: Unify boxing for primitives * Remove now-unused box methods * Don't store names for null method IDs * Fix indentation damage * Add test * Satisfy CI * Accept weaker promises Co-authored-by: Larry Ewing <[email protected]>
- Loading branch information