From: <ipe...@us...> - 2011-05-11 04:07:21
|
Revision: 21648 http://x10.svn.sourceforge.net/x10/?rev=21648&view=rev Author: ipeshansky Date: 2011-05-11 04:07:14 +0000 (Wed, 11 May 2011) Log Message: ----------- Fix XTENLANG-2152: Add new @NoInferType annotation that prevents type inference on annotated fields and methods. Make @Native extend @NoInferType. Update runtime files and test cases. Modified Paths: -------------- trunk/x10.compiler/src/x10/ast/X10FieldDecl_c.java trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java trunk/x10.compiler/src/x10/errors/Errors.java trunk/x10.runtime/src-x10/x10/array/Array.x10 trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 trunk/x10.runtime/src-x10/x10/compiler/Native.x10 trunk/x10.runtime/src-x10/x10/lang/Boolean.x10 trunk/x10.runtime/src-x10/x10/lang/Byte.x10 trunk/x10.runtime/src-x10/x10/lang/Int.x10 trunk/x10.runtime/src-x10/x10/lang/Long.x10 trunk/x10.runtime/src-x10/x10/lang/Place.x10 trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 trunk/x10.runtime/src-x10/x10/lang/Short.x10 trunk/x10.runtime/src-x10/x10/lang/Throwable.x10 trunk/x10.runtime/src-x10/x10/lang/UByte.x10 trunk/x10.runtime/src-x10/x10/lang/UInt.x10 trunk/x10.runtime/src-x10/x10/lang/ULong.x10 trunk/x10.runtime/src-x10/x10/lang/UShort.x10 trunk/x10.runtime/src-x10/x10/util/Vec.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicBoolean.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicInteger.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicLong.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 trunk/x10.tests/examples/Benchmarks/Benchmark.x10 Added Paths: ----------- trunk/x10.runtime/src-x10/x10/compiler/NoInferType.x10 Modified: trunk/x10.compiler/src/x10/ast/X10FieldDecl_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/X10FieldDecl_c.java 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.compiler/src/x10/ast/X10FieldDecl_c.java 2011-05-11 04:07:14 UTC (rev 21648) @@ -341,10 +341,27 @@ // Do not infer types of mutable fields, since there could be more than one assignment and the compiler might not see them all. if (type instanceof UnknownTypeNode && ! flags.flags().isFinal()) Errors.issue(tb.job(), new Errors.CannotInferNonFinalFieldType(position())); - + return n; } + private static boolean computing = false; + public static boolean shouldInferType(Node n, TypeSystem ts) { + if (computing) + throw new NullPointerException(); + try { + computing = true; + Type at = ts.systemResolver().findOne(QName.make("x10.compiler.NoInferType")); + boolean res = ((X10Ext)n.ext()).annotationMatching(at).isEmpty(); + if (res == true) return true; + return res; + } catch (SemanticException e) { + return false; + } finally { + computing = false; + } + } + @Override public Node setResolverOverride(Node parent, TypeCheckPreparer v) { if (type() instanceof UnknownTypeNode && init != null) { @@ -366,12 +383,19 @@ @Override public Node typeCheckOverride(Node parent, ContextVisitor tc) { + NodeVisitor childtc = tc.enter(parent, this); - if (hasType != null && ! flags().flags().isFinal()) { + List<AnnotationNode> oldAnnotations = ((X10Ext) ext()).annotations(); + List<AnnotationNode> newAnnotations = node().visitList(oldAnnotations, childtc); + + // Do not infer types of native fields + if (type instanceof UnknownTypeNode && ! shouldInferType(this, tc.typeSystem())) + Errors.issue(tc.job(), new Errors.CannotInferNativeFieldType(position())); + + if (hasType != null && ! flags().flags().isFinal()) { Errors.issue(tc.job(), new Errors.OnlyValMayHaveHasType(this)); } - if (type() instanceof UnknownTypeNode) { - NodeVisitor childtc = tc.enter(parent, this); + if (type() instanceof UnknownTypeNode && shouldInferType(this, tc.typeSystem())) { Expr init = (Expr) this.visitChild(init(), childtc); if (init != null) { @@ -421,11 +445,9 @@ TypeNode tn = (TypeNode) this.visitChild(type(), childtc); Node n = tc.leave(parent, this, reconstruct(flags, tn, name, init, htn), childtc); - List<AnnotationNode> oldAnnotations = ((X10Ext) ext()).annotations(); if (oldAnnotations == null || oldAnnotations.isEmpty()) { return n; } - List<AnnotationNode> newAnnotations = node().visitList(oldAnnotations, childtc); if (! CollectionUtil.allEqual(oldAnnotations, newAnnotations)) { return ((X10Del) n.del()).annotations(newAnnotations); } @@ -483,7 +505,6 @@ Errors.issue(tc.job(), new Errors.StaticFieldMustHaveInitializer(name, position())); } - NodeFactory nf = (NodeFactory) tc.nodeFactory(); X10FieldDecl_c n = (X10FieldDecl_c) this.type((CanonicalTypeNode) nf.CanonicalTypeNode(type().position(), type).ext(type().ext().copy())); Modified: trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java 2011-05-11 04:07:14 UTC (rev 21648) @@ -259,7 +259,7 @@ } mi.setFormalNames(formalNames); - if (n.returnType() instanceof UnknownTypeNode && n.body() == null) { + if (n.returnType() instanceof UnknownTypeNode && n.body() == null && X10FieldDecl_c.shouldInferType(this, ts)) { Errors.issue(tb.job(), new Errors.CannotInferMethodReturnType(position())); NodeFactory nf = tb.nodeFactory(); @@ -913,8 +913,15 @@ TypeSystem xts = (TypeSystem) tc.typeSystem(); + // Step 0. Process annotations. + TypeChecker childtc = (TypeChecker) tc.enter(parent, nn); + nn = (X10MethodDecl) X10Del_c.visitAnnotations(nn, childtc); + + // Do not infer types of native fields + if (nn.returnType() instanceof UnknownTypeNode && ! X10FieldDecl_c.shouldInferType(this, xts)) + Errors.issue(tc.job(), new Errors.CannotInferNativeMethodReturnType(position())); + // Step I.a. Check the formals. - TypeChecker childtc = (TypeChecker) tc.enter(parent, nn); // First, record the final status of each of the type params and formals. List<TypeParamNode> processedTypeParams = nn.visitList(nn.typeParameters(), childtc); @@ -922,8 +929,6 @@ List<Formal> processedFormals = nn.visitList(nn.formals(), childtc); nn = (X10MethodDecl) nn.formals(processedFormals); - nn = (X10MethodDecl) X10Del_c.visitAnnotations(nn, childtc); - // [NN]: Don't do this here, do it on lookup of the formal. We don't want spurious self constraints in the signature. // for (Formal n : processedFormals) { // Ref<Type> ref = (Ref<Type>) n.type().typeRef(); @@ -1089,7 +1094,7 @@ nn = (X10MethodDecl) nn.body((Block) nn.visitChild(nn.body(), childtc2)); nn = (X10MethodDecl) childtc2.leave(parent, old, nn, childtc2); - if (nn.returnType() instanceof UnknownTypeNode) { + if (nn.returnType() instanceof UnknownTypeNode && X10FieldDecl_c.shouldInferType(this, tc.typeSystem())) { NodeFactory nf = tc.nodeFactory(); TypeSystem ts = (TypeSystem) tc.typeSystem(); // Body had no return statement. Set to void. Modified: trunk/x10.compiler/src/x10/errors/Errors.java =================================================================== --- trunk/x10.compiler/src/x10/errors/Errors.java 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.compiler/src/x10/errors/Errors.java 2011-05-11 04:07:14 UTC (rev 21648) @@ -1283,21 +1283,29 @@ } } public static class CannotInferFieldType extends EqualByTypeAndPosException { - private static final long serialVersionUID = -8796440936111998457L; - public CannotInferFieldType(Position p) { super("Cannot infer field type; field has no initializer.", p); } } public static class CannotInferNonFinalFieldType extends EqualByTypeAndPosException { - private static final long serialVersionUID = 5501955726545364951L; - public CannotInferNonFinalFieldType(Position p) { super("Cannot infer type of non-final fields.", p); } } + public static class CannotInferNativeFieldType extends EqualByTypeAndPosException { + private static final long serialVersionUID = -1957463133947941268L; + public CannotInferNativeFieldType(Position p) { + super("Cannot infer type of native fields.", p); + } + } + public static class CannotInferNativeMethodReturnType extends EqualByTypeAndPosException { + private static final long serialVersionUID = 1285634999428441833L; + public CannotInferNativeMethodReturnType(Position p) { + super("Cannot infer return type of native methods.", p); + } + } public static class CannotDeclareStaticNonFinalField extends EqualByTypeAndPosException { private static final long serialVersionUID = 3538350155759773020L; Modified: trunk/x10.runtime/src-x10/x10/array/Array.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/array/Array.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/array/Array.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -504,7 +504,7 @@ * @see #set(T, Point) */ @Native("cuda", "(#this).raw[#i0] = (#v)") - public @Header @Inline operator this(i0:int)=(v:T){rank==1}:T { + public @Header @Inline operator this(i0:int)=(v:T){rank==1}:T{self==v} { if (rail) { // Bounds checking by backing IndexedMemoryChunk is sufficient raw(i0) = v; @@ -530,7 +530,7 @@ * @see #operator(Int, Int) * @see #set(T, Point) */ - public @Header @Inline operator this(i0:int,i1:int)=(v:T){rank==2}:T { + public @Header @Inline operator this(i0:int,i1:int)=(v:T){rank==2}:T{self==v} { if (CompilerFlags.checkBounds() && !region.contains(i0, i1)) { raiseBoundsError(i0, i1); } @@ -552,7 +552,7 @@ * @see #operator(Int, Int, Int) * @see #set(T, Point) */ - public @Header @Inline operator this(i0:int, i1:int, i2:int)=(v:T){rank==3}:T { + public @Header @Inline operator this(i0:int, i1:int, i2:int)=(v:T){rank==3}:T{self==v} { if (CompilerFlags.checkBounds() && !region.contains(i0, i1, i2)) { raiseBoundsError(i0, i1, i2); } @@ -575,7 +575,7 @@ * @see #operator(Int, Int, Int, Int) * @see #set(T, Point) */ - public @Header @Inline operator this( i0:int, i1:int, i2:int, i3:int)=(v:T){rank==4}:T { + public @Header @Inline operator this( i0:int, i1:int, i2:int, i3:int)=(v:T){rank==4}:T{self==v} { if (CompilerFlags.checkBounds() && !region.contains(i0, i1, i2, i3)) { raiseBoundsError(i0, i1, i2, i3); } @@ -594,7 +594,7 @@ * @see #operator(Point) * @see #set(T, Int) */ - public @Header @Inline operator this(p:Point{self.rank==this.rank})=(v:T):T { + public @Header @Inline operator this(p:Point{self.rank==this.rank})=(v:T):T{self==v} { if (CompilerFlags.checkBounds() && !region.contains(p)) { raiseBoundsError(p); } Modified: trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/array/RemoteArray.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -107,7 +107,7 @@ * @see #set(T, Int) */ @Native("cuda", "(#this).raw[#1]") - public operator this(i:Int) {here==array.home, rank==1} = this()(i); + public operator this(i:Int) {here==array.home, rank==1}:T = this()(i); /** * Return the element of this array corresponding to the given point. @@ -135,7 +135,7 @@ * @see #set(T, Point) */ @Native("cuda", "(#this).raw[#i] = (#v)") - public operator this(i:Int)=(v:T) {here==array.home, rank==1} = this()(i)=v; + public operator this(i:Int)=(v:T) {here==array.home, rank==1}:T{self==v} = this()(i)=v; /** * Set the element of this array corresponding to the given point to the given value. Modified: trunk/x10.runtime/src-x10/x10/compiler/Native.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/compiler/Native.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/compiler/Native.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -38,4 +38,4 @@ * * As for "java" except boxed and run-time representations of type vars should not be used. */ -public interface Native(lang: String, code: String) extends StatementAnnotation, MethodAnnotation, FieldAnnotation { } +public interface Native(lang: String, code: String) extends NoInferType, StatementAnnotation, MethodAnnotation, FieldAnnotation { } Added: trunk/x10.runtime/src-x10/x10/compiler/NoInferType.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/compiler/NoInferType.x10 (rev 0) +++ trunk/x10.runtime/src-x10/x10/compiler/NoInferType.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -0,0 +1,28 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2006-2010. + */ + +package x10.compiler; + +import x10.lang.annotations.MethodAnnotation; +import x10.lang.annotations.FieldAnnotation; + +/** + * This annotation is used to allow the programmer + * to communicate to the compiler that the type for + * the annotated method or field should not be + * inferred (and must be specified explicitly). + * This annotation is intended to be extended by + * other annotations.</p> + * + * This annotation is processed by the X10 compiler's + * type checker. + */ +public interface NoInferType extends MethodAnnotation, FieldAnnotation { } Modified: trunk/x10.runtime/src-x10/x10/lang/Boolean.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Boolean.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Boolean.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -72,14 +72,14 @@ */ @Native("java", "true") @Native("c++", "true") - public static TRUE = true; + public static TRUE: Boolean{self==true} = true; /** * A constant holding the Boolean value 'false'. */ @Native("java", "false") @Native("c++", "false") - public static FALSE = false; + public static FALSE: Boolean{self==false} = false; /** Modified: trunk/x10.runtime/src-x10/x10/lang/Byte.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Byte.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Byte.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -282,14 +282,14 @@ */ @Native("java", "java.lang.Byte.MIN_VALUE") @Native("c++", "((x10_byte)0x80)") - public static MIN_VALUE = 0x80 as Byte; + public static MIN_VALUE: Byte{self==0x80Y} = 0x80Y; /** * A constant holding the maximum value a Byte can have, 2<sup>7</sup>-1. */ @Native("java", "java.lang.Byte.MAX_VALUE") @Native("c++", "((x10_byte)0x7f)") - public static MAX_VALUE = 0x7f as Byte; + public static MAX_VALUE: Byte{self==0x7fY} = 0x7fY; /** * Returns a String representation of this Byte in the specified radix. Modified: trunk/x10.runtime/src-x10/x10/lang/Int.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Int.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Int.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -285,14 +285,14 @@ */ @Native("java", "java.lang.Integer.MIN_VALUE") @Native("c++", "((x10_int)0x80000000)") - public static MIN_VALUE = 0x80000000; + public static MIN_VALUE: Int{self==0x80000000} = 0x80000000; /** * A constant holding the maximum value an Int can have, 2<sup>31</sup>-1. */ @Native("java", "java.lang.Integer.MAX_VALUE") @Native("c++", "((x10_int)0x7fffffff)") - public static MAX_VALUE = 0x7fffffff; + public static MAX_VALUE: Int{self==0x7fffffff} = 0x7fffffff; /** Modified: trunk/x10.runtime/src-x10/x10/lang/Long.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Long.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Long.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -282,14 +282,14 @@ */ @Native("java", "java.lang.Long.MIN_VALUE") @Native("c++", "(x10_long)0x8000000000000000LL") - public static MIN_VALUE = 0x8000000000000000L; + public static MIN_VALUE: Long{self==0x8000000000000000L} = 0x8000000000000000L; /** * A constant holding the maximum value a Long can have, 2<sup>63</sup>-1. */ @Native("java", "java.lang.Long.MAX_VALUE") @Native("c++", "(x10_long)0x7fffffffffffffffLL") - public static MAX_VALUE = 0x7fffffffffffffffL; + public static MAX_VALUE: Long{self==0x7fffffffffffffffL} = 0x7fffffffffffffffL; /** Modified: trunk/x10.runtime/src-x10/x10/lang/Place.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Place.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Place.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -32,12 +32,12 @@ */ @Native("java", "x10.runtime.impl.java.Runtime.MAX_PLACES") @Native("c++", "x10aux::num_places") - public static ALL_PLACES:Int = 4; + public static ALL_PLACES: Int = 4; /** The number of places not including accelerators. */ @Native("java", "x10.runtime.impl.java.Runtime.MAX_PLACES") @Native("c++", "x10aux::num_hosts") - public static MAX_PLACES:Int = 4; + public static MAX_PLACES: Int = 4; /** The number of accelerators. */ public static NUM_ACCELS = ALL_PLACES - MAX_PLACES; Modified: trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -56,10 +56,10 @@ // Native runtime interface @Native("c++", "PLATFORM_MAX_THREADS") - private static PLATFORM_MAX_THREADS = Int.MAX_VALUE; + private static PLATFORM_MAX_THREADS: Int = Int.MAX_VALUE; @Native("c++", "DEFAULT_STATIC_THREADS") - private static DEFAULT_STATIC_THREADS = false; + private static DEFAULT_STATIC_THREADS: Boolean = false; @Native("java", "x10.runtime.impl.java.Runtime.loadenv()") @Native("c++", "x10aux::loadenv()") @@ -111,39 +111,39 @@ static PRINT_STATS = false; @Native("c++","x10aux::asyncs_sent") - static def getAsyncsSent() = 0L; + static def getAsyncsSent():Long = 0L; @Native("c++","x10aux::asyncs_sent = #v") - static def setAsyncsSent(v:Long) { } + static def setAsyncsSent(v:Long):void { } @Native("c++","x10aux::asyncs_received") - static def getAsyncsReceived() = 0L; + static def getAsyncsReceived():Long = 0L; @Native("c++","x10aux::asyncs_received = #v") - static def setAsyncsReceived(v:Long) { } + static def setAsyncsReceived(v:Long):void { } @Native("c++","x10aux::serialized_bytes") - static def getSerializedBytes() = 0L; + static def getSerializedBytes():Long = 0L; @Native("c++","x10aux::serialized_bytes = #v") - static def setSerializedBytes(v:Long) { } + static def setSerializedBytes(v:Long):void { } @Native("c++","x10aux::deserialized_bytes") - static def getDeserializedBytes() = 0L; + static def getDeserializedBytes():Long = 0L; @Native("c++","x10aux::deserialized_bytes = #v") - static def setDeserializedBytes(v:Long) { } + static def setDeserializedBytes(v:Long):void { } // Methods for explicit memory management @Native("c++", "x10::lang::Object::dealloc_object((x10::lang::Object*)#o.operator->())") - public static def deallocObject (o:Object) { } + public static def deallocObject (o:Object):void { } @Native("c++", "x10aux::dealloc(#o.operator->())") - public static def dealloc[T] (o:()=>T) { } + public static def dealloc[T] (o:()=>T):void { } @Native("c++", "x10aux::dealloc(#o.operator->())") - public static def dealloc (o:()=>void) { } + public static def dealloc (o:()=>void):void { } // Configuration options Modified: trunk/x10.runtime/src-x10/x10/lang/Short.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Short.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Short.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -281,14 +281,14 @@ */ @Native("java", "java.lang.Short.MIN_VALUE") @Native("c++", "((x10_short)0x8000)") - public static MIN_VALUE = 0x8000 as Short; + public static MIN_VALUE: Short{self==0x8000S} = 0x8000S; /** * A constant holding the maximum value a Short can have, 2<sup>15</sup>-1. */ @Native("java", "java.lang.Short.MAX_VALUE") @Native("c++", "((x10_short)0x7fff)") - public static MAX_VALUE = 0x7fff as Short; + public static MAX_VALUE: Short{self==0x7fffS} = 0x7fffS; /** Modified: trunk/x10.runtime/src-x10/x10/lang/Throwable.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Throwable.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/Throwable.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -43,7 +43,7 @@ @Native("java", "#this.getMessage()") @Native("c++", "(#this)->getMessage()") - public def getMessage() = message; + public def getMessage():String = message; @Native("java", "#this.getCause()") @Native("c++", "(#this)->getCause()") @@ -51,7 +51,7 @@ @Native("java", "#this.toString()") @Native("c++", "x10aux::to_string(#this)") - public def toString() { + public def toString():String { val m = getMessage(); return m == null ? typeName() : typeName() + ": " + getMessage(); } Modified: trunk/x10.runtime/src-x10/x10/lang/UByte.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/UByte.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/UByte.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -378,14 +378,14 @@ */ // @Native("java", "0") @Native("c++", "((x10_ubyte)0U)") - public static MIN_VALUE = 0 as UByte; + public static MIN_VALUE: UByte{self==0UY} = 0UY; /** * A constant holding the maximum value a UByte can have, 2<sup>8</sup>-1. */ // @Native("java", "((byte)0xff)") @Native("c++", "((x10_ubyte)0xffU)") - public static MAX_VALUE = 0xff as UByte; + public static MAX_VALUE: UByte{self==0xffUY} = 0xffUY; /** Modified: trunk/x10.runtime/src-x10/x10/lang/UInt.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/UInt.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/UInt.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -376,14 +376,14 @@ */ // @Native("java", "0") @Native("c++", "((x10_uint)0U)") - public static MIN_VALUE = 0 as UInt; + public static MIN_VALUE: UInt{self==0U} = 0U; /** * A constant holding the maximum value a UInt can have, 2<sup>32</sup>-1. */ // @Native("java", "0xffffffff") @Native("c++", "((x10_uint)0xffffffffU)") - public static MAX_VALUE = 0xffffffff as UInt; + public static MAX_VALUE: UInt{self==0xffffffffU} = 0xffffffffU; /** Modified: trunk/x10.runtime/src-x10/x10/lang/ULong.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/ULong.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/ULong.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -392,14 +392,14 @@ */ // @Native("java", "0L") @Native("c++", "((x10_ulong)0LLU)") - public static MIN_VALUE = 0UL; + public static MIN_VALUE: ULong{self==0ul} = 0UL; /** * A constant holding the maximum value a ULong can have, 2<sup>64</sup>-1. */ // @Native("java", "0xffffffffffffffffL") @Native("c++", "0xffffffffffffffffLLU") - public static MAX_VALUE = 0xffffffffffffffffUL; + public static MAX_VALUE: ULong{self==0xffffffffffffffffUL} = 0xffffffffffffffffUL; /** Modified: trunk/x10.runtime/src-x10/x10/lang/UShort.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/UShort.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/lang/UShort.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -379,14 +379,14 @@ */ // @Native("java", "((short)0)") @Native("c++", "((x10_ushort)0U)") - public static MIN_VALUE = 0 as UShort; + public static MIN_VALUE: UShort{self==0US} = 0US; /** * A constant holding the maximum value a UShort can have, 2<sup>16</sup>-1. */ // @Native("java", "((short)0xffff)") @Native("c++", "((x10_ushort)0xffffU)") - public static MAX_VALUE = 0xffff as UShort; + public static MAX_VALUE: UShort{self==0xffffUS} = 0xffffUS; /** Modified: trunk/x10.runtime/src-x10/x10/util/Vec.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/Vec.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/util/Vec.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -27,7 +27,7 @@ @Native("java", "new x10.core.Vec<#U$box>(#U$rtt, #s)") @Native("c++", "x10::util::NativeVec<#U, #s>(#s)") - public static def make[U](s:Int) {U haszero} = new Vec[U](s); + public static def make[U](s:Int) {U haszero}: Vec[U]{self.size==s} = new Vec[U](s); @Native("java", "#this.get(#i)") @Native("c++", "#this.get(#i)") Modified: trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicBoolean.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicBoolean.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicBoolean.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -22,33 +22,33 @@ * We do this instead of using a boolean so that we know that compareAndSet_32 * can work on the whole memory word. */ - private @Volatile var value:int; + private @Volatile var value:Int; public def this():AtomicBoolean { value = 0; } - public def this(v:boolean):AtomicBoolean { + public def this(v:Boolean):AtomicBoolean { value = v ? 1 : 0; } @Native("java", "#this.get()") - public def get():boolean = value == 1; + public def get():Boolean = value == 1; @Native("java", "#this.set(#v)") - public def set(v:boolean):void { + public def set(v:Boolean):void { value = v ? 1 : 0; } @Native("java", "#this.compareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_boolean_funs::compareAndSet(#this, #expect, #update)") - public native def compareAndSet(expect:boolean, update:boolean):boolean; + public native def compareAndSet(expect:Boolean, update:Boolean):Boolean; @Native("java", "#this.weakCompareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_boolean_funs::weakCompareAndSet(#this, #expect, #update)") - public native def weakCompareAndSet(expect:boolean, update:boolean):boolean; + public native def weakCompareAndSet(expect:Boolean, update:Boolean):Boolean; @Native("java", "#this.getAndSet(#v)") - public def getAndSet(v:boolean):boolean { + public def getAndSet(v:Boolean):Boolean { val oldVal = get(); set(v); return oldVal; Modified: trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicInteger.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicInteger.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicInteger.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -18,53 +18,53 @@ @NativeRep("java", "x10.core.concurrent.AtomicInteger", null, "x10.core.concurrent.AtomicInteger.$RTT") public final class AtomicInteger { - private @Volatile var value:int; + private @Volatile var value:Int; public def this() { value = 0; } - public def this(v:int) { value = v; } + public def this(v:Int) { value = v; } @Native("java", "#this.get()") - public def get():int = value; + public def get():Int = value; @Native("java", "#this.set(#newV)") - public def set(newV:int):void { + public def set(newV:Int):void { value = newV; } @Native("java", "#this.compareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_int_funs::compareAndSet(#this,#expect,#update)") - public native def compareAndSet(expect:int, update:int):boolean; + public native def compareAndSet(expect:Int, update:Int):Boolean; @Native("java", "#this.weakCompareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_int_funs::weakCompareAndSet(#this,#expect,#update)") - public native def weakCompareAndSet(expect:int, update:int):boolean; + public native def weakCompareAndSet(expect:Int, update:Int):Boolean; @Native("java", "#this.getAndIncrement()") - public def getAndIncrement() = getAndAdd(1); + public def getAndIncrement():Int = getAndAdd(1); @Native("java", "#this.getAndDecrement()") - public def getAndDecrement() = getAndAdd(-1); + public def getAndDecrement():Int = getAndAdd(-1); @Native("java", "#this.getAndAdd(#delta)") @Native("c++", "x10aux::atomic_int_funs::getAndAdd(#this, #delta)") - public native def getAndAdd(delta:int):int; + public native def getAndAdd(delta:Int):Int; @Native("java", "#this.incrementAndGet()") - public def incrementAndGet():int = addAndGet(1); + public def incrementAndGet():Int = addAndGet(1); @Native("java", "#this.decrementAndGet()") - public def decrementAndGet():int = addAndGet(-1); + public def decrementAndGet():Int = addAndGet(-1); @Native("java", "#this.addAndGet(#delta)") @Native("c++", "x10aux::atomic_int_funs::addAndGet(#this, #delta)") - public native def addAndGet(delta:int):int; + public native def addAndGet(delta:Int):Int; @Native("java", "#this.toString()") public def toString():String = get().toString(); @Native("java", "#this.intValue()") - public def intValue():int = get(); + public def intValue():Int = get(); @Native("java", "#this.longValue()") public def longValue():long = get() as Long; Modified: trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicLong.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicLong.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicLong.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -17,46 +17,46 @@ @NativeRep("java", "x10.core.concurrent.AtomicLong", null, "x10.core.concurrent.AtomicLong.$RTT") public final class AtomicLong { - private @Volatile var value:long; + private @Volatile var value:Long; public def this() { value = 0; } - public def this(v:long) { value = v; } + public def this(v:Long) { value = v; } @Native("java", "#this.get()") - public def get():long = value; + public def get():Long = value; @Native("java", "#this.set(#newV)") - public def set(newV:long):void { + public def set(newV:Long):void { value = newV; } @Native("java", "#this.compareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_long_funs::compareAndSet(#this,#expect,#update)") - public native def compareAndSet(expect:long, update:long):boolean; + public native def compareAndSet(expect:Long, update:Long):Boolean; @Native("java", "#this.weakCompareAndSet(#expect,#update)") @Native("c++", "x10aux::atomic_long_funs::weakCompareAndSet(#this,#expect,#update)") - public native def weakCompareAndSet(expect:long, update:long):boolean; + public native def weakCompareAndSet(expect:Long, update:Long):Boolean; @Native("java", "#this.getAndIncrement()") - public def getAndIncrement():long = getAndAdd(1); + public def getAndIncrement():Long = getAndAdd(1); @Native("java", "#this.getAndDecrement()") - public def getAndDecrement():long = getAndAdd(-1); + public def getAndDecrement():Long = getAndAdd(-1); @Native("java", "#this.getAndAdd(#delta)") @Native("c++", "x10aux::atomic_long_funs::getAndAdd(#this,#delta)") - public native def getAndAdd(delta:long):long; + public native def getAndAdd(delta:Long):Long; @Native("java", "#this.incrementAndGet()") - public def incrementAndGet():long = addAndGet(1); + public def incrementAndGet():Long = addAndGet(1); @Native("java", "#this.decrementAndGet()") - public def decrementAndGet():long = addAndGet(-1); + public def decrementAndGet():Long = addAndGet(-1); @Native("java", "#this.addAndGet(#delta)") @Native("c++", "x10aux::atomic_long_funs::addAndGet(#this, #delta)") - public native def addAndGet(delta:long):long; + public native def addAndGet(delta:Long):Long; @Native("java", "#this.toString()") public def toString():String = get().toString(); @@ -65,7 +65,7 @@ public def intValue():int = get() as Int; @Native("java", "#this.longValue()") - public def longValue():long = get(); + public def longValue():Long = get(); @Native("java", "#this.floatValue()") public def floatValue():float = get() as Float; Modified: trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -42,11 +42,11 @@ @Native("java", "#this.compareAndSet(#expect,#update)") @Native("c++", "(#this)->compareAndSet(#expect,#update)") - public native def compareAndSet(expect:T, update:T):boolean; + public native def compareAndSet(expect:T, update:T):Boolean; @Native("java", "#this.weakCompareAndSet(#expect,#update)") @Native("c++", "(#this)->weakCompareAndSet(#expect,#update)") - public native def weakCompareAndSet(expect:T, update:T):boolean; + public native def weakCompareAndSet(expect:T, update:T):Boolean; @Native("java", "#this.getAndSet(#v)") @Native("c++", "(#this)->getAndSet(#v)") Modified: trunk/x10.tests/examples/Benchmarks/Benchmark.x10 =================================================================== --- trunk/x10.tests/examples/Benchmarks/Benchmark.x10 2011-05-10 21:52:18 UTC (rev 21647) +++ trunk/x10.tests/examples/Benchmarks/Benchmark.x10 2011-05-11 04:07:14 UTC (rev 21648) @@ -35,7 +35,7 @@ @Native("java", "\"java\"") @Native("c++", "x10::lang::String::Lit(\"cpp\")") - static lg = ""; + static lg:String = ""; static WARMUP = 30.0; // java warmup time in secs static TIMING = 10.0; // how long to run tests in secs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2011-05-15 01:09:53
|
Revision: 21727 http://x10.svn.sourceforge.net/x10/?rev=21727&view=rev Author: dgrove-oss Date: 2011-05-15 01:09:43 +0000 (Sun, 15 May 2011) Log Message: ----------- Revert r21702 because it results in test cases (eg ArrayCopy1) hanging when running multi-place. Modified Paths: -------------- trunk/x10.compiler/src/x10/visit/ExpressionFlattener.java trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 Modified: trunk/x10.compiler/src/x10/visit/ExpressionFlattener.java =================================================================== --- trunk/x10.compiler/src/x10/visit/ExpressionFlattener.java 2011-05-14 21:14:25 UTC (rev 21726) +++ trunk/x10.compiler/src/x10/visit/ExpressionFlattener.java 2011-05-15 01:09:43 UTC (rev 21727) @@ -104,6 +104,7 @@ private static final boolean DEBUG = false; private static final boolean XTENLANG_2055 = true; // bug work around: don't flatten Marshall.x10 + private static final boolean XTENLANG_2336 = true; // bug work around: don't flatten Runtime.x10 private final TypeSystem xts; private AltSynthesizer syn; // move functionality to Synthesizer @@ -177,6 +178,9 @@ Position pos = n.position(); // for DEBUGGING if (n instanceof SourceFile){ Source s = ((SourceFile) n).source(); + if (XTENLANG_2336 && s.name().equals("Runtime.x10")) { // BUG: cannot flatten Runtime + return true; + } if (XTENLANG_2055 && s.name().equals("Marshal.x10")) { // BUG: can't flatten Marshal return true; } Modified: trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2011-05-14 21:14:25 UTC (rev 21726) +++ trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2011-05-15 01:09:43 UTC (rev 21727) @@ -17,7 +17,6 @@ import x10.compiler.PerProcess; import x10.compiler.Pragma; import x10.compiler.StackAllocate; -import x10.compiler.TempNoInline_0; import x10.compiler.TempNoInline_1; import x10.util.Random; @@ -447,7 +446,7 @@ } // unpark worker - @TempNoInline_0 public def unpark() { + public def unpark() { if (!STATIC_THREADS) { super.unpark(); } @@ -749,8 +748,8 @@ /** * Run at statement - */ // TempNoInline_0 annotation is a work-arround for XTENLANG-2336 - public static @TempNoInline_0 def runAt(place:Place, body:()=>void):void { + */ + public static def runAt(place:Place, body:()=>void):void { Runtime.ensureNotInAtomic(); if (place.id == hereInt()) { try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ipe...@us...> - 2011-05-16 20:26:28
|
Revision: 21763 http://x10.svn.sourceforge.net/x10/?rev=21763&view=rev Author: ipeshansky Date: 2011-05-16 20:26:21 +0000 (Mon, 16 May 2011) Log Message: ----------- Fix XTENLANG-2725: Do not assume that the method is invoked in its object's home place. XTENLANG-1905 and XTENLANG-2674 WIP: Store the place term of a method in its def, so we know what it is when looking up calls and reporting errors. XTENLANG-1929 WIP: Pass a context when translating 'here' into the constraint. Update testsuite. Modified Paths: -------------- trunk/x10.compiler/src/polyglot/ast/MethodDecl_c.java trunk/x10.compiler/src/x10/ast/AtExpr_c.java trunk/x10.compiler/src/x10/ast/AtStmt_c.java trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java trunk/x10.compiler/src/x10/types/AtDef.java trunk/x10.compiler/src/x10/types/AtDef_c.java trunk/x10.compiler/src/x10/types/ClosureDef.java trunk/x10.compiler/src/x10/types/ClosureDef_c.java trunk/x10.compiler/src/x10/types/ThisDef.java trunk/x10.compiler/src/x10/types/ThisDef_c.java trunk/x10.compiler/src/x10/types/TypeDef_c.java trunk/x10.compiler/src/x10/types/X10CodeDef.java trunk/x10.compiler/src/x10/types/X10ConstructorDef_c.java trunk/x10.compiler/src/x10/types/X10InitializerDef_c.java trunk/x10.compiler/src/x10/types/X10MethodDef_c.java trunk/x10.compiler/src/x10/types/XTypeTranslator.java trunk/x10.compiler/src/x10/types/checker/PlaceChecker.java trunk/x10.compiler/src/x10/util/synthesizer/MethodSynth.java trunk/x10.tests/examples/Constructs/Atomic/Atomic1.x10 trunk/x10.tests/examples/Constructs/Atomic/Atomic1a.x10 trunk/x10.tests/examples/Misc/x10/frontend/tests/FrontEndTests_MustFailCompile.x10 Modified: trunk/x10.compiler/src/polyglot/ast/MethodDecl_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/MethodDecl_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/polyglot/ast/MethodDecl_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -17,6 +17,7 @@ import x10.errors.Errors; import x10.errors.Errors.InterfaceMethodsMustBePublic; import x10.types.MethodInstance; +import x10.types.X10ClassDef; import x10.types.X10TypeEnv_c; import x10.visit.Desugarer; import x10.ast.X10ClassDecl_c; @@ -162,7 +163,7 @@ public abstract Node buildTypesOverride(TypeBuilder tb); - protected abstract MethodDef createMethodDef(TypeSystem ts, ClassDef ct, Flags flags); + protected abstract MethodDef createMethodDef(TypeSystem ts, X10ClassDef ct, Flags flags); public Context enterScope(Context c) { Reporter reporter = c.typeSystem().extensionInfo().getOptions().reporter; Modified: trunk/x10.compiler/src/x10/ast/AtExpr_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/AtExpr_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/ast/AtExpr_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -130,7 +130,7 @@ Context c = tc.context(); ClosureDef def = (ClosureDef) this.codeDef(); if (def.placeTerm() == null) { - XConstrainedTerm placeTerm = null; + XConstrainedTerm placeTerm; try { placeTerm = PlaceChecker.computePlaceTerm(place, tc.context(), ts); } catch (SemanticException se) { @@ -148,11 +148,11 @@ // now that placeTerm is computed for this node, install it in the context // and continue visiting children - Context oldC=c; + Context oldC = c; c = super.enterChildScope(this.body, childtc.context()); XConstrainedTerm pt = def.placeTerm(); if (pt != null) { - if (c==oldC) + if (c == oldC) c = c.pushBlock(); c.setPlace(pt); } Modified: trunk/x10.compiler/src/x10/ast/AtStmt_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/AtStmt_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/ast/AtStmt_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -155,15 +155,13 @@ return this; } - protected XConstrainedTerm placeTerm; - - protected XConstrainedTerm finishPlaceTerm; public boolean isFinishPlace() { boolean isFinishPlace = false; - if (null != finishPlaceTerm) { + AtDef def = atDef(); + if (null != def.finishPlaceTerm()) { XConstraint constraint = new XConstraint(); - constraint.addBinding(finishPlaceTerm.term(),placeTerm.term()); - if (placeTerm.constraint().entails(constraint)) { + constraint.addBinding(def.finishPlaceTerm().term(),def.placeTerm().term()); + if (def.placeTerm().constraint().entails(constraint)) { isFinishPlace = true; } } @@ -227,19 +225,24 @@ } Context c = tc.context(); - XConstrainedTerm placeTerm; - XConstrainedTerm finishPlaceTerm = null; - try { - placeTerm = PlaceChecker.computePlaceTerm(place, c, ts); - finishPlaceTerm = c.currentFinishPlaceTerm(); - } catch (SemanticException e) { - CConstraint d = new CConstraint(); - XTerm term = PlaceChecker.makePlace(); - try { - placeTerm = XConstrainedTerm.instantiate(d, term); - } catch (XFailure z) { - throw new InternalCompilerError("Cannot construct placeTerm from term and constraint."); - } + AtDef def = this.atDef(); + if (def.placeTerm() == null) { + XConstrainedTerm placeTerm; + XConstrainedTerm finishPlaceTerm = null; + try { + placeTerm = PlaceChecker.computePlaceTerm(place, c, ts); + finishPlaceTerm = c.currentFinishPlaceTerm(); + } catch (SemanticException e) { + CConstraint d = new CConstraint(); + XTerm term = PlaceChecker.makePlace(); + try { + placeTerm = XConstrainedTerm.instantiate(d, term); + } catch (XFailure z) { + throw new InternalCompilerError("Cannot construct placeTerm from term and constraint."); + } + } + def.setPlaceTerm(placeTerm); + def.setFinishPlaceTerm(finishPlaceTerm); } // now that placeTerm is computed for this node, install it in the context @@ -247,20 +250,14 @@ Context oldC = c; c = super.enterChildScope(body, childtc.context()); - if (placeTerm != null) { + XConstrainedTerm pt = def.placeTerm(); + if (pt != null) { if (c == oldC) - c=c.pushBlock(); - c.setPlace(placeTerm); + c = c.pushBlock(); + c.setPlace(pt); } Stmt body = (Stmt) visitChild(this.body, childtc.context(c)); AtStmt_c n = this.reconstruct(place, body); - if (placeTerm != n.placeTerm || finishPlaceTerm != n.finishPlaceTerm) { - if (n == this) { - n = (AtStmt_c) n.copy(); - } - n.placeTerm = placeTerm; - n.finishPlaceTerm = finishPlaceTerm; - } return tc.leave(parent, this, n, childtc); } Modified: trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -138,9 +138,6 @@ DepParameterExpr guard; List<TypeParamNode> typeParameters; - // set by createMethodDef. - public XTerm placeTerm; - TypeNode offerType; TypeNode hasType; public X10MethodDecl_c(NodeFactory nf, Position pos, FlagsNode flags, @@ -176,13 +173,13 @@ return this; } - protected X10MethodDef createMethodDef(TypeSystem ts, ClassDef ct, Flags flags) { - X10MethodDef mi = (X10MethodDef) ((TypeSystem) ts).methodDef(position(), Types.ref(ct.asType()), flags, returnType.typeRef(), name.id(), + protected X10MethodDef createMethodDef(TypeSystem ts, X10ClassDef ct, Flags flags) { + X10MethodDef mi = (X10MethodDef) ts.methodDef(position(), Types.ref(ct.asType()), flags, returnType.typeRef(), name.id(), Collections.<Ref<? extends Type>>emptyList(), offerType == null ? null : offerType.typeRef()); - mi.setThisDef(((X10ClassDef) ct).thisDef()); - this.placeTerm = PlaceChecker.methodPT(flags, ct); + mi.setThisDef(ct.thisDef()); + mi.setPlaceTerm(PlaceChecker.methodPlaceTerm(mi)); return mi; } @@ -192,7 +189,7 @@ // is visited after the appropriate information is set up TypeSystem ts = tb.typeSystem(); - ClassDef ct = tb.currentClass(); + X10ClassDef ct = tb.currentClass(); assert ct != null; Flags flags = this.flags.flags(); @@ -390,7 +387,7 @@ public Context enterChildScope(Node child, Context c) { // We should have entered the method scope already. assert c.currentCode() == this.methodDef(); - Context oldC=c; + Context oldC = c; if (child != body()) { // Push formals so they're in scope in the types of the other formals. c = c.pushBlock(); @@ -410,18 +407,18 @@ // entering the appropriate children if (child == body || child == returnType || child == hasType || child == offerType || child == guard || (formals != null && formals.contains(child))) { + X10MethodDef md = methodDef(); + XConstrainedTerm placeTerm = md == null ? null : md.placeTerm(); + if (placeTerm == null) { + placeTerm = PlaceChecker.methodPlaceTerm(md); + } if (c == oldC) c = c.pushBlock(); - PlaceChecker.setHereTerm(methodDef(), placeTerm, c); - if (placeTerm != null) { - c.setPlace(XConstrainedTerm.make(placeTerm)); - } else { - PlaceChecker.setHereTerm(methodDef(), c); - } + c.setPlace(placeTerm); } if (child == body && offerType != null && offerType.typeRef().known()) { - if (oldC==c) + if (oldC == c) c = c.pushBlock(); c.setCollectingFinishScope(offerType.type()); } Modified: trunk/x10.compiler/src/x10/types/AtDef.java =================================================================== --- trunk/x10.compiler/src/x10/types/AtDef.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/AtDef.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -42,11 +42,6 @@ boolean staticContext(); - /** - * Set the term (symbolic name) standing for the place at which the body of this closure is intended to execute. - * @param t - */ - void setPlaceTerm(XConstrainedTerm t); - - XConstrainedTerm placeTerm(); + XConstrainedTerm finishPlaceTerm(); + void setFinishPlaceTerm(XConstrainedTerm t); } Modified: trunk/x10.compiler/src/x10/types/AtDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/AtDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/AtDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -35,7 +35,6 @@ // TODO: factor out common bits of code from here and AsyncDef_c protected Ref<? extends CodeInstance<?>> methodContainer; protected Ref<? extends ClassType> typeContainer; - protected XConstrainedTerm placeTerm; protected List<VarInstance<? extends VarDef>> capturedEnvironment; public AtDef_c(TypeSystem ts, Position pos, @@ -69,12 +68,14 @@ return (AtInstance) asInstance; } - public void setPlaceTerm(XConstrainedTerm p) { - this.placeTerm = p; + protected XConstrainedTerm finishPlaceTerm; + public XConstrainedTerm finishPlaceTerm() { return finishPlaceTerm; } + public void setFinishPlaceTerm(XConstrainedTerm pt) { + if (finishPlaceTerm != null) + assert (finishPlaceTerm == null); + finishPlaceTerm = pt; } - public XConstrainedTerm placeTerm() { return placeTerm;} - public Ref<? extends ClassType> typeContainer() { return typeContainer; } Modified: trunk/x10.compiler/src/x10/types/ClosureDef.java =================================================================== --- trunk/x10.compiler/src/x10/types/ClosureDef.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/ClosureDef.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -58,12 +58,4 @@ boolean staticContext(); void setStaticContext(boolean v); - - /** - * Set the term (symbolic name) standing for the place at which the body of this closure is intended to execute. - * @param t - */ - void setPlaceTerm(XConstrainedTerm t); - - XConstrainedTerm placeTerm(); } Modified: trunk/x10.compiler/src/x10/types/ClosureDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/ClosureDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/ClosureDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -52,7 +52,6 @@ //protected Ref<TypeConstraint> typeGuard; protected CodeInstance<?> asInstance; - protected XConstrainedTerm placeTerm; protected Ref<? extends Type> offerType; protected List<VarInstance<? extends VarDef>> capturedEnvironment; @@ -180,13 +179,14 @@ this.thisDef = thisDef; } - public void setPlaceTerm(XConstrainedTerm p) { - this.placeTerm = p; + protected XConstrainedTerm placeTerm; + public XConstrainedTerm placeTerm() { return placeTerm; } + public void setPlaceTerm(XConstrainedTerm pt) { + if (placeTerm != null) + assert (placeTerm == null); + placeTerm = pt; } - public XConstrainedTerm placeTerm() { return placeTerm;} - - public List<LocalDef> formalNames() { return Collections.unmodifiableList(formalNames); } Modified: trunk/x10.compiler/src/x10/types/ThisDef.java =================================================================== --- trunk/x10.compiler/src/x10/types/ThisDef.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/ThisDef.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -20,7 +20,5 @@ ThisInstance asInstance(); XVar thisVar(); void setThisVar(XVar thisVar); - XTerm placeTerm(); - void setPlaceTerm(XTerm xt); public static final Name THIS = Name.make("this"); } Modified: trunk/x10.compiler/src/x10/types/ThisDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/ThisDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/ThisDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -94,16 +94,6 @@ this.thisVar = thisVar; } - private XTerm placeTerm; - public XTerm placeTerm() { return placeTerm; } - // FIXME Yoav: keep only the first is a bad strategy because these place terms are used in other types, and other constructs (like AtStmt_c) - public void setPlaceTerm(XTerm pt) { - if (placeTerm == null) - placeTerm = pt; - //else - // assert placeTerm == pt; - } - @Override public Ref<? extends Type> type() { Ref<? extends Type> result = type; Modified: trunk/x10.compiler/src/x10/types/TypeDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/TypeDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/TypeDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -37,6 +37,7 @@ import x10.types.constraints.CConstraint; import x10.types.constraints.CTerms; import x10.types.constraints.TypeConstraint; +import x10.types.constraints.XConstrainedTerm; public class TypeDef_c extends MemberDef_c implements TypeDef { private static final long serialVersionUID = -5353460234705168368L; @@ -186,6 +187,14 @@ this.thisDef = thisDef; } + protected XConstrainedTerm placeTerm; + public XConstrainedTerm placeTerm() { return placeTerm; } + public void setPlaceTerm(XConstrainedTerm pt) { + if (placeTerm != null) + assert (placeTerm == null); + placeTerm = pt; + } + public List<LocalDef> formalNames() { return Collections.unmodifiableList(formalNames); } Modified: trunk/x10.compiler/src/x10/types/X10CodeDef.java =================================================================== --- trunk/x10.compiler/src/x10/types/X10CodeDef.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/X10CodeDef.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -14,6 +14,9 @@ import java.util.List; import polyglot.types.CodeDef; +import x10.types.constraints.XConstrainedTerm; public interface X10CodeDef extends CodeDef { + XConstrainedTerm placeTerm(); + void setPlaceTerm(XConstrainedTerm xt); } Modified: trunk/x10.compiler/src/x10/types/X10ConstructorDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/X10ConstructorDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/X10ConstructorDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -31,6 +31,7 @@ import x10.types.constraints.CConstraint; import x10.types.constraints.CTerms; import x10.types.constraints.TypeConstraint; +import x10.types.constraints.XConstrainedTerm; /** * An X10ConstructorDef_c varies from a ConstructorDef_c only in that it @@ -130,6 +131,14 @@ this.thisDef = thisDef; } + protected XConstrainedTerm placeTerm; + public XConstrainedTerm placeTerm() { return placeTerm; } + public void setPlaceTerm(XConstrainedTerm pt) { + if (placeTerm != null) + assert (placeTerm == null); + placeTerm = pt; + } + public List<LocalDef> formalNames() { return Collections.unmodifiableList(formalNames); } Modified: trunk/x10.compiler/src/x10/types/X10InitializerDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/X10InitializerDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/X10InitializerDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -28,6 +28,7 @@ import x10.constraint.XVar; import x10.types.constraints.CTerms; import x10.types.constraints.TypeConstraint; +import x10.types.constraints.XConstrainedTerm; public class X10InitializerDef_c extends InitializerDef_c implements X10InitializerDef { private static final long serialVersionUID = 8967174982510527953L; @@ -52,6 +53,14 @@ this.thisDef = thisDef; } + protected XConstrainedTerm placeTerm; + public XConstrainedTerm placeTerm() { return placeTerm; } + public void setPlaceTerm(XConstrainedTerm pt) { + if (placeTerm != null) + assert (placeTerm == null); + placeTerm = pt; + } + // BEGIN ANNOTATION MIXIN List<Ref<? extends Type>> annotations; Modified: trunk/x10.compiler/src/x10/types/X10MethodDef_c.java =================================================================== --- trunk/x10.compiler/src/x10/types/X10MethodDef_c.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/X10MethodDef_c.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -47,6 +47,7 @@ import x10.types.constraints.CConstraint; import x10.types.constraints.CTerms; import x10.types.constraints.TypeConstraint; +import x10.types.constraints.XConstrainedTerm; import x10.ast.X10Call_c; public class X10MethodDef_c extends MethodDef_c implements X10MethodDef { @@ -107,7 +108,7 @@ public XVar thisVar() { if (this.thisDef != null) return this.thisDef.thisVar(); - return CTerms.makeThis(); // Why #this instead of this? + return CTerms.makeThis(); } ThisDef thisDef; @@ -120,6 +121,14 @@ this.thisDef = thisDef; } + protected XConstrainedTerm placeTerm; + public XConstrainedTerm placeTerm() { return placeTerm; } + public void setPlaceTerm(XConstrainedTerm pt) { + if (placeTerm != null) + assert (placeTerm == null); + placeTerm = pt; + } + public Ref<? extends Type> offerType() { return this.offerType; } Modified: trunk/x10.compiler/src/x10/types/XTypeTranslator.java =================================================================== --- trunk/x10.compiler/src/x10/types/XTypeTranslator.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/XTypeTranslator.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -125,7 +125,7 @@ if (term instanceof Lit) return translate((Lit) term); if (term instanceof Here) - return transHere(); + return transHere(xc); if (term instanceof Variable) return trans(c, (Variable) term, xc, tl); if (term instanceof X10Special) @@ -539,7 +539,11 @@ // ********************************************************************************************* // *********************************** private help routines for translation******************** - private XTerm transHere() { + private XTerm transHere(Context c) { + // TODO + //XConstrainedTerm placeTerm = c.currentPlaceTerm(); + //if (placeTerm == null) return XTerms.makeEQV(); + //return placeTerm.term(); return PlaceChecker.here(); } private XLocal trans(Local t) { Modified: trunk/x10.compiler/src/x10/types/checker/PlaceChecker.java =================================================================== --- trunk/x10.compiler/src/x10/types/checker/PlaceChecker.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/types/checker/PlaceChecker.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -37,7 +37,6 @@ import x10.errors.Errors; import x10.errors.Errors.PlaceTypeErrorMethodShouldBeLocalOrGlobal; import x10.types.FunctionType_c; -import x10.types.X10ClassDef; import polyglot.types.Context; import x10.types.ConstrainedType; import x10.types.X10FieldInstance; @@ -241,20 +240,14 @@ public static void setHereTerm(MethodDef md, Context c) { - setHereTerm(md, null, c); + c = c.pushBlock(); + if (isGlobalCode(md)) { + c.setPlace(XConstrainedTerm.make(makePlace())); + } else { + setHereIsThisHome(c); + } } - public static void setHereTerm(MethodDef md, XTerm pt, Context c) { - c = c.pushBlock(); - if (pt != null) { - c.setPlace(XConstrainedTerm.make(pt)); - } else { - if (isGlobalCode(md)) { - c.setPlace(XConstrainedTerm.make(makePlace())); - } else { - setHereIsThisHome(c); - } - } - } + public static void setHereTerm(FieldDef fd, Context c) { Flags flags = fd.flags(); if (flags.isStatic()) { @@ -279,11 +272,16 @@ } } - public static XTerm methodPT(Flags flags, ClassDef ct) { - boolean isGlobal = flags.isStatic() || Types.isX10Struct(ct.asType()); - return (isGlobal) ? - makePlace() : - homeVar(((X10ClassDef) ct).thisVar(), (TypeSystem) ct.typeSystem()); + public static XConstrainedTerm methodPlaceTerm(MethodDef md) { + CConstraint d = new CConstraint(); + // XTENLANG-2725: in X10 2.2, all methods are "global" + boolean isGlobal = true; // || md.flags().isStatic() || Types.isX10Struct(ct.asType()); + XTerm term = isGlobal ? makePlace() : homeVar(md.thisVar(), md.typeSystem()); + try { + return XConstrainedTerm.instantiate(d, term); + } catch (XFailure z) { + throw new InternalCompilerError("Cannot construct placeTerm from term and constraint."); + } } /** @@ -294,7 +292,8 @@ */ static boolean isGlobalCode(MethodDef md) { Flags flags = md.flags(); - boolean isGlobal = flags.isStatic() || Types.isX10Struct(md.container().get()); + // XTENLANG-2725: in X10 2.2, all methods are "global" + boolean isGlobal = true || flags.isStatic() || Types.isX10Struct(md.container().get()); return isGlobal; } @@ -368,7 +367,6 @@ try { pt = XConstrainedTerm.instantiate(d, term); } catch (XFailure z) { - throw new InternalCompilerError("Cannot construct placeTerm from " + term + " and constraint " + d + "."); } Modified: trunk/x10.compiler/src/x10/util/synthesizer/MethodSynth.java =================================================================== --- trunk/x10.compiler/src/x10/util/synthesizer/MethodSynth.java 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.compiler/src/x10/util/synthesizer/MethodSynth.java 2011-05-16 20:26:21 UTC (rev 21763) @@ -58,7 +58,6 @@ List<Formal> formals; X10MethodDef methodDef; //only be created once; X10MethodDecl methodDecl; //only be created once; - XTerm placeTerm; public MethodSynth(NodeFactory xnf, Context xct, Position pos, ClassDef classDef, Name methodName, @@ -87,7 +86,6 @@ formalTypeRefs );//this constructor will not set formal names methodDef.setThisDef(((X10ClassDef) classDef).thisDef()); - placeTerm = PlaceChecker.methodPT(flags, classDef); methodDef.setFormalNames(formalNames); classDef.addMethod(methodDef); @@ -273,7 +271,6 @@ methodDecl = methodDecl.typeParameters(tpNodes); } - ((X10MethodDecl_c) methodDecl).placeTerm = placeTerm; methodDecl = (X10MethodDecl) methodDecl.methodDef(methodDef); //Need set the method def to the method instance return methodDecl; Modified: trunk/x10.tests/examples/Constructs/Atomic/Atomic1.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Atomic/Atomic1.x10 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.tests/examples/Constructs/Atomic/Atomic1.x10 2011-05-16 20:26:21 UTC (rev 21763) @@ -18,7 +18,6 @@ * inside the same atomic section. */ public class Atomic1 extends x10Test { - private val root = GlobalRef[Atomic1](this); transient var cnt: int = 0; transient var cnt_broken: int = 0; public static N: int = 100; @@ -33,15 +32,14 @@ } public def run(): boolean = { - val root = this.root; - val a = Future.make[int](()=> root().threadRun()); - val b = Future.make[int](()=> root().threadRun()); - val c = Future.make[int](()=> root().threadRun()); - val d = Future.make[int](()=> root().threadRun()); - val e = Future.make[int](()=> root().threadRun()); - val f = Future.make[int](()=> root().threadRun()); - val g = Future.make[int](()=> root().threadRun()); - val h = Future.make[int](()=> root().threadRun()); + val a = Future.make[int](()=>threadRun()); + val b = Future.make[int](()=>threadRun()); + val c = Future.make[int](()=>threadRun()); + val d = Future.make[int](()=>threadRun()); + val e = Future.make[int](()=>threadRun()); + val f = Future.make[int](()=>threadRun()); + val g = Future.make[int](()=>threadRun()); + val h = Future.make[int](()=>threadRun()); val i = a(); val j = b(); val k = c(); Modified: trunk/x10.tests/examples/Constructs/Atomic/Atomic1a.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Atomic/Atomic1a.x10 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.tests/examples/Constructs/Atomic/Atomic1a.x10 2011-05-16 20:26:21 UTC (rev 21763) @@ -18,7 +18,6 @@ * inside the same atomic section. */ public class Atomic1a extends x10Test { - private val root = GlobalRef[Atomic1a](this); transient var cnt: int = 0; transient var cnt_broken: int = 0; public static N: int = 100; @@ -33,15 +32,14 @@ } public def run(): boolean = { - val root = this.root; - val a = ()=> root().threadRun(); - val b = ()=> root().threadRun(); - val c = ()=> root().threadRun(); - val d = ()=> root().threadRun(); - val e = ()=> root().threadRun(); - val f = ()=> root().threadRun(); - val g = ()=> root().threadRun(); - val h = ()=> root().threadRun(); + val a = ()=>threadRun(); + val b = ()=>threadRun(); + val c = ()=>threadRun(); + val d = ()=>threadRun(); + val e = ()=>threadRun(); + val f = ()=>threadRun(); + val g = ()=>threadRun(); + val h = ()=>threadRun(); val i = a(); val j = b(); val k = c(); Modified: trunk/x10.tests/examples/Misc/x10/frontend/tests/FrontEndTests_MustFailCompile.x10 =================================================================== --- trunk/x10.tests/examples/Misc/x10/frontend/tests/FrontEndTests_MustFailCompile.x10 2011-05-16 18:12:21 UTC (rev 21762) +++ trunk/x10.tests/examples/Misc/x10/frontend/tests/FrontEndTests_MustFailCompile.x10 2011-05-16 20:26:21 UTC (rev 21763) @@ -2144,7 +2144,7 @@ private val root = GlobalRef(this); def test1() { val x = (new TestGlobalRefHomeAt2()).root; - return @ShouldNotBeERR x(); + return x(); } def test2() { val x = (at (here.next()) new TestGlobalRefHomeAt2()).root; @@ -2156,7 +2156,7 @@ } def test4() { val x = this.root; - return @ShouldBeErr x(); + return @ERR x(); } def test5(y:TestGlobalRefHomeAt2) { val x = y.root; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mt...@us...> - 2011-06-22 07:37:50
|
Revision: 22288 http://x10.svn.sourceforge.net/x10/?rev=22288&view=rev Author: mtake Date: 2011-06-22 07:37:43 +0000 (Wed, 22 Jun 2011) Log Message: ----------- rename Type.instanceof$ as Type.instanceOf Modified Paths: -------------- trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java trunk/x10.runtime/src-java/x10/core/GlobalRef.java trunk/x10.runtime/src-java/x10/core/Vec.java trunk/x10.runtime/src-java/x10/rtt/BooleanType.java trunk/x10.runtime/src-java/x10/rtt/ByteType.java trunk/x10.runtime/src-java/x10/rtt/CharType.java trunk/x10.runtime/src-java/x10/rtt/DoubleType.java trunk/x10.runtime/src-java/x10/rtt/FloatType.java trunk/x10.runtime/src-java/x10/rtt/IntType.java trunk/x10.runtime/src-java/x10/rtt/LongType.java trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java trunk/x10.runtime/src-java/x10/rtt/ShortType.java trunk/x10.runtime/src-java/x10/rtt/StringType.java trunk/x10.runtime/src-java/x10/rtt/Type.java trunk/x10.runtime/src-java/x10/rtt/Types.java trunk/x10.runtime/src-java/x10/rtt/UByteType.java trunk/x10.runtime/src-java/x10/rtt/UIntType.java trunk/x10.runtime/src-java/x10/rtt/ULongType.java trunk/x10.runtime/src-java/x10/rtt/UShortType.java trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java Modified: trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java =================================================================== --- trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -2213,7 +2213,7 @@ Type t = c.compareType().type(); // Now x10.lang.Object is @NativeRep'ed to x10.core.RefI. - // Therefore x10.rtt.Types.OBJECT.instanceof$(o) works as designed. + // Therefore x10.rtt.Types.OBJECT.instanceOf(o) works as designed. // // Fix for XTENLANG-1099 // TypeSystem xts = tr.typeSystem(); // if (xts.typeEquals(xts.Object(), t, tr.context())) { @@ -2259,7 +2259,7 @@ } w.write("."); - w.write("instanceof$("); + w.write("instanceOf("); Type exprType = Types.baseType(c.expr().type()); boolean needParen = false; @@ -2479,7 +2479,7 @@ w.write("x10.core.ArrayFactory.<"); er.printType(t, PRINT_TYPE_PARAMS | BOX_PRIMITIVES); - w.write(">"); + w.write("> "); w.write("makeArrayFromJavaArray("); new RuntimeTypeExpander(er, t).expand(); w.write(", "); Modified: trunk/x10.runtime/src-java/x10/core/GlobalRef.java =================================================================== --- trunk/x10.runtime/src-java/x10/core/GlobalRef.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/core/GlobalRef.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -238,7 +238,7 @@ } final public boolean _struct_equals$O(java.lang.Object other) { - if (!x10.core.GlobalRef.$RTT.instanceof$(other, T)) { + if (!x10.core.GlobalRef.$RTT.instanceOf(other, T)) { return false; } return this._struct_equals((x10.core.GlobalRef<T>) other); Modified: trunk/x10.runtime/src-java/x10/core/Vec.java =================================================================== --- trunk/x10.runtime/src-java/x10/core/Vec.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/core/Vec.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -125,7 +125,7 @@ } final public boolean equals(java.lang.Object other) { - if (!Vec.$RTT.instanceof$(other, T)) { + if (!Vec.$RTT.instanceOf(other, T)) { return false; } return this.equals_0_$_x10$util$Vec_T_$((Vec) Types.asStruct(new ParameterizedType(Vec.$RTT, T), other)); @@ -140,7 +140,7 @@ } final public boolean _struct_equals$O(java.lang.Object other) { - if (!Vec.$RTT.instanceof$(other, T)) return false; + if (!Vec.$RTT.instanceOf(other, T)) return false; return this._struct_equals_0_$_x10$util$Vec_T_$((Vec) Types.asStruct(new ParameterizedType(Vec.$RTT, T), other)); } Modified: trunk/x10.runtime/src-java/x10/rtt/BooleanType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/BooleanType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/BooleanType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -36,7 +36,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Boolean; } Modified: trunk/x10.runtime/src-java/x10/rtt/ByteType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/ByteType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/ByteType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -38,7 +38,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Byte; } Modified: trunk/x10.runtime/src-java/x10/rtt/CharType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/CharType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/CharType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -37,7 +37,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Char; } Modified: trunk/x10.runtime/src-java/x10/rtt/DoubleType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/DoubleType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/DoubleType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -38,7 +38,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Double; } Modified: trunk/x10.runtime/src-java/x10/rtt/FloatType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/FloatType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/FloatType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -38,7 +38,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Float; } Modified: trunk/x10.runtime/src-java/x10/rtt/IntType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/IntType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/IntType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -39,7 +39,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Int; } Modified: trunk/x10.runtime/src-java/x10/rtt/LongType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/LongType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/LongType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -38,7 +38,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Long; } Modified: trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -44,8 +44,8 @@ return false; } - public final boolean instanceof$(Object o) { - return rtt.instanceof$(o, params); + public final boolean instanceOf(Object o) { + return rtt.instanceOf(o, params); } @Override Modified: trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -102,7 +102,7 @@ return true; } - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { if (o == null) {return false;} if (o.getClass() == impl) { return true; @@ -111,7 +111,7 @@ } // o instanceof This and params - public final boolean instanceof$(Object o, Type<?>... params) { + public final boolean instanceOf(Object o, Type<?>... params) { if (o == null) {return false;} Class<?> target = o.getClass(); if (target == impl || checkAnonymous(target)) { @@ -387,7 +387,7 @@ } // for shortcut - public boolean instanceof$(Object o, Type<?> param0) { + public boolean instanceOf(Object o, Type<?> param0) { if (o == null) {return false;} Class<?> target = o.getClass(); if (target == impl || checkAnonymous(target)) { @@ -425,7 +425,7 @@ // for shortcut - public final boolean instanceof$(Object o, Type<?> param0, Type<?> param1) { + public final boolean instanceOf(Object o, Type<?> param0, Type<?> param1) { if (o == null) {return false;} Class<?> target = o.getClass(); if (target == impl || checkAnonymous(target)) { @@ -476,7 +476,7 @@ // for shortcut - public final boolean instanceof$(Object o, Type<?> param0, Type<?> param1, Type<?> param2) { + public final boolean instanceOf(Object o, Type<?> param0, Type<?> param1, Type<?> param2) { if (o == null) {return false;} Class<?> target = o.getClass(); if (target == impl || checkAnonymous(target)) { Modified: trunk/x10.runtime/src-java/x10/rtt/ShortType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/ShortType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/ShortType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -38,7 +38,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.Short; } Modified: trunk/x10.runtime/src-java/x10/rtt/StringType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/StringType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/StringType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -33,7 +33,7 @@ } @Override - public boolean instanceof$(Object obj) { + public boolean instanceOf(Object obj) { // rules for String boxing currently are not straightforward, // so we accept both unboxed (java.lang) and boxed (x10.core) objects. return obj instanceof java.lang.String || obj instanceof x10.core.String; Modified: trunk/x10.runtime/src-java/x10/rtt/Type.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/Type.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/Type.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -13,7 +13,7 @@ public interface Type<T> extends java.io.Serializable { - boolean instanceof$(Object o); + boolean instanceOf(Object o); boolean equals(Object o); boolean isSubtype(Type<?> o); Modified: trunk/x10.runtime/src-java/x10/rtt/Types.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/Types.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/Types.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -170,19 +170,19 @@ // for convenience public static boolean instanceOf(Object o, RuntimeType<?> rtt) { - return rtt.instanceof$(o); + return rtt.instanceOf(o); } public static boolean instanceOf(Object o, RuntimeType<?> rtt, Type<?> param0) { - return rtt.instanceof$(o, param0); + return rtt.instanceOf(o, param0); } public static boolean instanceOf(Object o, RuntimeType<?> rtt, Type<?> param0, Type<?> param1) { - return rtt.instanceof$(o, param0, param1); + return rtt.instanceOf(o, param0, param1); } public static boolean instanceOf(Object o, RuntimeType<?> rtt, Type<?> param0, Type<?> param1, Type<?> param2) { - return rtt.instanceof$(o, param0, param1, param2); + return rtt.instanceOf(o, param0, param1, param2); } public static boolean instanceOf(Object o, RuntimeType<?> rtt, Type<?>... params) { - return rtt.instanceof$(o, params); + return rtt.instanceOf(o, params); } public static final RuntimeType<Object> ANY = new AnyType(); @@ -446,14 +446,14 @@ public static <T> T cast(final java.lang.Object self, x10.rtt.Type<?> rtt) { if (self == null) return null; - if (rtt != null && !rtt.instanceof$(self)) throw new x10.lang.ClassCastException(rtt.typeName()); + if (rtt != null && !rtt.instanceOf(self)) throw new x10.lang.ClassCastException(rtt.typeName()); return (T) self; } public static <T> T castConversion(final java.lang.Object self, x10.rtt.Type<?> rtt) { if (self == null) return null; T ret = (T) conversion(rtt, self, true); - if (rtt != null && !rtt.instanceof$(ret)) throw new x10.lang.ClassCastException(rtt.typeName()); + if (rtt != null && !rtt.instanceOf(ret)) throw new x10.lang.ClassCastException(rtt.typeName()); return ret; } Modified: trunk/x10.runtime/src-java/x10/rtt/UByteType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/UByteType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/UByteType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -39,7 +39,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.UByte; } Modified: trunk/x10.runtime/src-java/x10/rtt/UIntType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/UIntType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/UIntType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -39,7 +39,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.UInt; } Modified: trunk/x10.runtime/src-java/x10/rtt/ULongType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/ULongType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/ULongType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -39,7 +39,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.ULong; } Modified: trunk/x10.runtime/src-java/x10/rtt/UShortType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/UShortType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/UShortType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -39,7 +39,7 @@ // for shortcut @Override - public boolean instanceof$(Object o) { + public boolean instanceOf(Object o) { return o instanceof x10.core.UShort; } Modified: trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java 2011-06-22 07:13:53 UTC (rev 22287) +++ trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java 2011-06-22 07:37:43 UTC (rev 22288) @@ -74,7 +74,7 @@ throw new UnsupportedOperationException(); } - public final boolean instanceof$(Object o) { + public final boolean instanceOf(Object o) { throw new UnsupportedOperationException(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2011-08-05 05:15:05
|
Revision: 22660 http://x10.svn.sourceforge.net/x10/?rev=22660&view=rev Author: salikh Date: 2011-08-05 05:14:58 +0000 (Fri, 05 Aug 2011) Log Message: ----------- XTENLANG-2856 Fix String boxing condition uniformly * this should fix a regression of Constructs.CollectingFinish CF10 * also add tests from XTENLANG-2856 Modified Paths: -------------- trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java Added Paths: ----------- trunk/x10.tests/examples/Constructs/Boxing/ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 Modified: trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java =================================================================== --- trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java 2011-08-05 00:30:58 UTC (rev 22659) +++ trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java 2011-08-05 05:14:58 UTC (rev 22660) @@ -2136,8 +2136,8 @@ new RuntimeTypeExpander(er, Types.baseType(castType)).expand(tr); w.write(","); } else { - // box only if converting to function type - if (xts.isFunctionType(castType)) { + // box only if converting to function type or to x10.lang.Object + if (xts.isFunctionType(castType) || isObject(castType, tr.context())) { er.printBoxConversion(e.type()); } } @@ -2343,7 +2343,10 @@ castRE.expand(); w.write(","); } else { - er.printBoxConversion(exprType); + // box only if converting to function type or to x10.lang.Object + if (xts.isFunctionType(castType) || isObject(castType,tr.context())) { + er.printBoxConversion(exprType); + } w.write("("); } closeParen = true; @@ -3356,8 +3359,8 @@ w.write(","); closeParen = true; } else { - // need to box string only if it is cast to function type - if (xts.isFunctionType(castType)) { + // need to box string only if it is cast to function type or to x10.lang.Object + if (xts.isFunctionType(castType) || isObject(castType, tr.context())) { er.printBoxConversion(e.type()); w.write("("); closeParen = true; @@ -3730,7 +3733,10 @@ new RuntimeTypeExpander(er, Types.baseType(castType)).expand(tr); w.write(","); } else { - er.printBoxConversion(e.type()); + // need to box string only if it is cast to function type or to x10.lang.Object + if (xts.isFunctionType(castType) || isObject(castType, tr.context())) { + er.printBoxConversion(e.type()); + } w.write("("); } c.print(e, w, tr); @@ -4171,6 +4177,10 @@ public static boolean isString(Type type, Context context) { return Types.baseType(type).typeEquals(type.typeSystem().String(), context); } + + public static boolean isObject(Type type, Context context) { + return Types.baseType(type).typeEquals(type.typeSystem().Object(), context); + } public static boolean isPrimitiveRepedJava(Type t) { return t.isBoolean() || t.isChar() || t.isNumeric(); Added: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 (rev 0) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 2011-08-05 05:14:58 UTC (rev 22660) @@ -0,0 +1,40 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2011. + */ + +import harness.x10Test; + +/** + * Test Array[UInt] + * + * @author Salikh Zakirov 5/2011 + */ +public class StringBoxing1 extends x10Test { + + static def makefun[X](a:Any): ()=>X = { + () => a as X + } + + static def makefun2[X](a:(Int)=>Char): ()=>X = { + () => a as X + } + + public def run(): boolean = { + val fs = makefun[String]("This is a string1"); + Console.OUT.println(fs()); + val fs2 = makefun2[String]("This is a string2"); + Console.OUT.println(fs2()); + return true; + } + + public static def main(Array[String]) { + new StringBoxing1().execute(); + } +} Added: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 (rev 0) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 2011-08-05 05:14:58 UTC (rev 22660) @@ -0,0 +1,41 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2011. + */ + +import harness.x10Test; + +/** + * Test Array[UInt] + * + * @author Salikh Zakirov 5/2011 + */ +public class StringBoxing2 extends x10Test { + + static def makefun[X](): (Any)=>X = { + (x:Any) => x as X + } + + static def makefun2[X](): ((Int)=>Char)=>X = { + (a:(Int)=>Char) => a as X + } + + + public def run(): boolean = { + val fs = makefun[String](); + Console.OUT.println(fs("This is a string1")); + val fs2 = makefun2[String](); + Console.OUT.println(fs2("This is a string2")); + return true; + } + + public static def main(Array[String]) { + new StringBoxing2().execute(); + } +} Added: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 (rev 0) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 2011-08-05 05:14:58 UTC (rev 22660) @@ -0,0 +1,40 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2011. + */ + +import harness.x10Test; + +/** + * Test Array[UInt] + * + * @author Salikh Zakirov 5/2011 + */ +public class StringBoxing3 extends x10Test { + + static def makefun[X](a:Object): ()=>X = { + () => a as X + } + + static def makefun2[X](): (Object)=>X = { + (a:Object) => a as X + } + + public def run(): boolean = { + val fs = makefun[String]("This is a string1"); + Console.OUT.println(fs()); + val fs2 = makefun2[String](); + Console.OUT.println(fs2("This is a string2")); + return true; + } + + public static def main(Array[String]) { + new StringBoxing3().execute(); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yz...@us...> - 2011-08-24 21:22:18
|
Revision: 22798 http://x10.svn.sourceforge.net/x10/?rev=22798&view=rev Author: yzibin Date: 2011-08-24 21:22:11 +0000 (Wed, 24 Aug 2011) Log Message: ----------- cleaned up test suite Modified Paths: -------------- trunk/x10.compiler/src/x10/ast/X10Cast_c.java trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 trunk/x10.tests/examples/Constructs/Override/CovariantOverride.x10 trunk/x10.tests/examples/LangSpec/Classes/Classes5l3r_Bad33_MustFailCompile.x10 trunk/x10.tests/examples/LangSpec/Expressions/Expressions6y9i.x10 trunk/x10.tests/examples/LangSpec/Types/Types9j6e.x10 trunk/x10.tests/examples/Samples/KMeansSPMDTest.x10 Modified: trunk/x10.compiler/src/x10/ast/X10Cast_c.java =================================================================== --- trunk/x10.compiler/src/x10/ast/X10Cast_c.java 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.compiler/src/x10/ast/X10Cast_c.java 2011-08-24 21:22:11 UTC (rev 22798) @@ -174,6 +174,7 @@ // Therefore we do not produce warnings in compiler-generated code (too confusing for the programmer). // In addition, I also don't report the 3 warnings we have in XRX (or else every client of HashMap will have a warning) if (!position.isCompilerGenerated() && + !position.file().contains("Accumulator.x10")&& !position.file().contains("Array.x10")&& !position.file().contains("Box.x10")&& !position.file().contains("HashMap.x10")&& Modified: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -19,11 +19,11 @@ public class StringBoxing1 extends x10Test { static def makefun[X](a:Any): ()=>X = { - () => a as X + () => a as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } static def makefun2[X](a:(Int)=>Char): ()=>X = { - () => a as X + () => a as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } public def run(): boolean = { Modified: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -19,11 +19,11 @@ public class StringBoxing2 extends x10Test { static def makefun[X](): (Any)=>X = { - (x:Any) => x as X + (x:Any) => x as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } static def makefun2[X](): ((Int)=>Char)=>X = { - (a:(Int)=>Char) => a as X + (a:(Int)=>Char) => a as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } Modified: trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -19,11 +19,11 @@ public class StringBoxing3 extends x10Test { static def makefun[X](a:Object): ()=>X = { - () => a as X + () => a as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } static def makefun2[X](): (Object)=>X = { - (a:Object) => a as X + (a:Object) => a as X // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } public def run(): boolean = { Modified: trunk/x10.tests/examples/Constructs/Override/CovariantOverride.x10 =================================================================== --- trunk/x10.tests/examples/Constructs/Override/CovariantOverride.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/Constructs/Override/CovariantOverride.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -19,7 +19,7 @@ static class A[T] { def f() : Any = 1; def g() : Any = "abc"; - def h() : T = 1 as T; + def h() : T = 1 as T; // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } static class B extends A[UInt] { Modified: trunk/x10.tests/examples/LangSpec/Classes/Classes5l3r_Bad33_MustFailCompile.x10 =================================================================== --- trunk/x10.tests/examples/LangSpec/Classes/Classes5l3r_Bad33_MustFailCompile.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/LangSpec/Classes/Classes5l3r_Bad33_MustFailCompile.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -32,7 +32,7 @@ } static class Sub extends Super{ def recip(n:Int){n != 0, n != 3} = 1.0/(n * (n-3)); // ERR - def recip(n:Int){true} = 1.0/n; + def recip(n:Int){true} = 1.0/n; // ERR } static class Example{ static def example() { Modified: trunk/x10.tests/examples/LangSpec/Expressions/Expressions6y9i.x10 =================================================================== --- trunk/x10.tests/examples/LangSpec/Expressions/Expressions6y9i.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/LangSpec/Expressions/Expressions6y9i.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -32,7 +32,7 @@ static def asPerson(f:Fop) = new Person(); public static def example() { val f = new Fop(); - val cast = f as Person; // WARNING on this line + val cast = f as Person; // ERR WARNING on this line assert cast == f; val meth = asPerson(f); assert meth != f; Modified: trunk/x10.tests/examples/LangSpec/Types/Types9j6e.x10 =================================================================== --- trunk/x10.tests/examples/LangSpec/Types/Types9j6e.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/LangSpec/Types/Types9j6e.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -30,7 +30,7 @@ static class Generic { public static def inst[T](x:Any):Boolean = x instanceof T; // With -VERBOSE, the following line gets a warning - public static def cast[T](x:Any):T = x as T; + public static def cast[T](x:Any):T = x as T; // ERR: Warning: This is an unsound cast because X10 currently does not perform constraint solving at runtime for generic parameters. } static class Pea(p:Int) {} static class Example{ Modified: trunk/x10.tests/examples/Samples/KMeansSPMDTest.x10 =================================================================== --- trunk/x10.tests/examples/Samples/KMeansSPMDTest.x10 2011-08-24 21:21:32 UTC (rev 22797) +++ trunk/x10.tests/examples/Samples/KMeansSPMDTest.x10 2011-08-24 21:22:11 UTC (rev 22798) @@ -15,7 +15,7 @@ public def run():boolean { val args = new Array[String](2); args(0) = "-p"; args(1) = "../../x10.dist/samples/points.dat"; - KMeansSPMD.main(args); + KMeansSPMD.main(args); // ERR: Warning: Generated a dynamic check for the method call. return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2011-09-06 15:09:48
|
Revision: 22861 http://x10.svn.sourceforge.net/x10/?rev=22861&view=rev Author: bherta Date: 2011-09-06 15:09:42 +0000 (Tue, 06 Sep 2011) Log Message: ----------- This fixes an issue building the x10 runtime with the -DEBUG flag enabled, as the debug team wants to do. Also, added in the necessary flags to do this when the "DEBUG" environment variable is set. Modified Paths: -------------- trunk/x10.compiler/src/x10cpp/debug/LineNumberMap.java trunk/x10.runtime/Make.rules Modified: trunk/x10.compiler/src/x10cpp/debug/LineNumberMap.java =================================================================== --- trunk/x10.compiler/src/x10cpp/debug/LineNumberMap.java 2011-09-06 10:02:12 UTC (rev 22860) +++ trunk/x10.compiler/src/x10cpp/debug/LineNumberMap.java 2011-09-06 15:09:42 UTC (rev 22861) @@ -642,7 +642,7 @@ public void addClassMemberVariable(String name, String type, String containingClass, boolean isStruct, boolean isConstructorArg, boolean isSuper) { - if (containingClass.indexOf('{') != -1) // skip these + if (containingClass.indexOf('{') != -1 || containingClass.indexOf("[") != -1) // skip these - the compiler didn't flag them properly return; if (memberVariables == null) @@ -1278,7 +1278,7 @@ } index++; } - if (index >= memberVariables.size()) + if (index >= memberVariables.size() && v._x10typeIndex > 0) v._x10typeIndex = offsets[v._x10typeIndex] * -1; } if (!skip) Modified: trunk/x10.runtime/Make.rules =================================================================== --- trunk/x10.runtime/Make.rules 2011-09-06 10:02:12 UTC (rev 22860) +++ trunk/x10.runtime/Make.rules 2011-09-06 15:09:42 UTC (rev 22861) @@ -54,6 +54,7 @@ ifdef DEBUG CXXFLAGS += -g + X10CPPFLAGS += -DEBUG endif ifndef JAVA_HOME This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mt...@us...> - 2011-10-19 11:41:09
|
Revision: 23093 http://x10.svn.sourceforge.net/x10/?rev=23093&view=rev Author: mtake Date: 2011-10-19 11:40:58 +0000 (Wed, 19 Oct 2011) Log Message: ----------- use caching to avoid creating array of Variance repeatedly. Modified Paths: -------------- trunk/x10.compiler/src/x10/emitter/Emitter.java trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java Modified: trunk/x10.compiler/src/x10/emitter/Emitter.java =================================================================== --- trunk/x10.compiler/src/x10/emitter/Emitter.java 2011-10-19 09:28:31 UTC (rev 23092) +++ trunk/x10.compiler/src/x10/emitter/Emitter.java 2011-10-19 11:40:58 UTC (rev 23093) @@ -2969,23 +2969,40 @@ printType(def.asType(), X10PrettyPrinterVisitor.BOX_PRIMITIVES | X10PrettyPrinterVisitor.NO_QUALIFIER); w.write(".class"); - for (int i = 0; i < def.variances().size(); i ++) { - w.write(", "); - w.newline(); - if (i == 0) w.write("/* variances */ new x10.rtt.RuntimeType.Variance[] {"); - ParameterType.Variance v = def.variances().get(i); - switch (v) { - case INVARIANT: - w.write("x10.rtt.RuntimeType.Variance.INVARIANT"); - break; - case COVARIANT: - w.write("x10.rtt.RuntimeType.Variance.COVARIANT"); - break; - case CONTRAVARIANT: - w.write("x10.rtt.RuntimeType.Variance.CONTRAVARIANT"); - break; + if (def.variances().size() > 0) { + boolean allInvariants = true; + for (int i = 0; i < def.variances().size(); ++i) { + if (def.variances().get(i) != ParameterType.Variance.INVARIANT) { + allInvariants = false; + break; + } } - if (i == def.variances().size() - 1) w.write("}"); + if (allInvariants) { + // use cached one to avoid creating array of Variance repeatedly + w.write(", "); + w.newline(); + w.write("/* variances */ x10.rtt.RuntimeType.INVARIANTS(" + def.variances().size() + ")"); + } + else { + for (int i = 0; i < def.variances().size(); ++i) { + w.write(", "); + w.newline(); + if (i == 0) w.write("/* variances */ new x10.rtt.RuntimeType.Variance[] {"); + ParameterType.Variance v = def.variances().get(i); + switch (v) { + case INVARIANT: + w.write("x10.rtt.RuntimeType.Variance.INVARIANT"); + break; + case COVARIANT: + w.write("x10.rtt.RuntimeType.Variance.COVARIANT"); + break; + case CONTRAVARIANT: + w.write("x10.rtt.RuntimeType.Variance.CONTRAVARIANT"); + break; + } + if (i == def.variances().size() - 1) w.write("}"); + } + } } w.newline(); Modified: trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java =================================================================== --- trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java 2011-10-19 09:28:31 UTC (rev 23092) +++ trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java 2011-10-19 11:40:58 UTC (rev 23093) @@ -26,9 +26,31 @@ private static final short _serialization_id = x10.x10rt.DeserializationDispatcher.addDispatcher(x10.x10rt.DeserializationDispatcher.ClosureKind.CLOSURE_KIND_NOT_ASYNC, RuntimeType.class); public enum Variance {INVARIANT, COVARIANT, CONTRAVARIANT} + private static final Variance[][] invariants = { + null, + new Variance[] {Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + new Variance[] {Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT,Variance.INVARIANT}, + }; + public static Variance[] INVARIANTS(int length) { + assert length >= 1; + if (length <= 10) { + return invariants[length]; + } + Variance[] variances = new Variance[length]; + java.util.Arrays.fill(variances, Variance.INVARIANT); + return variances; + } public Class<?> impl; - public Variance[] variances; + private Variance[] variances; public Type<?>[] parents; // Just for allocation @@ -57,10 +79,19 @@ return impl; } - public Variance[] getVariances() { - return variances; + // not used +// public Variance[] getVariances() { +// return variances; +// } + + private final Variance getVariance(int i) { + return variances[i]; } + private final int numParams() { + return variances != null ? variances.length : 0; + } + public Type<?>[] getParents() { return parents; } @@ -142,7 +173,7 @@ Type<?> typeForFormalParam; Type<?> typeForActualParam; for (int i = 0, s = params.length; i < s; i++) { - varianceForParam = variances[i]; + varianceForParam = getVariance(i); typeForFormalParam = Types.getParam(o, i); typeForActualParam = params[i]; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} @@ -289,7 +320,7 @@ if (impl == rtt.getImpl()) { if (params != null) { for (int i = 0, s = params.length; i < s; i ++) { - switch (variances[i]) { + switch (getVariance(i)) { case INVARIANT: if (!params[i].equals(paramsType[i])) {return false;} break; @@ -353,9 +384,10 @@ } protected final String typeNameForFun(Object o) { + int numParams = numParams(); String str = "("; int i; - for (i = 0; i < variances.length - 1; i++) { + for (i = 0; i < numParams - 1; i++) { if (i != 0) str += ","; str += ((Any) o).$getParam(i).typeName(); } @@ -364,9 +396,10 @@ return str; } protected final String typeNameForVoidFun(Object o) { + int numParams = numParams(); String str = "("; - if (variances != null && variances.length > 0) { - for (int i = 0; i < variances.length; i++) { + if (numParams > 0) { + for (int i = 0; i < numParams; i++) { if (i != 0) str += ","; str += ((Any) o).$getParam(i).typeName(); } @@ -375,11 +408,12 @@ return str; } protected final String typeNameForOthers(Object o) { + int numParams = numParams(); String str = typeName(); - if (variances != null && variances.length > 0) { + if (numParams > 0) { if (o instanceof Any || Types.supportTypeParameterOfJavaType) { str += "["; - for (int i = 0; i < variances.length; i ++) { + for (int i = 0; i < numParams; i ++) { if (i != 0) str += ","; str += Types.getParam(o, i).typeName(); } @@ -401,7 +435,7 @@ Variance varianceForParam; Type<?> typeForFormalParam; Type<?> typeForActualParam; - varianceForParam = variances[0]; + varianceForParam = getVariance(0); typeForFormalParam = Types.getParam(o, 0); typeForActualParam = param0; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} @@ -431,11 +465,11 @@ Variance varianceForParam; Type<?> typeForFormalParam; Type<?> typeForActualParam; - varianceForParam = variances[0]; + varianceForParam = getVariance(0); typeForFormalParam = Types.getParam(o, 0); typeForActualParam = param0; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} - varianceForParam = variances[1]; + varianceForParam = getVariance(1); typeForFormalParam = Types.getParam(o, 1); typeForActualParam = param1; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} @@ -466,15 +500,15 @@ Variance varianceForParam; Type<?> typeForFormalParam; Type<?> typeForActualParam; - varianceForParam = variances[0]; + varianceForParam = getVariance(0); typeForFormalParam = Types.getParam(o, 0); typeForActualParam = param0; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} - varianceForParam = variances[1]; + varianceForParam = getVariance(1); typeForFormalParam = Types.getParam(o, 1); typeForActualParam = param1; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} - varianceForParam = variances[2]; + varianceForParam = getVariance(2); typeForFormalParam = Types.getParam(o, 2); typeForActualParam = param2; if (!isSubtype(varianceForParam, typeForFormalParam, typeForActualParam)) {return false;} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mt...@us...> - 2012-06-20 14:23:39
|
Revision: 23937 http://x10.svn.sourceforge.net/x10/?rev=23937&view=rev Author: mtake Date: 2012-06-20 14:23:28 +0000 (Wed, 20 Jun 2012) Log Message: ----------- update commons math to 3.0 Modified Paths: -------------- trunk/x10.compiler/src/x10/visit/X10Translator.java trunk/x10.compiler/src/x10c/X10CCompilerOptions.java trunk/x10.dist/build.xml trunk/x10.runtime/.classpath trunk/x10.runtime/build.xml trunk/x10.runtime/src-java/x10/core/MathUtils.java Modified: trunk/x10.compiler/src/x10/visit/X10Translator.java =================================================================== --- trunk/x10.compiler/src/x10/visit/X10Translator.java 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.compiler/src/x10/visit/X10Translator.java 2012-06-20 14:23:28 UTC (rev 23937) @@ -325,7 +325,7 @@ out.println("Main-Class: " + main_class + "$" + X10PrettyPrinterVisitor.MAIN_CLASS); // N.B. Following jar files should be same as the ones used in X10CCompilerOptions.setDefaultValues() String x10_jar = "x10.jar"; - String math_jar = System.getProperty("x10c.math.jar", "commons-math-2.2.jar"); + String math_jar = System.getProperty("x10c.math.jar", "commons-math3-3.0.jar"); // XTENLANG-2722 // need a new preloading mechanism which does not use classloader to determine system classes out.println("Class-Path: " + x10_jar + " " + math_jar); Modified: trunk/x10.compiler/src/x10c/X10CCompilerOptions.java =================================================================== --- trunk/x10.compiler/src/x10c/X10CCompilerOptions.java 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.compiler/src/x10c/X10CCompilerOptions.java 2012-06-20 14:23:28 UTC (rev 23937) @@ -69,7 +69,7 @@ String libdir = x10_dist + File.separator + "lib"; String stdlibdir = x10_dist + File.separator + "stdlib"; String x10_jar = "x10.jar"; // FIXME: is this overridable? - String math_jar = System.getProperty("x10c.math.jar", "commons-math-2.2.jar"); + String math_jar = System.getProperty("x10c.math.jar", "commons-math3-3.0.jar"); default_output_classpath = stdlibdir + File.separator + x10_jar + File.pathSeparator + libdir + File.separator + math_jar; output_classpath = default_output_classpath; Modified: trunk/x10.dist/build.xml =================================================================== --- trunk/x10.dist/build.xml 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.dist/build.xml 2012-06-20 14:23:28 UTC (rev 23937) @@ -23,8 +23,8 @@ <property name="wala4.jar.url" value="http://x10.sourceforge.net/dependencies/com.ibm.wala.shrike_1.3.1.201101071300.jar"/> <property name="equinox.jar" value="org.eclipse.equinox.common_3.6.0.v20100503.jar"/> <property name="equinox.jar.url" value="http://x10.sourceforge.net/dependencies/org.eclipse.equinox.common_3.6.0.v20100503.jar"/> - <property name="math.jar" value="commons-math-2.2.jar"/> - <property name="math.jar.url" value="http://x10.sourceforge.net/dependencies/commons-math-2.2.jar"/> + <property name="math.jar" value="commons-math3-3.0.jar"/> + <property name="math.jar.url" value="http://x10.sourceforge.net/dependencies/commons-math3-3.0.jar"/> <property name="x10.bridge.location" location="${x10.home}/x10.wala"/> <property name="bridge.jar" value="x10wala.jar" /> <property name="x10.constraints.location" location="${x10.home}/x10.constraints"/> Modified: trunk/x10.runtime/.classpath =================================================================== --- trunk/x10.runtime/.classpath 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.runtime/.classpath 2012-06-20 14:23:28 UTC (rev 23937) @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src-java" excluding="gen/**"/> + <classpathentry excluding="gen/**" kind="src" path="src-java"/> <classpathentry kind="src" path="src-java/gen"/> - <classpathentry kind="lib" path="/x10.dist/lib/commons-math-2.2.jar"/> + <classpathentry kind="lib" path="/x10.dist/lib/commons-math3-3.0.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="classes"/> Modified: trunk/x10.runtime/build.xml =================================================================== --- trunk/x10.runtime/build.xml 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.runtime/build.xml 2012-06-20 14:23:28 UTC (rev 23937) @@ -13,7 +13,7 @@ <property name="lib" location="${x10.dist.location}/lib"/> <property name="stdlib" location="${x10.dist.location}/stdlib"/> <property name="jar" value="x10.jar"/> - <property name="math.jar" value="${lib}/commons-math-2.2.jar"/> + <property name="math.jar" value="${lib}/commons-math3-3.0.jar"/> <property name="bdwgc.dir" location="${basedir}/src-cpp/bdwgc"/> <property name="bdwgc.tar" value="bdwgc-7.1.tar.gz"/> <property name="bdwgc.url" value="http://x10.sourceforge.net/dependencies/${bdwgc.tar}"/> Modified: trunk/x10.runtime/src-java/x10/core/MathUtils.java =================================================================== --- trunk/x10.runtime/src-java/x10/core/MathUtils.java 2012-06-20 13:41:10 UTC (rev 23936) +++ trunk/x10.runtime/src-java/x10/core/MathUtils.java 2012-06-20 14:23:28 UTC (rev 23937) @@ -15,14 +15,18 @@ public static double erf(double a) { try { - return org.apache.commons.math.special.Erf.erf(a); - } catch (org.apache.commons.math.MathException e) { + return org.apache.commons.math3.special.Erf.erf(a); + } catch (org.apache.commons.math3.exception.MaxCountExceededException e) { throw ThrowableUtilities.getCorrespondingX10Throwable(e); } } public static double erfc(double a) { - return 1.0 - erf(a); + try { + return org.apache.commons.math3.special.Erf.erfc(a); + } catch (org.apache.commons.math3.exception.MaxCountExceededException e) { + throw ThrowableUtilities.getCorrespondingX10Throwable(e); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2012-08-29 20:54:12
|
Revision: 24467 http://x10.svn.sourceforge.net/x10/?rev=24467&view=rev Author: sparksparkspark Date: 2012-08-29 20:54:00 +0000 (Wed, 29 Aug 2012) Log Message: ----------- Very hacky reintegration of interop exceptions branch Modified Paths: -------------- trunk/apgas.java/src/com/ibm/apgas/TaskWrapper.java trunk/x10.compiler/src/polyglot/ast/Catch_c.java trunk/x10.compiler/src/polyglot/ast/ClassDecl_c.java trunk/x10.compiler/src/polyglot/ast/New_c.java trunk/x10.compiler/src/polyglot/ast/NodeFactory.java trunk/x10.compiler/src/polyglot/ast/NodeFactory_c.java trunk/x10.compiler/src/polyglot/ast/Throw_c.java trunk/x10.compiler/src/polyglot/ast/Try_c.java trunk/x10.compiler/src/polyglot/types/JavaArrayType_c.java trunk/x10.compiler/src/polyglot/types/Name.java trunk/x10.compiler/src/polyglot/types/ProcedureInstance_c.java trunk/x10.compiler/src/polyglot/types/Type.java trunk/x10.compiler/src/polyglot/types/TypeEnv_c.java trunk/x10.compiler/src/polyglot/types/TypeSystem.java trunk/x10.compiler/src/polyglot/types/TypeSystem_c.java trunk/x10.compiler/src/polyglot/types/Type_c.java trunk/x10.compiler/src/polyglot/types/Types.java trunk/x10.compiler/src/polyglot/util/SubtypeSet.java trunk/x10.compiler/src/polyglot/visit/ExceptionChecker.java trunk/x10.compiler/src/polyglot/visit/InnerClassRemover.java trunk/x10.compiler/src/polyglot/visit/LocalClassRemover.java trunk/x10.compiler/src/x10/ast/Async_c.java trunk/x10.compiler/src/x10/ast/TypeDecl_c.java trunk/x10.compiler/src/x10/ast/TypeParamNode_c.java trunk/x10.compiler/src/x10/ast/X10ClassDecl_c.java trunk/x10.compiler/src/x10/ast/X10ConstructorCall_c.java trunk/x10.compiler/src/x10/ast/X10ConstructorDecl.java trunk/x10.compiler/src/x10/ast/X10ConstructorDecl_c.java trunk/x10.compiler/src/x10/ast/X10MethodDecl.java trunk/x10.compiler/src/x10/ast/X10MethodDecl_c.java trunk/x10.compiler/src/x10/ast/X10New_c.java trunk/x10.compiler/src/x10/ast/X10NodeFactory_c.java trunk/x10.compiler/src/x10/ast/X10Special_c.java trunk/x10.compiler/src/x10/compiler/ws/codegen/WSSynthesizer.java trunk/x10.compiler/src/x10/emitter/Emitter.java trunk/x10.compiler/src/x10/emitter/RuntimeTypeExpander.java trunk/x10.compiler/src/x10/emitter/TryCatchExpander.java trunk/x10.compiler/src/x10/parser/X10KWLexer.gi trunk/x10.compiler/src/x10/parser/X10KWLexer.java trunk/x10.compiler/src/x10/parser/X10KWLexerprs.java trunk/x10.compiler/src/x10/parser/X10KWLexersym.java trunk/x10.compiler/src/x10/parser/X10Parser.java trunk/x10.compiler/src/x10/parser/X10Parserprs.java trunk/x10.compiler/src/x10/parser/X10Parsersym.java trunk/x10.compiler/src/x10/parser/X10SemanticRules.java trunk/x10.compiler/src/x10/parser/x10.g trunk/x10.compiler/src/x10/types/TypeParamSubst.java trunk/x10.compiler/src/x10/types/X10ParsedClassType_c.java trunk/x10.compiler/src/x10/types/X10SourceClassResolver.java trunk/x10.compiler/src/x10/types/X10TypeEnv_c.java trunk/x10.compiler/src/x10/types/XTypeTranslator.java trunk/x10.compiler/src/x10/types/constraints/SubtypeConstraint.java trunk/x10.compiler/src/x10/types/constraints/TypeConstraint.java trunk/x10.compiler/src/x10/util/AltSynthesizer.java trunk/x10.compiler/src/x10/util/AnnotationUtils.java trunk/x10.compiler/src/x10/util/Struct.java trunk/x10.compiler/src/x10/util/Synthesizer.java trunk/x10.compiler/src/x10/util/synthesizer/AsyncSynth.java trunk/x10.compiler/src/x10/visit/ConstructorSplitterVisitor.java trunk/x10.compiler/src/x10/visit/Desugarer.java trunk/x10.compiler/src/x10/visit/FinallyEliminator.java trunk/x10.compiler/src/x10/visit/Lowerer.java trunk/x10.compiler/src/x10/visit/X10DelegatingVisitor.java trunk/x10.compiler/src/x10/visit/X10InnerClassRemover.java trunk/x10.compiler/src/x10/visit/X10LocalClassRemover.java trunk/x10.compiler/src/x10/visit/X10PrettyPrinterVisitor.java trunk/x10.compiler/src/x10c/visit/ClosureRemover.java trunk/x10.compiler/src/x10c/visit/JavaCaster.java trunk/x10.compiler/src/x10c/visit/StaticInitializer.java trunk/x10.compiler/src/x10cpp/visit/Emitter.java trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java trunk/x10.compiler/src/x10cpp/visit/SharedVarsMethods.java trunk/x10.dist/samples/CUDA/KMeansCUDA.x10 trunk/x10.dist/samples/KMeansSPMD.x10 trunk/x10.dist/samples/java.interop/javatox10/src/XClass.x10 trunk/x10.dist/samples/java.interop/x10tojava/src/XClass.x10 trunk/x10.dist/tools/runjava/RunJava.x10 trunk/x10.runtime/src-cpp/Makefile trunk/x10.runtime/src-cpp/x10/io/File__NativeFile.cc trunk/x10.runtime/src-cpp/x10/io/File__NativeFile.h trunk/x10.runtime/src-cpp/x10/io/InputStreamReader__InputStream.cc trunk/x10.runtime/src-cpp/x10/io/InputStreamReader__InputStream.h trunk/x10.runtime/src-cpp/x10/io/OutputStreamWriter__OutputStream.cc trunk/x10.runtime/src-cpp/x10/io/OutputStreamWriter__OutputStream.h trunk/x10.runtime/src-cpp/x10/lang/Any.h trunk/x10.runtime/src-cpp/x10/lang/Deque.cc trunk/x10.runtime/src-cpp/x10/lang/Deque.h trunk/x10.runtime/src-cpp/x10/lang/GlobalRef.cc trunk/x10.runtime/src-cpp/x10/lang/GlobalRef.h trunk/x10.runtime/src-cpp/x10/lang/Lock__ReentrantLock.cc trunk/x10.runtime/src-cpp/x10/lang/Lock__ReentrantLock.h trunk/x10.runtime/src-cpp/x10/lang/Reference.cc trunk/x10.runtime/src-cpp/x10/lang/Reference.h trunk/x10.runtime/src-cpp/x10/lang/String.cc trunk/x10.runtime/src-cpp/x10/lang/String.h trunk/x10.runtime/src-cpp/x10/lang/Thread.cc trunk/x10.runtime/src-cpp/x10/lang/Thread.h trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicReference.cc trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicReference.h trunk/x10.runtime/src-cpp/x10aux/RTT.cc trunk/x10.runtime/src-cpp/x10aux/RTT.h trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc trunk/x10.runtime/src-cpp/x10aux/bootstrap.h trunk/x10.runtime/src-cpp/x10aux/class_cast.h trunk/x10.runtime/src-cpp/x10aux/fun_utils.h trunk/x10.runtime/src-cpp/x10aux/itables.h trunk/x10.runtime/src-cpp/x10aux/static_init.cc trunk/x10.runtime/src-cpp/x10aux/static_init.h trunk/x10.runtime/src-cpp/x10aux/system_utils.cc trunk/x10.runtime/src-cpp/x10aux/system_utils.h trunk/x10.runtime/src-cpp/x10aux/throw.h trunk/x10.runtime/src-java/x10/core/GlobalRef.java trunk/x10.runtime/src-java/x10/core/IndexedMemoryChunk.java trunk/x10.runtime/src-java/x10/core/LocalVar.java trunk/x10.runtime/src-java/x10/core/Ref.java trunk/x10.runtime/src-java/x10/core/RemoteIndexedMemoryChunk.java trunk/x10.runtime/src-java/x10/core/Struct.java trunk/x10.runtime/src-java/x10/core/UByte.java trunk/x10.runtime/src-java/x10/core/UInt.java trunk/x10.runtime/src-java/x10/core/ULong.java trunk/x10.runtime/src-java/x10/core/UShort.java trunk/x10.runtime/src-java/x10/core/Vec.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicBoolean.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicInteger.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicLong.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicReference.java trunk/x10.runtime/src-java/x10/core/io/FileInputStream.java trunk/x10.runtime/src-java/x10/core/io/FileOutputStream.java trunk/x10.runtime/src-java/x10/core/io/InputStream.java trunk/x10.runtime/src-java/x10/core/io/NativeFile.java trunk/x10.runtime/src-java/x10/core/io/OutputStream.java trunk/x10.runtime/src-java/x10/rtt/BooleanType.java trunk/x10.runtime/src-java/x10/rtt/ByteType.java trunk/x10.runtime/src-java/x10/rtt/CharType.java trunk/x10.runtime/src-java/x10/rtt/DoubleType.java trunk/x10.runtime/src-java/x10/rtt/Equality.java trunk/x10.runtime/src-java/x10/rtt/FloatType.java trunk/x10.runtime/src-java/x10/rtt/IntType.java trunk/x10.runtime/src-java/x10/rtt/LongType.java trunk/x10.runtime/src-java/x10/rtt/NamedType.java trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java trunk/x10.runtime/src-java/x10/rtt/ShortType.java trunk/x10.runtime/src-java/x10/rtt/StringType.java trunk/x10.runtime/src-java/x10/rtt/Type.java trunk/x10.runtime/src-java/x10/rtt/Types.java trunk/x10.runtime/src-java/x10/rtt/UByteType.java trunk/x10.runtime/src-java/x10/rtt/UIntType.java trunk/x10.runtime/src-java/x10/rtt/ULongType.java trunk/x10.runtime/src-java/x10/rtt/UShortType.java trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java trunk/x10.runtime/src-java/x10/runtime/impl/java/Deque.java trunk/x10.runtime/src-java/x10/runtime/impl/java/InitDispatcher.java trunk/x10.runtime/src-java/x10/runtime/impl/java/InteropFuns.java trunk/x10.runtime/src-java/x10/runtime/impl/java/Runtime.java trunk/x10.runtime/src-java/x10/runtime/impl/java/Thread.java trunk/x10.runtime/src-java/x10/x10rt/DeserializationDispatcher.java trunk/x10.runtime/src-java/x10/x10rt/TeamSupport.java trunk/x10.runtime/src-java/x10/x10rt/X10JavaDeserializer.java trunk/x10.runtime/src-java/x10/x10rt/X10JavaSerializer.java trunk/x10.runtime/src-x10/x10/compiler/Abort.x10 trunk/x10.runtime/src-x10/x10/compiler/Finalization.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/AsyncFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/AtFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/CollectingFinish.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/FinishFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/Frame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/RemoteFinish.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/ThrowFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/TryFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/Worker.x10 trunk/x10.runtime/src-x10/x10/interop/Java.x10 trunk/x10.runtime/src-x10/x10/io/Console.x10 trunk/x10.runtime/src-x10/x10/io/EOFException.x10 trunk/x10.runtime/src-x10/x10/io/FileNotFoundException.x10 trunk/x10.runtime/src-x10/x10/io/IOException.x10 trunk/x10.runtime/src-x10/x10/io/NotSerializableException.x10 trunk/x10.runtime/src-x10/x10/io/Printer.x10 trunk/x10.runtime/src-x10/x10/lang/Activity.x10 trunk/x10.runtime/src-x10/x10/lang/ArithmeticException.x10 trunk/x10.runtime/src-x10/x10/lang/ArrayIndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/AssertionError.x10 trunk/x10.runtime/src-x10/x10/lang/Byte.x10 trunk/x10.runtime/src-x10/x10/lang/ClassCastException.x10 trunk/x10.runtime/src-x10/x10/lang/Clock.x10 trunk/x10.runtime/src-x10/x10/lang/Deque.x10 trunk/x10.runtime/src-x10/x10/lang/Double.x10 trunk/x10.runtime/src-x10/x10/lang/Error.x10 trunk/x10.runtime/src-x10/x10/lang/ExceptionInInitializer.x10 trunk/x10.runtime/src-x10/x10/lang/FinishState.x10 trunk/x10.runtime/src-x10/x10/lang/Float.x10 trunk/x10.runtime/src-x10/x10/lang/GlobalRef.x10 trunk/x10.runtime/src-x10/x10/lang/IllegalArgumentException.x10 trunk/x10.runtime/src-x10/x10/lang/IndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/InterruptedException.x10 trunk/x10.runtime/src-x10/x10/lang/Math.x10 trunk/x10.runtime/src-x10/x10/lang/MultipleExceptions.x10 trunk/x10.runtime/src-x10/x10/lang/NullPointerException.x10 trunk/x10.runtime/src-x10/x10/lang/NumberFormatException.x10 trunk/x10.runtime/src-x10/x10/lang/OutOfMemoryError.x10 trunk/x10.runtime/src-x10/x10/lang/Place.x10 trunk/x10.runtime/src-x10/x10/lang/PlaceLocalHandle.x10 trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 trunk/x10.runtime/src-x10/x10/lang/Short.x10 trunk/x10.runtime/src-x10/x10/lang/StackOverflowError.x10 trunk/x10.runtime/src-x10/x10/lang/String.x10 trunk/x10.runtime/src-x10/x10/lang/StringIndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/System.x10 trunk/x10.runtime/src-x10/x10/lang/UByte.x10 trunk/x10.runtime/src-x10/x10/lang/UInt.x10 trunk/x10.runtime/src-x10/x10/lang/ULong.x10 trunk/x10.runtime/src-x10/x10/lang/UShort.x10 trunk/x10.runtime/src-x10/x10/lang/UnsupportedOperationException.x10 trunk/x10.runtime/src-x10/x10/util/HashMap.x10 trunk/x10.runtime/src-x10/x10/util/NoSuchElementException.x10 trunk/x10.runtime/src-x10/x10/util/OptionsParser.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Future.x10 trunk/x10.tests/examples/Constructs/Array/ArrayCopy1.x10 trunk/x10.tests/examples/Constructs/Array/ArrayCopy2.x10 trunk/x10.tests/examples/Constructs/Array/ArrayCopy3.x10 trunk/x10.tests/examples/Constructs/Array/FlattenConditional.x10 trunk/x10.tests/examples/Constructs/Array/FlattenConditional2.x10 trunk/x10.tests/examples/Constructs/Array/FlattenConditional3.x10 trunk/x10.tests/examples/Constructs/Array/LocalPortion.x10 trunk/x10.tests/examples/Constructs/Array/TestArray.x10 trunk/x10.tests/examples/Constructs/Async/AsyncNext.x10 trunk/x10.tests/examples/Constructs/At/AtNext.x10 trunk/x10.tests/examples/Constructs/At/ObjectArrayTest.x10 trunk/x10.tests/examples/Constructs/Atomic/Atomic2.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing1.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing2.x10 trunk/x10.tests/examples/Constructs/Boxing/StringBoxing3.x10 trunk/x10.tests/examples/Constructs/Cast/GetMessage.x10 trunk/x10.tests/examples/Constructs/Cast/InlineConstraint.x10 trunk/x10.tests/examples/Constructs/Cast/MacroConstraint.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentIntLitteralToConstrainedInt.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentIntLitteralToConstrainedInt_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentLitteralPrimitiveToPrimitiveConstrained_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentPrimitiveConstrainedIdentity.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentPrimitiveConstrainedToPrimitive.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentPrimitiveConstrainedToPrimitiveConstrained_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/AssignmentPrimitiveToPrimitiveConstrained_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/CastNullToNullableReference.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/CastNullToReference_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/CastPrimitiveConstrainedToPrimitiveConstrained.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/CastPrimitiveConstrainedToPrimitiveConstrained2_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/PrimitiveDependentTypeCast/CastPrimitiveLitteralToPrimitiveConstrained_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Cast/ReferenceDependentTypeCast/DynamicCast3_Object.x10.new trunk/x10.tests/examples/Constructs/Cast/ReferenceDependentTypeCast/DynamicCast4_MethodReturn.x10 trunk/x10.tests/examples/Constructs/Cast/StructToAnyAndBack.x10 trunk/x10.tests/examples/Constructs/Clock/ClockTest16.x10 trunk/x10.tests/examples/Constructs/Clock/ClockTest3.x10 trunk/x10.tests/examples/Constructs/Clock/ClockTest3a.x10 trunk/x10.tests/examples/Constructs/Clock/ClockTest7.x10 trunk/x10.tests/examples/Constructs/Closures/ClosureEnclosingScope1n.x10 trunk/x10.tests/examples/Constructs/Closures/ClosureTest.x10 trunk/x10.tests/examples/Constructs/CollectingFinish/CF10.x10 trunk/x10.tests/examples/Constructs/Distribution/DistBounds1D.x10 trunk/x10.tests/examples/Constructs/Distribution/DistBounds2D.x10 trunk/x10.tests/examples/Constructs/Distribution/DistBounds3D.x10 trunk/x10.tests/examples/Constructs/Distribution/TestDist.x10 trunk/x10.tests/examples/Constructs/ForEach/Foreach2.x10 trunk/x10.tests/examples/Constructs/Fun/FunIsNotObject_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Future/FutureTest3.x10 trunk/x10.tests/examples/Constructs/GC/RemoteRef.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast01.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast03.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast04.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast05.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast06.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast07.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast08.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast09.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast11.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast12.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast13.x10 trunk/x10.tests/examples/Constructs/Generics/GenericCast14.x10 trunk/x10.tests/examples/Constructs/Generics/GenericDeepInnerClass.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInference1_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInference2.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInference3.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInference4.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance01.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance03.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance04.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance05.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance06.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance07.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInheritance08.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInnerClass.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInnerClassParameterCapture.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof01.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof03.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof04.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof05.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof06.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof07.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof09.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof10.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof11.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof12.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof13.x10 trunk/x10.tests/examples/Constructs/Generics/GenericInstanceof14.x10 trunk/x10.tests/examples/Constructs/Generics/GenericMethods1.x10 trunk/x10.tests/examples/Constructs/Generics/GenericMethods2.x10 trunk/x10.tests/examples/Constructs/Generics/GenericMethods3.x10 trunk/x10.tests/examples/Constructs/Generics/GenericMethods6.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverPrimitives1.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverPrimitives2.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverPrimitives3.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverPrimitives3x.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverPrimitives4.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading05.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading06.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading08.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading09.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading10.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverloading14.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding01.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding02.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding03.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding04.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding05.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding06.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding07.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding12.x10 trunk/x10.tests/examples/Constructs/Generics/GenericOverriding13.x10 trunk/x10.tests/examples/Constructs/Generics/GenericTest.x10 trunk/x10.tests/examples/Constructs/Generics/GenericVariance01.x10 trunk/x10.tests/examples/Constructs/Generics/Generics_ERR_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Inference/LCAClassAClassB.x10 trunk/x10.tests/examples/Constructs/Inference/LCAClassAStructB_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/Inference/TypeArgInference2.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField2.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField2b.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField2c.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField2d.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField2e.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField3b.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField3d.x10 trunk/x10.tests/examples/Constructs/Init/InitStaticField4.x10 trunk/x10.tests/examples/Constructs/Init/StaticInitException.x10 trunk/x10.tests/examples/Constructs/Instanceof/ConstrainedTypeTests.x10 trunk/x10.tests/examples/Constructs/Instanceof/InstanceofDownCast.x10 trunk/x10.tests/examples/Constructs/Instanceof/InstanceofDownCast1.x10 trunk/x10.tests/examples/Constructs/Instanceof/InstanceofDownCast2.x10 trunk/x10.tests/examples/Constructs/Instanceof/NotInstanceof1_Inline.x10 trunk/x10.tests/examples/Constructs/Instanceof/NotInstanceof2_Method.x10 trunk/x10.tests/examples/Constructs/Instanceof/ReferenceToReference.x10 trunk/x10.tests/examples/Constructs/Interface/IntfMethod2.x10 trunk/x10.tests/examples/Constructs/Place/At_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/References/MultiRefRoundtrip.x10 trunk/x10.tests/examples/Constructs/Region/RegionWithHoles.x10.aside trunk/x10.tests/examples/Constructs/Region/TestRegion.x10 trunk/x10.tests/examples/Constructs/Typedefs/TypedefTest.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ObjectIsNotParameterType2_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ObjectIsNotParameterType3_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ObjectIsNotParameterType4_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ObjectIsNotParameterType_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ParameterTypeIsNotObject2_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ParameterTypeIsNotObject3_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ParameterTypeIsNotObject4_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/ParameterTypeIsNotObject_MustFailCompile.x10 trunk/x10.tests/examples/Constructs/XtenTwoOhTypeSsytem/PrimitiveIsNotParameterType_MustFailCompile.x10 trunk/x10.tests/examples/Issues/XTENLANG_203.x10 trunk/x10.tests/examples/Issues/XTENLANG_210.x10 trunk/x10.tests/examples/Issues/XTENLANG_2367.x10 trunk/x10.tests/examples/Issues/XTENLANG_2384.x10 trunk/x10.tests/examples/Issues/XTENLANG_2388.x10 trunk/x10.tests/examples/Issues/XTENLANG_244.x10 trunk/x10.tests/examples/Issues/XTENLANG_33.x10 trunk/x10.tests/examples/Issues/XTENLANG_345.x10 trunk/x10.tests/examples/JavaInterop/JavaException.x10 trunk/x10.tests/examples/JavaInterop/JavaException2.x10 trunk/x10.tests/examples/JavaInterop/JavaException3.x10 trunk/x10.tests/examples/JavaInterop/JavaException3b.x10 trunk/x10.tests/examples/JavaInterop/JavaException5.x10 trunk/x10.tests/examples/JavaInterop/JavaException6.x10 trunk/x10.tests/examples/JavaInterop/JavaException7.x10 trunk/x10.tests/examples/JavaInterop/JavaException8.x10 trunk/x10.tests/examples/JavaInterop/JavaExceptionThrowsSubtype_MustFailCompile.x10 trunk/x10.tests/examples/JavaInterop/JavaSerializationObject.x10 trunk/x10.tests/examples/LangSpec/Activities/Activities110.x10 trunk/x10.tests/examples/LangSpec/Classes/Classes80.x10 trunk/x10.tests/examples/LangSpec/Classes/Classes90.x10 trunk/x10.tests/examples/LangSpec/Classes/Classes90_Bad36_MustFailCompile.x10 trunk/x10.tests/examples/LangSpec/Expressions/Expressions3e9h.x10 trunk/x10.tests/examples/LangSpec/Expressions/Expressions6o2b.x10 trunk/x10.tests/examples/LangSpec/Places/Places4e7q.x10 trunk/x10.tests/examples/LangSpec/Statements/Statements9x3m.x10 trunk/x10.tests/examples/LangSpec/Types/Types240.x10 trunk/x10.tests/examples/Misc/FieldAccessTest_MustFailCompile.x10 trunk/x10.tests/examples/Misc/IfElseFinishBug.x10 trunk/x10.tests/examples/Misc/NullableComparison.x10 trunk/x10.tests/examples/Misc/ObjectEquality.x10 trunk/x10.tests/examples/Misc/x10/frontend/tests/FrontEndTests_MustFailCompile.x10 trunk/x10.tests/examples/Samples/CUDA3DFDTest.x10 trunk/x10.tests/examples/Samples/CUDAMatMulTest.x10 trunk/x10.tests/examples/WorkStealing/Constructs/AsyncAtFinish.x10 trunk/x10.tests/examples/WorkStealing/Constructs/AsyncAtFinish2.x10 trunk/x10.tests/examples/WorkStealing/Constructs/AsyncOtherPlace.x10 trunk/x10.tests/examples/WorkStealing/Constructs/AtOtherPlace.x10 trunk/x10.tests/examples/x10lib/harness/x10Test.x10 trunk/x10.tests/examples/x10lib/precision.x10 trunk/x10.tests/tests/Misc/PreCommit.x10 trunk/x10.tests/tests/WorkStealing/Construct/GenericCast1.x10 trunk/x10.wala/src/x10/wala/translator/X10ASTTraverser.java trunk/x10.wala/src/x10/wala/translator/X10IdentityMapper.java trunk/x10.wala/src/x10/wala/translator/X10TranslatorVisitor.java trunk/x10.wala/src/x10/wala/translator/X10TypeDictionary.java trunk/x10.wala/src/x10/wala/translator/X10toCAstTranslator.java Added Paths: ----------- trunk/x10.compiler/src/x10/ast/IsRefTest.java trunk/x10.dist/samples/java.interop/CheckedExceptions/ trunk/x10.dist/samples/java.interop/CheckedExceptions/CheckedExceptions1.x10 trunk/x10.runtime/src-cpp/x10/lang/CheckedThrowable.cc trunk/x10.runtime/src-cpp/x10/lang/CheckedThrowable.h trunk/x10.runtime/src-cpp/x10/lang/X10Class.cc trunk/x10.runtime/src-cpp/x10/lang/X10Class.h trunk/x10.runtime/src-java/x10/rtt/NamedStructType.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ArrayUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/EvalUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/FloatUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/MathUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/SignedUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/StringUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ThrowableUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/UnsignedUtils.java trunk/x10.runtime/src-x10/x10/lang/CheckedException.x10 trunk/x10.runtime/src-x10/x10/lang/CheckedThrowable.x10 trunk/x10.runtime/src-x10/x10/lang/Empty.x10 trunk/x10.runtime/src-x10/x10/lang/Exception trunk/x10.runtime/src-x10/x10/lang/Object2.x10 trunk/x10.runtime/src-x10/x10/lang/WrappedThrowable.x10 trunk/x10.tests/examples/Constructs/Exceptions/CheckedExceptions1.x10 trunk/x10.tests/examples/Constructs/Finish/FinishTest3.x10 trunk/x10.tests/examples/Constructs/Types/Any1.x10 trunk/x10.tests/examples/Constructs/Types/Any1b.x10 trunk/x10.tests/examples/Issues/XTENLANG_3103.x10 trunk/x10.tests/examples/Issues/XTENLANG_3120.x10 trunk/x10.tests/examples/JavaInterop/JavaArray2b.x10 trunk/x10.tests/examples/JavaInterop/JavaArray3.x10 trunk/x10.tests/examples/JavaInterop/JavaException4.x10.aside trunk/x10.tests/examples/JavaInterop/JavaSerialization2.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization3.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization4.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization4b.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization4c.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization5.x10 trunk/x10.tests/examples/JavaInterop/JavaSerialization5b.x10 trunk/x10.tests/examples/JavaInterop/JavaType1.x10 trunk/x10.tests/examples/JavaInterop/JavaType2.x10 trunk/x10.tests/examples/JavaInterop/JavaType3.x10 trunk/x10.tests/examples/JavaInterop/JavaType3b.x10 Removed Paths: ------------- trunk/x10.compiler/src/polyglot/ast/Synchronized.java trunk/x10.compiler/src/polyglot/ast/Synchronized_c.java trunk/x10.runtime/src-cpp/x10/lang/Object.cc trunk/x10.runtime/src-cpp/x10/lang/Object.h trunk/x10.runtime/src-cpp/x10/lang/Throwable.cc trunk/x10.runtime/src-cpp/x10/lang/Throwable.h trunk/x10.runtime/src-java/x10/core/ArrayFactory.java trunk/x10.runtime/src-java/x10/core/Floats.java trunk/x10.runtime/src-java/x10/core/MathUtils.java trunk/x10.runtime/src-java/x10/core/RefI.java trunk/x10.runtime/src-java/x10/core/Signed.java trunk/x10.runtime/src-java/x10/core/String.java trunk/x10.runtime/src-java/x10/core/Throwable.java trunk/x10.runtime/src-java/x10/core/ThrowableUtilities.java trunk/x10.runtime/src-java/x10/core/Unsigned.java trunk/x10.runtime/src-java/x10/core/X10Throwable.java trunk/x10.runtime/src-java/x10/generics/ trunk/x10.runtime/src-java/x10/rtt/ObjectType.java trunk/x10.runtime/src-java/x10/runtime/annotations/ trunk/x10.runtime/src-java/x10/runtime/bytecode/ trunk/x10.runtime/src-java/x10/runtime/impl/java/UnknownJavaThrowable.java trunk/x10.runtime/src-java/x10/runtime/rewrite/ trunk/x10.runtime/src-java/x10/runtime/util/ trunk/x10.runtime/src-x10/x10/interop/java/Throws.x10 trunk/x10.runtime/src-x10/x10/lang/Exception.x10 trunk/x10.runtime/src-x10/x10/lang/Object.x10 trunk/x10.runtime/src-x10/x10/lang/RuntimeException.x10 trunk/x10.runtime/src-x10/x10/lang/Throwable.x10 trunk/x10.tests/examples/JavaInterop/JavaException4.x10 Property Changed: ---------------- trunk/ trunk/x10.common/ trunk/x10.compiler/ trunk/x10.constraints/ trunk/x10.dist/ trunk/x10.runtime/ trunk/x10.sncode/ trunk/x10.tests/ Property changes on: trunk ___________________________________________________________________ Modified: svn:mergeinfo - /branches/constraints:23792-23944 /branches/java-interop:22507-22871 /branches/javaCustomSerialization:21967-22384 /branches/javaCustomSerialization2:22386-22605 /branches/localClasses:15779-16236 /branches/multivm:17984-19628 /branches/types:19181-19227 + /branches/constraints:23792-23944 /branches/java-interop:22507-22871 /branches/java-interop-exceptions:24081-24466 /branches/javaCustomSerialization:21967-22384 /branches/javaCustomSerialization2:22386-22605 /branches/localClasses:15779-16236 /branches/multivm:17984-19628 /branches/types:19181-19227 Modified: trunk/apgas.java/src/com/ibm/apgas/TaskWrapper.java =================================================================== --- trunk/apgas.java/src/com/ibm/apgas/TaskWrapper.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/apgas.java/src/com/ibm/apgas/TaskWrapper.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -1,91 +1,120 @@ package com.ibm.apgas; -import java.io.IOException; -import java.io.ObjectOutputStream; - -import x10.core.Ref; -import x10.core.X10Generated; -import x10.core.fun.VoidFun_0_0; -import x10.rtt.NamedType; -import x10.rtt.RuntimeType; -import x10.rtt.Type; -import x10.rtt.Types; -import x10.x10rt.DeserializationDispatcher; -import x10.x10rt.X10JavaDeserializer; -import x10.x10rt.X10JavaSerializable; -import x10.x10rt.X10JavaSerializer; - /** - * Wrapper class to provide X10 serialization behavior. - * This class was created by compiling the X10 class below: - * <code> + * Wrapper class to provide X10 serialization behavior. This class was created + * by compiling the X10 class below: <code> * import com.ibm.apgas.Task; * class TaskWrapper implements ()=>void { * val task:Task; - * + * * def this(t:Task) { * this.task = t; * } - * + * * public operator this() { task.body(); } * } - * </code> - * Also possible that we could do this in Task instead, - * and avoid a wrapper object. But doing it this way is - * is marginally easy to maintain because we can just regenerate - * this class when serialization logic changes. + * </code> Also possible that we could do this in Task instead, and avoid a + * wrapper object. But doing it this way is is marginally easy to maintain + * because we can just regenerate this class when serialization logic changes. */ -@X10Generated class TaskWrapper extends Ref implements VoidFun_0_0, X10JavaSerializable { +...@x1...re.X10Generated +public class TaskWrapper extends x10.core.Ref implements + x10.core.fun.VoidFun_0_0, x10.x10rt.X10JavaSerializable { private static final long serialVersionUID = 1L; - private static final short $_serialization_id = DeserializationDispatcher.addDispatcher(DeserializationDispatcher.ClosureKind.CLOSURE_KIND_SIMPLE_ASYNC, TaskWrapper.class); + private static final short $_serialization_id = x10.x10rt.DeserializationDispatcher + .addDispatcher( + x10.x10rt.DeserializationDispatcher.ClosureKind.CLOSURE_KIND_NOT_ASYNC, + TaskWrapper.class); - @SuppressWarnings("unchecked") - public static final RuntimeType<TaskWrapper> $RTT = NamedType.<TaskWrapper> make("TaskWrapper", TaskWrapper.class,new Type[] {VoidFun_0_0.$RTT, Types.OBJECT}); - public x10.rtt.RuntimeType<?> $getRTT() {return $RTT;} + public static final x10.rtt.RuntimeType<TaskWrapper> $RTT = x10.rtt.NamedType + .<TaskWrapper> make("TaskWrapper", /* base class */ + TaskWrapper.class, /* parents */ + new x10.rtt.Type[] { x10.core.fun.VoidFun_0_0.$RTT }); - private Task task; + public x10.rtt.RuntimeType<?> $getRTT() { + return $RTT; + } - private void writeObject(ObjectOutputStream oos) throws java.io.IOException { - if (x10.runtime.impl.java.Runtime.TRACE_SER) { - System.out.println("Serializer: writeObject(ObjectOutputStream) of " + this + " calling"); - } - oos.defaultWriteObject(); + public x10.rtt.Type<?> $getParam(int i) { + return null; } - public static X10JavaSerializable $_deserialize_body(TaskWrapper obj, X10JavaDeserializer deserializer) throws IOException { - if (x10.runtime.impl.java.Runtime.TRACE_SER) { - x10.runtime.impl.java.Runtime.printTraceMessage("X10JavaSerializable: $_deserialize_body() of " + TaskWrapper.class + " calling"); - } - Task task = (Task) deserializer.readRefUsingReflection(); - obj.task = task; - return obj; + private void writeObject(java.io.ObjectOutputStream oos) + throws java.io.IOException { + if (x10.runtime.impl.java.Runtime.TRACE_SER) { + java.lang.System.out + .println("Serializer: writeObject(ObjectOutputStream) of " + + this + " calling"); + } + oos.defaultWriteObject(); } - public static X10JavaSerializable $_deserializer(X10JavaDeserializer deserializer) throws IOException { - TaskWrapper obj = new TaskWrapper((java.lang.System[]) null); - deserializer.record_reference(obj); - return $_deserialize_body(obj, deserializer); + public static x10.x10rt.X10JavaSerializable $_deserialize_body( + TaskWrapper $_obj, x10.x10rt.X10JavaDeserializer $deserializer) + throws java.io.IOException { + + if (x10.runtime.impl.java.Runtime.TRACE_SER) { + x10.runtime.impl.java.Runtime + .printTraceMessage("X10JavaSerializable: $_deserialize_body() of " + + TaskWrapper.class + " calling"); + } + com.ibm.apgas.Task task = (com.ibm.apgas.Task) $deserializer + .readRefUsingReflection(); + $_obj.task = task; + return $_obj; + } + public static x10.x10rt.X10JavaSerializable $_deserializer( + x10.x10rt.X10JavaDeserializer $deserializer) + throws java.io.IOException { + + TaskWrapper $_obj = new TaskWrapper((java.lang.System[]) null); + $deserializer.record_reference($_obj); + return $_deserialize_body($_obj, $deserializer); + + } + public short $_get_serialization_id() { + return $_serialization_id; + } - public void $_serialize(X10JavaSerializer serializer) throws java.io.IOException { - serializer.writeObjectUsingReflection(this.task); + public void $_serialize(x10.x10rt.X10JavaSerializer $serializer) + throws java.io.IOException { + + $serializer.writeObjectUsingReflection(this.task); + } // constructor just for allocation - public TaskWrapper(final java.lang.System[] $dummy) { - super($dummy); + public TaskWrapper(final java.lang.System[] $dummy) { } - TaskWrapper(Task t) { - this.task = t; + public com.ibm.apgas.Task task; + + // creation method for java code (1-phase java constructor) + public TaskWrapper(final com.ibm.apgas.Task t) { + this((java.lang.System[]) null); + TaskWrapper$$init$S(t); } - @Override + // constructor for non-virtual call + final public TaskWrapper TaskWrapper$$init$S(final com.ibm.apgas.Task t) { + + this.task = ((com.ibm.apgas.Task) (t)); + + return this; + } + public void $apply() { - task.body(); + final com.ibm.apgas.Task t1 = ((com.ibm.apgas.Task) (task)); + t1.body(); } + + final public TaskWrapper TaskWrapper$$TaskWrapper$this() { + return TaskWrapper.this; + } + } Property changes on: trunk/x10.common ___________________________________________________________________ Modified: svn:mergeinfo - /branches/constraints/x10.common:23792-23944 /branches/itable/x10.common.17:10541-10846 /branches/java-interop/x10.common:22507-22871 /branches/javaCustomSerialization/x10.common:21967-22384 /branches/javaCustomSerialization2/x10.common:22386-22605 /branches/localClasses/x10.common:15779-16236 /branches/multivm/x10.common:17984-19628 /branches/placeLocal/x10.common:11035-11056 /branches/types/x10.common:19181-19227 + /branches/constraints/x10.common:23792-23944 /branches/itable/x10.common.17:10541-10846 /branches/java-interop/x10.common:22507-22871 /branches/java-interop-exceptions/x10.common:24081-24466 /branches/javaCustomSerialization/x10.common:21967-22384 /branches/javaCustomSerialization2/x10.common:22386-22605 /branches/localClasses/x10.common:15779-16236 /branches/multivm/x10.common:17984-19628 /branches/placeLocal/x10.common:11035-11056 /branches/types/x10.common:19181-19227 Property changes on: trunk/x10.compiler ___________________________________________________________________ Modified: svn:mergeinfo - /branches/constraints/x10.compiler:23792-23944 /branches/itable/x10.compiler.p3:10541-10846 /branches/java-interop/x10.compiler:22507-22871 /branches/javaCustomSerialization/x10.compiler:21967-22384 /branches/javaCustomSerialization2/x10.compiler:22386-22605 /branches/localClasses/x10.compiler:15779-16236 /branches/multivm/x10.compiler:17984-19628 /branches/placeLocal/x10.compiler:11035-11056 /branches/types/x10.compiler:19181-19227 + /branches/constraints/x10.compiler:23792-23944 /branches/itable/x10.compiler.p3:10541-10846 /branches/java-interop/x10.compiler:22507-22871 /branches/java-interop-exceptions/x10.compiler:24081-24466 /branches/javaCustomSerialization/x10.compiler:21967-22384 /branches/javaCustomSerialization2/x10.compiler:22386-22605 /branches/localClasses/x10.compiler:15779-16236 /branches/multivm/x10.compiler:17984-19628 /branches/placeLocal/x10.compiler:11035-11056 /branches/types/x10.compiler:19181-19227 Modified: trunk/x10.compiler/src/polyglot/ast/Catch_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/Catch_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/Catch_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -94,9 +94,9 @@ public Node typeCheck(ContextVisitor tc) { TypeSystem ts = tc.typeSystem(); - if (! catchType().isThrowable() && !ts.isJavaThrowable(catchType())) { + if (! catchType().isThrowable()) { Errors.issue(tc.job(), - new SemanticException("Can only throw subclasses of \"" +ts.Throwable() + "\".", formal.position()), + new SemanticException("Can only throw subclasses of \"" +ts.CheckedThrowable() + "\".", formal.position()), this); } Modified: trunk/x10.compiler/src/polyglot/ast/ClassDecl_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/ClassDecl_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/ClassDecl_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -119,10 +119,6 @@ */ protected abstract boolean isValidType(Type type); - /** - * Returns true if Object is the root of the hierarchy. Otherwise it can implement interfaces. - */ - protected abstract boolean objectIsRoot(); public abstract String toString(); Modified: trunk/x10.compiler/src/polyglot/ast/New_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/New_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/New_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -209,37 +209,39 @@ } protected New_c typeCheckHeader(TypeChecker childtc) { - TypeSystem ts = childtc.typeSystem(); + TypeSystem ts = childtc.typeSystem(); - New_c n = this; + New_c n = this; - n = n.typeCheckObjectType(childtc); + n = n.typeCheckObjectType(childtc); - Expr qualifier = n.qualifier; - TypeNode tn = n.tn; - List<Expr> arguments = n.arguments; - ClassBody body = n.body; + Expr qualifier = n.qualifier; + TypeNode tn = n.tn; + List<Expr> arguments = n.arguments; + ClassBody body = n.body; - if (body != null) { - Ref<? extends Type> ct = tn.typeRef(); - ClassDef anonType = n.anonType(); + if (body != null) { + Ref<? extends Type> ct = tn.typeRef(); + ClassDef anonType = n.anonType(); - assert anonType != null; + assert anonType != null; - if (! ct.get().toClass().flags().isInterface()) { - anonType.superType(ct); - } - else { - anonType.superType(Types.<Type>ref(ts.Object())); - assert anonType.interfaces().isEmpty() || anonType.interfaces().get(0) == ct; - if (anonType.interfaces().isEmpty()) - anonType.addInterface(ct); - } - } + if (! ct.get().toClass().flags().isInterface()) { + anonType.superType(ct); + } + else { + // [DC] assume that not setting this is OK + // we don't have a root class anymore (just a root interface: Any) + //anonType.superType(Types.<Type>ref(ts.Object())); + assert anonType.interfaces().isEmpty() || anonType.interfaces().get(0) == ct; + if (anonType.interfaces().isEmpty()) + anonType.addInterface(ct); + } + } - arguments = visitList(arguments, childtc); - n = n.reconstruct(qualifier, tn, arguments, body); - return n; + arguments = visitList(arguments, childtc); + n = n.reconstruct(qualifier, tn, arguments, body); + return n; } /** Modified: trunk/x10.compiler/src/polyglot/ast/NodeFactory.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/NodeFactory.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/NodeFactory.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -224,8 +224,6 @@ Switch Switch(Position pos, Expr expr, List<SwitchElement> elements); - Synchronized Synchronized(Position pos, Expr expr, Block body); - Throw Throw(Position pos, Expr expr); Try Try(Position pos, Block tryBlock, List<Catch> catchBlocks); @@ -313,7 +311,7 @@ List<Formal> formals, Block body); X10MethodDecl X10MethodDecl(Position pos, FlagsNode flags, TypeNode returnType, Id name, List<TypeParamNode> typeParams, - List<Formal> formals, DepParameterExpr guard, TypeNode offerType, Block body); + List<Formal> formals, DepParameterExpr guard, TypeNode offerType, List<TypeNode> throwsopt, Block body); SettableAssign SettableAssign(Position pos, Expr a, List<Expr> indices, Assign.Operator op, Expr rhs); Tuple Tuple(Position pos, List<Expr> args); @@ -325,7 +323,7 @@ X10ConstructorDecl X10ConstructorDecl(Position pos, FlagsNode flags, Id name, TypeNode returnType, List<TypeParamNode> typeParams, List<Formal> formals, - DepParameterExpr guard, TypeNode offerType, Block body); + DepParameterExpr guard, TypeNode offerType, List<TypeNode> throwTypes, Block body); PropertyDecl PropertyDecl(Position pos, FlagsNode flags, TypeNode type, Id name); PropertyDecl PropertyDecl(Position pos, FlagsNode flags, TypeNode type, Id name, Expr init); X10Special Self(Position pos); @@ -365,4 +363,6 @@ FinishExpr FinishExpr(Position p, Expr e, Stmt s); CUDAKernel CUDAKernel(Position position, List<Stmt> statements, Block body); + + public IsRefTest IsRefTest(Position pos, TypeNode t1); } Modified: trunk/x10.compiler/src/polyglot/ast/NodeFactory_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/NodeFactory_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/NodeFactory_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -250,13 +250,6 @@ return n; } - public Synchronized Synchronized(Position pos, Expr expr, Block body) { - Synchronized n = new Synchronized_c(pos, expr, body); - n = (Synchronized)n.ext(extFactory.extSynchronized()); - n = (Synchronized)n.del(delFactory.delSynchronized()); - return n; - } - public Throw Throw(Position pos, Expr expr) { Throw n = new Throw_c(pos, expr); n = (Throw)n.ext(extFactory.extThrow()); Deleted: trunk/x10.compiler/src/polyglot/ast/Synchronized.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/Synchronized.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/Synchronized.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -1,35 +0,0 @@ -/* - * This file is part of the X10 project (http://x10-lang.org). - * - * This file is licensed to You under the Eclipse Public License (EPL); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * This file was originally derived from the Polyglot extensible compiler framework. - * - * (C) Copyright 2000-2007 Polyglot project group, Cornell University - * (C) Copyright IBM Corporation 2007-2012. - */ - -package polyglot.ast; - -/** - * An immutable representation of a Java language <code>synchronized</code> - * block. Contains an expression being tested and a statement to be executed - * while the expression is <code>true</code>. - */ -public interface Synchronized extends CompoundStmt -{ - /** The expression to lock. */ - Expr expr(); - - /** Set the expression to lock. */ - Synchronized expr(Expr expr); - - /** The body in that the lock is held. */ - Block body(); - - /** Set the body in that the lock is held. */ - Synchronized body(Block body); -} Deleted: trunk/x10.compiler/src/polyglot/ast/Synchronized_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/Synchronized_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/Synchronized_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -1,121 +0,0 @@ -/* - * This file is part of the X10 project (http://x10-lang.org). - * - * This file is licensed to You under the Eclipse Public License (EPL); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * This file was originally derived from the Polyglot extensible compiler framework. - * - * (C) Copyright 2000-2007 Polyglot project group, Cornell University - * (C) Copyright IBM Corporation 2007-2012. - */ - -package polyglot.ast; - -import java.util.List; - -import polyglot.types.*; -import polyglot.util.CodeWriter; -import polyglot.util.Position; -import polyglot.visit.*; -import x10.errors.Errors; - -/** - * An immutable representation of a Java language <code>synchronized</code> - * block. Contains an expression being tested and a statement to be executed - * while the expression is <code>true</code>. - */ -public class Synchronized_c extends Stmt_c implements Synchronized -{ - protected Expr expr; - protected Block body; - - public Synchronized_c(Position pos, Expr expr, Block body) { - super(pos); - assert(expr != null && body != null); - this.expr = expr; - this.body = body; - } - - /** Get the expression to synchronize. */ - public Expr expr() { - return this.expr; - } - - /** Set the expression to synchronize. */ - public Synchronized expr(Expr expr) { - Synchronized_c n = (Synchronized_c) copy(); - n.expr = expr; - return n; - } - - /** Get the body of the statement. */ - public Block body() { - return this.body; - } - - /** Set the body of the statement. */ - public Synchronized body(Block body) { - Synchronized_c n = (Synchronized_c) copy(); - n.body = body; - return n; - } - - /** Reconstruct the statement. */ - protected Synchronized_c reconstruct(Expr expr, Block body) { - if (expr != this.expr || body != this.body) { - Synchronized_c n = (Synchronized_c) copy(); - n.expr = expr; - n.body = body; - return n; - } - - return this; - } - - /** Visit the children of the statement. */ - public Node visitChildren(NodeVisitor v) { - Expr expr = (Expr) visitChild(this.expr, v); - Block body = (Block) visitChild(this.body, v); - return reconstruct(expr, body); - } - - /** Type check the statement. */ - public Node typeCheck(ContextVisitor tc) { - TypeSystem ts = tc.typeSystem(); - - if (! ts.isSubtype(expr.type(), ts.Object(), tc.context()) ) { - Errors.issue(tc.job(), - new SemanticException("Cannot synchronize on an expression of type \"" + expr.type() + "\".", expr.position()), - this); - } - - return this; - } - - public String toString() { - return "synchronized (" + expr + ") { ... }"; - } - - /** Write the statement to an output file. */ - public void prettyPrint(CodeWriter w, PrettyPrinter tr) { - w.write("synchronized ("); - printBlock(expr, w, tr); - w.write(") "); - printSubStmt(body, w, tr); - } - - public Term firstChild() { - return expr; - } - - public <S> List<S> acceptCFG(CFGBuilder v, List<S> succs) { - v.visitCFG(expr, body, ENTRY); - v.visitCFG(body, this, EXIT); - return succs; - } - - -} Modified: trunk/x10.compiler/src/polyglot/ast/Throw_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/Throw_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/Throw_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -68,9 +68,9 @@ /** Type check the statement. */ public Node typeCheck(ContextVisitor tc) { - if (! expr.type().isThrowable() && !tc.typeSystem().isJavaThrowable(expr.type())) { + if (! expr.type().isThrowable()) { Errors.issue(tc.job(), - new SemanticException("Can only throw subclasses of \"" +tc.typeSystem().Throwable() + "\".", expr.position()), + new SemanticException("Can only throw subclasses of \"" +tc.typeSystem().CheckedThrowable() + "\".", expr.position()), this); } Modified: trunk/x10.compiler/src/polyglot/ast/Try_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/ast/Try_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/ast/Try_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -101,7 +101,7 @@ @Override public Node typeCheck(ContextVisitor tc) { TypeSystem ts = tc.typeSystem(); - SubtypeSet caught = new SubtypeSet(ts.Throwable()); + SubtypeSet caught = new SubtypeSet(ts.CheckedThrowable()); // Walk through our catch blocks, making sure that they each can // catch something. @@ -164,7 +164,7 @@ // Visit the try block. Block tryBlock = (Block) this.visitChild(this.tryBlock, newec); - SubtypeSet caught = new SubtypeSet(ts.Throwable()); + SubtypeSet caught = new SubtypeSet(ts.CheckedThrowable()); // Walk through our catch blocks, making sure that they each can // catch something. Modified: trunk/x10.compiler/src/polyglot/types/JavaArrayType_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/JavaArrayType_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/types/JavaArrayType_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -51,7 +51,7 @@ MethodDef mi = ts.methodDef(position(), position(), Types.<JavaArrayType_c>ref(this), ts.Public(), - Types.<Type>ref(ts.Object()), + Types.<Type>ref(ts.Any()), Name.make("clone"), Collections.<Ref<? extends Type>>emptyList(), Collections.<Ref<? extends Type>>emptyList()); methods.add(mi); @@ -157,7 +157,7 @@ /** Get the super type of the array type. */ public Type superClass() { - return ts.Object(); + return ts.Any(); } /** Get the interfaces implemented by the array type. */ Modified: trunk/x10.compiler/src/polyglot/types/Name.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/Name.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/types/Name.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -52,7 +52,7 @@ public static Name make(String name) { if (! StringUtil.isNameShort(name)) - assert StringUtil.isNameShort(name); + assert StringUtil.isNameShort(name) : name; return makeUnchecked(name); } Modified: trunk/x10.compiler/src/polyglot/types/ProcedureInstance_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/ProcedureInstance_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/types/ProcedureInstance_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -201,8 +201,8 @@ * <code>p</code>. */ public boolean throwsSubset(ProcedureInstance<T> p) { - SubtypeSet s1 = new SubtypeSet(ts.JavaThrowable()); - SubtypeSet s2 = new SubtypeSet(ts.JavaThrowable()); + SubtypeSet s1 = new SubtypeSet(ts.CheckedThrowable()); + SubtypeSet s2 = new SubtypeSet(ts.CheckedThrowable()); s1.addAll(this.throwTypes()); s2.addAll(p.throwTypes()); Modified: trunk/x10.compiler/src/polyglot/types/Type.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/Type.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/types/Type.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -231,11 +231,6 @@ boolean isThrowable(); /** - * Return true if a subclass of java.lang.Throwable. - */ - boolean isJavaThrowable(); - - /** * Return true if an unchecked exception. */ boolean isUncheckedException(); @@ -255,13 +250,8 @@ * Return true if the type is a type parameter */ boolean isParameterType(); - + /** - * Return true if the type is Object - */ - boolean isObject(); - - /** * Return true if the type is String */ boolean isString(); Modified: trunk/x10.compiler/src/polyglot/types/TypeEnv_c.java =================================================================== --- trunk/x10.compiler/src/polyglot/types/TypeEnv_c.java 2012-08-29 16:06:18 UTC (rev 24466) +++ trunk/x10.compiler/src/polyglot/types/TypeEnv_c.java 2012-08-29 20:54:00 UTC (rev 24467) @@ -494,14 +494,6 @@ if (child instanceof ObjectType) { ObjectType childRT = (ObjectType) child; - if (typeEquals(ancestor, ts.Object())) { - return true; - } - - if (typeEquals(childRT, ts.Object())) { - return false; - } - // Check subclass relation. if (childRT.superClass() != null) { if (isSubtype(childRT.superClass(), ancestor)) { @@ -559,7 +551,7 @@ return ts.arrayOf(leastCommonAncestor(type1.toArray().base(), type2.toArray().base())); } else { - return ts.Object(); + return ts.Any(); } } @@ -570,19 +562,13 @@ // Don't consider interfaces. if (type1.isClass() && type1.toClass().flags().isInterface()) { - return ts.Object(); + return ts.Any(); } if (type2.isClass() && type2.toClass().flags().isInterface()) { - return ts.Object(); + return ts.Any(); } - // Check against Object to ensure superType() is not null. - if (typeEquals(type1, ts.Object())) - return type1; - if (typeEquals(type2, ts.Object())) - return type2; - if (isSubtype(type1, type2)) return type2; if (isSubtype(type2, type1)) @@ -596,7 +582,7 @@ if (typeEquals(t1, t2)) return t1; - return ts.Object(); + return ts.Any(); } return ts.Any(); @@ -678,61 +664,65 @@ * correctly. */ public void checkClassConformance(ClassType ct) throws SemanticException { - if (ct.flags().isAbstract()) { - // don't need to check interfaces or abstract classes - return; - } + assert false; + if (ct.flags().isAbstract()) { + // don't need to check interfaces or abstract classes + return; + } - // build up a list of superclasses and interfaces that ct - // extends/implements that may contain abstract methods that - // ct must define. - List<Type> superInterfaces = ts.abstractSuperInterfaces(ct); + // build up a list of superclasses and interfaces that ct + // extends/implements that may contain abstract methods that + // ct must define. + List<Type> superInterfaces = ts.abstractSuperInterfaces(ct); - // check each abstract method of the classes and interfaces in - // superInterfaces - for (Iterator<Type> i = superInterfaces.iterator(); i.hasNext();) { - Type it = i.next(); - if (it instanceof ContainerType) { - ContainerType rt = (ContainerType) it; - for (Iterator<MethodInstance> j = rt.methods().iterator(); j.hasNext();) { - MethodInstance mi = j.next(); - if (!mi.flags().isAbstract()) { - // the method isn't abstract, so ct doesn't have to - // implement it. - continue; - } + // check each abstract method of the classes and interfaces in + // superInterfaces + for (Iterator<Type> i = superInterfaces.iterator(); i.hasNext();) { + Type it = i.next(); + // Everything from Any you get 'for free' + // [DC] perhaps it == ts.Any() is more appropriate here? + if (ts.typeEquals(it, ts.Any(), context)) continue; + if (it instanceof ContainerType) { + ContainerType rt = (Contai... [truncated message content] |
From: <dgr...@us...> - 2012-09-06 18:00:45
|
Revision: 24531 http://x10.svn.sourceforge.net/x10/?rev=24531&view=rev Author: dgrove-oss Date: 2012-09-06 18:00:35 +0000 (Thu, 06 Sep 2012) Log Message: ----------- XTENLANG-1391 WIP : relocate code in system_utils; further reduce the number of files included in x10rt.h Modified Paths: -------------- trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java trunk/x10.runtime/src-cpp/Makefile trunk/x10.runtime/src-cpp/x10/lang/Reference.h trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.cc trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.h trunk/x10.runtime/src-cpp/x10/lang/X10Class.h trunk/x10.runtime/src-cpp/x10aux/basic_functions.cc trunk/x10.runtime/src-cpp/x10aux/basic_functions.h trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc trunk/x10.runtime/src-cpp/x10aux/bootstrap.h trunk/x10.runtime/src-cpp/x10rt.h trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 trunk/x10.runtime/src-x10/x10/lang/System.x10 trunk/x10.runtime/src-x10/x10/util/Timer.x10 Removed Paths: ------------- trunk/x10.runtime/src-cpp/x10aux/system_utils.cc trunk/x10.runtime/src-cpp/x10aux/system_utils.h Modified: trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java =================================================================== --- trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java 2012-09-06 18:00:35 UTC (rev 24531) @@ -1363,6 +1363,8 @@ if (options.x10_config.DEBUG) { sb.append("\n// Debugger stuff\n"); + sb.append("#include<x10aux/place_local.h>\n"); + sb.append("#include<x10/lang/Thread.h>\n"); sb.append("void* x10aux_place_local__fastData = &x10aux::place_local::_fastData;\n"); sb.append("void* __x10MainRef = (void *) "+container+"::main;\n"); sb.append("pthread_key_t* __x10ThreadMapper = (pthread_key_t *) &x10::lang::Thread::__thread_mapper;\n"); Modified: trunk/x10.runtime/src-cpp/Makefile =================================================================== --- trunk/x10.runtime/src-cpp/Makefile 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/Makefile 2012-09-06 18:00:35 UTC (rev 24531) @@ -151,7 +151,6 @@ x10aux/RTT.o \ x10aux/deserialization_dispatcher.o \ x10aux/serialization.o \ - x10aux/system_utils.o \ x10aux/throw.o \ x10aux/debug.o \ x10/io/FileReader__FileInputStream.o \ Modified: trunk/x10.runtime/src-cpp/x10/lang/Reference.h =================================================================== --- trunk/x10.runtime/src-cpp/x10/lang/Reference.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10/lang/Reference.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -15,7 +15,6 @@ #include <x10aux/config.h> #include <x10aux/RTT.h> #include <x10aux/itables.h> -#include <x10aux/system_utils.h> #include <x10aux/serialization.h> #include <x10aux/deserialization_dispatcher.h> Modified: trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.cc =================================================================== --- trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.cc 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.cc 2012-09-06 18:00:35 UTC (rev 24531) @@ -9,6 +9,32 @@ * (C) Copyright Australian National University 2012. */ + +#include <cstdlib> +#include <cstdio> + +#ifdef __bgp__ +#ifndef DISABLE_CLOCK_GETTIME +#define DISABLE_CLOCK_GETTIME // seems to be broken on bgp +#endif +#endif + +#ifndef DISABLE_CLOCK_GETTIME +# if !defined(_POSIX_TIMERS) || _POSIX_TIMERS <= 0 +# define DISABLE_CLOCK_GETTIME +# endif +#endif +#ifndef DISABLE_CLOCK_GETTIME +# include <time.h> // for clock_gettime (optional POSIX) +# if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 +# define CLOCK_X10 CLOCK_MONOTONIC +# else +# define CLOCK_X10 CLOCK_REALTIME +# endif +#else +# include <sys/time.h> // for gettimeofday (POSIX) +#endif + #include <x10/lang/RuntimeNatives.h> #include <x10/io/IOException.h> @@ -21,12 +47,51 @@ #include <x10/io/OutputStreamWriter.h> #include <x10/io/OutputStreamWriter__OutputStream.h> -#include <stdlib.h> -#include <stdio.h> - using namespace x10::lang; using namespace x10::io; + +void RuntimeNatives::exit(x10_int code) { +#ifndef NO_EXCEPTIONS + // Cannot do ::exit here, as we'll need to clean up. + // We need not worry about user code catching the int + // because such a catch block can only be generated + // by us. + throw (int)code; +#else + // No choice here: die without cleanup. + ::exit((int)code); +#endif +} + +x10_long RuntimeNatives::currentTimeMillis() { +#ifdef DISABLE_CLOCK_GETTIME + struct ::timeval tv; + gettimeofday(&tv, NULL); + return (x10_long)(tv.tv_sec * 1000LL + tv.tv_usec / 1000); +#else + struct ::timespec ts; + ::clock_gettime(CLOCK_X10, &ts); + return (x10_long)(ts.tv_sec * 1000LL + ts.tv_nsec / 1000000); +#endif +} + +x10_long RuntimeNatives::nanoTime() { +#ifdef DISABLE_CLOCK_GETTIME + struct ::timeval tv; + gettimeofday(&tv, NULL); + return (x10_long)(tv.tv_sec * 1000000000LL + tv.tv_usec * 1000LL); +#else + struct ::timespec ts; + ::clock_gettime(CLOCK_X10, &ts); + return (x10_long)(ts.tv_sec * 1000000000LL + ts.tv_nsec); +#endif +} + +void RuntimeNatives::println(const char *msg) { + fprintf(stderr, "%s\n", msg); +} + Reader* RuntimeNatives::execForRead(const char *command) { FILE* inFd = popen(command, "r"); #ifndef NO_EXCEPTIONS Modified: trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.h =================================================================== --- trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10/lang/RuntimeNatives.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -21,12 +21,37 @@ } } +namespace x10aux { + extern volatile x10_int exitCode; +} + + namespace x10 { namespace lang { + class Reference; + class String; + class RuntimeNatives { public: static x10::io::Reader* execForRead(const char *command); static x10::io::Writer* execForWrite(const char *command); + + /* Exit with the given exit code */ + static void exit(x10_int code); + + /** Milliseconds since the Epoch: midnight, Jan 1, 1970. */ + static x10_long currentTimeMillis(); + + /** Current value of the system timer, in nanoseconds. May be rounded if system timer does not have nanosecond precision. */ + static x10_long nanoTime(); + + /** Low-level println to stderr; intended only for low-level debugging of XRX */ + static void println(const char *msg); + + /** Low-level printf to stderr; intended only for low-level debugging of XRX */ + template<class T> static inline void printf(const char* fmt, const T& t) { + fprintf(stderr, fmt, t); + } }; } } Modified: trunk/x10.runtime/src-cpp/x10/lang/X10Class.h =================================================================== --- trunk/x10.runtime/src-cpp/x10/lang/X10Class.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10/lang/X10Class.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -13,6 +13,7 @@ #define X10_LANG_X10CLASS_H #include <x10/lang/Reference.h> +#include <x10aux/basic_functions.h> namespace x10 { namespace lang { Modified: trunk/x10.runtime/src-cpp/x10aux/basic_functions.cc =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/basic_functions.cc 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/basic_functions.cc 2012-09-06 18:00:35 UTC (rev 24531) @@ -30,7 +30,14 @@ return hash_code(x10::lang::FloatNatives::toIntBits(x)); } +String* x10aux::identity_type_name (Reference* ptr) { + return String::Lit(alloc_printf("%s",ptr->_type()->name())); +} +String* x10aux::identity_to_string (Reference* ptr) { + return String::Lit(alloc_printf("%s@%p",ptr->_type()->name(),(void*)ptr)); +} + #define TO_STRING(SZ,T,C,FMT) \ String* x10aux::to_string(T v) { \ char buf[SZ]; \ Modified: trunk/x10.runtime/src-cpp/x10aux/basic_functions.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/basic_functions.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/basic_functions.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -326,6 +326,16 @@ x10_int hash_code(const x10_double x); x10_int hash_code(const x10_float x); + + /******* identity hash_code ********/ + inline x10_int identity_hash_code(x10::lang::Reference* ptr) { + // Combine the bits of the pointer into a 32 bit integer. + uint64_t v2 = (uint64_t)ptr; + x10_int lower = (x10_int)(v2 & 0xffffffff); + x10_int upper = (x10_int)(v2 >> 32); + x10_int hc = lower ^ upper; + return hc; + } /******* to_string ********/ @@ -376,6 +386,10 @@ template<class T> x10::lang::String* safe_to_string(T v) { return to_string(v); } + + extern x10::lang::String* identity_type_name (x10::lang::Reference* ptr); + + extern x10::lang::String* identity_to_string(x10::lang::Reference* ptr); /******* zeroValue ********/ template<class T> struct Zero { Modified: trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc 2012-09-06 18:00:35 UTC (rev 24531) @@ -11,8 +11,12 @@ #include <x10aux/config.h> #include <x10aux/bootstrap.h> +#include <x10aux/place_local.h> +#include <x10aux/alloc.h> #include <pthread.h> +#include <stdio.h> +#include <unistd.h> #include <x10/lang/Place.h> #include <x10/lang/Runtime.h> @@ -20,6 +24,7 @@ #include <x10/lang/Thread.h> #include <x10/array/Array.h> #include <x10/lang/String.h> +#include <x10/lang/Runtime__Worker.h> using namespace x10aux; Modified: trunk/x10.runtime/src-cpp/x10aux/bootstrap.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/bootstrap.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/bootstrap.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -14,18 +14,13 @@ #include <x10aux/config.h> #include <x10aux/alloc.h> -#include <x10aux/place_local.h> -#include <x10aux/system_utils.h> #include <x10aux/deserialization_dispatcher.h> #include <x10/lang/VoidFun_0_0.h> -#include <x10/lang/Thread.h> -#include <x10/lang/Runtime__Worker.h> #include <x10/lang/Closure.h> -#include <stdio.h> -#include <unistd.h> +#include <x10/lang/String.h> namespace x10 { namespace array { template<class T> class Array; } } Deleted: trunk/x10.runtime/src-cpp/x10aux/system_utils.cc =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/system_utils.cc 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/system_utils.cc 2012-09-06 18:00:35 UTC (rev 24531) @@ -1,90 +0,0 @@ -/* - * This file is part of the X10 project (http://x10-lang.org). - * - * This file is licensed to You under the Eclipse Public License (EPL); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * (C) Copyright IBM Corporation 2006-2010. - */ - -#include <cstdlib> -#include <cstdio> - -#ifdef __bgp__ -#ifndef DISABLE_CLOCK_GETTIME -#define DISABLE_CLOCK_GETTIME // seems to be broken on bgp -#endif -#endif - -#ifndef DISABLE_CLOCK_GETTIME -# if !defined(_POSIX_TIMERS) || _POSIX_TIMERS <= 0 -# define DISABLE_CLOCK_GETTIME -# endif -#endif -#ifndef DISABLE_CLOCK_GETTIME -# include <time.h> // for clock_gettime (optional POSIX) -# if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 -# define CLOCK_X10 CLOCK_MONOTONIC -# else -# define CLOCK_X10 CLOCK_REALTIME -# endif -#else -# include <sys/time.h> // for gettimeofday (POSIX) -#endif - -#include <x10aux/system_utils.h> - -#include <x10/lang/String.h> - -void x10aux::system_utils::exit(x10_int code) { -#ifndef NO_EXCEPTIONS - // Cannot do ::exit here, as we'll need to clean up. - // We need not worry about user code catching the int - // because such a catch block can only be generated - // by us. - throw (int)code; -#else - // No choice here: die without cleanup. - ::exit((int)code); -#endif -} - -x10_long x10aux::system_utils::currentTimeMillis() { -#ifdef DISABLE_CLOCK_GETTIME - struct ::timeval tv; - gettimeofday(&tv, NULL); - return (x10_long)(tv.tv_sec * 1000LL + tv.tv_usec / 1000); -#else - struct ::timespec ts; - ::clock_gettime(CLOCK_X10, &ts); - return (x10_long)(ts.tv_sec * 1000LL + ts.tv_nsec / 1000000); -#endif -} - -x10_long x10aux::system_utils::nanoTime() { -#ifdef DISABLE_CLOCK_GETTIME - struct ::timeval tv; - gettimeofday(&tv, NULL); - return (x10_long)(tv.tv_sec * 1000000000LL + tv.tv_usec * 1000LL); -#else - struct ::timespec ts; - ::clock_gettime(CLOCK_X10, &ts); - return (x10_long)(ts.tv_sec * 1000000000LL + ts.tv_nsec); -#endif -} - -void x10aux::system_utils::println(const char *msg) { - fprintf(stderr, "%s\n", msg); -} - -x10::lang::String* x10aux::identity_type_name (x10::lang::Reference* ptr) { - return x10::lang::String::Lit(alloc_printf("%s",ptr->_type()->name())); -} - -x10::lang::String* x10aux::identity_to_string (x10::lang::Reference* ptr) { - return x10::lang::String::Lit(alloc_printf("%s@%p",ptr->_type()->name(),(void*)ptr)); -} - -// vim:tabstop=4:shiftwidth=4:expandtab Deleted: trunk/x10.runtime/src-cpp/x10aux/system_utils.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/system_utils.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10aux/system_utils.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -1,67 +0,0 @@ -/* - * This file is part of the X10 project (http://x10-lang.org). - * - * This file is licensed to You under the Eclipse Public License (EPL); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * (C) Copyright IBM Corporation 2006-2010. - */ - -#ifndef X10AUX_SYSTEM_UTILS_H -#define X10AUX_SYSTEM_UTILS_H - -#include <cstdio> - -#include <x10aux/config.h> - -namespace x10 { namespace lang { - class Reference; - class String; -} } - -namespace x10aux { - - - extern volatile x10_int exitCode; - - namespace system_utils { - - void exit(x10_int code); - - /** Milliseconds since the Epoch: midnight, Jan 1, 1970. */ - x10_long currentTimeMillis(); - - /** Current value of the system timer, in nanoseconds. May be rounded if system timer does not have nanosecond precision. */ - x10_long nanoTime(); - - /** Low-level println to stderr; intended only for low-level debugging of XRX */ - void println(const char *msg); - - /** Low-level printf to stderr; intended only for low-level debugging of XRX */ - template<class T> static inline void printf(const char* fmt, const T& t) { - fprintf(stderr, fmt, t); - } - } - - /******* hash_code ********/ - inline static x10_int identity_hash_code (x10::lang::Reference* ptr) { - // Combine the bits of the pointer into a 32 bit integer. - // Note: intentionally not doing some type-punning pointer thing here as - // the behavior of that is somewhat underdefined and tends to expose - // "interesting" behavior in C++ compilers at high optimization levels. - uint64_t v2 = (uint64_t)ptr; - x10_int lower = (x10_int)(v2 & 0xffffffff); - x10_int upper = (x10_int)(v2 >> 32); - x10_int hc = lower ^ upper; - return hc; - } - - x10::lang::String* identity_type_name (x10::lang::Reference* ptr); - - x10::lang::String* identity_to_string (x10::lang::Reference* ptr); -} - -#endif -// vim:tabstop=4:shiftwidth=4:expandtab Modified: trunk/x10.runtime/src-cpp/x10rt.h =================================================================== --- trunk/x10.runtime/src-cpp/x10rt.h 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-cpp/x10rt.h 2012-09-06 18:00:35 UTC (rev 24531) @@ -23,8 +23,6 @@ #include <x10aux/array_utils.h> -#include <x10aux/system_utils.h> - #include <x10aux/cuda_kernel.h> #include <x10aux/vec_decl.h> Modified: trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-x10/x10/lang/Runtime.x10 2012-09-06 18:00:35 UTC (rev 24531) @@ -46,15 +46,15 @@ // Debug print methods @Native("java", "java.lang.System.err.println(#any)") - @Native("c++", "x10aux::system_utils::println(x10aux::to_string(#any)->c_str())") + @Native("c++", "x10::lang::RuntimeNatives::println(x10aux::to_string(#any)->c_str())") public native static def println(any:Any):void; @Native("java", "java.lang.System.err.println()") - @Native("c++", "x10aux::system_utils::println(\"\")") + @Native("c++", "x10::lang::RuntimeNatives::println(\"\")") public native static def println():void; @Native("java", "java.lang.System.err.printf(#fmt, #t)") - @Native("c++", "x10aux::system_utils::printf(#fmt, #t)") + @Native("c++", "x10::lang::RuntimeNatives::printf(#fmt, #t)") public native static def printf[T](fmt:String, t:T):void; // Native runtime interface Modified: trunk/x10.runtime/src-x10/x10/lang/System.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/System.x10 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-x10/x10/lang/System.x10 2012-09-06 18:00:35 UTC (rev 24531) @@ -12,12 +12,15 @@ package x10.lang; import x10.compiler.Native; +import x10.compiler.NativeCPPInclude; + import x10.io.Console; import x10.util.HashMap; import x10.util.Map; import x10.util.Timer; import x10.util.Pair; +@NativeCPPInclude("x10/lang/RuntimeNatives.h") public class System { private def this() {} @@ -46,7 +49,7 @@ * @see #setExitCode(Int) */ @Native("java", "java.lang.System.exit(#code)") - @Native("c++", "x10aux::system_utils::exit(#code)") + @Native("c++", "x10::lang::RuntimeNatives::exit(#code)") static native def exit(code: Int): void; /** Modified: trunk/x10.runtime/src-x10/x10/util/Timer.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/Timer.x10 2012-09-06 15:26:14 UTC (rev 24530) +++ trunk/x10.runtime/src-x10/x10/util/Timer.x10 2012-09-06 18:00:35 UTC (rev 24531) @@ -12,15 +12,22 @@ package x10.util; import x10.compiler.Native; +import x10.compiler.NativeCPPInclude; +@NativeCPPInclude("x10/lang/RuntimeNatives.h") public class Timer { - /** Milliseconds since the Epoch: midnight, Jan 1, 1970. */ - @Native("java", "java.lang.System.currentTimeMillis()") - @Native("c++", "x10aux::system_utils::currentTimeMillis()") - public native static def milliTime(): Long; + /** + * Milliseconds since the Epoch: midnight, Jan 1, 1970. + */ + @Native("java", "java.lang.System.currentTimeMillis()") + @Native("c++", "x10::lang::RuntimeNatives::currentTimeMillis()") + public native static def milliTime():Long; - /** Current value of the system timer, in nanoseconds. May be rounded if system timer does not have nanosecond precision. */ - @Native("java", "java.lang.System.nanoTime()") - @Native("c++", "x10aux::system_utils::nanoTime()") - public native static def nanoTime(): Long; + /** + * Current value of the system timer, in nanoseconds. + * May be rounded if system timer does not have nanosecond precision. + */ + @Native("java", "java.lang.System.nanoTime()") + @Native("c++", "x10::lang::RuntimeNatives::nanoTime()") + public native static def nanoTime(): Long; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2013-05-17 21:16:23
|
Revision: 25492 http://sourceforge.net/p/x10/code/25492 Author: dgrove-oss Date: 2013-05-17 21:16:20 +0000 (Fri, 17 May 2013) Log Message: ----------- A different way of stack allocating Rails that is much closer to how x10.util.Vec worked. Also make a few methods of Rail non-virtual (Rail is final class with no parents; so no reason for these methods to be virtual). Modified Paths: -------------- trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java trunk/x10.runtime/src-cpp/x10/lang/Rail.h Modified: trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java =================================================================== --- trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java 2013-05-17 21:13:57 UTC (rev 25491) +++ trunk/x10.compiler/src/x10cpp/visit/MessagePassingCodeGenerator.java 2013-05-17 21:16:20 UTC (rev 25492) @@ -2150,10 +2150,9 @@ if (dec.type().type().isRail()) { tmpName = mangled_non_method_name(dec.name().id().toString()); Type elemType = dec.type().type().toClass().typeArguments().get(0); - String elemSize = "sizeof("+Emitter.translateType(elemType)+")"; - sw.writeln("union {x10_byte bytes[sizeof("+Emitter.translateType(dec.type().type(), false)+") - "+elemSize +" + ("+sizeProperty+ " * "+elemSize+")]; double alignhack[1]; } "+tmpName+"_mem;"); + sw.writeln("x10::lang::StackAllocatedRail<"+Emitter.translateType(elemType)+", "+sizeProperty+"> "+tmpName+"_mem("+sizeProperty+");"); emitter.printHeader(dec, sw, tr, true); - sw.write(" = new (&"+tmpName+"_mem) "+Emitter.translateType(dec.type().type(), false)+"("+sizeProperty+");"); + sw.write(" = &"+tmpName+"_mem;"); } else { tmpName = "_StackAllocate_"+mangled_non_method_name(dec.name().id().toString()); sw.writeln(Emitter.translateType(dec.type().type(), false)+" "+tmpName+";"); Modified: trunk/x10.runtime/src-cpp/x10/lang/Rail.h =================================================================== --- trunk/x10.runtime/src-cpp/x10/lang/Rail.h 2013-05-17 21:13:57 UTC (rev 25491) +++ trunk/x10.runtime/src-cpp/x10/lang/Rail.h 2013-05-17 21:16:20 UTC (rev 25492) @@ -117,24 +117,24 @@ x10::lang::LongRange range(); - virtual x10::lang::Iterator<T>* iterator(); + x10::lang::Iterator<T>* iterator(); virtual x10::lang::String* toString(); - virtual T __apply(x10_long index) { + T __apply(x10_long index) { checkBounds(index, FMGL(size)); return raw[index]; } - virtual T unchecked_apply(x10_long index) { + T unchecked_apply(x10_long index) { return raw[index]; } - virtual T __set(x10_long index, T v) { + T __set(x10_long index, T v) { checkBounds(index, FMGL(size)); raw[index] = v; return v; } - virtual T unchecked_set(x10_long index, T v) { + T unchecked_set(x10_long index, T v) { raw[index] = v; return v; } @@ -149,8 +149,8 @@ } - virtual void clear(); - virtual void clear(x10_long start, x10_long numElems); + void clear(); + void clear(x10_long start, x10_long numElems); // Serialization static const x10aux::serialization_id_t _serialization_id; @@ -158,7 +158,7 @@ return _serialization_id; } - virtual void _serialize_body(x10aux::serialization_buffer& buf); + void _serialize_body(x10aux::serialization_buffer& buf); static x10::lang::Reference* _deserializer(x10aux::deserialization_buffer& buf); void _deserialize_body(x10aux::deserialization_buffer& buf); @@ -211,6 +211,13 @@ x10_long numElems, x10::lang::VoidFun_0_0* notif); }; + + template <class T, x10_long SZ> class StackAllocatedRail : public x10::lang::Rail<T> { + public: + T raw2[SZ > 1 ? SZ-1 : 0]; // get the rest of the storage we need for a Rail of size SZ + StackAllocatedRail(x10_long numElems) : x10::lang::Rail<T>(numElems) { } + }; + } } #endif // X10_LANG_RAIL_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2013-07-22 22:07:43
|
Revision: 25787 http://sourceforge.net/p/x10/code/25787 Author: dgrove-oss Date: 2013-07-22 22:07:39 +0000 (Mon, 22 Jul 2013) Log Message: ----------- WIP on APGAS C++ library. Hack x10.lang.Activity to allow APGAS library to disable the dealloc call on the body of the activity. This is temporary until the more flexible per-Task instance API can be plumbed through XRX internals. Eliminate TaskWrapper class in apgas by merging it into Task (enabled by disabling of dealloc call on Activity.body). Modified Paths: -------------- trunk/apgas.cpp/src/apgas/Pool.cc trunk/apgas.cpp/src/apgas/Task.cc trunk/apgas.cpp/src/apgas/Task.h trunk/apgas.cpp.examples/Makefile trunk/x10.runtime/src-x10/x10/lang/Activity.x10 Modified: trunk/apgas.cpp/src/apgas/Pool.cc =================================================================== --- trunk/apgas.cpp/src/apgas/Pool.cc 2013-07-22 21:11:12 UTC (rev 25786) +++ trunk/apgas.cpp/src/apgas/Pool.cc 2013-07-22 22:07:39 UTC (rev 25787) @@ -15,43 +15,8 @@ #include <apgas/Pool.h> #include <x10aux/bootstrap.h> -#include <x10/lang/VoidFun_0_0.h> #include <x10/lang/Runtime.h> -// Wrap a task so it looks like an X10 closure... -class TaskWrapper : public x10::lang::Closure { -private: - apgas::Task *myTask; - -public: - static x10::lang::VoidFun_0_0::itable<TaskWrapper> _itable; - static x10aux::itable_entry _itables[2]; - virtual x10aux::itable_entry* _getITables() { return _itables; } - - void __apply() { - myTask->execute(); - } - - TaskWrapper(apgas::Task* t) : myTask(t) {} - - static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::VoidFun_0_0>(); } - virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::VoidFun_0_0>(); } - - x10aux::serialization_id_t _get_serialization_id() { - assert(false); - return 0; - } - - void _serialize_body(x10aux::serialization_buffer &buf) { - assert(false); - } -}; - - -x10::lang::VoidFun_0_0::itable<TaskWrapper>TaskWrapper::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &TaskWrapper::__apply, &TaskWrapper::toString, &x10::lang::Closure::typeName); -x10aux::itable_entry TaskWrapper::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::VoidFun_0_0>, &TaskWrapper::_itable),x10aux::itable_entry(NULL, NULL)}; - - namespace apgas { static Pool* hack; @@ -66,6 +31,10 @@ } void Pool::start() { + // HACK: Whack x10.lang.Activity.DEALLOC_BODY to be false. + x10::lang::Activity::FMGL(DEALLOC_BODY__get)(); + x10::lang::Activity::FMGL(DEALLOC_BODY) = false; + char* args = {"APGAS_LIB"}; hack = this; x10aux::real_x10_main(1, &args, &dummy_main); @@ -74,15 +43,12 @@ void Pool::runAsync(Task* task) { task->setPool(this); - TaskWrapper* tw = new (Pool::alloc<TaskWrapper>()) TaskWrapper(task); - x10::lang::Runtime::runAsync(reinterpret_cast<x10::lang::VoidFun_0_0*>(tw)); + x10::lang::Runtime::runAsync(reinterpret_cast<x10::lang::VoidFun_0_0*>(task)); } void Pool::runFinish(Task* task) { task->setPool(this); - TaskWrapper* tw = new (Pool::alloc<TaskWrapper>()) TaskWrapper(task); - x10::lang::Runtime::runFinish(reinterpret_cast<x10::lang::VoidFun_0_0*>(tw)); - Pool::dealloc(tw); + x10::lang::Runtime::runFinish(reinterpret_cast<x10::lang::VoidFun_0_0*>(task)); } class FinishBlock : public Task { Modified: trunk/apgas.cpp/src/apgas/Task.cc =================================================================== --- trunk/apgas.cpp/src/apgas/Task.cc 2013-07-22 21:11:12 UTC (rev 25786) +++ trunk/apgas.cpp/src/apgas/Task.cc 2013-07-22 22:07:39 UTC (rev 25787) @@ -10,3 +10,10 @@ */ #include <apgas/Task.h> + +namespace apgas { + x10::lang::VoidFun_0_0::itable<Task>Task::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &Task::__apply, &Task::toString, &x10::lang::Closure::typeName); + x10aux::itable_entry Task::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::VoidFun_0_0>, &Task::_itable),x10aux::itable_entry(NULL, NULL)}; + +} + Modified: trunk/apgas.cpp/src/apgas/Task.h =================================================================== --- trunk/apgas.cpp/src/apgas/Task.h 2013-07-22 21:11:12 UTC (rev 25786) +++ trunk/apgas.cpp/src/apgas/Task.h 2013-07-22 22:07:39 UTC (rev 25787) @@ -12,19 +12,61 @@ #ifndef APGAS_TASK_H #define APGAS_TASK_H +#include <x10/lang/VoidFun_0_0.h> +#include <x10/lang/Closure.h> + namespace apgas { class Pool; - class Task { + class Task : public x10::lang::Closure { + /* + * Public API (for use by clients of the library) + */ + + public: + /** + * Return the Pool instance which is executing this Task + */ + Pool *getPool() { return myPool; } + + /** + * The body of the Task. + * Subclasses of Task override this method to provide their body. + */ + virtual void execute() = 0; + + + /* + * Implementation level API (not intended for direct use by clients of the library) + */ protected: Pool* myPool; + public: - virtual void execute() = 0; void setPool(Pool* p) { myPool = p; } - Pool *getPool() { return myPool; } - }; + + static x10::lang::VoidFun_0_0::itable<Task> _itable; + static x10aux::itable_entry _itables[2]; + virtual x10aux::itable_entry* _getITables() { return _itables; } + + void __apply() { + this->execute(); + } + + static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::VoidFun_0_0>(); } + virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::VoidFun_0_0>(); } + // TODO: use to implement distributed APIs + x10aux::serialization_id_t _get_serialization_id() { + assert(false); + return 0; + } + + void _serialize_body(x10aux::serialization_buffer &buf) { + assert(false); + } + }; } Modified: trunk/apgas.cpp.examples/Makefile =================================================================== --- trunk/apgas.cpp.examples/Makefile 2013-07-22 21:11:12 UTC (rev 25786) +++ trunk/apgas.cpp.examples/Makefile 2013-07-22 22:07:39 UTC (rev 25787) @@ -16,7 +16,7 @@ # Variables # ############# -override CXXFLAGS += -I$(APGAS_DIR)/src -I$(APGAS_DIR)/src-crx -g +override CXXFLAGS += -I$(APGAS_DIR)/src -I$(APGAS_DIR)/src-crx -I$(DISTDIR)/include -g APGAS_LINK_ARGS = -L$(APGAS_DIR) -lapgas -Wl,--rpath -Wl,$(APGAS_DIR) \ -L$(DISTDIR)/lib -l$(X10RT_LIB) -Wl,--rpath -Wl,$(DISTDIR)/lib Modified: trunk/x10.runtime/src-x10/x10/lang/Activity.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/Activity.x10 2013-07-22 21:11:12 UTC (rev 25786) +++ trunk/x10.runtime/src-x10/x10/lang/Activity.x10 2013-07-22 22:07:39 UTC (rev 25787) @@ -20,6 +20,11 @@ */ class Activity { + // This flag is hacked to be false in the APGAS C++ library + // TODO: refactor XRX so body is more than a ()=>void so that run + // can simply ask the body if it should be deallocated on completion. + private static DEALLOC_BODY:Boolean = true; + static class ClockPhases extends HashMap[Clock,Int] { // compute spawnee clock phases from spawner clock phases in async clocked(clocks) // and register spawnee on these on clocks @@ -162,7 +167,7 @@ } if (null != clockPhases) clockPhases.drop(); if (shouldNotifyTermination) finishState.notifyActivityTermination(); - Unsafe.dealloc(body); + if (DEALLOC_BODY) Unsafe.dealloc(body); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mt...@us...> - 2013-08-20 14:08:44
|
Revision: 26022 http://sourceforge.net/p/x10/code/26022 Author: mtake Date: 2013-08-20 14:08:38 +0000 (Tue, 20 Aug 2013) Log Message: ----------- update commons-logging to 1.1.3 Modified Paths: -------------- trunk/x10.compiler/src/x10/visit/X10Translator.java trunk/x10.compiler/src/x10c/X10CCompilerOptions.java trunk/x10.dist/build.xml trunk/x10.runtime/.classpath trunk/x10.runtime/build.xml Modified: trunk/x10.compiler/src/x10/visit/X10Translator.java =================================================================== --- trunk/x10.compiler/src/x10/visit/X10Translator.java 2013-08-20 12:22:37 UTC (rev 26021) +++ trunk/x10.compiler/src/x10/visit/X10Translator.java 2013-08-20 14:08:38 UTC (rev 26022) @@ -331,7 +331,7 @@ // N.B. Following jar files should be same as the ones used in X10CCompilerOptions.setDefaultValues() String x10_jar = "x10.jar"; String math_jar = System.getProperty("x10c.math.jar", "commons-math3-3.2.jar"); - String log_jar = System.getProperty("x10c.log.jar", "commons-logging-1.1.1.jar"); + String log_jar = System.getProperty("x10c.log.jar", "commons-logging-1.1.3.jar"); // XTENLANG-2722 // need a new preloading mechanism which does not use classloader to determine system classes out.println("Class-Path: " + x10_jar + " " + math_jar + " " + log_jar); Modified: trunk/x10.compiler/src/x10c/X10CCompilerOptions.java =================================================================== --- trunk/x10.compiler/src/x10c/X10CCompilerOptions.java 2013-08-20 12:22:37 UTC (rev 26021) +++ trunk/x10.compiler/src/x10c/X10CCompilerOptions.java 2013-08-20 14:08:38 UTC (rev 26022) @@ -62,7 +62,7 @@ String stdlibdir = x10_dist + File.separator + "stdlib"; String x10_jar = "x10.jar"; // FIXME: is this overridable? String math_jar = System.getProperty("x10c.math.jar", "commons-math3-3.2.jar"); - String log_jar = System.getProperty("x10c.log.jar", "commons-logging-1.1.1.jar"); + String log_jar = System.getProperty("x10c.log.jar", "commons-logging-1.1.3.jar"); default_output_classpath = stdlibdir + File.separator + x10_jar + File.pathSeparator + libdir + File.separator + math_jar + File.pathSeparator + libdir + File.separator + log_jar; Modified: trunk/x10.dist/build.xml =================================================================== --- trunk/x10.dist/build.xml 2013-08-20 12:22:37 UTC (rev 26021) +++ trunk/x10.dist/build.xml 2013-08-20 14:08:38 UTC (rev 26022) @@ -25,8 +25,8 @@ <property name="equinox.jar.url" value="http://x10.sourceforge.net/dependencies/org.eclipse.equinox.common_3.6.0.v20100503.jar"/> <property name="math.jar" value="commons-math3-3.2.jar"/> <property name="math.jar.url" value="http://x10.sourceforge.net/dependencies/commons-math3-3.2.jar"/> - <property name="log.jar" value="commons-logging-1.1.1.jar"/> - <property name="log.jar.url" value="http://x10.sourceforge.net/dependencies/commons-logging-1.1.1.jar"/> + <property name="log.jar" value="commons-logging-1.1.3.jar"/> + <property name="log.jar.url" value="http://x10.sourceforge.net/dependencies/commons-logging-1.1.3.jar"/> <property name="x10.bridge.location" location="${x10.home}/x10.wala"/> <property name="bridge.jar" value="x10wala.jar" /> <property name="x10.constraints.location" location="${x10.home}/x10.constraints"/> Modified: trunk/x10.runtime/.classpath =================================================================== --- trunk/x10.runtime/.classpath 2013-08-20 12:22:37 UTC (rev 26021) +++ trunk/x10.runtime/.classpath 2013-08-20 14:08:38 UTC (rev 26022) @@ -3,7 +3,7 @@ <classpathentry excluding="gen/**" kind="src" path="src-java"/> <classpathentry kind="src" path="src-java/gen"/> <classpathentry kind="lib" path="/x10.dist/lib/commons-math3-3.2.jar"/> - <classpathentry kind="lib" path="/x10.dist/lib/commons-logging-1.1.1.jar"/> + <classpathentry kind="lib" path="/x10.dist/lib/commons-logging-1.1.3.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="classes"/> Modified: trunk/x10.runtime/build.xml =================================================================== --- trunk/x10.runtime/build.xml 2013-08-20 12:22:37 UTC (rev 26021) +++ trunk/x10.runtime/build.xml 2013-08-20 14:08:38 UTC (rev 26022) @@ -15,7 +15,7 @@ <property name="stdlib" location="${x10.dist.location}/stdlib"/> <property name="jar" value="x10.jar"/> <property name="math.jar" value="${lib}/commons-math3-3.2.jar"/> - <property name="log.jar" value="${lib}/commons-logging-1.1.1.jar"/> + <property name="log.jar" value="${lib}/commons-logging-1.1.3.jar"/> <property name="bdwgc.dir" location="${basedir}/src-cpp/bdwgc-${bdwgc.version}"/> <property name="bdwgc.tar" value="bdwgc-${bdwgc.version}.tar.gz"/> <property name="bdwgc.url" value="http://x10.sourceforge.net/dependencies/${bdwgc.tar}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mil...@us...> - 2014-06-30 22:19:15
|
Revision: 27898 http://sourceforge.net/p/x10/code/27898 Author: milthorpe Date: 2014-06-30 22:19:06 +0000 (Mon, 30 Jun 2014) Log Message: ----------- Team: centralize block/sleep logic in blockUntil closure; implement genericReduce using reduce; add benchmarks for allreduce, barrier Modified Paths: -------------- trunk/x10.runtime/src-x10/x10/util/Team.x10 Added Paths: ----------- trunk/x10.tests/tests/MicroBenchmarks/BenchmarkAllreduce.x10 trunk/x10.tests/tests/MicroBenchmarks/BenchmarkBarrier.x10 Modified: trunk/x10.runtime/src-x10/x10/util/Team.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/Team.x10 2014-06-30 21:02:17 UTC (rev 27897) +++ trunk/x10.runtime/src-x10/x10/util/Team.x10 2014-06-30 22:19:06 UTC (rev 27898) @@ -127,8 +127,7 @@ @Native("c++", "return x10rt_coll_support();") { return -1n; } } - /** Returns the number of places in the team. - */ + /** Returns the number of places in the team. */ public def size () : Long { if (collectiveSupportLevel >= X10RT_COLL_ALLNONBLOCKINGCOLLECTIVES) return nativeSize(id); @@ -141,8 +140,7 @@ @Native("c++", "return (x10_int)x10rt_team_sz(id);") { return -1n; } } - /** Blocks until all team members have reached the barrier. - */ + /** Blocks until all team members have reached the barrier. */ public def barrier () : void { if (collectiveSupportLevel >= X10RT_COLL_NONBLOCKINGBARRIER) { if (DEBUG) Runtime.println(here + " entering native barrier on team "+id); @@ -345,14 +343,7 @@ private def genericReduce[T] (root:Place, src:T, op:Int) : T { val chk = new Rail[T](1, src); val dst = new Rail[T](1, src); - if (collectiveSupportLevel == X10RT_COLL_ALLNONBLOCKINGCOLLECTIVES) - finish nativeReduce[T](id, id==0n?here.id() as Int:Team.roles(id), root.id() as Int, chk, dst, op); - else if (collectiveSupportLevel == X10RT_COLL_ALLBLOCKINGCOLLECTIVES || collectiveSupportLevel == X10RT_COLL_NONBLOCKINGBARRIER) { - barrier(); - finish nativeReduce[T](id, id==0n?here.id() as Int:Team.roles(id), root.id() as Int, chk, dst, op); - } - else - state(id).collective_impl[T](LocalTeamState.COLL_REDUCE, root, chk, 0, dst, 0, 1, op); + reduce(root, chk, 0, dst, 0, 1, op); return dst(0); } @@ -640,21 +631,6 @@ } } - private static def lockDst(teamidcopy:Int, lock:Lock) { - if (!lock.tryLock()) { - if (useProbeNotSleep()) { - while (!lock.tryLock()) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while (!lock.tryLock()) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } - } - // recursive method used to find our parent and child links in the tree. This method assumes that root is not in the tree (or root is at position 0) private def getLinks(parent:Long, startIndex:Long, endIndex:Long):TreeStructure { if (DEBUGINTERNALS) Runtime.println(here+" getLinks called with myIndex="+myIndex+" parent="+parent+" startIndex="+startIndex+", endIndex="+endIndex); @@ -728,19 +704,25 @@ private def collective_impl[T](collType:Int, root:Place, src:Rail[T], src_off:Long, dst:Rail[T], dst_off:Long, count:Long, operation:Int):void { if (DEBUGINTERNALS) Runtime.println(here+":team"+teamid+" entered "+getCollName(collType)+" (phase="+phase.get()+", root="+root); val teamidcopy = this.teamid; // needed to prevent serializing "this" in at() statements + + /** + * Block the current activity until condition is set to true by another + * activity (originated by another place). + */ + val blockUntil = (condition:() => Boolean) => { + if (!condition()) { + if (useProbeNotSleep()) { + while (!condition()) Runtime.probe(); + } else { + Runtime.increaseParallelism(); + while (!condition()) System.threadSleep(0); + Runtime.decreaseParallelism(1n); + } + } + }; + // block if some other collective is in progress. - if (!this.phase.compareAndSet(PHASE_READY, PHASE_INIT)) { - if (useProbeNotSleep()) { - while (!this.phase.compareAndSet(PHASE_READY, PHASE_INIT)) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while (!this.phase.compareAndSet(PHASE_READY, PHASE_INIT)) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } + blockUntil(() => this.phase.compareAndSet(PHASE_READY, PHASE_INIT)); // figure out our links in the tree structure val myLinks:TreeStructure; @@ -791,21 +773,10 @@ this.phase.compareAndSet(PHASE_GATHER2, PHASE_SCATTER); // the only child has already checked in } - // wait for phase updates from children - if (this.phase.get() != PHASE_SCATTER) { - if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" waiting for children"); - if (useProbeNotSleep()) { - while (this.phase.get() != PHASE_SCATTER) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while (this.phase.get() != PHASE_SCATTER) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } - if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" released by children"); + // wait for phase updates from children + if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" waiting for children"); + blockUntil(() => this.phase.get() == PHASE_SCATTER); + if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" released by children"); // all children have checked in. Update our parent, and then wait for the parent to update us if (myLinks.parentIndex == -1) { // this is the root @@ -819,20 +790,11 @@ this.phase.set(PHASE_DONE); // the root node has no parent, and can skip its own state ahead } else { - // make sure parent is ready to recieve data + // make sure parent is ready to receive data @Pragma(Pragma.FINISH_ASYNC) finish at (places(myLinks.parentIndex)) async { - if (Team.state(teamidcopy).phase.get() < PHASE_GATHER1 || Team.state(teamidcopy).phase.get() > PHASE_SCATTER) { - if (useProbeNotSleep()) { - while(Team.state(teamidcopy).phase.get() < PHASE_GATHER1 || Team.state(teamidcopy).phase.get() >= PHASE_SCATTER) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while(Team.state(teamidcopy).phase.get() < PHASE_GATHER1 || Team.state(teamidcopy).phase.get() >= PHASE_SCATTER) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } + blockUntil(() => {val state = Team.state(teamidcopy).phase.get(); + (state >= PHASE_GATHER1 && state < PHASE_SCATTER) + }); } // move data from children to parent // Scatter and broadcast only move data from parent to children, so they have no code here @@ -853,7 +815,7 @@ else if (collType == COLL_INDEXOFMAX) { val childVal:DoubleIdx = dst(0) as DoubleIdx; @Pragma(Pragma.FINISH_ASYNC) finish at (places(myLinks.parentIndex)) async { - lockDst(teamidcopy, Team.state(teamidcopy).dstLock); + blockUntil(() => Team.state(teamidcopy).dstLock.tryLock()); val ldi:Rail[DoubleIdx] = (Team.state(teamidcopy).local_dst as Rail[DoubleIdx]); if (DEBUGINTERNALS) Runtime.println(here+" IndexOfMax: parent="+ldi(0).value+" child="+childVal.value); @@ -868,7 +830,7 @@ else if (collType == COLL_INDEXOFMIN) { val childVal:DoubleIdx = dst(0) as DoubleIdx; @Pragma(Pragma.FINISH_ASYNC) finish at (places(myLinks.parentIndex)) async { - lockDst(teamidcopy, Team.state(teamidcopy).dstLock); + blockUntil(() => Team.state(teamidcopy).dstLock.tryLock()); val ldi:Rail[DoubleIdx] = (Team.state(teamidcopy).local_dst as Rail[DoubleIdx]); if (childVal.value < ldi(0).value) ldi(0) = childVal; @@ -881,38 +843,14 @@ // increment the phase of the parent @Pragma(Pragma.FINISH_ASYNC) finish at (places(myLinks.parentIndex)) async { if (DEBUGINTERNALS) Runtime.println(here+" in phase "+Team.state(teamidcopy).phase.get()); - if (!Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER1, PHASE_GATHER2) && - !Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER2, PHASE_SCATTER)) { - if (useProbeNotSleep()) { - while(!Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER1, PHASE_GATHER2) && - !Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER2, PHASE_SCATTER)) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while(!Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER1, PHASE_GATHER2) && - !Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER2, PHASE_SCATTER)) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } + blockUntil(() => Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER1, PHASE_GATHER2) + || Team.state(teamidcopy).phase.compareAndSet(PHASE_GATHER2, PHASE_SCATTER)); if (DEBUGINTERNALS) Runtime.println(here+" has been set to phase "+Team.state(teamidcopy).phase.get()); } - if (this.phase.get() != PHASE_DONE) { // wait for parent to set us free - if (DEBUGINTERNALS) Runtime.println(here+ " waiting for parent "+places(myLinks.parentIndex)+":team"+teamidcopy+" to release us from phase "+phase.get()); - if (useProbeNotSleep()) { - while (this.phase.get() != PHASE_DONE) - Runtime.probe(); - } - else { - Runtime.increaseParallelism(); - while (this.phase.get() != PHASE_DONE) - System.threadSleep(0); - Runtime.decreaseParallelism(1n); - } - } - if (DEBUGINTERNALS) Runtime.println(here+ " released by parent"); + if (DEBUGINTERNALS) Runtime.println(here+ " waiting for parent "+places(myLinks.parentIndex)+":team"+teamidcopy+" to release us from phase "+phase.get()); + blockUntil(() => this.phase.get() == PHASE_DONE); + if (DEBUGINTERNALS) Runtime.println(here+ " released by parent"); } // move data from parent to children Added: trunk/x10.tests/tests/MicroBenchmarks/BenchmarkAllreduce.x10 =================================================================== --- trunk/x10.tests/tests/MicroBenchmarks/BenchmarkAllreduce.x10 (rev 0) +++ trunk/x10.tests/tests/MicroBenchmarks/BenchmarkAllreduce.x10 2014-06-30 22:19:06 UTC (rev 27898) @@ -0,0 +1,48 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2014. + */ +import harness.x10Test; + +import x10.util.Team; + +/** + * Benchmarks performance of Team.allreduce for varying data size + */ +public class BenchmarkAllreduce extends x10Test { + private static ITERS = 10; + private static MAX_SIZE = 2<<19; + + public def run(): Boolean = { + finish for (place in Place.places()) at (place) async { + for (var s:Long= 1; s <= MAX_SIZE; s *= 2) { + val src = new Rail[Double](s, (i:Long) => i as Double); + val dst = new Rail[Double](s); + val start = System.nanoTime(); + for (iter in 1..ITERS) { + Team.WORLD.allreduce(src, 0, dst, 0, s, Team.ADD); + } + val stop = System.nanoTime(); + + // check correctness + for (i in 0..(s-1)) { + chk(dst(i) == src(i)*Place.MAX_PLACES, "elem " + i + " is " + dst(i) + " should be " + src(i)*Place.MAX_PLACES); + } + + if (here == Place.FIRST_PLACE) Console.OUT.printf("allreduce %d: %g ms\n", s, ((stop-start) as Double) / 1e6 / ITERS); + } + } + + return true; + } + + public static def main(var args: Rail[String]): void = { + new BenchmarkAllreduce().execute(); + } +} Added: trunk/x10.tests/tests/MicroBenchmarks/BenchmarkBarrier.x10 =================================================================== --- trunk/x10.tests/tests/MicroBenchmarks/BenchmarkBarrier.x10 (rev 0) +++ trunk/x10.tests/tests/MicroBenchmarks/BenchmarkBarrier.x10 2014-06-30 22:19:06 UTC (rev 27898) @@ -0,0 +1,38 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2014. + */ +import harness.x10Test; + +import x10.util.Team; + +/** + * Benchmarks performance of Team.barrier + */ +public class BenchmarkBarrier extends x10Test { + private static ITERS = 1000; + + public def run(): Boolean = { + finish for (place in Place.places()) at (place) async { + val start = System.nanoTime(); + for (iter in 1..ITERS) { + Team.WORLD.barrier(); + } + val stop = System.nanoTime(); + + if (here == Place.FIRST_PLACE) Console.OUT.printf("barrier: %g ms\n", ((stop-start) as Double) / 1e6 / ITERS); + } + + return true; + } + + public static def main(var args: Rail[String]): void = { + new BenchmarkBarrier().execute(); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2014-07-10 15:58:43
|
Revision: 27929 http://sourceforge.net/p/x10/code/27929 Author: dgrove-oss Date: 2014-07-10 15:58:34 +0000 (Thu, 10 Jul 2014) Log Message: ----------- Place.MAX_PLACES ==> Place.numPlaces() Modified Paths: -------------- trunk/x10.dist/samples/CUDA/KMeansCUDA.x10 trunk/x10.dist/samples/GLB/bcg/BCG.x10 trunk/x10.dist/samples/GLB/bcg/Queue.x10 trunk/x10.dist/samples/GLB/bcgy/BCG.x10 trunk/x10.dist/samples/GLB/bcgy/Queue.x10 trunk/x10.dist/samples/GLB/uts/UTSG.x10 trunk/x10.dist/samples/KMeansSPMD.x10 trunk/x10.dist/samples/MontyPi.x10 trunk/x10.dist/samples/NQueensDist.x10 trunk/x10.dist/samples/resiliency/HeatTransfer_v8.x10 trunk/x10.dist/samples/resiliency/HeatTransfer_v9.x10 trunk/x10.dist/samples/resiliency/MatVecMult.x10 trunk/x10.dist/samples/resiliency/NonResilientHeatTransfer.x10 trunk/x10.dist/samples/resiliency/ResilientHeatTransfer.x10 trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v3.x10 trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v4.x10 trunk/x10.dist/samples/resiliency/ResilientKMeans.x10 trunk/x10.dist/samples/resiliency/ResilientKMeansDecimation.x10 trunk/x10.dist/samples/resiliency/ResilientMontePi.x10 trunk/x10.dist/samples/resiliency/ResilientSimpleHeatTransfer.x10 trunk/x10.dist/samples/resiliency/x10/lang/ResilientStoreForDistArray.x10 trunk/x10.dist/samples/tutorial/HeatTransfer_v4.x10 trunk/x10.runtime/src-x10/x10/glb/GLB.x10 trunk/x10.runtime/src-x10/x10/glb/GLBParameters.x10 trunk/x10.runtime/src-x10/x10/glb/Worker.x10 trunk/x10.runtime/src-x10/x10/lang/FinishResilientPlace0.x10 trunk/x10.runtime/src-x10/x10/lang/FinishResilientSample.x10 Modified: trunk/x10.dist/samples/CUDA/KMeansCUDA.x10 =================================================================== --- trunk/x10.dist/samples/CUDA/KMeansCUDA.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/CUDA/KMeansCUDA.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -200,7 +200,7 @@ finish for (h in Place.places()) at (h) async { // carve out local portion of points (point-major) - val host_num_points = global_num_points / Place.MAX_PLACES; + val host_num_points = global_num_points / Place.numPlaces(); val host_offset = h.id * host_num_points; Modified: trunk/x10.dist/samples/GLB/bcg/BCG.x10 =================================================================== --- trunk/x10.dist/samples/GLB/bcg/BCG.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/GLB/bcg/BCG.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -38,7 +38,7 @@ val l = cmdLineParams("-l", 32n); val m = cmdLineParams("-m", 1024n); - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); var z0:Int = 1n; var zz:Int = l; Modified: trunk/x10.dist/samples/GLB/bcg/Queue.x10 =================================================================== --- trunk/x10.dist/samples/GLB/bcg/Queue.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/GLB/bcg/Queue.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -17,7 +17,7 @@ lower = new Rail[Int](4096); upper = new Rail[Int](4096); val h = Runtime.hereInt(); - val max = Place.MAX_PLACES; + val max = Place.numPlaces(); lower(0) = (N as Long*h/max) as Int; upper(0) = (N as Long*(h+1)/max) as Int; size = 1; Modified: trunk/x10.dist/samples/GLB/bcgy/BCG.x10 =================================================================== --- trunk/x10.dist/samples/GLB/bcgy/BCG.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/GLB/bcgy/BCG.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -35,7 +35,7 @@ val l = cmdLineParams("-l", 32n); val m = cmdLineParams("-m", 1024n); val yfStr:String = cmdLineParams("-yf", "4000:4000"); // by default is 512 512 - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); var z0:Int = 1n; var zz:Int = l; Modified: trunk/x10.dist/samples/GLB/bcgy/Queue.x10 =================================================================== --- trunk/x10.dist/samples/GLB/bcgy/Queue.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/GLB/bcgy/Queue.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -18,7 +18,7 @@ lower = new Rail[Int](4096); upper = new Rail[Int](4096); val h = Runtime.hereInt(); - val max = Place.MAX_PLACES; + val max = Place.numPlaces(); lower(0) = (N as Long*h/max) as Int; upper(0) = (N as Long*(h+1)/max) as Int; size = 1; Modified: trunk/x10.dist/samples/GLB/uts/UTSG.x10 =================================================================== --- trunk/x10.dist/samples/GLB/uts/UTSG.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/GLB/uts/UTSG.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -29,7 +29,7 @@ val m = opts("-m", 1024n); val verbose = opts("-v", GLBParameters.SHOW_RESULT_FLAG); - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); var z0:Int = 1n; var zz:Int = l; Modified: trunk/x10.dist/samples/KMeansSPMD.x10 =================================================================== --- trunk/x10.dist/samples/KMeansSPMD.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/KMeansSPMD.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -82,9 +82,9 @@ val file_points = new Rail[Float](num_file_points*dim, init_points); //val team = Team.WORLD; - val team = Team(new SparsePlaceGroup(new Rail[Place](num_slices * Place.MAX_PLACES, (i:long) => Place(i/num_slices)))); + val team = Team(new SparsePlaceGroup(new Rail[Place](num_slices * Place.numPlaces(), (i:long) => Place(i/num_slices)))); - val num_slice_points = num_global_points / num_slices / Place.MAX_PLACES; + val num_slice_points = num_global_points / num_slices / Place.numPlaces(); finish { Modified: trunk/x10.dist/samples/MontyPi.x10 =================================================================== --- trunk/x10.dist/samples/MontyPi.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/MontyPi.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -36,7 +36,7 @@ result }; val result = DistArray.make[Double](Dist.makeUnique(), initializer); - val pi = 4*result.reduce((x:Double,y:Double) => x+y,0.0)/(N*Place.MAX_PLACES); + val pi = 4*result.reduce((x:Double,y:Double) => x+y,0.0)/(N*Place.numPlaces()); Console.OUT.println("The value of pi is " + pi); } } Modified: trunk/x10.dist/samples/NQueensDist.x10 =================================================================== --- trunk/x10.dist/samples/NQueensDist.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/NQueensDist.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -104,7 +104,7 @@ Console.OUT.println("N=" + n); //warmup //finish new NQueensPar(12, 1).start(); - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); val nq = new NQueensDist(n,P); var start:Long = -System.nanoTime(); val answer = nq.run(); Modified: trunk/x10.dist/samples/resiliency/HeatTransfer_v8.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/HeatTransfer_v8.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/HeatTransfer_v8.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -12,7 +12,7 @@ public class HeatTransfer_v8 { static val arrayColsPerPlace : Int = 2; static val epsilon = 1.0e-2; - static val dimensionSize : Int = arrayColsPerPlace * (Place.MAX_PLACES as Int); + static val dimensionSize : Int = arrayColsPerPlace * (Place.numPlaces() as Int); static def tupleToIndex(row:int, col:int, colSize:int): int { // Console.OUT.printf("row %i, col %i, colSize %i, real index %i\n", row, col, colSize, (row * colSize) + col); @@ -95,7 +95,7 @@ val tempArrayPlh = PlaceLocalHandle.make[Rail[double]](Place.places(), ()=>initializeTempArray()); val columnArrayPlh = PlaceLocalHandle.make[Rail[double]](Place.places(), ()=>initializeColumnArray()); var keepIterating : Boolean = true; - val continueVariables = new Rail[Boolean](Place.MAX_PLACES as Int); + val continueVariables = new Rail[Boolean](Place.numPlaces() as Int); val outputResults : Boolean = true; val printDebugInfo : Boolean = false; var iterationNumber : Int = 0; @@ -103,7 +103,7 @@ var after : Long; Console.OUT.printf("Array Dimension: %i, heat difference threshold: %e, number of places: %i\n", - dimensionSize, epsilon, Place.MAX_PLACES); + dimensionSize, epsilon, Place.numPlaces()); Console.OUT.printf("Array columns per place: %i\n", arrayColsPerPlace); before = System.nanoTime(); @@ -114,7 +114,7 @@ async continueVariables(p.id()) = at (p) computeHeatNextIteration(heatArrayPlh(), tempArrayPlh()); keepIterating = false; - for (i in 0..((Place.MAX_PLACES-1) as Int)) { + for (i in 0..((Place.numPlaces()-1) as Int)) { if (continueVariables(i) == true) { keepIterating = true; // only 1 needs to be true to continue iterating break; @@ -125,12 +125,12 @@ // Copy border columns across partitions finish { val secondPlace : Place = (Place.FIRST_PLACE).next(); - val lastPlace : Place = (Place(Place.MAX_PLACES-1)); + val lastPlace : Place = (Place(Place.numPlaces()-1)); at (secondPlace) getColumn(heatArrayPlh(), 1, columnArrayPlh()); at(Place.FIRST_PLACE) async replaceColumn(heatArrayPlh(), arrayColsPerPlace+1, at (secondPlace) columnArrayPlh()); at (lastPlace.prev()) getColumn(heatArrayPlh(), arrayColsPerPlace, columnArrayPlh()); at(lastPlace) async replaceColumn(heatArrayPlh(), 0, at (lastPlace.prev()) columnArrayPlh()); - for (placeNum in 1..(Place.MAX_PLACES-2)) { + for (placeNum in 1..(Place.numPlaces()-2)) { val p : Place = Place(placeNum); at (p) { at (p.prev()) getColumn(heatArrayPlh(), arrayColsPerPlace, columnArrayPlh()); Modified: trunk/x10.dist/samples/resiliency/HeatTransfer_v9.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/HeatTransfer_v9.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/HeatTransfer_v9.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -27,7 +27,7 @@ var iterations : Long; public def toString() { - return "Array Dimension: ("+(globalDim.max0+1)+" x "+(globalDim.max1+1)+"), iterations: "+iterations+", number of places: "+Place.MAX_PLACES; + return "Array Dimension: ("+(globalDim.max0+1)+" x "+(globalDim.max1+1)+"), iterations: "+iterations+", number of places: "+Place.numPlaces(); } } @@ -224,7 +224,7 @@ val plh = PlaceLocalHandle.make[PlaceState](Place.places(), ()=>new PlaceState(cfg)); - val active_places = new Rail[Long](Place.MAX_PLACES, (i:Long)=>i); + val active_places = new Rail[Long](Place.numPlaces(), (i:Long)=>i); finish for (active_id in active_places.range()) { if (active_places(active_id)==-1) continue; Modified: trunk/x10.dist/samples/resiliency/MatVecMult.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/MatVecMult.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/MatVecMult.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -257,7 +257,7 @@ static def child2(n:Long) = 2*n+2; static def launchTree[T](p:Long, plh:PlaceLocalHandle[T], cl:()=>void) { T <: Task, T isref } { - if (p >= Place.MAX_PLACES) return; + if (p >= Place.numPlaces()) return; if (plh().isPlaceActive(Place(p))) { at (Place(p)) async { launchTree[T](child1(p), plh, cl); @@ -386,12 +386,12 @@ var need_set_splits : Boolean = true; // initial task assignment -- assumes no places are dead yet - val splits_assignments = new Rail[ArrayList[Long]](Place.MAX_PLACES, new ArrayList[Long]()); - val active_places = new Rail[Boolean](Place.MAX_PLACES, true); + val splits_assignments = new Rail[ArrayList[Long]](Place.numPlaces(), new ArrayList[Long]()); + val active_places = new Rail[Boolean](Place.numPlaces(), true); var last_end : Long = 0L; for (i in active_places.range()) { val splits = new ArrayList[Long](); - val num_assigned_splits = (cfg.numSplits+i)/Place.MAX_PLACES; + val num_assigned_splits = (cfg.numSplits+i)/Place.numPlaces(); val start = last_end; val end = last_end + num_assigned_splits; for (split in start..(end-1)) splits.add(split); @@ -468,12 +468,12 @@ // reassign lost splits for (split in lost_splits) { // find next place with - while (!active_places(recover_place)) recover_place = (recover_place+1) % Place.MAX_PLACES; + while (!active_places(recover_place)) recover_place = (recover_place+1) % Place.numPlaces(); if (cfg.verbose) { Console.OUT.println("Place "+recover_place+" now gets split: "+split); } splits_assignments(recover_place).add(split); - recover_place = (recover_place+1) % Place.MAX_PLACES; + recover_place = (recover_place+1) % Place.numPlaces(); } need_set_splits = true; Modified: trunk/x10.dist/samples/resiliency/NonResilientHeatTransfer.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/NonResilientHeatTransfer.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/NonResilientHeatTransfer.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -70,7 +70,7 @@ // */ // if (restore_needed()) { // /* Create new Dist on available places */ - // Console.OUT.println("Create new Dist over available " + (Place.MAX_PLACES-Place.numDead()) + " places"); + // Console.OUT.println("Create new Dist over available " + (Place.numPlaces()-Place.numDead()) + " places"); // BigD = Dist.makeBlock(BigR, 0, new SparsePlaceGroup(livePlaces.toRail())); printDist(BigD); // SmallD = BigD | SmallR; // D_Base = Dist.makeUnique(SmallD.places()); Modified: trunk/x10.dist/samples/resiliency/ResilientHeatTransfer.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientHeatTransfer.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientHeatTransfer.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -67,7 +67,7 @@ */ if (restore_needed()) { /* Create new Dist on available places */ - Console.OUT.println("Create new Dist over available " + (Place.MAX_PLACES-Place.numDead()) + " places"); + Console.OUT.println("Create new Dist over available " + (Place.numPlaces()-Place.numDead()) + " places"); BigD = Dist.makeBlock(BigR, 0, new SparsePlaceGroup(livePlaces.toRail())); printDist(BigD); SmallD = BigD | SmallR; D_Base = Dist.makeUnique(SmallD.places()); Modified: trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v3.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v3.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v3.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -3,7 +3,7 @@ public class ResilientHeatTransfer_v3 { static val arrayColsPerPlace : Long = 256; static val epsilon = 1.0e-3; - static val dimensionSize : Long = arrayColsPerPlace * Place.MAX_PLACES; + static val dimensionSize : Long = arrayColsPerPlace * Place.numPlaces(); static val iterationsPerBackup = 0; @@ -123,8 +123,8 @@ var numCheckPoints : Long; def this() { - activePlaces = new Rail[Boolean](Place.MAX_PLACES, true); - lastActivePlace = Place.MAX_PLACES - 1; + activePlaces = new Rail[Boolean](Place.numPlaces(), true); + lastActivePlace = Place.numPlaces() - 1; lastCheckPointIter = 0; numCheckPoints = 0; } @@ -295,7 +295,7 @@ val columnArrayPlhHigh = PlaceLocalHandle.make[Rail[Double]](Place.places(), ()=>initializeColumnArray()); val backupPlh = PlaceLocalHandle.make[BackupPartitions](Place.places(), ()=>new BackupPartitions(arrayColsPerPlace)); var keepIterating : Boolean = true; - val continueVariables = new Rail[Boolean](Place.MAX_PLACES); + val continueVariables = new Rail[Boolean](Place.numPlaces()); val outputResults : Boolean = false; val printDebugInfo : Boolean = false; var iterationNumber : Long = 0; @@ -310,7 +310,7 @@ var checkPointSucceeded : Boolean; Console.OUT.printf("Array Dimension: %i, heat difference threshold: %e, number of places: %i\n", - dimensionSize, epsilon, Place.MAX_PLACES); + dimensionSize, epsilon, Place.numPlaces()); Console.OUT.printf("Array columns per place: %i\n", arrayColsPerPlace); Console.OUT.printf("Loop iterations between checkpoints: %i\n", iterationsPerBackup); before = System.nanoTime(); @@ -326,7 +326,7 @@ continue; } keepIterating = false; - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { if (recoveryInfo.activePlaces(i)) if (continueVariables(i) == true) { keepIterating = true; // only 1 needs to be true to continue iterating Modified: trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v4.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v4.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientHeatTransfer_v4.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -17,7 +17,7 @@ var iterationsPerCheckpoint : Long; public def toString() { - return "Array Dimension: ("+(globalDim.max0+1)+" x "+(globalDim.max1+1)+"), iterations: "+iterations+", number of places: "+Place.MAX_PLACES; + return "Array Dimension: ("+(globalDim.max0+1)+" x "+(globalDim.max1+1)+"), iterations: "+iterations+", number of places: "+Place.numPlaces(); } } @@ -258,11 +258,11 @@ val plh = PlaceLocalHandle.make[PlaceState](Place.places(), ()=>new PlaceState(cfg)); - val active_places = new Rail[Long](Place.MAX_PLACES, (i:Long)=>i); + val active_places = new Rail[Long](Place.numPlaces(), (i:Long)=>i); finish for (active_id in active_places.range()) { if (active_places(active_id)==-1) continue; - at (Place(active_places(active_id))) async plh().assignPartition(active_places, Place.MAX_PLACES); + at (Place(active_places(active_id))) async plh().assignPartition(active_places, Place.numPlaces()); } Modified: trunk/x10.dist/samples/resiliency/ResilientKMeans.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientKMeans.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientKMeans.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -35,7 +35,7 @@ val POINTS = (args.size>=1) ? Long.parseLong(args(0)) : 1000000L; val CLUSTERS = (args.size>=2) ? Long.parseLong(args(1)): 4L; Console.OUT.println("KMeans: Divide " + DIM + " dim " + POINTS + " points into " - + CLUSTERS + " clusters, using " + Place.MAX_PLACES + " places"); + + CLUSTERS + " clusters, using " + Place.numPlaces() + " places"); finish for (p in Place.places()) at (p) { Console.OUT.println(here+" running in "+Runtime.getName()); @@ -128,7 +128,7 @@ */ //Console.OUT.println("Computing new clusters... "); //val compute_clusters_before = System.nanoTime(); - val numAvail = Place.MAX_PLACES - Place.numDead(); // number of available places + val numAvail = Place.numPlaces() - Place.numDead(); // number of available places val div = POINTS/numAvail; // share for each place val rem = POINTS%numAvail; // extra share for Place0 var places_used : Long = 0L; Modified: trunk/x10.dist/samples/resiliency/ResilientKMeansDecimation.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientKMeansDecimation.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientKMeansDecimation.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -34,8 +34,8 @@ public static def main(args:Rail[String]) {here == Place.FIRST_PLACE} { val POINTS = (args.size>=1) ? Long.parseLong(args(0)) : 1000000L; val CLUSTERS = (args.size>=2) ? Long.parseLong(args(1)): 4L; - Console.OUT.println("KMeans: Abstract " + Place.MAX_PLACES*POINTS + " points in " + DIM + "D space into " - + CLUSTERS + " clusters, using " + Place.MAX_PLACES + " places"); + Console.OUT.println("KMeans: Abstract " + Place.numPlaces()*POINTS + " points in " + DIM + "D space into " + + CLUSTERS + " clusters, using " + Place.numPlaces() + " places"); /* finish for (p in Place.places()) at (p) { Modified: trunk/x10.dist/samples/resiliency/ResilientMontePi.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientMontePi.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientMontePi.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -4,7 +4,7 @@ public class ResilientMontePi { - static val ITERS = 1000000000l / Place.MAX_PLACES; + static val ITERS = 1000000000l / Place.numPlaces(); public static def main (args : Rail[String]) { Modified: trunk/x10.dist/samples/resiliency/ResilientSimpleHeatTransfer.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/ResilientSimpleHeatTransfer.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/ResilientSimpleHeatTransfer.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -73,7 +73,7 @@ */ if (restore_needed()) { /* Create new PlaceGroup on available places */ - Console.OUT.println("Create new PlaceGroup over available " + (Place.MAX_PLACES-Place.numDead()) + " places"); + Console.OUT.println("Create new PlaceGroup over available " + (Place.numPlaces()-Place.numDead()) + " places"); // BigD = Dist.makeBlock(BigR, 0, new SparsePlaceGroup(livePlaces.toRail())); printDist(BigD); // SmallD = BigD | SmallR; // D_Base = Dist.makeUnique(SmallD.places()); Modified: trunk/x10.dist/samples/resiliency/x10/lang/ResilientStoreForDistArray.x10 =================================================================== --- trunk/x10.dist/samples/resiliency/x10/lang/ResilientStoreForDistArray.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/resiliency/x10/lang/ResilientStoreForDistArray.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -83,13 +83,13 @@ at (here) hm().put(key, value); // value is deep-copied by "at" if (verbose>=1) DEBUG(key, "backed up locally"); /* Backup the value in another place */ - var backupPlace:Long = key.hashCode() % Place.MAX_PLACES; + var backupPlace:Long = key.hashCode() % Place.numPlaces(); var trial:Long; - for (trial = 0L; trial < Place.MAX_PLACES; trial++) { + for (trial = 0L; trial < Place.numPlaces(); trial++) { if (backupPlace != here.id && !Place.isDead(backupPlace)) break; // found appropriate place - backupPlace = (backupPlace+1) % Place.MAX_PLACES; + backupPlace = (backupPlace+1) % Place.numPlaces(); } - if (trial == Place.MAX_PLACES) { + if (trial == Place.numPlaces()) { /* no backup place available */ if (verbose>=1) DEBUG(key, "no backup place available"); } else { @@ -114,9 +114,9 @@ /* falls through, check other places */ } /* Try to load from another place */ - var backupPlace:Long = key.hashCode() % Place.MAX_PLACES; + var backupPlace:Long = key.hashCode() % Place.numPlaces(); var trial:Long; - for (trial = 0L; trial < Place.MAX_PLACES; trial++) { + for (trial = 0L; trial < Place.numPlaces(); trial++) { if (backupPlace != here.id && !Place.isDead(backupPlace)) { if (verbose>=1) DEBUG(key, "checking backup place " + backupPlace); try { @@ -131,7 +131,7 @@ /* falls through, try next place */ } } - backupPlace = (backupPlace+1) % Place.MAX_PLACES; + backupPlace = (backupPlace+1) % Place.numPlaces(); } if (verbose>=1) DEBUG(key, "no backup found, ERROR"); if (verbose>=1) DEBUG(key, "load throwing exception"); @@ -159,7 +159,7 @@ * x10 x10.lang.ResilientStoreForDistArray */ public static def main(ars:Rail[String]) { - if (Place.MAX_PLACES < 3) throw new Exception("numPlaces should be >=3"); + if (Place.numPlaces() < 3) throw new Exception("numPlaces should be >=3"); val rs = ResilientStoreForDistArray.make[Place,Rail[String]](); Modified: trunk/x10.dist/samples/tutorial/HeatTransfer_v4.x10 =================================================================== --- trunk/x10.dist/samples/tutorial/HeatTransfer_v4.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.dist/samples/tutorial/HeatTransfer_v4.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -89,7 +89,7 @@ public static def main(Rail[String]) { Console.OUT.println("HeatTransfer Tutorial example with n="+n+" and epsilon="+epsilon); Console.OUT.println("Initializing data structures"); - Console.OUT.println("NUM_PLACES=" + Place.MAX_PLACES); + Console.OUT.println("NUM_PLACES=" + Place.numPlaces()); val s = new HeatTransfer_v4(); Console.OUT.print("Beginning computation..."); val start = System.nanoTime(); Modified: trunk/x10.runtime/src-x10/x10/glb/GLB.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/glb/GLB.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.runtime/src-x10/x10/glb/GLB.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -10,7 +10,7 @@ /** * Number of places. */ - private val P = Place.MAX_PLACES; + private val P = Place.numPlaces(); /** * Home PlaceLocalHandle of {@link Worker} */ @@ -189,7 +189,7 @@ * @param st PLH for {@link Worker} */ private def printLog(st:PlaceLocalHandle[Worker[Queue, R]]):void{ - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); for(var i:Long =0; i < P; ++i){ at(Place(i)){ st().queue.printLog(); Modified: trunk/x10.runtime/src-x10/x10/glb/GLBParameters.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/glb/GLBParameters.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.runtime/src-x10/x10/glb/GLBParameters.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -28,7 +28,7 @@ /** * Returns a default glb parameter */ - public static Default = GLBParameters(100n,4n,4n,computeZ(Place.MAX_PLACES,4n),1024n,15n); + public static Default = GLBParameters(100n,4n,4n,computeZ(Place.numPlaces(),4n),1024n,15n); /** * Show computation result. Modified: trunk/x10.runtime/src-x10/x10/glb/Worker.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/glb/Worker.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.runtime/src-x10/x10/glb/Worker.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -59,7 +59,7 @@ @x10.compiler.Volatile transient var waiting:Boolean = false; /* Number of places.*/ - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); /*Context object accessible to user code, which can be used to yield.*/ var context:Context[Queue, R]; @@ -362,7 +362,7 @@ // static def stats[Queue, R](st:PlaceLocalHandle[Worker[Queue, R]], verbose:Boolean){Queue<:TaskQueue[Queue, R]} { - // val P = Place.MAX_PLACES; + // val P = Place.numPlaces(); // val logs:Rail[Logger]; // if (P >= 1024) { // logs = new Rail[Logger](P/32, (i:Long)=>at (Place(i*32)) { @@ -388,7 +388,7 @@ * @param st PLH of Worker */ static def broadcast[Queue, R](st:PlaceLocalHandle[Worker[Queue, R]]){Queue<:TaskQueue[Queue, R]} { - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); @Pragma(Pragma.FINISH_DENSE) finish { if (P < 256) { for(var i:Long=0; i<P; i++) { @@ -412,7 +412,7 @@ * @param st: PLH of Worker */ static def initContexts[Queue,R](st:PlaceLocalHandle[Worker[Queue, R]]){Queue<:TaskQueue[Queue, R]}{ - val P = Place.MAX_PLACES; + val P = Place.numPlaces(); @Pragma(Pragma.FINISH_DENSE) finish { if (P < 256) { for(var i:Long=0; i<P; i++) { Modified: trunk/x10.runtime/src-x10/x10/lang/FinishResilientPlace0.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/FinishResilientPlace0.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.runtime/src-x10/x10/lang/FinishResilientPlace0.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -21,10 +21,10 @@ private static val place0 = Place.FIRST_PLACE; private static class State { // data stored at Place0 - val transit = new Rail[Int](Place.MAX_PLACES * Place.MAX_PLACES, 0n); - val transitAdopted = new Rail[Int](Place.MAX_PLACES * Place.MAX_PLACES, 0n); - val live = new Rail[Int](Place.MAX_PLACES, 0n); - val liveAdopted = new Rail[Int](Place.MAX_PLACES, 0n); + val transit = new Rail[Int](Place.numPlaces() * Place.numPlaces(), 0n); + val transitAdopted = new Rail[Int](Place.numPlaces() * Place.numPlaces(), 0n); + val live = new Rail[Int](Place.numPlaces(), 0n); + val liveAdopted = new Rail[Int](Place.numPlaces(), 0n); val excs = new x10.util.GrowableRail[Exception](); // exceptions to report val children = new x10.util.GrowableRail[Long](); // children var adopterId:Long = -1; // adopter (if adopted) @@ -93,11 +93,11 @@ lowLevelAt(place0, ()=>{ atomic { val state = states(id); if (!state.isAdopted()) { - state.transit(srcId*Place.MAX_PLACES + dstId)++; + state.transit(srcId*Place.numPlaces() + dstId)++; } else { val adopterId = getCurrentAdopterId(id); val adopterState = states(adopterId); - adopterState.transitAdopted(srcId*Place.MAX_PLACES + dstId)++; + adopterState.transitAdopted(srcId*Place.numPlaces() + dstId)++; } if (verbose>=3) state.dump("DUMP id="+id); }}); @@ -114,12 +114,12 @@ val state = states(id); if (!state.isAdopted()) { state.live(dstId)++; - state.transit(srcId*Place.MAX_PLACES + dstId)--; + state.transit(srcId*Place.numPlaces() + dstId)--; } else { val adopterId = getCurrentAdopterId(id); val adopterState = states(adopterId); adopterState.liveAdopted(dstId)++; - adopterState.transitAdopted(srcId*Place.MAX_PLACES + dstId)--; + adopterState.transitAdopted(srcId*Place.numPlaces() + dstId)--; } if (verbose>=3) state.dump("DUMP id="+id); }}); @@ -234,27 +234,27 @@ assert !childState.isAdopted(); childState.adopterId = id; state.children.addAll(childState.children); // will be checked in the following iteration - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { state.liveAdopted(i) += (childState.live(i) + childState.liveAdopted(i)); - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; state.transitAdopted(idx) += (childState.transit(idx) + childState.transitAdopted(idx)); } } } // for (chIndex) } // 2 delete dead entries - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { if (Place.isDead(i)) { for (unused in 1..state.live(i)) { if (verbose>=3) debug("adding DPE for live("+i+")"); addDeadPlaceException(state, i); } state.live(i) = 0n; state.liveAdopted(i) = 0n; - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; state.transit(idx) = 0n; state.transitAdopted(idx) = 0n; - val idx2 = j*Place.MAX_PLACES + i; + val idx2 = j*Place.numPlaces() + i; for (unused in 1..state.transit(idx2)) { if (verbose>=3) debug("adding DPE for transit("+j+","+i+")"); addDeadPlaceException(state, i); @@ -267,11 +267,11 @@ // 3 quiescent check if (verbose>=3) state.dump("DUMP id="+id); var quiet:Boolean = true; - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { if (state.live(i) > 0) { quiet = false; break; } if (state.liveAdopted(i) > 0) { quiet = false; break; } - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; if (state.transit(idx) > 0) { quiet = false; break; } if (state.transitAdopted(idx) > 0) { quiet = false; break; } } Modified: trunk/x10.runtime/src-x10/x10/lang/FinishResilientSample.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/lang/FinishResilientSample.x10 2014-07-10 15:48:04 UTC (rev 27928) +++ trunk/x10.runtime/src-x10/x10/lang/FinishResilientSample.x10 2014-07-10 15:58:34 UTC (rev 27929) @@ -68,10 +68,10 @@ } private static class State { // data stored into ResilientStore - val transit = new Rail[Int](Place.MAX_PLACES * Place.MAX_PLACES, 0n); - val transitAdopted = new Rail[Int](Place.MAX_PLACES * Place.MAX_PLACES, 0n); - val live = new Rail[Int](Place.MAX_PLACES, 0n); - val liveAdopted = new Rail[Int](Place.MAX_PLACES, 0n); + val transit = new Rail[Int](Place.numPlaces() * Place.numPlaces(), 0n); + val transitAdopted = new Rail[Int](Place.numPlaces() * Place.numPlaces(), 0n); + val live = new Rail[Int](Place.numPlaces(), 0n); + val liveAdopted = new Rail[Int](Place.numPlaces(), 0n); val excs = new GrowableRail[Exception](); // exceptions to report val children = new GrowableRail[FinishID](); // children var adopterId:FinishID = FinishID.NULL; // adopter (if adopted) @@ -179,12 +179,12 @@ RS.lock(); val state = RS.getOrElse(id, null); if (!state.isAdopted()) { - state.transit(srcId*Place.MAX_PLACES + dstId)++; + state.transit(srcId*Place.numPlaces() + dstId)++; RS.put(id, state); } else { val adopterId = getCurrentAdopterId(); val adopterState = RS.getOrElse(adopterId, null); - adopterState.transitAdopted(srcId*Place.MAX_PLACES + dstId)++; + adopterState.transitAdopted(srcId*Place.numPlaces() + dstId)++; RS.put(adopterId, adopterState); } if (verbose>=3) state.dump("DUMP id="+id); @@ -203,13 +203,13 @@ val state = RS.getOrElse(id, null); if (!state.isAdopted()) { state.live(dstId)++; - state.transit(srcId*Place.MAX_PLACES + dstId)--; + state.transit(srcId*Place.numPlaces() + dstId)--; RS.put(id, state); } else { val adopterId = getCurrentAdopterId(); val adopterState = RS.getOrElse(adopterId, null); adopterState.liveAdopted(dstId)++; - adopterState.transitAdopted(srcId*Place.MAX_PLACES + dstId)--; + adopterState.transitAdopted(srcId*Place.numPlaces() + dstId)--; RS.put(adopterId, adopterState); } if (verbose>=3) state.dump("DUMP id="+id); @@ -298,27 +298,27 @@ childState.adopterId = id; RS.put(childId, childState); state.children.addAll(childState.children); // will be checked in the following iteration - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { state.liveAdopted(i) += (childState.live(i) + childState.liveAdopted(i)); - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; state.transitAdopted(idx) += (childState.transit(idx) + childState.transitAdopted(idx)); } } } // for (chIndex) } // 2 delete dead entries - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { if (Place.isDead(i)) { for (unused in 1..state.live(i)) { if (verbose>=3) debug("adding DPE for live("+i+")"); addDeadPlaceException(state, i); } state.live(i) = 0n; state.liveAdopted(i) = 0n; - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; state.transit(idx) = 0n; state.transitAdopted(idx) = 0n; - val idx2 = j*Place.MAX_PLACES + i; + val idx2 = j*Place.numPlaces() + i; for (unused in 1..state.transit(idx2)) { if (verbose>=3) debug("adding DPE for transit("+j+","+i+")"); addDeadPlaceException(state, i); @@ -333,11 +333,11 @@ // 3 quiescent check if (verbose>=3) state.dump("DUMP id="+id); var quiet:Boolean = true; - for (i in 0..(Place.MAX_PLACES-1)) { + for (i in 0..(Place.numPlaces()-1)) { if (state.live(i) > 0) { quiet = false; break; } if (state.liveAdopted(i) > 0) { quiet = false; break; } - for (j in 0..(Place.MAX_PLACES-1)) { - val idx = i*Place.MAX_PLACES + j; + for (j in 0..(Place.numPlaces()-1)) { + val idx = i*Place.numPlaces() + j; if (state.transit(idx) > 0) { quiet = false; break; } if (state.transitAdopted(idx) > 0) { quiet = false; break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mil...@us...> - 2014-07-31 13:48:10
|
Revision: 28017 http://sourceforge.net/p/x10/code/28017 Author: milthorpe Date: 2014-07-31 13:48:08 +0000 (Thu, 31 Jul 2014) Log Message: ----------- XTENLANG-3419: X10 implementation of Team alltoall - fixed existing X10 implementation, added test. Note: there is a bug in the native X10RT-MPI implementation still to be fixed. Modified Paths: -------------- trunk/x10.runtime/src-x10/x10/util/Team.x10 Added Paths: ----------- trunk/x10.tests/tests/Constructs/Team/Alltoall.x10 Modified: trunk/x10.runtime/src-x10/x10/util/Team.x10 =================================================================== --- trunk/x10.runtime/src-x10/x10/util/Team.x10 2014-07-31 10:27:21 UTC (rev 28016) +++ trunk/x10.runtime/src-x10/x10/util/Team.x10 2014-07-31 13:48:08 UTC (rev 28017) @@ -264,8 +264,8 @@ } else if (collectiveSupportLevel == X10RT_COLL_ALLBLOCKINGCOLLECTIVES || collectiveSupportLevel == X10RT_COLL_NONBLOCKINGBARRIER) { if (DEBUG) Runtime.println(here + " entering pre-alltoall barrier of team "+id); - barrier(); - if (DEBUG) Runtime.println(here + " entering native alltoall of team "+id); + barrier(); + if (DEBUG) Runtime.println(here + " entering native alltoall of team "+id); finish nativeAlltoall(id, id==0n?here.id() as Int:Team.roles(id), src, src_off as Int, dst, dst_off as Int, count as Int); } else { @@ -785,9 +785,9 @@ } // wait for phase updates from children - if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" waiting for children"); + if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" waiting for children phase "+Team.state(teamidcopy).phase.get()); probeUntil(() => this.phase.get() == PHASE_SCATTER); - if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" released by children"); + if (DEBUGINTERNALS) Runtime.println(here+":team"+teamidcopy+" released by children phase "+Team.state(teamidcopy).phase.get()); if (collType == COLL_REDUCE || collType == COLL_ALLREDUCE) { if (local_child1Index != -1) { // reduce local and child data @@ -798,6 +798,8 @@ } else { // no children Rail.copy(src, src_off, dst, dst_off, count); } + } else if (collType == COLL_ALLTOALL) { + Rail.copy(src, src_off, dst, dst_off+(count*myIndex), count); } // all children have checked in. Update our parent, and then wait for the parent to update us @@ -807,8 +809,6 @@ Rail.copy(src, src_off, dst, dst_off, count); else if (collType == COLL_SCATTER) Rail.copy(src, src_off+(count*myIndex), dst, dst_off, count); - else if (collType == COLL_ALLTOALL) - Rail.copy(src, src_off+(count*myIndex), dst, dst_off+(count*myIndex), count); this.phase.set(PHASE_DONE); // the root node has no parent, and can skip its own state ahead } else { val waitForParentToReceive = () => { @@ -826,17 +826,18 @@ }; // move data from children to parent - // Scatter and broadcast only move data from parent to children, so they have no code here + // Scatter and broadcast only move data from parent to children, so they have no code here if (collType >= COLL_ALLTOALL) { if (DEBUGINTERNALS) Runtime.println(here+" moving data to parent"); val notnulldst = dst as Rail[T]{self!=null}; val gr = new GlobalRail[T](notnulldst); if (collType == COLL_ALLTOALL) { - val totalData:Long = count*(myLinks.totalChildren+1); + val sourceIndex = myIndex; + val totalData = count*(myLinks.totalChildren+1); @Pragma(Pragma.FINISH_ASYNC) finish at (places(myLinks.parentIndex)) async { waitForParentToReceive(); // copy my data, plus all the data filled in by my children, to my parent - Rail.uncountedCopy(gr, dst_off, Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, totalData, incrementParentPhase); + Rail.uncountedCopy(gr, dst_off+(count*sourceIndex), Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off+(count*sourceIndex), totalData, incrementParentPhase); } } else if (collType == COLL_REDUCE || collType == COLL_ALLREDUCE) { // copy reduced data to parent @@ -902,24 +903,22 @@ if (collType == COLL_ALLTOALL) { // only copy over the data that did not come from this child in the first place + val copyToChild = () => { + val count = Team.state(teamidcopy).local_count; + val teamSize = Team.state(teamidcopy).places.size(); + val lastChild = Team.state(teamidcopy).myIndex + Team.state(teamidcopy).local_grandchildren + 1; + @Pragma(Pragma.FINISH_ASYNC) finish { + // position 0 up to the child id + Rail.asyncCopy(gr, dst_off, Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, count*Team.state(teamidcopy).myIndex); + // position of last child range, to the end + Rail.asyncCopy(gr, dst_off+(count*lastChild), Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off+(count*lastChild), count*(teamSize-lastChild)); + } + }; + @Pragma(Pragma.FINISH_SPMD) finish { - at (places(local_child1Index)) async { - @Pragma(Pragma.FINISH_ASYNC) finish { - // position 0 up to the child id - Rail.asyncCopy(gr, dst_off, Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, Team.state(teamidcopy).local_count*Team.state(teamidcopy).myIndex); - // position of last child range, to the end - Rail.asyncCopy(gr, dst_off+(Team.state(teamidcopy).local_count*(Team.state(teamidcopy).local_grandchildren+1)), Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, Team.state(teamidcopy).local_count); - } - } + at (places(local_child1Index)) async copyToChild(); if (local_child2Index != -1) { - at (places(local_child2Index)) async { - @Pragma(Pragma.FINISH_ASYNC) finish { - // position 0 up to the child id - Rail.asyncCopy(gr, dst_off, Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, Team.state(teamidcopy).local_count); - // position of last child range, to the end - Rail.asyncCopy(gr, dst_off, Team.state(teamidcopy).local_dst as Rail[T], Team.state(teamidcopy).local_dst_off, Team.state(teamidcopy).local_count); - } - } + at (places(local_child2Index)) async copyToChild(); } } } else if (collType == COLL_BROADCAST || collType == COLL_ALLREDUCE || Added: trunk/x10.tests/tests/Constructs/Team/Alltoall.x10 =================================================================== --- trunk/x10.tests/tests/Constructs/Team/Alltoall.x10 (rev 0) +++ trunk/x10.tests/tests/Constructs/Team/Alltoall.x10 2014-07-31 13:48:08 UTC (rev 28017) @@ -0,0 +1,67 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2014. + */ + +import harness.x10Test; +import x10.util.Team; + +/** + * Unit tests for all-to-all functionality of Team + */ +public class Alltoall extends x10Test { + + def allToAllTest(team:Team, res:GlobalRef[Cell[Boolean]]) { + val count = 113L; + val sz = count*team.size(); + val src = new Rail[Double](count, (i:long)=>((here.id*count+i) as Double)); + val dst = new Rail[Double](sz, (i:long)=>-(i as Double)); + var success: boolean = true; + { + team.alltoall(src, 0L, dst, 0L, count); + + for (i in 0..(count-1)) { + val oracle = i as Double; + if (dst(i) != oracle) { + Console.OUT.printf("Team %d place %d received invalid value %f at %d instead of %f\n", + team.id(), here.id, dst(i), i, oracle); + success = false; + } + } + } + + val reducedSuccess = team.allreduce(success ? 1 : 0, Team.AND); + + team.barrier(); + + if (reducedSuccess != 1) { + Console.OUT.println("Reduced Success value was "+reducedSuccess+" but expected 1"); + } + + success &= (reducedSuccess == 1); + + if (!success) at (res.home) res().set(false); + + } + + public def run(): boolean { + Console.OUT.println("Doing alltoall for World ("+Place.numPlaces()+" places)"); + val res:Cell[Boolean] = new Cell[Boolean](true); + val gr:GlobalRef[Cell[Boolean]] = GlobalRef[Cell[Boolean]](res); + finish for (p in Place.places()) { + async at(p) allToAllTest(Team.WORLD, gr); + } + + return res(); + } + + public static def main(args: Rail[String]) { + new Alltoall().execute(); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2015-01-12 13:13:21
|
Revision: 28813 http://sourceforge.net/p/x10/code/28813 Author: dgrove-oss Date: 2015-01-12 13:13:01 +0000 (Mon, 12 Jan 2015) Log Message: ----------- Update copyright headers for 2015. Modified Paths: -------------- trunk/apgas.cpp/src/apgas/RemoteTask.h trunk/apgas.cpp/src/apgas/Runtime.cc trunk/apgas.cpp/src/apgas/Runtime.h trunk/apgas.cpp/src/apgas/Task.cc trunk/apgas.cpp/src/apgas/Task.h trunk/apgas.cpp.examples/fib.cc trunk/apgas.cpp.examples/hello.cc trunk/apgas.cpp.examples/helloAll.cc trunk/apgas.impl/src/apgas/impl/DeadPlaceError.java trunk/apgas.impl/src/apgas/impl/DefaultFinish.java trunk/apgas.impl/src/apgas/impl/Deque.java trunk/apgas.impl/src/apgas/impl/ExceptionalTask.java trunk/apgas.impl/src/apgas/impl/GlobalRuntimeImpl.java trunk/apgas.impl/src/apgas/impl/ResilientFinish.java trunk/apgas.impl/src/apgas/impl/Scheduler.java trunk/apgas.impl/src/apgas/impl/Semaphore.java trunk/apgas.impl/src/apgas/impl/SerializableRunnable.java trunk/apgas.impl/src/apgas/impl/Task.java trunk/apgas.impl/src/apgas/impl/Transport.java trunk/apgas.impl/src/apgas/impl/Worker.java trunk/apgas.impl/src/apgas/impl/package-info.java trunk/x10.common/src/x10/config/Configuration.java trunk/x10.common/src/x10/config/ConfigurationError.java trunk/x10.common/src/x10/config/OptionError.java trunk/x10.common/src/x10/util/CollectionFactory.java trunk/x10.constraints.tests/src/x10/constraints/tests/AllTests.java trunk/x10.constraints.tests/src/x10/constraints/tests/CyclicTest.java trunk/x10.constraints.tests/src/x10/constraints/tests/DisEqualsTests.java trunk/x10.constraints.tests/src/x10/constraints/tests/EQVEntailmentTests.java trunk/x10.constraints.tests/src/x10/constraints/tests/EntailmentTest.java trunk/x10.constraints.tests/src/x10/constraints/tests/FormulaTest.java trunk/x10.constraints.tests/src/x10/constraints/tests/MyTest.java trunk/x10.constraints.tests/src/x10/constraints/tests/Pair.java trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/LoadedYakMap.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCollection.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCursor.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakException.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakList.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakMap.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakMapReduceOutput.x10 trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakUtil.x10 trunk/x10.mongo/mongo4x10/tutorial/tutcode/A_Main.x10 trunk/x10.mongo/mongo4x10/tutorial/tutcode/B_Main.x10 trunk/x10.mongo/mongo4x10/tutorial/tutcode/C_Main.x10 trunk/x10.mongo/mongo4x10/tutorial/tutcode/P_Main.x10 trunk/x10.runtime/Make.rules trunk/x10.runtime/src-cpp/x10/io/FileReader__FileInputStream.cc trunk/x10.runtime/src-cpp/x10/io/FileReader__FileInputStream.h trunk/x10.runtime/src-cpp/x10/io/FileWriter__FileOutputStream.cc trunk/x10.runtime/src-cpp/x10/io/FileWriter__FileOutputStream.h trunk/x10.runtime/src-cpp/x10/io/File__NativeFile.cc trunk/x10.runtime/src-cpp/x10/io/File__NativeFile.h trunk/x10.runtime/src-cpp/x10/io/InputStreamReader__InputStream.cc trunk/x10.runtime/src-cpp/x10/io/InputStreamReader__InputStream.h trunk/x10.runtime/src-cpp/x10/io/OutputStreamWriter__OutputStream.cc trunk/x10.runtime/src-cpp/x10/io/OutputStreamWriter__OutputStream.h trunk/x10.runtime/src-cpp/x10/lang/Any.cc trunk/x10.runtime/src-cpp/x10/lang/Any.h trunk/x10.runtime/src-cpp/x10/lang/Boolean.cc trunk/x10.runtime/src-cpp/x10/lang/Boolean.h trunk/x10.runtime/src-cpp/x10/lang/Byte.cc trunk/x10.runtime/src-cpp/x10/lang/Byte.h trunk/x10.runtime/src-cpp/x10/lang/Char.cc trunk/x10.runtime/src-cpp/x10/lang/Char.h trunk/x10.runtime/src-cpp/x10/lang/CheckedThrowable.cc trunk/x10.runtime/src-cpp/x10/lang/CheckedThrowable.h trunk/x10.runtime/src-cpp/x10/lang/Closure.cc trunk/x10.runtime/src-cpp/x10/lang/Closure.h trunk/x10.runtime/src-cpp/x10/lang/Complex.cc trunk/x10.runtime/src-cpp/x10/lang/Complex.h trunk/x10.runtime/src-cpp/x10/lang/Condition.cc trunk/x10.runtime/src-cpp/x10/lang/Condition.h trunk/x10.runtime/src-cpp/x10/lang/Debug.h trunk/x10.runtime/src-cpp/x10/lang/Double.cc trunk/x10.runtime/src-cpp/x10/lang/Double.h trunk/x10.runtime/src-cpp/x10/lang/Float.cc trunk/x10.runtime/src-cpp/x10/lang/Float.h trunk/x10.runtime/src-cpp/x10/lang/Fun.cc trunk/x10.runtime/src-cpp/x10/lang/Fun_0_0.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_1.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_2.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_3.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_4.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_5.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_6.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_7.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_8.h trunk/x10.runtime/src-cpp/x10/lang/Fun_0_9.h trunk/x10.runtime/src-cpp/x10/lang/GlobalRef.cc trunk/x10.runtime/src-cpp/x10/lang/GlobalRef.h trunk/x10.runtime/src-cpp/x10/lang/IBox.cc trunk/x10.runtime/src-cpp/x10/lang/IBox.h trunk/x10.runtime/src-cpp/x10/lang/Int.cc trunk/x10.runtime/src-cpp/x10/lang/Int.h trunk/x10.runtime/src-cpp/x10/lang/Lock__ReentrantLock.cc trunk/x10.runtime/src-cpp/x10/lang/Lock__ReentrantLock.h trunk/x10.runtime/src-cpp/x10/lang/Long.cc trunk/x10.runtime/src-cpp/x10/lang/Long.h trunk/x10.runtime/src-cpp/x10/lang/MathNatives.h trunk/x10.runtime/src-cpp/x10/lang/PlaceLocalHandle_Impl.cc trunk/x10.runtime/src-cpp/x10/lang/PlaceLocalHandle_Impl.h trunk/x10.runtime/src-cpp/x10/lang/Rail.cc trunk/x10.runtime/src-cpp/x10/lang/Rail.h trunk/x10.runtime/src-cpp/x10/lang/Reference.cc trunk/x10.runtime/src-cpp/x10/lang/Reference.h trunk/x10.runtime/src-cpp/x10/lang/RemoteOps.h trunk/x10.runtime/src-cpp/x10/lang/Short.cc trunk/x10.runtime/src-cpp/x10/lang/Short.h trunk/x10.runtime/src-cpp/x10/lang/String.cc trunk/x10.runtime/src-cpp/x10/lang/String.h trunk/x10.runtime/src-cpp/x10/lang/UByte.cc trunk/x10.runtime/src-cpp/x10/lang/UByte.h trunk/x10.runtime/src-cpp/x10/lang/UInt.cc trunk/x10.runtime/src-cpp/x10/lang/UInt.h trunk/x10.runtime/src-cpp/x10/lang/ULong.cc trunk/x10.runtime/src-cpp/x10/lang/ULong.h trunk/x10.runtime/src-cpp/x10/lang/UShort.cc trunk/x10.runtime/src-cpp/x10/lang/UShort.h trunk/x10.runtime/src-cpp/x10/lang/UnsafeNatives.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_0.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_1.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_2.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_3.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_4.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_5.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_6.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_7.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_8.h trunk/x10.runtime/src-cpp/x10/lang/VoidFun_0_9.h trunk/x10.runtime/src-cpp/x10/lang/X10Class.cc trunk/x10.runtime/src-cpp/x10/lang/X10Class.h trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicBooleanNatives.cc trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicBooleanNatives.h trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicIntegerNatives.cc trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicIntegerNatives.h trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicLongNatives.cc trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicLongNatives.h trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicReference.cc trunk/x10.runtime/src-cpp/x10/util/concurrent/AtomicReference.h trunk/x10.runtime/src-cpp/x10/xrx/Deque.cc trunk/x10.runtime/src-cpp/x10/xrx/Deque.h trunk/x10.runtime/src-cpp/x10/xrx/Thread.cc trunk/x10.runtime/src-cpp/x10/xrx/Thread.h trunk/x10.runtime/src-cpp/x10aux/RTT.cc trunk/x10.runtime/src-cpp/x10aux/RTT.h trunk/x10.runtime/src-cpp/x10aux/alloc.cc trunk/x10.runtime/src-cpp/x10aux/alloc.h trunk/x10.runtime/src-cpp/x10aux/array_utils.h trunk/x10.runtime/src-cpp/x10aux/assert.cc trunk/x10.runtime/src-cpp/x10aux/assert.h trunk/x10.runtime/src-cpp/x10aux/atomic_ops.cc trunk/x10.runtime/src-cpp/x10aux/atomic_ops.h trunk/x10.runtime/src-cpp/x10aux/basic_functions.cc trunk/x10.runtime/src-cpp/x10aux/basic_functions.h trunk/x10.runtime/src-cpp/x10aux/bootstrap.cc trunk/x10.runtime/src-cpp/x10aux/bootstrap.h trunk/x10.runtime/src-cpp/x10aux/captured_lval.h trunk/x10.runtime/src-cpp/x10aux/chunked_array.h trunk/x10.runtime/src-cpp/x10aux/class_cast.cc trunk/x10.runtime/src-cpp/x10aux/class_cast.h trunk/x10.runtime/src-cpp/x10aux/config.cc trunk/x10.runtime/src-cpp/x10aux/config.h trunk/x10.runtime/src-cpp/x10aux/cuda_kernel.h trunk/x10.runtime/src-cpp/x10aux/debug.cc trunk/x10.runtime/src-cpp/x10aux/debug.h trunk/x10.runtime/src-cpp/x10aux/deserialization_buffer.h trunk/x10.runtime/src-cpp/x10aux/deserialization_dispatcher.cc trunk/x10.runtime/src-cpp/x10aux/deserialization_dispatcher.h trunk/x10.runtime/src-cpp/x10aux/itables.cc trunk/x10.runtime/src-cpp/x10aux/itables.h trunk/x10.runtime/src-cpp/x10aux/lock.cc trunk/x10.runtime/src-cpp/x10aux/lock.h trunk/x10.runtime/src-cpp/x10aux/network.cc trunk/x10.runtime/src-cpp/x10aux/network.h trunk/x10.runtime/src-cpp/x10aux/network_dispatcher.cc trunk/x10.runtime/src-cpp/x10aux/network_dispatcher.h trunk/x10.runtime/src-cpp/x10aux/pcond.cc trunk/x10.runtime/src-cpp/x10aux/pcond.h trunk/x10.runtime/src-cpp/x10aux/place_local.cc trunk/x10.runtime/src-cpp/x10aux/place_local.h trunk/x10.runtime/src-cpp/x10aux/pragmas.h trunk/x10.runtime/src-cpp/x10aux/reference_logger.cc trunk/x10.runtime/src-cpp/x10aux/reference_logger.h trunk/x10.runtime/src-cpp/x10aux/serialization.cc trunk/x10.runtime/src-cpp/x10aux/serialization.h trunk/x10.runtime/src-cpp/x10aux/serialization_buffer.h trunk/x10.runtime/src-cpp/x10aux/simple_hashmap.h trunk/x10.runtime/src-cpp/x10aux/static_init.cc trunk/x10.runtime/src-cpp/x10aux/static_init.h trunk/x10.runtime/src-cpp/x10aux/throw.cc trunk/x10.runtime/src-cpp/x10aux/throw.h trunk/x10.runtime/src-java/x10/core/Any.java trunk/x10.runtime/src-java/x10/core/Arithmetic.java trunk/x10.runtime/src-java/x10/core/Bitwise.java trunk/x10.runtime/src-java/x10/core/Boolean.java trunk/x10.runtime/src-java/x10/core/Byte.java trunk/x10.runtime/src-java/x10/core/Char.java trunk/x10.runtime/src-java/x10/core/Deque.java trunk/x10.runtime/src-java/x10/core/Double.java trunk/x10.runtime/src-java/x10/core/Float.java trunk/x10.runtime/src-java/x10/core/GlobalRef.java trunk/x10.runtime/src-java/x10/core/Int.java trunk/x10.runtime/src-java/x10/core/Iterator.java trunk/x10.runtime/src-java/x10/core/LocalVar.java trunk/x10.runtime/src-java/x10/core/Long.java trunk/x10.runtime/src-java/x10/core/PlaceLocalHandle.java trunk/x10.runtime/src-java/x10/core/Rail.java trunk/x10.runtime/src-java/x10/core/Reducible.java trunk/x10.runtime/src-java/x10/core/Ref.java trunk/x10.runtime/src-java/x10/core/Short.java trunk/x10.runtime/src-java/x10/core/Struct.java trunk/x10.runtime/src-java/x10/core/StructI.java trunk/x10.runtime/src-java/x10/core/Thread.java trunk/x10.runtime/src-java/x10/core/UByte.java trunk/x10.runtime/src-java/x10/core/UInt.java trunk/x10.runtime/src-java/x10/core/ULong.java trunk/x10.runtime/src-java/x10/core/UShort.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicBoolean.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicInteger.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicLong.java trunk/x10.runtime/src-java/x10/core/concurrent/AtomicReference.java trunk/x10.runtime/src-java/x10/core/fun/Fun.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_0.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_1.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_2.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_3.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_4.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_5.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_6.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_7.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_8.java trunk/x10.runtime/src-java/x10/core/fun/Fun_0_9.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_0.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_1.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_2.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_3.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_4.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_5.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_6.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_7.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_8.java trunk/x10.runtime/src-java/x10/core/fun/VoidFun_0_9.java trunk/x10.runtime/src-java/x10/core/io/FileInputStream.java trunk/x10.runtime/src-java/x10/core/io/FileOutputStream.java trunk/x10.runtime/src-java/x10/core/io/InputStream.java trunk/x10.runtime/src-java/x10/core/io/NativeFile.java trunk/x10.runtime/src-java/x10/core/io/OutputStream.java trunk/x10.runtime/src-java/x10/core/util/ResourceBundle.java trunk/x10.runtime/src-java/x10/rtt/AnyType.java trunk/x10.runtime/src-java/x10/rtt/BooleanType.java trunk/x10.runtime/src-java/x10/rtt/ByteType.java trunk/x10.runtime/src-java/x10/rtt/CharType.java trunk/x10.runtime/src-java/x10/rtt/DoubleType.java trunk/x10.runtime/src-java/x10/rtt/Equality.java trunk/x10.runtime/src-java/x10/rtt/FloatType.java trunk/x10.runtime/src-java/x10/rtt/FunType.java trunk/x10.runtime/src-java/x10/rtt/IntType.java trunk/x10.runtime/src-java/x10/rtt/LongType.java trunk/x10.runtime/src-java/x10/rtt/NamedStructType.java trunk/x10.runtime/src-java/x10/rtt/NamedType.java trunk/x10.runtime/src-java/x10/rtt/ParameterizedType.java trunk/x10.runtime/src-java/x10/rtt/RuntimeType.java trunk/x10.runtime/src-java/x10/rtt/ShortType.java trunk/x10.runtime/src-java/x10/rtt/StaticFunType.java trunk/x10.runtime/src-java/x10/rtt/StaticVoidFunType.java trunk/x10.runtime/src-java/x10/rtt/StringType.java trunk/x10.runtime/src-java/x10/rtt/StructType.java trunk/x10.runtime/src-java/x10/rtt/Type.java trunk/x10.runtime/src-java/x10/rtt/Types.java trunk/x10.runtime/src-java/x10/rtt/UByteType.java trunk/x10.runtime/src-java/x10/rtt/UIntType.java trunk/x10.runtime/src-java/x10/rtt/ULongType.java trunk/x10.runtime/src-java/x10/rtt/UShortType.java trunk/x10.runtime/src-java/x10/rtt/UnresolvedType.java trunk/x10.runtime/src-java/x10/rtt/VoidFunType.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ArrayUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ByteUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/DoubleUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/EvalUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/FencesUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/FloatUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/InitDispatcher.java trunk/x10.runtime/src-java/x10/runtime/impl/java/Runtime.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ShortUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/StringUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/TestClassLoading.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ThrowableUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/UIntUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/ULongUtils.java trunk/x10.runtime/src-java/x10/runtime/impl/java/X10Generated.java trunk/x10.runtime/src-java/x10/runtime/impl/java/X10SimpleFormatter.java trunk/x10.runtime/src-java/x10/serialization/DeserializationDictionary.java trunk/x10.runtime/src-java/x10/serialization/DeserializerThunk.java trunk/x10.runtime/src-java/x10/serialization/FieldComparator.java trunk/x10.runtime/src-java/x10/serialization/SerializationConstants.java trunk/x10.runtime/src-java/x10/serialization/SerializationDictionary.java trunk/x10.runtime/src-java/x10/serialization/SerializationProxy.java trunk/x10.runtime/src-java/x10/serialization/SerializationUtils.java trunk/x10.runtime/src-java/x10/serialization/SerializerThunk.java trunk/x10.runtime/src-java/x10/serialization/SharedDictionaries.java trunk/x10.runtime/src-java/x10/serialization/X10JavaDeserializer.java trunk/x10.runtime/src-java/x10/serialization/X10JavaSerializable.java trunk/x10.runtime/src-java/x10/serialization/X10JavaSerializer.java trunk/x10.runtime/src-java/x10/x10rt/ActivityManagement.java trunk/x10.runtime/src-java/x10/x10rt/MessageHandlers.java trunk/x10.runtime/src-java/x10/x10rt/SocketTransport.java trunk/x10.runtime/src-java/x10/x10rt/TeamSupport.java trunk/x10.runtime/src-java/x10/x10rt/X10RT.java trunk/x10.runtime/src-x10/x10/array/Array.x10 trunk/x10.runtime/src-x10/x10/array/Array_1.x10 trunk/x10.runtime/src-x10/x10/array/Array_2.x10 trunk/x10.runtime/src-x10/x10/array/Array_3.x10 trunk/x10.runtime/src-x10/x10/array/Array_4.x10 trunk/x10.runtime/src-x10/x10/array/BlockingUtils.x10 trunk/x10.runtime/src-x10/x10/array/DenseIterationSpace_1.x10 trunk/x10.runtime/src-x10/x10/array/DenseIterationSpace_2.x10 trunk/x10.runtime/src-x10/x10/array/DenseIterationSpace_3.x10 trunk/x10.runtime/src-x10/x10/array/DenseIterationSpace_4.x10 trunk/x10.runtime/src-x10/x10/array/Dist.x10 trunk/x10.runtime/src-x10/x10/array/DistArray.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_BlockBlock_2.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_BlockBlock_3.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_Block_1.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_Block_2.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_Block_3.x10 trunk/x10.runtime/src-x10/x10/array/DistArray_Unique.x10 trunk/x10.runtime/src-x10/x10/array/Dist_BlockBlock_2.x10 trunk/x10.runtime/src-x10/x10/array/Dist_BlockBlock_3.x10 trunk/x10.runtime/src-x10/x10/array/Dist_Block_1.x10 trunk/x10.runtime/src-x10/x10/array/Dist_Block_2.x10 trunk/x10.runtime/src-x10/x10/array/Dist_Block_3.x10 trunk/x10.runtime/src-x10/x10/array/IterationSpace.x10 trunk/x10.runtime/src-x10/x10/array/package.html trunk/x10.runtime/src-x10/x10/compiler/Abort.x10 trunk/x10.runtime/src-x10/x10/compiler/AsyncClosure.x10 trunk/x10.runtime/src-x10/x10/compiler/ByRef.x10 trunk/x10.runtime/src-x10/x10/compiler/CUDA.x10 trunk/x10.runtime/src-x10/x10/compiler/CUDADirectParams.x10 trunk/x10.runtime/src-x10/x10/compiler/CompileTimeConstant.x10 trunk/x10.runtime/src-x10/x10/compiler/CompilerFlags.x10 trunk/x10.runtime/src-x10/x10/compiler/Det.x10 trunk/x10.runtime/src-x10/x10/compiler/Embed.x10 trunk/x10.runtime/src-x10/x10/compiler/Endpoint.x10 trunk/x10.runtime/src-x10/x10/compiler/Ephemeral.x10 trunk/x10.runtime/src-x10/x10/compiler/Finalization.x10 trunk/x10.runtime/src-x10/x10/compiler/FinishAsync.x10 trunk/x10.runtime/src-x10/x10/compiler/Global.x10 trunk/x10.runtime/src-x10/x10/compiler/Header.x10 trunk/x10.runtime/src-x10/x10/compiler/Ifdef.x10 trunk/x10.runtime/src-x10/x10/compiler/Ifndef.x10 trunk/x10.runtime/src-x10/x10/compiler/Immediate.x10 trunk/x10.runtime/src-x10/x10/compiler/Impure.x10 trunk/x10.runtime/src-x10/x10/compiler/Incomplete.x10 trunk/x10.runtime/src-x10/x10/compiler/InferGuard.x10 trunk/x10.runtime/src-x10/x10/compiler/InitDispatcher.x10 trunk/x10.runtime/src-x10/x10/compiler/Inline.x10 trunk/x10.runtime/src-x10/x10/compiler/InlineOnly.x10 trunk/x10.runtime/src-x10/x10/compiler/LocalVar.x10 trunk/x10.runtime/src-x10/x10/compiler/Mutable.x10 trunk/x10.runtime/src-x10/x10/compiler/NamedMessage.x10 trunk/x10.runtime/src-x10/x10/compiler/Native.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeCPPCompilationUnit.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeCPPExtern.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeCPPInclude.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeCPPOutputFile.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeClass.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeDef.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeRep.x10 trunk/x10.runtime/src-x10/x10/compiler/NativeString.x10 trunk/x10.runtime/src-x10/x10/compiler/NoInferType.x10 trunk/x10.runtime/src-x10/x10/compiler/NoInline.x10 trunk/x10.runtime/src-x10/x10/compiler/NoReturn.x10 trunk/x10.runtime/src-x10/x10/compiler/NoSuperCall.x10 trunk/x10.runtime/src-x10/x10/compiler/NoThisAccess.x10 trunk/x10.runtime/src-x10/x10/compiler/NonEscaping.x10 trunk/x10.runtime/src-x10/x10/compiler/Opaque.x10 trunk/x10.runtime/src-x10/x10/compiler/Pinned.x10 trunk/x10.runtime/src-x10/x10/compiler/Pragma.x10 trunk/x10.runtime/src-x10/x10/compiler/Profile.x10 trunk/x10.runtime/src-x10/x10/compiler/Pure.x10 trunk/x10.runtime/src-x10/x10/compiler/Ref.x10 trunk/x10.runtime/src-x10/x10/compiler/RemoteInvocation.x10 trunk/x10.runtime/src-x10/x10/compiler/SetOps.x10 trunk/x10.runtime/src-x10/x10/compiler/StackAllocate.x10 trunk/x10.runtime/src-x10/x10/compiler/StackAllocateUninitialized.x10 trunk/x10.runtime/src-x10/x10/compiler/SuppressTransientError.x10 trunk/x10.runtime/src-x10/x10/compiler/Synthetic.x10 trunk/x10.runtime/src-x10/x10/compiler/TransientInitExpr.x10 trunk/x10.runtime/src-x10/x10/compiler/Uncounted.x10 trunk/x10.runtime/src-x10/x10/compiler/Uninitialized.x10 trunk/x10.runtime/src-x10/x10/compiler/Unroll.x10 trunk/x10.runtime/src-x10/x10/compiler/Volatile.x10 trunk/x10.runtime/src-x10/x10/compiler/WS.x10 trunk/x10.runtime/src-x10/x10/compiler/X10JavaDeserializer.x10 trunk/x10.runtime/src-x10/x10/compiler/X10JavaSerializable.x10 trunk/x10.runtime/src-x10/x10/compiler/tests/ERR.x10 trunk/x10.runtime/src-x10/x10/compiler/tests/ShouldBeErr.x10 trunk/x10.runtime/src-x10/x10/compiler/tests/ShouldNotBeERR.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/AsyncFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/AtFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/CollectingFinish.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/FinishFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/Frame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/MainFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/RegularFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/RemoteFinish.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/RootFinish.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/ThrowFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/TryFrame.x10 trunk/x10.runtime/src-x10/x10/compiler/ws/Worker.x10 trunk/x10.runtime/src-x10/x10/glb/ArrayListTaskBag.x10 trunk/x10.runtime/src-x10/x10/glb/Context.x10 trunk/x10.runtime/src-x10/x10/glb/ContextI.x10 trunk/x10.runtime/src-x10/x10/glb/FixedSizeStack.x10 trunk/x10.runtime/src-x10/x10/glb/GLB.x10 trunk/x10.runtime/src-x10/x10/glb/GLBParameters.x10 trunk/x10.runtime/src-x10/x10/glb/GLBResult.x10 trunk/x10.runtime/src-x10/x10/glb/Logger.x10 trunk/x10.runtime/src-x10/x10/glb/TaskBag.x10 trunk/x10.runtime/src-x10/x10/glb/TaskQueue.x10 trunk/x10.runtime/src-x10/x10/glb/Worker.x10 trunk/x10.runtime/src-x10/x10/interop/Java.x10 trunk/x10.runtime/src-x10/x10/io/Console.x10 trunk/x10.runtime/src-x10/x10/io/CustomSerialization.x10 trunk/x10.runtime/src-x10/x10/io/Deserializer.x10 trunk/x10.runtime/src-x10/x10/io/EOFException.x10 trunk/x10.runtime/src-x10/x10/io/File.x10 trunk/x10.runtime/src-x10/x10/io/FileNotFoundException.x10 trunk/x10.runtime/src-x10/x10/io/FileReader.x10 trunk/x10.runtime/src-x10/x10/io/FileSystem.x10 trunk/x10.runtime/src-x10/x10/io/FileWriter.x10 trunk/x10.runtime/src-x10/x10/io/FilterReader.x10 trunk/x10.runtime/src-x10/x10/io/FilterWriter.x10 trunk/x10.runtime/src-x10/x10/io/IOException.x10 trunk/x10.runtime/src-x10/x10/io/InputStreamReader.x10 trunk/x10.runtime/src-x10/x10/io/Marshal.x10 trunk/x10.runtime/src-x10/x10/io/NotSerializableException.x10 trunk/x10.runtime/src-x10/x10/io/OutputStreamWriter.x10 trunk/x10.runtime/src-x10/x10/io/Printer.x10 trunk/x10.runtime/src-x10/x10/io/PutbackReader.x10 trunk/x10.runtime/src-x10/x10/io/Reader.x10 trunk/x10.runtime/src-x10/x10/io/ReaderIterator.x10 trunk/x10.runtime/src-x10/x10/io/SerializationException.x10 trunk/x10.runtime/src-x10/x10/io/Serializer.x10 trunk/x10.runtime/src-x10/x10/io/StringWriter.x10 trunk/x10.runtime/src-x10/x10/io/Unserializable.x10 trunk/x10.runtime/src-x10/x10/io/Writer.x10 trunk/x10.runtime/src-x10/x10/lang/Acc.x10 trunk/x10.runtime/src-x10/x10/lang/Accumulator.x10 trunk/x10.runtime/src-x10/x10/lang/Any.x10 trunk/x10.runtime/src-x10/x10/lang/Arithmetic.x10 trunk/x10.runtime/src-x10/x10/lang/ArithmeticException.x10 trunk/x10.runtime/src-x10/x10/lang/ArrayIndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/AssertionError.x10 trunk/x10.runtime/src-x10/x10/lang/BadPlaceException.x10 trunk/x10.runtime/src-x10/x10/lang/Bitwise.x10 trunk/x10.runtime/src-x10/x10/lang/Boolean.x10 trunk/x10.runtime/src-x10/x10/lang/Byte.x10 trunk/x10.runtime/src-x10/x10/lang/CUDAConstantRail.x10 trunk/x10.runtime/src-x10/x10/lang/Cell.x10 trunk/x10.runtime/src-x10/x10/lang/Char.x10 trunk/x10.runtime/src-x10/x10/lang/CharSequence.x10 trunk/x10.runtime/src-x10/x10/lang/CheckedException.x10 trunk/x10.runtime/src-x10/x10/lang/CheckedThrowable.x10 trunk/x10.runtime/src-x10/x10/lang/ClassCastException.x10 trunk/x10.runtime/src-x10/x10/lang/Clock.x10 trunk/x10.runtime/src-x10/x10/lang/ClockUseException.x10 trunk/x10.runtime/src-x10/x10/lang/Comparable.x10 trunk/x10.runtime/src-x10/x10/lang/Complex.x10 trunk/x10.runtime/src-x10/x10/lang/DeadPlaceException.x10 trunk/x10.runtime/src-x10/x10/lang/Double.x10 trunk/x10.runtime/src-x10/x10/lang/Empty.x10 trunk/x10.runtime/src-x10/x10/lang/Error.x10 trunk/x10.runtime/src-x10/x10/lang/Exception.x10 trunk/x10.runtime/src-x10/x10/lang/ExceptionInInitializer.x10 trunk/x10.runtime/src-x10/x10/lang/FailedDynamicCheckException.x10 trunk/x10.runtime/src-x10/x10/lang/FinishAccumulator.x10 trunk/x10.runtime/src-x10/x10/lang/Float.x10 trunk/x10.runtime/src-x10/x10/lang/GlobalCell.x10 trunk/x10.runtime/src-x10/x10/lang/GlobalRail.x10 trunk/x10.runtime/src-x10/x10/lang/GlobalRef.x10 trunk/x10.runtime/src-x10/x10/lang/IllegalAccAccess.x10 trunk/x10.runtime/src-x10/x10/lang/IllegalArgumentException.x10 trunk/x10.runtime/src-x10/x10/lang/IllegalOperationException.x10 trunk/x10.runtime/src-x10/x10/lang/IllegalStateException.x10 trunk/x10.runtime/src-x10/x10/lang/IndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/Indexable.x10 trunk/x10.runtime/src-x10/x10/lang/Int.x10 trunk/x10.runtime/src-x10/x10/lang/IntRange.x10 trunk/x10.runtime/src-x10/x10/lang/InternalError.x10 trunk/x10.runtime/src-x10/x10/lang/Iterable.x10 trunk/x10.runtime/src-x10/x10/lang/Iterator.x10 trunk/x10.runtime/src-x10/x10/lang/Long.x10 trunk/x10.runtime/src-x10/x10/lang/LongRange.x10 trunk/x10.runtime/src-x10/x10/lang/Math.x10 trunk/x10.runtime/src-x10/x10/lang/MultipleExceptions.x10 trunk/x10.runtime/src-x10/x10/lang/NegativeArraySizeException.x10 trunk/x10.runtime/src-x10/x10/lang/NullPointerException.x10 trunk/x10.runtime/src-x10/x10/lang/NumberFormatException.x10 trunk/x10.runtime/src-x10/x10/lang/OutOfMemoryError.x10 trunk/x10.runtime/src-x10/x10/lang/Place.x10 trunk/x10.runtime/src-x10/x10/lang/PlaceGroup.x10 trunk/x10.runtime/src-x10/x10/lang/PlaceLocalHandle.x10 trunk/x10.runtime/src-x10/x10/lang/PlaceTopology.x10 trunk/x10.runtime/src-x10/x10/lang/Point.x10 trunk/x10.runtime/src-x10/x10/lang/Rail.x10 trunk/x10.runtime/src-x10/x10/lang/RailIterator.x10 trunk/x10.runtime/src-x10/x10/lang/Reducible.x10 trunk/x10.runtime/src-x10/x10/lang/Settable.x10 trunk/x10.runtime/src-x10/x10/lang/Short.x10 trunk/x10.runtime/src-x10/x10/lang/SparsePlaceGroup.x10 trunk/x10.runtime/src-x10/x10/lang/StackOverflowError.x10 trunk/x10.runtime/src-x10/x10/lang/String.x10 trunk/x10.runtime/src-x10/x10/lang/StringIndexOutOfBoundsException.x10 trunk/x10.runtime/src-x10/x10/lang/System.x10 trunk/x10.runtime/src-x10/x10/lang/UByte.x10 trunk/x10.runtime/src-x10/x10/lang/UInt.x10 trunk/x10.runtime/src-x10/x10/lang/ULong.x10 trunk/x10.runtime/src-x10/x10/lang/UShort.x10 trunk/x10.runtime/src-x10/x10/lang/Unsafe.x10 trunk/x10.runtime/src-x10/x10/lang/UnsupportedOperationException.x10 trunk/x10.runtime/src-x10/x10/lang/WrappedThrowable.x10 trunk/x10.runtime/src-x10/x10/lang/Zero.x10 trunk/x10.runtime/src-x10/x10/lang/_.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/Annotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/ClassAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/ExpressionAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/FieldAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/ImportAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/MethodAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/PackageAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/StatementAnnotation.x10 trunk/x10.runtime/src-x10/x10/lang/annotations/TypeAnnotation.x10 trunk/x10.runtime/src-x10/x10/regionarray/Array.x10 trunk/x10.runtime/src-x10/x10/regionarray/BlockBlockDist.x10 trunk/x10.runtime/src-x10/x10/regionarray/BlockDist.x10 trunk/x10.runtime/src-x10/x10/regionarray/ConstantDist.x10 trunk/x10.runtime/src-x10/x10/regionarray/Dist.x10 trunk/x10.runtime/src-x10/x10/regionarray/DistArray.x10 trunk/x10.runtime/src-x10/x10/regionarray/EmptyRegion.x10 trunk/x10.runtime/src-x10/x10/regionarray/FullRegion.x10 trunk/x10.runtime/src-x10/x10/regionarray/Mat.x10 trunk/x10.runtime/src-x10/x10/regionarray/MatBuilder.x10 trunk/x10.runtime/src-x10/x10/regionarray/PolyMat.x10 trunk/x10.runtime/src-x10/x10/regionarray/PolyMatBuilder.x10 trunk/x10.runtime/src-x10/x10/regionarray/PolyRegion.x10 trunk/x10.runtime/src-x10/x10/regionarray/PolyRow.x10 trunk/x10.runtime/src-x10/x10/regionarray/PolyScanner.x10 trunk/x10.runtime/src-x10/x10/regionarray/Range.x10 trunk/x10.runtime/src-x10/x10/regionarray/RectRegion.x10 trunk/x10.runtime/src-x10/x10/regionarray/RectRegion1D.x10 trunk/x10.runtime/src-x10/x10/regionarray/Region.x10 trunk/x10.runtime/src-x10/x10/regionarray/RemoteArray.x10 trunk/x10.runtime/src-x10/x10/regionarray/Row.x10 trunk/x10.runtime/src-x10/x10/regionarray/UnboundedRegionException.x10 trunk/x10.runtime/src-x10/x10/regionarray/UniqueDist.x10 trunk/x10.runtime/src-x10/x10/regionarray/ValRow.x10 trunk/x10.runtime/src-x10/x10/regionarray/VarMat.x10 trunk/x10.runtime/src-x10/x10/regionarray/VarRow.x10 trunk/x10.runtime/src-x10/x10/regionarray/WrappedDistPlaceRestricted.x10 trunk/x10.runtime/src-x10/x10/regionarray/WrappedDistRegionRestricted.x10 trunk/x10.runtime/src-x10/x10/regionarray/package.html trunk/x10.runtime/src-x10/x10/util/AbstractCollection.x10 trunk/x10.runtime/src-x10/x10/util/AbstractContainer.x10 trunk/x10.runtime/src-x10/x10/util/ArrayList.x10 trunk/x10.runtime/src-x10/x10/util/Box.x10 trunk/x10.runtime/src-x10/x10/util/Builder.x10 trunk/x10.runtime/src-x10/x10/util/CUDAUtilities.x10 trunk/x10.runtime/src-x10/x10/util/Collection.x10 trunk/x10.runtime/src-x10/x10/util/CollectionIterator.x10 trunk/x10.runtime/src-x10/x10/util/Container.x10 trunk/x10.runtime/src-x10/x10/util/Date.x10 trunk/x10.runtime/src-x10/x10/util/GrowableRail.x10 trunk/x10.runtime/src-x10/x10/util/HashMap.x10 trunk/x10.runtime/src-x10/x10/util/HashSet.x10 trunk/x10.runtime/src-x10/x10/util/Indexed.x10 trunk/x10.runtime/src-x10/x10/util/List.x10 trunk/x10.runtime/src-x10/x10/util/ListIterator.x10 trunk/x10.runtime/src-x10/x10/util/Map.x10 trunk/x10.runtime/src-x10/x10/util/MapIterator.x10 trunk/x10.runtime/src-x10/x10/util/MapSet.x10 trunk/x10.runtime/src-x10/x10/util/MissingResourceException.x10 trunk/x10.runtime/src-x10/x10/util/NoSuchElementException.x10 trunk/x10.runtime/src-x10/x10/util/Option.x10 trunk/x10.runtime/src-x10/x10/util/OptionsParser.x10 trunk/x10.runtime/src-x10/x10/util/Ordered.x10 trunk/x10.runtime/src-x10/x10/util/Pair.x10 trunk/x10.runtime/src-x10/x10/util/RailBuilder.x10 trunk/x10.runtime/src-x10/x10/util/RailUtils.x10 trunk/x10.runtime/src-x10/x10/util/Random.x10 trunk/x10.runtime/src-x10/x10/util/ResourceBundle.x10 trunk/x10.runtime/src-x10/x10/util/Set.x10 trunk/x10.runtime/src-x10/x10/util/Stack.x10 trunk/x10.runtime/src-x10/x10/util/StringBuilder.x10 trunk/x10.runtime/src-x10/x10/util/StringUtil.x10 trunk/x10.runtime/src-x10/x10/util/Team.x10 trunk/x10.runtime/src-x10/x10/util/TeamReductionHelper.x10 trunk/x10.runtime/src-x10/x10/util/Timer.x10 trunk/x10.runtime/src-x10/x10/util/Triple.x10 trunk/x10.runtime/src-x10/x10/util/WorkerLocalHandle.x10 trunk/x10.runtime/src-x10/x10/util/WorkerLocalStorage.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicBoolean.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicDouble.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicFloat.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicInteger.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicLong.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/AtomicReference.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Fences.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Future.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/IntLatch.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Latch.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Lock.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/Monitor.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/SPMDBarrier.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/SimpleIntLatch.x10 trunk/x10.runtime/src-x10/x10/util/concurrent/SimpleLatch.x10 trunk/x10.runtime/src-x10/x10/util/logging/ConsoleLogFactory.x10 trunk/x10.runtime/src-x10/x10/util/logging/ConsoleLogger.x10 trunk/x10.runtime/src-x10/x10/util/logging/Log.x10 trunk/x10.runtime/src-x10/x10/util/logging/LogFactory.x10 trunk/x10.runtime/src-x10/x10/util/logging/package.html trunk/x10.runtime/src-x10/x10/util/resilient/ResilientMap.x10 trunk/x10.runtime/src-x10/x10/util/resilient/managed/HazelcastMap.x10 trunk/x10.runtime/src-x10/x10/xrx/Activity.x10 trunk/x10.runtime/src-x10/x10/xrx/Configuration.x10 trunk/x10.runtime/src-x10/x10/xrx/Deque.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishResilient.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishResilientBridge.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishResilientPlace0.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishResilientPlace0opt.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishResilientSample.x10 trunk/x10.runtime/src-x10/x10/xrx/FinishState.x10 trunk/x10.runtime/src-x10/x10/xrx/InterruptedException.x10 trunk/x10.runtime/src-x10/x10/xrx/Pool.x10 trunk/x10.runtime/src-x10/x10/xrx/ResilientStore.x10 trunk/x10.runtime/src-x10/x10/xrx/ResilientStoreHC.x10 trunk/x10.runtime/src-x10/x10/xrx/ResilientStorePlace0.x10 trunk/x10.runtime/src-x10/x10/xrx/Runtime.x10 trunk/x10.runtime/src-x10/x10/xrx/Thread.x10 trunk/x10.runtime/src-x10/x10/xrx/Worker.x10 trunk/x10.runtime/src-x10/x10/xrx/Workers.x10 trunk/x10.runtime/src-x10/x10/xrx/managed/FinishResilientHC.x10 trunk/x10.runtime/x10rt/Makefile trunk/x10.runtime/x10rt/common/x10rt_cuda.cc trunk/x10.runtime/x10rt/common/x10rt_emu.cc trunk/x10.runtime/x10rt/common/x10rt_emu_coll.cc trunk/x10.runtime/x10rt/common/x10rt_front.cc trunk/x10.runtime/x10rt/common/x10rt_internal.h trunk/x10.runtime/x10rt/common/x10rt_logical.cc trunk/x10.runtime/x10rt/include/x10rt_cpp.h trunk/x10.runtime/x10rt/include/x10rt_cuda.h trunk/x10.runtime/x10rt/include/x10rt_front.h trunk/x10.runtime/x10rt/include/x10rt_jni_helpers.h trunk/x10.runtime/x10rt/include/x10rt_logical.h trunk/x10.runtime/x10rt/include/x10rt_net.h trunk/x10.runtime/x10rt/include/x10rt_ser.h trunk/x10.runtime/x10rt/include/x10rt_types.h trunk/x10.runtime/x10rt/jni/jni_helpers.cc trunk/x10.runtime/x10rt/jni/jni_message.cc trunk/x10.runtime/x10rt/jni/jni_team.cc trunk/x10.runtime/x10rt/jni/jni_x10rt.cc trunk/x10.runtime/x10rt/mpi/Java.cc trunk/x10.runtime/x10rt/mpi/x10rt_mpi.cc trunk/x10.runtime/x10rt/pami/x10rt_pami.cc trunk/x10.runtime/x10rt/sockets/Launcher.cc trunk/x10.runtime/x10rt/sockets/Launcher.h trunk/x10.runtime/x10rt/sockets/Launcher_Init.cc trunk/x10.runtime/x10rt/sockets/TCP.h trunk/x10.runtime/x10rt/sockets/main.cc trunk/x10.runtime/x10rt/sockets/tcp.cc trunk/x10.runtime/x10rt/sockets/x10rt_sockets.cc trunk/x10.runtime/x10rt/standalone/x10rt_standalone.cc trunk/x10.runtime/x10rt/test/x10rt_coll.cc trunk/x10.runtime/x10rt/test/x10rt_resilient_monte_pi.cc trunk/x10.wala/src/x10/wala/translator/X10WSCallGraphAnalyzer.java Modified: trunk/apgas.cpp/src/apgas/RemoteTask.h =================================================================== --- trunk/apgas.cpp/src/apgas/RemoteTask.h 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp/src/apgas/RemoteTask.h 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #ifndef APGAS_REMOTE_TASK_H Modified: trunk/apgas.cpp/src/apgas/Runtime.cc =================================================================== --- trunk/apgas.cpp/src/apgas/Runtime.cc 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp/src/apgas/Runtime.cc 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #include <stdio.h> Modified: trunk/apgas.cpp/src/apgas/Runtime.h =================================================================== --- trunk/apgas.cpp/src/apgas/Runtime.h 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp/src/apgas/Runtime.h 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #ifndef APGAS_POOL_H Modified: trunk/apgas.cpp/src/apgas/Task.cc =================================================================== --- trunk/apgas.cpp/src/apgas/Task.cc 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp/src/apgas/Task.cc 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #include <apgas/Task.h> Modified: trunk/apgas.cpp/src/apgas/Task.h =================================================================== --- trunk/apgas.cpp/src/apgas/Task.h 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp/src/apgas/Task.h 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #ifndef APGAS_TASK_H Modified: trunk/apgas.cpp.examples/fib.cc =================================================================== --- trunk/apgas.cpp.examples/fib.cc 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp.examples/fib.cc 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #include <apgas/Task.h> Modified: trunk/apgas.cpp.examples/hello.cc =================================================================== --- trunk/apgas.cpp.examples/hello.cc 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp.examples/hello.cc 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #include <apgas/Runtime.h> Modified: trunk/apgas.cpp.examples/helloAll.cc =================================================================== --- trunk/apgas.cpp.examples/helloAll.cc 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.cpp.examples/helloAll.cc 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ #include <apgas/Task.h> Modified: trunk/apgas.impl/src/apgas/impl/DeadPlaceError.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/DeadPlaceError.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/DeadPlaceError.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/DefaultFinish.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/DefaultFinish.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/DefaultFinish.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Deque.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Deque.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Deque.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. * * Edited from jsr166 java.util.concurrent.ForkJoinPool (revision 1.216) * Modified: trunk/apgas.impl/src/apgas/impl/ExceptionalTask.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/ExceptionalTask.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/ExceptionalTask.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/GlobalRuntimeImpl.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/GlobalRuntimeImpl.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/GlobalRuntimeImpl.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/ResilientFinish.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/ResilientFinish.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/ResilientFinish.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Scheduler.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Scheduler.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Scheduler.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Semaphore.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Semaphore.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Semaphore.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/SerializableRunnable.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/SerializableRunnable.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/SerializableRunnable.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Task.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Task.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Task.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Transport.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Transport.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Transport.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/Worker.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/Worker.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/Worker.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package apgas.impl; Modified: trunk/apgas.impl/src/apgas/impl/package-info.java =================================================================== --- trunk/apgas.impl/src/apgas/impl/package-info.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/apgas.impl/src/apgas/impl/package-info.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ /** Modified: trunk/x10.common/src/x10/config/Configuration.java =================================================================== --- trunk/x10.common/src/x10/config/Configuration.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.common/src/x10/config/Configuration.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.config; Modified: trunk/x10.common/src/x10/config/ConfigurationError.java =================================================================== --- trunk/x10.common/src/x10/config/ConfigurationError.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.common/src/x10/config/ConfigurationError.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.config; Modified: trunk/x10.common/src/x10/config/OptionError.java =================================================================== --- trunk/x10.common/src/x10/config/OptionError.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.common/src/x10/config/OptionError.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.config; Modified: trunk/x10.common/src/x10/util/CollectionFactory.java =================================================================== --- trunk/x10.common/src/x10/util/CollectionFactory.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.common/src/x10/util/CollectionFactory.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.util; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/AllTests.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/AllTests.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/AllTests.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/CyclicTest.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/CyclicTest.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/CyclicTest.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/DisEqualsTests.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/DisEqualsTests.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/DisEqualsTests.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/EQVEntailmentTests.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/EQVEntailmentTests.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/EQVEntailmentTests.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/EntailmentTest.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/EntailmentTest.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/EntailmentTest.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/FormulaTest.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/FormulaTest.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/FormulaTest.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/MyTest.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/MyTest.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/MyTest.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.constraints.tests/src/x10/constraints/tests/Pair.java =================================================================== --- trunk/x10.constraints.tests/src/x10/constraints/tests/Pair.java 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.constraints.tests/src/x10/constraints/tests/Pair.java 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.constraints.tests; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/LoadedYakMap.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/LoadedYakMap.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/LoadedYakMap.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCollection.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCollection.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCollection.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCursor.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCursor.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakCursor.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakException.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakException.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakException.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakList.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakList.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakList.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; import org.bson.BasicBSONObject; Modified: trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakMap.x10 =================================================================== --- trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakMap.x10 2015-01-12 13:06:28 UTC (rev 28812) +++ trunk/x10.mongo/mongo4x10/drivers/x10/mongo/yak/YakMap.x10 2015-01-12 13:13:01 UTC (rev 28813) @@ -6,7 +6,7 @@ * You may obtain a copy of the License at * http://www.opensource.org/licenses/eclipse-1.0.php * - * (C) Copyright IBM Corporation 2006-2014. + * (C) Copyright IBM Corporation 2006-2015. */ package x10.mongo.yak; import org.bson.Bas... [truncated message content] |
From: <dgr...@us...> - 2015-06-19 18:34:49
|
Revision: 29608 http://sourceforge.net/p/x10/code/29608 Author: dgrove-oss Date: 2015-06-19 18:34:47 +0000 (Fri, 19 Jun 2015) Log Message: ----------- add -O0 -O1 -O2 -O3 -O4 -O5 options to x10c/x10c++ to enable simpler control of post-compiler optimization level Modified Paths: -------------- trunk/x10.compiler/src/x10/Configuration.java trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java trunk/x10.dist/bin/x10c.in Modified: trunk/x10.compiler/src/x10/Configuration.java =================================================================== --- trunk/x10.compiler/src/x10/Configuration.java 2015-06-19 17:34:32 UTC (rev 29607) +++ trunk/x10.compiler/src/x10/Configuration.java 2015-06-19 18:34:47 UTC (rev 29608) @@ -39,6 +39,9 @@ public boolean OPTIMIZE = false; private static final String OPTIMIZE_desc = "Generate optimized code"; + public int OPT_LEVEL = -1; + private static final String OPT_LEVEL_desc = "Optimization level to use when invoking post compiler"; + public boolean CHECK_ERR_MARKERS = false; private static final String CHECK_ERR_MARKERS_desc = "Check for @ERR markers"; Modified: trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java 2015-06-19 17:34:32 UTC (rev 29607) +++ trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java 2015-06-19 18:34:47 UTC (rev 29608) @@ -134,7 +134,11 @@ cxxCmd.add("-I."); if (options.x10_config.OPTIMIZE) { - cxxCmd.add(usingXLC() ? "-O3" : "-O2"); + if (options.x10_config.OPT_LEVEL != -1) { + cxxCmd.add("-O"+options.x10_config.OPT_LEVEL); + } else { + cxxCmd.add(usingXLC() ? "-O3" : "-O2"); + } cxxCmd.add(usingXLC() ? "-qinline" : "-finline-functions"); cxxCmd.add("-DNO_TRACING"); if (fx10()) { Modified: trunk/x10.dist/bin/x10c.in =================================================================== --- trunk/x10.dist/bin/x10c.in 2015-06-19 17:34:32 UTC (rev 29607) +++ trunk/x10.dist/bin/x10c.in 2015-06-19 18:34:47 UTC (rev 29608) @@ -7,6 +7,7 @@ java_args="" args="" optimize="" +optlevel="" debug="" flatexprs="" @@ -40,6 +41,12 @@ -extclass) shift; ext=$1;; -x10rt) shift; x10rt_impl=$1;; -O|-optimize) optimize="true";; + -O0) optimize="false"; optlevel="0";; + -O1) optimize="true"; optlevel="1";; + -O2) optimize="true"; optlevel="2";; + -O3) optimize="true"; optlevel="3";; + -O4) optimize="true"; optlevel="4";; + -O5) optimize="true"; optlevel="5";; -g|-DEBUG) debug="true";; -DEBUG=*) debug='${1##-DEBUG=}';; -FLATTEN_EXPRESSIONS) flatexprs="true";; @@ -69,6 +76,9 @@ -disable <pass> disable compiler pass <pass> valid passes are: async-elimination -O -optimize generate optimized code + -O0 generate unoptimized code + -O1 -O2 -O3 -O4 -O5 generate optimized code and + invoke post compiler at specified level -g generate debug information Use "x10c -- -help" to get more detailed help on compiler options @@ -121,6 +131,7 @@ # Set flags to generate optimized code if we've been asked to do so. [ "$optimize" = "true" ] && args="-OPTIMIZE=true $args" +[ "$optlevel" != "" ] && args="-OPT_LEVEL=${optlevel} $args" # Set flags to generate debug information if we've been asked to do so. [ -n "$debug" ] && args="-DEBUG=$debug $args" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spa...@us...> - 2009-06-16 04:17:08
|
Revision: 8556 http://x10.svn.sourceforge.net/x10/?rev=8556&view=rev Author: sparksparkspark Date: 2009-06-16 04:17:06 +0000 (Tue, 16 Jun 2009) Log Message: ----------- Turn on line numbers in exception traces on linux. If you need -lbfd, on debian-based distros it's found in the binutils-dev package. Modified Paths: -------------- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java trunk/x10.runtime.17/src-cpp/Makefile Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-16 03:40:25 UTC (rev 8555) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-16 04:17:06 UTC (rev 8556) @@ -666,6 +666,7 @@ /** These go after the files */ public static final String[] postArgsLinux = new String[] { "-Wl,-export-dynamic", + "-lbfd", "-lrt", }; Modified: trunk/x10.runtime.17/src-cpp/Makefile =================================================================== --- trunk/x10.runtime.17/src-cpp/Makefile 2009-06-16 03:40:25 UTC (rev 8555) +++ trunk/x10.runtime.17/src-cpp/Makefile 2009-06-16 04:17:06 UTC (rev 8556) @@ -39,7 +39,7 @@ ALL_CUDA_OBJECTS += x10aux/cuda/cuda_utils.o endif -CXXFLAGS += $(INCLUDE_DIRS) -Igen +CXXFLAGS += $(INCLUDE_DIRS) -Igen -DUSE_BFD ifeq ($(shell uname -s),AIX) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dgr...@us...> - 2009-06-16 19:07:29
|
Revision: 8564 http://x10.svn.sourceforge.net/x10/?rev=8564&view=rev Author: dgrove-oss Date: 2009-06-16 19:07:18 +0000 (Tue, 16 Jun 2009) Log Message: ----------- Flip default compiler choice on AIX to be xlC instead of g++. To use g++ on AIX you must now set the environment variable USE_GCC. Modified Paths: -------------- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java trunk/x10.runtime.17/src-cpp/Makefile Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-16 17:46:42 UTC (rev 8563) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-16 19:07:18 UTC (rev 8564) @@ -443,7 +443,7 @@ public static final String X10LIB = System.getenv("X10LIB")==null?"../../../pgas/common/work":System.getenv("X10LIB").replace(File.separatorChar, '/'); public static final String X10GC = System.getenv("X10GC")==null?"../../../x10.dist":System.getenv("X10GC").replace(File.separatorChar, '/'); public static final String TRANSPORT = System.getenv("X10RT_TRANSPORT")==null?DEFAULT_TRANSPORT:System.getenv("X10RT_TRANSPORT"); - public static final boolean USE_XLC = System.getenv("USE_XLC")!=null; + public static final boolean USE_XLC = PLATFORM.startsWith("aix_") && System.getenv("USE_GCC")==null; public static final boolean USE_BFD = System.getenv("USE_BFD")!=null; public static final String MANIFEST = "libx10.mft"; Modified: trunk/x10.runtime.17/src-cpp/Makefile =================================================================== --- trunk/x10.runtime.17/src-cpp/Makefile 2009-06-16 17:46:42 UTC (rev 8563) +++ trunk/x10.runtime.17/src-cpp/Makefile 2009-06-16 19:07:18 UTC (rev 8564) @@ -47,7 +47,12 @@ ifeq ($(shell uname -s),AIX) - ifdef USE_XLC + ifdef USE_GCC + ifdef OPTIMIZE + override CXXFLAGS += -O2 -finline-functions + endif + override CXXFLAGS += -maix64 + else CXX = mpCC_r override CXXFLAGS -= -g ifndef USE_32BIT @@ -64,11 +69,6 @@ ifeq ($(AR),ar) # use AIX default ar AR = /usr/bin/ar endif - else - ifdef OPTIMIZE - override CXXFLAGS += -O2 -finline-functions - endif - override CXXFLAGS += -maix64 endif # FIXME This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ta...@us...> - 2009-06-22 17:50:12
|
Revision: 8572 http://x10.svn.sourceforge.net/x10/?rev=8572&view=rev Author: tardieu Date: 2009-06-22 17:50:11 +0000 (Mon, 22 Jun 2009) Log Message: ----------- reformatted printStackTrace for MultipleException Modified Paths: -------------- trunk/x10.compiler.p3/data/Main.xcd trunk/x10.runtime.17/src-x10/x10/lang/MultipleExceptions.x10 Modified: trunk/x10.compiler.p3/data/Main.xcd =================================================================== --- trunk/x10.compiler.p3/data/Main.xcd 2009-06-22 16:11:34 UTC (rev 8571) +++ trunk/x10.compiler.p3/data/Main.xcd 2009-06-22 17:50:11 UTC (rev 8572) @@ -37,12 +37,6 @@ } catch (java.lang.Throwable t) { t.printStackTrace(); - if (t instanceof x10.lang.MultipleExceptions) { - x10.core.ValRail<Throwable> exceptions = ((x10.lang.MultipleExceptions) t).exceptions; - for(int i = 0; i < exceptions.length; i++) { - exceptions.get(i).printStackTrace(); - } - } } } } Modified: trunk/x10.runtime.17/src-x10/x10/lang/MultipleExceptions.x10 =================================================================== --- trunk/x10.runtime.17/src-x10/x10/lang/MultipleExceptions.x10 2009-06-22 16:11:34 UTC (rev 8571) +++ trunk/x10.runtime.17/src-x10/x10/lang/MultipleExceptions.x10 2009-06-22 17:50:11 UTC (rev 8572) @@ -46,10 +46,7 @@ public def printStackTrace(): void { //super.printStackTrace(); for (t: Throwable in exceptions) { - x10.io.Console.OUT.println("throwable " + t); - - - t.printStackTrace(); + t.printStackTrace(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ipe...@us...> - 2009-06-23 21:52:25
|
Revision: 10499 http://x10.svn.sourceforge.net/x10/?rev=10499&view=rev Author: ipeshansky Date: 2009-06-23 21:52:15 +0000 (Tue, 23 Jun 2009) Log Message: ----------- Initial (rudimentary) manifest support. Commandlineonly is now not needed unless the manifest is not available or you want to force compilation of things in the manifest. Modified Paths: -------------- trunk/x10.compiler.p3/src/polyglot/ext/x10/Configuration.java trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java trunk/x10.compiler.p3/src/polyglot/ext/x10/types/X10SourceClassResolver.java trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/Configuration.java trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/types/X10CPPSourceClassResolver.java trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java trunk/x10.runtime.17/src-cpp/Makefile Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/Configuration.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/Configuration.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/Configuration.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -67,6 +67,9 @@ public static boolean EXTERNALIZE_ASTS = false; private static final String EXTERNALIZE_ASTS_desc = "Externalize ASTs to XML"; + public static String MANIFEST = null; + private static final String MANIFEST_desc = "The path to the pre-built library manifest file"; + /** * Parses one argument from the command line. This allows the user * to specify options also on the command line (in addition to the Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -8,11 +8,15 @@ package polyglot.ext.x10; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; @@ -160,26 +164,52 @@ throw new IllegalStateException("Could not parse " + source.path()); } + protected HashSet<String> manifest = new HashSet<String>(); + public boolean manifestContains(String path) { + path = path.replace(File.separatorChar, '/'); + // FIXME: HACK! Try all prefixes + int s = 0; + while ((s = path.indexOf('/')) != -1) { + if (manifest.contains(path)) + return true; + path = path.substring(s+1); + } + if (manifest.contains(path)) + return true; + return false; + } + protected void initTypeSystem() { - try { - TopLevelResolver r = new X10SourceClassResolver(compiler, this, getOptions().constructFullClasspath(), - getOptions().compile_command_line_only, - getOptions().ignore_mod_times); + try { + TopLevelResolver r = new X10SourceClassResolver(compiler, this, getOptions().constructFullClasspath(), + getOptions().compile_command_line_only, + getOptions().ignore_mod_times); + // FIXME: [IP] HACK + if (Configuration.MANIFEST != null) { + try { + FileReader fr = new FileReader(Configuration.MANIFEST); + BufferedReader br = new BufferedReader(fr); + String file = ""; + while ((file = br.readLine()) != null) + if (file.endsWith(".x10") || file.endsWith(".jar")) // FIXME: hard-codes the source extension. + manifest.add(file); + } catch (IOException e) { } + } else { // TODO: read manifest from x10.jar + } + // Resolver to handle lookups of member classes. + if (true || TypeSystem.SERIALIZE_MEMBERS_WITH_CONTAINER) { + MemberClassResolver mcr = new MemberClassResolver(ts, r, true); + r = mcr; + } - // Resolver to handle lookups of member classes. - if (true || TypeSystem.SERIALIZE_MEMBERS_WITH_CONTAINER) { - MemberClassResolver mcr = new MemberClassResolver(ts, r, true); - r = mcr; - } + ts.initialize(r, this); + } + catch (SemanticException e) { + throw new InternalCompilerError( + "Unable to initialize type system: " + e.getMessage(), e); + } + } - ts.initialize(r, this); - } - catch (SemanticException e) { - throw new InternalCompilerError( - "Unable to initialize type system: " + e.getMessage(), e); - } - } - protected NodeFactory createNodeFactory() { return new X10NodeFactory_c(this); } @@ -264,19 +294,20 @@ public Goal CodeGenBarrier() { if (Globals.Options().compile_command_line_only) { - return new BarrierGoal(commandLineJobs()) { + return new BarrierGoal("CodeGenBarrier", commandLineJobs()) { @Override public Goal prereqForJob(Job job) { return Serialized(job); } - public String name() { return "CodeGenBarrier"; } }; } else { return new AllBarrierGoal("CodeGenBarrier", this) { @Override public Goal prereqForJob(Job job) { - return Serialized(job); + if (((ExtensionInfo) extInfo).manifestContains(job.source().path())) + return null; + return Serialized(job); } }; } Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/types/X10SourceClassResolver.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/types/X10SourceClassResolver.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/types/X10SourceClassResolver.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -112,6 +112,25 @@ return null; } + /** + * Manifest support. + * @param name + * @return whether the given class should be considered part of the final executable + */ + protected boolean isOutput(QName name) { + String fname = name.toString().replace('.', '/')+".x10"; // FIXME: hard-codes the source extension. + return !((polyglot.ext.x10.ExtensionInfo) ext).manifestContains(fname); + } + + /** + * Manifest support. + * @param name + * @return whether the given class should be compiled + */ + private boolean shouldCompile(QName name) { + return !compileCommandLineOnly && isOutput(name); + } + public Named find(QName name) throws SemanticException { X10TypeSystem ts = (X10TypeSystem) this.ts; @@ -133,7 +152,7 @@ // Check if a job for the source already exists. if (source != null && ext.scheduler().sourceHasJob(source)) { // the source has already been compiled; what are we doing here? - return getTypeFromSource(source, name, !compileCommandLineOnly); + return getTypeFromSource(source, name, shouldCompile(name)); } if (source == null) { @@ -150,6 +169,8 @@ if (Report.should_report(report_topics, 3)) Report.report(3, "Source file version is newer than compiled for " + name + "."); clazz = null; + } else { + handleUpToDateTarget(name, clazz); } } @@ -158,7 +179,7 @@ if (source != null) { if (Report.should_report(report_topics, 4)) Report.report(4, "Using source file for " + name); - result = getTypeFromSource(source, name, !compileCommandLineOnly && clazz == null); + result = getTypeFromSource(source, name, shouldCompile(name) && clazz == null); } // Verify that the type we loaded has the right name. This prevents, @@ -170,6 +191,9 @@ throw new NoClassException(name.toString()); } + protected void handleUpToDateTarget(QName name, Resource file) { + } + public boolean packageExists(QName name) { if (ext.sourceLoader().packageExists(name)) { return true; Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/Configuration.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/Configuration.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/Configuration.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -41,9 +41,6 @@ public static boolean DISABLE_GC = false; private static final String DISABLE_GC_desc = "Disable the linking in of the BDW conservative garbage collector"; - public static String MANIFEST = null; - private static final String MANIFEST_desc = "The path to the pre-built library manifest file"; - /** * Parses one argument from the command line. This allows the user * to specify options also on the command line (in addition to the Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -6,9 +6,14 @@ package polyglot.ext.x10cpp; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; import java.util.List; import polyglot.ast.NodeFactory; +import polyglot.ext.x10.Configuration; import polyglot.ext.x10.ast.X10NodeFactory_c; import polyglot.ext.x10.visit.CheckNativeAnnotationsVisitor; import polyglot.ext.x10.visit.StaticNestedClassRemover; @@ -28,6 +33,7 @@ import polyglot.frontend.Scheduler; import polyglot.frontend.VisitorGoal; import polyglot.main.Options; +import polyglot.main.Report; import polyglot.types.MemberClassResolver; import polyglot.types.SemanticException; import polyglot.types.TopLevelResolver; @@ -64,6 +70,28 @@ protected void initTypeSystem() { // Inline from superclass, replacing SourceClassResolver try { + if (Configuration.MANIFEST == null) { + String[] MANIFEST_LOCATIONS = X10CPPTranslator.MANIFEST_LOCATIONS; + for (int i = 0; i < MANIFEST_LOCATIONS.length; i++) { + File x10lang_m = new File(MANIFEST_LOCATIONS[i]+"/"+X10CPPTranslator.MANIFEST); + if (!x10lang_m.exists()) + continue; + Configuration.MANIFEST = x10lang_m.getPath(); + } + } + // FIXME: [IP] HACK + if (Report.should_report("manifest", 1)) + Report.report(1, "Manifest is "+Configuration.MANIFEST); + if (Configuration.MANIFEST != null) { + try { + FileReader fr = new FileReader(Configuration.MANIFEST); + BufferedReader br = new BufferedReader(fr); + String file = ""; + while ((file = br.readLine()) != null) + if (file.endsWith(".x10") || file.endsWith(".jar")) // FIXME: hard-codes the source extension. + manifest.add(file); + } catch (IOException e) { } + } TopLevelResolver r = new X10CPPSourceClassResolver(compiler, this, getOptions().constructFullClasspath(), getOptions().compile_command_line_only, @@ -129,18 +157,19 @@ } public Goal NewCodeGenBarrier() { if (Globals.Options().compile_command_line_only) { - return new BarrierGoal(commandLineJobs()) { + return new BarrierGoal("NewCodeGenBarrier", commandLineJobs()) { @Override public Goal prereqForJob(Job job) { return StaticNestedClassesRemoved(job); } - public String name() { return "CodeGenBarrier"; } }; } else { - return new AllBarrierGoal("CodeGenBarrier", this) { + return new AllBarrierGoal("NewCodeGenBarrier", this) { @Override public Goal prereqForJob(Job job) { + if (((ExtensionInfo) extInfo).manifestContains(job.source().path())) + return null; return StaticNestedClassesRemoved(job); } }; Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/types/X10CPPSourceClassResolver.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/types/X10CPPSourceClassResolver.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/types/X10CPPSourceClassResolver.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -69,4 +69,15 @@ return null; } + protected void handleUpToDateTarget(QName name, Resource file) { + // FIXME: [IP] HACK + // Add this file to outputFiles even if it won't be compiled + if (!isOutput(name)) + return; + String path = file.name(); + String out = ext.getOptions().output_directory.getPath(); + assert (path.startsWith(out)) : "Unknown path: "+path; + path = path.substring(out.length()+1); + compiler.outputFiles().add(path); + } } Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/X10CPPTranslator.java 2009-06-23 21:52:15 UTC (rev 10499) @@ -442,21 +442,21 @@ return (DelegateTargetFactory) this.tf; } + public static final String X10LANG = System.getenv("X10LANG")==null?"../../../x10.runtime.17/src-cpp":System.getenv("X10LANG").replace(File.separatorChar, '/'); + public static final String MANIFEST = "libx10.mft"; + public static final String[] MANIFEST_LOCATIONS = new String[] { + X10LANG, + X10LANG+"/lib", + }; private static class CXXCommandBuilder { public static final String DUMMY = "-U___DUMMY___"; - public static final String X10LANG = System.getenv("X10LANG")==null?"../../../x10.runtime.17/src-cpp":System.getenv("X10LANG").replace(File.separatorChar, '/'); public static final String X10LIB = System.getenv("X10LIB")==null?"../../../pgas/common/work":System.getenv("X10LIB").replace(File.separatorChar, '/'); public static final String X10GC = System.getenv("X10GC")==null?"../../../x10.dist":System.getenv("X10GC").replace(File.separatorChar, '/'); public static final String TRANSPORT = System.getenv("X10RT_TRANSPORT")==null?DEFAULT_TRANSPORT:System.getenv("X10RT_TRANSPORT"); public static final boolean USE_XLC = PLATFORM.startsWith("aix_") && System.getenv("USE_GCC")==null; public static final boolean USE_BFD = System.getenv("USE_BFD")!=null; - public static final String MANIFEST = "libx10.mft"; - public static final String[] MANIFEST_LOCATIONS = new String[] { - X10LANG, - X10LANG+"/lib", - }; /** These go before the files */ public static final String[] preArgs = new String[] { "-g", @@ -577,7 +577,7 @@ HashSet<String> exclude = new HashSet<String>(); try { - String manifest = Configuration.MANIFEST; + String manifest = polyglot.ext.x10.Configuration.MANIFEST; if (manifest == null) { for (int i = 0; i < MANIFEST_LOCATIONS.length; i++) { File x10lang_m = new File(MANIFEST_LOCATIONS[i]+"/"+MANIFEST); Modified: trunk/x10.runtime.17/src-cpp/Makefile =================================================================== --- trunk/x10.runtime.17/src-cpp/Makefile 2009-06-23 21:51:54 UTC (rev 10498) +++ trunk/x10.runtime.17/src-cpp/Makefile 2009-06-23 21:52:15 UTC (rev 10499) @@ -121,7 +121,8 @@ # A list of all .x10 files (relative to the src-cpp dir) that we should build # into the xrx lib. -XRXFILES = $(shell find ../src-x10 -name '*.x10') +# prune .svn dirs (they probably don't contain *.x10 files so this is just an optimisation) +XRXFILES = $(shell find ../src-x10 -name .svn -prune -o -name '*.x10' -print) #enable asserts, do not look in jar for x10 files X10CPPFLAGS += -J-ea -rtdev -disable CheckNativeAnnotations -commandlineonly @@ -137,7 +138,7 @@ @echo "Regenerating XRX cc/h/inc files" mkdir -p gen @#prune .svn dirs (they probably don't contain *.x10 files so this is just an optimisation) - cd ../src-x10 && find * -name .svn -prune -o -name \*.x10 -print | \ + cd ../src-x10 && find * -name .svn -prune -o -name '*.x10' -print | \ xargs "$(INSTDIR)"/bin/x10c++ -c $(X10CPPFLAGS) -sourcepath . -d ../src-cpp/gen touch $@ @@ -145,6 +146,9 @@ # should be included in the $(XRX_ARCHIVE). $(XRX_MANIFEST): gen/all-cpp-generated (cd gen && find * -name \*.cc -print) > $@ + @#prune .svn dirs (they probably don't contain *.x10 files so this is just an optimisation) + (cd ../src-x10 && find * -name .svn -prune -o -name '*.x10' -print) >> $@ + echo x10.jar >> $@ # FIXME: hard-coded JAR name @@ -216,12 +220,12 @@ # This target will build the XRX cc files into object files gen/all-o-generated: gen/all-cpp-generated $(XRX_MANIFEST) - $(MAKE) $(MAKEFLAGS) $(shell sed -e 's@^\(.*\).cc$$@gen/\1.o@' $(XRX_MANIFEST)) + $(MAKE) $(MAKEFLAGS) $(shell sed -e 's@^\(.*\)\.cc$$@gen/\1.o@' -e '/\.x10$$/d' -e '/\.jar$$/d' $(XRX_MANIFEST)) touch $@ $(XRX_ARCHIVE): gen/all-o-generated $(XRX_MANIFEST) $(ALL_MANUAL_OBJECTS) $(AR) $(ARFLAGS) $@ \ - $(shell sed -e 's@^\(.*\).cc$$@gen/\1.o@' $(XRX_MANIFEST)) \ + $(shell sed -e 's@^\(.*\)\.cc$$@gen/\1.o@' -e '/\.x10$$/d' -e '/\.jar$$/d' $(XRX_MANIFEST)) \ $(ALL_MANUAL_OBJECTS) # The dummy files are needed to avoid rebuilds so must not be removed as This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ipe...@us...> - 2009-06-24 17:17:23
|
Revision: 10508 http://x10.svn.sourceforge.net/x10/?rev=10508&view=rev Author: ipeshansky Date: 2009-06-24 17:16:51 +0000 (Wed, 24 Jun 2009) Log Message: ----------- Make data/ a source directory, so template files are copied. Modified Paths: -------------- trunk/x10.compiler.p3/.classpath trunk/x10.cppbackend.17/.classpath Modified: trunk/x10.compiler.p3/.classpath =================================================================== --- trunk/x10.compiler.p3/.classpath 2009-06-24 15:45:34 UTC (rev 10507) +++ trunk/x10.compiler.p3/.classpath 2009-06-24 17:16:51 UTC (rev 10508) @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="" including="data/**" excluding="src/"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="classes"/> Modified: trunk/x10.cppbackend.17/.classpath =================================================================== --- trunk/x10.cppbackend.17/.classpath 2009-06-24 15:45:34 UTC (rev 10507) +++ trunk/x10.cppbackend.17/.classpath 2009-06-24 17:16:51 UTC (rev 10508) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> - <classpathentry including="data/**" excluding="src/" kind="src" path=""/> + <classpathentry kind="src" path="" including="data/**" excluding="src/"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="classes"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ipe...@us...> - 2009-06-25 04:20:01
|
Revision: 10518 http://x10.svn.sourceforge.net/x10/?rev=10518&view=rev Author: ipeshansky Date: 2009-06-25 04:20:00 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Fix manifest handling. Modified Paths: -------------- trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java Modified: trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java =================================================================== --- trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java 2009-06-25 03:57:45 UTC (rev 10517) +++ trunk/x10.compiler.p3/src/polyglot/ext/x10/ExtensionInfo.java 2009-06-25 04:20:00 UTC (rev 10518) @@ -305,8 +305,11 @@ return new AllBarrierGoal("CodeGenBarrier", this) { @Override public Goal prereqForJob(Job job) { - if (((ExtensionInfo) extInfo).manifestContains(job.source().path())) + if (!scheduler.commandLineJobs().contains(job) && + ((ExtensionInfo) extInfo).manifestContains(job.source().path())) + { return null; + } return Serialized(job); } }; Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java 2009-06-25 03:57:45 UTC (rev 10517) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/ExtensionInfo.java 2009-06-25 04:20:00 UTC (rev 10518) @@ -168,8 +168,11 @@ return new AllBarrierGoal("NewCodeGenBarrier", this) { @Override public Goal prereqForJob(Job job) { - if (((ExtensionInfo) extInfo).manifestContains(job.source().path())) + if (!scheduler.commandLineJobs().contains(job) && + ((ExtensionInfo) extInfo).manifestContains(job.source().path())) + { return null; + } return StaticNestedClassesRemoved(job); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |