USING CLOSURES FOR CODE GENERATION

被引:6
|
作者
FEELEY, M
LAPALME, G
机构
[1] Univ de Montreal, Montreal, Que, Can, Univ de Montreal, Montreal, Que, Can
来源
COMPUTER LANGUAGES | 1987年 / 12卷 / 01期
关键词
COMPUTER OPERATING SYSTEMS - Program Compilers;
D O I
10.1016/0096-0551(87)90012-9
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper describes a new approach to compiling which is based on the extensive use of closures. In this method, a compiled expression is embodied by a closure whose application performs the evaluation of the given expression. For each primitive construct contained in the expression to compile, a closure is generated. As a whole, the compiled expression consists of a network of these closures. In a way, 'code generation' is replaced by 'closure generation'. This method, combined with an efficient closure implementation, produces compiled code which compares favorably (in execution time) with its interpreted counter-part. It can also be used to implement compilers for embedded languages and as it has been implemented in Scheme, it yields a straightforward metacircular compiler for Scheme.
引用
收藏
页码:47 / 66
页数:20
相关论文
共 50 条
  • [1] NETWORK GENERATION USING THE PRUFER CODE
    MURPHY, CM
    HUNG, MS
    COMPUTERS & OPERATIONS RESEARCH, 1986, 13 (06) : 693 - 705
  • [2] Code generation using an orthogonal model
    Cordy, James R.
    Holt, Richard C.
    Software - Practice and Experience, 1990, 20 (03) : 301 - 320
  • [3] Code generation for WSLAs using AXpect
    Swint, GS
    Pu, C
    IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES, PROCEEDINGS, 2004, : 134 - 141
  • [4] Native Code Generation Using the Transterpreter
    Jacobsen, Christian L.
    Dimmich, Damian J.
    Jadud, Matthew C.
    COMMUNICATING PROCESS ARCHITECTURES 2006: WOTUG-29, 2006, 64 : 269 - 280
  • [5] CODE GENERATION USING AN ORTHOGONAL MODEL
    CORDY, JR
    HOLT, RC
    SOFTWARE-PRACTICE & EXPERIENCE, 1990, 20 (03): : 301 - 320
  • [6] Switch Code Generation Using Program Synthesis
    Gao, Xiangyu
    Kim, Taegyun
    Wong, Michael D.
    Raghunathan, Divya
    Varma, Aatish Kishan
    Kannan, Pravein Govindan
    Sivaraman, Anirudh
    Narayana, Srinivas
    Gupta, Aarti
    SIGCOMM '20: PROCEEDINGS OF THE 2020 ANNUAL CONFERENCE OF THE ACM SPECIAL INTEREST GROUP ON DATA COMMUNICATION ON THE APPLICATIONS, TECHNOLOGIES, ARCHITECTURES, AND PROTOCOLS FOR COMPUTER COMMUNICATION, 2020, : 44 - 61
  • [7] Using LPNMR for problem specification and code generation
    Cadoli, M
    LOGIC PROGRAMMING AND NONMONOTONIC REASONING, 1999, 1730 : 372 - 372
  • [8] Automatic generation of XForms code using DTD
    Lee, E
    Kim, TH
    Fourth Annual ACIS International Conference on Computer and Information Science, Proceedings, 2005, : 210 - 214
  • [9] Malware phylogeny generation using permutations of code
    Karim, Md. Enamul
    Walenstein, Andrew
    Lakhotia, Arun
    Parida, Laxmi
    JOURNAL OF COMPUTER VIROLOGY AND HACKING TECHNIQUES, 2005, 1 (1-2): : 13 - 23
  • [10] Code generation templates using XML and XSL
    Georgescu, Cristian
    2002, R and D Publications Inc. (20):