Program variable type processing method and device
The embodiment of the invention relates to the technical field of computers, in particular to a program variable type processing method and device. Constructing a variable type syntax tree of the source code file based on variables in the to-be-compiled source code file; determining at least one fir...
Gespeichert in:
Hauptverfasser: | , , , , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The embodiment of the invention relates to the technical field of computers, in particular to a program variable type processing method and device. Constructing a variable type syntax tree of the source code file based on variables in the to-be-compiled source code file; determining at least one first variable in the source code file based on the variable type syntax tree, and obtaining the variable type of the first variable; adding the variable type of the first variable and the variable type syntax tree into a byte code file generated by compiling the source code file; and deriving the variable type of the second variable based on the variable type syntax tree and the variable type of the first variable in the bytecode file running process. By pre-storing the variable types of a small number of first variables and constructing the variable type syntax tree, the processor can efficiently derive the variable types of other variables when running the source code file, so that the running speed is effectively |
---|