INTEGRAÇÃO ENTRE A LINGUAGEM LUA E O COMMON LANGUAGE RUNTIME / INTEGRATING THE LUA LANGUAGE AND THE COMMON LANGUAGE RUNTIME

AUTOR(ES)
DATA DE PUBLICAÇÃO

2004

RESUMO

The Common Language Runtime (CLR) is a platform that aims to make the interoperability among different programming languages easier, by using a common language (the Common Intermediate Language, or CIL) and a common type system (the Common Type System, or CTS). Lua is a flexible scripting language with a simple syntax; scripting languages are frequently used to join components written in other languages, to build application prototypes, and in configuration files. This work presents two approachs for integratiion between the Lua language and the CLR, with the objective of allowing Lua scripts to instantiate and use components written for the CLR. The first approach is to create a bridge between the Lua interpreter and the CLR, without changing the interpreter. The features and implementation of this bridge are shown, and it is compared with other work following the same approach. The second approach is to compile the virtual-machine instructions of the Lua interpreter to instructions of the CLR`s Common Intermediate Language, without introducing changes to the Lua language. The implementation of a Lua instructions to CIL compiler is shown, and the performance of scripts compiled by it is compared with the performance of the same scripts run by the Lua interpreter and with the performance of equivalent scripts compiled by compilers of other scripting language to the CLR.

ASSUNTO(S)

linguagem lua compilers maquinas virtuais compiladores virtual machines lua language

Documentos Relacionados