A method is provided for tracking the type of at least one local variable after calling a subroutine. The exemplary method associates each one of a plurality of branch instructions calling the subroutine with a first information, which indicates the type of value stored in the local variable when each one of the plurality of branch instructions is executed. The exemplary method associates at least one execution point-of-interest within the subroutine with a second information. The execution point-of-interest is any point within the subroutine where it may be necessary to ascertain the type of each local variable. The second information is a data structure indicating a change in type made to the local variable after entering the subroutine and before the execution point-of-interest. The exemplary method associates the execution point-of-interest with a return address for the subroutine. This return address enables the method to identify the point in the calling program from which the current subroutine was called. When a request is received to identify the type of the local variable at the execution point-of-interest in the subroutine, the exemplary method obtains a second map from the second information using the execution point-of-interest. The second map indicates the change in type of the local variable made within the subroutine. The method also obtains the return address associated with the execution point-of-interest, and obtains a first map from the first information using the return address. The first map indicates the type of value stored in the local variable when one of the branch instructions is executed to call the subroutine. Given the first and second maps, the exemplary method merges the first map with the second map to identify a current type for the local variable. In performing this merge, the method combines the type status of the local variable as modified by the subroutine with the type status of the local variable as it stood before calling the subroutine.

Un método se proporciona para seguir el tipo por lo menos de una variable local después de llamar un subprograma. El método ejemplar asocia cada de una pluralidad de instrucciones de rama que llaman el subprograma a una primera información, que indica el tipo de valor almacenado en la variable local cuando cada de la pluralidad de instrucciones de rama se ejecuta. El método ejemplar asocia por lo menos un punto-de-intere's de la ejecución dentro del subprograma a una segunda información. El punto-de-intere's de la ejecución es cualquier punto dentro del subprograma donde puede ser necesario comprobar el tipo de cada variable local. La segunda información es una estructura de datos que indica un cambio en el tipo hecho a la variable local después de incorporar el subprograma y antes del punto-de-intere's de la ejecución. El método ejemplar asocia el punto-de-intere's de la ejecución a un remite para el subprograma. Este remite permite al método identificar el punto en el programa que llama de el cual el subprograma actual fue llamado. Cuando se recibe una petición de identificar el tipo de la variable local en el punto-de-intere's de la ejecución en el subprograma, el método ejemplar obtiene un segundo mapa de la segunda información usando el punto-de-intere's de la ejecución. El segundo mapa indica el cambio en el tipo de la variable local hecha dentro del subprograma. El método también obtiene el remite asociado al punto-de-intere's de la ejecución, y obtiene un primer mapa de la primera información usando el remite. El primer mapa indica el tipo de valor almacenado en la variable local cuando una de las instrucciones de rama se ejecuta para llamar el subprograma. Dado los primeros y segundos mapas, el método ejemplar combina el primer mapa con el segundo mapa para identificar un tipo actual para la variable local. En la ejecución de esta fusión, el método combina el tipo estado de la variable local según lo modificado por el subprograma con el tipo estado de la variable local como estaba parado antes de llamar el subprograma.

 
Web www.patentalert.com

< (none)

< Apparatus and method for checking dependencies among classes in an object-oriented program

> SOI circuit design method

> (none)

~ 00042