US 12,333,319 B2
Tracing just-in-time WASM compiler
Katelyn Tera Gadd, Seattle, WA (US)
Assigned to Microsoft Technology Licensing, LLC., Redmond, WA (US)
Filed by MICROSOFT TECHNOLOGY LICENSING, LLC., Redmond, WA (US)
Filed on Mar. 31, 2023, as Appl. No. 18/129,782.
Prior Publication US 2024/0330029 A1, Oct. 3, 2024
Int. Cl. G06F 9/455 (2018.01)
CPC G06F 9/4552 (2013.01) [G06F 9/45508 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A system comprising:
one or more processors; and
a memory that stores an interpreter and a tracing Just-In-Time (JIT) WebAssembly (WASM) compiler that are configured to be executed by the one or more processors within a web browser in a sandbox execution environment,
wherein the interpreter includes instructions that perform acts to:
obtain a plurality of interpreter opcodes of a web application to execute;
insert at least one prepare point opcode in a select location of the plurality of interpreter opcodes;
upon execution of the at least one prepare point opcode for more than a first threshold value, invoke the tracing JIT WASM compiler to transform a linear sequence of the plurality of interpreter opcodes into WASM code;
upon successful compilation of the linear sequence of the plurality of interpreter opcodes into WASM code, replace the at least one prepare point opcode into a monitoring point opcode, wherein the monitoring point opcode is associated with the WASM code;
upon execution of the monitoring point opcode, initiate execution of the WASM code in a WASM runtime and monitor execution frequency of the monitoring point opcode; and
upon successful execution of the WASM code for more than a third threshold value, replace the monitoring point opcode with an entry point opcode.