Generating compilable machine code programs from dynamic language code

    公开(公告)号:US11537372B2

    公开(公告)日:2022-12-27

    申请号:US17210499

    申请日:2021-03-24

    发明人: Nicolas Toper

    IPC分类号: G06F9/44 G06F8/41

    摘要: Methods and systems describe providing a compilable machine code program from dynamic language code. First, the system receives a computer program consisting of code in a dynamic language. For each dynamic instruction within the code, the system: identifies all function calls within the code which may call the dynamic instruction; generates a super slice callgraph for all identified function calls for the dynamic instruction, including dependency relationships for instance variables and static variables within time constraints; and generates a set of slices for the dynamic instruction. The system then compiles and executes each slice to identify one or more values for each dynamic instruction. Next, the system updates the computer program such that each of at least a subset of the dynamic instructions is replaced with machine code instructions based on the corresponding values.