Systems, devices, and methods are provided for generating machine code for a second execution environment based on bytecode generated for a first execution environment. A method may comprise steps to obtain a set of bytecode instructions executable in a first execution environment, parse the set of bytecode instructions to determine at least one stack-based class object, determine an intermediate representation (IR) of the set of bytecode instructions, wherein the intermediate representation comprising at least one single static assignment (SSA)-based representation that corresponds to the at least one stack-based class object, and translate the intermediate representation into machine code that is executable in the second execution environment. For example, Java bytecode generated to run on a Java Virtual Machine (JVM) may be translated to machine code that runs in an execution environment that lacks or otherwise restricts the use of a JVM.
Legal claims defining the scope of protection, as filed with the USPTO.
4. The computer-implemented method of claim 1, further comprising generating a header file that exposes the machine code to second machine code executable in the second execution environment.
8. The non-transitory computer-readable storage medium of claim 5, wherein the machine code is generated according to an instruction set architecture of the second execution environment.
11. The non-transitory computer-readable storage medium of claim 9, wherein the set of bytecode instructions are generated from Java or Kotlin source code.
12. The non-transitory computer-readable storage medium of claim 5, wherein the intermediate representation is LLVM-IR code.
15. The system of claim 14, wherein the SSA-based data layout is aligned according to an order in which stack-based variables are declared in the stack-based class object.
18. The system of claim 17, wherein the runtime library implements memory management functionality.
19. The system of claim 13, wherein source code used to generate the set of bytecode instructions is inaccessible to the system.
20. The system of claim 13, wherein the machine code is executable by the one or more processors of the system.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
October 28, 2021
September 10, 2024
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.