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 PDFInfo
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
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
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.
-
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.
Das Datenverarbeitungssystem
Das Datenverarbeitungssystem
Die CPU
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.
Ein Computerprogramm
Ein Compiler
Die Java Virtual Machine
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
- 1. Verfahrensbereich: Speichert alle Daten auf Klassenebene, einschließlich statischer Variablen.
- 2. Heap-Bereich: Speichert die Objekte und die entsprechenden Instanzvariablen und Arrays.
- 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) Lokales Variablenarray: Die Werte lokaler Variablen werden hier gespeichert.
- 2) Operandenstapel: Dient als Laufzeitarbeitsbereich zum Ausführen von Operationen.
- 3) Rahmendaten: Speichert die dem Verfahren entsprechenden Symbole. Im Falle einer Ausnahme werden die catch-Blockinformationen in den Rahmendaten verwaltet.
- 4. PC-Register (Programmzähler): Jedes ausgeführte Programm verfügt über PC-Register, die die Adresse des aktuellen Ausführungsbefehls verwahren.
- 5. Native Verfahrensstapel: Verwahrt die nativen Verfahrensinformationen.
- 1. Process area: Stores all data at class level, including static variables.
- 2. Heap area: Stores the objects and the corresponding instance variables and arrays.
- 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) Local variable array: The values of local variables are saved here.
- 2) Operand stack: Serves as a runtime work area for performing operations.
- 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. PC register (program counter): Each executed program has PC registers that keep the address of the current execution command.
- 5. Native procedural stack: Retains the native procedural information.
Die Java Virtual Machine
Der Java-Bytecode
The Java bytecode
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.
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
Der Java-Bytecode
Am Ende enthält der Java-Bytecode
Die Behandlung von Programmausnahmen durch einen Ausnahmebehandlungsmechanismus des Programms verursacht einen Ausführungsmehraufwand. Wenn im Beispiel des Java-Bytecodes
- • 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.
Handling program exceptions through an exception handling mechanism of the program causes additional execution effort. If in the example of the Java bytecode
- • 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
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
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
Wenn die Java Virtual Machine
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.
- • 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.
Ähnlich wie in dem Beispiel von
Im Gegensatz zu dem Java-Bytecode von
Als Ausnahmebehandlungsinformationen spezifiziert die tryCatchFinally-Anweisung
Ähnlich wie in dem Beispiel von
Im Gegensatz zu dem Java-Bytecode von
Als Ausnahmebehandlungsinformationen spezifiziert die tryInfo-Anweisung das Ende des try-Blocks (
Die catchInfo-Anweisung
Die catchInfo-Anweisung
Die catchInfo-Anweisung
Ähnlich wie in dem Beispiel von
Das Beispiel in
Ähnlich wie in dem Beispiel von
Als Ausnahmebehandlungsinformationen spezifiziert die tryCatch-Anweisung
Ähnlich wie in dem Beispiel von
Das Beispiel in
Ähnlich wie in dem Beispiel von
Als Ausnahmebehandlungsinformation spezifiziert der tryFinally-Befehl
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
Bei dem Ansatz von
Dies wäre für den Ansatz von
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
tryCatchFinally
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
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
trylnfo
Darüber hinaus kann die Ausnahmeinformation in Form einer Tabelle (z. B. einen Teil einer Ausnahmehandlertabelle
Wie vorstehend beschrieben, ordnet der Compiler
Wenn die Java Virtual Machine
Wenn während der Ausführung des Java-Bytecodes eine Ausnahme ausgelöst wird, ruft die Java Virtual Machine
In
In
Wenn sie keinen geeigneten Ausnahmehandler findet und der Ausnahmeinformationsstapel nicht leer ist, setzt sie die Suche in
Wenn sie keinen geeigneten Ausnahmehandler findet und der Ausnahmeinformationsstapel leer ist, sendet sie in
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
Insgesamt werden gemäß verschiedenen Ausführungsformen Verfahren bereitgestellt, wie sie in den
In
In
In
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
In
In
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
Darüber hinaus kann die Größe von Bereichstabellen reduziert werden, die in Implementierungen eines Ausnahmebehandlungsmechanismus verwendet werden. Der Ansatz der
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
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
This in
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
Der Ansatz der
Der Ansatz der
Die Vorrichtung
- • 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.
- • 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
- • 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.
- 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)
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)
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 |
-
2018
- 2018-11-01 DE DE102018127317.7A patent/DE102018127317B3/en active Active
Non-Patent Citations (2)
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)
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 |