[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/207110.207165acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Stack caching for interpreters

Published: 01 June 1995 Publication History

Abstract

An interpreter can spend a significant part of its execution time on accessing arguments of virtual machine instructions. This paper explores two methods to reduce this overhead for virtual stack machines by caching top-of-stack values in (real machine) registers. The dynamic method is based on having, for every possible state of the cache, one specialized version of the whole interpreter; the execution of an instruction usually changes the state of the cache and the next instruction is executed in the version corresponding to the new state. In the static method a state machine that keeps track of the cache state is added to the compiler. Common instructions exist in specialized versions for several states, but it is not necessary to have a version of every instruction for every cache state. Stack manipulation instructions are optimized away.

References

[1]
James R. Bell. Threaded code. Communications of the A CM, 16(6):370-372, 1973.
[2]
Russell P. Blake. Exploring a stack architecture, iEEE Computer, 10(5):30-39, May 1977.
[3]
comp. compilers. Usenet Newsgroup; archives available from ftp://primost, cs. wisc.edu.
[4]
David R. Ditzel and H. R. McLellan. Register allocation for free: The C machine stack cache. In Symposium on Architectural Support/or Programming Languages and Systems, pages 48-56, 1982.
[5]
Eddy H. Debaere and Jan M. Van Campenhout. Interpretation and Instruction Path Coprocessing. The MIT Press, 1990.
[6]
Christopher W. Fraser, Robert R. Henry, and Todd A. Proebsting. BURG Fast Optimal Instruction Selection and Tree Parsing, 1991. Available via anonymous ftp from kaese.cs.wisc.edu, file pub/burg, shar. Z.
[7]
John R. Hayes, Martin E. Fraeman, Robert L. Williams, and Thomas Zaremba. An architecture for the direct execution of the Forth programming language. In Architectural Support/or Programming Languages and Operating Systems (ASPLOS- II), pages 42-48, 1987.
[8]
John Hayes and Susan Lee. The architecture of the SC32 Forth engine. Journal o/ Forth Application and Research, 5(4):493- 5O6, 1989.
[9]
John L. Hennessy and David A. Patterson. Computer Architecture. A Quantitative Approach. Morgan Kaufman Publishers, 1990.
[10]
Makoto Hasekawa and Yoshiharu Shigei. High-speed top-of-stack scheme for interpreters: A management algorithm and its analysis. In International Symposium on Computer Archictecture (ISCA), pages 48- 54, 1985.
[11]
Paul Klint. Interpretation techniques. Software--Practice and Experience, 11:963- 973, 1981.
[12]
Philip J. Koopman, Jr. Stack Computers. Ellis Horwood Limited, 1989.
[13]
Glen Krasner, editor. Smalltalk-80: Bits of History, Words o/Advice. Addison-Wesley, 1983.
[14]
Thomas Pittman. Two-level hybrid interpreter/native code execution for combined space-time efficiency. In Symposium on interpreters and Interpretive Techniques (SIGPLAN '87), pages 150-152, 1987.
[15]
Eduardo Pelegrf-Llopart and Susan L. Graham. Optimal code generation for expression trees: An application of the BURS theory. In Fifteenth Annual A CM Symposium on Principles o/Programming Languages, pages 294-308, 1988.

Cited By

View all
  • (2023)AST vs. Bytecode: Interpreters in the Age of Meta-CompilationProceedings of the ACM on Programming Languages10.1145/36228087:OOPSLA2(318-346)Online publication date: 16-Oct-2023
  • (2019)Improved Ahead-of-time Compilation of Stack-based JVM Bytecode on Resource-constrained DevicesACM Transactions on Sensor Networks10.1145/334117015:3(1-44)Online publication date: 13-Aug-2019
  • (2018)CapeVMProceedings of the 16th ACM Conference on Embedded Networked Sensor Systems10.1145/3274783.3274842(250-263)Online publication date: 4-Nov-2018
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
June 1995
335 pages
ISBN:0897916972
DOI:10.1145/207110
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1995

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI95
Sponsor:

Acceptance Rates

PLDI '95 Paper Acceptance Rate 28 of 105 submissions, 27%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)536
  • Downloads (Last 6 weeks)61
Reflects downloads up to 04 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)AST vs. Bytecode: Interpreters in the Age of Meta-CompilationProceedings of the ACM on Programming Languages10.1145/36228087:OOPSLA2(318-346)Online publication date: 16-Oct-2023
  • (2019)Improved Ahead-of-time Compilation of Stack-based JVM Bytecode on Resource-constrained DevicesACM Transactions on Sensor Networks10.1145/334117015:3(1-44)Online publication date: 13-Aug-2019
  • (2018)CapeVMProceedings of the 16th ACM Conference on Embedded Networked Sensor Systems10.1145/3274783.3274842(250-263)Online publication date: 4-Nov-2018
  • (2017)Ahead-of-Time Compilation of Stack-Based JVM Bytecode on Resource-Constrained DevicesProceedings of the 2017 International Conference on Embedded Wireless Systems and Networks10.5555/3108009.3108022(84-95)Online publication date: 20-Feb-2017
  • (2017)One compiler: deoptimization to optimized codeProceedings of the 26th International Conference on Compiler Construction10.1145/3033019.3033025(55-64)Online publication date: 5-Feb-2017
  • (2015)Branch prediction and the performance of interpretersProceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization10.5555/2738600.2738614(103-114)Online publication date: 7-Feb-2015
  • (2015)Branch prediction and the performance of interpreters — Don't trust folklore2015 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2015.7054191(103-114)Online publication date: Feb-2015
  • (2013)BibliographyProgram Specialization10.1002/9781118576984.biblio(487-522)Online publication date: 5-Feb-2013
  • (2010)Efficient interpretation using quickeningACM SIGPLAN Notices10.1145/1899661.186963345:12(1-14)Online publication date: 18-Oct-2010
  • (2010)Efficient interpretation using quickeningProceedings of the 6th symposium on Dynamic languages10.1145/1869631.1869633(1-14)Online publication date: 18-Oct-2010
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media