From: <ta...@us...> - 2008-11-15 21:40:41
|
Revision: 6802 http://x10.svn.sourceforge.net/x10/?rev=6802&view=rev Author: tardieu Date: 2008-11-15 21:37:49 +0000 (Sat, 15 Nov 2008) Log Message: ----------- tweaked place checks Modified Paths: -------------- trunk/x10.compiler.p3/src/polyglot/ext/x10/query/QueryEngine.java trunk/x10.compiler.p3/src/polyglot/ext/x10/visit/X10PrettyPrinterVisitor.java trunk/x10.runtime.17/src-x10/x10/runtime/Runtime.x10 Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/query/QueryEngine.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/query/QueryEngine.java 2008-11-15 21:37:06 UTC (rev 6801) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/query/QueryEngine.java 2008-11-15 21:37:49 UTC (rev 6802) @@ -65,7 +65,6 @@ if (!Configuration.BAD_PLACE_RUNTIME_CHECK) return false; X10TypeSystem ts = (X10TypeSystem) t.typeSystem(); - if (ts.isPoint(t)) return true; if (ts.isValueType(t)) return false; return true; } Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/visit/X10PrettyPrinterVisitor.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/visit/X10PrettyPrinterVisitor.java 2008-11-15 21:37:06 UTC (rev 6801) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/visit/X10PrettyPrinterVisitor.java 2008-11-15 21:37:49 UTC (rev 6802) @@ -2605,10 +2605,6 @@ boolean needsHereCheck( Receiver target) { boolean needsHereCheck = true; - // calls on future literals - needsHereCheck &= ! (target instanceof Future); - // calls on this - needsHereCheck &= ! (target instanceof Special); // calls on new objects needsHereCheck &= ! (target instanceof New); // others... Modified: trunk/x10.runtime.17/src-x10/x10/runtime/Runtime.x10 =================================================================== --- trunk/x10.runtime.17/src-x10/x10/runtime/Runtime.x10 2008-11-15 21:37:06 UTC (rev 6801) +++ trunk/x10.runtime.17/src-x10/x10/runtime/Runtime.x10 2008-11-15 21:37:49 UTC (rev 6802) @@ -119,7 +119,7 @@ */ public static def evalFuture[T](place:Place, eval:()=>T):Future[T] { val futur = at (place) new Future_c[T](eval); - runAsync(place, Rail.makeVal[Clock_c](0), ()=>futur.run()); + async (place) futur.run(); return futur; } @@ -139,18 +139,10 @@ const PLACE_CHECKS = !Boolean.getBoolean("x10.NO_PLACE_CHECKS"); /** - * Compute location - */ - private static def location(o:Object):Place { - if (o instanceof Ref) return (o as Ref).location; - return here; - } - - /** * Place check */ public static def placeCheck(p:Place, o:Object):Object { - if (PLACE_CHECKS && null != o && location(o) != p) { + if (PLACE_CHECKS && null != o && o instanceof Ref && (o to Ref).location != p) { throw new BadPlaceException("object=" + o + " access at place=" + p); } return o; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |