DE102018127317B3 - METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE - Google Patents

METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE Download PDF

Info

Publication number
DE102018127317B3
DE102018127317B3 DE102018127317.7A DE102018127317A DE102018127317B3 DE 102018127317 B3 DE102018127317 B3 DE 102018127317B3 DE 102018127317 A DE102018127317 A DE 102018127317A DE 102018127317 B3 DE102018127317 B3 DE 102018127317B3
Authority
DE
Germany
Prior art keywords
java bytecode
exception
instruction
block
java
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.)
Active
Application number
DE102018127317.7A
Other languages
German (de)
Inventor
Pulkit JAIN
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Infineon Technologies AG
Original Assignee
Infineon Technologies AG
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
Application filed by Infineon Technologies AG filed Critical Infineon Technologies AG
Priority to DE102018127317.7A priority Critical patent/DE102018127317B3/en
Application granted granted Critical
Publication of DE102018127317B3 publication Critical patent/DE102018127317B3/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Abstract

Verfahren zur Erzeugung eines ausführbaren Java-Bytecodes mit Ausnahmebehandlung, das Verfahren umfassend:Erzeugen eines Java-Bytecodes, wobei eine zum Befehlssatz hinzugefügte Java-Bytecode-Instruktion am Anfang eines Try-Blocks des Java-Bytecodes in den Java-Bytecode eingefügt wird, wobei als Parameter der Instruktion die Endadresse des Try-Blocks sowie entsprechend der Anzahl der vorhandenen Catch-Blöcke jeweils ein Catch-Typindex auf die geworfene Ausnahme und die Anfangsadresse eines entsprechenden Ausnahmebehandlungs-Catch-Blocks und/oder die Anfangsadresse des Finally-Blocks übergeben werden.A method of generating an executable Java byte code with exception handling, the method comprising: generating a Java byte code, wherein a Java byte code instruction added to the instruction set is inserted into the Java byte code at the beginning of a try block of the Java byte code, wherein the end address of the try block and, depending on the number of catch blocks available, a catch type index for the thrown exception and the start address of a corresponding exception handling catch block and / or the start address of the finally block are passed as parameters of the instruction.

Description

Die vorliegende Offenbarung betrifft Verfahren und Vorrichtungen zur computerimplementierten Erzeugung eines ausführbaren Programmcodes und zur Ausführung eines ausführbaren Programmcodes.The present disclosure relates to methods and devices for computer-implemented generation of an executable program code and for execution of an executable program code.

Wenn ein Datenverarbeitungssystem ein Computerprogramm ausführt, kann eine Ausnahme auftreten, die den normalen Programmfluss unterbricht. Ein Beispiel ist eine Division durch null. Eine solche Ausnahme wird normalerweise von einem Ausnahmebehandlungsmechanismus behandelt: Ein Compiler bereitet einen solchen Mechanismus für die Behandlung von Ausnahmen vor, die während der Ausführung zur Laufzeit des Programms auftreten können. Da die Behandlung von Ausnahmen zu einem Mehraufwand in Bezug auf Verarbeitungszeit und Speicheranforderungen führt, sind effiziente Ansätze für die Behandlung von Ausnahmen wünschenswert.When a data processing system executes a computer program, an exception can occur that interrupts the normal program flow. An example is a division by zero. Such an exception is usually handled by an exception handling mechanism: a compiler prepares such a mechanism for handling exceptions that can occur during execution at program runtime. Since handling exceptions increases overhead in terms of processing time and storage requirements, efficient approaches to handling exceptions are desirable.

In der Veröffentlichung B. Venners, „How the Java virtual machine handles exceptions“, javaworld.com, 1997, ist beschrieben, dass die Java virtual machine zur Ausnahmebehandlung eine Ausnahmetabelle (Exception Table) verwendet.B. Venners, "How the Java virtual machine handles exceptions", javaworld.com, 1997, describes that the Java virtual machine uses an exception table for exception handling.

Der vorliegenden Erfindung liegt die Aufgabe zu Grunde, eine effizientere Ausnahmebehandlung in Java-Bytecode zu ermöglichen.The object of the present invention is to enable a more efficient exception handling in Java bytecode.

Die Aufgabe wird durch die Gegenstände des Anspruchs 1 und der nebengeordneten Patentansprüche 4, 6, und 9 gelöst.The object is achieved by the subject matter of claim 1 and the independent claims 4, 6 and 9.

In den Zeichnungen verweisen gleiche Bezugszeichen im Allgemeinen auf dieselben Teile in den verschiedenen Ansichten. Die Zeichnungen sind nicht unbedingt maßstabsgerecht, da der Schwerpunkt anstelle dessen im Allgemeinen darauf liegt, die Prinzipien der Erfindung zu verdeutlichen. In der folgenden Beschreibung werden verschiedene Aspekte unter Bezugnahme auf die folgenden Zeichnungen beschrieben, in denen:

  • 1 ein Datenverarbeitungssystem gemäß den verschiedenen Beispielen zeigt.
  • 2 die Erzeugung von Objektcode des Computerprogramms veranschaulicht.
  • 3 eine Java Virtual Machine zeigt.
  • 4 ein Java-Programm für ein tryCatchFinally()-Verfahren zeigt.
  • 5 ein Beispiel für Java-Bytecode für ein tryCatchFinally-Verfahren zeigt.
  • 6 ein Beispiel für Java-Bytecode für ein tryCatchFinally-Verfahren gemäß einer Ausführungsform zeigt, bei der try-catch-finally als einzelner Block behandelt wird.
  • 7 ein Beispiel für Java-Bytecode für ein tryCatchFinally-Verfahren gemäß einer Ausführungsform zeigt, bei der die try-catch-finally-Blöcke als separate Blöcke behandelt werden.
  • 8 ein Beispiel für Java-Bytecode für ein tryCatch-Verfahren gemäß einer Ausführungsform zeigt, bei der der try-catch-Block als einzelner Block behandelt wird.
  • 9 ein Beispiel für Java-Bytecode für ein tryFinally-Verfahren gemäß einer Ausführungsform zeigt, bei der der try-finally-Block als einzelner Block behandelt wird.
  • 10 ein Flussdiagramm zeigt, das ein Verfahren zur Bestimmung von Ausnahmebehandlungsinformationen gemäß einer Ausführungsform veranschaulicht.
  • 11 ein Flussdiagramm zeigt, das ein Verfahren zur computerimplementierten Erzeugung eines ausführbaren Programmcodes veranschaulicht.
  • 12 ein Flussdiagramm zeigt, das ein Verfahren zur Ausführung eines ausführbaren Programmcodes veranschaulicht.
  • 13 eine Vorrichtung zum Ausführen eines ausführbaren Programmcodes zeigt.
In the drawings, like reference characters generally refer to the same parts in the different views. The drawings are not necessarily to scale, since the focus instead is generally on clarifying the principles of the invention. In the following description, various aspects are described with reference to the following drawings, in which:
  • 1 shows a data processing system according to the various examples.
  • 2nd illustrates the generation of object code of the computer program.
  • 3rd shows a Java Virtual Machine.
  • 4th shows a Java program for a tryCatchFinally () method.
  • 5 shows an example of Java bytecode for a tryCatchFinally method.
  • 6 shows an example of Java bytecode for a tryCatchFinally method according to an embodiment in which try-catch-finally is treated as a single block.
  • 7 shows an example of Java bytecode for a tryCatchFinally method according to an embodiment in which the try-catch-finally blocks are treated as separate blocks.
  • 8th shows an example of Java bytecode for a tryCatch method according to an embodiment in which the try-catch block is treated as a single block.
  • 9 shows an example of Java bytecode for a tryFinally method according to an embodiment in which the try-finally block is treated as a single block.
  • 10th 10 shows a flow diagram illustrating a method for determining exception handling information according to an embodiment.
  • 11 FIG. 4 shows a flow diagram that illustrates a method for computer-implemented generation of executable program code.
  • 12th FIG. 4 shows a flow diagram illustrating a method for executing executable program code.
  • 13 shows an apparatus for executing executable program code.

Die folgende detaillierte Beschreibung bezieht sich auf die beigefügten Zeichnungen, die zur Veranschaulichung spezifische Details und Aspekte dieser Offenbarung zeigen, in denen die Erfindung ausgeübt werden kann. Andere Aspekte können verwendet werden, und strukturelle, logische und elektrische Änderungen können vorgenommen werden, ohne vom Umfang der Erfindung abzuweichen. Die verschiedenen Aspekte dieser Offenbarung schließen sich nicht notwendigerweise gegenseitig aus, da einige Aspekte dieser Offenbarung mit einem oder mehreren anderen Aspekten dieser Offenbarung kombiniert werden können, um neue Aspekte zu bilden.The following detailed description refers to the accompanying drawings that show, by way of illustration, specific details and aspects of this disclosure in which the invention may be practiced. Other aspects can be used and structural, logical and electrical changes can be made without departing from the scope of the invention. The various aspects of this disclosure are not necessarily mutually exclusive, as some aspects of this disclosure can be combined with one or more other aspects of this disclosure to form new aspects.

1 zeigt ein Datenverarbeitungssystem 100 gemäß den verschiedenen Beispielen. 1 shows a data processing system 100 according to the different examples.

Das Datenverarbeitungssystem 100 ist beispielsweise ein Computer, z. B. ein Personal Computer (Desktop oder Laptop), ein Servercomputer, eine tragbare Computervorrichtung (wie etwa ein Tablet oder ein Smartphone) oder auch eine Smartcard oder ein Steuergerät in einer größeren Vorrichtung (z. B. in einem Fahrzeug).The data processing system 100 is, for example, a computer, e.g. B. a personal computer (desktop or laptop), a server computer, a portable computing device (such as a tablet or a smartphone) or a smart card or a control device in a larger device (e.g. in a vehicle).

Das Datenverarbeitungssystem 100 enthält einen Hauptprozessor 101 (zentrale Verarbeitungseinheit, CPU), einen Hauptspeicher 102 (typischerweise ein Direktzugriffsspeicher, RAM), möglicherweise einen oder mehrere Koprozessoren 103, E/A-Vorrichtungen oder -Schnittstellen 104 und weitere Komponenten 105, wie etwa einen oder mehrere weitere Speicher (z. B. ein nichtflüchtiger Speicher, NVM), eine Festplatte, eine Grafikkarte, eine Anzeigevorrichtung etc. Die Komponenten 101 bis 105 sind über ein Computer-Bussystem 106 verbunden.The data processing system 100 contains a main processor 101 (central processing unit, CPU), a main memory 102 (typically a random access memory, RAM), possibly one or more coprocessors 103 , I / O devices or interfaces 104 and other components 105 , such as one or more additional memories (e.g. non-volatile memory, NVM), a hard disk, a graphics card, a display device, etc. The components 101 to 105 are on a computer bus system 106 connected.

Die CPU 101 kann Programmcode ausführen, der in ihrem Hauptspeicher 102 gespeichert ist.The CPU 101 can execute program code in its main memory 102 is saved.

Ausführbarer Programmcode wird normalerweise durch Kompilieren eines Computerprogramms generiert, das in einer Hochsprache, wie etwa Java (oder Java Card), C++ oder anderen .NET-Sprachen geschrieben ist. Das Computerprogramm kann kompiliert (oder interpretiert) werden, um Maschinencode oder Computerprogramm-Objektcode für eine Laufzeitumgebung, wie etwa eine Java Virtual Machine, zu bilden, die das Ausführen des Objektcodes ermöglicht.Executable program code is usually generated by compiling a computer program written in a high-level language, such as Java (or Java Card), C ++ or other .NET languages. The computer program can be compiled (or interpreted) to form machine code or computer program object code for a runtime environment, such as a Java virtual machine, that enables execution of the object code.

2 veranschaulicht die Erzeugung von Objektcode des Computerprogramms. 2nd illustrates the generation of object code of the computer program.

Ein Computerprogramm 201 ist in einer höheren Programmiersprache (z. B. Java) geschrieben und kann beispielsweise im Speicher 102 gespeichert sein.A computer program 201 is written in a higher programming language (e.g. Java) and can be stored in memory, for example 102 be saved.

Ein Compiler 202, der selbst ein Computerprogramm ist und beispielsweise von der CPU 101 ausgeführt werden kann, kompiliert das Computerprogramm 201 zu einem Computerprogramm-Objektcode 203. Der Computerprogramm-Objektcode 203 ist ein Java-Bytecode, der mittels einer Java Virtual Machine ausführbar ist, d. h. der aus Anweisungen für eine Java Virtual Machine besteht. Die Java Virtual Machine ist selbst ein Computerprogramm, das z. B. im Speicher 102 gespeichert ist und von der CPU 101 ausgeführt wird.A compiler 202 , which is itself a computer program and for example from the CPU 101 can be executed, the computer program compiles 201 to a computer program object code 203 . The computer program object code 203 is a Java bytecode that can be executed using a Java Virtual Machine, ie it consists of instructions for a Java Virtual Machine. The Java Virtual Machine is itself a computer program that e.g. B. in memory 102 is stored and by the CPU 101 is performed.

3 zeigt eine Java Virtual Machine 300. 3rd shows a Java Virtual Machine 300 .

Die Java Virtual Machine 300 enthält einen Klassenlader 301, einen Laufzeitdatenbereich 302 (z. B. im Speicher 102) und eine Ausführungsengine 303.The Java Virtual Machine 300 contains a class loader 301 , a runtime data area 302 (e.g. in memory 102 ) and an execution engine 303 .

Der Klassenlader stellt Funktionen zum Laden von Klassen, mit denen eine Klasse geladen, verknüpft und initialisiert wird, wenn zur Laufzeit (nicht zur Kompilierzeit) erstmals auf sie zugegriffen wird.). Als wichtigste Funktionen führt er das Laden, Verknüpfen und Initialisieren durch.The class loader provides functions for loading classes with which a class is loaded, linked and initialized when it is first accessed at runtime (not at compile time). The most important functions are loading, linking and initializing.

Der Laufzeitbereich 302 ist in 5 Hauptkomponenten unterteilt.

  1. 1. Verfahrensbereich: Speichert alle Daten auf Klassenebene, einschließlich statischer Variablen.
  2. 2. Heap-Bereich: Speichert die Objekte und die entsprechenden Instanzvariablen und Arrays.
  3. 3. Stapelbereich: Für jedes Programm, das von der Java Virtual Machine ausgeführt wird (d. h. jeder Thread), erstellt die Java Virtual Machine einen separaten Laufzeitstapel. Für jeden Verfahrensaufruf wird ein Eintrag in den Stapelspeicher vorgenommen, der als Stapelrahmen 304 bezeichnet wird. Alle lokalen Variablen werden im Stapelspeicher erzeugt. Ein Stapelrahmen ist in drei Unterelemente unterteilt:
    1. 1) Lokales Variablenarray: Die Werte lokaler Variablen werden hier gespeichert.
    2. 2) Operandenstapel: Dient als Laufzeitarbeitsbereich zum Ausführen von Operationen.
    3. 3) Rahmendaten: Speichert die dem Verfahren entsprechenden Symbole. Im Falle einer Ausnahme werden die catch-Blockinformationen in den Rahmendaten verwaltet.
  4. 4. PC-Register (Programmzähler): Jedes ausgeführte Programm verfügt über PC-Register, die die Adresse des aktuellen Ausführungsbefehls verwahren.
  5. 5. Native Verfahrensstapel: Verwahrt die nativen Verfahrensinformationen.
The runtime range 302 is divided into 5 main components.
  1. 1. Process area: Stores all data at class level, including static variables.
  2. 2. Heap area: Stores the objects and the corresponding instance variables and arrays.
  3. 3. Stack area: For each program that is executed by the Java Virtual Machine (ie each thread), the Java Virtual Machine creates a separate runtime stack. For each procedure call, an entry is made in the stack, which is called a stack frame 304 referred to as. All local variables are created in the stack. A stacking frame is divided into three sub-elements:
    1. 1) Local variable array: The values of local variables are saved here.
    2. 2) Operand stack: Serves as a runtime work area for performing operations.
    3. 3) Framework data: Stores the symbols corresponding to the procedure. In the event of an exception, the catch block information is managed in the framework data.
  4. 4. PC register (program counter): Each executed program has PC registers that keep the address of the current execution command.
  5. 5. Native procedural stack: Retains the native procedural information.

Die Java Virtual Machine 300 empfängt den Java-Bytecode 305 zur Ausführung. Die Java Virtual Machine 300 wird beispielsweise von der CPU 101 ausgeführt. Das Datenverarbeitungssystem 100 kann den Java-Bytecode 305 durch Kompilieren eines in Java (oder einer anderen Programmiersprache) geschriebenen Computerprogramms selbst erzeugen oder den Java-Code von einem anderen Computer empfangen, z. B. über eine seiner E/A-Schnittstellen 104 (z. B. eine Netzwerkverbindung).
Der Java-Bytecode 305 ist plattformunabhängig und kann von einer Java Virtual Machine ausgeführt werden, die auf einer beliebigen Datenverarbeitungsvorrichtung läuft.
The Java Virtual Machine 300 receives the Java bytecode 305 for execution. The Java Virtual Machine 300 is for example from the CPU 101 executed. The data processing system 100 can use the java bytecode 305 generate by compiling a computer program written in Java (or another programming language) or receive the Java code from another computer, e.g. B. via one of its I / O interfaces 104 (e.g. a network connection).
The Java bytecode 305 is platform independent and can be run from a Java Virtual Machine running on any computing device.

Bei der Ausführung von Computerprogrammen können Ausnahmen auftreten. Ein einfaches Beispiel ist, dass eine Variable, durch die eine andere Variable geteilt werden soll, null ist. Um eine solche Ausnahme zu behandeln, ist ein Ausnahmebehandlungsmechanismus für das Programm erforderlich.Exceptions can occur when running computer programs. A simple example is that a variable by which to divide another variable is null. To handle such an exception, an exception handling mechanism for the program is required.

4 zeigt ein Java-Programm 400 für ein tryCatchFinally()-Verfahren. 4th shows a Java program 400 for a tryCatchFinally () method.

Das Verfahren tryCatchFinally() beinhaltet das Ausführen eines try-Blocks (oder try-Codeblocks) durch einen Aufruf eines Verfahren processTry(). Das Verfahren processTry() kann eine Überprüfung bezüglich einer bestimmten Bedingung vornehmen und löst je nach Überprüfung möglicherweise eine Ausnahme aus. Beispielsweise löst processTry() eine Ausnahme aus, wenn eine bestimmte Variable null ist.The tryCatchFinally () procedure involves executing a try block (or try code block) by calling a procedure processTry (). The processTry () method can check for a specific condition and, depending on the check, may throw an exception. For example, processTry () throws an exception when a particular variable is null.

Die verschiedenen Ausnahmen, die von processTry ausgelöst werden können, werden von catch-Blöcken behandelt, die ein Verfahren processException() mit einem Argument aufrufen, das die Ausnahme angibt (in diesem Beispiel exc1, exc2 oder exc3).The various exceptions that can be raised by processTry are handled by catch blocks that call a processException () procedure with an argument that specifies the exception (exc1, exc2, or exc3 in this example).

Am Ende steht ein endgültiger Block, der in jedem Fall ausgeführt wird (d. h. unabhängig davon, ob eine Ausnahme vorliegt oder nicht), der beispielsweise Bereinigungsvorgänge durchführen kann, wie etwa die Freigabe zugewiesener Ressourcen.At the end there is a final block that is executed in any case (i.e. regardless of whether there is an exception or not) that, for example, can perform cleanup operations, such as releasing allocated resources.

Wie vorstehend erläutert, wird der Java-Programmteil 400, um mittels einer Java Virtual Machine ausgeführt werden zu können, von einem Compiler zu Java-Bytecode kompiliert.As explained above, the Java program part 400 compiled from a compiler to Java bytecode to run using a Java Virtual Machine.

5 zeigt ein Beispiel für Java-Bytecode 500 für ein tryCatchFinally-Verfahren. 5 shows an example of Java bytecode 500 for a tryCatchFinally procedure.

Der Java-Bytecode 500 enthält eine Vielzahl von Labels L0, L1 ... L12, die verschiedene Zeilen des Codes markieren. Der Code besteht hauptsächlich aus goto-Operationen, aload-Operationen zum Verschieben von in lokalen Variablen gespeicherten Adressen in den Operandenstapel, astore-Operationen zum Laden von Adressen aus dem Operandenstapel in lokale Variablen und Verfahrensaufrufen mittels der Anweisung invokevirtual: invokevirtual 152 ruft das Verfahren processTry() auf, invokevirtual 153 ruft das Verfahren processFinally() auf und invokevirtual 154 ruft das Verfahren processException() auf. Der Java-Bytecode für diese Verfahren wird in 5 nicht gezeigt (da deren Java-Code in 4 nicht gezeigt wird). Der Java-Bytecode 500 enthält kurz vor dem Ende ferner einen athrow, durch den er selbst eine Ausnahme oder einen Fehler auslösen kann.The Java bytecode 500 contains a variety of labels L0 , L1 ... L12 that mark different lines of code. The code mainly consists of goto operations, aload operations for moving addresses stored in local variables into the operand stack, astore operations for loading addresses from the operand stack into local variables and procedure calls using the invokevirtual: invokevirtual instruction 152 calls the processTry () procedure, invokevirtual 153 calls the processFinally () method and invokevirtual 154 calls the processException () procedure. The Java bytecode for these procedures is in 5 not shown (because their Java code in 4th is not shown). The Java bytecode 500 shortly before the end also contains an athrow, through which he himself can raise an exception or an error.

Am Ende enthält der Java-Bytecode 500 die Spezifikation einer Ausnahmehandlertabelle 501. Die Ausnahmehandlertabelle 501 enthält mehrere Zeilen, wobei jede Zeile vier Einträge aufweist, die den Anfang eines Blocks, das Ende des Blocks, die Behandlung einer in dem Block auftretenden Ausnahme durch den Block und einen catch-Typindex spezifizieren. Beispielsweise springt die Ausführung im Fall einer Ausnahme in dem Block zwischen L0 und L1 (d. h. in dem ersten aload und dem invokevirtual 152) zu L2, um die Ausnahme zu verarbeiten. Der catch-Index für diese Ausnahme ist 149.
Die Behandlung von Programmausnahmen durch einen Ausnahmebehandlungsmechanismus des Programms verursacht einen Ausführungsmehraufwand. Wenn im Beispiel des Java-Bytecodes 500 während seiner Ausführung beispielsweise eine Ausnahme ausgelöst wird, sucht die Laufzeitengine (d. h. die Java Virtual Machine) die aktuelle Anweisungsposition in der Ausnahmehandlertabelle 501 (nach Verfahren oder Thread) und bestimmt den Ausnahmehandler und ergreift Maßnahmen gemäß den Informationen im Handler. Diese Vorgehensweise ist normalerweise mit drei Quellen der Ineffizienz behaftet:

  • • Die zum Verarbeiten von Ausnahmen benötigte Zeit.
  • • Der von der Ausnahmehandlertabelle im Speicher belegte Speicherplatz.
  • • Einige Codeoptimierungen, die ansonsten durchgeführt würden, müssen möglicherweise eingeschränkt oder vollständig unterdrückt werden, um die Zuordnung der Tabelle zu Befehlsbereichen aufrechtzuerhalten.
At the end contains the Java bytecode 500 the specification of an exception handler table 501 . The exception handler table 501 contains several lines, each line having four entries specifying the beginning of a block, the end of the block, the handling of an exception in the block and a catch type index. For example, in the event of an exception, execution jumps in the block L0 and L1 (ie in the first aload and invokevirtual 152 ) too L2 to process the exception. The catch index for this exception is 149 .
Handling program exceptions through an exception handling mechanism of the program causes additional execution effort. If in the example of the Java bytecode 500 For example, when an exception is thrown while it is running, the runtime engine (that is, the Java Virtual Machine) looks for the current statement position in the exception handler table 501 (by procedure or thread) and determines the exception handler and takes action according to the information in the handler. This approach is usually fraught with three sources of inefficiency:
  • • The time it takes to process exceptions.
  • • The amount of memory used by the exception handler table.
  • • Some code optimizations that would otherwise be performed may need to be restricted or completely suppressed in order to maintain the mapping of the table to command areas.

In einigen Implementierungen von Programmiersprachen wurden verschiedene Schemata für Ausnahmebehandlungsmechanismen umgesetzt, wie etwa Ada und Eiffel, setjpm/longjmp in Smalltalk und C++ und Metaprogrammierung für die Ausnahmebehandlung in einigen Programmiersprachen, aber diese Ansätze weisen ebenfalls Schwächen auf (beispielsweise den Ausführungsmehraufwand für entry und exit von Rahmen).In some programming language implementations, various schemes for exception handling mechanisms have been implemented, such as Ada and Eiffel, setjpm / longjmp in Smalltalk and C ++, and metaprogramming for exception handling in some programming languages, but these approaches also have weaknesses (such as the additional overhead for entry and exit of Frame).

Im Folgenden werden Ausführungsformen beschrieben, die eine Ausnahmebehandlungsimplementierung enthalten, die es ermöglicht, einen verringerten Mehraufwand im Vergleich zu einer wie in 5 dargestellten Ausnahmebehandlungsimplementierung zu erreichen.
In verschiedenen Ausführungsformen lässt sich die Implementierung der Ausnahmebehandlung so sehen, dass try-catch-finally-Blöcke als die kleinste Einheit für die Ausnahmebehandlung betrachtet werden. Folglich werden gemäß verschiedenen Ausführungsformen Ausnahmehandler (nur) zu einem Teil dieser Blöcke gemacht. In diesem Zusammenhang kann try-catch-finally als drei kleinere Einheiten betrachtet werden. Alternativ können try-catch und try-catch-finally als zwei separate kleinste Einheiten betrachtet werden. Zusätzliche Anweisungen für den ausführbaren Programmcode (z. B. Java-Bytecode) können in dem Befehlssatz (z. B. einer Java Virtual Machine) enthalten sein, um die Implementierung der Ausnahmebehandlung zu unterstützen.
In the following, embodiments are described which contain an exception handling implementation which makes it possible to reduce the additional outlay in comparison with one as in FIG 5 to achieve the exception handling implementation shown.
In various embodiments, the implementation of exception handling can be seen so that try-catch-finally blocks are considered the smallest unit for exception handling. Accordingly, exception handlers are made part of these blocks according to various embodiments. In this context try-catch-finally can be seen as three smaller units. Alternatively, try-catch and try-catch-finally can be viewed as two separate smallest units. Additional instructions for the executable code (e.g., Java bytecode) may be included in the instruction set (e.g., a Java virtual machine) to help implement exception handling.

Als ein beispielhaftes Ausführungsbeispiel erzeugt ein Compiler 202 eine tryCatchFinally-Anweisung (hinzugefügt zu dem Befehlssatz), die Ausnahmebehandlungsinformationen am Anfang eines try-catch-finally-Blocks enthält (d. h. eines Blocks mit Java-Bytecode-Anweisungen zum Implementieren eines try-catch-finally-Konstrukts wie unter Bezugnahme auf 4 beschrieben).As an exemplary embodiment, a compiler generates 202 a tryCatchFinally statement (added to the instruction set) that contains exception handling information at the beginning of a try-catch-finally block (that is, a block with Java bytecode instructions for implementing a try-catch-finally construct, as with reference to 4th described).

Wenn die Java Virtual Machine 300 am Anfang der Ausführung des try-catch-finally-Blocks auf die Anweisung stößt, der die Ausnahmebehandlungsinformationen enthält, verschiebt sie die Ausnahmebehandlungsinformationen auf den Stapelrahmen des aktuell ausgeführten Verfahrens.If the Java Virtual Machine 300 at the start of the try-catch-finally block, if the statement that contains the exception handling information is encountered, it moves the exception handling information to the stack frame of the currently executing procedure.

Die Informationen zur Ausnahmebehandlung können beispielsweise eines oder mehrere der Folgenden enthalten:

  • • die Adresse der tryCatchFinally-Anweisung (im ausführbaren Code);
  • • die Endadresse des try-Blocks;
  • • die Endadresse des letzten catch-Blocks.
6 zeigt ein Beispiel für Java-Bytecode 600 für ein tryCatchFinally-Verfahren gemäß einer Ausführungsform, bei der try-catch-finally als einzelner Block behandelt wird.For example, the exception handling information may include one or more of the following:
  • • the address of the tryCatchFinally statement (in the executable code);
  • • the end address of the try block;
  • • the end address of the last catch block.
6 shows an example of Java bytecode 600 for a tryCatchFinally method according to an embodiment in which try-catch-finally is treated as a single block.

Ähnlich wie in dem Beispiel von 5 enthält der Java-Bytecode 600 eine Vielzahl von Labels L0, L1 ... L6, goto-Operationen, aload-Operationen, astore-Operationen, eine Anweisung athrow und Aufrufe von Verfahren mittels invokevirtual, die an (den Java-Bytecode für) processTry(), processFinally() und processException() gerichtet sind.Similar to the example of 5 contains the Java bytecode 600 a variety of labels L0 , L1 ... L6 , goto operations, aload operations, astore operations, an athrow statement, and invokevirtual invocations that are directed to (the Java bytecode for) processTry (), processFinally (), and processException ().

Im Gegensatz zu dem Java-Bytecode von 5 enthält der Java-Bytecode 600 keine Ausnahmehandlertabelle, sondern enthält stattdessen eine tryCatchFinally-Anweisung 601, die die Ausnahmebehandlungsinformationen angibt.In contrast to the Java bytecode from 5 contains the Java bytecode 600 not an exception handler table, but instead contains a tryCatchFinally statement 601 that specifies the exception handling information.

Als Ausnahmebehandlungsinformationen spezifiziert die tryCatchFinally-Anweisung 601 das Ende des try-Blocks (L1), die Anzahl der catch- und finally-Blöcke (4), den catch-Typindex und den Anfang des ersten catch-Blocks (149, L1), den catch-Typindex und Anfang des zweiten catch-Blocks (150, L2), den catch-Typindex und Anfang des dritten catch-Blocks (151, L3) und den catch-Typindex und Anfang des finally-Blocks für jeden catch-Block (0, L4, L4, L4).The tryCatchFinally statement specifies the exception handling information 601 the end of the try block ( L1 ), the number of catch and finally blocks (4), the catch type index and the start of the first catch block ( 149 , L1 ), the catch type index and the beginning of the second catch block ( 150 , L2 ), the catch type index and the beginning of the third catch block ( 151 , L3) and the catch type index and start of the finally block for each catch block (0, L4 , L4 , L4 ).

7 zeigt ein Beispiel für Java-Bytecode 700 für ein tryCatchFinally-Verfahren gemäß einer Ausführungsform, bei der die try-catch-finally-Blöcke als separate Blöcke behandelt werden. 7 shows an example of Java bytecode 700 for a tryCatchFinally method according to an embodiment in which the try-catch-finally blocks are treated as separate blocks.

Ähnlich wie in dem Beispiel von 6 enthält der Java-Bytecode 700 eine Vielzahl von Labels L0, L1 ... L6, goto-Operationen, aload-Operationen, astore-Operationen, eine Anweisung athrow und Aufrufe von Verfahren mittels invokevirtual, die an (den Java-Bytecode für) processTry(), processFinally() und processException() gerichtet sind.Similar to the example of 6 contains the Java bytecode 700 a variety of labels L0 , L1 ... L6 , goto operations, aload operations, astore operations, an athrow statement, and invokevirtual invocations that are directed to (the Java bytecode for) processTry (), processFinally (), and processException ().

Im Gegensatz zu dem Java-Bytecode von 6 verwendet der Compiler keine tryCatchFinally-Anweisung zum Spezifizieren von Ausnahmebehandlungsinformationen, sondern enthält eine tryInfo-Anweisung 701 und die catchInfo-Anweisungen 702, 703, 704 (die dem Java Virtual Machine-Befehlssatz hinzugefügt werden), die die Ausnahmebehandlungsinformationen spezifizieren.In contrast to the Java bytecode from 6 the compiler does not use a tryCatchFinally statement to specify exception handling information, but contains a tryInfo statement 701 and the catchInfo statements 702 , 703 , 704 (which are added to the Java Virtual Machine instruction set) that specify the exception handling information.

Als Ausnahmebehandlungsinformationen spezifiziert die tryInfo-Anweisung das Ende des try-Blocks (L1), die Anzahl der catch- und finally-Blöcke (4), den catch-Typindex und den Anfang des ersten catch-Blocks (149, L1), den catch-Typindex und Anfang des zweiten catch-Blocks (150, L2), den catch-Typindex und Anfang des dritten catch-Blocks (151, L3) und den catch-Typindex und Anfang des finally-Blocks (0, L4).The tryInfo statement specifies the end of the try block ( L1 ), the number of catch and finally blocks (4), the catch type index and the start of the first catch block ( 149 , L1 ), the catch type index and the beginning of the second catch block ( 150 , L2 ), the catch type index and the beginning of the third catch block ( 151 , L3) and the catch type index and beginning of the finally block (0, L4 ).

Die catchInfo-Anweisung 702 des ersten catch-Blocks spezifiziert das Ende des ersten catch-Blocks (L2) und den Anfang des finally-Blocks (L4).The catchInfo statement 702 of the first catch block specifies the end of the first catch block ( L2 ) and the beginning of the finally block ( L4 ).

Die catchInfo-Anweisung 703 des zweiten catch-Blocks spezifiziert das Ende des zweiten catch-Blocks (L3) und den Anfang des finally-Blocks (L4).The catchInfo statement 703 of the second catch block specifies the end of the second catch block ( L3) and the beginning of the finally block ( L4 ).

Die catchInfo-Anweisung 704 des dritten catch-Blocks spezifiziert das Ende des dritten catch-Blocks (L4) und den Anfang des finally-Blocks für den Ausnahmefall in dem dritten catch-Block (L4).
8 zeigt ein Beispiel für Java-Bytecode 800 für ein tryCatch-Verfahren gemäß einer Ausführungsform, bei der der try-catch-Block als einzelner Block behandelt wird.
The catchInfo statement 704 of the third catch block specifies the end of the third catch block ( L4 ) and the beginning of the finally block for the exception in the third catch block ( L4 ).
8th shows an example of Java bytecode 800 for a tryCatch method according to an embodiment in which the try-catch block is treated as a single block.

Ähnlich wie in dem Beispiel von 5 enthält der Java-Bytecode 800 eine Vielzahl von Labels L0, L1 ... L4, goto-Operationen, aload-Operationen, astore-Operationen und Aufrufe von Verfahren mittels invokevirtual, die an (den Java-Bytecode für) processTry() und processException() gerichtet sind.Similar to the example of 5 contains the Java bytecode 800 a variety of labels L0 , L1 ... L4 , goto operations, aload operations, astore operations, and invocevirtual invocations that are directed to (the Java bytecode for) processTry () and processException ().

Das Beispiel in 8 ähnelt dem Beispiel in 6, es gibt jedoch keinen finally-Block. Er kann beispielsweise durch Kompilieren eines Computerprogrammcodes ähnlich wie in 4 erzeugt werden, jedoch ohne den Aufruf von processFinally.The example in 8th is similar to the example in 6 , however, there is no finally block. For example, it can be compiled by computer program code similar to that in 4th generated, but without calling processFinally.

Ähnlich wie in dem Beispiel von 6 werden Ausnahmebehandlungsinformationen durch eine Anweisung 801 spezifiziert, die zum Befehlssatz der Java Virtual Machine hinzugefügt wurde und in diesem Beispiel tryCatch heißt.Similar to the example of 6 become exception handling information through a statement 801 specified that has been added to the Java Virtual Machine instruction set and is called tryCatch in this example.

Als Ausnahmebehandlungsinformationen spezifiziert die tryCatch-Anweisung 801 das Ende des try-Blocks (L1), die Anzahl der catch-Blöcke (3), den catch-Typindex und den Anfang des ersten catch-Blocks (149, L1), den catch-Typindex und den Anfang des zweiten catch-Blocks (150, L2) und den catch-Typindex und den Anfang des dritten catch-Blocks (151, L3).The tryCatch statement specifies the exception handling information 801 the end of the try block ( L1 ), the number of catch blocks (3), the catch type index and the start of the first catch block ( 149 , L1 ), the catch type index and the beginning of the second catch block ( 150 , L2 ) and the catch type index and the beginning of the third catch block ( 151 , L3) .

9 zeigt ein Beispiel für Java-Bytecode 900 für ein tryFinally-Verfahren gemäß einer Ausführungsform, bei der der try-finally-Block als einzelner Block behandelt wird. 9 shows an example of Java bytecode 900 for a tryFinally method according to an embodiment in which the try-finally block is treated as a single block.

Ähnlich wie in dem Beispiel von 5 enthält der Java-Bytecode 900 eine Vielzahl von Labels L0, L1 ... L3, goto-Operationen, aload-Operationen, eine athrow-Operation und Aufrufe von Verfahren mittels invokevirtual, die an (den Java-Bytecode für) processTry() und processFinally() gerichtet sind.Similar to the example of 5 contains the Java bytecode 900 a variety of labels L0 , L1 ... L3 , goto operations, aload operations, an athrow operation and invokevirtual invocations that are directed to (the Java bytecode for) processTry () and processFinally ().

Das Beispiel in 9 ähnelt dem Beispiel in 6, es gibt jedoch keinen catch-Block. Er kann beispielsweise durch Kompilieren eines Computerprogrammcodes ähnlich wie in 4 erzeugt werden, jedoch ohne den Aufruf von processException.The example in 9 is similar to the example in 6 , but there is no catch block. For example, it can be compiled by computer program code similar to that in 4th generated, but without calling processException.

Ähnlich wie in dem Beispiel von 6 werden Ausnahmebehandlungsinformationen durch eine Anweisung 901 spezifiziert, die zum Befehlssatz der Java Virtual Machine hinzugefügt wurde und in diesem Beispiel tryFinally heißt.Similar to the example of 6 become exception handling information through a statement 901 specified, which was added to the instruction set of the Java Virtual Machine and in this example is called tryFinally.

Als Ausnahmebehandlungsinformation spezifiziert der tryFinally-Befehl 901 das Ende des try-Blocks (L1), den Anfang des finally-Blocks mit Ausnahme in dem try-Block (L1) und den Anfang des finally-Blocks ohne Ausnahme in dem try-Block (L2).The tryFinally command specifies the exception handling information 901 the end of the try block ( L1 ), the beginning of the finally block except in the try block ( L1 ) and the beginning of the finally block without exception in the try block ( L2 ).

Es ist zu beachten, dass tryCatchFinally() mehrere try-catch-finally-Blöcke enthalten kann. In einem solchen Fall würde sich beispielsweise unter Annahme eines zweiten try-catch-finally-Blocks in 4 mit drei catch-Blöcken der Java-Bytecode des Beispiels von 5 auch verdoppeln (und würde z. B. die Labels L0 bis L23 aufweisen), und die Ausnahmetabelle 501 würde sich entsprechend verdoppeln.Note that tryCatchFinally () can contain multiple try-catch-finally blocks. In such a case, assuming a second try-catch-finally block would be in 4th with three catch blocks the Java bytecode of the example from 5 also double (and would e.g. the labels L0 to L23 ) and the exception table 501 would double accordingly.

Bei dem Ansatz von 6 gäbe es auch zwei try-catch-finally-Blöcke anstelle von einem (z. B. mit den Labels L0 bis L12). Jeder try-catch-finally-Block hätte gemäß einer Ausführungsform eine eigene tryCatchFinally-Anweisung, die die Ausnahmebehandlungsinformationen spezifiziert. Die erste tryCatchFinally-Anweisung wäre beispielsweise ähnlich wie die tryCatchFinally-Anweisung 601 von 6, während die tryCatchFinally-Anweisung für den zweiten try-catch-finally-Block ähnlich wäre, sich jedoch auf die Labels L7 bis L10 anstelle von L1 bis L4 beziehen würde.With the approach of 6 there would also be two try-catch-finally blocks instead of one (e.g. with the labels L0 to L12 ). In one embodiment, each try-catch-finally block would have its own tryCatchFinally statement that specifies the exception handling information. For example, the first tryCatchFinally statement would be similar to the tryCatchFinally statement 601 from 6 , while the tryCatchFinally statement for the second try-catch-finally block would be similar, but would refer to the labels L7 to L10 instead of L1 to L4 would relate.

Dies wäre für den Ansatz von 7 ähnlich, wobei jeder catch-Block zusätzlich eine eigene catchInfo-Anweisung aufweisen würde. Die catchInfo-Anweisungen des zweiten try-catch-finally-Blocks wären ähnlich wie die catchInfo-Anweisungen des ersten try-catch-finally-Blocks, würden sich jedoch auf die nachfolgenden Labels beziehen (die sich aus der Verdoppelung des Codes ergeben).This would be for the approach of 7 similar, with each catch block also having its own catchInfo statement. The catchInfo statements of the second try-catch-finally block would be similar to the catchInfo statements of the first try-catch-finally block, but would refer to the subsequent labels (which result from doubling the code).

Die Anweisungen, die Ausnahmebehandlungsinformationen angeben, d. h. tryCatchFinally, tryInfo, catchInfo und tryCatch in den vorstehenden Beispielen, werden auch als Ausnahmeinformationsanweisungen bezeichnet. Es ist ferner zu beachten, dass die Anweisungen tryCatchFinally, tryInfo, catchInfo und tryCatch auch andere Formen aufweisen können.The instructions that provide exception handling information, i. H. tryCatchFinally, tryInfo, catchInfo, and tryCatch in the examples above are also referred to as exception information statements. Note also that the tryCatchFinally, tryInfo, catchInfo, and tryCatch statements can take other forms.

Beispielsweise könnte tryCatchFinally in 6 auch die Form
tryCatchFinally L1 3 149 L1 150 L2 151 L3 L4
aufweisen und somit die Anzahl der catch-Blöcke (3, zweiter Wert) und den Anfang des finally-Blocks (4, letzter Wert) angeben, ohne den catch-Wert für finally anzugeben, der implizit als 0 angenommen werden kann.
For example, tryCatchFinally in 6 also the shape
tryCatchFinally L1 3rd 149 L1 150 L2 151 L3 L4
and thus specify the number of catch blocks (3, second value) and the start of the finally block (4, last value) without specifying the catch value for finally, which can be implicitly assumed to be 0.

Analog kann auch die tryInfo-Anweisung von 7 die Form
trylnfo L1 3 149 L1 150 L2 151 L3 L4 aufweisen.
The tryInfo statement from 7 form
trylnfo L1 3rd 149 L1 150 L2 151 L3 L4 exhibit.

Darüber hinaus kann die Ausnahmeinformation in Form einer Tabelle (z. B. einen Teil einer Ausnahmehandlertabelle 501) anstelle von Ausnahmeinformationsanweisungen enthalten sein. Die Tabelle würde jedoch wie die Ausnahmeinformationsanweisungen nicht am Ende, sondern am Anfang des Objektcodes des jeweiligen Verfahrens bereitgestellt.In addition, the exception information can be in the form of a table (e.g. part of an exception handler table 501 ) instead of exception information statements. However, like the exception information statements, the table would not be provided at the end but at the beginning of the object code of the respective method.

Wie vorstehend beschrieben, ordnet der Compiler 202 gemäß verschiedenen Ausführungsformen die Ausnahmebehandlungsinformationen innerhalb des Java-Bytecodes 305 an (im Allgemeinen innerhalb des Anwendungsprogrammcodes). Beispielsweise enthält der Compiler Ausnahmebehandlungsinformationen am Anfang von try-catch-finally-Blöcken, try-catch-Blöcken und try-finally-Blöcken, wie in den 6 bis 9 dargestellt, oder auch in try-catch-finally-Blöcken mithilfe von catchInfo-Anweisungen wie in 7 dargestellt (dies kann analog für try-catch-Blöcke erfolgen).As described above, the compiler orders 202 according to various embodiments, the exception handling information within the Java byte code 305 (generally within the application program code). For example, the compiler includes exception handling information at the beginning of try-catch-finally blocks, try-catch blocks, and try-finally blocks, as in the 6 to 9 shown, or in try-catch-finally blocks using catchInfo statements as in 7 shown (this can be done analogously for try-catch blocks).

Wenn die Java Virtual Machine 300 den Java-Bytecode 305 mit auf diese Weise enthaltenen Ausnahmebehandlungsinformationen ausführt, verschiebt die Java Virtual Machine 300 die Ausnahmebehandlungsinformationen jeder Ausnahmeinformationsanweisung, die sie findet (oder zumindest einen Versatz der Ausnahmeinformationsanweisung), in einen Stapel des Stapelrahmens 304 (z. B. einen Ausnahmeinformationsstapel) des Verfahrens, zu dem die Ausnahmebehandlungsinformationen gehören.If the Java Virtual Machine 300 the Java bytecode 305 executes with exception handling information contained in this way, the Java virtual machine moves 300 the exception handling information of each exception information statement it finds (or at least an offset of the exception information statement) into a stack of the stack frame 304 (e.g. one Exception information stack) of the method to which the exception handling information belongs.

Wenn während der Ausführung des Java-Bytecodes eine Ausnahme ausgelöst wird, ruft die Java Virtual Machine 300 die entsprechenden Ausnahmeinformationen ab, indem sie den Ausnahmeinformationsstapel durchsucht, wie in 10 dargestellt.If an exception is thrown while the Java bytecode is executing, the Java Virtual Machine calls 300 the appropriate exception information by searching the stack of exception information, as in 10th shown.

10 zeigt ein Flussdiagramm 1000, das ein Verfahren zur Bestimmung von Ausnahmebehandlungsinformationen gemäß einer Ausführungsform darstellt. 10th shows a flow chart 1000 13 illustrates a method of determining exception handling information according to one embodiment.

In 1001 untersucht die Java Virtual Machine 300 den Stapelbereich des Laufzeitdatenbereichs 302 und ruft die Ausnahmeinformationen aus dem Stapelrahmen des aktuellen Verfahrens 304 ab (z. B. aus einem Ausnahmeinformationsstapel des Stapelrahmens 304). Wenn sie Ausnahmeinformationen findet, ruft sie die Ausnahmeinformationen aus dem Ausnahmeinformationsstapel ab.In 1001 examines the Java Virtual Machine 300 the batch area of the runtime data area 302 and retrieves the exception information from the stack frame of the current procedure 304 from (e.g. from an exception information stack of the stack frame 304 ). If it finds exception information, it retrieves the exception information from the exception information stack.

In 1002 durchsucht die Java Virtual Machine die Stapelausnahmeinformationen nach einem geeigneten Ausnahmehandler (d. h. einem Ausnahmehandler, der mit der Ausnahme übereinstimmt).In 1002 the Java Virtual Machine searches the batch exception information for a suitable exception handler (that is, an exception handler that matches the exception).

Wenn sie keinen geeigneten Ausnahmehandler findet und der Ausnahmeinformationsstapel nicht leer ist, setzt sie die Suche in 1001 fort (d. h. der Ausnahmeinformationsstapel wird weiter nach unten durchsucht).If it does not find a suitable exception handler and the stack of exception information is not empty, it sets the search in 1001 continued (that is, the exception information stack is searched further down).

Wenn sie keinen geeigneten Ausnahmehandler findet und der Ausnahmeinformationsstapel leer ist, sendet sie in 1003 eine Standardsystemausnahme.If it does not find a suitable exception handler and the exception information stack is empty, it sends in 1003 a standard system exception.

Wenn sie einen geeigneten Ausnahmehandler (der mit der Ausnahme übereinstimmt) in den Ausnahmeinformationen findet, führt sie den Ausnahmehandler aus, der durch die Ausnahmeinformationen in 1004 spezifiziert wurde.If it finds a suitable exception handler (that matches the exception) in the exception information, it executes the exception handler that goes through the exception information in 1004 was specified.

Insgesamt werden gemäß verschiedenen Ausführungsformen Verfahren bereitgestellt, wie sie in den 11 und 12 veranschaulicht sind.Overall, according to various embodiments, methods are provided as are shown in FIGS 11 and 12th are illustrated.

11 zeigt ein Flussdiagramm 1100, das ein Verfahren zur computerimplementierten Erzeugung eines ausführbaren Programmcodes veranschaulicht. 11 shows a flow chart 1100 illustrating a method for computer-implemented generation of executable program code.

In 1101 wird ein Anwendungsprogrammcode erzeugt.In 1101 an application program code is generated.

In 1102 wird ein Ausnahmebehandlungsprogrammcode einschließlich Ausnahmebehandlungsinformationen in Bezug auf den Anwendungsprogrammcode erzeugt.In 1102 exception handling program code including exception handling information related to the application program code is generated.

In 1103 wird mindestens einen Abschnitt der Ausnahmebehandlungsinformationen am Anfang oder innerhalb des Anwendungsprogrammcodes angeordnet, wodurch der ausführbare Programmcode erzeugt wird.In 1103 at least a portion of the exception handling information is placed at the beginning or within the application program code, thereby generating the executable program code.

12 zeigt ein Flussdiagramm 1200, das ein Verfahren zur Ausführung eines ausführbaren Programmcodes veranschaulicht. 12th shows a flow chart 1200 illustrating a method of executing executable code.

Der ausführbare Programmcode enthält Anwendungsprogrammcode und Ausnahmebehandlungsprogrammcode einschließlich Ausnahmebehandlungsinformationen, die sich auf den Anwendungsprogrammcode beziehen, wobei mindestens ein Abschnitt der Ausnahmebehandlungsinformationen am Anfang oder innerhalb des Anwendungsprogrammcodes angeordnet ist.The executable program code includes application program code and exception handling program code including exception handling information related to the application program code, with at least a portion of the exception handling information located at the beginning or within the application program code.

In 1201 wird der ausführbare Programmcode ausgeführt.In 1201 the executable program code is executed.

In 1202 wird eine Anweisung des auszuführenden ausführbaren Programmcodes bestimmt, die Teil des Abschnitts der Ausnahmebehandlungsinformationen ist.In 1202 an instruction of the executable program code to be executed is determined, which is part of the section of the exception handling information.

In 1203 wird ein Ausnahmebehandlungsprozess gemäß der bestimmten Anweisung durchgeführt, die Teil des Abschnitts der Ausnahmebehandlungsinformationen ist.In 1203 an exception handling process is performed in accordance with the particular instruction that is part of the exception handling information section.

Anders ausgedrückt: Gemäß verschiedenen Ausführungsformen sind Ausnahmebehandlungsinformationen, wie etwa die Position des Ausnahmebehandlungscodes oder ein catch-Typindex, in dem Anwendungsprogrammcode enthalten, z. B. durch Anweisungen, die dem Befehlssatz hinzugefügt und für diesen Zweck reserviert wurden. Dieser Ansatz kann beispielsweise anstatt der Ausnahmebehandlungsinformationen am Ende (d. h. nach dem Anwendungsprogrammcode) mittels einer Ausnahmehandlertabelle verwendet werden. Die Anordnung der Ausnahmebehandlungsinformationen am Anfang oder innerhalb des Anwendungsprogrammcodes kann von einem Compiler durchgeführt werden, der den ausführbaren Programmcode erzeugt, kann jedoch auch von einem Postprozessor (oder Postcompiler) durchgeführt werden, der die Ausnahmebehandlungsinformationen neu in ausführbaren Programmcode anordnet.In other words, according to various embodiments, exception handling information, such as the location of the exception handling code or a catch type index, is included in the application program code, e.g. B. by instructions added to the instruction set and reserved for that purpose. For example, this approach can be used instead of the exception handling information at the end (i.e., after the application program code) using an exception handler table. The arrangement of the exception handling information at the beginning or within the application program code can be done by a compiler that generates the executable program code, but can also be done by a post processor (or post compiler) that rearranges the exception handling information into executable program code.

Der Ansatz der 11 und 12 ermöglicht es, Laufzeitmehraufwand in Implementierungen des Ausnahmebehandlungsmechanismus zu verringern und somit die Leistung des gesamten Datenverarbeitungssystems (Ausführung des ausführbaren Programmcodes) zu erhöhen. Anstatt beispielsweise den Blockstartversatz, den Blockendversatz, den Handlertyp und den Handlerversatz (4 Zyklen) basierend auf einer Ausnahmehandlertabelle zu bestimmen, kann der Ansatz der 11 und 12 das Auffinden eines Ausnahmehandlers durch direktes Bestimmen des Handlertyps und des Handlerversatzes (2 Zyklen) ermöglichen.The approach of 11 and 12th makes it possible to reduce additional running time in implementations of the exception handling mechanism and thus the performance of the entire data processing system (execution of the executable program codes). Instead of, for example, determining the block start offset, the block end offset, the handler type and the handler offset (4 cycles) based on an exception handler table, the approach of 11 and 12th enable you to find an exception handler by directly determining the handler type and handler offset (2 cycles).

Darüber hinaus kann die Größe von Bereichstabellen reduziert werden, die in Implementierungen eines Ausnahmebehandlungsmechanismus verwendet werden. Der Ansatz der 11 und 12 kann mit minimaler Auswirkung auf den Fluss des Anwendungsprogrammcodes implementiert werden. Durch das Vermeiden der Notwendigkeit einer Ausnahmehandlertabelle können ebenfalls Optimierungsprobleme aufgrund der Ausnahmehandlertabelle (wie etwa das Anpassen von Sprungversätzen) vermieden werden.In addition, the size of range tables used in implementations of an exception handling mechanism can be reduced. The approach of 11 and 12th can be implemented with minimal impact on the flow of application program code. By avoiding the need for an exception handler table, optimization problems due to the exception handler table (such as adjusting jump offsets) can also be avoided.

Der Anwendungsprogrammcode kann beispielsweise einen oder mehrere Aufrufe eines try-Verfahrens (d. h. einen try-Block) wie auch Aufrufe von Prozessausnahmeverfahren (d. h. catch-Blöcke) und einen Aufruf eines processFinally-Verfahrens (d. h. einen finally-Block) enthalten. Der Ausnahmebehandlungsprogrammcode kann beispielsweise einer Spezifikation der Ausnahmebehandlungsinformationen entsprechen, wie etwa den Ausnahmeinformationsanweisungen, wie in den vorstehenden Beispielen der 6 bis 9 beschrieben, einschließlich der Ausnahmebehandlungsinformationen. Der Anwendungsprogrammcode und der Ausnahmebehandlungsprogrammcode können Teil desselben Verfahrens sein, z. B. Teil desselben tryCatchFinally-Verfahrens, tryCatch-Verfahrens oder tryFinally- Verfahrens.For example, the application program code can include one or more calls to a try procedure (ie, a try block) as well as calls to process exception procedures (ie catch blocks) and one call to a processFinally procedure (ie a finally block). For example, the exception handling program code may correspond to a specification of the exception handling information, such as the exception information instructions, as in the previous examples of FIG 6 to 9 described, including exception handling information. The application program code and the exception handling program code can be part of the same method, e.g. B. Part of the same tryCatchFinally method, tryCatch method or tryFinally method.

Eine finally-Klausel kann in Form von einem oder zwei Kopien des Bytecodes (z. B. Java-Bytecode) enthalten sein.A finally clause can be in the form of one or two copies of the bytecode (e.g. Java bytecode).

Der Ausnahmebehandlungsprogrammcode und/oder der Anwendungsprogrammcode können Objektcode (wie etwa Java-Bytecode) enthalten, z. B. kompiliert aus Java-Programmcode oder Java Card-Programmcode.The exception handler code and / or the application program code may include object code (such as Java byte code), e.g. B. compiled from Java program code or Java Card program code.

Der Abschnitt der Ausnahmebehandlungsinformationen kann am Anfang oder innerhalb des Anwendungsprogrammcodes während des Erzeugens des Anwendungsprogrammcodes angeordnet werden. Der Abschnitt der Ausnahmebehandlungsinformationen kann auch am Anfang oder innerhalb des Anwendungsprogrammcodes nach dem Erzeugen des Anwendungsprogrammcodes angeordnet werden.The section of exception handling information may be placed at the beginning or within the application program code during the generation of the application program code. The section of exception handling information can also be placed at the beginning or within the application program code after the application program code has been generated.

Der Ausnahmebehandlungsprogrammcode kann beispielsweise einen try-catch- oder einen try-catch-finally-Programmblock enthalten.
Das in 12 veranschaulichte Verfahren kann ferner das Bewegen von mindestens einem Abschnitt der bestimmten Anweisung in einen Speicherstapel (oder einen anderen, z. B. dedizierten, Speicherbereich), wenn während des Ausführens des ausführbaren Programmcodes eine Ausnahme ausgelöst wird, und das Laden eines Abschnitts einer entsprechenden Anweisung aus dem Speicherstapel und das Durchführen eines Ausnahmebehandlungsprozesses gemäß dem Abschnitt der entsprechenden Anweisung, die aus dem Speicherstapel geladen wurde, beinhalten.
For example, the exception handling program code can include a try-catch or try-catch-finally program block.
This in 12th The illustrated method may further include moving at least a portion of the particular instruction into a memory stack (or other, e.g., dedicated, memory area) if an exception is thrown while executing the executable code and loading a portion of an appropriate instruction from the memory stack and performing an exception handling process according to the section of the corresponding instruction loaded from the memory stack.

Falls eine Ausnahme ausgelöst wird und keine entsprechende Anweisung in dem Speicherstapel gefunden wird, kann ein Standardsystemausnahmesignal erzeugt werden.If an exception is raised and no corresponding instruction is found in the memory stack, a standard system exception signal can be generated.

Der Ansatz der 11 und 12 kann insbesondere so implementiert werden, dass die Ausnahmebehandlungsinformationen zusammen mit dem kleinsten logischen Block vorliegen können, wie dies durch diese Ausnahmebehandlung berücksichtigt wird. Auf diese Weise ermöglicht der Ansatz, dass ein Datenverarbeitungssystem, das den ausführbaren Programmcode ausführt, Ausnahmebehandlungsinformationen effizient und leicht verwendet.The approach of 11 and 12th can in particular be implemented in such a way that the exception handling information can be present together with the smallest logical block, as is taken into account by this exception handling. In this way, the approach enables a data processing system that executes the executable code to use exception handling information efficiently and easily.

Der Ansatz der 11 und 12 kann in Verfahren, Klassen oder einem Gesamtpaket implementiert werden.The approach of 11 and 12th can be implemented in procedures, classes or a complete package.

Der Ansatz der 11 und 12 lässt sich als auf einer Verteilung von Ausnahmeinformationen einer Ausnahmehandlertabelle (z. B. bereitgestellt am Ende des Anwendungsprogrammcodes, wie in 5 veranschaulicht), die alle Ausnahmeinformationen für ein Verfahren enthält, auf verschiedene Teile (z. B. Blöcke) innerhalb des Anwendungsprogrammcodes des Verfahrens basierend betrachten. Dadurch können nur die Teile (oder Elemente) der Ausnahmeinformationen bereitgestellt werden, die wirklich benötigt werden, indem sie in einem Stapel (oder einen anderen Speicherbereich, z. B. einen entsprechenden Registersatz) abgelegt werden.
13 zeigt eine Vorrichtung 1300 zum Ausführen eines ausführbaren Programmcodes gemäß einer Ausführungsform.
The approach of 11 and 12th can be seen as being on a distribution of exception information from an exception handler table (e.g. provided at the end of the application program code, as in 5 illustrated) that contains all exception information for a method based on different parts (e.g. blocks) within the application program code of the method. As a result, only the parts (or elements) of the exception information that are really required can be provided by storing them in a stack (or another storage area, for example a corresponding register set).
13 shows a device 1300 for executing executable program code according to an embodiment.

Die Vorrichtung 1300 ist eine Datenverarbeitungsvorrichtung, wie etwa ein Computer oder eine Chipkarte (mit beliebigem Formfaktor) oder ein beliebiger anderer Rechner oder Mikrocontroller, und enthält einen Speicher 1301 (oder ist mit diesem verbunden), der zum Speichern des ausführbaren Programmcodes konfiguriert ist,

  • • der Anwendungsprogrammcode und Ausnahmebehandlungsprogrammcode einschließlich Ausnahmebehandlungsinformationen, die sich auf den Anwendungsprogrammcode beziehen, enthält;
  • • wobei mindestens ein Abschnitt der Ausnahmebehandlungsinformationen am Anfang oder innerhalb des Anwendungsprogrammcodes angeordnet ist.
The device 1300 is a data processing device, such as a computer or a chip card (with any form factor) or any other computer or microcontroller, and contains a memory 1301 (or is connected to it) configured to store the executable code,
  • • contains the application program code and exception handling program code including exception handling information related to the application program code;
  • Wherein at least a portion of the exception handling information is located at the beginning or within the application program code.

Die Vorrichtung 1300 enthält ferner einen Prozessor 1302, der mit dem Speicher 1301 gekoppelt ist,

  • • wobei der Prozessor konfiguriert ist, um den ausführbaren Programmcode auszuführen;
  • • eine Anweisung des auszuführenden ausführbaren Programmcodes zu bestimmen, die Teil des Abschnitts der Ausnahmebehandlungsinformationen ist; und
  • • einen Ausnahmebehandlungsprozess gemäß der bestimmten Anweisung durchzuführen, die Teil des Abschnitts der Ausnahmebehandlungsinformationen ist.
The device 1300 also includes a processor 1302 that with the memory 1301 is coupled
  • Wherein the processor is configured to execute the executable program code;
  • • determine an instruction of the executable program code to be executed that is part of the section of the exception handling information; and
  • • perform an exception handling process according to the particular instruction that is part of the section of the exception handling information.

Obwohl hierin bestimmte Ausführungsformen dargestellt und beschrieben wurden, werden Fachleute auf dem Gebiet verstehen, dass verschiedene alternative und/oder gleichwertige Implementierungen statt der jeweils dargestellten und beschriebenen Ausführungsformen eingesetzt werden können, ohne vom Umfang der vorliegenden Erfindung abzuweichen. Die vorliegende Anmeldung soll jegliche Anpassungen oder Varianten der hier besprochenen spezifischen Ausführungsformen abdecken. Daher soll diese Erfindung nur durch die Ansprüche und ihre Äquivalente beschränkt werden.Although certain embodiments have been shown and described herein, those skilled in the art will understand that various alternative and / or equivalent implementations may be employed in place of the particular embodiments shown and described without departing from the scope of the present invention. The present application is intended to cover any adaptations or variations of the specific embodiments discussed herein. Therefore, this invention is intended to be limited only by the claims and their equivalents.

Claims (9)

Verfahren zur Erzeugung eines ausführbaren Java-Bytecodes mit Ausnahmebehandlung, das Verfahren umfassend: Erzeugen eines Java-Bytecodes, wobei eine zum Befehlssatz hinzugefügte Java-Bytecode-Instruktion am Anfang eines Try-Blocks des Java-Bytecodes in den Java-Bytecode eingefügt wird, wobei als Parameter der Instruktion die Endadresse des Try-Blocks sowie entsprechend der Anzahl der vorhandenen Catch-Blöcke jeweils ein Catch-Typindex auf die geworfene Ausnahme und die Anfangsadresse eines entsprechenden Ausnahmebehandlungs-Catch-Blocks und/oder die Anfangsadresse des Finally-Blocks übergeben werden.A method of generating an executable Java bytecode with exception handling, the method comprising: Generate a Java bytecode, whereby a Java bytecode instruction added to the instruction set is inserted into the Java bytecode at the beginning of a try block of the Java bytecode, the end address of the try block and, corresponding to the number of, as parameters of the instruction Existing catch blocks are each given a catch type index to the thrown exception and the start address of a corresponding exception handling catch block and / or the start address of the finally block. Verfahren nach Anspruch 1, wobei die Java-Bytecode-Instruktion von einem Compiler am Anfang des Try-Blocks angeordnet wird.Procedure according to Claim 1 , with the Java bytecode instruction placed by a compiler at the beginning of the try block. Verfahren nach einem der Ansprüche 1 oder 2, wobei die Java-Bytecode-Instruktion für einen Interpreter am Anfang des Try-Blocks angeordnet wird.Procedure according to one of the Claims 1 or 2nd , with the Java bytecode instruction for an interpreter placed at the beginning of the try block. Verfahren zur Ausführung eines ausführbaren Java-Bytecodes mit Ausnahmebehandlung, der ausführbare Java-Bytecode umfassend: • Java-Bytecode, wobei eine zum Befehlssatz hinzugefügte Java-Bytecode-Instruktion am Anfang eines Try-Blocks des Java-Bytecodes in den Java-Bytecode eingefügt ist, wobei als Parameter der Instruktion die Endadresse des Try-Blocks sowie entsprechend der Anzahl der vorhandenen Catch-Blöcke jeweils ein Catch-Typindex auf die geworfene Ausnahme und die Anfangsadresse eines entsprechenden Ausnahmebehandlungs-Catch-Blocks und/oder die Anfangsadresse des Finally-Blocks übergeben werden das Verfahren umfassend: • Ausführen des ausführbaren Java-Bytecodes mit Ausnahmebehandlung; • Bestimmen der Java-Bytecode-Instruktion; und • Durchführen eines Ausnahmebehandlungsprozesses gemäß der Java-Bytecode-Instruktion.A method of executing an executable Java bytecode with exception handling, the executable Java bytecode comprising: • Java bytecode, whereby a Java bytecode instruction added to the instruction set is inserted into the Java bytecode at the beginning of a try block of the Java bytecode, the end address of the try block and the number of available ones being used as parameters of the instruction Catch blocks each pass a catch type index to the thrown exception and the start address of a corresponding exception handling catch block and / or the start address of the finally block. • Executing the executable Java bytecode with exception handling; Determining the Java bytecode instruction; and • Perform an exception handling process according to the Java bytecode instruction. Verfahren nach Anspruch 4, ferner umfassend: • Speichern von mindestens einem Abschnitt der Java-Bytecode-Instruktion in einem Speicher; • wenn während der Ausführung des ausführbaren Java-Bytecodes eine Ausnahme ausgelöst wird, Lesen eines Abschnitts der Java-Bytecode-Instruktion aus dem Speicher; und • Ausführen eines Ausnahmebehandlungsprozesses gemäß dem aus dem Speicher gelesenen Abschnitt der Java-Bytecode-Instruktion.Procedure according to Claim 4 , further comprising: • storing at least a portion of the Java bytecode instruction in memory; If an exception is raised while executing the Java bytecode executable, reading a portion of the Java bytecode instruction from memory; and • executing an exception handling process according to the portion of the Java bytecode instruction read from memory. Vorrichtung zum Ausführen eines ausführbaren Java-Bytecodes mit Ausnahmebehandlung, die Vorrichtung umfassend: einen Speicher, der konfiguriert ist, um den ausführbaren Java-Bytecode mit Ausnahmebehandlung zu speichern, der umfasst: • Java-Bytecode, wobei eine zum Befehlssatz hinzugefügte Java-Bytecode-Instruktion am Anfang eines Try-Blocks des Java-Bytecodes in den Java-Bytecode eingefügt ist, wobei als Parameter der Instruktion die Endadresse des Try-Blocks sowie entsprechend der Anzahl der vorhandenen Catch-Blöcke jeweils ein Catch-Typindex auf die geworfene Ausnahme und die Anfangsadresse eines entsprechenden Ausnahmebehandlungs-Catch-Blocks und/oder die Anfangsadresse des Finally-Blocks übergeben werden einen mit dem Speicher gekoppelten Prozessor, wobei der Prozessor konfiguriert ist, um • den ausführbaren Java-Bytecodes mit Ausnahmebehandlung auszuführen; • die Java-Bytecode-Instruktion zu bestimmen; und • einen Ausnahmebehandlungsprozess gemäß der Java-Bytecode-Instruktion durchzuführen.Apparatus for executing an executable Java bytecode with exception handling, the apparatus comprising: a memory configured to store the exception-executable Java byte code, which comprises: • Java bytecode, whereby a Java bytecode instruction added to the instruction set is inserted into the Java bytecode at the beginning of a try block of the Java bytecode, the end address of the try block and the number of available ones being used as parameters of the instruction Catch blocks are each passed a catch type index to the thrown exception and the start address of a corresponding exception handling catch block and / or the start address of the finally block a processor coupled to the memory, the processor configured to • Execute the executable Java bytecodes with exception handling; • determine the Java bytecode instruction; and • perform an exception handling process according to the Java bytecode instruction. Vorrichtung nach Anspruch 6, wobei der Prozessor ferner konfiguriert ist, um: • mindestens einen Abschnitt der Java-Bytecode-Instruktion in einem Speicher zu speichern; • wenn während der Ausführung des ausführbaren Java-Bytecode eine Ausnahme ausgelöst wird, einen Abschnitt der Java-Bytecode-Instruktion aus dem Speicher zu lesen; und • einen Ausnahmebehandlungsprozess gemäß dem aus dem Speicher gelesenen Abschnitt der Java-Bytecode-Instruktion durchzuführen. Device after Claim 6 wherein the processor is further configured to: • store at least a portion of the Java bytecode instruction in memory; If an exception is thrown while executing the Java bytecode executable to read a portion of the Java bytecode instruction from memory; and • perform an exception handling process in accordance with the portion of the Java bytecode instruction read from memory. Vorrichtung nach Anspruch 6, wobei der Prozessor ferner konfiguriert ist, um: • mindestens einen Abschnitt der Java-Bytecode-Instruktion in einen Speicherbereich zu bewegen; • wenn während der Ausführung des ausführbaren Java-Bytecodes eine Ausnahme ausgelöst wird, einen Abschnitt der Java-Bytecode-Instruktion aus dem Speicherbereich zu laden; und • einen Ausnahmebehandlungsprozess gemäß dem aus dem Speicherbereich geladenen Abschnitt der Java-Bytecode-Instruktion durchzuführen.Device after Claim 6 wherein the processor is further configured to: • move at least a portion of the Java bytecode instruction into a memory area; If an exception is thrown while executing the Java bytecode executable to load a portion of the Java bytecode instruction from the memory area; and • perform an exception handling process according to the portion of the Java bytecode instruction loaded from the memory area. Computerlesbares Speichermedium, das einen ausführbaren Java-Bytecode speichert, der ausführbare Java-Bytecode umfassend: • Java-Bytecode, wobei eine zum Befehlssatz hinzugefügte Java-Bytecode-Instruktion am Anfang eines Try-Blocks des Java-Bytecodes in den Java-Bytecode eingefügt ist, wobei als Parameter der Instruktion die Endadresse des Try-Blocks sowie entsprechend der Anzahl der vorhandenen Catch-Blöcke jeweils ein Catch-Typindex auf die geworfene Ausnahme und die Anfangsadresse eines entsprechenden Ausnahmebehandlungs-Catch-Blocks und/oder die Anfangsadresse des Finally-Blocks übergeben werdenA computer readable storage medium that stores a Java byte code executable, the Java byte code executable comprising: • Java bytecode, whereby a Java bytecode instruction added to the instruction set is inserted into the Java bytecode at the beginning of a try block of the Java bytecode, the end address of the try block and the number of available ones being used as parameters of the instruction Catch blocks are each passed a catch type index to the thrown exception and the start address of a corresponding exception handling catch block and / or the start address of the finally block
DE102018127317.7A 2018-11-01 2018-11-01 METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE Active DE102018127317B3 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102018127317.7A DE102018127317B3 (en) 2018-11-01 2018-11-01 METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102018127317.7A DE102018127317B3 (en) 2018-11-01 2018-11-01 METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE

Publications (1)

Publication Number Publication Date
DE102018127317B3 true DE102018127317B3 (en) 2020-04-09

Family

ID=69886647

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102018127317.7A Active DE102018127317B3 (en) 2018-11-01 2018-11-01 METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE

Country Status (1)

Country Link
DE (1) DE102018127317B3 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162908A (en) * 2020-09-30 2021-01-01 中国工商银行股份有限公司 Program call link monitoring implementation method and device based on bytecode injection technology
CN114968282A (en) * 2022-05-20 2022-08-30 北京握奇智能科技有限公司 Optimization method and system for exception handling execution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Exzerpt aus Stackoverflow: How do exceptions work (behind the scenes) in c++https://stackoverflow.com/questions/307610/how-do-exceptions-work-behind-the-scenes-in-cIn: https://web.archive.org am 09.01.2017(recherchiert am 9.9.2019) *
Venners, B.: How the Java virtual machine handles exceptions. JavaWorld, 1.1.1997<https://www.javaworld.com/article/2076868/how-the-java-virtual-machine-handles-exceptions.html>(recherchiert am 6.11.2019) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162908A (en) * 2020-09-30 2021-01-01 中国工商银行股份有限公司 Program call link monitoring implementation method and device based on bytecode injection technology
CN112162908B (en) * 2020-09-30 2024-03-26 中国工商银行股份有限公司 Method and device for realizing program call link monitoring based on byte code injection technology
CN114968282A (en) * 2022-05-20 2022-08-30 北京握奇智能科技有限公司 Optimization method and system for exception handling execution

Similar Documents

Publication Publication Date Title
DE60002295T2 (en) EFFECTIVE EXCEPTIONAL TREATMENT
DE69811474T2 (en) COMPUTER ARCHITECTURE FOR DEPENDING EXCEPTIONS OF STATIC SPECULATIVE COMMANDS
DE69724322T2 (en) Method and arrangement for early insertion of assembly code for optimization
DE102010051477B4 (en) METHOD IN A COMPUTER PLATFORM AND COMPUTER PLATFORM FOR SHARING VIRTUAL STORAGE-BASED MULTI-VERSION DATA BETWEEN THE VARIOUS PROCESSORS OF THE COMPUTER PLATFORM
DE69738101T2 (en) Management of access to objects using three-state references
DE69634315T2 (en) Method and apparatus for using a load command that does not cause an error
EP0689694B1 (en) Process for the machine-generation of parallel processable command groups from a program for super-scalar microprocessors
DE10393920B4 (en) Methods and systems for controlling virtual machines
DE69723286T2 (en) REAL TIME PROGRAMMING LANGUAGE ACCELERATOR
DE69434728T2 (en) SYNCHRONIZATION SYSTEM AND METHOD IN A DATA CACHE SYSTEM WITH A SPLIT LEVEL
DE69814174T2 (en) JAVA RUNTIME SYSTEM WITH CHANGED CONSTANT COLLECTION
DE112012000303T5 (en) Dynamic binary optimization
DE112012000365T5 (en) Incremental unloading of classes in a scavenging garbage collector
DE10127198A1 (en) Physical address provision method for processor system with virtual addressing uses hierarchy mapping process for conversion of virtual address
DE112017001027T5 (en) Page troubleshooting
DE102009050983A1 (en) A technique to communicate interrupts in a computer system
DE112019001821B4 (en) METHOD AND APPARATUS FOR REPRODUCTION OF PAUSE-LESS GARBAGE COLLECTION ACTIVATION FRAMEWORK
EP1639475B1 (en) Processor architecture for exact index identification
DE102018127317B3 (en) METHOD AND DEVICES FOR COMPUTER-IMPLEMENTED GENERATION OF AN EXECUTABLE PROGRAM CODE AND FOR EXECUTING AN EXECUTABLE PROGRAM CODE
DE69931685T2 (en) Method and apparatus for implementing fast subclass and subtype checks
DE102004057490B4 (en) Device and method for processing a program code
DE69839113T2 (en) Direct vector emulation of an inherited command set
DE10392127T5 (en) Use a context identifier in a buffer
DE10103070B4 (en) Method and test circuit for determining a validity status for a past load command
DE4040992C2 (en) Data processing system

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R016 Response to examination communication
R018 Grant decision by examination section/examining division
R020 Patent grant now final
R082 Change of representative