IP Library › Granted Patent US 12,367,020
Granted Patent B2
US 12,367,020 · App. 18/319,339 · Granted Jul 22, 2025

Domain specific inlining for interpreters

Inventors: Christian Humer (Zurich, CH); Daniele Bonetta (Amsterdam, NL)
Assignee: Oracle International Corporation
G06F8/423G06F8/4443G06F9/4552
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,367,020
App. No.
18/319,339
Granted
Jul 22, 2025
Kind
B2
Abstract

Domain specific inlining for interpreters includes obtaining an interpreter source code including compiler directives. A host compilation is performed on the interpreter source code to obtain a compiled interpreter. Performing host compilation includes inlining code blocks based on the plurality of compiler directives. The compiled interpreter is outputted.

Claims (70)

1. A method comprising:

obtaining an interpreter source code comprising a plurality of compiler directives;

performing a host compilation on the interpreter source code to obtain a compiled interpreter, wherein performing host compilation comprises inlining code blocks based on the plurality of compiler directives, wherein performing the host compilation comprises:

initiating compiling the interpreter source code; and

inlining, during compiling the interpreter source code, an interpreter code block according to a compiler inlining policy based on a lack of a compiler exclude directive; and

outputting the compiled interpreter.

2. The method of claim 1 , further comprising:

executing a user level program by executing the compiled interpreter and performing interpreter processing of the user level program.

3. The method of claim 1 , further comprising:

initiating execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encountering, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program, wherein the compiler directive is the compiler exclude directive; and

omitting compiling the code block of the user level program based on the compiler directive being the compiler exclude directive.

4. The method of claim 1 , further comprising:

initiating execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encountering, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program; and

compiling the code block of the user level program according to the compiler directive.

5. The method of claim 1 , wherein the plurality of compiler directives comprises at least one selected from a group consisting of a partial evaluation directive, an inInterpreter directive, a transfer to interpreter directive, a recursive directive, and a polymorphic directive.

6. The method of claim 1 , wherein performing the host compilation comprises:

initiating compiling the interpreter source code;

encountering the compiler exclude directive of the plurality of compiler directives when compiling the interpreter source code; and

omitting, during compiling the interpreter source code, inlining of a second interpreter code block referenced by the compiler exclude directive based on the compiler exclude directive.

7. A method comprising:

obtaining an interpreter source code comprising a plurality of compiler directives;

performing a host compilation on the interpreter source code to obtain a compiled interpreter, wherein performing host compilation comprises inlining code blocks based on the plurality of compiler directives, wherein performing the host compilation comprises:

initiating compiling the interpreter source code;

encountering a compiler exclude directive of the plurality of compiler directives when compiling the interpreter source code; and

omitting, during compiling the interpreter source code, inlining of an interpreter code block referenced by the compiler exclude directive based on the compiler exclude directive; and

outputting the compiled interpreter.

8. A system comprising:

memory;

a computer processor executing a compiler to perform operations comprising:

obtaining an interpreter source code comprising a plurality of compiler directives;

performing a host compilation on the interpreter source code to obtain a compiled interpreter, wherein performing host compilation comprises inlining code blocks based on the plurality of compiler directives, wherein performing the host compilation comprises:

initiating compiling the interpreter source code; and

inlining, during compiling the interpreter source code, an interpreter code block according to a compiler inlining policy based on a lack of a compiler exclude directive; and

outputting the compiled interpreter.

9. The system of claim 8 , wherein the computer processor is further configured to execute a user level program by executing the compiled interpreter and performing interpreter processing of the user level program.

10. The system of claim 8 , wherein the computer processor is further configured to:

initiate execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encounter, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program, wherein the compiler directive is the compiler exclude directive; and

omit compiling the code block of the user level program based on the compiler directive being the compiler exclude directive.

11. The system of claim 8 , wherein the computer processor is further configured to:

initiate execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encounter, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program; and

compile, by the compiler, the code block of the user level program according to the compiler directive.

12. The system of claim 8 , wherein performing the host compilation comprises:

initiating compiling the interpreter source code;

encountering the compiler exclude directive of the plurality of compiler directives when compiling the interpreter source code; and

omitting, during compiling the interpreter source code, inlining of a second interpreter code block referenced by the compiler exclude directive based on the compiler exclude directive.

13. A non-transitory computer readable storage medium comprising computer readable program code for causing a computer system to perform operations comprising:

obtaining an interpreter source code comprising a plurality of compiler directives;

performing a host compilation on the interpreter source code to obtain a compiled interpreter, wherein performing host compilation comprises inlining code blocks based on the plurality of compiler directives, wherein performing the host compilation comprises:

initiating compiling the interpreter source code; and

inlining, during compiling the interpreter source code, an interpreter code block according to a compiler inlining policy based on a lack of a compiler exclude directive; and

outputting the compiled interpreter.

14. The non-transitory computer readable storage medium of claim 13 , wherein the operations further comprise:

executing a user level program by executing the compiled interpreter and performing interpreter processing of the user level program.

15. The non-transitory computer readable storage medium of claim 13 , wherein the operations further comprise:

initiating execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encountering, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program, wherein the compiler directive is the compiler exclude directive; and

omitting compiling the code block of the user level program based on the compiler directive being the compiler exclude directive.

16. The non-transitory computer readable storage medium of claim 13 , wherein the operations further comprise:

initiating execution of a user level program by executing the compiled interpreter and performing interpreter processing of the user level program;

encountering, while executing the user level program, a compiler directive of the plurality of compiler directives, wherein the compiler directive is for a code block of the user level program; and

compiling the code block of the user level program according to the compiler directive.

17. The non-transitory computer readable storage medium of claim 13 , wherein performing the host compilation comprises:

initiating compiling the interpreter source code;

encountering the compiler exclude directive of the plurality of compiler directives when compiling the interpreter source code; and

omitting, during compiling the interpreter source code, inlining of a second interpreter code block referenced by the compiler exclude directive based on the compiler exclude directive.

18. The non-transitory computer readable storage medium of claim 13 , wherein the plurality of compiler directives comprises at least one selected from a group consisting of a partial evaluation directive, an inInterpreter directive, a transfer to interpreter directive, a recursive directive, and a polymorphic directive.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 20, 2023
From: HUMER, CHRISTIAN; BONETTA, DANIELE
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 063998/0680 →
Continuity (2)
Provisional Application 63343532 · May 18, 2022
Related Publication 20230376290A1 · Nov 23, 2023
References Cited (15)
US 6658655B1 · Hoogerbrugge · 2003 [cited by examiner]
US 8762974B1 · Smith · 2014 [cited by examiner]
WO WO0210909A2 · 2002 [cited by examiner]
Niephaus, Fabio, et al., GraalSqueak: A Fast Smalltalk Bytecode Interpreter Written in an AST Interpreter Framework, ICOOOLPS '18, 6 pages, Jul. 2018, [retrieved on Dec. 30, 2024], Retrieved from the Internet: <URL:http… [cited by examiner]
Stefan Brunthaler. 2010. Efficient Interpretation Using Quickening. SIGPLAN Not. 45, 12 (Oct. 1, 2010), 1-14. https://doi.org/10.1145/1899661.1869633, 13 pages. [cited by applicant]
Brian Davis, Andrew Beatty, Kevin Casey, David Gregg, and John Waldron. 2003. The Case for Virtual Register Machines. In Proceedings of the 2003 Workshop on Interpreters, Virtual Machines and Emulators (San Diego, Calif… [cited by applicant]
Eric Jonas, Johann Schleier-Smith, Vikram Sreekanti, Chia-Che Tsai, Anurag Khandelwal, Qifan Pu, Vaishaal Shankar, Joao Carreira, Karl Krauth, Neeraja Yadwadkar, et al. 2019. Cloud programming simplified: A Berkeley vie… [cited by applicant]
Todd A. Proebsting. 1995. Optimizing an ANSI C Interpreter with Superoperators. In Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages(San Francisco, California, USA) (POPL '95). … [cited by applicant]
Gülfem Savrun-Yeniçeri, Wei Zhang, Huahan Zhang, Eric Seckler, Chen Li, Stefan Brunthaler, Per Larsen, and Michael Franz. 2014. Efficient Hosted Interpreters on the JVM. ACM Trans. Archit. Code Optim. 11, 1, Article 9 (… [cited by applicant]
Manuel Serrano. 2018. JavaScript AOT Compilation. SIGPLAN Not. 53, 8 (Oct. 2018), 50-63. https://doi.org/10.1145/3393673.3276950, Nov. 6, 2018, 14 pages. [cited by applicant]
Manuel Serrano. 2021. Of JavaScript AOT Compilation Performance. Proc. ACM Program. Lang. 5, ICFP, Article 70 (Aug. 2021), 30 pages. https://doi.org/10.1145/3473575, Aug. 1, 2021, 30 pages. [cited by applicant]
Gregory T. Sullivan, Derek L. Bruening, Iris Baron, Timothy Garnett, and Saman Amarasinghe. 2003. Dynamic Native Optimization of Interpreters. In Proceedings of the 2003 Workshop on Interpreters, Virtual Machines and Em… [cited by applicant]
Christian Wimmer and Thomas Würthinger. 2012. Truffle: A Self-Optimizing Runtime System. In Proceedings of the 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity (Tucson, Arizona, USA… [cited by applicant]
Thomas Würthinger, Christian Wimmer, Christian Humer, Andreas Wöß, Lukas Stadler, Chris Seaton, Gilles Duboscq, Doug Simon, and Matthias Grimmer. 2017. Practical Partial Evaluation for High-Performance Dynamic Language … [cited by applicant]
Haoran Xu and Fredrik Kjolstad. 2021. Copy-and-Patch Compilation: A Fast Compilation Algorithm for High-Level Languages and Bytecode. Proc. ACM Program. Lang. 5, OOPSLA, Article 136 (Oct. 2021), https://doi.org/10.1145/… [cited by applicant]