首页> 外文期刊>Science of Computer Programming >A practical solution for achieving language compatibility in scripting language compilers
【24h】

A practical solution for achieving language compatibility in scripting language compilers

机译:在脚本语言编译器中实现语言兼容性的实用解决方案

获取原文
获取原文并翻译 | 示例
           

摘要

Although scripting languages have become very popular, even mature scripting language implementations remain interpreted. Several compilers and reimplementations have been attempted, generally focusing on performance. Based on our survey of these reimplementations, we determine that there are three important features of scripting languages that are difficult to compile or reimplement. Since scripting languages are defined primarily through the semantics of their original implementations, they often change semantics between releases. They provide C APIs, used both for foreign-function interfaces and to write third-party extensions. These APIs typically have tight integration with the original implementation, and are used to provide large standard libraries, which are difficult to re-use, and costly to reimplement. Finally, they support run-time code generation. These features make it difficult to design a fully compatible compiler. We present a technique to support these features in an ahead-of-time compiler for PHP. Our technique uses the original PHP implementation through the provided C API, both in our compiler and in our generated code. We support all of these important scripting language features. Additionally, our approach allows us to automatically support limited future language changes. We present a discussion and performance evaluation of this technique.
机译:尽管脚本语言已变得非常流行,但即使是成熟的脚本语言实现也​​仍然可以解释。已经尝试了几种编译器和重新实现,通常着重于性能。根据对这些重新实现的调查,我们确定脚本语言具有三个重要特征,这些特征很难编译或重新实现。由于脚本语言主要是通过其原始实现的语义定义的,因此它们通常会在发行版之间更改语义。它们提供C API,用于外部函数接口和编写第三方扩展。这些API通常与原始实现紧密集成,并用于提供大型标准库,这些标准库难以重复使用,并且实现成本高昂。最后,它们支持运行时代码生成。这些功能使设计完全兼容的编译器变得困难。我们提出了一种在PHP的提前编译器中支持这些功能的技术。我们的技术通过编译器和生成的代码通过提供的C API使用原始的PHP实现。我们支持所有这些重要的脚本语言功能。此外,我们的方法允许我们自动支持将来有限的语言更改。我们提出了对该技术的讨论和性能评估。

著录项

  • 来源
    《Science of Computer Programming》 |2012年第9期|p.971-989|共19页
  • 作者单位

    Lero@TCD. Trinity College Dublin, Dublin 2, Ireland;

    Lero@TCD. Trinity College Dublin, Dublin 2, Ireland;

    Lero@TCD. Trinity College Dublin, Dublin 2, Ireland;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    compiler; scripting language;

    机译:编译器脚本语言;

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号