Partial Object Dematerialization in Java Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Java programs lack opportunities for object dematerialization due to complex control flow and the inability to determine if objects escape their scope, limiting performance optimizations such as reduced memory allocation and faster field access.

Innovation Solution

A system and method for partial software object dematerialization within a virtual machine, utilizing a compiler with an object dematerializer and injector to apply dematerialization even when objects have escaped their initial scope, by injecting runtime dematerialization code and using nullness communicators to preserve exception semantics, allowing for dematerialization of non-escaping objects across divergent and merging code paths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If object dematerialization is applied to local objects only, then performance optimization is achieved through reduced allocation and faster access, but the inability to handle escaped objects limits the applicability to complex control flow patterns

Engineering Contradiction:
Improveperformance optimizationVSAvoidapplicability to complex control flow
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent applies partial object dematerialization by selectively dematerializing objects that meet specific criteria (local scope, non-escaping) while leaving others materialized. This partial application enables performance optimization for suitable candidates without forcing dematerialization on all objects, thus resolving the contradiction between optimization benefit and applicability limitation.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent introduces an intermediary mechanism (the compiler's object dematerialization analysis) that determines whether an object should be dematerialized based on its scope and escape characteristics. This intermediary analysis enables the system to handle complex control flow by making informed decisions about each object's materialization status, expanding applicability while maintaining optimization benefits.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If full object dematerialization is attempted in garbage collected languages without explicit destructors, then performance improvement is achieved, but the compiler cannot determine object escape scope leading to incorrect optimization

Engineering Contradiction:
Improveperformance improvementVSAvoidobject escape scope detection
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent implements feedback mechanisms where the compiler analyzes object usage patterns, scope, and control flow to determine escape characteristics. This feedback loop enables accurate detection of whether objects escape their scope, allowing the compiler to make correct optimization decisions in garbage collected languages without explicit destructors.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces the mechanical approach of explicit destructor-based scope detection with a more sophisticated analysis system that tracks object lifetimes and escape paths through control flow graphs. This substitution enables accurate escape detection in languages like Java where destructors are implicit, thereby enabling correct object dematerialization optimization.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Adaptability or versatility

If objects are dematerialized across divergent and merging code paths, then optimization coverage is expanded, but maintaining correct exception semantics and memory model compliance becomes more complex

Engineering Contradiction:
Improveoptimization coverageVSAvoidexception semantics compliance
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the code into distinct control flow paths (divergent and merging paths) and analyzes each segment separately for object escape characteristics. This segmentation allows the compiler to apply dematerialization consistently across different control flow scenarios while maintaining proper exception semantics and memory model compliance through systematic analysis of each path.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP2254045B1System and method for using partial software object dematerialization in a virtual machine
Publication Date: 2018.08.15 ORACLE INT CORP
  • EP2254045B1 patent drawingFigure 1
  • EP2254045B1 patent drawingFigure 2
  • EP2254045B1 patent drawingFigure 3

AI summary

A system and method are described for partial object dematerialization within a virtual machine (VM), and particularly Java Virtual Machines. In accordance with an embodiment, the system allows for applying partial object dematerialization to situations where the object is either created locally, or is retrieved from external code where it might have already escaped. In accordance with an embodiment, the system comprises a computer; a virtual machine for executing a software application; memory space for the application byte code and the generated machine code; and a compiler with an object dematerializer, and dematerializer injector. Runtime partial object dematerialization code is injected into the intermediate code representation in such a way that additional or standard optimizer techniques can be applied to it.