Changeset 4087 for trunk/ProjectFortress/LibraryBuiltin
- Timestamp:
- 08/17/09 13:01:11 (3 months ago)
- Location:
- trunk/ProjectFortress/LibraryBuiltin
- Files:
-
- 2 modified
-
CompilerBuiltin.fsi (modified) (4 diffs)
-
CompilerBuiltin.fss (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ProjectFortress/LibraryBuiltin/CompilerBuiltin.fsi
r3966 r4087 23 23 24 24 trait String 25 asString(): String 25 26 opr || (self, b:String):String 27 opr juxtaposition(self, b:String): String 26 28 end 27 29 … … 42 44 trait ZZ32 extends ZZ64 comprises { IntLiteral } 43 45 asString(): String 44 opr STR(self): String46 opr |self| : ZZ32 45 47 opr -(self): ZZ32 46 48 opr +(self, other:ZZ32): ZZ32 … … 49 51 opr <=(self, other:ZZ32): Boolean 50 52 opr >(self, other:ZZ32): Boolean 53 opr >=(self, other:ZZ32): Boolean 51 54 opr =(self, other:ZZ32): Boolean 52 55 opr juxtaposition(self, other:ZZ32): ZZ32 … … 59 62 60 63 trait 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 61 77 end 62 78 -
trunk/ProjectFortress/LibraryBuiltin/CompilerBuiltin.fss
r3966 r4087 28 28 simpleIntArith.intLE => jIntLE, 29 29 simpleIntArith.intGT => jIntGT, 30 simpleIntArith.intGE => jIntGE, 30 31 simpleIntArith.intEQ => jIntEQ, 31 32 simpleIntArith.intNeg => jIntNeg, 32 simpleIntArith.parseInt => jParseInt} 33 simpleIntArith.parseInt => jParseInt, 34 simpleIntArith.intAbs => jIntAbs} 35 import 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} 33 48 import AnyType.{Any} 34 49 export CompilerBuiltin … … 38 53 39 54 trait String 55 asString(): String = self 40 56 opr ||(self, b:String): String = jConcatenate(self, b) 57 opr juxtaposition(self, b:String): String = jConcatenate(self, b) 41 58 end 42 59 … … 45 62 46 63 println(s:String):() = jPrintln(s) 47 printlnZZ32(x:ZZ32):() = jPrintln ZZ32(x)64 printlnZZ32(x:ZZ32):() = jPrintln(x.asString()) 48 65 49 66 strToInt(s:String):ZZ32 = jParseInt(s) … … 57 74 trait ZZ32 extends ZZ64 comprises { IntLiteral } 58 75 asString(): String = jIntToString(self) 59 opr STR(self): String = jIntToString(self)76 opr |self| : ZZ32 = jIntAbs(self) 60 77 opr -(self): ZZ32 = jIntNeg(self) 61 78 opr +(self, other:ZZ32): ZZ32 = jIntAdd(self,other) … … 64 81 opr <=(self, other:ZZ32): Boolean = jIntLE(self,other) 65 82 opr >(self, other:ZZ32): Boolean = jIntGT(self,other) 83 opr >=(self, other:ZZ32): Boolean = jIntGE(self,other) 66 84 opr =(self, other:ZZ32): Boolean = jIntEQ(self,other) 67 85 opr juxtaposition(self, other:ZZ32): ZZ32 = jIntMul(self,other) … … 74 92 75 93 trait 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) 76 107 end 77 108

