Author: coke
Date: Sun Jul 27 20:00:30 2008
New Revision: 29819
Added:
trunk/languages/tcl/runtime/builtin/lreverse.pir (contents, props changed)
Modified:
trunk/MANIFEST
trunk/languages/tcl/lib/skipped_tests.tcl
Log:
[tcl] implement [lreverse], and TODO all the remaining failing spec tests from
that file.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Sun Jul 27 20:00:30 2008
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Jul 28 00:33:14 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon Jul 28 02:54:53 2008 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -2530,6 +2530,7 @@
languages/tcl/runtime/builtin/lrange.pir [tcl]
languages/tcl/runtime/builtin/lrepeat.pir [tcl]
languages/tcl/runtime/builtin/lreplace.pir [tcl]
+languages/tcl/runtime/builtin/lreverse.pir [tcl]
languages/tcl/runtime/builtin/lsearch.pir [tcl]
languages/tcl/runtime/builtin/lset.pir [tcl]
languages/tcl/runtime/builtin/lsort.pir [tcl]
Modified: trunk/languages/tcl/lib/skipped_tests.tcl
==============================================================================
--- trunk/languages/tcl/lib/skipped_tests.tcl (original)
+++ trunk/languages/tcl/lib/skipped_tests.tcl Sun Jul 27 20:00:30 2008
@@ -85,6 +85,20 @@
parse-16.1
} {bigint support} {
parseExpr-20.[123]
+ } {[lsort -command]} {
+ cmdIL-1.5
+ } {[lsort -ascii]} {
+ cmdIL-1.4 cmdIL-3.7 cmdIL-4.3[45] cmdIL-5.1
+ } {[lsort -index]} {
+ cmdIL-1.1[1234] cmdIL-1.2[36] cmdIL-3.[23456] cmdIL-3.4.1 cmdIL-5.[234]
+ } {[lsort -indices]} {
+ cmdIL-1.27 cmdIL-1.28
+ } {[lsort] bug - don't modify the values you're sorting} {
+ cmdIL-3.1[19]
+ } {[lsort -dictionary] - not sorting properly} {
+ cmdIL-4.[145] cmdIL-4.1[27] cmdIL-4.2[089] cmdIL-4.3[0123]
+ } {[lsort] misc} {
+ cmdIL-4.2[45]
}
]
Added: trunk/languages/tcl/runtime/builtin/lreverse.pir
==============================================================================
--- (empty file)
+++ trunk/languages/tcl/runtime/builtin/lreverse.pir Sun Jul 27 20:00:30 2008
@@ -0,0 +1,29 @@
+.HLL 'Tcl', 'tcl_group'
+.namespace []
+
+.sub '&lreverse'
+ .param pmc argv :slurpy
+
+ .local int argc
+ argc = elements argv
+ if argc != 1 goto bad_args
+
+ .local pmc toList
+ toList = get_root_global ['_tcl'], 'toList'
+ .local pmc reverse
+ reverse = get_root_global ['_tcl'], 'reverse'
+
+ $P0 = argv[0]
+ $P0 = toList($P0)
+ $P0 = reverse($P0)
+ .return ($P0)
+
+bad_args:
+ tcl_error 'wrong # args: should be "lreverse list"'
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir: