Patent ID: 7620944
Filing Date: 2009-11-17
Classification: G06F

Abstract:
1. A method used by a compiler stored in a computer system, that when executed by a processor on the computer system, the method performs operations of determining a target type in an expression comprising an operator and at a plurality of expression operands, where said operands comprise n operands O 1 through O n , where n is greater than or equal to one, and where each operand O m is of a specific type T m , in a loosely-typed programming language, the method comprising the steps of: determining that the operator is not defined over at least one operand; determining as said target type a most encompassed type from among a first set of types of loosely-typed operands, where said first set of types comprises all resulting types of all first variant expressions, where each of said first variant expressions comprises said target expression with at least one of said expression operands, at least one expression operand being a user-defined type, replaced using widening type conversion, if said first set is not empty, said determining a most encompassed type comprising: if said first set is empty, determining as said target type a most encompassing type from among a second set of types of loosely-typed operands, where said second set of types comprises all resulting types of all second variant expressions, where each of said second variant expressions comprises said target expression with at least one of said expression operands, replaced using at least one of widening and narrowing type conversion; and assigning said target type to said operator.