摘要:
Methods and apparatus to implement annotation based thunking are disclosed. An example method comprises locating a parameter of a function, the parameter to be passed as a pointer if a size of the parameter is greater than a threshold and to be passed as data if the size of the parameter is not greater than the threshold, and adding an annotation record for the parameter to a byte code image file containing byte code for the function.
摘要:
Methods and apparatus are described to compile and translate source code. In some embodiments, source code is compiled into source binary code for a source platform; an annotation section associated with the source binary code is generated, wherein the annotation section comprises an annotation for a scope, the scope comprising at least one block of the source binary code having at least one attribute to aid a translator optimization. If the scope comprises a plurality of blocks, the blocks have consecutive addresses with each other and have the at least one attribute in common. In the embodiments, the source binary code is further translated into target binary code for a target platform by utilizing the annotation section.
摘要:
A method to eliminate redundant store and load instruction pairs in the optimization of a stack-based language comprises determining data dependencies within a sequence of instructions, identifying a store-load instruction pair within the sequence of instructions, identifying one or more stack location insensitive sequences between the store-load instruction pair that enclose one or more of the data dependencies, reordering the one or more stack location insensitive sequences based on the data dependencies to place the two instructions of the store-load instruction pair immediately adjacent to each other, and removing the store-load instruction pair.
摘要:
Methods and apparatus to implement annotation based thunking are disclosed. An example method comprises locating a parameter of a function, the parameter to be passed as a pointer if a size of the parameter is greater than a threshold and to be passed as data if the size of the parameter is not greater than the threshold, and adding an annotation record for the parameter to a byte code image file containing byte code for the function.