[project @ 2000-08-07 23:37:19 by qrczak]
Now Char, Char#, StgChar have 31 bits (physically 32). "foo"# is still an array of bytes. CharRep represents 32 bits (on a 64-bit arch too). There is also Int8Rep, used in those places where bytes were originally meant. readCharArray, indexCharOffAddr etc. still use bytes. Storable and {I,M}Array use wide Chars. In future perhaps all sized integers should be primitive types. Then some usages of indexing primops scattered through the code could be changed to then-available Int8 ones, and then Char variants of primops could be made wide (other usages that handle text should use conversion that will be provided later). I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used for string literals (only). Z-encoding is ready for Unicode identifiers. Ranges of intlike and charlike closures are more easily configurable. I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I don't know the Alpha assembler to fix it (what is zapnot?). Generally I'm not sure if I've done the NCG changes right. This commit breaks the binary compatibility (of course). TODO: * is* and to{Lower,Upper} in Char (in progress). * Libraries for text conversion (in design / experiments), to be plugged to I/O and a higher level foreign library. * PackedString. * StringBuffer and accepting source in encodings other than ISO-8859-1.
Showing
- ghc/compiler/HsVersions.h 4 additions, 0 deletionsghc/compiler/HsVersions.h
- ghc/compiler/absCSyn/AbsCSyn.lhs 2 additions, 2 deletionsghc/compiler/absCSyn/AbsCSyn.lhs
- ghc/compiler/absCSyn/CStrings.lhs 13 additions, 58 deletionsghc/compiler/absCSyn/CStrings.lhs
- ghc/compiler/absCSyn/PprAbsC.lhs 6 additions, 6 deletionsghc/compiler/absCSyn/PprAbsC.lhs
- ghc/compiler/basicTypes/Literal.lhs 12 additions, 12 deletionsghc/compiler/basicTypes/Literal.lhs
- ghc/compiler/basicTypes/MkId.lhs 13 additions, 2 deletionsghc/compiler/basicTypes/MkId.lhs
- ghc/compiler/basicTypes/OccName.lhs 6 additions, 7 deletionsghc/compiler/basicTypes/OccName.lhs
- ghc/compiler/basicTypes/Unique.lhs 2 additions, 2 deletionsghc/compiler/basicTypes/Unique.lhs
- ghc/compiler/codeGen/CgCon.lhs 18 additions, 8 deletionsghc/compiler/codeGen/CgCon.lhs
- ghc/compiler/codeGen/CgRetConv.lhs 2 additions, 1 deletionghc/compiler/codeGen/CgRetConv.lhs
- ghc/compiler/deSugar/DsExpr.lhs 1 addition, 1 deletionghc/compiler/deSugar/DsExpr.lhs
- ghc/compiler/deSugar/DsUtils.lhs 12 additions, 12 deletionsghc/compiler/deSugar/DsUtils.lhs
- ghc/compiler/hsSyn/HsBasic.lhs 6 additions, 6 deletionsghc/compiler/hsSyn/HsBasic.lhs
- ghc/compiler/hsSyn/HsCore.lhs 2 additions, 2 deletionsghc/compiler/hsSyn/HsCore.lhs
- ghc/compiler/javaGen/Java.lhs 1 addition, 1 deletionghc/compiler/javaGen/Java.lhs
- ghc/compiler/javaGen/JavaGen.lhs 6 additions, 0 deletionsghc/compiler/javaGen/JavaGen.lhs
- ghc/compiler/javaGen/PrintJava.lhs 1 addition, 1 deletionghc/compiler/javaGen/PrintJava.lhs
- ghc/compiler/main/Constants.lhs 5 additions, 0 deletionsghc/compiler/main/Constants.lhs
- ghc/compiler/nativeGen/AbsCStixGen.lhs 4 additions, 3 deletionsghc/compiler/nativeGen/AbsCStixGen.lhs
- ghc/compiler/nativeGen/MachCode.lhs 16 additions, 37 deletionsghc/compiler/nativeGen/MachCode.lhs
Loading
Please register or sign in to comment