|
From: <vj...@us...> - 2009-11-10 02:37:27
|
Revision: 11971
http://x10.svn.sourceforge.net/x10/?rev=11971&view=rev
Author: vj0
Date: 2009-11-10 02:37:15 +0000 (Tue, 10 Nov 2009)
Log Message:
-----------
Fix breakage due to introduction of safe on methods in Any. (Implementing methods in Struct and Object must also be safe.)
Modified Paths:
--------------
trunk/x10.compiler/src/x10/types/X10TypeEnv_c.java
trunk/x10.compiler/src/x10/util/Struct.java
trunk/x10.runtime/src-x10/x10/lang/Object.x10
Modified: trunk/x10.compiler/src/x10/types/X10TypeEnv_c.java
===================================================================
--- trunk/x10.compiler/src/x10/types/X10TypeEnv_c.java 2009-11-10 00:58:57 UTC (rev 11970)
+++ trunk/x10.compiler/src/x10/types/X10TypeEnv_c.java 2009-11-10 02:37:15 UTC (rev 11971)
@@ -179,9 +179,9 @@
if (Report.should_report(Report.types, 3))
Report.report(3, mi.flags() + " is more liberal than " +
mj.flags());
- throw new SemanticException(mi.signature() + " in " + mi.container() +
+ throw new SemanticException(mi.flags() + " " + mi.signature() + " in " + mi.container() +
" cannot override " +
- mj.signature() + " in " + mj.container() +
+ mj.flags() + " " + mj.signature() + " in " + mj.container() +
"; attempting to assign weaker " +
"behavioral annotations",
mi.position());
@@ -1835,9 +1835,9 @@
if (Report.should_report(Report.types, 3))
Report.report(3, mi.flags() + " is more liberal than " +
mj.flags());
- throw new SemanticException(mi.signature() + " in " + mi.container() +
+ throw new SemanticException(mi.flags() + " " + mi.signature() + " in " + mi.container() +
" cannot override " +
- mj.signature() + " in " + mj.container() +
+ mj.flags() + " " + mj.signature() + " in " + mj.container() +
"; attempting to assign weaker " +
"behavioral annotations",
mi.position());
Modified: trunk/x10.compiler/src/x10/util/Struct.java
===================================================================
--- trunk/x10.compiler/src/x10/util/Struct.java 2009-11-10 00:58:57 UTC (rev 11970)
+++ trunk/x10.compiler/src/x10/util/Struct.java 2009-11-10 02:37:15 UTC (rev 11971)
@@ -118,7 +118,8 @@
// @Native("java", "x10.lang.Place.place(x10.core.Ref.location(#0))")
// property def loc():Place
mi = xts.methodDef(pos, Types.ref(ct),
- X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property().Global(), PLACE,
+ X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property().Global().Safe(),
+ PLACE,
Name.make("loc"),
Collections.EMPTY_LIST,
Collections.EMPTY_LIST,
@@ -145,7 +146,8 @@
// property def at(p:Object):boolean;
List<LocalDef> parameters = xts.dummyLocalDefs(Collections.<Ref<? extends Type>> singletonList(OBJECT));
mi = xts.methodDef(pos, Types.ref(ct),
- X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property(), BOOLEAN,
+ X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property().Safe(),
+ BOOLEAN,
Name.make("at"),
Collections.EMPTY_LIST,
Collections.<Ref<? extends Type>> singletonList(OBJECT),
@@ -170,7 +172,7 @@
mi = xts.methodDef(pos,
Types.ref(ct),
- X10Flags.toX10Flags(Flags.PUBLIC.Native().Final()).Global(),
+ X10Flags.toX10Flags(Flags.PUBLIC.Native().Final()).Global().Safe(),
STRING,
Name.make("typeName"),
Collections.EMPTY_LIST,
@@ -202,7 +204,8 @@
// property def at(p:Place):boolean;
parameters = xts.dummyLocalDefs(Collections.<Ref<? extends Type>> singletonList(PLACE));
mi = xts.methodDef(pos, Types.ref(ct),
- X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property(), BOOLEAN,
+ X10Flags.toX10Flags(Flags.PUBLIC.Native()).Property().Safe(),
+ BOOLEAN,
Name.make("at"),
Collections.EMPTY_LIST,
Collections.<Ref<? extends Type>> singletonList(PLACE),
Modified: trunk/x10.runtime/src-x10/x10/lang/Object.x10
===================================================================
--- trunk/x10.runtime/src-x10/x10/lang/Object.x10 2009-11-10 00:58:57 UTC (rev 11970)
+++ trunk/x10.runtime/src-x10/x10/lang/Object.x10 2009-11-10 02:37:15 UTC (rev 11971)
@@ -45,15 +45,15 @@
@Native("java", "x10.lang.Place.place(x10.core.Ref.location(#0))")
@Native("c++", "x10::lang::Place_methods::place((#0)->location)")
- public property def loc() = location;
+ public property safe def loc() = location;
@Native("java", "x10.core.Ref.at(#0, #1.id)")
@Native("c++", "((#0)->location == (#1)->FMGL(id))")
- public property def at(p:Place) = location==p;
+ public property safe def at(p:Place) = location==p;
@Native("java", "x10.core.Ref.at(#0, #1)")
@Native("c++", "((#0)->location == (#1)->location)")
- public property def at(r:Object) = location==r.location;
+ public property safe def at(r:Object) = location==r.location;
@Native("java", "x10.core.Ref.typeName(#0)")
public native global final def typeName():String;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|