From ecc323233e2ff4f005e0d2b7ac62487954678977 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Mon, 11 Jun 2012 10:19:30 -0400 Subject: Forkjoin and fjbg are now always compiled in the build. * forkjoin.done/forkjoine.clean can test forkjoin source * fjbg.done/fjbg.clean can test fjbg source. --- build.xml | 263 ++++++++++++++++--------- src/forkjoin/scala/concurrent/util/Unsafe.java | 35 ++++ src/library/scala/concurrent/util/Unsafe.java | 35 ---- 3 files changed, 201 insertions(+), 132 deletions(-) create mode 100644 src/forkjoin/scala/concurrent/util/Unsafe.java delete mode 100644 src/library/scala/concurrent/util/Unsafe.java diff --git a/build.xml b/build.xml index a9e0aa257e..ef518a7233 100644 --- a/build.xml +++ b/build.xml @@ -342,6 +342,16 @@ INITIALISATION + + + + + + + + + + @@ -377,12 +387,17 @@ INITIALISATION + + + + + + + - - @@ -391,7 +406,7 @@ INITIALISATION - + @@ -408,23 +423,24 @@ INITIALISATION + - + - + @@ -455,12 +471,106 @@ LOCAL Adapted ASM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -478,10 +588,13 @@ LOCAL REFERENCE BUILD (LOCKER) + + + + - @@ -807,18 +926,24 @@ QUICK BUILD (QUICK) + + + + + + + + + + @@ -1006,6 +1133,8 @@ QUICK BUILD (QUICK) + + @@ -1052,6 +1181,7 @@ QUICK BUILD (QUICK) + @@ -1106,7 +1236,7 @@ QUICK BUILD (QUICK) - + @@ -1150,7 +1280,8 @@ QUICK BUILD (QUICK) - + + @@ -1179,6 +1310,8 @@ QUICK BUILD (QUICK) + + @@ -1256,6 +1389,7 @@ PACKED QUICK BUILD (PACK) + @@ -1304,8 +1438,8 @@ PACKED QUICK BUILD (PACK) + - @@ -1453,18 +1587,24 @@ BOOTSTRAPPING BUILD (STRAP) + + + + + + + + + @@ -1581,6 +1722,8 @@ BOOTSTRAPPING BUILD (STRAP) + + @@ -1630,6 +1773,8 @@ BOOTSTRAPPING BUILD (STRAP) + + @@ -1695,7 +1840,7 @@ BOOTSTRAPPING BUILD (STRAP) - + @@ -1739,7 +1884,7 @@ BOOTSTRAPPING BUILD (STRAP) - + @@ -1764,48 +1909,6 @@ LIBRARIES (MSIL, FJBG maybe later) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1849,43 +1952,9 @@ LIBRARIES (MSIL, FJBG maybe later) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + diff --git a/src/forkjoin/scala/concurrent/util/Unsafe.java b/src/forkjoin/scala/concurrent/util/Unsafe.java new file mode 100644 index 0000000000..0cd48758d5 --- /dev/null +++ b/src/forkjoin/scala/concurrent/util/Unsafe.java @@ -0,0 +1,35 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +package scala.concurrent.util; + + + +import java.lang.reflect.Field; + + + +public final class Unsafe { + public final static sun.misc.Unsafe instance; + static { + try { + sun.misc.Unsafe found = null; + for(Field field : sun.misc.Unsafe.class.getDeclaredFields()) { + if (field.getType() == sun.misc.Unsafe.class) { + field.setAccessible(true); + found = (sun.misc.Unsafe) field.get(null); + break; + } + } + if (found == null) throw new IllegalStateException("Can't find instance of sun.misc.Unsafe"); + else instance = found; + } catch(Throwable t) { + throw new ExceptionInInitializerError(t); + } + } +} diff --git a/src/library/scala/concurrent/util/Unsafe.java b/src/library/scala/concurrent/util/Unsafe.java deleted file mode 100644 index 0cd48758d5..0000000000 --- a/src/library/scala/concurrent/util/Unsafe.java +++ /dev/null @@ -1,35 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -package scala.concurrent.util; - - - -import java.lang.reflect.Field; - - - -public final class Unsafe { - public final static sun.misc.Unsafe instance; - static { - try { - sun.misc.Unsafe found = null; - for(Field field : sun.misc.Unsafe.class.getDeclaredFields()) { - if (field.getType() == sun.misc.Unsafe.class) { - field.setAccessible(true); - found = (sun.misc.Unsafe) field.get(null); - break; - } - } - if (found == null) throw new IllegalStateException("Can't find instance of sun.misc.Unsafe"); - else instance = found; - } catch(Throwable t) { - throw new ExceptionInInitializerError(t); - } - } -} -- cgit v1.2.3 From 949c5caba25f6273bd87b09a8aa568227bd44240 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Mon, 11 Jun 2012 12:08:10 -0400 Subject: MSIL now build as part of compiler. * MSIL is now compiled/embedded with compiler * Tested building new STARR, everything groovy * Can probably remove msil/forkjoin/fjbg from STARR now that they're properly embedded/built. --- build.xml | 184 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 90 insertions(+), 94 deletions(-) diff --git a/build.xml b/build.xml index ef518a7233..b5f5d07e54 100644 --- a/build.xml +++ b/build.xml @@ -135,16 +135,6 @@ END-USER TARGETS - - - - - - - - @@ -175,6 +165,7 @@ PROPERTIES + @@ -392,13 +383,11 @@ INITIALISATION + - - - @@ -688,6 +677,33 @@ LOCAL REFERENCE BUILD (LOCKER) + + + + + + + + + + + + + + + - - @@ -1041,27 +1055,7 @@ QUICK BUILD (QUICK) - - - - - - - - - - - - - - - - - - - - - + @@ -1070,6 +1064,33 @@ QUICK BUILD (QUICK) + + + + + + + + + + + + + + + - @@ -1439,8 +1459,6 @@ PACKED QUICK BUILD (PACK) - - @@ -1709,7 +1727,33 @@ BOOTSTRAPPING BUILD (STRAP) - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -2235,7 +2231,7 @@ DOCUMENTATION BOOTRAPING TEST AND TEST SUITE ============================================================================ --> - + @@ -2515,11 +2511,11 @@ STABLE REFERENCE (STARR) - + + - -- cgit v1.2.3