Compilation Strategies as Objects

In this paper we present an overview of the metaobject protocol approach to compilation. We take the position that object orientation in a compiler can be put to effective use in opening up the compiler for modifcation by the user. Interestingly, the natural scopes of effect of user intervention don't respect syntactic boundaries, so we require objects that are not just elements of the abstract syntax tree. We introduce a new kind of intermediate object for the process of compilation so that user modification of compilation strategies can be carried out in a coherent manner. We give some examples of user customizations, and outline the architecture of our Scheme compiler based on these principles.


© Copyright 1993 Association for Computing Machinery, Inc.

Permission to make digital or hard copies of part or all 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, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.


Download paper.