Author: bernhard
Date: Sun May 20 12:56:38 2007
New Revision: 18598
Modified:
trunk/languages/lisp/include/macros/standard.pir
trunk/languages/lisp/include/macros/types.pir
trunk/languages/lisp/system.pir
Log:
[languages/lsip]
Use the macro .FUNCTION again.
The sub is passed in as a string.
Modified: trunk/languages/lisp/include/macros/standard.pir
==============================================================================
--- trunk/languages/lisp/include/macros/standard.pir (original)
+++ trunk/languages/lisp/include/macros/standard.pir Sun May 20 12:56:38 2007
@@ -62,7 +62,8 @@
.sym pmc _functionp
.sym pmc _namep
- .FUNCTION(_functionp, .L)
+ # VALID_IN_PARROT_0_2_0 .FUNCTION(_functionp, .L)
+ .FUNCTION(_functionp, ".L")
_namep = new "LispString"
_namep = .N
Modified: trunk/languages/lisp/include/macros/types.pir
==============================================================================
--- trunk/languages/lisp/include/macros/types.pir (original)
+++ trunk/languages/lisp/include/macros/types.pir Sun May 20 12:56:38 2007
@@ -109,12 +109,13 @@
=cut
.macro FUNCTION(F,L)
- .sym pmc _func
- .F = new "LispFunction"
- # VALID_IN_PARROT_0_2_0 newsub _func, .Sub, .L
+ .F = new "LispFunction"
+ # VALID_IN_PARROT_0_2_0 newsub _func, .Sub, .L
+ # VALID_IN_PARROT_0_2_0 setattribute .F, "LispFunction\0body", .L
+ .const .Sub _func = .L
+ setattribute .F, "body", _func
- # VALID_IN_PARROT_0_2_0 setattribute .F, "LispFunction\0body", .L
.endm
=head1 .MACRO(F,L)
Modified: trunk/languages/lisp/system.pir
==============================================================================
--- trunk/languages/lisp/system.pir (original)
+++ trunk/languages/lisp/system.pir Sun May 20 12:56:38 2007
@@ -14,52 +14,36 @@
.HASH(value)
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _left_paren_macro )
- function = new "LispFunction"
- .const .Sub temp = "_left_paren_macro"
- setattribute function, "body", temp
- value["("] = function
+ .FUNCTION(function, "_left_paren_macro" )
+ value["("] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _right_paren_macro)
- function = new "LispFunction"
- .const .Sub temp = "_right_paren_macro"
- setattribute function, "body", temp
- value[")"] = function
+ .FUNCTION(function, "_right_paren_macro" )
+ value[")"] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _single_quote_macro)
- function = new "LispFunction"
- .const .Sub temp = "_single_quote_macro"
- setattribute function, "body", temp
- value["'"] = function
+ .FUNCTION(function, "_single_quote_macro" )
+ value["'"] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _semicolon_macro)
- function = new "LispFunction"
- .const .Sub temp = "_semicolon_macro"
- setattribute function, "body", temp
- value[";"] = function
+ .FUNCTION(function, "_semicolon_macro" )
+ value[";"] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _double_quote_macro)
- function = new "LispFunction"
- .const .Sub temp = "_double_quote_macro"
- setattribute function, "body", temp
- value["\""] = function
+ .FUNCTION(function, "_double_quote_macro" )
+ value['"'] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _backquote_macro)
- function = new "LispFunction"
- .const .Sub temp = "_double_quote_macro"
- setattribute function, "body", temp
- value["`"] = function
+ .FUNCTION(function, "_backquote_macro" )
+ value["`"] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _comma_macro)
- function = new "LispFunction"
- .const .Sub temp = "_comma_macro"
- setattribute function, "body", temp
- value[","] = function
+ .FUNCTION(function, "_comma_macro" )
+ value[","] = function
# VALID_IN_PARROT_0_2_0 .FUNCTION(function, _sharpsign_macro)
- function = new "LispFunction"
- .const .Sub temp = "_sharpsign_macro"
- setattribute function, "body", temp
- value["#"] = function
+ .FUNCTION(function, "_sharpsign_macro" )
+ value["#"] = function
.DEFVAR(symbol, package, "*READER-MACROS*", value)