[Gd-chatter] r11068 - in trunk/src: common/common-dylan common/common-dylan/tests common/io common/system d2c/runtime/dylan/tests tools/melange
agent at gwydiondylan.org
agent at gwydiondylan.org
Thu Dec 14 04:26:45 CET 2006
Author: agent
Date: Thu Dec 14 04:26:42 2006
New Revision: 11068
Modified:
trunk/src/common/common-dylan/common-dylan-exports.dylan
trunk/src/common/common-dylan/common-extensions.dylan
trunk/src/common/common-dylan/extensions.dylan
trunk/src/common/common-dylan/tests/functions.dylan
trunk/src/common/common-dylan/tests/macros.dylan
trunk/src/common/io/library.dylan
trunk/src/common/system/library.dylan
trunk/src/d2c/runtime/dylan/tests/module.dylan
trunk/src/tools/melange/c-exports.dylan
Log:
Job: gd
Removed the table macro and associated changes; its addition was premature.
Modified: trunk/src/common/common-dylan/common-dylan-exports.dylan
==============================================================================
--- trunk/src/common/common-dylan/common-dylan-exports.dylan (original)
+++ trunk/src/common/common-dylan/common-dylan-exports.dylan Thu Dec 14 04:26:42 2006
@@ -219,7 +219,6 @@
#if (~mindy)
export
- \table,
\table-definer,
\iterate,
\when;
Modified: trunk/src/common/common-dylan/common-extensions.dylan
==============================================================================
--- trunk/src/common/common-dylan/common-extensions.dylan (original)
+++ trunk/src/common/common-dylan/common-extensions.dylan Thu Dec 14 04:26:42 2006
@@ -223,18 +223,18 @@
end method find-element;
define function fill-table!
- (tab :: <table>, keys-and-elements :: <sequence>)
- => (tab :: <table>)
+ (table :: <table>, keys-and-elements :: <sequence>)
+ => (table :: <table>)
let key = #f;
for (object in keys-and-elements)
if (key)
- tab[key] := object;
+ table[key] := object;
key := #f;
else
key := object
end
end;
- tab
+ table
end function fill-table!;
/*
Modified: trunk/src/common/common-dylan/extensions.dylan
==============================================================================
--- trunk/src/common/common-dylan/extensions.dylan (original)
+++ trunk/src/common/common-dylan/extensions.dylan Thu Dec 14 04:26:42 2006
@@ -293,25 +293,6 @@
#if (~mindy)
-// Table constructor. Syntax:
-// let my-table = table("red"=>"stop", "green"=>"go");
-// let my-table = table(<string-table>, "red"=>"stop", "green"=>"go");
-define macro table
-
- // Matches when optional class included.
- { table(?table-class:expression, ?table-contents) }
- => { let ht = make(?table-class); ?table-contents; ht; }
-
- // Matches without optional class.
- { table(?rest:*) } => { table(<table>, ?rest); }
-
- table-contents:
- { } => { }
- { ?key:expression => ?value:expression, ... }
- => { ht[?key] := ?value; ... }
-end macro table;
-
-
define macro table-definer
{ define table ?:name ?eq:token { ?keys-and-values } }
=> { define constant ?name :: <table> ?eq make(<table>);
Modified: trunk/src/common/common-dylan/tests/functions.dylan
==============================================================================
--- trunk/src/common/common-dylan/tests/functions.dylan (original)
+++ trunk/src/common/common-dylan/tests/functions.dylan Thu Dec 14 04:26:42 2006
@@ -364,14 +364,14 @@
end function-test subclass;
define common-extensions function-test fill-table! ()
- let my-table = make(<table>);
+ let table = make(<table>);
check-equal("fill-table(...) returns the table",
- fill-table!(my-table, #[0, "Zero", 1, "One"]),
- my-table);
+ fill-table!(table, #[0, "Zero", 1, "One"]),
+ table);
check-equal("table(...)[0] = \"Zero\"",
- my-table[0], "Zero");
+ table[0], "Zero");
check-equal("table(...)[1] = \"One\"",
- my-table[1], "One");
+ table[1], "One");
end function-test fill-table!;
define common-extensions function-test application-name ()
Modified: trunk/src/common/common-dylan/tests/macros.dylan
==============================================================================
--- trunk/src/common/common-dylan/tests/macros.dylan (original)
+++ trunk/src/common/common-dylan/tests/macros.dylan Thu Dec 14 04:26:42 2006
@@ -42,32 +42,6 @@
& $test-table[2] == #"two")
end macro-test table-definer-test;
-define common-extensions macro-test table-test ()
- check-true("table produces correct table",
- begin
- let true? = #f;
- let test-table = table(0 => #"zero", 1 => #"one", 2 => #"two");
- true? := subtype?(test-table.object-class, <table>)
- & test-table.size = 3
- & test-table[0] == #"zero"
- & test-table[1] == #"one"
- & test-table[2] == #"two";
- true?;
- end);
- check-true("table with class produces correct table",
- begin
- let true? = #f;
- let test-table = table(<string-table>,
- "0" => "zero", "1" => "one", "2" => "two");
- true? := instance?(test-table, <string-table>)
- & test-table.size = 3
- & test-table["0"] == "zero"
- & test-table["1"] == "one"
- & test-table["2"] == "two";
- true?;
- end);
-end macro-test table-test;
-
define simple-profiling macro-test profiling-test ()
check-true("profiling macro returns two integer values",
begin
Modified: trunk/src/common/io/library.dylan
==============================================================================
--- trunk/src/common/io/library.dylan (original)
+++ trunk/src/common/io/library.dylan Thu Dec 14 04:26:42 2006
@@ -280,7 +280,7 @@
end module print;
define module print-internals
- use common-dylan, exclude: { table };
+ use common-dylan;
use extensions;
use introspection,
rename: { subclass-of => subclass-class,
Modified: trunk/src/common/system/library.dylan
==============================================================================
--- trunk/src/common/system/library.dylan (original)
+++ trunk/src/common/system/library.dylan Thu Dec 14 04:26:42 2006
@@ -346,7 +346,7 @@
end module settings-internals;
define module system-internals
- use common-dylan, exclude: { table };
+ use common-dylan;
use melange-support;
use functional-objects-extras;
use machine-words;
Modified: trunk/src/d2c/runtime/dylan/tests/module.dylan
==============================================================================
--- trunk/src/d2c/runtime/dylan/tests/module.dylan (original)
+++ trunk/src/d2c/runtime/dylan/tests/module.dylan Thu Dec 14 04:26:42 2006
@@ -11,7 +11,7 @@
//use dylan-extensions,
use dylan;
use extensions;
- use common-dylan, exclude: { table };
+ use common-dylan;
use testworks;
use testworks-specs;
Modified: trunk/src/tools/melange/c-exports.dylan
==============================================================================
--- trunk/src/tools/melange/c-exports.dylan (original)
+++ trunk/src/tools/melange/c-exports.dylan Thu Dec 14 04:26:42 2006
@@ -189,7 +189,7 @@
end module c-parse;
define module c-declarations
- use common-dylan, exclude: { format-to-string, split, table };
+ use common-dylan, exclude: { format-to-string, split };
use table-extensions;
use regular-expressions;
use streams;
More information about the chatter
mailing list