Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/bugs/resolved/bug002.diderot
ViewVC logotype

Diff of /branches/vis12/bugs/resolved/bug002.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/vis12/bugs/bug002.diderot revision 2146, Sun Feb 17 03:54:05 2013 UTC branches/vis12/bugs/resolved/bug002.diderot revision 2150, Sun Feb 17 18:25:53 2013 UTC
# Line 1  Line 1 
1  /****************  /****************
 (there are two programs here; uncomment one)  
   
2  Compiling this program gives:  Compiling this program gives:
3  [sqr-bug02.diderot:22.32-38] Error: undeclared variable 'foobar'  [sqr-bug02.diderot:22.32-38] Error: undeclared variable 'foobar'
4  uncaught exception Fail [Fail: Error in compiling sqr-bug02.diderot]  uncaught exception Fail [Fail: Error in compiling sqr-bug02.diderot]
# Line 25  Line 23 
23  }  }
24  // Strand initialization  // Strand initialization
25  initially { sqroot(i) | i in 1..1000 };  initially { sqroot(i) | i in 1..1000 };
   
   
 /****************  
   
 But compiling this program gives:  
 ...  
 mid-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 4 nodes, 3 visits, 1 iterations  
 low-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 3 nodes, 2 visits, 1 iterations  
 low-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 3 nodes, 2 visits, 1 iterations  
 low-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 18 nodes, 17 visits, 1 iterations  
 low-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 4 nodes, 3 visits, 1 iterations  
 uncaught exception Fail [Fail: no output specified for strand sqroot]  
   raised at common/phase-timer.sml:76.50-76.52  
   raised at common/phase-timer.sml:76.50-76.52  
   raised at c-target/c-target.sml:151.37-151.83  
   
 So there is actually a descriptive error message in the "Fail", but  
 there's no "Error". Why not put descriptive error messages in "Error",  
 and let the "uncaught exception" signify bugs in the compiler?  
 ****************/  
 /*  
 real eps = 1.0;  
 strand sqroot(real val) {  
    real root = val;  
    update {  
       root = (root + val/root)/2;  
       if (|root^2 - val|/val < eps)  
          stabilize;  
    }  
 }  
 // Strand initialization  
 initially { sqroot(i) | i in 1..1000 };  
 */  

Legend:
Removed from v.2146  
changed lines
  Added in v.2150

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0