Hi,

the following program does not compile with -STATIC_CHECKS (as expected) 
because it cannot be guaranteed statically that here == v.home at the 
invocation site of operator():

public class Test {
   public static def main(Array[String]) {
     val v = GlobalRef[Cell[Int]](new Cell[Int](100));
     at (here.next()) Console.OUT.println(v());
   }
}

However, if -STATIC-CHECKS is not specified, the compiler does not emit 
a dynamic check for the constraint of operator().  Consequently, also 
-VERBOSE_CHECKS does not print anything.  When running the generated 
program with more than one place, it crashes with a segmentation fault. 
  Why doesn't the compiler generate a dynamic check here?  Is it omitted 
for performance reasons?  Are there other cases where dynamic checks are 
(intentionally?) omitted?


Thanks,
Manuel

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to