US20170097811A1 - Interface method resolution in object oriented programming models - Google Patents
Interface method resolution in object oriented programming models Download PDFInfo
- Publication number
- US20170097811A1 US20170097811A1 US14/876,065 US201514876065A US2017097811A1 US 20170097811 A1 US20170097811 A1 US 20170097811A1 US 201514876065 A US201514876065 A US 201514876065A US 2017097811 A1 US2017097811 A1 US 2017097811A1
- Authority
- US
- United States
- Prior art keywords
- interface
- lookup
- artefact
- invoked
- cached
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G06F17/3048—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45516—Runtime code conversion or optimisation
- G06F9/4552—Involving translation to a different instruction set architecture, e.g. just-in-time translation in a JVM
Definitions
- the present invention relates generally to the field of object oriented programming models, and more particularly to the implementation of interface method resolution in object oriented programming models.
- interface In object oriented programming (OOP) models, interface (also known as protocols) provide a mechanism for multiple inheritance of specification, but not implementation. This provides a common means for unrelated objects to communicate with one another. Interfaces are explicitly implemented in a variety of OOP models such as Java, C#, and Objective-C. In various OOP implementations, interfaces may be implemented by virtual method pointers, which relate the interface method names to their corresponding implementations in each class.
- OOP object oriented programming
- a computer-implemented method includes receiving an invocation of an invoked interface associated with a class, identifying, based on the class, a plurality of interface lookup artefacts and a cached interface lookup artefact, and comparing the invoked interface with a cache interface.
- the cache interface is associated with the cached interface artefact.
- the computer-implemented method further includes, responsive to the invoked interface matching the cache interface, returning the cached interface artefact, and responsive to the invoked interface not matching the cache interface, searching the plurality of interface lookup artefacts until finding a matching interface lookup artefact.
- the matching interface lookup artefact is associated with a matching interface that matches the invoked interface. Responsive to finding the matching interface lookup artefact, returning the matching interface lookup artefact and updating the cached interface lookup artefact to the matching interface lookup artefact.
- a corresponding computer program product and computer system are also disclosed.
- FIG. 1 is a functional block diagram depicting a computing environment suitable for performing an ITable cache program, in accordance with at least one embodiment of the present invention.
- FIG. 2 is a block diagram depicting an exemplary ITable linked list, in accordance with at least one embodiment of the present invention.
- FIG. 3 is a flowchart diagram illustrates operational steps of an ITable cache program, in accordance with an embodiment of the present invention.
- FIG. 4 displays a section of Java-like pseudocode suitable for performing an ITable cache program with cached ITable validation, in accordance with an embodiment of the present invention.
- FIG. 5 displays a section of Java-like pseudocode suitable for performing an ITable cache program with cached ITable initialization, in accordance with an embodiment of the present invention.
- FIG. 6 is a block diagram of various logical components of a computer system suitable for performing an ITable cache program, in accordance with at least one embodiment of the invention.
- each class that implements one or more interfaces tracks the mapping of the interface methods to virtual methods on a per class basis. This mapping may be stored in an interface table (ITable) for each interface that a class implements. For each class, a linked list of ITables may be maintained, whereby any invocation of an interface via a class object requires searching the linked list of ITables of the class for the ITable that matches the interface that defines the method invoked (in Java, interfaces are invoked via the invokeinterface instruction, as well as the instanceof and checkcast instructions, when passed an interface type).
- ITable interface table
- the ITable may be understood as an interface lookup artefact, which may include alternative implementations of interfaces as defined in the relevant specifications for Java or another OOP model. Examples include other linear data structures such as arrays as well as hierarchical data structures, such as trees, heaps, etc.
- interfaces and interface-like constructs in Java and Java-like OOP models require some type of lookup of the correct implementation at run-time, as a feature of implemented polymorphism.
- identifying the correct implementation of interface methods cannot be done until run-time, which requires that the interface lookup artefacts be fully searched, whether linearly as in a linked list for Java (in particular the IBM J9 implementation) or non-linearly as in a hierarchical or other data structure.
- searching requires examining all nodes, which is known to be slow. This property of interfaces is an inherent inefficiency of polymorphism in Java that has been recognized since the introduction of Java in the mid-1990s.
- Interface Method Table includes hashing interface signatures to a table with a fixed number of slots, with custom-generated stubs that handle conflict resolution resulting from hash collisions.
- IMT Interface Method Table
- PIC Polymorphic Inline Cache
- the inventors of the present invention have identified that, in addition to the call-site based monomorphism, there is a “stickiness” or “weak monomorphism” associated with interface invocations via a given class—most consecutive calls to an interface via a given class are for the same interface.
- the inventors concluded that a performance enhancement may be obtained by storing the most recently used interface's ITable.
- the bytecode instructions instanceof and checkcast, when passed an interface type were identified as good predictors that the relevant ITable was about to be used consecutively, making the cached ITable likely advantageous if updated at that point.
- One possible implementation would include re-ordering the ITable linked list so that the most recently used ITable appears first, however this would result in an invalid linked list because the ITable linked lists are, in J9 and other implementations, suffix shared between subclasses and superclasses (see FIG. 2 ). Additionally, re-ordering requires overhead as the ITable linked list must be read or modified.
- the solution of the present invention involves caching the most recently used ITable, at a class level, but leaves the ITable linked list unmodified.
- PIC provides a cache as to a given call site, but does not capture all cases of invokeinterface, as well as cases of instanceof or checkcast being passed an interface type.
- the present invention provides an ITable cache program 101 that caches the last used interface as to a given class, regardless of call site.
- the present invention and PIC represent different cache-related concepts and may be used complementarily in the same system with combined benefits.
- Possible advantages of various embodiments of the present invention include: (1) avoiding, in the common case a linear search of the ITables linked list; (2) applying the “stickiness” or “weak monomorphism” of interface dispatches; (3) being simple to implement; (4) enhancing performance particularly in the case where the ITable linked list is long and the targeted interface appears late in the chain; and (5) having a low memory footprint, requiring only an additional word per class.
- any particular embodiment of the invention may enjoy some, all, or none, of the aforementioned advantages, and the recitation of such possible advantages is not intended as a limitation on the scope of the invention as described and claimed herein.
- the inventors have demonstrated a performance enhancement on an experimental Java Virtual Machine (JVM) that already employs PIC, both with and without the present invention implemented.
- JVM Java Virtual Machine
- a micro-benchmark test an ITable linked list of ten interfaces was created and an invokeinterface using the last ITable was called. This test showed an 11% improvement.
- the inventors ran the startup process for IBM Liberty Profile forty times on each version of the experimental JVM. The result showed a 2.32% decrease in average startup time and a 0.10% increase in average memory footprint.
- FIG. 1 depicts an example computing environment 100 suitable for performing an ITable cache program 101 in accordance with at least one embodiment of the present invention.
- the computing environment 100 includes a JVM 102 .
- Java source code 120 is compiled by a Java compiler 122 into Java bytecode 124 . Compilation need not occur in real-time and need not occur within the same environment as the JVM 102 .
- the interpreter 104 and the just-in-time compiler (JIT) 106 process Java bytecode 124 together, with the JIT 106 supporting the interpreter 104 by producing architecture dependent machine code 118 in real time.
- the object model 108 is represented in memory by a collection of data structures including J9 classes 110 .
- Each J9 class 110 includes in its data structure an ITables list 114 , which is a linked list of ITables, one for each interface implemented by the particular J 9 class.
- the ITable cache program 101 may implemented through the behavior of both the Interpreter 104 and the JIT, or exclusively in one or the other. This is made possible because the object model 108 is accessible to both the Interpreter 104 and the JIT 106 .
- OOP model may be substituted, for example C#.
- C++ or Objective C the virtual machine may be dispensed with entirely in favor of a purely compiled program, with the ITable cache program 101 implemented in compiled functions.
- the ITable cache program 101 may be implemented in hardware, for example in a hardware Java processor.
- the plurality of interface lookup artefacts may be organized as a linked list of ITables, and searching the plurality of interface lookup artefacts includes linearly traversing (walking) the linked list.
- FIG. 2 depicts an exemplary linked list of ITables for two J9 classes, Class A 210 and Class B 220 .
- Class A 210 includes a cached ITable 212
- Class B has a cached ITable 222 , in accordance with at least one embodiment of the present invention.
- Class B 220 is a subclass of Class A 210 ; equivalently, Class A 210 is a superclass of Class B 220 .
- the superclass/subclass relationship is defined by a superclass pointer 226 , which is defined for Class B 220 , but not for Class A 210 . If Class A had a superclass of its own, then it would define a superclass pointer accordingly.
- both Class A 210 and Class B 220 implement a number of interfaces, as depicted by ITables I-IV 230 - 236 .
- Class B 220 being a subclass of Class A 210 , inherits Class A 210 's implementations of those interfaces that Class A 210 implements but Class B does not override.
- Class B 220 also implements some interfaces on its own and/or overrides one or more interfaces implemented by Class A 210 .
- Each J9 class is associated to the correct ITable for its own implementation of each interface by its own ITables pointer 214 and 224 for Class A 210 and Class B 220 , respectively.
- Class B 210 's ITables pointer 224 points to ITable I 230 , whose Next 230 A points to ITable II 232 .
- ITable II 232 represents the last interface implementation unique to Class B 220 not inherited from Class A 210 .
- ITable II 232 's Next 232 A points to ITable III 234 , as does Class A 210 's ITables pointer 214 .
- ITable III 234 all ITables of the linked list are common to Class A 210 and Class B 220 , and thus ITable III 234 's Next points to ITable IV 236 , and ITable IV 236 's Next points to 236 A, and so on until the end of the linked list.
- FIG. 3 displays a flowchart diagram for an ITable cache program 101 in accordance with at least one embodiment of the present invention.
- the ITable cache program 101 includes receiving an invocation of an invoked interface associated with a class.
- step 300 may be understood as an invokeinterface instruction to the JVM, which, in Java, would necessarily be with respect to or in the context of a particular class.
- the ITable cache program may also be executed incidentally to other bytecode instructions, specifically instanceof and checkcast, where those instructions are passed an interface type (i.e. called from an object and passed an interface as an argument to be tested against the object).
- step 300 receiving an invocation of an invoked interface associated with a class may be understood as including receiving a bytecode instruction with the bytecode instruction being passed an interface type (for invokeinterface, the interface is explicitly the one invoked; for instanceof and checkcast, the interface is the test argument), and the bytecode instruction being selected from the group consisting of: (a) invokeinterface; (b) instanceof; and (c) checkcast.
- the class is the J 9 class 110 . More generally, step 300 may be performed in any OOP model via an instruction, step, or code statement that identifies both an interface and a class (or conceptually similar OOP constructs).
- a step 302 the ITable cache program 101 identifies, based on the class, a plurality of interface lookup artefacts and a cached interface lookup artefact.
- the plurality of interface lookup artefacts is the ITables List 114 and the cached ITable 112 .
- the identification step may be performed as a lookup of the properties of the class.
- the ITable cache program 101 compares the invoked interface with a cache interface.
- the cache interface is associated with the cached interface artefact. More particularly, the cached interface artefact may be understood to represent an implementation of some interface, labeled the cache interface. In particular implementations of Java, each interface is represented in memory uniquely. Accordingly, the invoked interface may be understood to match any other interface is the invoked interface and the other interface have identical pointers; that is, a pointer to the invoked interface and a pointer to the other interface point to the same memory location.
- the ITable cache program 101 Responsive to the invoked interface matching the cache interface (the YES branch of decision block 304 ), the ITable cache program 101 returns the cached interface artefact at step 306 .
- the case of step 306 may be understood as a successful hit on the cached ITable 112 , and the JVM may then look up the correct implementation of the method called by invokeinterface and proceed.
- the ITable cache program proceeds at step 308 by searching the plurality of interface lookup artefacts until finding a matching interface lookup artefact.
- the matching interface lookup artefact is associated with a matching interface that catches the invoked interface.
- the plurality of interface lookup artefacts is organized as a linked list of ITables, and searching the plurality of interface lookup artefacts comprises linearly traversing the linked list.
- step 308 may be understood as a non-hit on the cached ITable 112 , which triggers the slow walking of the ITables list 114 ; step 308 is sought to be avoided by use of the cached ITable 112 .
- the ITable cache program 101 may find a matching interface lookup artefact, or not.
- the ITable cache program may infer an error condition.
- the inferred error condition is that the invoked interface is not implemented by the designated class.
- the ITable cache program 101 may, at terminator 312 , throw and exception or otherwise handle the error condition.
- a matching interface lookup artefact is found. Responsive to finding the matching interface lookup artefact, the ITable cache program returns, at step 314 , the matching interface lookup artefact and updates the cached interface lookup artefact to the matching interface lookup artefact.
- the cached ITable for the class that implements the invoked interface is set to the ITable for the invoked interface, which was found by walking the linked list of ITables for the class that implements the invoked interface.
- the JVM may look up the correct implementation of the method called by invokeinterface and proceed. Subsequent calls to the same implementation of a method of the invoked interface will become hits on the cached ITable 112 .
- FIG. 4 displays a Java-like pseudocode for an ITable cache program 101 , in accordance with an embodiment of the present invention.
- the first block of pseudocode provides for a cache check where the cached ITable (receiverClass.lastUsedTable) has been lazily initialized to a null value.
- the ITable cache program 101 may be understood to initialize the cached interface lookup artefact to a null value.
- the cache check is shown wrapped in a test iTable is not null.
- decision block 304 comparing the invoked interface with the cache interface may be understood to include testing whether the cached interface lookup artefact is equal to the null value. This prevents an exception condition whereby the comparison step is not possible due to the cached ITable being null.
- the second block of pseudocode of FIG. 4 depicts a linear search of the ITable linked list by traversing iTable.next.
- FIG. 5 depicts a pseudocode where the validation step is safely omitted because the cached ITable 112 has been initialized.
- the ITable cache program 101 may, responsive to the plurality of interface lookup artefacts being of at least of size one (that is, including at least one ITable or interface lookup artefact or, equivalently, the class implementing at least one interface), initialize the cached lookup artefact to the first interface lookup artefact of the plurality of interface lookup artefacts.
- the cached ITable 112 for a given J 9 class 110 may be initialized to the first ITable of the ITables list 114 . If the J9 class 110 implements no interfaces, then the cached ITable 112 may be initialized to a dummy ITable (an ITable that compares with, but is not equal to, any ITable for a real interface) to avoid a null comparison. Thus, responsive to the plurality of interface lookup artefacts being of size zero (the class implements no interfaces), the ITable cache program 101 may initialize the cached lookup artefact to a dummy lookup artefact. In the depicted case, decision block 304 , comparing the invoked interface with the cache interface may be understood to not include validating the cached interface lookup artefact.
- FIG. 6 is a block diagram depicting components of a computer 600 suitable for executing the ITable cache program 101 .
- FIG. 6 displays the computer 600 , the one or more processor(s) 604 (including one or more computer processors), the communications fabric 602 , the memory 606 , the RAM, the cache 616 , the persistent storage 608 , the communications unit 610 , the I/O interfaces 612 , the display 620 , and the external devices 618 .
- FIG. 6 provides only an illustration of one embodiment and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made.
- the computer 600 operates over a communications fabric 602 , which provides communications between the cache 616 , the computer processor(s) 604 , the memory 606 , the persistent storage 608 , the communications unit 610 , and the input/output (I/O) interface(s) 612 .
- the communications fabric 602 may be implemented with any architecture suitable for passing data and/or control information between the processors 604 (e.g. microprocessors, communications processors, and network processors, etc.), the memory 606 , the external devices 618 , and any other hardware components within a system.
- the communications fabric 602 may be implemented with one or more buses or a crossbar switch.
- the memory 606 and persistent storage 608 are computer readable storage media.
- the memory 606 includes a random access memory (RAM).
- the memory 606 may include any suitable volatile or non-volatile implementations of one or more computer readable storage media.
- the cache 616 is a fast memory that enhances the performance of computer processor(s) 604 by holding recently accessed data, and data near accessed data, from memory 606 .
- Program instructions for the ITable cache program 101 may be stored in the persistent storage 608 or in memory 606 , or more generally, any computer readable storage media, for execution by one or more of the respective computer processors 604 via the cache 616 .
- the persistent storage 608 may include a magnetic hard disk drive.
- the persistent storage 608 may include, a solid state hard disk drive, a semiconductor storage device, read-only memory (ROM), electronically erasable programmable read-only memory (EEPROM), flash memory, or any other computer readable storage media that is capable of storing program instructions or digital information.
- the media used by the persistent storage 608 may also be removable.
- a removable hard drive may be used for persistent storage 608 .
- Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer readable storage medium that is also part of the persistent storage 608 .
- the communications unit 610 in these examples, provides for communications with other data processing systems or devices.
- the communications unit 610 may include one or more network interface cards.
- the communications unit 610 may provide communications through the use of either or both physical and wireless communications links.
- the ITable cache program 101 may be downloaded to the persistent storage 608 through the communications unit 610 .
- the source of the various input data may be physically remote to the computer 600 such that the input data may be received and the output similarly transmitted via the communications unit 610 .
- the I/O interface(s) 612 allows for input and output of data with other devices that may operate in conjunction with the computer 600 .
- the I/O interface 612 may provide a connection to the external devices 618 , which may include a keyboard, keypad, a touch screen, and/or some other suitable input devices.
- External devices 618 may also include portable computer readable storage media, for example, thumb drives, portable optical or magnetic disks, and memory cards.
- Software and data used to practice embodiments of the present invention may be stored on such portable computer readable storage media and may be loaded onto the persistent storage 608 via the I/O interface(s) 612 .
- the I/O interface(s) 612 may similarly connect to a display 620 .
- the display 620 provides a mechanism to display data to a user and may be, for example, a computer monitor.
- the present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration
- the computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention
- the computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
- the computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- a non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing.
- RAM random access memory
- ROM read-only memory
- EPROM or Flash memory erasable programmable read-only memory
- SRAM static random access memory
- CD-ROM compact disc read-only memory
- DVD digital versatile disk
- memory stick a floppy disk
- a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon
- a computer readable storage medium is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
- Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network.
- the network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers.
- a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
- Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages.
- the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
- electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
- These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
- These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
- the computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
- each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the blocks may occur out of the order noted in the Figures.
- two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Abstract
Description
- The present invention relates generally to the field of object oriented programming models, and more particularly to the implementation of interface method resolution in object oriented programming models.
- In object oriented programming (OOP) models, interface (also known as protocols) provide a mechanism for multiple inheritance of specification, but not implementation. This provides a common means for unrelated objects to communicate with one another. Interfaces are explicitly implemented in a variety of OOP models such as Java, C#, and Objective-C. In various OOP implementations, interfaces may be implemented by virtual method pointers, which relate the interface method names to their corresponding implementations in each class.
- It is well-known by software engineers working in Java and related models that the required search step for interfaces is time-costly as compared with strictly class-based solutions such that interfaces continue to be disfavored.
- A computer-implemented method includes receiving an invocation of an invoked interface associated with a class, identifying, based on the class, a plurality of interface lookup artefacts and a cached interface lookup artefact, and comparing the invoked interface with a cache interface. The cache interface is associated with the cached interface artefact. The computer-implemented method further includes, responsive to the invoked interface matching the cache interface, returning the cached interface artefact, and responsive to the invoked interface not matching the cache interface, searching the plurality of interface lookup artefacts until finding a matching interface lookup artefact. The matching interface lookup artefact is associated with a matching interface that matches the invoked interface. Responsive to finding the matching interface lookup artefact, returning the matching interface lookup artefact and updating the cached interface lookup artefact to the matching interface lookup artefact. A corresponding computer program product and computer system are also disclosed.
-
FIG. 1 is a functional block diagram depicting a computing environment suitable for performing an ITable cache program, in accordance with at least one embodiment of the present invention. -
FIG. 2 is a block diagram depicting an exemplary ITable linked list, in accordance with at least one embodiment of the present invention. -
FIG. 3 is a flowchart diagram illustrates operational steps of an ITable cache program, in accordance with an embodiment of the present invention. -
FIG. 4 displays a section of Java-like pseudocode suitable for performing an ITable cache program with cached ITable validation, in accordance with an embodiment of the present invention. -
FIG. 5 displays a section of Java-like pseudocode suitable for performing an ITable cache program with cached ITable initialization, in accordance with an embodiment of the present invention. -
FIG. 6 is a block diagram of various logical components of a computer system suitable for performing an ITable cache program, in accordance with at least one embodiment of the invention. - In Java and Java-like OOP models, such as C#, each class that implements one or more interfaces tracks the mapping of the interface methods to virtual methods on a per class basis. This mapping may be stored in an interface table (ITable) for each interface that a class implements. For each class, a linked list of ITables may be maintained, whereby any invocation of an interface via a class object requires searching the linked list of ITables of the class for the ITable that matches the interface that defines the method invoked (in Java, interfaces are invoked via the invokeinterface instruction, as well as the instanceof and checkcast instructions, when passed an interface type). More generally, the ITable may be understood as an interface lookup artefact, which may include alternative implementations of interfaces as defined in the relevant specifications for Java or another OOP model. Examples include other linear data structures such as arrays as well as hierarchical data structures, such as trees, heaps, etc.
- In general, implementations of interfaces and interface-like constructs in Java and Java-like OOP models require some type of lookup of the correct implementation at run-time, as a feature of implemented polymorphism. Put another way, identifying the correct implementation of interface methods cannot be done until run-time, which requires that the interface lookup artefacts be fully searched, whether linearly as in a linked list for Java (in particular the IBM J9 implementation) or non-linearly as in a hierarchical or other data structure. For any implementation, searching requires examining all nodes, which is known to be slow. This property of interfaces is an inherent inefficiency of polymorphism in Java that has been recognized since the introduction of Java in the mid-1990s.
- Various attempts have been made over the years to improve the performance of Java interfaces. One known solution, termed Interface Method Table (IMT), includes hashing interface signatures to a table with a fixed number of slots, with custom-generated stubs that handle conflict resolution resulting from hash collisions. Despite theoretical performance improvements, IMT has a large footprint requirement and is not considered workable in many production environments.
- Another known technique is the Polymorphic Inline Cache (PIC). The insight of PIC is that potentially polymorphic types tend to be monomorphic as to a given call site (a function or method call in the code), even if the specific type cannot be determined until runtime. In PIC, each call site is allotted a number of cache slots, which begin, at runtime uninitialized. As the call site is processed, the cache slots may be filled with the correct classes/tables/methods/interfaces, and the runtime interpreter can check the cache slots each time the call site comes up.
- The inventors of the present invention have identified that, in addition to the call-site based monomorphism, there is a “stickiness” or “weak monomorphism” associated with interface invocations via a given class—most consecutive calls to an interface via a given class are for the same interface. The inventors concluded that a performance enhancement may be obtained by storing the most recently used interface's ITable. In particular, the bytecode instructions instanceof and checkcast, when passed an interface type, were identified as good predictors that the relevant ITable was about to be used consecutively, making the cached ITable likely advantageous if updated at that point. One possible implementation would include re-ordering the ITable linked list so that the most recently used ITable appears first, however this would result in an invalid linked list because the ITable linked lists are, in J9 and other implementations, suffix shared between subclasses and superclasses (see
FIG. 2 ). Additionally, re-ordering requires overhead as the ITable linked list must be read or modified. - By contrast, the solution of the present invention involves caching the most recently used ITable, at a class level, but leaves the ITable linked list unmodified. PIC provides a cache as to a given call site, but does not capture all cases of invokeinterface, as well as cases of instanceof or checkcast being passed an interface type. The present invention provides an
ITable cache program 101 that caches the last used interface as to a given class, regardless of call site. Thus, the present invention and PIC represent different cache-related concepts and may be used complementarily in the same system with combined benefits. Possible advantages of various embodiments of the present invention, as compared with the other techniques described, include: (1) avoiding, in the common case a linear search of the ITables linked list; (2) applying the “stickiness” or “weak monomorphism” of interface dispatches; (3) being simple to implement; (4) enhancing performance particularly in the case where the ITable linked list is long and the targeted interface appears late in the chain; and (5) having a low memory footprint, requiring only an additional word per class. It should be noted any particular embodiment of the invention may enjoy some, all, or none, of the aforementioned advantages, and the recitation of such possible advantages is not intended as a limitation on the scope of the invention as described and claimed herein. - The inventors have demonstrated a performance enhancement on an experimental Java Virtual Machine (JVM) that already employs PIC, both with and without the present invention implemented. In a micro-benchmark test, an ITable linked list of ten interfaces was created and an invokeinterface using the last ITable was called. This test showed an 11% improvement. In a more realistic type test, the inventors ran the startup process for IBM Liberty Profile forty times on each version of the experimental JVM. The result showed a 2.32% decrease in average startup time and a 0.10% increase in average memory footprint.
-
FIG. 1 depicts anexample computing environment 100 suitable for performing anITable cache program 101 in accordance with at least one embodiment of the present invention. Thecomputing environment 100 includes aJVM 102. Javasource code 120 is compiled by a Javacompiler 122 into Javabytecode 124. Compilation need not occur in real-time and need not occur within the same environment as the JVM 102. - Within the JVM 102, the
interpreter 104 and the just-in-time compiler (JIT) 106 process Javabytecode 124 together, with the JIT 106 supporting theinterpreter 104 by producing architecturedependent machine code 118 in real time. In IBM J9 and similar implementations, theobject model 108 is represented in memory by a collection of data structures includingJ9 classes 110. EachJ9 class 110 includes in its data structure an ITableslist 114, which is a linked list of ITables, one for each interface implemented by the particular J9 class. TheITable cache program 101 may implemented through the behavior of both theInterpreter 104 and the JIT, or exclusively in one or the other. This is made possible because theobject model 108 is accessible to both theInterpreter 104 and the JIT 106. - Equivalently, another OOP model may be substituted, for example C#. In fully compiled models such as C++ or Objective C, the virtual machine may be dispensed with entirely in favor of a purely compiled program, with the ITable
cache program 101 implemented in compiled functions. In still other embodiments, theITable cache program 101 may be implemented in hardware, for example in a hardware Java processor. - In general, the plurality of interface lookup artefacts (ITables) may be organized as a linked list of ITables, and searching the plurality of interface lookup artefacts includes linearly traversing (walking) the linked list.
FIG. 2 depicts an exemplary linked list of ITables for two J9 classes,Class A 210 andClass B 220.Class A 210 includes a cachedITable 212, and Class B has a cachedITable 222, in accordance with at least one embodiment of the present invention. Further,Class B 220 is a subclass ofClass A 210; equivalently,Class A 210 is a superclass ofClass B 220. The superclass/subclass relationship is defined by asuperclass pointer 226, which is defined forClass B 220, but not forClass A 210. If Class A had a superclass of its own, then it would define a superclass pointer accordingly. - Referring still to
FIG. 2 , bothClass A 210 andClass B 220 implement a number of interfaces, as depicted by ITables I-IV 230-236.Class B 220, being a subclass ofClass A 210, inheritsClass A 210's implementations of those interfaces thatClass A 210 implements but Class B does not override.Class B 220 also implements some interfaces on its own and/or overrides one or more interfaces implemented byClass A 210. Each J9 class is associated to the correct ITable for its own implementation of each interface by itsown ITables pointer Class A 210 andClass B 220, respectively.Class B 210'sITables pointer 224 points toITable I 230, whoseNext 230A points toITable II 232. In the depicted example,ITable II 232 represents the last interface implementation unique toClass B 220 not inherited fromClass A 210. Thus,ITable II 232'sNext 232A points toITable III 234, as doesClass A 210'sITables pointer 214. FromITable III 234, all ITables of the linked list are common toClass A 210 andClass B 220, and thusITable III 234's Next points toITable IV 236, andITable IV 236's Next points to 236A, and so on until the end of the linked list. -
FIG. 3 displays a flowchart diagram for anITable cache program 101 in accordance with at least one embodiment of the present invention. Atstep 300, theITable cache program 101 includes receiving an invocation of an invoked interface associated with a class. In Java terms,step 300 may be understood as an invokeinterface instruction to the JVM, which, in Java, would necessarily be with respect to or in the context of a particular class. The ITable cache program may also be executed incidentally to other bytecode instructions, specifically instanceof and checkcast, where those instructions are passed an interface type (i.e. called from an object and passed an interface as an argument to be tested against the object). Thus,step 300, receiving an invocation of an invoked interface associated with a class may be understood as including receiving a bytecode instruction with the bytecode instruction being passed an interface type (for invokeinterface, the interface is explicitly the one invoked; for instanceof and checkcast, the interface is the test argument), and the bytecode instruction being selected from the group consisting of: (a) invokeinterface; (b) instanceof; and (c) checkcast. In the context of particular implementations of Java, the class is theJ9 class 110. More generally,step 300 may be performed in any OOP model via an instruction, step, or code statement that identifies both an interface and a class (or conceptually similar OOP constructs). - A
step 302, theITable cache program 101 identifies, based on the class, a plurality of interface lookup artefacts and a cached interface lookup artefact. In the context of particular implementations of Java, the plurality of interface lookup artefacts is theITables List 114 and the cachedITable 112. The identification step, more specifically, may be performed as a lookup of the properties of the class. - Referring still to the flowchart of
FIG. 3 , atdecision block 304, theITable cache program 101 compares the invoked interface with a cache interface. The cache interface is associated with the cached interface artefact. More particularly, the cached interface artefact may be understood to represent an implementation of some interface, labeled the cache interface. In particular implementations of Java, each interface is represented in memory uniquely. Accordingly, the invoked interface may be understood to match any other interface is the invoked interface and the other interface have identical pointers; that is, a pointer to the invoked interface and a pointer to the other interface point to the same memory location. - Responsive to the invoked interface matching the cache interface (the YES branch of decision block 304), the
ITable cache program 101 returns the cached interface artefact atstep 306. Conceptually, the case ofstep 306 may be understood as a successful hit on the cachedITable 112, and the JVM may then look up the correct implementation of the method called by invokeinterface and proceed. - Responsive to the invoked interface not matching the cached interface (the NO branch of decision block 304), the ITable cache program proceeds at
step 308 by searching the plurality of interface lookup artefacts until finding a matching interface lookup artefact. The matching interface lookup artefact is associated with a matching interface that catches the invoked interface. In the context of particular java implementations, the plurality of interface lookup artefacts is organized as a linked list of ITables, and searching the plurality of interface lookup artefacts comprises linearly traversing the linked list. Conceptually, the case ofstep 308 may be understood as a non-hit on the cachedITable 112, which triggers the slow walking of theITables list 114;step 308 is sought to be avoided by use of the cachedITable 112. - In the course of searching the plurality of interface lookup artefacts, the
ITable cache program 101 may find a matching interface lookup artefact, or not. Atdecision block 310, if the matching interface lookup artefact is not found (NO branch), then the ITable cache program may infer an error condition. Specifically, the inferred error condition is that the invoked interface is not implemented by the designated class. In Java and Java-like contexts, theITable cache program 101 may, atterminator 312, throw and exception or otherwise handle the error condition. - In the non-error case, a matching interface lookup artefact is found. Responsive to finding the matching interface lookup artefact, the ITable cache program returns, at
step 314, the matching interface lookup artefact and updates the cached interface lookup artefact to the matching interface lookup artefact. In the context of particular Java implementations, the cached ITable for the class that implements the invoked interface is set to the ITable for the invoked interface, which was found by walking the linked list of ITables for the class that implements the invoked interface. After theITable cache program 101 returns the matching ITable, the JVM may look up the correct implementation of the method called by invokeinterface and proceed. Subsequent calls to the same implementation of a method of the invoked interface will become hits on the cachedITable 112. -
FIG. 4 displays a Java-like pseudocode for anITable cache program 101, in accordance with an embodiment of the present invention. In the pseudocode, the first block of pseudocode provides for a cache check where the cached ITable (receiverClass.lastUsedTable) has been lazily initialized to a null value. More generally, theITable cache program 101 may be understood to initialize the cached interface lookup artefact to a null value. In the pseudocode ofFIG. 4 , the cache check is shown wrapped in a test iTable is not null. In the depicted case,decision block 304, comparing the invoked interface with the cache interface may be understood to include testing whether the cached interface lookup artefact is equal to the null value. This prevents an exception condition whereby the comparison step is not possible due to the cached ITable being null. The second block of pseudocode ofFIG. 4 depicts a linear search of the ITable linked list by traversing iTable.next. - Additional efficiency over the cached
ITable 112 may be gained by eliminating the validation step of testing for null equality.FIG. 5 depicts a pseudocode where the validation step is safely omitted because the cachedITable 112 has been initialized. Specifically, theITable cache program 101 may, responsive to the plurality of interface lookup artefacts being of at least of size one (that is, including at least one ITable or interface lookup artefact or, equivalently, the class implementing at least one interface), initialize the cached lookup artefact to the first interface lookup artefact of the plurality of interface lookup artefacts. In the context of particular implementations of Java, the cachedITable 112 for a givenJ9 class 110 may be initialized to the first ITable of theITables list 114. If theJ9 class 110 implements no interfaces, then the cachedITable 112 may be initialized to a dummy ITable (an ITable that compares with, but is not equal to, any ITable for a real interface) to avoid a null comparison. Thus, responsive to the plurality of interface lookup artefacts being of size zero (the class implements no interfaces), theITable cache program 101 may initialize the cached lookup artefact to a dummy lookup artefact. In the depicted case,decision block 304, comparing the invoked interface with the cache interface may be understood to not include validating the cached interface lookup artefact. -
FIG. 6 is a block diagram depicting components of acomputer 600 suitable for executing theITable cache program 101.FIG. 6 displays thecomputer 600, the one or more processor(s) 604 (including one or more computer processors), thecommunications fabric 602, thememory 606, the RAM, thecache 616, thepersistent storage 608, thecommunications unit 610, the I/O interfaces 612, thedisplay 620, and theexternal devices 618. It should be appreciated thatFIG. 6 provides only an illustration of one embodiment and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made. - As depicted, the
computer 600 operates over acommunications fabric 602, which provides communications between thecache 616, the computer processor(s) 604, thememory 606, thepersistent storage 608, thecommunications unit 610, and the input/output (I/O) interface(s) 612. Thecommunications fabric 602 may be implemented with any architecture suitable for passing data and/or control information between the processors 604 (e.g. microprocessors, communications processors, and network processors, etc.), thememory 606, theexternal devices 618, and any other hardware components within a system. For example, thecommunications fabric 602 may be implemented with one or more buses or a crossbar switch. - The
memory 606 andpersistent storage 608 are computer readable storage media. In the depicted embodiment, thememory 606 includes a random access memory (RAM). In general, thememory 606 may include any suitable volatile or non-volatile implementations of one or more computer readable storage media. Thecache 616 is a fast memory that enhances the performance of computer processor(s) 604 by holding recently accessed data, and data near accessed data, frommemory 606. - Program instructions for the
ITable cache program 101 may be stored in thepersistent storage 608 or inmemory 606, or more generally, any computer readable storage media, for execution by one or more of therespective computer processors 604 via thecache 616. Thepersistent storage 608 may include a magnetic hard disk drive. Alternatively, or in addition to a magnetic hard disk drive, thepersistent storage 608 may include, a solid state hard disk drive, a semiconductor storage device, read-only memory (ROM), electronically erasable programmable read-only memory (EEPROM), flash memory, or any other computer readable storage media that is capable of storing program instructions or digital information. - The media used by the
persistent storage 608 may also be removable. For example, a removable hard drive may be used forpersistent storage 608. Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer readable storage medium that is also part of thepersistent storage 608. - The
communications unit 610, in these examples, provides for communications with other data processing systems or devices. In these examples, thecommunications unit 610 may include one or more network interface cards. Thecommunications unit 610 may provide communications through the use of either or both physical and wireless communications links. TheITable cache program 101 may be downloaded to thepersistent storage 608 through thecommunications unit 610. In the context of some embodiments of the present invention, the source of the various input data may be physically remote to thecomputer 600 such that the input data may be received and the output similarly transmitted via thecommunications unit 610. - The I/O interface(s) 612 allows for input and output of data with other devices that may operate in conjunction with the
computer 600. For example, the I/O interface 612 may provide a connection to theexternal devices 618, which may include a keyboard, keypad, a touch screen, and/or some other suitable input devices.External devices 618 may also include portable computer readable storage media, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention may be stored on such portable computer readable storage media and may be loaded onto thepersistent storage 608 via the I/O interface(s) 612. The I/O interface(s) 612 may similarly connect to adisplay 620. Thedisplay 620 provides a mechanism to display data to a user and may be, for example, a computer monitor. - The programs described herein are identified based upon the application for which they are implemented in a specific embodiment of the invention. However, it should be appreciated that any particular program nomenclature herein is used merely for convenience, and thus the invention should not be limited to use solely in any specific application identified and/or implied by such nomenclature.
- The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
- The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
- Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
- Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
- Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
- These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
- The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
- The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
Claims (21)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/876,065 US9632755B1 (en) | 2015-10-06 | 2015-10-06 | Interface method resolution in object oriented programming models |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/876,065 US9632755B1 (en) | 2015-10-06 | 2015-10-06 | Interface method resolution in object oriented programming models |
Publications (2)
Publication Number | Publication Date |
---|---|
US20170097811A1 true US20170097811A1 (en) | 2017-04-06 |
US9632755B1 US9632755B1 (en) | 2017-04-25 |
Family
ID=58446811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/876,065 Expired - Fee Related US9632755B1 (en) | 2015-10-06 | 2015-10-06 | Interface method resolution in object oriented programming models |
Country Status (1)
Country | Link |
---|---|
US (1) | US9632755B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110764750A (en) * | 2019-10-30 | 2020-02-07 | 华南理工大学 | Energy economy simulation system development method based on individual model |
WO2020135485A1 (en) * | 2018-12-25 | 2020-07-02 | 华为技术有限公司 | Result acquisition method, apparatus and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6260045B1 (en) * | 1998-05-22 | 2001-07-10 | Apple Computer, Inc. | Method and apparatus for optimizing interface dispatching in an object-oriented programming environment |
GB9825102D0 (en) | 1998-11-16 | 1999-01-13 | Insignia Solutions Plc | Computer system |
US6651248B1 (en) * | 2000-09-01 | 2003-11-18 | International Business Machines Corporation | Method and apparatus for efficient interface method dispatch |
CA2480791C (en) | 2002-03-29 | 2011-05-03 | Anthony F. Scian | System and method for object oriented interface checking and method dispatching |
US7925640B2 (en) | 2008-02-14 | 2011-04-12 | Oracle America, Inc. | Dynamic multiple inheritance method dispatch data structure including an m-table size, i-table containing one or more holder addressor regions and type extension testing by frugal perfect hashing |
US8793671B2 (en) | 2008-06-28 | 2014-07-29 | Microsoft Corporation | Interface optimization in a closed system |
-
2015
- 2015-10-06 US US14/876,065 patent/US9632755B1/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020135485A1 (en) * | 2018-12-25 | 2020-07-02 | 华为技术有限公司 | Result acquisition method, apparatus and device |
CN110764750A (en) * | 2019-10-30 | 2020-02-07 | 华南理工大学 | Energy economy simulation system development method based on individual model |
Also Published As
Publication number | Publication date |
---|---|
US9632755B1 (en) | 2017-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11106475B2 (en) | Correlating class loader objects across execution environments | |
US8516230B2 (en) | SPE software instruction cache | |
US20160011992A1 (en) | Variable handles | |
US9665394B2 (en) | Sharing application objects among multiple tenants | |
US20090158017A1 (en) | Target-frequency based indirect jump prediction for high-performance processors | |
KR100498272B1 (en) | Method and apparatus for maintaining context while executing translated instruction | |
US20120030659A1 (en) | Constructing runtime state for inlined code | |
US9411617B2 (en) | System and method for matching synthetically generated inner classes and methods | |
US9063760B2 (en) | Employing native routines instead of emulated routines in an application being emulated | |
US10762199B2 (en) | Compiler assisted protection against arbitrary code execution | |
JP5845221B2 (en) | Fast patch-based method call | |
US9104869B2 (en) | Systems and methods for defeating malware with polymorphic software | |
US20170139836A1 (en) | Near-memory accelerator for offloading pointer chasing operations from a processing element | |
US9632755B1 (en) | Interface method resolution in object oriented programming models | |
US10152592B2 (en) | Compiler assisted protection against arbitrary code execution | |
US9027008B2 (en) | Method, computer, and computer program for speculatively optimizing code | |
CN110336894B (en) | Method for converting user space address of virtual machine to kernel space address of host machine | |
US20190235872A1 (en) | Processor cache with a data prefetcher | |
US20140059526A1 (en) | Systems and Methods for Providing Class Loading for Java Applications | |
US7930709B2 (en) | Methods and apparatus for a dynamic linker speed up | |
US10163189B2 (en) | Automatically enabling a read-only cache in a language in which two arrays in two different variables may alias each other | |
US10223088B2 (en) | Method for defining alias sets | |
US20160335087A1 (en) | Optimizing branch re-wiring in a software instruction cache | |
CN110704108A (en) | Method and device for interpreting and executing byte code instruction stream | |
Lan et al. | LAST: An Efficient In-place Static Binary Translator for RISC Architectures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:DOYLE, PATRICK R.;HEIDINGA, DANIEL J.;VAARDAL, BJOERN;REEL/FRAME:036737/0266 Effective date: 20151001 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
FEPP | Fee payment procedure |
Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
AS | Assignment |
Owner name: AIRBNB, INC., CALIFORNIA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:INTERNATIONAL BUSINESS MACHINES CORPORATION;REEL/FRAME:056427/0193 Effective date: 20210106 |
|
LAPS | Lapse for failure to pay maintenance fees |
Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20210425 |