Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
C-INTERCAL 0.27 bugfix patch
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ais523  
View profile  
 More options Jan 7 2008, 8:06 am
Newsgroups: alt.lang.intercal
From: ais523 <ais...@bham.ac.uk>
Date: Sun, 6 Jan 2008 13:06:47 -0800 (PST)
Local: Mon, Jan 7 2008 8:06 am
Subject: C-INTERCAL 0.27 bugfix patch
Some errors in the optimiser for C-INTERCAL 0.27 have been brought to
my attention (thanks Joris!), and also an error in the parser which
acts like an optimiser error; here is a patch that should fix them. I
hope that Usenet doesn't mess this patch up too badly; if it does,
email me and I'll send you a copy that way.

ais523

--- ick-0.27/src/dekludge.c     2007-12-22 09:22:14.000000000 +0000
+++ latest/src/dekludge.c       2008-01-03 14:10:58.000000000 +0000
@@ -139,6 +139,8 @@
   /* ignorable holds whether a variable's ignorance status can change
*/
   for (tp = tuples; tp < tuples + lineno; tp++)
   {
+    /* allow for warnings to be generated during flow optimisations
*/
+    optuple = tp; /* Patch by Joris Huizer */
     if(tp->maybe) tp->abstainable = 1;
     if(tp->exechance < 0) tp->initabstain = 1;
     if(tp->exechance != 100 && tp->exechance != -100) tp->abstainable
= 1;
--- ick-0.27/src/idiotism.oil   2007-12-22 09:22:14.000000000 +0000
+++ latest/src/idiotism.oil     2008-01-03 14:07:15.000000000 +0000
@@ -207,15 +207,15 @@
 <#0-#14
 ((_{c<=65535&&!(c&((1LU<<r)-1LU))}1$
   #{!(x&(4294967294LU<<r))}2)~#{!(x&(1431655765LU<<(r*2+2)))}3)
-->((((_1>>#{r}0)&#{iselect(x3>>(r*2+1),1431655765LU)}0)
+->((((_1>>#{r}0)~#{iselect(x3>>(r*2+1),1431655765LU)}0)
     <<#{setbitcount(x3&((2LU<<(r*2))-1))}0)|
#{iselect(mingle(0,x2),x3)}0)
 (((_{c<=65535&&!(c&((1LU<<r)-1LU))}1|#{x<=65535&&!
(c&~((1LU<<r)-1LU))}4)$
   #{!(x&(4294967294LU<<r))}2)~#{!(x&(1431655765LU<<(r*2+2)))}3)
-->((((_1>>#{r}0)&#{iselect(x3>>(r*2+1),1431655765LU)}0)
+->((((_1>>#{r}0)~#{iselect(x3>>(r*2+1),1431655765LU)}0)
     <<#{setbitcount(x3&((2LU<<(r*2))-1))}0)|
#{iselect(mingle(x4,x2),x3)}0)
 (((#{x<=65535&&!(c&~((1LU<<r)-1LU))}4|_{c<=65535&&!
(c&((1LU<<r)-1LU))}1)$
   #{!(x&(4294967294LU<<r))}2)~#{!(x&(1431655765LU<<(r*2+2)))}3)
-->((((_1>>#{r}0)&#{iselect(x3>>(r*2+1),1431655765LU)}0)
+->((((_1>>#{r}0)~#{iselect(x3>>(r*2+1),1431655765LU)}0)
     <<#{setbitcount(x3&((2LU<<(r*2))-1))}0)|
#{iselect(mingle(x4,x2),x3)}0)
 >
 ; 32-bit leftshift by 1; there are 8 ways to write this.
@@ -480,8 +480,8 @@
 (_1|#0)->(_1)
 (#0|_1)->(_1)
 [noopxor]
-(_1|#0)->(_1)
-(#0|_1)->(_1)
+(_1^#0)->(_1)
+(#0^_1)->(_1)
 [anditself]
 (_1&_1)->(_1)
 [oritself]
--- ick-0.27/src/parser.y       2007-12-22 09:22:14.000000000 +0000
+++ latest/src/parser.y 2007-12-30 01:08:38.000000000 +0000
@@ -485,12 +485,15 @@
                    $$->rval = newnode();
                    $$->rval->opcode = $1;
                    if($1 == MESH) {
-                           /* enforce the 16-bit constant constraint */
-                           if ((unsigned int)$3 > Max_small)
-                               lose(E017, iyylineno, (char *)NULL);
-                           $$->rval->constant = intern(MESH, $3);
+                     /* enforce the 16-bit constant constraint */
+                     if ((unsigned int)$3 > Max_small)
+                       lose(E017, iyylineno, (char *)NULL);
+                     if(variableconstants) /* AIS */
+                       $$->rval->constant = intern(MESH, $2);
+                     else
+                       $$->rval->constant = $2;
                    }
                    else {
-                       $$->rval->constant = intern($1, $3);
+                     $$->rval->constant = intern($1, $3);
                    }
                }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google