Patent ID: 6075942
Filing Date: 2000-06-13
Classification: G06F

Abstract:
For performing a computer program specified by source code, a system comprising:A) a first computer system for:i) performing a conversion of the source code into stack-oriented-machine code that consists of a sequence of stack-oriented-machine-code instructions of which each of a plurality consists of a stack-oriented-machine operation code that represents an arithmetic or logical operation and implicitly specifies drawing that operation's operands from and placing its result in a common operand stack, and of which each of a further plurality consists of (i) a stack-oriented-machine operation code that represents loading the operand stack with a local variable or storing contents from that operand stack in a local variable and (ii) a variable code that explicitly specifies that local variable, the conversion comprising:a) translating the source code into register-oriented-machine code that consists of a sequence of machine-code instructions of which each of a plurality consists of (i) a machine operation code that represents an arithmetic or logical operation and (i) at least one register code that explicitly specifies a machine register from which the operation is to draw its operand and/or store its results;b) associating a different stack-oriented-machine-code local variable with each of a plurality of the machine registers; andc) translating the register-oriented-machine code into the stack-oriented-machine code by:(1) for each machine-code instruction that specifies performing a given arithmetic or logical operation and explicitly specifies a given machine register from which an operand of that arithmetic or logical operation is to be drawn, generating:(a) a stack-oriented-machine-code instruction that includes:(i) a stack-oriented-machine operation code that explicitly specifies the stack-oriented-machine-code local variable associated with the given machine register; and(ii) a variable code that specifies loading the operand stack with a local variable; and(b) a stack-oriented-machine-code instruction that specifies performing that arithmetic or logical operation and placing the result in the operand stack; and(2) for each machine-code instruction that specifies performing a given arithmetic operation and explicitly specifies a given machine register that is to receive the operation's result, generating:(a) a stack-oriented-machine-code instruction that specifies performing that arithmetic or logical operation and placing the result in the operand stack; and(b) a stack-oriented-machine-code instruction for storing contents of the operand stack in the local variable associated with the given register; andii) transmitting the resultant stack-oriented-machine code; andB) a second computer system, including a microprocessor, for receiving the stack-oriented machine code transmitted by the first computer system, translating the stack-oriented machine code into register-oriented machine code, and operating its microprocessor in accordance with the register-oriented-machine code.