develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35438 - in trunk/languages/lua: . src src/lib

From:
fperrad
Date:
January 12, 2009 06:29
Subject:
[svn:parrot] r35438 - in trunk/languages/lua: . src src/lib
Message ID:
20090112142941.1F8FCCB9F9@x12.develooper.com
Author: fperrad
Date: Mon Jan 12 06:29:40 2009
New Revision: 35438

Modified:
   trunk/languages/lua/luap.pir
   trunk/languages/lua/src/lib/luaaux.pir
   trunk/languages/lua/src/lib/luaperl.pir
   trunk/languages/lua/src/lua51.pir

Log:
[Lua] standardization of the interface
- downcase language name
So, now usable from Rakudo :
   eval(q<print 'hello'>, :lang<lua>)
but causes segfault


Modified: trunk/languages/lua/luap.pir
==============================================================================
--- trunk/languages/lua/luap.pir	(original)
+++ trunk/languages/lua/luap.pir	Mon Jan 12 06:29:40 2009
@@ -22,7 +22,7 @@
 .sub 'main' :anon :main
     .param pmc args
     load_bytecode 'languages/lua/lua.pbc'
-    $P0 = compreg 'Lua'
+    $P0 = compreg 'lua'
     $S0 = "Compiler Lua 5.1 on Parrot  Copyright (C) 2005-2008, The Perl Foundation.\n"
     $P0.'commandline_banner'($S0)
     $P0.'command_line'(args)

Modified: trunk/languages/lua/src/lib/luaaux.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaaux.pir	(original)
+++ trunk/languages/lua/src/lib/luaaux.pir	Mon Jan 12 06:29:40 2009
@@ -605,7 +605,7 @@
     .param string data
     .param string chunkname
     .local pmc lua_comp
-    lua_comp = compreg 'Lua'
+    lua_comp = compreg 'lua'
     push_eh _handler
     $P0 = lua_comp.'compile'(data)
     $P0 = $P0[1]

Modified: trunk/languages/lua/src/lib/luaperl.pir
==============================================================================
--- trunk/languages/lua/src/lib/luaperl.pir	(original)
+++ trunk/languages/lua/src/lib/luaperl.pir	Mon Jan 12 06:29:40 2009
@@ -34,7 +34,7 @@
 .sub '__onload' :anon :load :init
     $P0 = newclass [ 'Lua'; 'PerlCompiler' ]
     new $P1, $P0
-    compreg 'Lua', $P1
+    compreg 'lua', $P1
 .end
 
 .namespace [ 'Lua'; 'PerlCompiler' ]

Modified: trunk/languages/lua/src/lua51.pir
==============================================================================
--- trunk/languages/lua/src/lua51.pir	(original)
+++ trunk/languages/lua/src/lua51.pir	Mon Jan 12 06:29:40 2009
@@ -36,7 +36,7 @@
     $P0.'new_class'('Lua::Compiler', 'parent'=>'PCT::HLLCompiler', 'attr'=>'$ostgrammar')
 
     $P0 = new ['Lua';'Compiler']
-    $P0.'language'('Lua')
+    $P0.'language'('lua')
     $P0.'parsegrammar'('Lua::Grammar')
     $P0.'astgrammar'('Lua::PAST::Grammar')
     $P0.'ostgrammar'('Lua::POST::Grammar')



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About