logo       


r10271 - in trunk/src/d2c/compiler: base cback: msg#00052

Subject: r10271 - in trunk/src/d2c/compiler: base cback
Author: housel
Date: Mon Oct 17 03:36:42 2005
New Revision: 10271

Modified:
   trunk/src/d2c/compiler/base/ctype.dylan
   trunk/src/d2c/compiler/cback/heap.dylan
Log:
Bug: 7265
Make <limited-integer-ctype> a valid <eql-ct-value> so that
singleton() of a <limited-integer-ctype> can be evaluated at
compile-time.

* src/d2c/compiler/base/ctype.dylan (<limited-integer-ctype>): Inherit
  from <eql-ct-value> instead of <ct-value>.

* src/d2c/compiler/cback/heap.dylan
  (object-label): Define an object-label method for
  <limited-integer-ctype> so that different libraries will refer to
  the same literal value.
  (defer-for-global-heap?): Cause dumping of <limited-integer-ctype> to be
  deferred to the global heap.


Modified: trunk/src/d2c/compiler/base/ctype.dylan
==============================================================================
--- trunk/src/d2c/compiler/base/ctype.dylan     (original)
+++ trunk/src/d2c/compiler/base/ctype.dylan     Mon Oct 17 03:36:42 2005
@@ -923,7 +923,7 @@
 
 define constant $limited-integer-table = make(<limited-integer-table>);
 
-define class <limited-integer-ctype> (<limited-ctype>, <ct-value>)
+define class <limited-integer-ctype> (<limited-ctype>, <eql-ct-value>)
   constant slot low-bound :: false-or(<extended-integer>), 
        required-init-keyword: low-bound:;
   constant slot high-bound :: false-or(<extended-integer>), 

Modified: trunk/src/d2c/compiler/cback/heap.dylan
==============================================================================
--- trunk/src/d2c/compiler/cback/heap.dylan     (original)
+++ trunk/src/d2c/compiler/cback/heap.dylan     Mon Oct 17 03:36:42 2005
@@ -560,6 +560,17 @@
                  "Z", getter-defn.defn-name.c-name-global, "_SLOT_HEAP");
 end;
 
+define method object-label
+    (object :: <limited-integer-ctype>)
+ => (label :: <byte-string>);
+  let bounds = format-to-string("%d$%d", object.low-bound, object.high-bound);
+  concatenate("LIMITED_",
+              object.base-class.class-defn.defn-name.c-name,
+              "Z",
+              bounds.string-to-c-name,
+              "_HEAP");
+end method;
+
 // entry-name -- internal.
 //
 // Return the name of the function that corresponds to this entry point.
@@ -705,6 +716,14 @@
   #t;
 end method defer-for-global-heap?;
 
+// We also need to ensure that <literal-integer-ctype> instances are
+// unique at compile-time and run-time.
+//
+define method defer-for-global-heap?
+    (object :: <limited-integer-ctype>, state :: <local-heap-file-state>)
+    => defer? :: <boolean>;
+  #t;
+end method defer-for-global-heap?;
 
 // Open generic functions must be deferred, because they need to be populated
 // with any methods defined elsewhere.
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe