Ticket #275: java-jvm-7a.patch
File java-jvm-7a.patch, 4.5 KB (added by hopscc, 12 years ago) |
---|
-
Source/Cobra.Core/Java/mkjarAll
8 8 9 9 [ -d classes ] || mkdir classes 10 10 [ -d classes/cobra/lang ] && rm -rf classes/cobra/lang/* 11 EXCEPTIONS="AssertException.java InvariantException.java RequireException.java EnsureException.java NonNilCastException.java DynamicOperationException.java ExpectException.java CheckedExceptionWrapper.java" 12 javac -d classes SourceSite.java CobraImp.java CobraCore.java Delegate.java DelegateO.java Pair.java ${EXCEPTIONS} CobraDirectString.java 11 12 source javaRtlSources 13 javac -Xlint:unchecked -d classes ${RTL_SRCS} 13 14 [ $? == 0 ] || exit 14 15 15 16 jar cvf ${CORE_RTL} -C classes . -
Source/Cobra.Core/Java/mkjar
7 7 8 8 [ -d classes ] || mkdir classes 9 9 [ -d classes/cobra/lang ] && rm -rf classes/cobra/lang/* 10 EXCEPTIONS="AssertException.java InvariantException.java RequireException.java EnsureException.java NonNilCastException.java DynamicOperationException.java ExpectException.java CheckedExceptionWrapper.java" 11 javac -Xlint:unchecked -d classes SourceSite.java CobraImp.java CobraCore.java Delegate.java DelegateO.java BasePair.java Pair.java ${EXCEPTIONS} CobraDirectString.java 10 11 source javaRtlSources 12 javac -Xlint:unchecked -d classes ${RTL_SRCS} 12 13 [ $? == 0 ] || exit 13 14 14 15 jar cvf ${CORE_RTL} -C classes . -
Source/Cobra.Core/Java/mkjarOnly
7 7 8 8 [ -d classes ] || mkdir classes 9 9 [ -d classes/cobra/lang ] && rm -rf classes/cobra/lang/* 10 EXCEPTIONS="AssertException.java InvariantException.java RequireException.java EnsureException.java NonNilCastException.java DynamicOperationException.java ExpectException.java CheckedExceptionWrapper.java" 11 javac -Xlint:unchecked -d classes SourceSite.java CobraImp.java CobraCore.java Delegate.java DelegateO.java Pair.java ${EXCEPTIONS} CobraDirectString.java 10 11 source javaRtlSources 12 javac -Xlint:unchecked -d classes ${RTL_SRCS} 12 13 [ $? == 0 ] || exit 14 13 15 jar cvf ${CORE_RTL} -C classes . 14 16 [ $? == 0 ] || exit 15 17 cp ${CORE_RTL} ../.. -
Source/Cobra.Core/Java/BasePair.java
1 /* 2 * BasePair.java 3 * 4 * Abstract base class for simple pair class hierarchy to satisfy RT requirements for compiler 5 * used by Pair.java et al 6 */ 7 8 package cobra.core; 9 import java.util.*; 10 11 public abstract class BasePair { 12 13 protected int _compare(Comparable<Object> a, Comparable<Object> b) { 14 /* 15 * Gracefully handle comparisons that involve nil. 16 * A simple `a.compareTo(b)` does not work if `a` can be `nil`. 17 */ 18 if (a == null) 19 if (b == null) 20 return 0; 21 else 22 return -1; 23 else if (b == null) 24 return 1; 25 else 26 return a.compareTo(b); 27 } 28 29 public int size() { 30 return 2; 31 } 32 33 } -
Source/Cobra.Core/Java/javaRTLSources
1 # List of java Source files for the jvm cobra Runtime Library 2 # sourced into the mkjar* build scripts 3 # The RTL sources are currently all java src code, eventually when compiler 4 # is more mature will migrate some/most to cobra sources 5 6 EXCEPTIONS="AssertException.java InvariantException.java 7 RequireException.java EnsureException.java NonNilCastException.java 8 DynamicOperationException.java ExpectException.java 9 CheckedExceptionWrapper.java" 10 11 RTL_SRCS="SourceSite.java CobraImp.java CobraCore.java 12 Delegate.java DelegateO.java BasePair.java Pair.java 13 ${EXCEPTIONS} CobraDirectString.java"