IP Library Granted Patent US 12,026,488
Granted Patent B2
US 12,026,488 · App. 16/912,445 · Granted Jul 2, 2024

Bytecode transformations using virtual artifacts

Inventors: Stuart Wade Douglas (Orange, AU); James Roger Perkins (Government Camp, OR)
Assignee: Red Hat, Inc.
G06F8/52G06F8/433G06F9/45508
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,026,488
App. No.
16/912,445
Granted
Jul 2, 2024
Kind
B2
Abstract

Methods and systems for transforming bytecodes using virtual artifacts are disclosed. In one aspect, a method is provided that includes receiving a build request to convert source code into a first bytecode. A first virtual artifact may be identified within the source code and it may be determined that a local repository does not store the first virtual artifact. A real artifact that corresponds to the first virtual artifact may be retrieved from a centralized repository. A bytecode transformation may be applied to the real artifact to generate a second bytecode and the second bytecode may be added to the first bytecode.

Claims (45)

1. A method comprising:

receiving a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;

identifying a virtual artifact within the source code;

requesting second bytecode associated with the virtual artifact from a local repository;

in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieving, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;

applying a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode; and

adding the fourth bytecode to the application bytecode.

2. The method of claim 1 , further comprising:

determining that the local repository stores the virtual artifact;

retrieving, from the local repository, a fifth bytecode corresponding to the virtual artifact; and

adding the fifth bytecode to the first application bytecode.

3. The method of claim 1 , wherein the virtual artifact represents a command to retrieve, from the local repository, the first bytecode that has been transformed.

4. The method of claim 3 , wherein the first bytecode is generated based at least in part on real artifacts stored in the centralized repository.

5. The method of claim 3 , wherein the virtual artifact is identified by a classifier of a build environment that receives the build request and identifies the virtual artifact and the real artifact as representing previously-compiled bytecode for the application stored in the local repository and the centralized repository, respectively.

6. The method of claim 5 , wherein the build environment is an extension of an integrated development environment.

7. The method of claim 5 , wherein the build environment includes a network proxy that receives build requests from multiple computing environments.

8. The method of claim 5 , wherein the classifier is configured to determine whether a line of the source code corresponds to the virtual artifact or the real artifact, and wherein the classifier is further configured to identify the bytecode transformation used to generate the fourth bytecode.

9. The method of claim 1 , further comprising storing the fourth bytecode in the local repository in association with the virtual artifact.

10. A system comprising:

a processor; and

a memory storing instructions which, when executed by the processor, cause the processor to:

receive a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;

identify a virtual artifact within the source code;

request second bytecode associated with the virtual artifact from a local repository;

in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieve, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;

apply a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode; and

add the fourth bytecode to the application bytecode.

11. The system of claim 10 , wherein the instructions are further executable by the processor for causing the processor to:

determine that the local repository stores the second bytecode associated with the virtual artifact; and

retrieve, from the local repository, the second bytecode corresponding to the virtual artifact.

12. The system of claim 10 , wherein the virtual artifact represents a command to retrieve, from the local repository, the first bytecode that has been transformed.

13. The system of claim 12 , wherein the first bytecode is generated based at least in part on real artifacts stored in the centralized repository.

14. The system of claim 12 , wherein the virtual artifact is identified by a classifier of a build environment that receives the build request.

15. The system of claim 14 , wherein the build environment is an extension of an integrated development environment.

16. The system of claim 14 , wherein the build environment includes a network proxy that receives build requests from multiple computing environments.

17. The system of claim 14 , wherein the classifier is configured to determine whether a line of the source code corresponds to the virtual artifact or the real artifact, and wherein the classifier is further configured to identify the bytecode transformation.

18. The system of claim 10 , wherein the instructions are further executable to cause the processor to:

store the fourth bytecode in the local repository in association with the virtual artifact.

19. A non-transitory, computer-readable medium storing instructions which, when executed by a processor, cause the processor to perform operations including:

receiving a build request to convert source code for an application into application bytecode, wherein the application bytecode includes a first bytecode for the application;

identifying a virtual artifact within the source code;

requesting second bytecode associated with the virtual artifact from a local repository;

in response to determining that the local repository does not store the second bytecode associated with the virtual artifact, retrieving, from a centralized repository, third bytecode associated with a real artifact that corresponds to the virtual artifact;

applying a bytecode transformation to the third bytecode associated with the real artifact, wherein the bytecode transformation involves replacing at least a portion of the third bytecode to thereby generate a fourth bytecode, wherein the fourth bytecode is configured for use with a different operating system or a different runtime environment than the third bytecode; and

adding the fourth bytecode to the application bytecode.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 26, 2020
From: DOUGLAS, STUART WADE; PERKINS, JAMES ROGER
To: RED HAT, INC.
Reel/Frame 053047/0114 →
Continuity (1)
Related Publication 20210405982A1 · Dec 30, 2021