首页    期刊浏览 2024年11月28日 星期四
登录注册

文章基本信息

  • 标题:A Transformation-Based Implementation of Lightweight Nested Functions
  • 作者:Tasuku Hiraishi ; Masahiro Yasugi ; Taiichi Yuasa
  • 期刊名称:IPSJ Digital Courier
  • 电子版ISSN:1349-7456
  • 出版年度:2006
  • 卷号:2
  • 页码:262-279
  • DOI:10.2197/ipsjdc.2.262
  • 出版社:Information Processing Society of Japan
  • 摘要:The SC language system was developed to provide a transformation-based language extension scheme for SC languages (extended/plain C languages with an S-expression-based syntax). Using this system, many flexible extensions to the C language can be implemented by means of transformation rules over S-expressions at low cost, mainly because of the preexisting Common Lisp capabilities for manipulating S-expressions. This paper presents the LW-SC (Lightweight-SC) language as an important application of this system, featuring nested functions (i.e., functions defined inside other functions). A function can manipulate its caller's local variables (or local variables of its indirect callers) by indirectly calling a nested function of its callers. Thus, many high-level services with “stack walk” can be easily and elegantly implemented by using LW-SC as an intermediate language. Moreover, such services can be implemented efficiently because we designed and implemented LW-SC to provide “lightweight” nested functions by aggressively reducing the costs of creating and maintaining nested functions. The GNU C compiler also provides nested functions as an extension to C, but our sophisticated translator to standard C is more portable and efficient for occasional “stack walk.”
Loading...
联系我们|关于我们|网站声明
国家哲学社会科学文献中心版权所有