[go: up one dir, main page]

KR100649799B1 - Method and apparatus for implementing fast subclass and subtype checks - Google Patents

Method and apparatus for implementing fast subclass and subtype checks Download PDF

Info

Publication number
KR100649799B1
KR100649799B1 KR1019990009588A KR19990009588A KR100649799B1 KR 100649799 B1 KR100649799 B1 KR 100649799B1 KR 1019990009588 A KR1019990009588 A KR 1019990009588A KR 19990009588 A KR19990009588 A KR 19990009588A KR 100649799 B1 KR100649799 B1 KR 100649799B1
Authority
KR
South Korea
Prior art keywords
type
class
sub
candidate
computer
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.)
Expired - Fee Related
Application number
KR1019990009588A
Other languages
Korean (ko)
Other versions
KR19990078103A (en
Inventor
배크 라스
미트로빅 슬젼
휄즐레 어스
Original Assignee
썬 마이크로시스템즈, 인코포레이티드
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority claimed from US09/107,224 external-priority patent/US6714991B1/en
Application filed by 썬 마이크로시스템즈, 인코포레이티드 filed Critical 썬 마이크로시스템즈, 인코포레이티드
Publication of KR19990078103A publication Critical patent/KR19990078103A/en
Application granted granted Critical
Publication of KR100649799B1 publication Critical patent/KR100649799B1/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

프로그램 실행 중(中)에 신속하게 서브-타입 검사(fast subtype check)를 실행하는 방법(method)과 장치(apparatus)를 발표한다. 본 발명의 하나의 특징에 따라서, 객체를 바탕으로 하는 컴퓨팅 시스템(object-based computing system)의 일부분이 되는 객체와 관련이 있는 클래스(class)가 또 하나 타입(type)의 서브-타입(subtype)인지를 결정하는 방법은, 객체와 연관성이 있는 클래스와 관련이 있는 동적(動的) 스토리지 위치(dynamic storage location)에서 후보 타입(candidate type)을 얻는 단계, 그리고 후보 타입(candidate type)과 같을 가능성이 있는 제 1 타입(first type)에 대하여 후보 타입(candidate type)을 비교하는 단계 등을 포함한다. 그 다음에, 후보 타입(candidate type)이 실질적으로 제 1 타입(first type)과 일치하는지에 관하여 결정을 한다. 후보 타입(candidate type)이 실질적으로 제 1 타입(first type)과 일치한다고 결정을 할 때, 후보 타입(candidate type)이 제 1 타입(first type)의 서브-타입(subtype)이라는 것에 대한 표시(indication)를 공급한다. 하나의 실시예(實施例)에 있어서, 동적(動的) 스토리지 위치에서 얻어진 후보 타입(candidate type)이, 객체와 관련이 있는 클래스에 있는 캐시 요소(cache element)에서 얻어진다.We present a method and an apparatus for performing fast subtype checks during program execution. According to one aspect of the invention, a class associated with an object that is part of an object-based computing system is another type of subtype. The method of determining acknowledgment may include obtaining a candidate type at a dynamic storage location associated with a class associated with the object, and possibly the same as a candidate type. And comparing a candidate type with respect to the first type. Next, a determination is made as to whether the candidate type substantially matches the first type. When determining that the candidate type substantially matches the first type, an indication that the candidate type is a subtype of the first type ( supply indications. In one embodiment, the candidate type obtained at the dynamic storage location is obtained from a cache element in the class associated with the object.

Description

고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법 그 시스템{METHOD AND APPARATUS FOR IMPLEMENTING FAST SUBCLASS AND SUBTYPE CHECKS}METHOD AND APPARATUS FOR IMPLEMENTING FAST SUBCLASS AND SUBTYPE CHECKS}

본 발명은 하기 도면을 참조하여 설명된다. The invention is illustrated with reference to the following figures.

도 1 은, 종래의 클래스 분류 체계(conventional class hierarchy)의 대표 그림을 나타낸다 ; 1 shows a representative picture of a conventional class hierarchy;

도 2a 는, 본 발명의 실시예에 따라서, 한 객체가 특정 타입의 서브-타입(subtype)인지를 결정하는 것과 관련이 있는 단계를 나타내는 처리 순서도를 나타낸다 ; FIG. 2A shows a processing flow diagram illustrating the steps involved in determining whether an object is a subtype of a particular type, in accordance with an embodiment of the present invention; FIG.

도 2b 는, 본 발명의 실시예에 따라서, 적재된 캐시(loaded cache)에 대하여 타입(type)을 비교하는 것과 관련이 있는 단계, 예를 들면, 도 2a 의 단계(208)를 나타내는 처리 순서도를 나타낸다 ; FIG. 2B illustrates a process flow diagram illustrating steps involved in comparing a type against a loaded cache, eg, step 208 of FIG. 2A, in accordance with an embodiment of the present invention. Represents;

도 2c 는, 본 발명의 실시예에 따라서, 캐시 요소(cache element)를 갖는 한 클래스(class)의 대표 그림을 나타낸다 ; 2C shows a representative picture of a class with cache elements, in accordance with an embodiment of the invention;

도 3 는, 본 발명을 구현하는데 적합한 컴퓨터 시스템(computer system)의 대표 그림을 나타낸다 ; 그리고 3 shows a representative picture of a computer system suitable for implementing the present invention; And

도 4 는, 본 발명의 실시예에 따라서, 가상 기계(virtual machine)의 대표 그림을 나타낸다.4 shows a representative picture of a virtual machine, in accordance with an embodiment of the invention.

* 참조 번호 설명* Reference Number Description

9102 : 클래스 구조(class structure)9102 class structure

202 : 객체가 타입"B"의 서브-타입(subtype)인지를 결정하는 방법202: How to determine if an object is a subtype of type "B"

330 : 컴퓨터 시스템(computer system)330: computer system

405 : 컴파일-시간 환경(compile-time environment)405 compile-time environment

435 : 실행-시간 환경(runtime environment)435 run-time environment

440 : 가상 기계(virtual machine)440 virtual machine

본 발명은 일반적으로 객체를 바탕으로 하는(객체 지향) 시스템(object-based system)내 객체들 사이의 관계를 결정하는 것에 관한 것이다. 보다 더 상세하게, 본 발명은 객체를 바탕으로 하는 시스템(object-based system)내 객체들에 대한 서브-타입 검사(subtype check)를 효율적으로 실행하는 것에 관한 것이다.The present invention generally relates to determining relationships between objects in an object-based system. More particularly, the present invention relates to the efficient execution of subtype checks on objects in an object-based system.

객체들이 특정 클래스(class)와 서브-클래스(sub-class) 등의 일부가 되도록 객체를 바탕으로 하는 많은 컴퓨팅 시스템(computing system)을 구축되는 데, 이러한 클래스(class)와 서브-클래스(sub-class) 등은 객체에 대하여 이용 가능한 기능을 정의한다. 프로그램 실행 중에, 일반적으로 가상 기계(virtual machine)는 프로그램의 실행을 쉽게 하도록 객체들 사이의 관계를 검사(check)한다. 일례로, 가상 기계(virtual machine)는 서브-클래스(sub-class), 서브-타입(subtype), 또는 객체들 사이의 관계를 검사할 수 있다. 캘리포니아에 있는 Palo Alto 의 Sun Microsystems, Inc 에 의하여 개발된 JavaTM 프로그래밍 언어와 같은, 어떤 프로그래밍 언어에 있어서, 프로그래밍 언어 내에 서브-클래스 검사(sub-class check)를 포함한다. 이러한 서브-클래스 검사는 일반적으로 특정 객체가 정해진 타입을 가지는지에 대한 결정을 포함한다. 즉, 특정 객체의 타입을 결정하도록 프로그램과 관련이 있는 클래스 구조가 검사된다.Many computing systems based on objects are built so that objects become part of a particular class and sub-class, etc. These classes and sub-classes class) defines the functions available for an object. During program execution, a virtual machine typically checks the relationships between objects to facilitate the execution of a program. In one example, a virtual machine may check the relationship between sub-classes, subtypes, or objects. For some programming languages, such as the JavaTM programming language developed by Sun Microsystems, Inc. of Palo Alto, California, includes a sub-class check in the programming language. Such sub-class checking generally involves determining whether a particular object has a given type. That is, the class structure associated with a program is examined to determine the type of a particular object.

도 1 은, 종래의 클래스 구조(conventional class structure)의 대표 그림을 나타낸다. 클래스 구조(102)(class structure), 예를 들면, 클래스 분류 체계(class hierarchy)는 클래스(106)(class)와 서브-클래스(110)(sub-class) 등을 포함한다. 일반적으로, 클래스(106)(class)는 다수의 서브-클래스(110)를 포함할 수 있는 추상적 클래스(abstract class)이다. 도 1 에서 나타난 것처럼, 서브-클래스"1"(110a), 서브-클래스"2"(110b), 및 서브-클래스"N"(110c) 등은 클래스(106)의 "직접(direct)" 서브-클래스이며, 서브-클래스"A1"(110d)은 서브-클래스"1"(110a)의 직접 서브-클래스이다. 서브-클래스"A1"(110d)이 클래스(106)의 서브-클래스가 되는 서브-클래스"1"(110a)의 서브-클래스이기 때문에, 서브-클래스"A1"(110d)은 클래스(106)의 간접 클래스(indirect class)라 할 수 있다.1 shows a representative picture of a conventional class structure. The class structure 102, for example, the class hierarchy, includes a class 106, a sub-class 110, and the like. In general, class 106 is an abstract class that may include a number of sub-classes 110. As shown in FIG. 1, sub-class “1” 110a, sub-class “2” 110b, sub-class “N” 110c, and the like are “direct” subs of class 106. -Class, and sub-class "A1" 110d is a direct sub-class of sub-class "1" 110a. Since sub-class "A1" 110d is a sub-class of sub-class "1" 110a which becomes a sub-class of class 106, sub-class "A1" 110d is class 106. It can be called an indirect class of.

클래스(106)는 일반적으로 다양한 서로 다른 함수 기능(function), 또는 방법(method)을 포함한다. 각각의 서브-클래스(110)는 서로 다른 세트의 함수 기능을 포함한다. 한 예로서, 서브-클래스"1"(110a)은 이러한 클래스의 한 부분이 되는 객체들에 특정한 함수 기능을 포함할 것이다. 클래스(106)의 멤버가 되는 한 객체는 실질적으로 클래스(106)와 관련이 있는 모든 함수 기능을 실행 할수 있다. 또한, 서브-클래스(110) 한 멤버가 되는 객체는, 클래스(106)의 멤버가 된다. 이와 같이, 또한, 서브-클래스(110) 중에서 어떤 서브-클래스의 멤버가 되는 객체는, 클래스(106)와 관련이 있는 함수 기능을 실행할 수 있다. 하지만, 특정 서브-클래스, 예를 들면, 서브-클래스"1"(110a)의 멤버가 되는 객체는, 이러한 클래스와는 다른 서브-클래스, 예를 들면, 서브-클래스"2"(110b)와 관련이 있는 특정 함수 기능을 수행 하지 못한다. 그러므로 객체가 어떤 서브-클래스(110)에 속하는지에 대한 결정은, 그 같은 객체가 실행할 수 있는 함수 기능을 결정한다.Class 106 generally includes a variety of different function functions, or methods. Each sub-class 110 includes a different set of functional functions. As an example, sub-class "1" 110a would include functional functionality specific to objects that are part of this class. As long as it is a member of class 106, an object can execute virtually any functional function associated with class 106. In addition, an object that becomes a member of the sub-class 110 becomes a member of the class 106. As such, an object that is a member of any sub-class of the sub-class 110 may execute a function function related to the class 106. However, an object that is a member of a particular sub-class, for example, sub-class "1" 110a, is different from a sub-class, such as sub-class "2" 110b, than this class. Can't perform specific function function. Therefore, the determination of which sub-class 110 an object belongs to determines the functional function that such object can execute.

서브-클래스"1"(110a)에 의하여 정의되는 객체로써 클래스(106)에 의하여 정의되는 객체를 효율적으로 나타낼 목적으로, 프로그램이 실행되는 시간(runtime)에 한정된 예상(narrowing cast)을 이용할 수 있다. 하지만, 클래스(106)에 의하여 정의되는 객체는 서브-클래스"1"(110a)에 의하여서가 아닌 서브-클래스"2"(110b)에 의하여 정의될 수 있기 때문에, 서브-클래스"1"(110a)과 관련이 있는 객체가 정확한지를 결정할 목적으로, 한 검사가 실행된다. 당업자에게 잘 알려진 바와 같이, 객체가 서브-클래스"1"(110a)과 관련이 있는지에 관한 검사는, 객체는 서브-클래스"1"(110a)과 적어도 관련이 있음을 결정하는 검사로써 효율적이다. 달리 말하면, 서브-클래스"A1"(110d)과 관련이 있는 객체는, 또한 서브-클래스"1"(110a)과 관련이 있는 것으로 일반적으로 결정될 것이다.For the purpose of efficiently representing the object defined by class 106 as an object defined by sub-class "1" 110a, a narrowing cast may be used that is defined at run time. . However, because the object defined by class 106 may be defined by sub-class "2" 110b rather than by sub-class "1" 110a, sub-class "1" 110a. A check is performed to determine if the object associated with) is correct. As is well known to those skilled in the art, a check as to whether an object is related to sub-class "1" 110a is efficient as a check to determine that the object is at least related to sub-class "1" 110a. . In other words, an object associated with sub-class "A1" 110d will generally be determined to also be associated with sub-class "1" 110a.

JavaTM 환경에서, 객체의 서브-타입, 예를 들면, is_subtype 함수기능의 서브타입을 결정하는 한 함수 기능은 정적으로 인코딩(encoding)된다. 상기 함수 기능을 정적으로 인코딩(encoding)하는데 이용되는 방법은 다양할 수 있지만, 통상적으로 이용되는 하나의 방법은 2 차원의 비트 매트릭스(two-dimensional bit matrix)의 이용을 포함하는데, 여기서 (i,j)에 의하여 정의되는 위치에서의 한 비트는 is_subtype(ti,tj)의 결과를 인코딩(encoding)한다. 이러한 매트릭스를 이용하여, 서브-타입 검사(subtype check)는 객체의 서브-타입을 결정하는데 매트릭스로의 인덱싱(indexing)을 효율적으로 포함한다. 하지만, 매트릭스의 크기는 실질적으로 중요하고, 서브-타입 검사는 때때로 일반적으로 요구되는 명령의 비트 조정으로 인하여 느려진다.In the JavaTM environment, a function function is statically encoded as long as it determines the sub-type of the object, for example the subtype of the is_subtype function function. The method used to statically encode the functional function may vary, but one commonly used method involves the use of a two-dimensional bit matrix, where (i, One bit at the position defined by j) encodes the result of is_subtype (ti, tj). Using this matrix, subtype checks effectively include indexing into the matrix to determine the sub-type of the object. However, the size of the matrix is practically important, and sub-type checking is sometimes slowed down due to bit adjustment of the commonly required instructions.

일반적으로, 서브-타입 검사를 할 때, 타입의 실질적인 모든 서브-타입, 예를 들면, 한 클래스의 실질적인 모든 서브-클래스가, 특정 객체의 서브-타입을 결정하는데 검사되어야 한다. 어떤 분류 체계적인 클래스 구조에 있어서, 예를 들면, 도 1 에서의 클래스 구조(102)에 있어서, 검사되어야만 하는 서브-클래스의 숫자는 상대적으로 크다. 일례로서, 어떤 클래스는 수 백개의 관련된 서브-클래스를 가질 수 있다. 이와 같이, JavaTM 프로그래밍 언어에서 정의되는 인터페이스와 관련이 있는 경우에서와 같이, 다수의 서브-타입이 이용 가능할 때, 서브-타입 검사의 구현은 때때로 효율적이지 않다고 입증된다. 즉, 다수의 서브-타입이 이용 가능할 때, 위에서 기술된 것처럼, 각각의 서브-타입을 검사하는 것은 일반적으로 시간을 낭비한다. 추가로, 다수의 전승 층(inheritance layers)을 이용하는 시스템에 있어서, 예를 들면, C++ 프로그래밍 언어에 의하여 정의되는 시스템에 있어서, 서브-타입 검사를 구현하는 것은 또한 때때로 효율적이지 않다. 다수의 전승 층을 갖춘 시스템에 대하여, 전승된 각각의 층이 검사되어야 하기 때문에, 서브-타입 검사(subtype check)가 효율적으로 실시된다는 것이 사실상 어렵다.In general, when doing sub-type checking, substantially all sub-types of the type, for example, substantially all of the sub-classes of one class, should be checked to determine the sub-type of a particular object. In some taxonomy class structures, for example, in the class structure 102 in FIG. 1, the number of sub-classes to be examined is relatively large. As an example, a class can have hundreds of related sub-classes. As such, when multiple sub-types are available, as is the case with interfaces defined in the JavaTM programming language, the implementation of sub-type checking is sometimes proved inefficient. That is, when multiple sub-types are available, checking each sub-type as described above generally wastes time. In addition, in systems using multiple inheritance layers, for example in systems defined by the C ++ programming language, it is also sometimes not efficient to implement sub-type checking. For systems with multiple handed down layers, it is practically difficult to perform subtype checks efficiently because each handed down layer must be checked.

효율적인 서브-타입 검사의 실시는, 검사가 빈번하게 일어나기 때문에 중요하다. 프로그램의 실행 중에 검사가 빈번하게 일어날 때, 검사와 관련이 있는 오버헤드(overhead)는 상대적으로 크다. 어떤 경우에 있어서, 당업자가 알 수 있는 것처럼, 실행 시간 서브 타입 검사, 또는 시험은 대략 8 개의 명령을 필요로 하는 데, 이는 특히 만약 실행 시간 서브타입 검사가 반복적으로 일어난다면, 전체 프로그램에 심각해질 수 잇는 문제가 된다. 그러므로 빈번하게 일어나는 서브-타입 검사에 의하여, 프로그램이 실행되는 속도를 떨어뜨린다.The implementation of efficient sub-type checks is important because checks occur frequently. When checks occur frequently during program execution, the overhead associated with checks is relatively large. In some cases, as will be appreciated by those skilled in the art, runtime subtype checking, or testing, requires approximately eight instructions, particularly if the runtime subtype checking occurs repeatedly, which would be severe for the entire program. This can be a problem. Therefore, the frequent sub-type checking slows down the execution of the program.

일반적으로, 프로그램의 실행 중에 서브-타입을 검사할 때, 프로그램과 관련이 있는 실질적인 모든 클래스와 방법 등은 공지되어 있다. 데이터 구조는 자주 프로그램과 관련이 있는 모든 클래스와 방법 등을 나열하도록 구성됨으로써, 클래스와 방법이 쉽게 접근 가능하도록 한다. 달리 말하면, 상기 데이터 구조는 상대적으로 크고, 중요한 시스템 자원을 낭비한다. 또한 프로그램과 관련이 있는 모든 클래스와 방법이 공지되어야 한다는 요구 사항은, 동적 연결, 또는 동적 클래스 적재를 이용하는 시스템과 호환 가능하지 않은데, 이는 동적 연결에 의하여 프로그램과 관련이 있는 클래스와 방법이 효율적으로 변환되도록 하기 때문이다. 따라서 프로그램의 기능이 동적 연결을 사용하지 못함으로 인해 떨어지게 된다. 동적 연결(dynamic linking)을 이용하는 환경에서, 클래스 적재를 포함하는 모든 동작이 있은 후에 상기 데이터 구조들이 다시 계산되는데, 이러한 것은 시간 낭비이고, 따라서 효율적이지 못하다.In general, when checking sub-types during execution of a program, virtually all classes and methods associated with the program are known. The data structure is often organized to list all the classes and methods associated with the program, making the classes and methods easily accessible. In other words, the data structure is relatively large and wastes valuable system resources. In addition, the requirement that all classes and methods associated with a program be known is not compatible with systems that use dynamic linking, or dynamic class loading, in which case the classes and methods that are associated with a program can be efficiently This is because it is converted. As a result, the program's functionality is compromised by the lack of dynamic linking. In an environment using dynamic linking, the data structures are recalculated after all operations involving class loading, which is a waste of time and thus not efficient.

그러므로, 요구되어지는 것은 서브-타입 검사(subtype check)가 발생하는 때 효율을 개선시키는 방법과 장치 등이다. 보다 더 상세하게, 정말로 요구되어지는 것은, 클래스 적재 동작(class loading operation)이 일어날 때마다 데이터 구조(data structure)를 다시 계산할 필요 없이, 서브-타입 검사(subtype check)를 효율적으로 실행하는 방법과 장치 등이다.Therefore, what is required is a method and apparatus for improving the efficiency when subtype checks occur. More specifically, what is really needed is a method of efficiently performing subtype checks without having to recalculate the data structure each time a class loading operation occurs. Device and the like.

프로그램 실행 중에 신속하게 서브-타입 검사(fast subtype check)를 실행하는 방법과 장치를 발표한다. 본 발명의 하나의 특징에 따라서, 객체를 바탕으로 하는(객체 지향) 컴퓨팅 시스템(object-based computing system)의 부분인 객체와 관련이 있는 타입을 신속하게 효율적으로 결정하는 방법(method)은, 객체와 연관성이 있는 클래스와 관련이 있는 동적 스토리지 위치(dynamic storage location)에서 후보 타입(candidate type)을 얻는 단계, 그리고 후보 타입(candidate type)과 같을 가능성이 있는 제 1 타입(first type)에 대하여 후보 타입(candidate type)을 비교하는 단계를 포함한다. 그 다음에, 후보 타입(candidate type)이 실질적으로 제 1 타입(first type)과 일치하는지에 관하여 결정을 한다. 후보 타입(candidate type)이 실질적으로 제 1 타입(first type)과 일치한다고 결정을 할 때, 후보 타입(candidate type)이 제 1 타입(first type)과 일차한 다는 표시(indication)를 제공한다.We present a method and device for performing fast subtype checks during program execution. In accordance with one aspect of the present invention, a method for quickly and efficiently determining the type associated with an object that is part of an object-based computing system includes: Obtaining a candidate type at a dynamic storage location associated with the class associated with the candidate and for a first type that is likely to be the same as the candidate type. Comparing the type (candidate type). Next, a determination is made as to whether the candidate type substantially matches the first type. When determining that the candidate type substantially matches the first type, an indication is provided that the candidate type is primary with the first type.

본 발명의 하나의 특징에 따라서, 컴퓨터 시스템(computer system)이 컴퓨터 시스템에서 존재하는 제 1 객체와 관련이 있는 타입(type)을 결정하도록 된다. 이러한 컴퓨터 시스템은 프로세서(processor), 메모리, 후보 타입을 메모리로 적재하도록 하는 적재 메커니즘(loading mechanism) 을 포함한다. 후보 타입은 제 1 객체와 관련이 있는 클래스 객체로부터 얻어진다. 상기 컴퓨터 시스템은 또한 제 1 타입에 대하여 후보 타입(candidate type)을 비교하도록 하는 비교 메커니즘(comparison mechanism), 그리고 후보 타입이 제 1 타입과 실질적으로 일치하는지를 결정하도록 하는 결정 메커니즘(determination mechanism) 을 포함한다. 상기 컴퓨터 시스템 내 한 표시기(indicator)가 제공되어, 후보 타입이 실질적으로 제 1 타입과 일치한다고 결정할 때, 후보 타입이 제 1 타입과 일치한 다는 표시(indication)를 제공하도록 한다. In accordance with one aspect of the present invention, a computer system is adapted to determine a type associated with a first object present in the computer system. Such computer systems include a processor, memory, and loading mechanisms for loading candidate types into memory. The candidate type is obtained from the class object associated with the first object. The computer system also includes a comparison mechanism for comparing a candidate type against a first type, and a determination mechanism for determining whether the candidate type substantially matches the first type. do. An indicator in the computer system is provided to provide an indication that the candidate type matches the first type when determining that the candidate type substantially matches the first type.

본 발명의 또 하나의 특징에 따라서, 특정 클래스의 멤버(member)가 되는 객체에 대한 서브-타입 검사(subtype check)를 실행하는 방법이, 특정 클래스와 관련이 있는 위치로부터 한 저장된 요소(stored element)를 얻음을 포함한다. 상기 저장된 요소(stored element)는 객체와 관련이 있을 가능성이 있는 제 1 서브-타입과 연관성이 있는 정보를 포함한다. 또한, 상기 방법은, 저장된 요소에 포함된 정보가 객체와 연관성이 있는 실제 서브-타입(actual subtype)과 관련이 있다고 결정하는 단계, 그리고 상기 저장된 요소와 실제 서브-타입이 관련이 있을 때, 상기 저장된 요소에 포함된 정보가 실제 서브-타입과 관련이 있다는 표시(indication)를 제공하는 단계를 포함한다. 하나의 실시예에 있어서, 상기 방법은, 또한, 상기 저장된 요소에 포함된 정보가 실제 서브-타입과 관련이 없을 때, 상기 객체의 실제 서브-타입을 결정하는 단계, 그리고 특정 클래스와 연관성이 있는 위치로 상기 실제 서브-타입과 관련이 있는 정보를 저장하는 단계를 포함한다.In accordance with another aspect of the invention, a method of performing subtype checks on an object that is a member of a particular class includes a stored element from a location associated with the particular class. Includes; The stored element includes information associated with a first sub-type that may be associated with an object. In addition, the method may further comprise determining that the information contained in the stored element is related to an actual subtype associated with an object, and when the stored element is related to the actual sub-type, Providing an indication that the information contained in the stored element is related to the actual sub-type. In one embodiment, the method further comprises: determining the actual sub-type of the object when the information contained in the stored element is not related to an actual sub-type, and which is associated with a particular class. Storing information relating to the actual sub-type to a location.

하기에서는 첨부 도면을 참조하여 본원 발명을 상세하게 설명한다. Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

일반적으로, 객체들 사이의 서브-타입 관계(subtype relationship)를 결정하기 위하여 실행되는 서브-타입 검사(subtype check)는 컴퓨터 메모리 공간의 상당한 양을 필요로 한다. 이 같은 공간은 서브-타입 검사(subtype check)를 실행하는 것과 관련이 있는 명령을 위해, 그리고 컴퓨터 프로그램의 실행과 관련이 있는 모든 타입과 방법을 저장하는데 자주 이용되는 미리 계산된 데이터 구조(pre-computed data structure)를 위해 필요로 된다. 되풀이되는 서브-타입 검사를 실행하기 위하여 필요로 하는 오버헤드(overhead)에 추가하여, 서브-타입 검사(subtype check)를 위하여 필요로 하는 공간은 프로그램을 실행하는 속도를 자주 떨어뜨리게 된다. In general, subtype checks performed to determine subtype relationships between objects require a significant amount of computer memory space. This space is a pre-computed data structure that is often used for instructions that involve performing subtype checks, and for storing all types and methods that involve the execution of computer programs. computed data structure). In addition to the overhead required to run recurring sub-type checks, the space required for subtype checks often slows down the execution of the program.

서브-타입 검사의 예상되는 결과를 저장하는 것에 의하여, 서브-타입 검사를 실행하는 것과 관련이 있는 오버헤드(overhead)의 양이 효과적으로 감소된다. 특히, 프로그램이 실행 시, 한 객체와 관련이 있는 서브-타입이 처음 한 특정 타입에 대하여 검사하여 지게 되는 때, 상기 실제 검사는 당업자에게 잘 알려져 있는 어떠한 방법을 이용하여도 실시 될 수 있다. 같은 클래스의 객체에 대한 뒤따르는 검사는 같은 서브-타입 결과를 가지기 때문에, 실제 검사의 결과를 저장하는 것, 예를 들면, 제 1 검사의 컴퓨터 계산에 의한 결과를 저장하는 것에 의하여, 서브-타입 검사를 실행하는 것과 관련이 있는 오버헤드(overhead)는 눈에 뜨이게 줄어들도록 할 수 있다. 달리 말하면, 같은 검사에 있어서, 캐쉬(caching)를 사용하는 동적 서브타입 검사 메카니즘은 이전의 서브타입 검사 결과가 캐쉬될 수 있도록 하여, 만약 상기 캐쉬 값이 올바른 값, 즉 적절한 것으로 결정된다면 상기 캐쉬 값이 사용될 수 있도록 함으로써 상기 같은 검사가 뒤에 수행되는 때 같은 검사의 속도를 높일 수 있도록 한다. 하나의 실시예에 있어서, 고속처리를 위하여 저장된 데이터인 캐쉬 데이터(cached data)가 검사되고 있는 객체에 대한 타입 기술어(type descriptor)로서 사용, 유지될 수 있다. By storing the expected result of the sub-type check, the amount of overhead associated with performing the sub-type check is effectively reduced. In particular, when a program is executed, when a sub-type associated with an object is first checked for a particular type, the actual check can be performed using any method well known to those skilled in the art. Subsequent checks on objects of the same class have the same sub-type results, so storing the result of the actual check, for example by storing the result of the computer calculation of the first check, The overhead associated with running the test can be noticeably reduced. In other words, for the same check, a dynamic subtype check mechanism that uses caching allows previous subtype check results to be cached, so that if the cache value is determined to be the correct value, i. This can be used to speed up the same test when the same test is performed later. In one embodiment, cached data, which is stored data for high-speed processing, may be used and maintained as a type descriptor for the object being inspected.

한 클래스와 관련이 있는, 객체"s"의 서브-타입을 결정하는 초기의 검사가 실행된 후에, 초기 검사의 결과는 저장된다. 초기 서브-타입 검사의 결과를 저장하는 것에 의하여, 객체"s"의 서브-타입을 결정하는 검사를 필요로 하는 다음 번에, 상기 저장된 결과는 같은 서브-타입 검사가 보다 더 빠르게 진행되어 지도록 한다. 실례에 의하여, 객체"s"의 서브-타입이 타입"T"에 대하여 검사될 때, 즉, 객체"s"가 특정 서브-타입"T"인 지에 관하여 결정을 할 때, 객체"s"와 관련이 있는 저장된 타입 기술어(stored type descriptor)와 서브-타입"T" 사이에서 상대적으로 빠른 비교가 있게 된다. 객체"s"의 타입이 서브-타입"T"와 같을 때, 비교는 성공적인 것으로 판단되고, 종래의 서브-타입 검사는 필요하지 않다. 그러므로 종래의 서브-타입 검사와 관련이 있는 오버헤드가 피하여 질 수 있다. 선택에 따라, 객체"s"의 타입이 서브-타입"T"에 일치하지 않을 때, 종래의 서브-타입 검사가 객체"s"의 타입을 결정하는데 이용될 수 있다. 어떤 경우에 있어서, 이러한 검사는, 클래스 분류 체계를 횡단하여 적합한 서브타입을 찾도록 함을 포함하며, 그리고 적합한 서브-타입을 찾을 수 없을 때 예외를 제기하는 것을 포함할 수 있다.After the initial check that determines the sub-type of the object "s", which is associated with a class, is performed, the result of the initial check is stored. By storing the result of the initial sub-type check, the next time the check requires a sub-type of the object "s", the stored result causes the same sub-type check to proceed more quickly. . By way of example, when the sub-type of object "s" is checked against type "T", that is, when determining whether object "s" is a particular sub-type "T", There is a relatively fast comparison between the associated stored type descriptor and the sub-type "T". When the type of the object "s" is equal to the sub-type "T", the comparison is determined to be successful and conventional sub-type checking is not necessary. Therefore, the overhead associated with conventional sub-type checking can be avoided. Optionally, when the type of the object "s" does not match the sub-type "T", conventional sub-type checking can be used to determine the type of the object "s". In some cases, this check may include traversing the class classification scheme to find a suitable subtype, and may include raising an exception when a suitable sub-type cannot be found.

도 2a 에서, 객체가 특정 타입의 서브-타입 또는 서브-클래스인지를 결정하는 것과 관련이 있는 단계가 본 발명의 실시예에 따라 기술될 것이다. 특히, 객체가 타입"B"의 서브-타입인지를 결정하는 처리가 설명될 것이다. 객체가 타입"B"의 서브-타입(subtype)인지를 결정하는 방법(202)(process)은 단계(204)에서 시작하는데, 객체의 타입, 예를 들면, 객체의 클래스는 컴퓨터 시스템과 관련이 있는 레지스터로 적재된다. 당업자에게 알려져 있는 것처럼, 객체 전체 클래스, 예를 들면, 객체의 추상 클래스(abstract class)가 알려져 있다. 상기 객체의 클래스가 일단 레지스터로 적재되면, 단계(206)에서 적재된 클래스(loaded class)의 캐시 요소(cache element)가, 예를 들면, 컴퓨터의 메모리로 적재된다. 캐시 요소나 캐시 등은 도 2c 와 관하여 기술될 것이다.In FIG. 2A, the steps involved in determining whether an object is a sub-type or sub-class of a particular type will be described according to an embodiment of the present invention. In particular, the process of determining whether an object is a sub-type of type "B" will be described. The process 202 of determining whether an object is a subtype of type "B" begins at step 204, where the type of the object, e.g., the class of the object, is associated with a computer system. Loaded into a register. As is known to those skilled in the art, the entire class of an object is known, for example an abstract class of objects. Once the class of the object has been loaded into a register, the cache element of the loaded class in step 206 is loaded into the memory of the computer, for example. Cache elements or caches, etc. will be described with respect to FIG. 2C.

상기 캐시가 적재된 후에, 타입 B 가 단계(208)에서 상기 적재된 캐시에 대하여 비교된다. 적재된 캐시와 타입 B 를 비교하는 것과 관련이 있는 단계는 도 2b 에 관하여 아래에서 기술될 것이다. 적재된 캐시에 대하여 타입 B 의 비교에 대한 결과에 관하여, 단계(210)에서 결정을 한다. 기술된 실시예에 있어서, 타입 B 와 적재된 캐시와의 비교의 결과가 참이라면, 예를 들면, 타입 B 와 적재된 캐시가 일치된다는 비교를 결정한다면, 단계(222)에서 상기 객체가 타입 B 의 서브-타입인지에 대한 결정을 요구하였던 함수로 참 값이 리턴(return)된다. 달리 말하면, 적재된 클래스와 타입 B 가 동일한 클래스라면, 또는 적재된 클래스가 타입 B 의 서브-타입이라면, 참 값이 리턴(return)된다. 일단 참 값이 리턴(return)되면, 객체가 타입 B 인지에 대한 결정의 처리를 완성한다.After the cache is loaded, type B is compared against the loaded cache at step 208. The steps involved in comparing the type B with the loaded cache will be described below with respect to FIG. 2B. Regarding the result of the type B comparison for the loaded cache, a decision is made at step 210. In the described embodiment, if the result of the comparison of type B with the loaded cache is true, for example, if the determination determines that the type B and the loaded cache match, then the object is type B in step 222. A true value is returned to the function that requested the determination of whether the sub-type of. In other words, if the loaded class and type B are the same class, or if the loaded class is a sub-type of type B, then a true value is returned. Once the true value is returned, we complete the process of determining whether the object is of type B.

선택적으로, 단계(210)에서 적재된 캐시에 대하여 타입 B 의 비교가 참 결과를 공급하지 않는다고 결정한다면, 객체의 클래스와 타입 B 사이에서 서브-타입 관계(subtype relationship)는 단계(212)에서 완성된다. 즉, 객체의 클래스와 타입 B 가 같지 않다고 결정할 때, 객체의 클래스와 타입 B 사이에서 어떤 관계가 있다면 그 관계를 결정하는 컴퓨터에 의한 계산을 실행한다. 서브-타입 관계가 완성된 후에, 처리 흐름은 단계(214)로 진행되는데, 서브-타입에 대한 계산이 참 결과를 일으키는지에 관하여, 즉, 객체의 클래스와 타입 B 사이의 서브-타입 관계가 유효한지에 관하여, 단계(214)에서 결정을 내린다.Optionally, if it is determined in step 210 that the comparison of type B does not provide true results for the loaded cache, then a subtype relationship between the class of object and type B is completed in step 212. do. That is, when determining that an object's class and type B are not the same, if there is any relationship between the object's class and type B, it performs a computation by a computer that determines the relationship. After the sub-type relationship is completed, processing flow proceeds to step 214, where the calculation for the sub-type produces a true result, i.e., the sub-type relationship between the object's class and type B is valid. With respect to the decision, a decision is made at step 214.

객체의 클래스와 타입 B 사이에서 서브-타입 관계가 존재하지 않는다고 단계(214)에서 결정한다면, 단계(220)에서 거짓 값을 서브-타입 검사를 요구하였던 함수로 리턴(return)한다. 거짓 값을 일단 리턴(return)한다면, 객체가 타입 B 의 서브-타입인지를 결정하는 처리는 완성된다. 하지만, 객체의 클래스와 타입 B 사이에서 서브-타입이 존재한다고 단계(214)에서 결정한다면, 처리의 흐름은 단계(216)로 진행되는데, 단계(216)에서 객체에 있는 클래스의 캐시(cache)는 클래스 B 로 "채워진다". 달리 말하면, 클래스 B, 또는 타입 B 에 대한 참조(reference) 가 상기 객체의 클래스 캐시 요소내로 저장된다. 마지막으로, 객체의 클래스 캐시가 타입 B 로 채워진 후에, 객체의 클래스와 타입 B 사이에서 서브-타입 관계가 있다는 것을 나타내도록, 단계(218)에서 참 값이 시스템으로 리턴(return)된다. 그 다음에, 객체가 타입 B 의 서브-타입인지를 결정하는 처리는 완성된다.If it is determined at step 214 that there is no sub-type relationship between the class of the object and type B, then at step 220 a false value is returned to the function that required the sub-type checking. Once the false value is returned, the process of determining whether the object is a sub-type of type B is complete. However, if it is determined in step 214 that there is a sub-type between the object's class and type B, the flow of processing proceeds to step 216 where the cache of the class in the object Is "filled" into class B. In other words, a reference to class B, or type B, is stored into the class cache element of the object. Finally, after the object's class cache is filled with type B, a true value is returned to the system at step 218 to indicate that there is a sub-type relationship between the object's class and type B. Then, the process of determining whether the object is a sub-type of type B is completed.

이제, 도 2b 에서, 타입 B 를 적재된 캐시(loaded cache), 예를 들면, 특정 객체의 클래스에 대하여 비교하는 단계가 본 발명의 실시예에 따라서 기술될 것이다. 즉, 도 2a 에 있는 단계(208)의 하나의 실시예가 논의될 것이다. 적재된 캐시에 대하여 타입 B 의 비교는 단계(232)에서 시작하는데, 캐시 요소(cache element)가 레지스터(register)로 적재된다. 특히, 도 2c 와 관련하여 아래에서 기술될 것이지만, 객체의 클래스 캐시 요소가 레지스터로 적재된다. 캐시 요소를 레지스터로 적재시킨 후에, 레지스터에 있는 내용이 단계(234)에서 타입 B 에 비교된다. 위에서 논의된 것처럼, 캐쉬(cashing)를 사용하는 검사 메카니즘은 이전의 서브 타입 검사 결과가 캐쉬될 수 있도록 하여, 동일한 검사가 뒤에 수행되는 때 상기 캐쉬된 값이 사용될 수 있도록 하여 동일한 검사를 고속처리 할 수 있도록 한다. 검사에서 캐쉬 요소가 사용될 수 있도록 함으로써, 상기 캐쉬 요소는 용이하게 접근될 수 있다. 캐시 요소와 레지스터에 있는 내용을 비교하기 위한 적합한 방법이 이용될 수 있으며, 일반적으로, 당업자에 의해 이러한 방법은 공지되어 있다. 레지스터의 내용이 타입 B 에 일단 비교되면, 적재된 캐시에 대하여 타입 B 를 비교하는 처리는 완성된다.In FIG. 2B, the step of comparing Type B against a loaded cache, eg, a class of a particular object, will be described according to an embodiment of the present invention. That is, one embodiment of step 208 in FIG. 2A will be discussed. The comparison of type B for the loaded cache begins at step 232 where a cache element is loaded into a register. In particular, as will be described below with respect to FIG. 2C, the class cache element of an object is loaded into a register. After loading the cache element into a register, the contents of the register are compared to type B in step 234. As discussed above, a check mechanism that uses caching allows previous subtype check results to be cached, allowing the cached values to be used when the same check is performed later, thereby speeding up the same check. To be able. By allowing cache elements to be used in the inspection, the cache elements can be easily accessed. Suitable methods for comparing the contents of the cache element and the registers can be used, and such methods are generally known by those skilled in the art. Once the contents of the register are compared to type B, the process of comparing type B against the loaded cache is complete.

앞에서 논의된 것처럼, 클래스, 예를 들면, 한 클래스 객체가 캐시 요소를 포함하는데, 이전에 있었던 서브-타입 검사의 결과가 저장된다. 도 2c 는, 본 발명의 실시예에 따른 캐시 요소(cache element)를 갖는 클래스(class)의 대표 그림을 나타낸다. 객체"S"(252)는 헤더(256)(header)를 포함하고, 클래스(260)에 대한 클래스 포인터를 가진다. 클래스(260)는 헤더(264)(header)와 캐시 요소(268)(cache element)를 포함한다. 앞에서 기술된 것처럼, 캐시 요소(268)는 이전에 있었던, 예를 들면, 클래스(260)와 관련이 있는 제 1, 서브-타입 검사의 결과를 저장하도록 설치된다. 클래스(260)를 초기화할 때, 캐시 요소(268)가 어떤 값으로 초기화된다. 한 예로서, 캐시 요소(268)는 클래스(260)를 확인할 수 있도록 초기화될 수 있다. 일반적으로, 프로그램을 실행할 때, 또는 보다 더 상세하게 서브-타입 검사를 실행할 때, 캐시 요소(268)에 저장된 결과는 변화될 수 있기 때문에, 캐시 요소(268)는 "동적" 저장 요소로써 고려될 수 있다. 즉, 캐시 요소(268)의 내용은 갱신될 수 있다.As discussed above, a class, for example a class object, contains a cache element, which stores the result of a previous sub-type check. 2C shows a representative picture of a class with cache elements in accordance with an embodiment of the invention. Object "S" 252 includes a header 256 and has a class pointer to class 260. Class 260 includes a header 264 and a cache element 268. As described above, the cache element 268 is installed to store the results of the first, sub-type check as previously associated with, for example, the class 260. When initializing class 260, cache element 268 is initialized to some value. As one example, cache element 268 may be initialized to identify class 260. In general, when executing a program, or when performing sub-type checking in more detail, the cache element 268 may be considered as a "dynamic" storage element because the results stored in the cache element 268 may change. Can be. That is, the contents of cache element 268 may be updated.

객체"s"(252)를 포함하는 서브-타입 검사 중에, 객체"s"(252)가 클래스(260)의 멤버(member)인 것으로 알려지는 때, 캐쉬 요소(268)가 접근되어 클래스(260)를 포함하는 가장 최근의 서브-타입 검사의 결과를 얻을 수 있다. 일반적으로, 클래스(260)를 포함하는 가장 최근의 서브-타입 검사 결과를 저장하도록, 캐시 요소(268)가 갱신될 수 있다. 이와 같이, 캐시 요소(268)에 저장된 결과가 객체"s"(252)와 관련이 있는 서브-타입이 아니라면, 일단 결정이 된 객체"s"(252)와 관련이 있는 실제 서브-타입이 캐시 요소(268)에 저장될 수 있다. 어떤 실시 예에 있어서, 캐시 요소(268)에 정보를 저장하고, 또한 정보를 회수하는 것은, 일어날 수 있는 캐시 부착 문제(cache coherency issue)를 처리하기 위한 동기화를 포함한다.During sub-type checking that includes object "s" 252, when object "s" 252 is known to be a member of class 260, cache element 268 is accessed to access class 260. Results of the most recent sub-type check, including In general, cache element 268 may be updated to store the most recent sub-type check result that includes class 260. As such, if the result stored in cache element 268 is not a sub-type associated with object "s" 252, then the actual sub-type associated with object "s" 252 once determined is cached. May be stored in element 268. In some embodiments, storing and retrieving information in cache element 268 also includes synchronization to address cache coherency issues that may occur.

도 3 은, 본 발명을 구현하는데 적합한 전형적인 범용 컴퓨터 시스템을 설명하고 있다. 컴퓨터 시스템(330)(computer system)은 일정 숫자의 프로세서(332)(processor)를 포함하는데, 메모리 장치에 결합되어 있는 중앙 처리 장치(central processing units, CPUs)라고 불리는 일정 수의 처리기(332)를 포함한다. 상기 메모리 장치(memory device)는 RAM 과 같은 제 1 스토리지 장치(334)(primary storage device), 그리고 ROM 과 같은 제 1 스토리지 장치(336)(primary storage device) 를 포함한다.3 illustrates a typical general purpose computer system suitable for implementing the present invention. Computer system 330 includes a number of processors 332, which may include a number of processors 332, called central processing units (CPUs), coupled to memory devices. Include. The memory device includes a first storage device 334 such as a RAM and a first storage device 336 such as a ROM.

컴퓨터 시스템(330), 또는 보다 더 상세하게 CPUs(332)는 가상 기계(virtual machine)를 지원하도록 설치될 수 있다. 컴퓨터 시스템에서 지원되는 가상 기계의 한 실례는, 도 4 와 관련하여 아래에서 기술될 것이다. 당해 기술에서 공지된 것처럼, ROM(336)은 CPUs(332)로 데이터와 명령을 한쪽 방향으로 전달하도록 작동하고, RAM(334)은 CPUs 에서 또는 CPUs 로 데이터와 명령을 양쪽 방향으로 전달하도록 작동한다. 제 1 스토리지 장치(334, 336) 는 모두 실질적으로 어떤 적합하게 이용되는 컴퓨터에 의하여 판독 가능한 매체(computer-readable media)를 포함한다. 일반적으로 매스 메모리 장치(mass memory device)가 되는 제 2 스토리지 매체(338)(secondary storage medium)는 양 방향으로 CPUs 에 또한 결합될 수 있다. 일반적으로, 제 2 스토리지 매체(338)는 추가의 데이터 스토리지 용량을 공급하도록 설치되고, 컴퓨터 코드를 포함하는 프로그램, 컴퓨터 프로그램 코드 장치, 데이터, 및 유사 장치 등을 저장할 수 있도록 이용되는 컴퓨터에 의하여 판독 가능한 매체(computer-readable medium)로써 제 2 스토리지 매체(338)는 될 수 있다. 일반적으로, 제 2 스토리지 매체(338)는 제 1 스토리지 장치(334, 336)보다 더 늦을 수 있는 하드디스크나 테이프 등과 같은 스토리지 매체가 된다. 자기 테이프 판독기(magnetic tape reader)와 페이퍼 테이프 판독기(paper tape reader) 등을 포함하는, 이러한 것에 제한되지는 않지만, 공지된 장치의 형(型)을, 제 2 스토리지 매체(338)는 취할 수 있다. 적합한 경우에 있어서, 제 2 스토리지 매체(338) 내에서 존속되는 정보는 가상 메모리(virtual memory)와 같은 RAM(334)의 부분으로써 표준 형(型)으로 합체될 수 있다. CD-ROM 과 같은 특별한 제 1 스토리지 장치(334)는 CPUs(332)와 한쪽 방향으로 데이터를 교환할 수 있다.Computer system 330, or more specifically CPUs 332, may be installed to support a virtual machine. One example of a virtual machine supported in a computer system will be described below with respect to FIG. 4. As is known in the art, the ROM 336 operates to pass data and instructions to CPUs 332 in one direction, and the RAM 334 operates to transfer data and instructions in either direction to or from the CPUs. . The first storage devices 334, 336 both include substantially any suitable computer-readable media. Secondary storage medium 338, which generally becomes a mass memory device, may also be coupled to the CPUs in both directions. Generally, the second storage medium 338 is installed to supply additional data storage capacity and is read by a computer used to store programs, computer program code devices, data, and similar devices, including computer code, and the like. The second storage medium 338 can be a computer-readable medium. In general, the second storage medium 338 is a storage medium such as a hard disk or tape, which may be later than the first storage device 334, 336. The second storage medium 338 can take the form of a known device, including, but not limited to, a magnetic tape reader, a paper tape reader, and the like. . Where appropriate, information remaining within the second storage medium 338 may be incorporated into a standard form as part of a RAM 334, such as virtual memory. A special first storage device 334, such as a CD-ROM, can exchange data with the CPUs 332 in one direction.

비디오 모니터, 트랙 볼, 마우스, 키보드, 마이크로폰, 접촉에 의한 디스플레이, 트랜스듀서 카드 판독기, 자기나 페이퍼 테이프 판독기, 타블릿, 스타일러스, 음성이나 손에 의하여 기록되는 인식 장치, 그리고 다른 컴퓨터와 같은 공지된 입력 장치 등을 포함하는, 하지만 이러한 것에 제한되지는 않고, 하나 이상의 입력/출력 장치(340)(input/output device)에, CPUs(332)가 결합될 수 있다. 마지막으로, (312)에서 나타난 것과 같은 네트워크 연결을 이용하여, 인터넷 네트워크(internet network)나 인트라넷 네트워크(intranet network) 등과 같은 컴퓨터 네트워크(computer network)나 원격 통신 네트워크(telecommunication network) 등에, CPUs(332)는 선택적으로 결합될 수 있다. 상기 네트워크 연결(312)(network connection)에 있어서, CPUs(332)는 네트워크(network)에서 정보를 수신할 수 있다는 것을 고려할 수 있다. 또한, CPUs(332)는 위에서 기술된 방법 단계를 실행하는 과정에서 네트워크로 정보를 출력할 수 있다. CPUs(332)를 이용하여 실행되는 일련의 명령으로써 대표되는 상기 정보는, 예를 들면, 반송파로 구현되는 컴퓨터 데이터 신호의 형태로 네트워크에서 수신될 수 있고 네트워크로 출력될 수 있다. 위에서 기술된 장치와 기술 등은, 컴퓨터 하드웨어와 컴퓨터 소프트웨어 등에 종사하는 당해 기술자에 공지되어 있다.Known inputs such as video monitors, trackballs, mice, keyboards, microphones, touch-sensitive displays, transducer card readers, magnetic or paper tape readers, tablets, stylus, voice or hand recorded recognition devices, and other computers CPUs 332 may be coupled to one or more input / output devices 340, including, but not limited to, devices, and the like. Finally, using a network connection as shown at 312, the CPUs 332 may be used in a computer network or telecommunication network such as an internet network or an intranet network. ) May be optionally combined. In the network connection 312, it is contemplated that the CPUs 332 may receive information in a network. In addition, the CPUs 332 may output information to the network in the course of performing the method steps described above. The information represented by a series of instructions executed using the CPUs 332 can be received at the network and output to the network, for example, in the form of a computer data signal embodied as a carrier wave. The devices, techniques, and the like described above are known to those skilled in the art working on computer hardware, computer software, and the like.

앞에서 기술된 것처럼, 가상 기계(virtual machine)는 컴퓨터 시스템(330)에서 실행될 수 있다. 도 4 는, 도 3 에 있는 컴퓨터 시스템(330)에 의하여 지원되는, 그리고 본 발명을 구현하는데 적합한 가상 기계(virtual machine)의 대표 그림을 나타낸다. 컴퓨터 프로그램, 예를 들면, JavaTM 프로그래밍 언어로 기록된 컴퓨터 프로그램이 실행될 때, 소스 코드(410)(source code)가 컴파일-시간 환경(405)(compile-time environment) 내 컴파일러(420)(compiler)로 공급된다. 컴파일러(420)(compiler)는 소스 코드(410)(source code)를 바이트 코드(430)(byte code)로 변환한다. 일반적으로, 소스 코드(410)가 소프트웨어 개발자에 의하여 만들어지는 시간에, 소스 코드(410)는 바이트 코드(430)로 변환된다.As described above, the virtual machine may run on the computer system 330. 4 shows a representative illustration of a virtual machine supported by the computer system 330 in FIG. 3 and suitable for implementing the present invention. When a computer program, for example, a computer program written in the JavaTM programming language, is executed, the source code 410 is compiled into a compiler 420 in a compile-time environment. Is supplied. The compiler 420 converts the source code 410 into the byte code 430. Generally, at the time that source code 410 is produced by a software developer, source code 410 is converted to byte code 430.

일반적으로 바이트 코드(430)는 다시 생성되거나, 다운-로드되거나, 그렇지 않으면 네트워크, 예를 들면, 도 3 의 네트워크(312)를 통하여 배급되거나, 도 3 의 제 1 스토리지(334)와 같은 스토리지 장치에 저장된다. 기술된 실시 예에 있어서, 바이트 코드(430)는 독립적인 플랫폼(platform)이다. 즉, 바이트 코드(430)는 적합한 가상 기계(440)(virtual machine)로 실행되는 어떠한 컴퓨터 시스템에서도 실행될 수 있다.In general, byte code 430 may be regenerated, downloaded, or otherwise distributed over a network, for example, network 312 of FIG. 3, or a storage device such as first storage 334 of FIG. 3. Are stored in. In the described embodiment, the byte code 430 is an independent platform. In other words, byte code 430 may be executed by any computer system running with a suitable virtual machine 440.

바이트 코드(430)가 가상 기계(440)를 포함하는 실행-시간 환경(435)(runtime environment)으로 제공된다. 한 실시 예에서, 가상 기계는 JavaTM 이 될 수 있다. 실행-시간 환경(435)은 일반적으로 도 3 의 CPUs(332)와 같은 프로세서나 몇몇의 프로세서를 이용하여 실행될 수 있다. 가상 기계(440)는 컴파일러(442)(compiler), 인터프리터(444)(interpreter), 및 실행-시간 시스템(446)( runtime system) 을 포함한다. 바이트 코드(430)는 컴파일러(442), 그렇지 않으면 인터프리터(444)로 제공된다.Byte code 430 is provided to a runtime environment 435 that includes a virtual machine 440. In one embodiment, the virtual machine may be JavaTM. The run-time environment 435 may generally be executed using a processor such as the CPUs 332 of FIG. 3 or some processor. The virtual machine 440 includes a compiler 442, an interpreter 444, and a runtime system 446. Byte code 430 is provided to compiler 442, or interpreter 444.

바이트 코드(430)가 컴파일러(442)로 제공된 때, 바이트 코드(430)에 포함된 방법(method)은 기계 명령어로 컴파일(compile)된다. 하나의 실시 예에서, 상기 컴파일러(442)는, 상기 방법이 막 실행될 때까지 바이트 코드(430)에 있는 방법의 컴파일(compile)을 지연시키는 저스트-인-타임 컴파일러(just-in-time compiler)이다. 바이트 코드(430)가 인터프리터(444)에 제공되는 때, 바이트 코드(430)는 인터프리터(444)내로 한 번에 한 바이트코드 씩 읽혀진다. 그 다음에, 바이트 코드 각각이 인터프리터(444)에서 읽혀질 때, 인터프리터(444)는 각각의 바이트 코드에 의하여 정의되는 동작을 실행한다. 즉, 인터프리터(444)는 바이트 코드(430)를 "기계어로 해석(interpret)"한다. 일반적으로, 인터프리터(444)는 바이트 코드(430)를 처리하고, 인터프리터(444)는 계속해서 실질적으로 바이트 코드(430)와 관련이 있는 동작을 실행한다.When byte code 430 is provided to compiler 442, the methods contained in byte code 430 are compiled into machine instructions. In one embodiment, the compiler 442 is a just-in-time compiler that delays the compilation of the method in byte code 430 until the method is just executed. to be. When byte code 430 is provided to interpreter 444, byte code 430 is read into interpreter 444 one byte code at a time. Then, when each byte code is read from the interpreter 444, the interpreter 444 performs the operation defined by each byte code. That is, the interpreter 444 “interpret” the byte code 430. In general, the interpreter 444 processes the byte code 430, and the interpreter 444 continues to perform operations substantially related to the byte code 430.

한 방법이 다른 한 방법에 의하여 불려지는 때, 또는 실행-시간 환경(435)으로부터 불려지는 때, 만약 상기 방법이 인터프릿(interpret)된다면, 실행-시간 시스템(446)은 일련의 바이트 코드(430)의 형태로 실행-시간 환경으로부터 상기 방법을 얻을 수 있으며, 이는 인터프리터(444)에 의해 직접 실행될 수 있다. 반면, 불러 들여진 상기 방법이 컴파일 되지 않은 방법이라면, 실행 시간 시스템(446)은 일련의 바이트 코드(430)의 형태로 상기 실행 시간 환경(435)으로부터 상기 방법을 얻으며, 다음에 컴파일러(442)를 작동하도록 진행된다. 그 다음에, 컴파일러(442)는 바이트 코드(430)에서 기계 명령어를 생성시키고, 결과로써 일어나는 기계 명령어는 도 3 의 CPUs(332)에 의하여 직접적으로 실행될 수 있다. 일반적으로, 기계-언어 명령어는 가상 기계(440)가 종료될 때 없어진다.When one method is called by the other, or when it is called from the run-time environment 435, if the method is interpreted, the run-time system 446 may execute the sequence of byte codes 430. The method can be obtained from a run-time environment in the form of), which can be executed directly by the interpreter 444. On the other hand, if the invoked method is an uncompiled method, the runtime system 446 obtains the method from the runtime environment 435 in the form of a series of bytecodes 430, and then invokes the compiler 442. Proceed to work. The compiler 442 then generates machine instructions in the byte code 430, and the resulting machine instructions can be executed directly by the CPUs 332 of FIG. 3. In general, machine-language instructions are lost when virtual machine 440 exits.

본 발명에 대하여 몇몇 실시예만이 기술되었지만, 본 발명의 범위나 사상에서 벗어나지 않으면서 많은 다른 형태로 본 발명은 실시될 수 있다는 사실을 이해해야만 한다. 실례로, 어떤 실시 예에 있어서, 클래스 객체(class object)는 하나 이상의 캐시 요소(cache element)를 포함할 수 있다. 클래스 객체가 하나 이상의 캐시 요소를 포함할 때, 서브-타입 검사(subtype check)의 하나 이상의 이전에 있었던 결과는 저장될 수 있다. 즉, 객체를 위한 하나 이상의 가능성이 있는 서브-타입을 저장함으로써, 하나의 캐시 요소에 저장된 서브-타입은 객체를 위한 서브-타입이 아니라고 결정된다면, 또 하나의 캐시 요소에 저장된 서브-타입을 검사할 수 있다. 클래스의 캐시 요소에 있는 서브-타입 검사의 이전에 있었던 결과를 저장하는 것에 관하여 본 발명을 기술하였지만, 이전에 있었던 결과는 캐시 요소에서 반드시 저장될 필요는 없다. 선택에 따라, 이전에 있었던 결과는 실질적으로 어떤 동적 스토리지 위치(dynamic storage location)에 저장될 수 있는데, 여기서 동적 스토리지 위치(dynamic storage location)는 서브-타입 검사 중에 접근 가능하다. 실례로, 이전에 있었던 서브-타입 검사의 결과는, 클래스와 직접적으로 관련이 없는 컴퓨터 코드의 섹션에 저장될 수 있다. 선택에 따라, 이전에 있었던 서브-타입 검사의 결과는 동적으로 전역으로 접근 가능한 테이블(dynamic, globally accessible table)에 저장될 수 있는데, 특정 클래스를 포함하는 서브-타입 검사가 실행될 수 있을 때마다 이러한 테이블에 접근 가능하다. 이러한 테이블은 특정 클래스와 직접적으로 관련이 있을 수 있다.While only a few embodiments have been described with respect to the present invention, it should be understood that the present invention may be practiced in many other forms without departing from the scope or spirit of the invention. For example, in some embodiments, a class object may include one or more cache elements. When a class object contains one or more cache elements, one or more previously result of a subtype check may be stored. That is, by storing one or more possible sub-types for an object, if it is determined that the sub-type stored in one cache element is not a sub-type for the object, the sub-type stored in another cache element is checked. can do. Although the present invention has been described in terms of storing a result that was previously a sub-type check in a cache element of a class, the previous result is not necessarily stored in the cache element. Optionally, the previous results can be stored at substantially any dynamic storage location, where the dynamic storage location is accessible during sub-type checking. By way of example, the results of a previous sub-type check may be stored in a section of computer code that is not directly related to the class. Optionally, the results of previous sub-type checks can be stored in a dynamically, globally accessible table, whenever a sub-type check containing a particular class can be run. The table is accessible. Such a table can be directly related to a particular class.

한 실시 예에서, 특정 객체가 어떤 서브-타입을 포함하는지를 결정하기 위하여 검사를 구현하는 대신에, 특정 객체가 어떤 서브-타입을 포함하지 않는다고 결정하도록 검사는 구현될 수 있다. 일반적으로, 컴퓨터 코드의 세그먼트(segment)에서, 또는 전역 테이블(global table)의 부분으로써, 상기 검사의 결과는 클래스의 캐시 요소에 저장될 수 있다. 달리 말하면, 캐시 요소는 특정 서브-타입 검사를 위하여 매칭(matching)되지 않는 서브-타입 표시(subtype designation)를 수용하도록 설치될 수 있다.In one embodiment, instead of implementing a check to determine which sub-type a particular object includes, the check may be implemented to determine that a particular object does not contain any sub-type. In general, in a segment of computer code, or as part of a global table, the results of the check may be stored in a cache element of the class. In other words, the cache element may be installed to accommodate subtype designation that does not match for a particular sub-type check.

일반적으로, 서브-타입 검사를 이용하는 명령어(instruction), 또는 작동(operation) 등은, 특별한 시스템의 요구 사항에 의존하면서 넓은 범위에서 다양할 수 있다. JavaTM 환경에서, 예를 들면, "aastore" 명령어, "checkcast" 명령어, 그리고 "instanceof" 명령어 등은 서브-타입 검사를 일반적으로 이용한다.In general, instructions or operations using sub-type checking may vary over a wide range, depending on the requirements of the particular system. In the JavaTM environment, for example, the "aastore" command, the "checkcast" command, and the "instanceof" command generally use sub-type checking.

덧붙여서, 본 발명에 따라서 서브-타입 검사를 실행하는 것과 관련이 있는 단계는 다양할 수 있다. 본 발명의 범위나 사상에서 벗어나지 않으면서, 이러한 단계는 변경되고, 다시 순서를 정하고, 추가되고, 그리고 제거된다. 실례에 의하여, 비교에 의하여 "참(true)" 표시를 나타낸다고 결정하는 것은, 비교에 의하여 "거짓(false)" 표시를 나타낸다고 결정하는 것으로 대신할 수 있다. 대신에, 클래스 객체가 하나 이상의 캐시 요소를 포함할 때, 서브-타입 검사를 실행하는 것과 관련이 있는 단계는, 서브-타입 매치(subtype match)를 찾을 때까지, 그렇지 않으면 모든 캐시 요소를 검사할 때까지, 각각의 캐시 요소를 통하여 효율적으로 순환하는 단계를 포함할 수 있다. 그러므로 본 실시 예는 실례로써 고려될 수 있고, 여기에 제한되지 않고, 그리고 본 발명은 여기에서 주어진 상세함에 제한되지 않지만, 부속된 특허청구범위와 그와 동일한 범위에 의하여 정해지는 것이다.In addition, the steps involved in performing sub-type checking in accordance with the present invention may vary. Without departing from the scope or spirit of the present invention, these steps are altered, reordered, added, and removed. By way of example, determining that a comparison indicates a "true" indication may be substituted for determining that a comparison indicates a "false" indication. Instead, when a class object contains one or more cache elements, the steps involved in performing sub-type checking are to check all cache elements until it finds a subtype match. Until it can efficiently cycle through each cache element. The present embodiment is therefore to be considered in all respects as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but is to be defined by the appended claims and their equivalents.

Claims (23)

객체 지향 컴퓨터 시스템의 일부인 한 객체와 연관된 클레스가 다른 한 타입의 서브타입인가를 결정하기위한 방법으로서, A method for determining whether a class associated with an object that is part of an object-oriented computer system is a subtype of another type, 객체와 연관된 클래스와 관련이 있는 동적 스토리지 위치(dynamic storage location)로부터 후보 타입(candidate type)을 얻는 단계 ; Obtaining a candidate type from a dynamic storage location associated with the class associated with the object; 상기 후보 타입(candidate type)을 제 1 타입(first type)과 비교하는 단계 ; Comparing the candidate type with a first type; 상기 후보 타입(candidate type)이 제 1 타입(first type)에 일치하는지를 결정하는 단계 ; 그리고 Determining whether the candidate type corresponds to a first type; And 상기 후보 타입(candidate type)이 제 1 타입(first type)과 일치한다는 결정이 있는 때, 상기 후보 타입(candidate type)이 제 1 타입(first type)의 서브-타입(subtype)이라는 표시(indication)를 제공하는 단계를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법(computer-implemented method).When there is a determination that the candidate type matches the first type, an indication that the candidate type is a subtype of the first type. A computer-implemented method, comprising: providing a fast sub-class test and a sub-type test by a computer. 제 1 항에 있어서, 객체와 연관성이 있는 클래스와 관련이 있는 동적 스토리지 위치로부터 얻어진 후보 타입(candidate type)이, 상기 객체와 연관성이 있는 클래스 내 캐시 요소(cache element)로부터 얻어지는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법The method of claim 1, wherein a candidate type obtained from a dynamic storage location associated with a class associated with the object is obtained from a cache element in a class associated with the object. Computer-implemented sub-class test and sub-type test 제 2 항에 있어서, 제 1 타입에 대하여 후보 타입(candidate type)을 비교하는 단계가, The method of claim 2, wherein comparing a candidate type with respect to the first type comprises: 상기 캐시 요소로부터 얻어진 후보 타입(candidate type)을 한 레지스터내로 적재하는 단계 ; 그리고 Loading a candidate type obtained from the cache element into one register; And 상기 캐시 요소의 내용을 제 1 타입과 비교하는 단계를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법 And comparing the contents of said cache element with a first type. A computer-implemented fast sub-class check and sub-type check. 제 1항 내지 3항중 어느 한 항에 있어서, 상기 후보 타입(candidate type)이 제 1 타입과 일치하지 않을 때, 상기 객체의 클레스와 상기 제 1 타입간의 타입 관계를 계산하는 단계를 더욱 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법 4. The method of any one of claims 1 to 3, further comprising calculating a type relationship between the class of the object and the first type when the candidate type does not match the first type. Computer-implemented characterized fast sub-class test and sub-type test 제 4 항에 있어서, 상기 객체의 클래스와 제 1 타입간의 타입 관계(type relationship)가 존재하는가를 결정하는 단계를 더욱 포함하며, 상기 객체의 클래스와 제 1 타입간의 타입 관계(type relationship)가 존재한다는 결정이 있는 때, 상기 제 1 타입에 대한 표시(indication)가 상기 객체의 클래스 캐시 요소에 저장되는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법5. The method of claim 4, further comprising determining whether a type relationship exists between the class of the object and the first type, wherein a type relationship exists between the class of the object and the first type. And when it is determined that an indication for the first type is stored in the class cache element of the object, the fast sub-class check and the sub-type check are implemented by the computer. 제 5항에 있어서, 상기 객체의 클레스를 한 레지스터내로 적재함을 더욱 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법6. The computer-implemented method of claim 5, further comprising loading the class of the object into a register. 컴퓨터 시스템에 존재하는 제 1 객체와 연관된 서브타입을 결정하도록 하는 컴퓨터 시스템으로서, A computer system for determining a subtype associated with a first object residing in a computer system, 프로세서(processor) ; Processor; 컴퓨터 시스템과 관련이 있는 메모리내로 후보 타입(candidate type)을 적재하도록 되는 적재 메커니즘(loading mechanism) - 여기서, 상기 후보 타입은 제 1 객체와 연관성이 있는 클래스 객체와 관련이 있는 스토리지 위치(storage location)에서 얻어지고 - ; Loading mechanism for loading a candidate type into memory associated with a computer system, where the candidate type is a storage location associated with a class object associated with the first object Obtained from-; 상기 후보 타입(candidate type)을 제 1 타입과 비교하도록 하는 비교 메커니즘(comparison mechanism) ; A comparison mechanism for comparing the candidate type with the first type; 상기 후보 타입이 제 1 타입과 일치하는지를 결정하도록 하는 결정 메커니즘(determination mechanism) ; 그리고 A determination mechanism for determining whether the candidate type matches the first type; And 상기 후보 타입이 제 1 타입과 일치한다고 결정할 때, 상기 후보 타입이 제 1 타입의 서브-타입이라는 표시(indication)를 제공하도록 하는 표시기(indicator)를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 컴퓨터 시스템And upon determining that the candidate type matches the first type, an indicator to provide an indication that the candidate type is a sub-type of the first type. Computer system that implements sub-type checking by computer 제 7 항에 있어서, 상기 클래스 객체에서 얻어지는 후보 타입이 상기 클래스 객체 내 캐시 요소로부터 얻어지는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 컴퓨터 시스템8. The computer system of claim 7, wherein the candidate type obtained in the class object is obtained from a cache element in the class object. 제 8 항에 있어서, 상기 후보 타입을 제 1 타입과 비교하도록 하는 비교 메커니즘(comparison mechanism)이 9. The method of claim 8, wherein a comparison mechanism for comparing the candidate type with the first type is provided. 상기 캐시 요소로부터 얻어진 후보 타입(candidate type)을 한 레지스터내로 적재하도록 하는 적재 메커니즘, 그리고 A loading mechanism for loading a candidate type obtained from the cache element into one register, and 상기 캐시 요소의 내용을 제 1 타입과 비교하도록 하는 비교 메커니즘을 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 컴퓨터 시스템A computer system for implementing fast sub-class checking and sub-type checking by a computer comprising a comparison mechanism for comparing the contents of said cache element with a first type. 제 7 항 내지 제 9 항중 어는 한 항에 있어서, The method of claim 7, wherein 상기 후보 타입(candidate type)이 제 1 타입과 일치하지 않는 다는 결정이 있는 때, 상기 객체의 클레스와 상기 제 1 타입간의 타입 관계를 계산하도록 하는 계산 메카니즘을 더욱 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 컴퓨터 시스템And a calculation mechanism for calculating a type relationship between the class of the object and the first type when it is determined that the candidate type does not match the first type. Computer system that implements class checking and sub-type checking by computer 제 10 항에 있어서, 상기 객체의 클래스와 제 1 타입간의 타입 관계(type relationship)가 존재하는가를 결정하는 결정 메카니즘; 그리고11. The apparatus of claim 10, further comprising: a decision mechanism for determining whether a type relationship exists between a class of the object and a first type; And 상기 객체의 클래스와 제 1 타입간의 타입 관계(type relationship)가 존재한다는 결정이 있는 때, When there is a determination that a type relationship exists between a class of the object and a first type, 상기 객체 클레스의 캐시 요소내로 제 1 타입의 표시를 저장하도록 하는 저장 메카니즘을 더욱 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 컴퓨터 시스템A computer system for implementing fast sub-class checking and sub-type checking by a computer, further comprising a storage mechanism for storing a first type of representation into the cache element of the object class. 객체 지향 컴퓨터 시스템의 일부인 제 1 객체와 관련된 서브타입을 컴퓨터가 결정하도록 하는 컴퓨터 판독 가능 매체로서, A computer readable medium for causing a computer to determine a subtype associated with a first object that is part of an object oriented computer system, 제 1 객체와 관련이 있는 클레스 객체로부터 한 후보 타입을 얻는 컴퓨터 코드(computer code);Computer code for obtaining a candidate type from a class object associated with the first object; 상기 후보 타입을 제 1 타입과 비교하는 컴퓨터 코드 ; Computer code for comparing the candidate type with a first type; 상기 후보 타입이 제 1 타입과 일치하는가를 결정하는 컴퓨터 코드 ; Computer code for determining if the candidate type matches the first type; 상기 후보 타입이 상기 제 1 타입과 일치한다는 결정이 있는 때, 상기 후보 타입이 제 1 타입의 서브-타입이라는 표시(indication)를 제공하는 컴퓨터 코드를 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하기 위한 컴퓨터 판독 가능 매체And when it is determined that the candidate type matches the first type, computer code that provides an indication that the candidate type is a sub-type of the first type. Computer readable media for computer-implemented sub-type testing 삭제delete 특정 클레스 멤버인 한 객체에 대한 서브타입 검사를 수행하기 위한 컴퓨터 구현 방법으로서, A computer-implemented method for performing subtype checking on an object that is a particular class member. 특정 클래스와 관련이 있는 한 위치로부터 한 저장된 요소(stored element)를 얻는 단계 - 여기서, 상기 저장된 요소(stored element)가 상기 객체와 관련이 있는 것으로 보여 지는 제 1 서브-타입과 관련된 정보를 포함하고 - ; Obtaining a stored element from a location associated with a particular class, wherein the stored element includes information associated with a first sub-type that is shown to be associated with the object; -; 상기 저장된 요소에 포함된 정보가, 상기 객체와 연관성이 있는 실제 서브-타입(actual subtype)과 관련이 있다고 결정하는 단계 ; 그리고 Determining that information contained in the stored element relates to an actual subtype associated with the object; And 상기 저장된 요소에 포함된 정보가 상기 실제 서브-타입(actual subtype)과 관련이 있다고 결정될 때, 상기 저장된 요소에 포함된 정보가 상기 실제 서브-타입(actual subtype)과 관련이 있다는 표시(indication)를 제공하는 단계를 포함함을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법When it is determined that the information contained in the stored element is related to the actual subtype, an indication is provided that the information contained in the stored element is related to the actual subtype. Computer-implemented fast sub-class inspection and sub-type inspection, comprising providing a 제 14 항에 있어서, The method of claim 14, 상기 저장된 요소 내에 포함된 정보가 실제 서브-타입(actual subtype)과 관련이 없다는 것이 결정될 때, 상기 객체와 관련이 있는 실제 서브-타입을 결정하는 단계 ; 그리고 When it is determined that the information contained in the stored element is not related to an actual subtype, determining an actual sub-type related to the object; And 상기 특정 클래스와 관련이 있는 위치에 실제 서브-타입과 관련이 있는 정보를 저장하는 단계를 더욱 포함함을 특징으로 하는 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법And storing the information related to the actual sub-type at a location associated with the particular class. 객체 지향 컴퓨터 시스템 일부이며 제 1 타입인 한 객체와 연관된 클레스가 다른 한 타입의 서브타입인 가를 결정하기 위한 컴퓨터 구현 방법으로서, A computer-implemented method for determining whether a class associated with an object of type 1 that is part of an object-oriented computer system is a subtype of another type, 상기 객체에 대한 후보 타입이 되는 제 2 타입을 얻는 단계 ; Obtaining a second type that is a candidate type for the object; 상기 제 2 타입을 제 1 타입을 비교하는 단계 ; Comparing the second type with a first type; 상기 제 2 타입이 제 1 타입에 일치하는지를 결정하는 단계 ; 그리고 Determining whether the second type matches the first type; And 상기 제 2 타입이 제 1 타입과 일치한다는 결정이 있는 때, 상기 객체와 연관성이 있는 클래스와 관련이 있는 동적 스토리지 위치에 상기 제 2 타입과 관련이 있는 정보를 저장하는 단계 - 여기서, 동적 스토리지 위치에 정보를 저장하는 단계에 의하여, 뒤에 일어나는 검사에 대하여 그 같은 정보가 접근 가능하고 - ;를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법When there is a determination that the second type matches the first type, storing the information associated with the second type in a dynamic storage location associated with a class associated with the object, wherein the dynamic storage location Storing information in the computer, wherein the information is accessible for subsequent inspections and includes; and, comprising: a computer-implemented fast sub-class inspection and sub-type inspection; 제 16 항에 있어서, 상기 제 2 타입이 상기 제 1 타입과 일치한다는 결정이 있는 때, 상기 제 2 타입이 상기 제 1 타입의 서브-타입이라는 표시(indication)를 제공하는 단계를 더욱 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법17. The method of claim 16, further comprising providing an indication that the second type is a sub-type of the first type when it is determined that the second type matches the first type. Computer-implemented characterized fast sub-class test and sub-type test 제 17 항에 있어서, 상기 제 2 타입을 얻는 단계가, 다수의 타입을 포함하는 데이터 구조(data structure)로부터 상기 제 2 타입을 얻는 단계를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법18. The method of claim 17, wherein obtaining the second type comprises obtaining the second type from a data structure comprising a plurality of types. How to implement type checking by computer 제 18 항에 있어서, 다수의 타입을 포함하는 데이터 구조를 생성시키는 단계를 더욱 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법19. The computer-implemented method of claim 18, further comprising generating a data structure comprising a plurality of types. 제 16 항 내지 제 19 항 중 어느 하나의 항에 있어서, The method according to any one of claims 16 to 19, 제 2 타입이 제 1 타입에 일치하지 않는다는 결정이 있는 때, 제 3 타입을 얻는 단계 - 여기서, 제 3 타입은 상기 객체에 대하여 후보 타입이며, 상기 제 3 타입은 다수의 타입을 포함하는 데이터 구조로부터 얻어지고 - ; When there is a determination that the second type does not match the first type, obtaining a third type, where the third type is a candidate type for the object and the third type comprises a plurality of types; Obtained from-; 상기 제 3 타입을 상기 제 1 타입과 비교하는 단계 ; Comparing the third type with the first type; 상기 제 3 타입이 상기 제 1 타입과 일치하는가를 결정하는 단계 ; 그리고Determining whether the third type matches the first type; And 상기 제 3 타입이 상기 제 1 타입과 일치한다는 결정이 있는 때, 동적 스토리지 위치에 상기 제 3 타입과 관련이 있는 정보를 저장하는 단계를 포함하는 것을 특징으로 하는 고속 서브-클레스 검사 및 서브-타입 검사를 컴퓨터에 의해 구현하는 방법And upon determining that the third type matches the first type, storing information related to the third type in a dynamic storage location. How to implement a scan by computer 객체와 연관성이 있는 클래스와 관련이 있는 동적 스토리지 위치에 제 1 후보 타입을 저장하는 단계; Storing the first candidate type in a dynamic storage location associated with a class associated with the object; 상기 동적 스토리지 위치로부터 제 1 후보 타입을 얻는 단계 ; Obtaining a first candidate type from the dynamic storage location; 상기 제 1 후보 타입을 한 객체 타입과 비교하는 단계 - 여기서, 상기 객체 타입은 객체와 관련이 있고 - ; Comparing the first candidate type with an object type, wherein the object type is associated with an object; 상기 제 1 후보 타입과 상기 객체 타입 이 같은가를 결정하는 단계 ; 그리고 Determining whether the first candidate type and the object type are the same; And 상기 제 1 후보 타입과 상기 객체 타입이 같다고 결정되는 때, 상기 제 1 후보 타입이 상기 객체 타입의 서브-타입이라는 표시를 제공하는 단계를 포함하는 것을 특징으로 하는, When it is determined that the first candidate type and the object type are the same, providing an indication that the first candidate type is a sub-type of the object type, 객체 지향 컴퓨터 시스템(object-based computing system)의 일부분이 되는 객체와 연관된 클래스(class)가 다른 한 타입의 서브-타입(subtype)인가를 결정하기 위한 컴퓨터 구현 방법A computer-implemented method for determining whether a class associated with an object that is part of an object-based computing system is a subtype of another type. 제 21 항에 있어서, 제 1 후보 타입과 객체 타입 이 같지 않다고 결정되는 때, The method of claim 21, wherein when it is determined that the first candidate type and the object type are not equal, 제 2 후보 타입을 얻는 단계 - 여기서 제 2 후보 타입은 동적 스토리지 위치에서 얻어지지 않고 - ; Obtaining a second candidate type, wherein the second candidate type is not obtained at the dynamic storage location; 상기 제 2 후보 타입을 상기 객체 타입과 비교하는 단계 ; Comparing the second candidate type with the object type; 상기 제 2 후보 타입과 상기 객체 타입이 같은가를 결정하는 단계 ; Determining whether the second candidate type and the object type are the same; 상기 제 2 후보 타입과 상기 객체 타입이 같다는 것이 결정되는 때, 상기 제 2 후보 타입이 상기 객체 타입의 서브-타입이라는 표시를 제공하는 단계 ; 그리고 When it is determined that the second candidate type and the object type are the same, providing an indication that the second candidate type is a sub-type of the object type; And 상기 동적 스토리지 위치에 제 2 후보 타입을 저장하는 단계를 더욱 포함하는 것을 특징으로 하는, And storing a second candidate type at the dynamic storage location. 객체 지향 컴퓨터 시스템(object-based computing system)의 일부분이 되는 객체와 연관된 클래스(class)가 다른 한 타입의 서브-타입(subtype)인가를 결정하기 위한 컴퓨터 구현 방법A computer-implemented method for determining whether a class associated with an object that is part of an object-based computing system is a subtype of another type. 컴퓨터 시스템에 존재하는 제 1타입의 객체와 관련된 서브 타입을 결정하는 컴퓨터 시스템에 있어서, A computer system for determining a subtype associated with an object of a first type present in a computer system, 프로세서(processor) ; Processor; 상기 객체에 대하여 후보 타입이 되는 제 2 타입을 얻도록 하는 제 1 메커니즘(first mechanism) ; A first mechanism for obtaining a second type that is a candidate type for the object; 상기 제 2 타입과 제 1 타입을 비교하는 비교기(comparator) ; A comparator for comparing the second type with the first type; 상기 제 2 타입이 상기 제 1 타입과 일치하는가를 결정하는 결정 메커니즘(determination mechanism) ; 그리고 A decision mechanism for determining whether the second type matches the first type; And 상기 제 2 타입이 제 1 타입과 일치한다는 결정이 있는 때, 상기 객체와 연관성이 있는 클래스와 관련이 있는 동적 스토리지 위치에 상기 제 2 타입과 관련이 있는 정보를 저장하기 위한 동적 스토리지 메커니즘(dynamic storage mechanism) - 여기서, 상기 동적 스토리지 위치 내 상기 정보는 뒤에 발생되는 타입 검사를 위해 접근할 수 있도록 되고 -를 포함하는 것을 특징으로 하는 컴퓨터 시스템에 존재하는 제 1타입의 객체와 관련된 서브 타입을 결정하는 컴퓨터 시스템Dynamic storage mechanism for storing information associated with the second type at a dynamic storage location associated with a class associated with the object when it is determined that the second type matches the first type mechanism) wherein said information in said dynamic storage location is accessible for type checking that occurs later.-determining a subtype associated with an object of a first type present in a computer system. Computer systems
KR1019990009588A 1998-03-23 1999-03-22 Method and apparatus for implementing fast subclass and subtype checks Expired - Fee Related KR100649799B1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US60/079,110 1998-03-23
US9/107,224 1998-06-30
US09/107,224 US6714991B1 (en) 1998-03-23 1998-06-30 Method and apparatus for implementing fast subclass and subtype checks
US09/107,224 1998-06-30

Publications (2)

Publication Number Publication Date
KR19990078103A KR19990078103A (en) 1999-10-25
KR100649799B1 true KR100649799B1 (en) 2006-11-24

Family

ID=39047487

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990009588A Expired - Fee Related KR100649799B1 (en) 1998-03-23 1999-03-22 Method and apparatus for implementing fast subclass and subtype checks

Country Status (1)

Country Link
KR (1) KR100649799B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271560A1 (en) * 2006-05-18 2007-11-22 Microsoft Corporation Deploying virtual machine to host based on workload characterizations

Also Published As

Publication number Publication date
KR19990078103A (en) 1999-10-25

Similar Documents

Publication Publication Date Title
US6317869B1 (en) Method of run-time tracking of object references in Java programs
US6553565B2 (en) Method and apparatus for debugging optimized code
US6363522B1 (en) Method and apparatus for handling exceptions as normal control flow
EP0945790B1 (en) Method and apparatus for implementing fast subclass and subtype checks
US7100003B2 (en) Method and apparatus for generating data for use in memory leak detection
JP2000172512A (en) Method and data processing system for executing byte code
EP2348406B1 (en) Endian conversion tool
US20040003377A1 (en) Converting byte code instructions to a new instruction set
US7346901B2 (en) Efficient generic code in a dynamic execution environment
GB2341465A (en) Determining the actual class of an object at run time
CN100378657C (en) Method and device for improving call speed of JAVA method
US12008351B2 (en) Modeling foreign functions using executable references
US20040128661A1 (en) Automatic data locality optimization for non-type-safe languages
US20030188295A1 (en) Method for implementing dynamic type checking
KR100649799B1 (en) Method and apparatus for implementing fast subclass and subtype checks
US6654778B1 (en) Method and apparatus for avoiding function activation and interpretation overhead for calls to selected java methods in a java virtual machine interpreter
US6752836B1 (en) Method and apparatus for high-concurrency client locking with java in a data processing system
US11106522B1 (en) Process memory resurrection: running code in-process after death
Nanjekye et al. Towards reliable memory management for Python native extensions
US12399820B1 (en) Selecting garbage collection processes
US12306750B1 (en) Selecting garbage collection processes
US6996825B2 (en) Method and apparatus for efficient object sub-typing
Cutts et al. The PamCase Machine
Wilcox et al. Mainsail implementation overview
Ferreira THE JEWEL VIRTUAL MACHINE

Legal Events

Date Code Title Description
PA0109 Patent application

St.27 status event code: A-0-1-A10-A12-nap-PA0109

T11-X000 Administrative time limit extension requested

St.27 status event code: U-3-3-T10-T11-oth-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

R18-X000 Changes to party contact information recorded

St.27 status event code: A-3-3-R10-R18-oth-X000

PN2301 Change of applicant

St.27 status event code: A-3-3-R10-R13-asn-PN2301

St.27 status event code: A-3-3-R10-R11-asn-PN2301

PG1501 Laying open of application

St.27 status event code: A-1-1-Q10-Q12-nap-PG1501

A201 Request for examination
PA0201 Request for examination

St.27 status event code: A-1-2-D10-D11-exm-PA0201

R18-X000 Changes to party contact information recorded

St.27 status event code: A-3-3-R10-R18-oth-X000

D13-X000 Search requested

St.27 status event code: A-1-2-D10-D13-srh-X000

D14-X000 Search report completed

St.27 status event code: A-1-2-D10-D14-srh-X000

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

T11-X000 Administrative time limit extension requested

St.27 status event code: U-3-3-T10-T11-oth-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

R17-X000 Change to representative recorded

St.27 status event code: A-3-3-R10-R17-oth-X000

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

E13-X000 Pre-grant limitation requested

St.27 status event code: A-2-3-E10-E13-lim-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

T11-X000 Administrative time limit extension requested

St.27 status event code: U-3-3-T10-T11-oth-X000

T12-X000 Administrative time limit extension not granted

St.27 status event code: U-3-3-T10-T12-oth-X000

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

St.27 status event code: A-1-2-D10-D22-exm-PE0701

PR1002 Payment of registration fee

St.27 status event code: A-2-2-U10-U11-oth-PR1002

Fee payment year number: 1

GRNT Written decision to grant
PR0701 Registration of establishment

St.27 status event code: A-2-4-F10-F11-exm-PR0701

PG1601 Publication of registration

St.27 status event code: A-4-4-Q10-Q13-nap-PG1601

LAPS Lapse due to unpaid annual fee
PC1903 Unpaid annual fee

St.27 status event code: A-4-4-U10-U13-oth-PC1903

Not in force date: 20091118

Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

PC1903 Unpaid annual fee

St.27 status event code: N-4-6-H10-H13-oth-PC1903

Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

Not in force date: 20091118

P22-X000 Classification modified

St.27 status event code: A-4-4-P10-P22-nap-X000