Native Binary Code Compilation for Virtual Machine Portability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilation techniques for virtual machine-based execution environments limit the generation of native code, restricting performance and optimization due to constraints that prevent full abstraction of terminal-specific parts and require tight integration with the operating system, resulting in suboptimal code execution.

Innovation Solution

A method that compiles intermediate code into native binary code by extracting function entry points, integrating control flow management, and compiling application code to produce a single optimized binary, allowing the virtual machine to retain control without disturbing its execution, thus eliminating the need for interpreters and AOT/JIT compilers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If intermediate code is executed through a virtual machine with interpreter or AOT compilation, then portability across different terminals is improved, but execution performance deteriorates due to interpretation overhead and constraints on native code optimization

Engineering Contradiction:
ImproveportabilityVSAvoidexecution performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the application code into intermediate code instructions that can be independently compiled. Each instruction is extracted and compiled separately into optimized native code, allowing fine-grained optimization while maintaining the ability to run on different terminals through the runtime environment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic compilation where intermediate code is compiled to native code at runtime based on execution needs. The system dynamically determines which intermediate code instructions to compile and when, optimizing performance for frequently executed paths while maintaining portability through the virtual machine interface.

Inventive Principle:
Principle #15Dynamics

2Productivity

If native code is generated for direct processor execution, then execution performance is improved, but compatibility with virtual machine constraints deteriorates

Engineering Contradiction:
Improveexecution performanceVSAvoidcompatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent uses an intermediary compilation process that translates intermediate code into optimized native code while maintaining compatibility with virtual machine constraints. The compiled code uses a specific communication interface for interaction between native and virtual worlds, acting as a mediator that satisfies both performance and compatibility requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the compilation parameters and code generation strategy to produce native code that adheres to virtual machine constraints. The compilation process adjusts parameters such as code structure, memory management patterns, and system call interfaces to ensure compatibility while achieving native execution performance.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If complete native code compilation is performed, then optimization potential is improved, but integration complexity with operating system and virtual machine increases

Engineering Contradiction:
Improveoptimization potentialVSAvoidintegration complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts intermediate code instructions from the virtual machine execution environment and compiles them separately into native code. This extraction approach allows complete optimization of the application logic while keeping the virtual machine integration layer minimal and manageable, reducing overall integration complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent merges the compiled native code with the runtime environment to create a unified executable. The integration layer combines the optimized native code sections with the virtual machine interface, creating a cohesive system that achieves high optimization while managing complexity through unified code generation.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentEP2649523B1Method for compiling an intermediate code of an application
Publication Date: 2020.06.17 GOOGLE LLC
  • EP2649523B1 patent drawingFigure 1~4
  • EP2649523B1 patent drawingFigure 2~3

AI summary

The invention relates to a method for compiling an original application written in an intermediate code, in which the original application is executed by means of a virtual machine, said method supplying a native application comprising a native binary code. According to the invention, the method comprises: a step consisting in extracting at least one intermediate code instruction at at least one corresponding function input point; a first step consisting in compiling the intermediate code of the application to a code that includes control flow management and calls said at least one input point of each function implementing the instructions of the intermediate code; and a second step consisting in compiling the compiled application code and intermediate code functions supplying the optimised native application.