WO1995002862A1 - Multiple entry point method dispatch - Google Patents
Multiple entry point method dispatch Download PDFInfo
- Publication number
- WO1995002862A1 WO1995002862A1 PCT/US1994/006868 US9406868W WO9502862A1 WO 1995002862 A1 WO1995002862 A1 WO 1995002862A1 US 9406868 W US9406868 W US 9406868W WO 9502862 A1 WO9502862 A1 WO 9502862A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- function
- entry point
- field
- offset
- header
- Prior art date
Links
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
Definitions
- Memory is any component, combination of components, or system that can store data, and may include local and remote memory and input/output devices.
- a processor "accesses" data in memory by any operation that retrieves or modifies the data, such as by reading or writing a location in memory that includes the data.
- a processor "operates on" data by performing an operation that includes obtaining resulting data that depends on the data operated on.
- the resulting data could result from an operation that accesses the data operated on or from a logical or numerical operation on the data operated on.
- a processor "uses" data in performing an operation when the result of the operation depends on the value of the data.
- Stored data can be accessed using or accessible using other data if the memory containing the stored data responds to the other data or to data that depends on the other data by permitting access to the stored data.
- the other data may be an address, an offset used to produce an address, or a content-addressable value stored with the stored data.
- An "instruction” is an item of data that a processor can use to determine its own operation.
- a processor "executes" a set of instructions when it uses the instructions to determine its operations.
- Fig. 1 is a block diagram of a typical computer system for program development, comprising a workstation 10 including a console 11 containing a CPU 12, RAM memory 13, and I/O circuitry 14 for communicating with a display 15, mass memory 16, a keyboard 17, and the usual mouse 18 with button switches 19.
- the usual display 15 contains a title or menu bar 21 and a cursor 22.
- a routine designed to perform a function would be stored at a particular location in memory, and a jump table would be typically constructed by the operating system listing the name of the routine and its start address or entry point for accessing the routine.
- the operating system knows where to find the beginning of the sequence of instructions which when run will execute the function desired. If arguments are included in the function call, the routine is run with the arguments substituted for the formal parameters of the function.
- a new single method object is created in memory that can be called directly, or via a generic function call, and carry out or avoid carrying out the same tasks as illustrated in Fig. 2.
- This new object construct is illustrated at 40 in Fig. 3, and comprises four distinct but related contiguous storage regions designated as a header 41, a meth-info field 42, a fn-prolog field 43, and the method body 44.
- the header is the normal object header that is, however, defined by the implementation. The size of this header must be fixed, so that the following field, meth-info, occurs at a fixed offset 1 from the starting location of the header.
- Meth-info contains method specific information such as specializers and flags, as well as the offset of the method body (offset X above).
- the size of meth-info is fixed (any variable data are stored as fixed-size pointers to additional data structures), so that the following field, fn-prolog, occurs at a fixed offset B.
- Fn-prolog is variable size, so that the method body starts at different offsets in different methods.
- the function prolog, fn-prolog within the method object of the invention looks and behaves as follows:
- the value of B is preferably the same for all method objects.
- the meth-info field may contain within it a branch to the method body, and hence the method body 44 may be reached by jumping into the meth-info field 42.
- Sample code for this alternative is:
- Fig. 4 illustrates the compiler action when processing programming statements with an ordinary function call or a generic function call using a method object in accordance with the invention.
- Each of method objects Q, R and S would have been created during program development and each would contain the four fields indicated in the preferred embodiment of Fig. 3.
- a jump table 50 is created with the address for each of the three method objects Q, R and S.
- the left branch is taken.
- the operating system creates a generic function, it places some canned code (a small set of instructions to select the appropriate method and call it) inside the generic function object. See 34 in Fig. 2A.
- the body of a generic function is filled with canned code by the operating system, and the compiler is not involved at all.
- the canned code in this case would include the instructions shown in the left branch in the figure, as follows. The code loads 62 the address of method Q. then loads 63 in a second register the address plus offset, adds 64 the two registers together to get the address of entry point II, and jumps to the latter 65 (entry point II).
- the method body code is the run 66 followed by the usual return. This is one way of computing then offset X to the method body 44.
- the method information field 42 contains a branch to the method body, then jumping 68 to the method information field 42, indicated in Fig. 3 by entry point III, will enable control following the branch to fall through to the method body 44.
- the method object illustrated in Fig. 3 can be invoked in the normal way in an object-oriented language as one component of a generic function having plural method objects with the method object selected to be run determined in the normal way by the specializers in the calling statement.
- the method object of Fig. 3 can be used directly to, for example, perform a local calculation, or as a function that does not require class dispatch, or to build up generic functions programmatically.
- the format would be similar to the lambda special form of Lisp or to blocks in Smalltalk. A simple example is given below:
- the entry point would be at entry point I in Fig. 3.
- the method object of Fig. 3 can be created in a straightforward way by creating a generic function and automatically adding the desired method to it.
- the method and generic function would be defined in Dylan by:
- the invention is not limited to the above-described formats and other formats are usable.
- the important point is that the compiler, upon encountering either of the above formats, knows to allocate memory storage space adequate to store an instance of the method object of Fig. 3, and to preserve in, for example, a jump table a pointer corresponding to the address of the method object.
Abstract
Description
Claims
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE69427193T DE69427193T2 (en) | 1993-07-15 | 1994-06-17 | PROCEDURE SELECTION WITH SEVERAL INPUT POINTS |
AU73554/94A AU7355494A (en) | 1993-07-15 | 1994-06-17 | Multiple entry point method dispatch |
EP94922442A EP0708940B1 (en) | 1993-07-15 | 1994-06-17 | Multiple entry point method dispatch |
CA002167306A CA2167306C (en) | 1993-07-15 | 1994-06-17 | Multiple entry point method dispatch |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US9220793A | 1993-07-15 | 1993-07-15 | |
US08/092,207 | 1993-07-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO1995002862A1 true WO1995002862A1 (en) | 1995-01-26 |
Family
ID=22232159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US1994/006868 WO1995002862A1 (en) | 1993-07-15 | 1994-06-17 | Multiple entry point method dispatch |
Country Status (6)
Country | Link |
---|---|
US (1) | US6427231B1 (en) |
EP (1) | EP0708940B1 (en) |
AU (1) | AU7355494A (en) |
CA (1) | CA2167306C (en) |
DE (1) | DE69427193T2 (en) |
WO (1) | WO1995002862A1 (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7013467B1 (en) * | 1997-12-09 | 2006-03-14 | Mci Communications Corporation | System and method for managing computer system resources using command control vectors |
US6782532B1 (en) * | 1999-10-21 | 2004-08-24 | Oracle International Corporation | Object type system for a run-time environment using generated high-order language instructions for generic functions |
US6966055B2 (en) * | 2001-03-02 | 2005-11-15 | International Business Machines Corporation | Optimizing post-link code |
US20050160414A1 (en) * | 2004-01-21 | 2005-07-21 | Nokia Corporation | System and method for dynamically adding features to software applications |
US8006250B1 (en) | 2004-06-22 | 2011-08-23 | Apple Inc. | Creating an object in an object-oriented programming platform |
US7954110B1 (en) | 2004-06-22 | 2011-05-31 | Apple Inc. | Observing properties associated with an object in an object-oriented programming platform |
US7743087B1 (en) | 2006-03-22 | 2010-06-22 | The Math Works, Inc. | Partitioning distributed arrays according to criterion and functions applied to the distributed arrays |
US20100131803A1 (en) * | 2008-11-25 | 2010-05-27 | Express Logic | Computation of stack usage in embedded computing systems |
US8997040B2 (en) * | 2010-03-24 | 2015-03-31 | Microsoft Technology Licensing, Llc | Variable closure |
US9952843B2 (en) * | 2014-05-15 | 2018-04-24 | Nvidia Corporation | Partial program specialization at runtime |
US10496378B2 (en) * | 2017-05-04 | 2019-12-03 | Microsoft Technology Licensing, Llc | Generating and executing multi-entry point functions |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5297284A (en) * | 1991-04-09 | 1994-03-22 | Microsoft Corporation | Method and system for implementing virtual functions and virtual base classes and setting a this pointer for an object-oriented programming language |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4675810A (en) * | 1981-05-22 | 1987-06-23 | Data General Corp. | Digital data processing system having a uniquely organized memory system using object-based addressing and in which operand data is identified by names accessed by name tables |
US4868745A (en) * | 1986-05-30 | 1989-09-19 | Hewlett-Packard Company | Data processing system and method for the direct and indirect execution of uniformly structured object types |
US5261080A (en) * | 1987-08-21 | 1993-11-09 | Wang Laboratories, Inc. | Matchmaker for assisting and executing the providing and conversion of data between objects in a data processing system storing data in typed objects having different data formats |
US5226161A (en) * | 1987-08-21 | 1993-07-06 | Wang Laboratories, Inc. | Integration of data between typed data structures by mutual direct invocation between data managers corresponding to data types |
US5421016A (en) * | 1991-12-12 | 1995-05-30 | International Business Machines Corporation | System and method for dynamically invoking object methods from an application designed for static method invocation |
-
1994
- 1994-06-17 WO PCT/US1994/006868 patent/WO1995002862A1/en active IP Right Grant
- 1994-06-17 AU AU73554/94A patent/AU7355494A/en not_active Abandoned
- 1994-06-17 DE DE69427193T patent/DE69427193T2/en not_active Expired - Lifetime
- 1994-06-17 CA CA002167306A patent/CA2167306C/en not_active Expired - Lifetime
- 1994-06-17 EP EP94922442A patent/EP0708940B1/en not_active Expired - Lifetime
-
1995
- 1995-08-04 US US08/509,753 patent/US6427231B1/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5297284A (en) * | 1991-04-09 | 1994-03-22 | Microsoft Corporation | Method and system for implementing virtual functions and virtual base classes and setting a this pointer for an object-oriented programming language |
Non-Patent Citations (4)
Title |
---|
"Inside Macintosh", ADDISON-WESLEY |
J.F. PETERS III et al.: "Compleat C", published 1986, by PRENTICE-HALL (USA), pages 297-339, especially pages 299-301 and 304. * |
PATRICK HENRY WINSTON et al.: "LISP", 3rd Edition, published 1989, by ADDISON-WESLEY PUBLISHING COMPANY INC. (USA), pages 175-180, especially pages 176 and 177. * |
S. KNOSTER: "How to Write Macintosh Software", ADDISION-WESLEY |
Also Published As
Publication number | Publication date |
---|---|
CA2167306A1 (en) | 1995-01-26 |
CA2167306C (en) | 2003-08-19 |
US6427231B1 (en) | 2002-07-30 |
DE69427193T2 (en) | 2001-09-20 |
EP0708940A1 (en) | 1996-05-01 |
DE69427193D1 (en) | 2001-06-13 |
AU7355494A (en) | 1995-02-13 |
EP0708940A4 (en) | 1997-05-28 |
EP0708940B1 (en) | 2001-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5381547A (en) | Method for dynamically linking definable program elements of an interactive data processing system | |
Engel | Programming for the Java virtual machine | |
US5659751A (en) | Apparatus and method for dynamic linking of computer software components | |
US6085035A (en) | Method and apparatus for efficient operations on primary type values without static overloading | |
US5999732A (en) | Techniques for reducing the cost of dynamic class initialization checks in compiled code | |
US6651080B1 (en) | Techniques for implementing pluggable virtual machines | |
EP1280056B1 (en) | Generation of debugging information | |
US6704927B1 (en) | Static binding of dynamically-dispatched calls in the presence of dynamic linking and loading | |
EP1114366B1 (en) | Accurate method for inlining virtual calls | |
US20020083416A1 (en) | Automatic stub/adapter generator | |
US6138273A (en) | Programmable interpretive virtual machine | |
Viroli et al. | Parametric polymorphism in Java: An approach to translation based on reflective features | |
US6072950A (en) | Pointer analysis by type inference combined with a non-pointer analysis | |
US6427231B1 (en) | System and method for multiple entry point access to an object | |
Bawden et al. | Lisp machine progress report | |
Albahari et al. | C# Essentials: Programming the. NET Framework | |
EP0950947B1 (en) | Static binding of dynamically dispatched calls in the presence of dynamic linking and loading | |
US7181724B2 (en) | Representation of Java® data types in virtual machines | |
JPH0738159B2 (en) | Method and apparatus for processing computer code in a code translator | |
CN111767033B (en) | Programming system and function expansion method for mechanical arm program development | |
Kieburtz et al. | A type-checking program linkage system for Pascal | |
MacLaren | Inline routines in VAXELN Pascal | |
US7356809B1 (en) | Programmable interpretive virtual machine | |
US7082597B2 (en) | Representation of objects in a Java programming environment | |
Farkas et al. | MProlog: an implementation overview |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): AT AU BB BG BR BY CA CH CN CZ DE DK ES FI GB GE HU JP KE KG KP KR KZ LK LU LV MD MG MN MW NL NO NZ PL PT RO RU SD SE SI SK TJ TT UA UZ VN |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH DE DK ES FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN ML MR NE SN TD TG |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
WWE | Wipo information: entry into national phase |
Ref document number: 2167306 Country of ref document: CA |
|
WWE | Wipo information: entry into national phase |
Ref document number: 1994922442 Country of ref document: EP |
|
WWP | Wipo information: published in national office |
Ref document number: 1994922442 Country of ref document: EP |
|
REG | Reference to national code |
Ref country code: DE Ref legal event code: 8642 |
|
WWG | Wipo information: grant in national office |
Ref document number: 1994922442 Country of ref document: EP |