[Gd-chatter] r11256 - in trunk/fundev/sources: dfmc/browser-support environment/dfmc/database

andreas at gwydiondylan.org andreas at gwydiondylan.org
Tue Apr 10 23:42:59 CEST 2007


Author: andreas
Date: Tue Apr 10 23:42:58 2007
New Revision: 11256

Modified:
   trunk/fundev/sources/dfmc/browser-support/glue-routines.dylan
   trunk/fundev/sources/environment/dfmc/database/library.dylan
   trunk/fundev/sources/environment/dfmc/database/module.dylan
   trunk/fundev/sources/environment/dfmc/database/utilities.dylan
Log:
job: fd

{Complex type}, be gone!

We keep a reference to the reader fragment for the type expression of
a variable around as the compiler proxy, and use that to produce a
somewhat sensible type name for a type expression using print.


Modified: trunk/fundev/sources/dfmc/browser-support/glue-routines.dylan
==============================================================================
--- trunk/fundev/sources/dfmc/browser-support/glue-routines.dylan	(original)
+++ trunk/fundev/sources/dfmc/browser-support/glue-routines.dylan	Tue Apr 10 23:42:58 2007
@@ -340,7 +340,7 @@
 
 // #t means something not representable in the API.
 define constant <type-expression> 
-  = type-union(<variable>, singleton(#t), <source-locator>);
+  = type-union(<variable>, singleton(#t), dfmc-<fragment>);
 
 define generic externalize-type (type) => (res :: false-or(<type-expression>));
 
@@ -358,6 +358,8 @@
 
 define method externalize-type 
     (type :: dfmc-<fragment>) => (res :: <type-expression>)
+  type
+/*
   if (instance?(type, <variable>))
     // Hack to work around the fact that <fragment> actually precedes 
     // <variable> in the CPL of a name fragment.
@@ -366,6 +368,7 @@
     let loc = dfmc-fragment-source-location(type);
     loc | #t
   end;
+*/
 end method;
 
 define function source-locator-positions (loc :: <source-locator>)

Modified: trunk/fundev/sources/environment/dfmc/database/library.dylan
==============================================================================
--- trunk/fundev/sources/environment/dfmc/database/library.dylan	(original)
+++ trunk/fundev/sources/environment/dfmc/database/library.dylan	Tue Apr 10 23:42:58 2007
@@ -9,7 +9,7 @@
 
 define library dfmc-environment-database
   use environment-protocols;
-
+  use io, import: { print };
   use dfmc-browser-support;
   use user-projects;
   use dfmc-conditions;	//---*** for the warning classes

Modified: trunk/fundev/sources/environment/dfmc/database/module.dylan
==============================================================================
--- trunk/fundev/sources/environment/dfmc/database/module.dylan	(original)
+++ trunk/fundev/sources/environment/dfmc/database/module.dylan	Tue Apr 10 23:42:58 2007
@@ -9,6 +9,7 @@
 
 define module dfmc-environment-database
   use environment-imports;
+  use print, import: { print };
   use environment-protocols,
     rename: { project-read-only? => env/project-read-only?,
 	      project-target-type => env/project-target-type };

Modified: trunk/fundev/sources/environment/dfmc/database/utilities.dylan
==============================================================================
--- trunk/fundev/sources/environment/dfmc/database/utilities.dylan	(original)
+++ trunk/fundev/sources/environment/dfmc/database/utilities.dylan	Tue Apr 10 23:42:58 2007
@@ -91,6 +91,18 @@
 			  compiler-object-proxy: project)
 end method make-environment-object-for-source-form;
 
+define class <dfmc-type-expression-object> (<type-expression-object>)
+end;
+
+define method environment-object-primitive-name
+  (server :: <server>, expression :: <dfmc-type-expression-object>) => (result :: false-or(<string>));
+  let s :: <byte-string-stream>
+    = make(<byte-string-stream>,
+	   contents: make(<byte-string>, size: 32), direction: #"output");
+  print(expression.compiler-object-proxy, s, escape?: #f);
+  s.stream-contents
+end;
+
 define function make-environment-object-for-type-expression
     (server :: <dfmc-database>, type-expression :: false-or(<type-expression>))
  => (object :: <environment-object>)
@@ -99,7 +111,9 @@
     make-environment-object-for-source-form
       (server.server-project, type-definition)
   else
-    $complex-type-expression-object
+    make-environment-object(<dfmc-type-expression-object>, 
+                            project: server.server-project,
+                            compiler-object-proxy: type-expression)
   end
 end function make-environment-object-for-type-expression;
 



More information about the chatter mailing list