From: <ipe...@us...> - 2011-04-27 18:25:00
|
Revision: 21463 http://x10.svn.sourceforge.net/x10/?rev=21463&view=rev Author: ipeshansky Date: 2011-04-27 18:24:53 +0000 (Wed, 27 Apr 2011) Log Message: ----------- Fix some assertion failures when compiling CUDAKernelTest with the C++ backend. Modified Paths: -------------- trunk/x10.compiler/src/polyglot/types/TypeSystem_c.java trunk/x10.compiler/src/x10/ast/Closure_c.java trunk/x10.compiler/src/x10cuda/types/SharedMem.java trunk/x10.dist/samples/CUDA/CUDAKernelTest.x10 trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 Modified: trunk/x10.compiler/src/polyglot/types/TypeSystem_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/TypeSystem_c.java 2011-04-27 17:47:41 UTC (rev 21462) +++ trunk/x10.compiler/src/polyglot/types/TypeSystem_c.java 2011-04-27 18:24:53 UTC (rev 21463) @@ -793,6 +793,12 @@ private boolean emptyContextSubtype(Type t, X10ClassType xlass) { return isSubtype(t, xlass, EMPTY_CONTEXT); } + /** + * A shortcut version of the subtype test -- only works if xclass cannot be subclassed. + * @param t the type to test + * @param xlass the potential supertype + * @return true if t is a subtype of xclass, and false otherwise + */ private boolean finalSubtype(Type t, X10ClassType xlass) { assert xlass.flags().isStruct() || xlass.flags().isFinal(); return hasSameClassDef(t,xlass) || isUnknown(t); Modified: trunk/x10.compiler/src/x10/ast/Closure_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/Closure_c.java 2011-04-27 17:47:41 UTC (rev 21462) +++ trunk/x10.compiler/src/x10/ast/Closure_c.java 2011-04-27 18:24:53 UTC (rev 21463) @@ -338,7 +338,7 @@ @Override public Context enterChildScope(Node child, Context c) { // We should have entered the method scope already. - if ( c.currentCode() != this.closureDef()) + if (c.currentCode() != this.closureDef()) assert c.currentCode() == this.closureDef(); if (child != body()) { Modified: trunk/x10.compiler/src/x10cuda/types/SharedMem.java =================================================================== --- trunk/x10.compiler/src/x10cuda/types/SharedMem.java 2011-04-27 17:47:41 UTC (rev 21462) +++ trunk/x10.compiler/src/x10cuda/types/SharedMem.java 2011-04-27 18:24:53 UTC (rev 21463) @@ -154,7 +154,7 @@ @Override public void visitChildren(Node parent, NodeVisitor v) { numElements = (Expr) parent.visitChild(numElements, v); - if (init!=null) init = (Expr) init.visitChildren(v); + if (init!=null) init = (Expr) parent.visitChild(init, v); } } private static class Var extends Decl { Modified: trunk/x10.dist/samples/CUDA/CUDAKernelTest.x10 =================================================================== --- trunk/x10.dist/samples/CUDA/CUDAKernelTest.x10 2011-04-27 17:47:41 UTC (rev 21462) +++ trunk/x10.dist/samples/CUDA/CUDAKernelTest.x10 2011-04-27 18:24:53 UTC (rev 21463) @@ -1,4 +1,3 @@ - /* * This file is part of the X10 project (http://x10-lang.org). * Modified: trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 2011-04-27 17:47:41 UTC (rev 21462) +++ trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 2011-04-27 18:24:53 UTC (rev 21463) @@ -30,7 +30,7 @@ * at (rawData.home()) { (this.rawData)() == (this.array)().raw() } * </pre> */ -public class RemoteArray[T]( +public final class RemoteArray[T]( /** * The Region of the remote array */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |