IP Library Granted Patent US 8,387,027
Granted Patent B2
US 8,387,027 · App. 12/688,809 · Granted Feb 26, 2013

Method and system for compiling a dynamically-typed method invocation in a statically-typed programming language

Inventors: Alexander R. Buckley (Cupertino, CA); John Rose (San Jose, CA); Joseph D. Darcy (Mountain View, CA)
Assignee: Oracle America, Inc. formerly Sun Microsystems, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,387,027
App. No.
12/688,809
Granted
Feb 26, 2013
Kind
B2
Abstract

A method for compiling source code, involving: obtaining a statement of the source code comprising a method call, where the source code is composed in a statically-typed programming language; determining whether the method call is a dynamic method call; upon determining that the method call is a dynamic method call, compiling a dynamic method invocation without performing type checking on the method call; upon determining that the method call is not a dynamic method call: performing type checking on the method call, selecting a target method to invoke, and compiling a static method invocation to invoke the target method.

Claims (23)

1. A non-transitory computer readable storage medium having computer readable program code embodied therein, the computer readable program code adapted to, when executed by a processor, implement a method for compiling source code, the method comprising:

obtaining a statement of the source code, wherein the statement comprises a first method call, wherein the first method call comprises a first method name, a first argument, and a second argument, wherein the first argument is a second method name for a second method call and wherein the second argument is an argument for the second method call, and wherein the source code is composed in a statically-typed programming language;

determining that the first method call is a dynamic method call based on the first method name;

upon determining that the first method call is a dynamic method call:

compiling a dynamic method invocation for the second method call without performing type checking on the second method call.

2. The non-transitory computer readable storage medium of claim 1 , wherein the second method is composed using one selected from a group consisting of a statically-typed programming language and a dynamically-typed programming language.

3. The non-transitory computer readable storage medium of claim 1 , wherein the dynamic method invocation is compiled into bytecode.

4. The non-transitory computer readable storage medium of claim 1 , wherein compiling the dynamic method invocation is performed without determining whether the second method call includes any characters defined as illegal within the statically-typed programming language.

5. The non-transitory computer readable storage medium of claim 1 , wherein the second method name is specified using one selected from a group consisting of a string argument to a syntactic method call, a special syntax, and a normal syntax used by the statically-typed programming language.

6. The non-transitory computer readable storage medium of claim 1 , wherein the dynamic method invocation comprises at least one argument type, and wherein the at least one argument type is specified using one selected from a group consisting of an implicit argument, an explicit argument, a special syntax, and a type argument.

7. The non-transitory computer readable storage medium of claim 1 , wherein the dynamic method invocation comprises at least one return type, and wherein the at least one return type is specified using one selected from a group consisting of an explicit argument, a special syntax, and a type argument.

8. A system, comprising:

a processor;

a physical memory; and

a non-transitory computer usable storage medium having computer readable program code embodied therein, the computer readable program code adapted to, when executed by the processor, implement a method for compiling source code, the method comprising:

obtaining a statement of the source code, wherein the statement comprises a first method call, wherein the first method call comprises a first method name, a first argument, and a second argument, wherein the first argument is a second method name for a second method call, and wherein the second argument is an argument for the second method call, and wherein the source code is composed in a statically-typed programming language;

determining that the first method call is a dynamic method call based on the first method name;

upon determining that the first method call is a dynamic method call:

compiling a dynamic method invocation for the second method call without performing type checking on the second method call.

9. The system of claim 8 , wherein the second method is composed using one selected from a group consisting of a statically-typed programming language and a dynamically-typed programming language.

10. The system of claim 8 , wherein the dynamic method invocation is compiled into bytecode.

11. The system of claim 8 , wherein compiling the dynamic method invocation is performed without determining whether the second method call includes any characters defined as illegal within identifiers of the statically-typed programming language.

12. The system of claim 8 , wherein the method name is specified using one selected from a group consisting of a string argument to a syntactic method call, a special syntax, and a normal syntax used by the statically-typed programming language.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037311/0195 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2010
From: BUCKLEY, ALEXANDER R.; ROSE, JOHN; DARCY, JOSEPH D.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 023859/0274 →
Continuity (1)
Related Publication 20110179402A1 · Jul 21, 2011