Show
Ignore:
Timestamp:
08/17/09 13:01:11 (3 months ago)
Author:
dr2chase
Message:

Jan's RR64 patches, plus fixes required to make the rest of the system cope, plus updates to error tests.

Location:
trunk/ProjectFortress/LibraryBuiltin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/LibraryBuiltin/CompilerBuiltin.fsi

    r3966 r4087  
    2323 
    2424trait String 
     25    asString(): String 
    2526opr || (self, b:String):String 
     27    opr juxtaposition(self, b:String): String 
    2628end 
    2729 
     
    4244trait ZZ32 extends ZZ64 comprises { IntLiteral } 
    4345    asString(): String 
    44     opr STR(self): String 
     46    opr |self| : ZZ32 
    4547    opr -(self): ZZ32 
    4648    opr +(self, other:ZZ32): ZZ32 
     
    4951    opr <=(self, other:ZZ32): Boolean 
    5052    opr >(self, other:ZZ32): Boolean 
     53    opr >=(self, other:ZZ32): Boolean 
    5154    opr =(self, other:ZZ32): Boolean 
    5255    opr juxtaposition(self, other:ZZ32): ZZ32 
     
    5962 
    6063trait RR64 extends Number 
     64    asString(): String 
     65    opr |self| : RR64 
     66    opr -(self): RR64 
     67    opr +(self, other:RR64): RR64 
     68    opr -(self, other:RR64): RR64 
     69    opr <(self, other:RR64): Boolean 
     70    opr <=(self, other:RR64): Boolean 
     71    opr >(self, other:RR64): Boolean 
     72    opr >=(self, other:RR64): Boolean 
     73    opr =(self, other:RR64): Boolean 
     74    opr juxtaposition(self, other:RR64): RR64 
     75    opr DOT(self, other:RR64): RR64 
     76    opr /(self, other:RR64): RR64 
    6177end 
    6278 
  • trunk/ProjectFortress/LibraryBuiltin/CompilerBuiltin.fss

    r3966 r4087  
    2828                                            simpleIntArith.intLE => jIntLE, 
    2929                                            simpleIntArith.intGT => jIntGT, 
     30                                            simpleIntArith.intGE => jIntGE, 
    3031                                            simpleIntArith.intEQ => jIntEQ, 
    3132                                            simpleIntArith.intNeg => jIntNeg, 
    32                                             simpleIntArith.parseInt => jParseInt} 
     33                                            simpleIntArith.parseInt => jParseInt, 
     34                                            simpleIntArith.intAbs => jIntAbs} 
     35import java com.sun.fortress.nativeHelpers.{simpleDoubleArith.doubleToString => jDoubleToString, 
     36                                            simpleDoubleArith.doubleAdd => jDoubleAdd, 
     37                                            simpleDoubleArith.doubleSub => jDoubleSub, 
     38                                            simpleDoubleArith.doubleMul => jDoubleMul, 
     39                                            simpleDoubleArith.doubleDiv => jDoubleDiv, 
     40                                            simpleDoubleArith.doubleLT => jDoubleLT, 
     41                                            simpleDoubleArith.doubleLE => jDoubleLE, 
     42                                            simpleDoubleArith.doubleGT => jDoubleGT, 
     43                                            simpleDoubleArith.doubleGE => jDoubleGE, 
     44                                            simpleDoubleArith.doubleEQ => jDoubleEQ, 
     45                                            simpleDoubleArith.doubleNeg => jDoubleNeg, 
     46                                            simpleDoubleArith.parseDouble => jParseDouble, 
     47                                            simpleDoubleArith.doubleAbs => jDoubleAbs} 
    3348import AnyType.{Any} 
    3449export CompilerBuiltin 
     
    3853 
    3954trait String 
     55    asString(): String = self 
    4056    opr ||(self, b:String): String =  jConcatenate(self, b) 
     57    opr juxtaposition(self, b:String): String = jConcatenate(self, b) 
    4158end 
    4259 
     
    4562 
    4663println(s:String):() = jPrintln(s) 
    47 printlnZZ32(x:ZZ32):() = jPrintlnZZ32(x) 
     64printlnZZ32(x:ZZ32):() = jPrintln(x.asString()) 
    4865 
    4966strToInt(s:String):ZZ32 = jParseInt(s) 
     
    5774trait ZZ32 extends ZZ64 comprises { IntLiteral } 
    5875    asString(): String = jIntToString(self) 
    59     opr STR(self): String = jIntToString(self) 
     76    opr |self| : ZZ32 = jIntAbs(self) 
    6077    opr -(self): ZZ32 = jIntNeg(self) 
    6178    opr +(self, other:ZZ32): ZZ32 = jIntAdd(self,other) 
     
    6481    opr <=(self, other:ZZ32): Boolean = jIntLE(self,other) 
    6582    opr >(self, other:ZZ32): Boolean = jIntGT(self,other) 
     83    opr >=(self, other:ZZ32): Boolean = jIntGE(self,other) 
    6684    opr =(self, other:ZZ32): Boolean = jIntEQ(self,other) 
    6785    opr juxtaposition(self, other:ZZ32): ZZ32 = jIntMul(self,other) 
     
    7492 
    7593trait RR64 extends Number 
     94    asString(): String = jDoubleToString(self) 
     95    opr |self| : RR64 = jDoubleAbs(self) 
     96    opr -(self): RR64 = jDoubleNeg(self) 
     97    opr +(self, other:RR64): RR64 = jDoubleAdd(self,other) 
     98    opr -(self, other:RR64): RR64 = jDoubleSub(self,other) 
     99    opr <(self, other:RR64): Boolean = jDoubleLT(self,other) 
     100    opr <=(self, other:RR64): Boolean = jDoubleLE(self,other) 
     101    opr >(self, other:RR64): Boolean = jDoubleGT(self,other) 
     102    opr >=(self, other:RR64): Boolean = jDoubleGE(self,other) 
     103    opr =(self, other:RR64): Boolean = jDoubleEQ(self,other) 
     104    opr juxtaposition(self, other:RR64): RR64 = jDoubleMul(self,other) 
     105    opr DOT(self, other:RR64): RR64 = jDoubleMul(self,other) 
     106    opr /(self, other:RR64): RR64 = jDoubleDiv(self,other) 
    76107end 
    77108