You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
| 2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
| 2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
| 2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
| 2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
| 2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
| 2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
| 2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
| 2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Matthew F. <fl...@ml...> - 2006-05-06 09:28:47
|
Refactor MLton.Socket
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/net/inet-sock.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Net.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-06 16:28:46 UTC (rev 4463)
@@ -340,8 +340,8 @@
(* ../mlton/ptrace.sml *)
../mlton/rlimit.sig
../mlton/rlimit.sml
- (* ../mlton/socket.sig *)
- (* ../mlton/socket.sml *)
+ ../mlton/socket.sig
+ ../mlton/socket.sml
../mlton/syslog.sig
../mlton/syslog.sml
../mlton/vector.sig
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml 2006-05-06 16:28:46 UTC (rev 4463)
@@ -101,7 +101,7 @@
signature MLTON_RLIMIT = MLTON_RLIMIT
signature MLTON_RUSAGE = MLTON_RUSAGE
signature MLTON_SIGNAL = MLTON_SIGNAL
-(* signature MLTON_SOCKET = MLTON_SOCKET *)
+signature MLTON_SOCKET = MLTON_SOCKET
signature MLTON_SYSLOG = MLTON_SYSLOG
signature MLTON_TEXT_IO = MLTON_TEXT_IO
signature MLTON_THREAD = MLTON_THREAD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sig 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sig 2006-05-06 16:28:46 UTC (rev 4463)
@@ -42,7 +42,7 @@
structure Rlimit: MLTON_RLIMIT
structure Rusage: MLTON_RUSAGE
structure Signal: MLTON_SIGNAL
-(* structure Socket: MLTON_SOCKET *)
+ structure Socket: MLTON_SOCKET
structure Syslog: MLTON_SYSLOG
structure TextIO: MLTON_TEXT_IO
structure Thread: MLTON_THREAD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-06 16:28:46 UTC (rev 4463)
@@ -63,7 +63,7 @@
structure Rlimit = MLtonRlimit
structure Rusage = MLtonRusage
structure Signal = MLtonSignal
-(* structure Socket = MLtonSocket *)
+structure Socket = MLtonSocket
structure Syslog = MLtonSyslog
structure TextIO = MLtonIO (TextIO)
structure Thread = MLtonThread
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sig 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sig 2006-05-06 16:28:46 UTC (rev 4463)
@@ -6,14 +6,11 @@
* See the file MLton-LICENSE for details.
*)
-type int = Int.int
-type word = Word.word
-
signature MLTON_SOCKET =
sig
structure Address:
sig
- type t = word
+ type t
end
structure Ctl:
@@ -33,7 +30,7 @@
structure Port:
sig
- type t = int
+ type t
end
type t
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sml 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/socket.sml 2006-05-06 16:28:46 UTC (rev 4463)
@@ -16,7 +16,7 @@
structure Address =
struct
- type t = word
+ type t = NetHostDB.in_addr
end
structure Host =
@@ -26,7 +26,7 @@
val get: NetHostDB.entry option -> t option =
Option.map (fn entry => {name = NetHostDB.name entry})
- val getByAddress = get o NetHostDB.getByAddr o NetHostDB.wordToInAddr
+ val getByAddress = get o NetHostDB.getByAddr
val getByName = get o NetHostDB.getByName
end
@@ -75,7 +75,7 @@
val (in_addr: NetHostDB.in_addr, port: int) = INetSock.fromAddr addr
val (ins, out) = sockToIO sock
in
- (NetHostDB.inAddrToWord in_addr, port, ins, out)
+ (in_addr, port, ins, out)
end
fun connect (host, port) =
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb 2006-05-06 16:28:46 UTC (rev 4463)
@@ -33,7 +33,7 @@
signature MLTON_RLIMIT
signature MLTON_RUSAGE
signature MLTON_SIGNAL
- (* signature MLTON_SOCKET *)
+ signature MLTON_SOCKET
signature MLTON_SYSLOG
signature MLTON_TEXT_IO
signature MLTON_THREAD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/net/inet-sock.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/net/inet-sock.sml 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/net/inet-sock.sml 2006-05-06 16:28:46 UTC (rev 4463)
@@ -18,23 +18,29 @@
val inetAF = PrimitiveFFI.Socket.AF.INET
fun toAddr (in_addr, port) =
- if port < 0 orelse port >= 0x10000
- then PosixError.raiseSys PosixError.inval
- else let
- val port = Net.C_Int.hton (C_Int.fromInt port)
- val (sa, salen, finish) = Socket.new_sock_addr ()
- val _ = Prim.toAddr (NetHostDB.inAddrToWord8Vector in_addr,
- port, sa, salen)
- in
- finish ()
- end
+ let
+ val port = C_Int.fromInt port
+ val port = Net.C_Int.hton port
+ in
+ if C_Int.< (port, 0) orelse C_Int.>= (port, 0x10000)
+ then PosixError.raiseSys PosixError.inval
+ else let
+ val (sa, salen, finish) = Socket.new_sock_addr ()
+ val _ = Prim.toAddr (NetHostDB.inAddrToWord8Vector in_addr,
+ port, sa, salen)
+ in
+ finish ()
+ end
+ end
fun any port = toAddr (NetHostDB.any (), port)
fun fromAddr sa =
let
- val _ = Prim.fromAddr (Socket.unpackSockAddr sa)
- val port = C_Int.toInt (Net.C_Int.ntoh (Prim.getPort ()))
+ val () = Prim.fromAddr (Socket.unpackSockAddr sa)
+ val port = Prim.getPort ()
+ val port = Net.C_Int.ntoh port
+ val port = C_Int.toInt port
val (ia, finish) = NetHostDB.new_in_addr ()
val _ = Prim.getInAddr (NetHostDB.preInAddrToWord8Array ia)
in
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Net.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Net.c 2006-05-06 15:35:55 UTC (rev 4462)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Net.c 2006-05-06 16:28:46 UTC (rev 4463)
@@ -1,17 +1,33 @@
#include "platform.h"
+#ifndef DEBUG
+#define DEBUG FALSE
+#endif
+
Word32_t Net_htonl (Word32_t w) {
- return htonl (w);
+ Word32_t r = htonl (w);
+ if (DEBUG)
+ printf ("%"PRIx32" = Net_htonl (%"PRIx32")\n", r, w);
+ return r;
}
Word32_t Net_ntohl (Word32_t w) {
- return ntohl (w);
+ Word32_t r = ntohl (w);
+ if (DEBUG)
+ printf ("%"PRIx32" = Net_ntohl (%"PRIx32")\n", r, w);
+ return r;
}
Word16_t Net_htons (Word16_t w) {
- return htons (w);
+ Word16_t r = htons (w);
+ if (DEBUG)
+ printf ("%"PRIx16" = Net_htonl (%"PRIx16")\n", r, w);
+ return r;
}
Word16_t Net_ntohs (Word16_t w) {
- return ntohs (w);
+ Word16_t r = ntohs (w);
+ if (DEBUG)
+ printf ("%"PRIx16" = Net_ntohl (%"PRIx16")\n", r, w);
+ return r;
}
|
|
From: Matthew F. <fl...@ml...> - 2006-05-06 08:35:56
|
Bugfixes for signal masks
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/signal.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/signal.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/signal.sml 2006-05-06 02:31:26 UTC (rev 4461)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/signal.sml 2006-05-06 15:35:55 UTC (rev 4462)
@@ -29,7 +29,11 @@
val validSignals =
Array.tabulate
(C_Int.toInt Prim.NSIG, fn i =>
- (C_Errno.check (Prim.sigismember(fromInt i))) <> (C_Int.fromInt ~1))
+ SysCall.syscallErr
+ ({clear = false, restart = false, errVal = C_Int.fromInt ~1}, fn () =>
+ {return = Prim.sigismember (fromInt i),
+ post = fn _ => true,
+ handlers = [(Error.inval, fn () => false)]}))
structure Mask =
struct
@@ -48,9 +52,16 @@
(Array.foldri
(fn (i, b, sigs) =>
if b
- then if (C_Errno.check (Prim.sigismember(fromInt i))) = (C_Int.fromInt ~1)
- then sigs
- else (fromInt i)::sigs
+ then let
+ val s = fromInt i
+ val res =
+ SysCall.simpleResult
+ (fn () => Prim.sigismember s)
+ in
+ if res = C_Int.fromInt 1
+ then s::sigs
+ else sigs
+ end
else sigs)
[]
validSignals)
@@ -101,11 +112,11 @@
val r = ref false
in
fun initHandler (s: signal): Handler.t =
- if C_Errno.check (Prim.isDefault (s, r)) = C_Int.fromInt 0
- then if !r
- then Default
- else Ignore
- else InvalidSignal
+ SysCall.syscallErr
+ ({clear = false, restart = false, errVal = C_Int.fromInt ~1}, fn () =>
+ {return = Prim.isDefault (s, r),
+ post = fn _ => if !r then Default else Ignore,
+ handlers = [(Error.inval, fn () => InvalidSignal)]})
end
val (getHandler, setHandler, handlers) =
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml 2006-05-06 02:31:26 UTC (rev 4461)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml 2006-05-06 15:35:55 UTC (rev 4462)
@@ -168,7 +168,7 @@
handle Overflow => Error.raiseSys Error.inval)))
in
val alarm = wrap Prim.alarm
-(* val sleep = wrap Prim.sleep *)
+ (* val sleep = wrap Prim.sleep *)
end
fun sleep (t: Time.time): Time.time =
|
|
From: Matthew F. <fl...@ml...> - 2006-05-05 19:31:27
|
Relaxing type constraints
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig 2006-05-05 02:48:10 UTC (rev 4460)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig 2006-05-06 02:31:26 UTC (rev 4461)
@@ -362,10 +362,6 @@
sharing type list = List.list
*)
- sharing type int = Int32.int
- (* sharing type real = Real64.real *)
- sharing type word = Word32.word
-
(* Required structures *)
(*
sharing type BinIO.StreamIO.elem = Word8.word
@@ -644,11 +640,13 @@
where type 'a vector = 'a vector
where type char = char
where type exn = exn
+ where type int = int
where type order = order
where type real = real
where type string = string
where type substring = substring
where type unit = unit
+ where type word = word
(* Types referenced in signatures by structure name *)
(*
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sml 2006-05-05 02:48:10 UTC (rev 4460)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sml 2006-05-06 02:31:26 UTC (rev 4461)
@@ -256,7 +256,6 @@
OptionGlobal
RealGlobal
StringGlobal
- RealGlobal
SubstringGlobal
TextIOGlobal
VectorGlobal
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 19:48:12
|
Relaxing type sharing constraints; not working completely yet
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-2002/top-level/basis.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/primitive.mlb
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile 2006-05-05 02:48:10 UTC (rev 4460)
@@ -47,7 +47,7 @@
-mlb-path-map "maps/$$defint" \
-mlb-path-map "maps/$$defreal" \
-mlb-path-map "maps/$$defword" \
- build/sources.mlb; \
+ libs/all.mlb; \
done; done; done; done; done; done; done
.PHONY: type-check
@@ -70,5 +70,5 @@
-mlb-path-map "maps/$$defint" \
-mlb-path-map "maps/$$defreal" \
-mlb-path-map "maps/$$defword" \
- build/sources.mlb; \
+ libs/all.mlb; \
done; done; done; done; done; done; done; done
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-05 02:48:10 UTC (rev 4460)
@@ -21,7 +21,7 @@
../integer/word0.sml
local
../config/bind/int-prim.sml
- (* ../config/bind/pointer-prim.sml *)
+ ../config/bind/pointer-prim.sml
../config/bind/real-prim.sml
../config/bind/word-prim.sml
in ann "forceUsed" in
@@ -113,7 +113,7 @@
../integer/word.sml
local
../config/bind/int-top.sml
- (* ../config/bind/pointer-prim.sml *)
+ ../config/bind/pointer-prim.sml
../config/bind/real-prim.sml
../config/bind/word-top.sml
in ann "forceUsed" in
@@ -146,7 +146,7 @@
../integer/pack-word.sml
local
../config/bind/int-top.sml
- (* ../config/bind/pointer-prim.sml *)
+ ../config/bind/pointer-prim.sml
../config/bind/real-prim.sml
../config/bind/word-top.sml
in ann "forceUsed" in
@@ -191,7 +191,7 @@
../real/pack-real.sml
local
../config/bind/int-top.sml
- (* ../config/bind/pointer-prim.sml *)
+ ../config/bind/pointer-prim.sml
../config/bind/real-top.sml
../config/bind/word-top.sml
in ann "forceUsed" in
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int.sml 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int.sml 2006-05-05 02:48:10 UTC (rev 4460)
@@ -6,7 +6,7 @@
* See the file MLton-LICENSE for details.
*)
-functor Integer (I: PRE_INTEGER_EXTRA) : INTEGER_EXTRA =
+functor Integer (I: PRE_INTEGER_EXTRA): INTEGER_EXTRA =
struct
open I
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-2002/top-level/basis.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-2002/top-level/basis.sig 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-2002/top-level/basis.sig 2006-05-05 02:48:10 UTC (rev 4460)
@@ -328,29 +328,31 @@
(* Can't use sharing on type array or vector, because they are rigid tycons.
* Don't need it anyways, since it's built into the ARRAY and VECTOR signatures.
*)
-(* sharing type array = Array.array *)
-(* sharing type vector = Vector.vector *)
- (*
+(*
+ sharing type array = Array.array
+ sharing type vector = Vector.vector
+*)
+(*
sharing type ref = General.ref
- *)
- (*
+*)
+(*
sharing type bool = Bool.bool
- *)
+*)
sharing type option = Option.option
sharing type order = General.order
- (*
+(*
sharing type list = List.list
- *)
+*)
- sharing type int = Int32.int
- sharing type real = Real64.real
- sharing type word = Word32.word
-
(* Required structures *)
-(* sharing type BinIO.StreamIO.elem = Word8.word *)
+(*
+ sharing type BinIO.StreamIO.elem = Word8.word
+*)
sharing type BinIO.StreamIO.reader = BinPrimIO.reader
sharing type BinIO.StreamIO.pos = BinPrimIO.pos
-(* sharing type BinIO.StreamIO.vector = Word8Vector.vector *)
+(*
+ sharing type BinIO.StreamIO.vector = Word8Vector.vector
+*)
sharing type BinIO.StreamIO.writer = BinPrimIO.writer
sharing type BinPrimIO.array = Word8Array.array
sharing type BinPrimIO.array_slice = Word8ArraySlice.slice
@@ -387,15 +389,18 @@
sharing type Text.CharArray.array = CharArray.array
sharing type Text.CharArraySlice.slice = CharArraySlice.slice
sharing type Text.CharVectorSlice.slice = CharVectorSlice.slice
-(* redundant *)
-(* sharing type TextIO.elem = char *)
-(* sharing type TextIO.vector = string *)
+ (* redundant *)
+(*
+ sharing type TextIO.elem = char
+ sharing type TextIO.vector = string
+*)
sharing type TextPrimIO.array = CharArray.array
sharing type TextPrimIO.array_slice = CharArraySlice.slice
sharing type TextPrimIO.elem = Char.char
sharing type TextPrimIO.pos = Position.int
sharing type TextPrimIO.vector = CharVector.vector
sharing type TextPrimIO.vector_slice = CharVectorSlice.slice
+ sharing type Word.word = word
sharing type Word8Array.elem = Word8.word
sharing type Word8Array.vector = Word8Vector.vector
sharing type Word8ArraySlice.elem = Word8.word
@@ -450,7 +455,6 @@
sharing type Int16VectorSlice.vector = Int16Vector.vector
sharing type Int16Array2.elem = Int16.int
sharing type Int16Array2.vector = Int16Vector.vector
- sharing type Int32.int = Int.int
sharing type Int32Array.elem = Int32.int
sharing type Int32Array.vector = Int32Vector.vector
sharing type Int32ArraySlice.elem = Int32.int
@@ -574,7 +578,6 @@
sharing type Word16VectorSlice.vector = Word16Vector.vector
sharing type Word16Array2.elem = Word16.word
sharing type Word16Array2.vector = Word16Vector.vector
- sharing type Word32.word = Word.word
sharing type Word32Array.elem = Word32.word
sharing type Word32Array.vector = Word32Vector.vector
sharing type Word32ArraySlice.elem = Word32.word
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis.sig 2006-05-05 02:48:10 UTC (rev 4460)
@@ -363,7 +363,7 @@
*)
sharing type int = Int32.int
- sharing type real = Real64.real
+ (* sharing type real = Real64.real *)
sharing type word = Word32.word
(* Required structures *)
@@ -411,7 +411,7 @@
sharing type Text.CharArray.array = CharArray.array
sharing type Text.CharArraySlice.slice = CharArraySlice.slice
sharing type Text.CharVectorSlice.slice = CharVectorSlice.slice
-(* redundant *)
+ (* redundant *)
(*
sharing type TextIO.elem = char
sharing type TextIO.vector = string
@@ -422,6 +422,7 @@
sharing type TextPrimIO.pos = Position.int
sharing type TextPrimIO.vector = CharVector.vector
sharing type TextPrimIO.vector_slice = CharVectorSlice.slice
+ sharing type Word.word = word
sharing type Word8Array.elem = Word8.word
sharing type Word8Array.vector = Word8Vector.vector
sharing type Word8ArraySlice.elem = Word8.word
@@ -476,7 +477,6 @@
sharing type Int16VectorSlice.vector = Int16Vector.vector
sharing type Int16Array2.elem = Int16.int
sharing type Int16Array2.vector = Int16Vector.vector
- sharing type Int32.int = Int.int
sharing type Int32Array.elem = Int32.int
sharing type Int32Array.vector = Int32Vector.vector
sharing type Int32ArraySlice.elem = Int32.int
@@ -600,7 +600,6 @@
sharing type Word16VectorSlice.vector = Word16Vector.vector
sharing type Word16Array2.elem = Word16.word
sharing type Word16Array2.vector = Word16Vector.vector
- sharing type Word32.word = Word.word
sharing type Word32Array.elem = Word32.word
sharing type Word32Array.vector = Word32Vector.vector
sharing type Word32ArraySlice.elem = Word32.word
@@ -740,6 +739,7 @@
where type Int64.int = Int64.int
where type IntInf.int = IntInf.int
where type Real32.real = Real32.real
+ where type Real64.real = Real64.real
where type Word1.word = Word1.word
where type Word2.word = Word2.word
where type Word3.word = Word3.word
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-05 02:48:10 UTC (rev 4460)
@@ -72,7 +72,7 @@
structure World = MLtonWorld
structure Word =
struct
- open Word32
+ open Word
type t = word
end
structure Word8 =
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/primitive.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/primitive.mlb 2006-05-05 01:03:36 UTC (rev 4459)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/primitive.mlb 2006-05-05 02:48:10 UTC (rev 4460)
@@ -38,7 +38,7 @@
local
../config/bind/int-prim.sml
- (* ../config/bind/pointer-prim.sml *)
+ ../config/bind/pointer-prim.sml
../config/bind/real-prim.sml
../config/bind/word-prim.sml
in ann "forceUsed" in
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 18:03:38
|
Declare MLton.Pointer.t to be the primitive pointer tycon; needed for _import * and _symbol * type checking
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/error.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/file-sys.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-basis.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sml
U mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-export.c
U mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-import.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/Makefile 2006-05-05 01:03:36 UTC (rev 4459)
@@ -29,6 +29,27 @@
DEFAULT_REAL_MAPS = default-real32.map default-real64.map
DEFAULT_WORD_MAPS = default-word32.map default-word64.map
+.PHONY: type-check-one
+type-check-one:
+ for objptrrep in objptr-rep32.map; do \
+ for header in header-word32.map; do \
+ for seqindex in seqindex-int32.map; do \
+ for defchar in default-char8.map; do \
+ for defint in default-int32.map; do \
+ for defreal in default-real64.map; do \
+ for defword in default-word32.map; do \
+ echo "Type checking: $$objptrrep $$header $$seqindex $$ctypes $$defchar $$defint $$defreal $$defword"; \
+ $(MLTON) -disable-ann deadCode -stop tc -show-types true \
+ -mlb-path-map "maps/$$objptrrep" \
+ -mlb-path-map "maps/$$header" \
+ -mlb-path-map "maps/$$seqindex" \
+ -mlb-path-map "maps/$$defchar" \
+ -mlb-path-map "maps/$$defint" \
+ -mlb-path-map "maps/$$defreal" \
+ -mlb-path-map "maps/$$defword" \
+ build/sources.mlb; \
+ done; done; done; done; done; done; done
+
.PHONY: type-check
type-check:
for objptrrep in $(OBJPTR_MAPS); do \
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/error.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/error.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/error.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -208,9 +208,10 @@
let
val cs = strError n
in
- if Primitive.MLton.Pointer.isNull cs
+ if Primitive.MLton.Pointer.isNull
+ (Primitive.MLton.Pointer.fromWord cs)
then "Unknown error"
- else CUtil.C_String.toString cs
+ else CUtil.C_String.toString cs
end
fun raiseSys n = raise SysErr (errorMsg n, SOME n)
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/file-sys.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/file-sys.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/file-sys.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -70,7 +70,8 @@
let
val res =
SysCall.syscallErr
- ({clear = true, restart = false, errVal = Primitive.MLton.Pointer.null}, fn () =>
+ ({clear = true, restart = false,
+ errVal = CUtil.C_Pointer.null}, fn () =>
{return = Prim.readDir d,
post = fn cs => SOME cs,
handlers = [(Error.cleared, fn () => NONE),
@@ -132,7 +133,8 @@
let
val res =
SysCall.syscallErr
- ({clear = false, restart = false, errVal = Primitive.MLton.Pointer.null}, fn () =>
+ ({clear = false, restart = false,
+ errVal = CUtil.C_Pointer.null}, fn () =>
{return = Prim.getcwd (!buffer, C_Size.fromInt (!size)),
post = fn _ => true,
handlers = [(Error.range, fn _ => false)]})
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -53,7 +53,7 @@
fun getlogin () =
SysCall.syscall'
- ({errVal = Primitive.MLton.Pointer.null}, fn () =>
+ ({errVal = CUtil.C_Pointer.null}, fn () =>
(Prim.getlogin (), fn cs =>
CS.toString cs))
@@ -242,7 +242,7 @@
let
val cs = Prim.getenv (NullString.nullTerm name)
in
- if Primitive.MLton.Pointer.isNull cs
+ if CUtil.C_Pointer.isNull cs
then NONE
else SOME (CS.toString cs)
end
@@ -253,7 +253,7 @@
fun ttyname fd =
SysCall.syscall'
- ({errVal = Primitive.MLton.Pointer.null}, fn () =>
+ ({errVal = CUtil.C_Pointer.null}, fn () =>
(Prim.ttyname fd, fn cs =>
CS.toString cs))
end
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-basis.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-basis.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-basis.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -432,12 +432,10 @@
end
(* Primitive Basis (MLton Extensions) *)
-(*
structure Pointer =
struct
type t = pointer
end
-*)
structure Thread =
struct
type t = thread
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -25,42 +25,6 @@
val installSignalHandler =
_prim "MLton_installSignalHandler": unit -> unit;
-structure Pointer =
- struct
- (* open Pointer *)
- type t = C_Pointer.t
-
- val fromWord = fn x => x
- val toWord = fn x => x
-
- val null: t = fromWord 0w0
-
- fun isNull p = p = null
-
- val getInt8 = _prim "Pointer_getWord8": t * C_Ptrdiff.t -> Int8.int;
- val getInt16 = _prim "Pointer_getWord16": t * C_Ptrdiff.t -> Int16.int;
- val getInt32 = _prim "Pointer_getWord32": t * C_Ptrdiff.t -> Int32.int;
- val getInt64 = _prim "Pointer_getWord64": t * C_Ptrdiff.t -> Int64.int;
- val getPointer = _prim "Pointer_getPointer": t * C_Ptrdiff.t -> 'a;
- val getReal32 = _prim "Pointer_getReal32": t * C_Ptrdiff.t -> Real32.real;
- val getReal64 = _prim "Pointer_getReal64": t * C_Ptrdiff.t -> Real64.real;
- val getWord8 = _prim "Pointer_getWord8": t * C_Ptrdiff.t -> Word8.word;
- val getWord16 = _prim "Pointer_getWord16": t * C_Ptrdiff.t -> Word16.word;
- val getWord32 = _prim "Pointer_getWord32": t * C_Ptrdiff.t -> Word32.word;
- val getWord64 = _prim "Pointer_getWord64": t * C_Ptrdiff.t -> Word64.word;
- val setInt8 = _prim "Pointer_setWord8": t * C_Ptrdiff.t * Int8.int -> unit;
- val setInt16 = _prim "Pointer_setWord16": t * C_Ptrdiff.t * Int16.int -> unit;
- val setInt32 = _prim "Pointer_setWord32": t * C_Ptrdiff.t * Int32.int -> unit;
- val setInt64 = _prim "Pointer_setWord64": t * C_Ptrdiff.t * Int64.int -> unit;
- val setPointer = _prim "Pointer_setPointer": t * C_Ptrdiff.t * 'a -> unit;
- val setReal32 = _prim "Pointer_setReal32": t * C_Ptrdiff.t * Real32.real -> unit;
- val setReal64 = _prim "Pointer_setReal64": t * C_Ptrdiff.t * Real64.real -> unit;
- val setWord8 = _prim "Pointer_setWord8": t * C_Ptrdiff.t * Word8.word -> unit;
- val setWord16 = _prim "Pointer_setWord16": t * C_Ptrdiff.t * Word16.word -> unit;
- val setWord32 = _prim "Pointer_setWord32": t * C_Ptrdiff.t * Word32.word -> unit;
- val setWord64 = _prim "Pointer_setWord64": t * C_Ptrdiff.t * Word64.word -> unit;
- end
-
structure GCState =
struct
type t = Pointer.t
@@ -224,6 +188,62 @@
end
end
+structure Pointer =
+ struct
+ open Pointer
+ type pointer = t
+
+ local
+ structure S =
+ C_Pointer_ChooseWordN
+ (type 'a t = 'a -> t
+ val fWord8 = _prim "WordU8_toWord8": Primitive.Word8.word -> pointer;
+ val fWord16 = _prim "WordU16_toWord16": Primitive.Word16.word -> pointer;
+ val fWord32 = _prim "WordU32_toWord32": Primitive.Word32.word -> pointer;
+ val fWord64 = _prim "WordU64_toWord64": Primitive.Word64.word -> pointer;)
+ in
+ val fromWord = S.f
+ end
+ local
+ structure S =
+ C_Pointer_ChooseWordN
+ (type 'a t = t -> 'a
+ val fWord8 = _prim "WordU8_toWord8": pointer -> Primitive.Word8.word;
+ val fWord16 = _prim "WordU16_toWord16": pointer -> Primitive.Word16.word;
+ val fWord32 = _prim "WordU32_toWord32": pointer -> Primitive.Word32.word;
+ val fWord64 = _prim "WordU64_toWord64": pointer -> Primitive.Word64.word;)
+ in
+ val toWord = S.f
+ end
+
+ val null: t = fromWord 0w0
+
+ fun isNull p = p = null
+
+ val getInt8 = _prim "Pointer_getWord8": t * C_Ptrdiff.t -> Int8.int;
+ val getInt16 = _prim "Pointer_getWord16": t * C_Ptrdiff.t -> Int16.int;
+ val getInt32 = _prim "Pointer_getWord32": t * C_Ptrdiff.t -> Int32.int;
+ val getInt64 = _prim "Pointer_getWord64": t * C_Ptrdiff.t -> Int64.int;
+ val getPointer = _prim "Pointer_getPointer": t * C_Ptrdiff.t -> 'a;
+ val getReal32 = _prim "Pointer_getReal32": t * C_Ptrdiff.t -> Real32.real;
+ val getReal64 = _prim "Pointer_getReal64": t * C_Ptrdiff.t -> Real64.real;
+ val getWord8 = _prim "Pointer_getWord8": t * C_Ptrdiff.t -> Word8.word;
+ val getWord16 = _prim "Pointer_getWord16": t * C_Ptrdiff.t -> Word16.word;
+ val getWord32 = _prim "Pointer_getWord32": t * C_Ptrdiff.t -> Word32.word;
+ val getWord64 = _prim "Pointer_getWord64": t * C_Ptrdiff.t -> Word64.word;
+ val setInt8 = _prim "Pointer_setWord8": t * C_Ptrdiff.t * Int8.int -> unit;
+ val setInt16 = _prim "Pointer_setWord16": t * C_Ptrdiff.t * Int16.int -> unit;
+ val setInt32 = _prim "Pointer_setWord32": t * C_Ptrdiff.t * Int32.int -> unit;
+ val setInt64 = _prim "Pointer_setWord64": t * C_Ptrdiff.t * Int64.int -> unit;
+ val setPointer = _prim "Pointer_setPointer": t * C_Ptrdiff.t * 'a -> unit;
+ val setReal32 = _prim "Pointer_setReal32": t * C_Ptrdiff.t * Real32.real -> unit;
+ val setReal64 = _prim "Pointer_setReal64": t * C_Ptrdiff.t * Real64.real -> unit;
+ val setWord8 = _prim "Pointer_setWord8": t * C_Ptrdiff.t * Word8.word -> unit;
+ val setWord16 = _prim "Pointer_setWord16": t * C_Ptrdiff.t * Word16.word -> unit;
+ val setWord32 = _prim "Pointer_setWord32": t * C_Ptrdiff.t * Word32.word -> unit;
+ val setWord64 = _prim "Pointer_setWord64": t * C_Ptrdiff.t * Word64.word -> unit;
+ end
+
structure Profile =
struct
val isOn = _build_const "MLton_Profile_isOn": bool;
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sig 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sig 2006-05-05 01:03:36 UTC (rev 4459)
@@ -8,6 +8,14 @@
signature C_UTIL =
sig
+ structure C_Pointer :
+ sig
+ type t = C_Pointer.t
+
+ val null: t
+ val isNull: t -> bool
+ end
+
(* C char* *)
structure C_String :
sig
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sml 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/util/CUtil.sml 2006-05-05 01:03:36 UTC (rev 4459)
@@ -9,6 +9,8 @@
structure CUtil: C_UTIL =
struct
open Int
+
+ structure Pointer = Primitive.MLton.Pointer
fun makeLength (sub, term) p =
let
@@ -34,17 +36,26 @@
a
end
+ structure C_Pointer =
+ struct
+ type t = C_Pointer.t
+ val null = Pointer.toWord Pointer.null
+ fun isNull p = p = null
+ end
+
structure C_String =
struct
type t = C_String.t
fun sub (cs, i) =
Primitive.Char8.fromWord8Unsafe
- (Primitive.MLton.Pointer.getWord8 (cs, C_Ptrdiff.fromInt i))
+ (Pointer.getWord8
+ (Pointer.fromWord cs, C_Ptrdiff.fromInt i))
fun update (cs, i, c) =
- Primitive.MLton.Pointer.setWord8
- (cs, C_Ptrdiff.fromInt i, Primitive.Char8.toWord8Unsafe c)
+ Pointer.setWord8
+ (Pointer.fromWord cs, C_Ptrdiff.fromInt i,
+ Primitive.Char8.toWord8Unsafe c)
fun toCharArrayOfLength (cs, n) = toArrayOfLength (cs, sub, n)
@@ -61,9 +72,10 @@
type t = C_StringArray.t
fun sub (css: t, i) =
- Primitive.MLton.Pointer.getPointer (css, C_Ptrdiff.fromInt i)
+ Pointer.getPointer
+ (Pointer.fromWord css, C_Ptrdiff.fromInt i)
- val length = makeLength (sub, Primitive.MLton.Pointer.isNull)
+ val length = makeLength (sub, Pointer.isNull)
val toArrayOfLength =
fn (css, n) => toArrayOfLength (css, C_String.toString o sub, n)
Modified: mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-export.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-export.c 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-export.c 2006-05-05 01:03:36 UTC (rev 4459)
@@ -2,7 +2,7 @@
#include "export.h"
void g () {
- Char c;
+ Char8 c;
fprintf (stderr, "g starting\n");
c = f (13, 17.15, 'a');
@@ -23,7 +23,7 @@
fprintf (stderr, "g3 done\n");
}
-void g4 (Int i) {
+void g4 (Int32 i) {
fprintf (stderr, "g4 (%d)\n", i);
f4 (i);
}
Modified: mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-import.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-import.c 2006-05-04 20:43:20 UTC (rev 4458)
+++ mlton/branches/on-20050822-x86_64-branch/doc/examples/ffi/ffi-import.c 2006-05-05 01:03:36 UTC (rev 4459)
@@ -1,18 +1,18 @@
#include "platform.h"
-Int FFI_INT = 13;
-Word FFI_WORD = 0xFF;
+Int32 FFI_INT = 13;
+Word32 FFI_WORD = 0xFF;
Bool FFI_BOOL = TRUE;
-Real FFI_REAL = 3.14159;
+Real64 FFI_REAL = 3.14159;
-Char ffi (Pointer a1, Pointer a2, Int n) {
+Char8 ffi (Pointer a1, Pointer a2, Int32 n) {
double *ds = (double*)a1;
int *p = (int*)a2;
int i;
double sum;
sum = 0.0;
- for (i = 0; i < GC_arrayNumElements (a1); ++i) {
+ for (i = 0; i < GC_getArrayLength (a1); ++i) {
sum += ds[i];
ds[i] += n;
}
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 13:43:22
|
Casts
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Stat.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetProtDB.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetServDB.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/UnixSock.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -5,7 +5,7 @@
}
C_Errno_t(C_DirP_t) Posix_FileSys_Dirstream_openDir (NullString8_t p) {
- DIR *res = opendir ((char *) p);
+ DIR *res = opendir ((const char *) p);
return (C_Errno_t(C_DirP_t))res;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Stat.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Stat.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Stat.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -61,7 +61,7 @@
}
C_Errno_t(C_Int_t) Posix_FileSys_Stat_lstat (NullString8_t f) {
- return lstat ((char*)f, &statbuf);
+ return lstat ((const char*)f, &statbuf);
}
C_Errno_t(C_Int_t) Posix_FileSys_Stat_stat (NullString8_t f) {
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -3,23 +3,23 @@
#if HAS_SPAWN
C_Errno_t(C_Int_t) MLton_Process_spawne (NullString8_t p, NullString8Array_t a, NullString8Array_t e) {
const char *path;
- char *asaved;
- char *esaved;
- char **args;
- char **env;
+ const char *asaved;
+ const char *esaved;
+ const char **args;
+ const char **env;
int an;
int en;
int res;
path = (const char *) p;
- args = (char **) a;
- env = (char **) e;
+ args = (const char **) a;
+ env = (const char **) e;
an = GC_arrayNumElements((pointer)a) - 1;
asaved = args[an];
en = GC_arrayNumElements((pointer)e) - 1;
esaved = env[en];
- args[an] = (char *) NULL;
- env[en] = (char *) NULL;
+ args[an] = (const char *) NULL;
+ env[en] = (const char *) NULL;
res = spawnve (SPAWN_MODE, path,
(const char * const *)args,
(const char * const *)env);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -3,16 +3,16 @@
#if HAS_SPAWN
C_Errno_t(C_Int_t) MLton_Process_spawnp (NullString8_t p, NullString8Array_t a) {
const char *file;
- char *asaved;
- char **args;
+ const char *asaved;
+ const char **args;
int an;
int res;
path = (const char *) p;
- args = (char **) a;
+ args = (const char **) a;
an = GC_arrayNumElements((pointer)a) - 1;
asaved = args[an];
- args[an] = (char *) NULL;
+ args[an] = (const char *) NULL;
result = spawnvp (SPAWN_MODE, path,
(const char * const *)args);
args[an] = asaved;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetProtDB.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetProtDB.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetProtDB.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -21,7 +21,7 @@
}
Bool_t NetProtDB_getByName(NullString8_t name) {
- protoent = getprotobyname((char*)name);
+ protoent = getprotobyname((const char*)name);
return (protoent != NULL and protoent->p_name != NULL);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetServDB.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetServDB.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/NetServDB.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -28,7 +28,7 @@
}
Bool_t NetServDB_getByName(NullString8_t name, NullString8_t proto) {
- servent = getservbyname((char*)name, (char*)proto);
+ servent = getservbyname((const char*)name, (const char*)proto);
return (servent != NULL and servent->s_name != NULL);
}
@@ -37,7 +37,7 @@
}
Bool_t NetServDB_getByPort(C_Int_t port, NullString8_t proto) {
- servent = getservbyport(port, (char*)proto);
+ servent = getservbyport(port, (const char*)proto);
return (servent != NULL and servent->s_name != NULL);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/UnixSock.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/UnixSock.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/UnixSock.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -36,7 +36,7 @@
void Socket_UnixSock_fromAddr (Vector(Word8_t) addr, Array(Char8_t) path, C_Size_t pathlen) {
size_t i;
- struct sockaddr_un *sa = (struct sockaddr_un*)addr;
+ const struct sockaddr_un *sa = (const struct sockaddr_un*)addr;
assert (sa->sun_family == AF_UNIX);
for (i = 0; i < pathlen; i++) {
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-04 20:24:20 UTC (rev 4457)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-04 20:43:20 UTC (rev 4458)
@@ -1,13 +1,13 @@
#include "platform.h"
-Real32_t gdtoa_strtof (char *s, char **endptr);
-Real64_t gdtoa_strtod (char *s, char **endptr);
+Real32_t gdtoa_strtof (const char *s, char **endptr);
+Real64_t gdtoa_strtod (const char *s, char **endptr);
Real32_t Real32_strto (NullString8_t s) {
char *endptr;
Real32_t res;
- res = gdtoa_strtof ((char*)s, &endptr);
+ res = gdtoa_strtof ((const char*)s, &endptr);
assert (NULL != endptr);
return res;
}
@@ -16,7 +16,7 @@
char *endptr;
Real64_t res;
- res = gdtoa_strtod ((char*)s, &endptr);
+ res = gdtoa_strtod ((const char*)s, &endptr);
assert (NULL != endptr);
return res;
}
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 13:24:24
|
_SC_IPV6 and _SC_RAW_SOCKETS don't exist on Linux 2.4
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Process/waitpid-consts.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml 2006-05-04 20:19:32 UTC (rev 4456)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/proc-env.sml 2006-05-04 20:24:20 UTC (rev 4457)
@@ -120,7 +120,7 @@
(Prim.SC_GETPW_R_SIZE_MAX,"GETPW_R_SIZE_MAX"),
(Prim.SC_HOST_NAME_MAX,"HOST_NAME_MAX"),
(Prim.SC_IOV_MAX,"IOV_MAX"),
- (Prim.SC_IPV6,"IPV6"),
+ (* (Prim.SC_IPV6,"IPV6"), *)
(Prim.SC_JOB_CONTROL,"JOB_CONTROL"),
(Prim.SC_LINE_MAX,"LINE_MAX"),
(Prim.SC_LOGIN_NAME_MAX,"LOGIN_NAME_MAX"),
@@ -138,7 +138,7 @@
(Prim.SC_PAGE_SIZE,"PAGE_SIZE"),
(Prim.SC_PRIORITIZED_IO,"PRIORITIZED_IO"),
(Prim.SC_PRIORITY_SCHEDULING,"PRIORITY_SCHEDULING"),
- (Prim.SC_RAW_SOCKETS,"RAW_SOCKETS"),
+ (* (Prim.SC_RAW_SOCKETS,"RAW_SOCKETS"), *)
(Prim.SC_READER_WRITER_LOCKS,"READER_WRITER_LOCKS"),
(Prim.SC_REALTIME_SIGNALS,"REALTIME_SIGNALS"),
(Prim.SC_REGEXP,"REGEXP"),
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 20:19:32 UTC (rev 4456)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 20:24:20 UTC (rev 4457)
@@ -596,7 +596,6 @@
val SC_GETPW_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETPW_R_SIZE_MAX" : C_Int.t;
val SC_HOST_NAME_MAX = _const "Posix_ProcEnv_SC_HOST_NAME_MAX" : C_Int.t;
val SC_IOV_MAX = _const "Posix_ProcEnv_SC_IOV_MAX" : C_Int.t;
-val SC_IPV6 = _const "Posix_ProcEnv_SC_IPV6" : C_Int.t;
val SC_JOB_CONTROL = _const "Posix_ProcEnv_SC_JOB_CONTROL" : C_Int.t;
val SC_LINE_MAX = _const "Posix_ProcEnv_SC_LINE_MAX" : C_Int.t;
val SC_LOGIN_NAME_MAX = _const "Posix_ProcEnv_SC_LOGIN_NAME_MAX" : C_Int.t;
@@ -614,7 +613,6 @@
val SC_PAGESIZE = _const "Posix_ProcEnv_SC_PAGESIZE" : C_Int.t;
val SC_PRIORITIZED_IO = _const "Posix_ProcEnv_SC_PRIORITIZED_IO" : C_Int.t;
val SC_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_PRIORITY_SCHEDULING" : C_Int.t;
-val SC_RAW_SOCKETS = _const "Posix_ProcEnv_SC_RAW_SOCKETS" : C_Int.t;
val SC_RE_DUP_MAX = _const "Posix_ProcEnv_SC_RE_DUP_MAX" : C_Int.t;
val SC_READER_WRITER_LOCKS = _const "Posix_ProcEnv_SC_READER_WRITER_LOCKS" : C_Int.t;
val SC_REALTIME_SIGNALS = _const "Posix_ProcEnv_SC_REALTIME_SIGNALS" : C_Int.t;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c 2006-05-04 20:19:32 UTC (rev 4456)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c 2006-05-04 20:24:20 UTC (rev 4457)
@@ -30,7 +30,7 @@
const C_Int_t Posix_ProcEnv_SC_CLOCK_SELECTION = _SC_CLOCK_SELECTION;
const C_Int_t Posix_ProcEnv_SC_CPUTIME = _SC_CPUTIME;
const C_Int_t Posix_ProcEnv_SC_FSYNC = _SC_FSYNC;
-const C_Int_t Posix_ProcEnv_SC_IPV6 = _SC_IPV6;
+// const C_Int_t Posix_ProcEnv_SC_IPV6 = _SC_IPV6;
const C_Int_t Posix_ProcEnv_SC_JOB_CONTROL = _SC_JOB_CONTROL;
const C_Int_t Posix_ProcEnv_SC_MAPPED_FILES = _SC_MAPPED_FILES;
const C_Int_t Posix_ProcEnv_SC_MEMLOCK = _SC_MEMLOCK;
@@ -40,7 +40,7 @@
const C_Int_t Posix_ProcEnv_SC_MONOTONIC_CLOCK = _SC_MONOTONIC_CLOCK;
const C_Int_t Posix_ProcEnv_SC_PRIORITIZED_IO = _SC_PRIORITIZED_IO;
const C_Int_t Posix_ProcEnv_SC_PRIORITY_SCHEDULING = _SC_PRIORITY_SCHEDULING;
-const C_Int_t Posix_ProcEnv_SC_RAW_SOCKETS = _SC_RAW_SOCKETS;
+// const C_Int_t Posix_ProcEnv_SC_RAW_SOCKETS = _SC_RAW_SOCKETS;
const C_Int_t Posix_ProcEnv_SC_READER_WRITER_LOCKS = _SC_READER_WRITER_LOCKS;
const C_Int_t Posix_ProcEnv_SC_REALTIME_SIGNALS = _SC_REALTIME_SIGNALS;
const C_Int_t Posix_ProcEnv_SC_REGEXP = _SC_REGEXP;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Process/waitpid-consts.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Process/waitpid-consts.c 2006-05-04 20:19:32 UTC (rev 4456)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Process/waitpid-consts.c 2006-05-04 20:24:20 UTC (rev 4457)
@@ -1,5 +1,5 @@
#include "platform.h"
-const C_Int_t Posix_Process_W_CONTINUED = WCONTINUED;
+// const C_Int_t Posix_Process_W_CONTINUED = WCONTINUED;
const C_Int_t Posix_Process_W_NOHANG = WNOHANG;
const C_Int_t Posix_Process_W_UNTRACED = WUNTRACED;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 20:19:32 UTC (rev 4456)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 20:24:20 UTC (rev 4457)
@@ -456,7 +456,7 @@
Posix.ProcEnv.SC_GETPW_R_SIZE_MAX = _const : C_Int.t
Posix.ProcEnv.SC_HOST_NAME_MAX = _const : C_Int.t
Posix.ProcEnv.SC_IOV_MAX = _const : C_Int.t
-Posix.ProcEnv.SC_IPV6 = _const : C_Int.t
+# Posix.ProcEnv.SC_IPV6 = _const : C_Int.t
Posix.ProcEnv.SC_JOB_CONTROL = _const : C_Int.t
Posix.ProcEnv.SC_LINE_MAX = _const : C_Int.t
Posix.ProcEnv.SC_LOGIN_NAME_MAX = _const : C_Int.t
@@ -474,7 +474,7 @@
Posix.ProcEnv.SC_PAGE_SIZE = _const : C_Int.t
Posix.ProcEnv.SC_PRIORITIZED_IO = _const : C_Int.t
Posix.ProcEnv.SC_PRIORITY_SCHEDULING = _const : C_Int.t
-Posix.ProcEnv.SC_RAW_SOCKETS = _const : C_Int.t
+# Posix.ProcEnv.SC_RAW_SOCKETS = _const : C_Int.t
Posix.ProcEnv.SC_READER_WRITER_LOCKS = _const : C_Int.t
Posix.ProcEnv.SC_REALTIME_SIGNALS = _const : C_Int.t
Posix.ProcEnv.SC_REGEXP = _const : C_Int.t
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 13:19:34
|
WCONTINUED doesn't exist on Linux 2.4
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml 2006-05-04 20:03:07 UTC (rev 4455)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/posix/process.sml 2006-05-04 20:19:32 UTC (rev 4456)
@@ -84,7 +84,7 @@
struct
structure Flags = BitFlags(structure S = C_Int)
open W Flags
- val continued = CONTINUED
+ (* val continued = CONTINUED *)
val nohang = NOHANG
val untraced = UNTRACED
end
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 20:03:07 UTC (rev 4455)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 20:19:32 UTC (rev 4456)
@@ -726,7 +726,6 @@
val termSig = _import "Posix_Process_termSig" : C_Status.t -> C_Signal.t;
structure W =
struct
-val CONTINUED = _const "Posix_Process_W_CONTINUED" : C_Int.t;
val NOHANG = _const "Posix_Process_W_NOHANG" : C_Int.t;
val UNTRACED = _const "Posix_Process_W_UNTRACED" : C_Int.t;
end
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 20:03:07 UTC (rev 4455)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 20:19:32 UTC (rev 4456)
@@ -573,7 +573,7 @@
Posix.ProcEnv.times = _import : unit -> C_Clock.t C_Errno.t
Posix.ProcEnv.ttyname = _import : C_Fd.t -> C_String.t C_Errno.t
Posix.ProcEnv.uname = _import : unit -> C_Int.t C_Errno.t
-Posix.Process.W.CONTINUED = _const : C_Int.t
+# Posix.Process.W.CONTINUED = _const : C_Int.t
Posix.Process.W.NOHANG = _const : C_Int.t
Posix.Process.W.UNTRACED = _const : C_Int.t
Posix.Process.alarm = _import : C_UInt.t -> C_UInt.t
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 13:03:11
|
C_USeconds is unused, and not present on Linux 2.4 ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml 2006-05-04 20:00:38 UTC (rev 4454) +++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml 2006-05-04 20:03:07 UTC (rev 4455) @@ -112,8 +112,6 @@ functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) structure C_UId = struct open Word32 type t = word end functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) -structure C_USeconds = struct open Word32 type t = word end -functor C_USeconds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) (* from <sys/socket.h> *) structure C_Socklen = struct open Word32 type t = word end |
|
From: Matthew F. <fl...@ml...> - 2006-05-04 13:00:39
|
Wrong path ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/test/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/test/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/test/Makefile 2006-05-04 19:59:36 UTC (rev 4453) +++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/test/Makefile 2006-05-04 20:00:38 UTC (rev 4454) @@ -17,7 +17,7 @@ .PHONY: clean clean: find . -type f | egrep '.(old|ast|core-ml)$$' | xargs rm -f - ../bin/clean + ../../bin/clean OBJPTR_REP_MAPS = objptr-rep32.map |
|
From: Matthew F. <fl...@ml...> - 2006-05-04 12:59:37
|
C_USeconds is unused, and not present on Linux 2.4 ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/amd64-linux/c-types.sml U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/amd64-linux/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/amd64-linux/c-types.sml 2006-05-04 19:39:16 UTC (rev 4452) +++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/amd64-linux/c-types.sml 2006-05-04 19:59:36 UTC (rev 4453) @@ -112,8 +112,6 @@ functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) structure C_UId = struct open Word32 type t = word end functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) -structure C_USeconds = struct open Word32 type t = word end -functor C_USeconds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) (* from <sys/socket.h> *) structure C_Socklen = struct open Word32 type t = word end Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-04 19:39:16 UTC (rev 4452) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-04 19:59:36 UTC (rev 4453) @@ -372,7 +372,7 @@ chksystype(suseconds_t, "SUSeconds"); chksystype(time_t, "Time"); chksystype(uid_t, "UId"); - chksystype(useconds_t, "USeconds"); + // chksystype(useconds_t, "USeconds"); writeNewline (cTypesHFd);writeNewline (cTypesSMLFd); writeStringWithNewline (cTypesHFd, "/* from <sys/socket.h> */"); |
|
From: Matthew F. <fl...@ml...> - 2006-05-04 12:39:18
|
Include platform.h with proper defines
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/Makefile
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim2.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-04 19:38:40 UTC (rev 4451)
+++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-04 19:39:16 UTC (rev 4452)
@@ -69,7 +69,7 @@
basis-no-check:
mkdir -p $(LIB)/sml
rm -rf $(LIB)/sml/basis
- $(CP) $(SRC)/basis-library/. $(LIB)/sml/basis
+ $(CP) $(SRC)/basis-library.refactor/. $(LIB)/sml/basis
find $(LIB)/sml/basis -type d -name .svn | xargs rm -rf
find $(LIB)/sml/basis -type f -name .ignore | xargs rm -rf
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 19:38:40 UTC (rev 4451)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/basis-ffi.sml 2006-05-04 19:39:16 UTC (rev 4452)
@@ -61,6 +61,7 @@
end
structure MLton =
struct
+val bug = _import "MLton_bug" : NullString8.t -> unit;
structure Itimer =
struct
val PROF = _const "MLton_Itimer_PROF" : C_Int.t;
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-04 19:38:40 UTC (rev 4451)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-04 19:39:16 UTC (rev 4452)
@@ -14,7 +14,7 @@
structure MLton = struct
-val bug = _import "MLton_bug": NullString8.t -> unit;
+
val eq = _prim "MLton_eq": 'a * 'a -> bool;
(* val deserialize = _prim "MLton_deserialize": Word8Vector.vector -> 'a ref; *)
val halt = _prim "MLton_halt": C_Status.t -> unit;
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim2.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim2.sml 2006-05-04 19:38:40 UTC (rev 4451)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim2.sml 2006-05-04 19:39:16 UTC (rev 4452)
@@ -10,6 +10,12 @@
struct
open Primitive
+ structure MLton =
+ struct
+ open MLton
+ val bug = PrimitiveFFI.MLton.bug
+ end
+
val dontInline: (unit -> 'a) -> 'a =
fn f =>
let
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-04 19:38:40 UTC (rev 4451)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-04 19:39:16 UTC (rev 4452)
@@ -192,7 +192,13 @@
runtime.c: $(CFILES)
- cat $(CFILES) >runtime.c
+ rm -f runtime.c
+ ( echo "#define MLTON_GC_INTERNAL_TYPES"; \
+ echo "#define MLTON_GC_INTERNAL_FUNCS"; \
+ echo "#define MLTON_GC_INTERNAL_BASIS"; \
+ echo "#include \"platform.h\""; ) \
+ > runtime.c
+ cat $(CFILES) >> runtime.c
util/%-gdb.o: util/%.c util.h $(UTILHFILES)
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 12:38:41
|
Move MLton_bug to basis-ffi
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/bug.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-basis-ffi.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/bug.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/bug.c 2006-05-04 19:37:46 UTC (rev 4450)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/bug.c 2006-05-04 19:38:40 UTC (rev 4451)
@@ -1,8 +1,9 @@
#include "platform.h"
-void MLton_bug (Pointer msg) {
- fprintf (stderr, "MLton bug: %s.\n%s\n",
- (char*)msg,
- "Please send a bug report to ML...@ml....");
- exit (2);
+/* print a bug message and exit (2) */
+void MLton_bug (NullString8_t msg) {
+ fprintf (stderr, "MLton bug: %s.\n%s\n",
+ (const char*)msg,
+ "Please send a bug report to ML...@ml....");
+ exit (2);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 19:37:46 UTC (rev 4450)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def 2006-05-04 19:38:40 UTC (rev 4451)
@@ -36,6 +36,7 @@
IEEEReal.RoundingMode.FE_UPWARD = _const : C_Int.t
IEEEReal.getRoundingMode = _import : unit -> C_Int.t
IEEEReal.setRoundingMode = _import : C_Int.t -> unit
+MLton.bug = _import noreturn : NullString8.t -> unit
MLton.Itimer.PROF = _const : C_Int.t
MLton.Itimer.REAL = _const : C_Int.t
MLton.Itimer.VIRTUAL = _const : C_Int.t
@@ -578,7 +579,7 @@
Posix.Process.alarm = _import : C_UInt.t -> C_UInt.t
Posix.Process.exece = _import : NullString8.t * NullString8Array.t * NullString8Array.t -> C_Int.t C_Errno.t
Posix.Process.execp = _import : NullString8.t * NullString8Array.t -> C_Int.t C_Errno.t
-Posix.Process.exit = _import : C_Status.t -> unit
+Posix.Process.exit = _import noreturn : C_Status.t -> unit
Posix.Process.exitStatus = _import : C_Status.t -> C_Int.t
Posix.Process.fork = _import : unit -> C_PId.t C_Errno.t
Posix.Process.ifExited = _import : C_Status.t -> Bool.t
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-basis-ffi.sml 2006-05-04 19:37:46 UTC (rev 4450)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-basis-ffi.sml 2006-05-04 19:38:40 UTC (rev 4451)
@@ -161,7 +161,8 @@
datatype t =
Const of {name: Name.t,
ty: Type.t}
- | Import of {maybeStatic: bool,
+ | Import of {attr: {noreturn: bool,
+ static: bool},
name: Name.t,
ty: {args: Type.t list,
ret: Type.t}}
@@ -186,7 +187,7 @@
" ",
Name.toC name,
";"]
- | Import {maybeStatic, name, ty = {args, ret}} =>
+ | Import {attr = {noreturn, static}, name, ty = {args, ret}} =>
let
val s =
String.concat
@@ -195,9 +196,13 @@
Name.toC name,
"(",
String.concatWith "," (List.map Type.toC args),
- ");"]
+ ")",
+ if noreturn
+ then " __attribute__ ((noreturn))"
+ else "",
+ ";"]
in
- if maybeStatic
+ if static
then String.concat
["#if (defined (MLTON_BASIS_FFI_STATIC))\n",
"static ", s, "\n",
@@ -224,7 +229,7 @@
"\" : ",
Type.toML ty,
";"]
- | Import {maybeStatic, name, ty = {args, ret}} =>
+ | Import {attr, name, ty = {args, ret}} =>
String.concat
["val ",
Name.last name,
@@ -265,14 +270,25 @@
ty = ret}
end
+ fun parseImportAttr (s) =
+ let
+ fun loop (attr as {noreturn, static}, s) =
+ if Substring.isPrefix "noreturn" s
+ then loop ({noreturn = true, static = static},
+ Substring.droplSpace (#2 (Substring.splitAt (s, 8))))
+ else if Substring.isPrefix "static" s
+ then loop ({noreturn = noreturn, static = true},
+ Substring.droplSpace (#2 (Substring.splitAt (s, 6))))
+ else (attr, s)
+ in
+ loop ({noreturn = false, static = false}, s)
+ end
+
fun parseImport (s, name) =
let
val s = #2 (Substring.splitAt (s, 7))
val s = Substring.droplSpace s
- val (maybeStatic, s) =
- if Substring.isPrefix "static" s
- then (true, Substring.droplSpace (#2 (Substring.splitAt (s, 6))))
- else (false, s)
+ val (attr, s) = parseImportAttr s
val s = if Substring.isPrefix ":" s
then #2 (Substring.splitAt (s, 1))
else raise Fail (concat ["Entry.parseImport: \"", Substring.string s, "\""])
@@ -281,7 +297,7 @@
then ()
else raise Fail (concat ["Entry.parseImport: \"", Substring.string s, "\""])
in
- Import {maybeStatic = maybeStatic,
+ Import {attr = attr,
name = name,
ty = {args = args, ret = ret}}
end
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-04 19:37:46 UTC (rev 4450)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-04 19:38:40 UTC (rev 4451)
@@ -149,8 +149,6 @@
/* ------------------------------------------------- */
void MLton_allocTooLarge (void) __attribute__ ((noreturn));
-/* print a bug message and exit (2) */
-void MLton_bug (Pointer msg) __attribute__ ((noreturn));
/* ---------------------------------- */
/* MLton.Platform */
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 12:37:46
|
Cast
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/System/Date.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/System/Date.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/System/Date.c 2006-05-04 19:12:26 UTC (rev 4449)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/System/Date.c 2006-05-04 19:37:46 UTC (rev 4450)
@@ -59,5 +59,5 @@
}
C_Size_t Date_strfTime(Array(Char8_t) buf, C_Size_t n, NullString8_t fmt) {
- return strftime((char*)(buf), n, (char*)(fmt), &tm_in);
+ return strftime((char*)(buf), n, (const char*)(fmt), &tm_in);
}
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 12:12:39
|
Enable more warnings and compile with gcc 3.2
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Times.c
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Rlimit/rlimit.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Syslog/Syslog.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/IEEEReal.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c
U mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c
U mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h
U mlton/branches/on-20050822-x86_64-branch/runtime/util/die.c
U mlton/branches/on-20050822-x86_64-branch/runtime/util/die.h
U mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h
U mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-04 19:12:26 UTC (rev 4449)
@@ -26,8 +26,12 @@
endif
ifeq ($(TARGET_ARCH), amd64)
+ifeq ($(findstring $(GCC_VERSION), 4),4)
FLAGS += -m32 -mtune=opteron
+else
+FLAGS += -m32
endif
+endif
ifeq ($(TARGET_ARCH), sparc)
FLAGS += -m32 -mcpu=v8
@@ -51,31 +55,55 @@
endif
CC = gcc -std=gnu99
-CFLAGS = -Wall -I. -Iplatform $(FLAGS)
+CFLAGS = -I. -Iplatform $(FLAGS)
OPTCFLAGS = $(CFLAGS) -O2 $(OPTFLAGS)
+DEBUGCFLAGS = $(CFLAGS) -gstabs+ -g2 -O1 -DASSERT=1
+ifeq ($(findstring $(GCC_VERSION), 4),4)
GCOPTCFLAGS = --param inline-unit-growth=75 --param max-inline-insns-single=1000
-DEBUGCFLAGS = $(CFLAGS) -gstabs+ -g2 -O1 -DASSERT=1
-WARNFLAGS = \
- -pedantic -Wall -Wextra \
- -Wno-unused-parameter -Wno-unused-function \
- -Wformat-nonliteral \
- -Wuninitialized -Winit-self \
- -Wstrict-aliasing=2 \
- -Wfloat-equal \
- -Wpointer-arith \
- -Wbad-function-cast -Wcast-qual -Wcast-align \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wmissing-noreturn -Wmissing-format-attribute \
- -Wpacked \
- -Wredundant-decls \
- -Wnested-externs \
- -Wmissing-prototypes \
- -Wmissing-declarations
-# -Wconversion
-# -Wshadow
-OPTWARNFLAGS = $(WARNFLAGS) -Winline -Wdisabled-optimization
-DEBUGWARNFLAGS = $(WARNFLAGS) -Wunused
+else
+GCOPTCFLAGS =
+endif
+WARNCFLAGS =
+WARNCFLAGS += -pedantic -Wall
+ifeq ($(findstring $(GCC_VERSION), 4),4)
+WARNCFLAGS += -Wextra
+else
+WARNCFLAGS += -W
+endif
+WARNCFLAGS += -Wformat=2
+# WARNCFLAGS += -Wswitch-default -Wswitch-enum
+WARNCFLAGS += -Wuninitialized
+ifeq ($(findstring $(GCC_VERSION), 4),4)
+WARNCFLAGS += -Winit-self
+endif
+ifeq ($(findstring $(GCC_VERSION), 4),4)
+WARNCFLAGS += -Wstrict-aliasing=2
+endif
+WARNCFLAGS += -Wfloat-equal
+WARNCFLAGS += -Wundef
+WARNCFLAGS += -Wshadow
+WARNCFLAGS += -Wpointer-arith
+WARNCFLAGS += -Wbad-function-cast -Wcast-qual -Wcast-align
+WARNCFLAGS += -Wwrite-strings
+# WARNCFLAGS += -Wconversion
+WARNCFLAGS += -Waggregate-return
+WARNCFLAGS += -Wstrict-prototypes
+ifeq ($(findstring $(GCC_VERSION), 4),4)
+WARNCFLAGS += -Wold-style-definition
+endif
+WARNCFLAGS += -Wmissing-prototypes -Wmissing-declarations
+ifeq ($(findstring $(GCC_VERSION), 4),4)
+WARNCFLAGS += -Wmissing-field-initializers
+endif
+WARNCFLAGS += -Wmissing-noreturn
+WARNCFLAGS += -Wmissing-format-attribute
+# WARNCFLAGS += -Wpacked -Wpadded
+WARNCFLAGS += -Wredundant-decls
+WARNCFLAGS += -Wnested-externs
+WARNCFLAGS += -Wlong-long
+# WARNCFLAGS += -Wunreachable-code
+OPTWARNCFLAGS = $(WARNCFLAGS) -Winline -Wdisabled-optimization
+DEBUGWARNCFLAGS = $(WARNCFLAGS)
UTILCFILES = \
$(shell find util -type f | grep '\.c$$')
@@ -136,7 +164,7 @@
libgdtoa.a: gdtoa/arith.h
cd gdtoa && \
- $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) \
+ $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) \
-Dstrtod=gdtoa_strtod \
-Dstrtof=gdtoa_strtof \
-w -O1 -c -DINFNAN_CHECK \
@@ -168,14 +196,14 @@
util/%-gdb.o: util/%.c util.h $(UTILHFILES)
- $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $<
+ $(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -c -o $@ $<
util/%.o: util/%.c util.h $(UTILHFILES)
- $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -c -o $@ $<
+ $(CC) $(OPTCFLAGS) $(WARNCFLAGS) -c -o $@ $<
c-types.h ml-types.h: gen/gen-types.c util.h $(UTILOFILES)
rm -f c-types.h ml-types.h
- $(CC) $(OPTCFLAGS) $(WARNFLAGS) -o gen/gen-types gen/gen-types.c $(UTILOFILES)
+ $(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o gen/gen-types gen/gen-types.c $(UTILOFILES)
cd gen && ./gen-types
cp gen/c-types.h c-types.h
cp gen/c-types.sml ../basis-library.refactor/config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml
@@ -191,10 +219,10 @@
rm -f gen/gen-basis-ffi gen/basis-ffi.h gen/basis-ffi.sml
gc-gdb.o: gc.c $(GCCFILES) $(HFILES)
- $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $<
+ $(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -c -o $@ $<
gc.o: gc.c $(GCCFILES) $(HFILES)
- $(CC) $(OPTCFLAGS) $(GCOPTCFLAGS) $(OPTWARNFLAGS) -c -o $@ $<
+ $(CC) $(OPTCFLAGS) $(GCOPTCFLAGS) $(OPTWARNCFLAGS) -c -o $@ $<
# It looks like we don't follow the C spec w.r.t. aliasing. And gcc
# -O2 catches us on the code in Real/*.c where we treat a double as a
@@ -203,15 +231,15 @@
# with -fno-strict-aliasing to prevent gcc from taking advantage of
# this aspect of the C spec.
basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h $(HFILES)
- $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $<
+ $(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -c -o $@ $<
basis/Real/%.o: basis/Real/%.c gdtoa/arith.h $(HFILES)
- $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -O1 -fno-strict-aliasing -c -o $@ $<
+ $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -O1 -fno-strict-aliasing -c -o $@ $<
%-gdb.o: %.c $(HFILES)
- $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $<
+ $(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -c -o $@ $<
%.o: %.c $(HFILES)
- $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -c -o $@ $<
+ $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -c -o $@ $<
%-gdb.o: %.S
$(CC) $(DEBUGCFLAGS) -c -o $@ $<
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -1,6 +1,6 @@
#include "platform.h"
-C_String_t Posix_ProcEnv_ctermid () {
+C_String_t Posix_ProcEnv_ctermid (void) {
char *res = ctermid (NULL);
return (C_String_t)res;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Times.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Times.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Times.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -2,19 +2,19 @@
static struct tms tms;
-C_Clock_t Posix_ProcEnv_Times_getUTime() {
+C_Clock_t Posix_ProcEnv_Times_getUTime(void) {
return tms.tms_utime;
}
-C_Clock_t Posix_ProcEnv_Times_getSTime() {
+C_Clock_t Posix_ProcEnv_Times_getSTime(void) {
return tms.tms_stime;
}
-C_Clock_t Posix_ProcEnv_Times_getCUTime() {
+C_Clock_t Posix_ProcEnv_Times_getCUTime(void) {
return tms.tms_cutime;
}
-C_Clock_t Posix_ProcEnv_Times_getCSTime() {
+C_Clock_t Posix_ProcEnv_Times_getCSTime(void) {
return tms.tms_cstime;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -2,26 +2,26 @@
static struct utsname mlton_utsname;
-C_String_t Posix_ProcEnv_Uname_getSysName () {
+C_String_t Posix_ProcEnv_Uname_getSysName (void) {
return (C_String_t)mlton_utsname.sysname;
}
-C_String_t Posix_ProcEnv_Uname_getNodeName () {
+C_String_t Posix_ProcEnv_Uname_getNodeName (void) {
return (C_String_t)mlton_utsname.nodename;
}
-C_String_t Posix_ProcEnv_Uname_getRelease () {
+C_String_t Posix_ProcEnv_Uname_getRelease (void) {
return (C_String_t)mlton_utsname.release;
}
-C_String_t Posix_ProcEnv_Uname_getVersion () {
+C_String_t Posix_ProcEnv_Uname_getVersion (void) {
return (C_String_t)mlton_utsname.version;
}
-C_String_t Posix_ProcEnv_Uname_getMachine () {
+C_String_t Posix_ProcEnv_Uname_getMachine (void) {
return (C_String_t)mlton_utsname.machine;
}
-C_Errno_t(C_Int_t) Posix_ProcEnv_uname () {
+C_Errno_t(C_Int_t) Posix_ProcEnv_uname (void) {
return uname (&mlton_utsname);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -27,7 +27,7 @@
return cfgetospeed (&termios);
}
-C_Speed_t Posix_TTY_Termios_cfGetISpeed () {
+C_Speed_t Posix_TTY_Termios_cfGetISpeed (void) {
return cfgetispeed (&termios);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Rlimit/rlimit.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Rlimit/rlimit.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Rlimit/rlimit.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -6,11 +6,11 @@
return getrlimit (r, &rlimit);
}
-C_RLim_t MLton_Rlimit_getHard () {
+C_RLim_t MLton_Rlimit_getHard (void) {
return rlimit.rlim_max;
}
-C_RLim_t MLton_Rlimit_getSoft () {
+C_RLim_t MLton_Rlimit_getSoft (void) {
return rlimit.rlim_cur;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Syslog/Syslog.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Syslog/Syslog.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Syslog/Syslog.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -6,7 +6,7 @@
/* openlog relies on the string being around forever. */
void MLton_Syslog_openlog(NullString8_t s, C_Int_t o, C_Int_t f) {
- char *s_ = strdup ((const char*)s);
+ const char *s_ = strdup ((const char*)s);
if (s_ == NULL)
s_ = "";
openlog (s_, o, f);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/IEEEReal.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/IEEEReal.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/IEEEReal.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -35,7 +35,7 @@
#endif
-C_Int_t IEEEReal_getRoundingMode () {
+C_Int_t IEEEReal_getRoundingMode (void) {
return fegetround ();
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -9,7 +9,9 @@
#if (defined (MLTON_GC_INTERNAL_FUNCS))
static inline size_t alignWithExtra (GC_state s, size_t bytes, size_t extra);
+#if ASSERT
static inline bool isFrontierAligned (GC_state s, pointer p);
+#endif
static inline pointer alignFrontier (GC_state s, pointer p);
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -47,9 +47,9 @@
return *(getArrayCounterp (a));
}
-pointer indexArrayAtPointerIndex (GC_state s, pointer a,
+pointer indexArrayAtObjptrIndex (GC_state s, pointer a,
GC_arrayCounter arrayIndex,
- uint32_t pointerIndex) {
+ uint32_t objptrIndex) {
GC_header header;
uint16_t bytesNonObjptrs;
uint16_t numObjptrs;
@@ -62,5 +62,5 @@
return a
+ (arrayIndex * (bytesNonObjptrs + (numObjptrs * OBJPTR_SIZE)))
+ bytesNonObjptrs
- + (pointerIndex * OBJPTR_SIZE);
+ + (objptrIndex * OBJPTR_SIZE);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -38,9 +38,9 @@
static inline GC_arrayLength getArrayLength (pointer a);
static inline GC_arrayCounter* getArrayCounterp (pointer a);
static inline GC_arrayCounter getArrayCounter (pointer a);
-static inline pointer indexArrayAtPointerIndex (GC_state s, pointer a,
- GC_arrayCounter arrayIndex,
- uint32_t pointerIndex);
+static inline pointer indexArrayAtObjptrIndex (GC_state s, pointer a,
+ GC_arrayCounter arrayIndex,
+ uint32_t objptrIndex);
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -49,7 +49,7 @@
uint16_t bytesNonObjptrs;
uint16_t numObjptrs;
GC_objectTypeTag tag;
- uint32_t index; /* The i'th pointer in the object (element) being marked. */
+ uint32_t objptrIndex; /* The i'th pointer in the object (element) being marked. */
GC_header nextHeader;
GC_header* nextHeaderp;
GC_arrayCounter arrayIndex;
@@ -128,18 +128,18 @@
goto ret;
}
todo = cur + bytesNonObjptrs;
- index = 0;
+ objptrIndex = 0;
markInNormal:
if (DEBUG_DFS_MARK)
- fprintf (stderr, "markInNormal index = %"PRIu32"\n", index);
- assert (index < numObjptrs);
+ fprintf (stderr, "markInNormal objptrIndex = %"PRIu32"\n", objptrIndex);
+ assert (objptrIndex < numObjptrs);
// next = *(pointer*)todo;
next = fetchObjptrToPointer (todo, s->heap.start);
if (not isPointer (next)) {
markNextInNormal:
- assert (index < numObjptrs);
- index++;
- if (index == numObjptrs) {
+ assert (objptrIndex < numObjptrs);
+ objptrIndex++;
+ if (objptrIndex == numObjptrs) {
/* Done. Clear out the counters and return. */
*headerp = header & ~COUNTER_MASK;
goto normalDone;
@@ -154,7 +154,7 @@
shareObjptr (s, (objptr*)todo);
goto markNextInNormal;
}
- *headerp = (header & ~COUNTER_MASK) | (index << COUNTER_SHIFT);
+ *headerp = (header & ~COUNTER_MASK) | (objptrIndex << COUNTER_SHIFT);
goto markNext;
} else if (WEAK_TAG == tag) {
/* Store the marked header and don't follow any pointers. */
@@ -163,7 +163,7 @@
/* When marking arrays:
* arrayIndex is the index of the element to mark.
* cur is the pointer to the array.
- * index is the index of the pointer within the element
+ * objptrIndex is the index of the pointer within the element
* (i.e. the i'th pointer is at index i).
* todo is the start of the element.
*/
@@ -182,26 +182,26 @@
todo = cur;
markArrayElt:
assert (arrayIndex < getArrayLength (cur));
- index = 0;
+ objptrIndex = 0;
/* Skip to the first pointer. */
todo += bytesNonObjptrs;
markInArray:
if (DEBUG_DFS_MARK)
- fprintf (stderr, "markInArray arrayIndex = %"PRIu32" index = %"PRIu32"\n",
- arrayIndex, index);
+ fprintf (stderr, "markInArray arrayIndex = %"PRIu32" objptrIndex = %"PRIu32"\n",
+ arrayIndex, objptrIndex);
assert (arrayIndex < getArrayLength (cur));
- assert (index < numObjptrs);
- assert (todo == indexArrayAtPointerIndex (s, cur, arrayIndex, index));
+ assert (objptrIndex < numObjptrs);
+ assert (todo == indexArrayAtObjptrIndex (s, cur, arrayIndex, objptrIndex));
// next = *(pointer*)todo;
next = fetchObjptrToPointer (todo, s->heap.start);
if (not (isPointer(next))) {
markNextInArray:
assert (arrayIndex < getArrayLength (cur));
- assert (index < numObjptrs);
- assert (todo == indexArrayAtPointerIndex (s, cur, arrayIndex, index));
+ assert (objptrIndex < numObjptrs);
+ assert (todo == indexArrayAtObjptrIndex (s, cur, arrayIndex, objptrIndex));
todo += OBJPTR_SIZE;
- index++;
- if (index < numObjptrs)
+ objptrIndex++;
+ if (objptrIndex < numObjptrs)
goto markInArray;
arrayIndex++;
if (arrayIndex < getArrayLength (cur))
@@ -220,7 +220,7 @@
}
/* Recur and mark next. */
*getArrayCounterp (cur) = arrayIndex;
- *headerp = (header & ~COUNTER_MASK) | (index << COUNTER_SHIFT);
+ *headerp = (header & ~COUNTER_MASK) | (objptrIndex << COUNTER_SHIFT);
goto markNext;
} else {
assert (STACK_TAG == tag);
@@ -239,37 +239,37 @@
(size_t)(top - getStackBottom (s, (GC_stack)cur)));
if (top == getStackBottom (s, (GC_stack)(cur)))
goto ret;
- index = 0;
+ objptrIndex = 0;
returnAddress = *(GC_returnAddress*) (top - GC_RETURNADDRESS_SIZE);
frameLayout = getFrameLayoutFromReturnAddress (s, returnAddress);
frameOffsets = frameLayout->offsets;
((GC_stack)cur)->markTop = top;
markInFrame:
- if (index == frameOffsets [0]) {
+ if (objptrIndex == frameOffsets [0]) {
top -= frameLayout->size;
goto markInStack;
}
- todo = top - frameLayout->size + frameOffsets [index + 1];
+ todo = top - frameLayout->size + frameOffsets [objptrIndex + 1];
// next = *(pointer*)todo;
next = fetchObjptrToPointer (todo, s->heap.start);
if (DEBUG_DFS_MARK)
fprintf (stderr,
" offset %u todo "FMTPTR" next = "FMTPTR"\n",
- frameOffsets [index + 1],
+ frameOffsets [objptrIndex + 1],
(uintptr_t)todo, (uintptr_t)next);
if (not isPointer (next)) {
- index++;
+ objptrIndex++;
goto markInFrame;
}
nextHeaderp = getHeaderp (next);
nextHeader = *nextHeaderp;
if (mark == (nextHeader & MARK_MASK)) {
- index++;
+ objptrIndex++;
if (shouldHashCons)
shareObjptr (s, (objptr*)todo);
goto markInFrame;
}
- ((GC_stack)cur)->markIndex = index;
+ ((GC_stack)cur)->markIndex = objptrIndex;
goto markNext;
}
assert (FALSE);
@@ -295,8 +295,8 @@
assert (WEAK_TAG != tag);
if (NORMAL_TAG == tag) {
todo = cur + bytesNonObjptrs;
- index = (header & COUNTER_MASK) >> COUNTER_SHIFT;
- todo += index * OBJPTR_SIZE;
+ objptrIndex = (header & COUNTER_MASK) >> COUNTER_SHIFT;
+ todo += objptrIndex * OBJPTR_SIZE;
// prev = *(pointer*)todo;
prev = fetchObjptrToPointer (todo, s->heap.start);
// *(pointer*)todo = next;
@@ -307,8 +307,8 @@
} else if (ARRAY_TAG == tag) {
arrayIndex = getArrayCounter (cur);
todo = cur + arrayIndex * (bytesNonObjptrs + (numObjptrs * OBJPTR_SIZE));
- index = (header & COUNTER_MASK) >> COUNTER_SHIFT;
- todo += bytesNonObjptrs + index * OBJPTR_SIZE;
+ objptrIndex = (header & COUNTER_MASK) >> COUNTER_SHIFT;
+ todo += bytesNonObjptrs + objptrIndex * OBJPTR_SIZE;
// prev = *(pointer*)todo;
prev = fetchObjptrToPointer (todo, s->heap.start);
// *(pointer*)todo = next;
@@ -318,20 +318,20 @@
goto markNextInArray;
} else {
assert (STACK_TAG == tag);
- index = ((GC_stack)cur)->markIndex;
+ objptrIndex = ((GC_stack)cur)->markIndex;
top = ((GC_stack)cur)->markTop;
/* Invariant: top points just past a "return address". */
returnAddress = *(GC_returnAddress*) (top - GC_RETURNADDRESS_SIZE);
frameLayout = getFrameLayoutFromReturnAddress (s, returnAddress);
frameOffsets = frameLayout->offsets;
- todo = top - frameLayout->size + frameOffsets [index + 1];
+ todo = top - frameLayout->size + frameOffsets [objptrIndex + 1];
// prev = *(pointer*)todo;
prev = fetchObjptrToPointer (todo, s->heap.start);
// *(pointer*)todo = next;
storeObjptrFromPointer (todo, next, s->heap.start);
if (shouldHashCons)
markIntergenerationalPointer (s, (pointer*)todo);
- index++;
+ objptrIndex++;
goto markInFrame;
}
assert (FALSE);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -6,7 +6,7 @@
* See the file MLton-LICENSE for details.
*/
-static void displayCol (FILE *out, int width, char *s) {
+static void displayCol (FILE *out, int width, const char *s) {
int extra;
int i;
int len;
@@ -20,7 +20,7 @@
fprintf (out, "%s\t", s);
}
-static void displayCollectionStats (FILE *out, char *name, struct rusage *ru,
+static void displayCollectionStats (FILE *out, const char *name, struct rusage *ru,
uintmax_t num, uintmax_t bytes) {
uintmax_t ms;
@@ -43,7 +43,7 @@
minorGC (s);
out = stderr;
if (s->controls.summary) {
- uintmax_t time;
+ uintmax_t totalTime;
uintmax_t gcTime;
gcTime = rusageTime (&s->cumulativeStatistics.ru_gc);
@@ -64,12 +64,12 @@
&s->cumulativeStatistics.ru_gcMinor,
s->cumulativeStatistics.numMinorGCs,
s->cumulativeStatistics.bytesCopiedMinor);
- time = getCurrentTime () - s->startTime;
+ totalTime = getCurrentTime () - s->startTime;
fprintf (out, "total GC time: %s ms (%.1f%%)\n",
uintmaxToCommaString (gcTime),
- (0 == time)
+ (0 == totalTime)
? 0.0
- : 100.0 * ((double) gcTime) / (double)time);
+ : 100.0 * ((double) gcTime) / (double)totalTime);
fprintf (out, "max pause: %s ms\n",
uintmaxToCommaString (s->cumulativeStatistics.maxPause));
fprintf (out, "total allocated: %s bytes\n",
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -198,7 +198,7 @@
/* Apply f to the frame index of each frame in the current thread's stack. */
void foreachStackFrame (GC_state s, GC_foreachStackFrameFun f) {
pointer bottom;
- GC_frameIndex index;
+ GC_frameIndex findex;
GC_frameLayout layout;
GC_returnAddress returnAddress;
pointer top;
@@ -211,15 +211,15 @@
(uintptr_t)bottom, (uintptr_t)s->stackTop);
for (top = s->stackTop; top > bottom; top -= layout->size) {
returnAddress = *((GC_returnAddress*)(top - GC_RETURNADDRESS_SIZE));
- index = getFrameIndexFromReturnAddress (s, returnAddress);
+ findex = getFrameIndexFromReturnAddress (s, returnAddress);
if (DEBUG_PROFILE)
- fprintf (stderr, "top = "FMTPTR" index = "FMTFI"\n",
- (uintptr_t)top, index);
- unless (index < s->frameLayoutsLength)
- die ("top = "FMTPTR" returnAddress = "FMTRA" index = "FMTFI"\n",
- (uintptr_t)top, (uintptr_t)returnAddress, index);
- f (s, index);
- layout = &(s->frameLayouts[index]);
+ fprintf (stderr, "top = "FMTPTR" findex = "FMTFI"\n",
+ (uintptr_t)top, findex);
+ unless (findex < s->frameLayoutsLength)
+ die ("top = "FMTPTR" returnAddress = "FMTRA" findex = "FMTFI"\n",
+ (uintptr_t)top, (uintptr_t)returnAddress, findex);
+ f (s, findex);
+ layout = &(s->frameLayouts[findex]);
assert (layout->size > 0);
}
if (DEBUG_PROFILE)
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -16,23 +16,23 @@
return res;
}
-GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex index) {
+GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex findex) {
GC_frameLayout layout;
if (DEBUG_DETAILED)
- fprintf (stderr, "index = "FMTFI" frameLayoutsLength = %"PRIu32"\n",
- index, s->frameLayoutsLength);
- assert (index < s->frameLayoutsLength);
- layout = &(s->frameLayouts[index]);
+ fprintf (stderr, "findex = "FMTFI" frameLayoutsLength = %"PRIu32"\n",
+ findex, s->frameLayoutsLength);
+ assert (findex < s->frameLayoutsLength);
+ layout = &(s->frameLayouts[findex]);
assert (layout->size > 0);
return layout;
}
GC_frameLayout getFrameLayoutFromReturnAddress (GC_state s, GC_returnAddress ra) {
GC_frameLayout layout;
- GC_frameIndex index;
+ GC_frameIndex findex;
- index = getFrameIndexFromReturnAddress (s, ra);
- layout = getFrameLayoutFromFrameIndex(s, index);
+ findex = getFrameIndexFromReturnAddress (s, ra);
+ layout = getFrameLayoutFromFrameIndex(s, findex);
return layout;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -52,7 +52,7 @@
#if (defined (MLTON_GC_INTERNAL_FUNCS))
static inline GC_frameIndex getFrameIndexFromReturnAddress (GC_state s, GC_returnAddress ra);
-static inline GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex index);
+static inline GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex findex);
static inline GC_frameLayout getFrameLayoutFromReturnAddress (GC_state s, GC_returnAddress ra);
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -186,6 +186,7 @@
}
}
+#if ASSERT
/* isCrossMapOk is a slower, but easier to understand, way of
* computing the crossMap. updateCrossMap (below) incrementally
* updates the crossMap, checking only the part of the old generation
@@ -223,6 +224,7 @@
GC_release (map, mapSize);
return TRUE;
}
+#endif
void updateCrossMap (GC_state s) {
GC_cardMapIndex cardIndex;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -74,7 +74,9 @@
static void createCardMapAndCrossMap (GC_state s);
static void resizeCardMapAndCrossMap (GC_state s);
+#if ASSERT
static bool isCrossMapOk (GC_state s);
+#endif
static void updateCrossMap (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -309,9 +309,9 @@
/* Write the heap to a file and try again. */
int fd;
char template[80];
- char *tmpDefault;
+ const char *tmpDefault;
char *tmpDir;
- char *tmpVar;
+ const char *tmpVar;
#if (defined (__MSVCRT__))
tmpVar = "TEMP";
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -86,7 +86,8 @@
/*
* Initialize an __mpz_struct to use the space provided by the heap.
*/
-void initIntInfRes (GC_state s, __mpz_struct *res, size_t bytes) {
+void initIntInfRes (GC_state s, __mpz_struct *res,
+ __attribute__ ((unused)) size_t bytes) {
GC_intInf bp;
assert (bytes <= (size_t)(s->limitPlusSlop - s->frontier));
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -28,6 +28,7 @@
}
}
+#if ASSERT
bool invariantForGC (GC_state s) {
if (DEBUG)
fprintf (stderr, "invariantForGC\n");
@@ -91,6 +92,7 @@
fprintf (stderr, "invariantForGC passed\n");
return TRUE;
}
+#endif
bool invariantForMutatorFrontier (GC_state s) {
GC_thread thread = getThreadCurrent(s);
@@ -104,6 +106,7 @@
<= getStackLimit (s, stack) + getStackTopFrameSize (s, stack));
}
+#if ASSERT
bool invariantForMutator (GC_state s, bool frontier, bool stack) {
if (DEBUG)
displayGCState (s, stderr);
@@ -114,3 +117,4 @@
assert (invariantForGC (s));
return TRUE;
}
+#endif
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -9,9 +9,13 @@
#if (defined (MLTON_GC_INTERNAL_FUNCS))
static inline void assertIsObjptrInFromSpace (GC_state s, objptr *opp);
+#if ASSERT
static bool invariantForGC (GC_state s);
+#endif
static inline bool invariantForMutatorFrontier (GC_state s);
static inline bool invariantForMutatorStack (GC_state s);
+#if ASSERT
static bool invariantForMutator (GC_state s, bool frontier, bool stack);
+#endif
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -84,7 +84,8 @@
return thread;
}
-static inline void setFrontier (GC_state s, pointer p, size_t bytes) {
+static inline void setFrontier (GC_state s, pointer p,
+ __attribute__ ((unused)) size_t bytes) {
p = alignFrontier (s, p);
assert ((size_t)(p - s->frontier) <= bytes);
GC_profileAllocInc (s, p - s->frontier);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -93,7 +93,7 @@
* If p points at the beginning of an object, then advanceToObjectData
* returns a pointer to the start of the object data.
*/
-pointer advanceToObjectData (GC_state s, pointer p) {
+pointer advanceToObjectData (__attribute__ ((unused)) GC_state s, pointer p) {
GC_header header;
pointer res;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -245,7 +245,7 @@
}
void GC_profileWrite (GC_state s, GC_profileData p, int fd) {
- char* kind;
+ const char* kind;
if (DEBUG_PROFILE)
fprintf (stderr, "GC_profileWrite\n");
@@ -415,6 +415,7 @@
break;
case PROFILE_NONE:
die ("impossible PROFILE_NONE");
+ break;
case PROFILE_TIME_FIELD:
case PROFILE_TIME_LABEL:
initProfilingTime (s);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -40,7 +40,7 @@
}
/* Pointer to the bottommost word in use on the stack. */
-pointer getStackBottom (GC_state s, GC_stack stack) {
+pointer getStackBottom (__attribute__ ((unused)) GC_state s, GC_stack stack) {
pointer res;
res = ((pointer)stack) + sizeof (struct GC_stack);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -58,7 +58,9 @@
static void displayStack (GC_state s, GC_stack stack, FILE *stream);
static inline bool isStackEmpty (GC_stack stack);
+#if ASSERT
static inline bool isStackReservedAligned (GC_state s, size_t reserved);
+#endif
static inline size_t sizeofStackSlop (GC_state s);
static inline size_t sizeofStackInitial (GC_state s);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -8,7 +8,7 @@
#include "cenv.h"
#include "util.h"
-static char* mlTypesHPrefix[] = {
+static const char* mlTypesHPrefix[] = {
"/* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh",
" * Jagannathan, and Stephen Weeks.",
" *",
@@ -36,7 +36,7 @@
NULL
};
-static char* cTypesHPrefix[] = {
+static const char* cTypesHPrefix[] = {
"/* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh",
" * Jagannathan, and Stephen Weeks.",
" *",
@@ -50,7 +50,7 @@
NULL
};
-static char* cTypesSMLPrefix[] = {
+static const char* cTypesSMLPrefix[] = {
"(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh",
" * Jagannathan, and Stephen Weeks.",
" *",
@@ -61,7 +61,7 @@
NULL
};
-static char* mlTypesHStd[] = {
+static const char* mlTypesHStd[] = {
"/* ML types */",
"typedef unsigned char* Pointer;",
// "typedef void* Pointer;",
@@ -256,23 +256,24 @@
writeNewline (cTypesSMLFd); \
} while (0)
-static char* mlTypesHSuffix[] = {
+static const char* mlTypesHSuffix[] = {
"#endif /* _MLTON_MLTYPES_H_ */",
NULL
};
-static char* cTypesHSuffix[] = {
+static const char* cTypesHSuffix[] = {
"#define C_Errno_t(t) t",
"",
"#endif /* _MLTON_CTYPES_H_ */",
NULL
};
-static char* cTypesSMLSuffix[] = {
+static const char* cTypesSMLSuffix[] = {
NULL
};
-int main (int argc, char* argv[]) {
+int main (__attribute__ ((unused)) int argc,
+ __attribute__ ((unused)) char* argv[]) {
int mlTypesHFd, cTypesHFd, cTypesSMLFd;
mlTypesHFd = open_safe ("ml-types.h", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -1,4 +1,4 @@
-void GC_displayMem () {
+void GC_displayMem (void) {
static char buffer[256];
sprintf (buffer, "/bin/cat /proc/%d/maps\n", (int)(getpid ()));
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -2,9 +2,9 @@
extern char _start;
extern char etext;
-void *GC_getTextStart () {
+void *GC_getTextStart (void) {
return &_start;
}
-void *GC_getTextEnd () {
+void *GC_getTextEnd (void) {
return &etext;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -20,7 +20,9 @@
* mips: ucp->m_context.sc_pc
* s390: ucp->m_context.sregs->regs.psw.addr
*/
-static void catcher (int sig, siginfo_t* sip, void* mystery) {
+static void catcher (__attribute__ ((unused)) int sig,
+ __attribute__ ((unused)) siginfo_t* sip,
+ void* mystery) {
#if (defined (__x86_64__))
#define REG_INDEX(NAME) (offsetof(struct sigcontext, NAME) / sizeof(greg_t))
#ifndef REG_RIP
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/sysconf.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -1,11 +1,11 @@
-size_t GC_pageSize () {
+size_t GC_pageSize (void) {
long int tmp;
tmp = sysconf (_SC_PAGESIZE);
return (size_t)tmp;
}
-size_t GC_totalRam () {
+size_t GC_totalRam (void) {
size_t pageSize = GC_pageSize ();
long int tmp;
@@ -13,7 +13,7 @@
return pageSize * (size_t)tmp;
}
-size_t GC_availRam () {
+size_t GC_availRam (void) {
size_t pageSize = GC_pageSize ();
long int tmp;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -7,7 +7,7 @@
#include "util.h"
-void asfail(char *file, int line, char *prop) {
+void asfail(const char *file, int line, const char *prop) {
fflush(stdout);
fprintf(stderr, "%s:%d: assert(%s) failed.\n", file, line, prop);
abort();
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -10,7 +10,7 @@
#endif
/* Assertion failure routine */
-extern void asfail (char *file, int line, char *prop)
+extern void asfail (const char *file, int line, const char *prop)
__attribute__ ((noreturn));
/* Assertion verifier */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/die.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/die.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/die.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -7,7 +7,7 @@
#include "util.h"
-void die (char *fmt, ...) {
+void die (const char *fmt, ...) {
va_list args;
fflush(stdout);
@@ -18,7 +18,7 @@
exit(1);
}
-void diee (char * fmt, ...) {
+void diee (const char * fmt, ...) {
va_list args;
fflush(stdout);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/die.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/die.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/die.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -7,10 +7,10 @@
*/
/* issue error message and exit */
-extern void die (char *fmt, ...)
+extern void die (const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)))
__attribute__ ((noreturn));
/* issue error message and exit. Also print strerror(errno). */
-extern void diee (char *fmt, ...)
+extern void diee (const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)))
__attribute__ ((noreturn));
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h 2006-05-04 19:12:26 UTC (rev 4449)
@@ -46,7 +46,7 @@
write_safe (fd, &u, sizeof(uintptr_t));
}
-static inline void writeString (int fd, char* s) {
+static inline void writeString (int fd, const char* s) {
write_safe (fd, s, strlen(s));
}
@@ -89,7 +89,7 @@
writeString (fd, "\n");
}
-static inline void writeStringWithNewline (int fd, char* s) {
+static inline void writeStringWithNewline (int fd, const char* s) {
writeString (fd, s);
writeNewline (fd);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c 2006-05-04 15:26:50 UTC (rev 4448)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c 2006-05-04 19:12:26 UTC (rev 4449)
@@ -101,7 +101,7 @@
}
char* sizeToBytesApproxString (size_t amount) {
- static char* suffixs[] = {"", "K", "M", "G"};
+ static const char* suffixs[] = {"", "K", "M", "G"};
static char buf1[BUF_SIZE];
static char buf2[BUF_SIZE];
static char buf3[BUF_SIZE];
|
|
From: Matthew F. <fl...@ml...> - 2006-05-04 08:26:51
|
Better handling of conversions
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-04 03:06:38 UTC (rev 4447)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-04 15:26:50 UTC (rev 4448)
@@ -268,22 +268,21 @@
toObjptrWordX: 'a -> ObjptrWord.word,
other : {wordSize: Int32.int,
zero: 'a,
- three: 'a,
eq: 'a * 'a -> bool,
neg: 'a -> 'a,
+ notb: 'a -> 'a,
rshift: 'a * Word32.word -> 'a}}
(isneg, w) =
if Int32.> (ObjptrWord.wordSize, #wordSize other)
orelse let
- val upperBits =
- (#rshift other)
- (w, Word32.- (ObjptrWord.wordSizeWord, 0w2))
+ val shift = Word32.- (ObjptrWord.wordSizeWord, 0w2)
+ val upperBits = (#rshift other) (w, shift)
+ val upperZeroBits = #zero other
+ val upperOneBits = (#rshift other) ((#notb other) (#zero other), shift)
in
- (#eq other) (upperBits, #zero other)
+ (#eq other) (upperBits, upperZeroBits)
orelse
- (isneg
- andalso
- (#eq other) (upperBits, #three other))
+ (isneg andalso (#eq other) (upperBits, upperOneBits))
end
then Prim.fromWord (addTag (toObjptrWordX w))
else let
@@ -319,9 +318,9 @@
toObjptrWordX = ObjptrWord.fromWord8X,
other = {wordSize = Word8.wordSize,
zero = Word8.zero,
- three = 0w3,
eq = ((op =) : Word8.word * Word8.word -> bool),
neg = Word8.~,
+ notb = Word8.notb,
rshift = Word8.>>}}
fun fromWord8 w = fromWordAux8 (false, w)
fun fromInt8 i = fromWordAux8 (Int8.< (i, 0), Word8.fromInt8 i)
@@ -335,9 +334,9 @@
toObjptrWordX = ObjptrWord.fromWord16X,
other = {wordSize = Word16.wordSize,
zero = Word16.zero,
- three = 0w3,
eq = ((op =) : Word16.word * Word16.word -> bool),
neg = Word16.~,
+ notb = Word16.notb,
rshift = Word16.>>}}
fun fromWord16 w = fromWordAux16 (false, w)
fun fromInt16 i = fromWordAux16 (Int16.< (i, 0), Word16.fromInt16 i)
@@ -351,9 +350,9 @@
toObjptrWordX = ObjptrWord.fromWord32X,
other = {wordSize = Word32.wordSize,
zero = Word32.zero,
- three = 0w3,
eq = ((op =) : Word32.word * Word32.word -> bool),
neg = Word32.~,
+ notb = Word32.notb,
rshift = Word32.>>}}
fun fromWord32 w = fromWordAux32 (false, w)
fun fromInt32 i = fromWordAux32 (Int32.< (i, 0), Word32.fromInt32 i)
@@ -367,9 +366,9 @@
toObjptrWordX = ObjptrWord.fromWord64X,
other = {wordSize = Word64.wordSize,
zero = Word64.zero,
- three = 0w3,
eq = ((op =) : Word64.word * Word64.word -> bool),
neg = Word64.~,
+ notb = Word64.notb,
rshift = Word64.>>}}
fun fromWord64 w = fromWordAux64 (false, w)
fun fromInt64 i = fromWordAux64 (Int64.< (i, 0), Word64.fromInt64 i)
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 20:06:41
|
SysWord <> Word
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/lib/mlton/basic/file-desc.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton/basic/file-desc.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/mlton/basic/file-desc.sml 2006-05-04 02:41:11 UTC (rev 4446)
+++ mlton/branches/on-20050822-x86_64-branch/lib/mlton/basic/file-desc.sml 2006-05-04 03:06:38 UTC (rev 4447)
@@ -11,7 +11,8 @@
type t = file_desc
- val layout = Word.layout o fdToWord
+ val toString = SysWord.fmt StringCvt.DEC o fdToWord
+ val layout = Layout.str o toString
fun move {from, to} =
if from <> to
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 19:41:12
|
Representation invariant for small-ints was violated for Int<N>.minInt with N = ObjptrWord.wordSize - 1
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-04 02:22:11 UTC (rev 4445)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-04 02:41:11 UTC (rev 4446)
@@ -265,10 +265,12 @@
local
fun 'a make {toMPLimb: 'a -> MPLimb.word,
- toObjptrWord: 'a -> ObjptrWord.word,
+ toObjptrWordX: 'a -> ObjptrWord.word,
other : {wordSize: Int32.int,
zero: 'a,
+ three: 'a,
eq: 'a * 'a -> bool,
+ neg: 'a -> 'a,
rshift: 'a * Word32.word -> 'a}}
(isneg, w) =
if Int32.> (ObjptrWord.wordSize, #wordSize other)
@@ -278,13 +280,12 @@
(w, Word32.- (ObjptrWord.wordSizeWord, 0w2))
in
(#eq other) (upperBits, #zero other)
+ orelse
+ (isneg
+ andalso
+ (#eq other) (upperBits, #three other))
end
- then let
- val ans = toObjptrWord w
- val ans = if isneg then ObjptrWord.~ ans else ans
- in
- Prim.fromWord (addTag ans)
- end
+ then Prim.fromWord (addTag (toObjptrWordX w))
else let
fun loop (w, i, acc) =
if (#eq other) (w, (#zero other))
@@ -299,7 +300,9 @@
loop (w, S.+ (i, 1), (i, limb) :: acc)
end
val (n, acc) =
- loop (w, 1, [(0, if isneg then 0w1 else 0w0)])
+ if isneg
+ then loop ((#neg other) w, 1, [(0,0w1)])
+ else loop (w, 1, [(0,0w0)])
val a = A.arrayUnsafe n
fun loop acc =
case acc of
@@ -313,16 +316,15 @@
in
val fromWordAux8 =
make {toMPLimb = MPLimb.fromWord8,
- toObjptrWord = ObjptrWord.fromWord8,
+ toObjptrWordX = ObjptrWord.fromWord8X,
other = {wordSize = Word8.wordSize,
zero = Word8.zero,
+ three = 0w3,
eq = ((op =) : Word8.word * Word8.word -> bool),
+ neg = Word8.~,
rshift = Word8.>>}}
fun fromWord8 w = fromWordAux8 (false, w)
- fun fromInt8 i =
- if Int8.>= (i, 0)
- then fromWordAux8 (false, Word8.fromInt8 i)
- else fromWordAux8 (true, Word8.~ (Word8.fromInt8 i))
+ fun fromInt8 i = fromWordAux8 (Int8.< (i, 0), Word8.fromInt8 i)
fun fromWord8X w = fromInt8 (Word8.toInt8X w)
val fromInt8Unsafe = fromInt8
val fromWord8Unsafe = fromWord8
@@ -330,16 +332,15 @@
val fromWordAux16 =
make {toMPLimb = MPLimb.fromWord16,
- toObjptrWord = ObjptrWord.fromWord16,
+ toObjptrWordX = ObjptrWord.fromWord16X,
other = {wordSize = Word16.wordSize,
zero = Word16.zero,
+ three = 0w3,
eq = ((op =) : Word16.word * Word16.word -> bool),
+ neg = Word16.~,
rshift = Word16.>>}}
fun fromWord16 w = fromWordAux16 (false, w)
- fun fromInt16 i =
- if Int16.>= (i, 0)
- then fromWordAux16 (false, Word16.fromInt16 i)
- else fromWordAux16 (true, Word16.~ (Word16.fromInt16 i))
+ fun fromInt16 i = fromWordAux16 (Int16.< (i, 0), Word16.fromInt16 i)
fun fromWord16X w = fromInt16 (Word16.toInt16X w)
val fromInt16Unsafe = fromInt16
val fromWord16Unsafe = fromWord16
@@ -347,16 +348,15 @@
val fromWordAux32 =
make {toMPLimb = MPLimb.fromWord32,
- toObjptrWord = ObjptrWord.fromWord32,
+ toObjptrWordX = ObjptrWord.fromWord32X,
other = {wordSize = Word32.wordSize,
zero = Word32.zero,
+ three = 0w3,
eq = ((op =) : Word32.word * Word32.word -> bool),
+ neg = Word32.~,
rshift = Word32.>>}}
fun fromWord32 w = fromWordAux32 (false, w)
- fun fromInt32 i =
- if Int32.>= (i, 0)
- then fromWordAux32 (false, Word32.fromInt32 i)
- else fromWordAux32 (true, Word32.~ (Word32.fromInt32 i))
+ fun fromInt32 i = fromWordAux32 (Int32.< (i, 0), Word32.fromInt32 i)
fun fromWord32X w = fromInt32 (Word32.toInt32X w)
val fromInt32Unsafe = fromInt32
val fromWord32Unsafe = fromWord32
@@ -364,16 +364,15 @@
val fromWordAux64 =
make {toMPLimb = MPLimb.fromWord64,
- toObjptrWord = ObjptrWord.fromWord64,
+ toObjptrWordX = ObjptrWord.fromWord64X,
other = {wordSize = Word64.wordSize,
zero = Word64.zero,
+ three = 0w3,
eq = ((op =) : Word64.word * Word64.word -> bool),
+ neg = Word64.~,
rshift = Word64.>>}}
fun fromWord64 w = fromWordAux64 (false, w)
- fun fromInt64 i =
- if Int64.>= (i, 0)
- then fromWordAux64 (false, Word64.fromInt64 i)
- else fromWordAux64 (true, Word64.~ (Word64.fromInt64 i))
+ fun fromInt64 i = fromWordAux64 (Int64.< (i, 0), Word64.fromInt64 i)
fun fromWord64X w = fromInt64 (Word64.toInt64X w)
val fromInt64Unsafe = fromInt64
val fromWord64Unsafe = fromWord64
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 19:22:11
|
Size is measured in bytes
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-03 22:21:16 UTC (rev 4444)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/mlton.sml 2006-05-04 02:22:11 UTC (rev 4445)
@@ -29,7 +29,7 @@
fun size x =
let
val refOverhead =
- HeaderWord.wordSize + ObjptrWord.wordSize
+ Int.div (HeaderWord.wordSize + ObjptrWord.wordSize, 8)
in
C_Size.toInt (Primitive.MLton.size (ref x)) - refOverhead
end
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 15:21:17
|
Fix digitsPerChunk calculation
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf.sml 2006-05-03 21:43:42 UTC (rev 4443)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf.sml 2006-05-03 22:21:16 UTC (rev 4444)
@@ -160,7 +160,7 @@
chunk = W.+ (W.* (base, chunk), dig),
s = s'}
val digitsPerChunk =
- Int32.div (Int32.- (Int32.fromInt W.wordSize, 2), W.log2 base)
+ Int32.quot (Int32.- (Int32.fromInt W.wordSize, 3), W.log2 base)
fun reader (s: 'a): (chunk * 'a) option =
case dread s of
NONE => NONE
@@ -181,12 +181,12 @@
fun loop (more: bool, acc: int, s: 'a) =
if more
then case ckread s of
- NONE => (acc, s)
- | SOME ({more, shift, chunk}, s') =>
- loop (more,
- ((Prim.addTagCoerce shift) * acc)
- + (Prim.addTagCoerce chunk),
- s')
+ NONE => (acc, s)
+ | SOME ({more, shift, chunk}, s') =>
+ loop (more,
+ ((Prim.addTagCoerce shift) * acc)
+ + (Prim.addTagCoerce chunk),
+ s')
else (acc, s)
fun reader (s: 'a): (int * 'a) option =
case ckread s of
@@ -238,11 +238,10 @@
| #"~" => (true, s')
| _ => (false, s)
in
- if isNeg then
- case uread s'' of
- NONE => NONE
- | SOME (abs, s''') =>
- SOME (~ abs, s''')
+ if isNeg
+ then case uread s'' of
+ NONE => NONE
+ | SOME (abs, s''') => SOME (~ abs, s''')
else uread s''
end
in
@@ -261,8 +260,7 @@
val dread = toDigR (dig, cread)
val ckread = toChunkR (base, dread)
val uread = toUnsR ckread
- val hread =
- if base = 0w16 then toHexR (cread, uread) else uread
+ val hread = if base = 0w16 then toHexR (cread, uread) else uread
val reader = toSign (cread, hread)
in
reader
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 14:43:46
|
Bug fixes
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/text/char0.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/text/char0.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/text/char0.sml 2006-05-03 21:43:35 UTC (rev 4442)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/text/char0.sml 2006-05-03 21:43:42 UTC (rev 4443)
@@ -26,18 +26,7 @@
in
val chrUnsafe = S.f
end
- local
- structure S =
- Int_ChooseInt
- (type 'a t = char -> 'a
- val fInt8 = Prim.toInt8Unsafe
- val fInt16 = Prim.toInt16Unsafe
- val fInt32 = Prim.toInt32Unsafe
- val fInt64 = Prim.toInt64Unsafe
- val fIntInf = Prim.toIntInfUnsafe)
- in
- val ord = S.f
- end
+ val ord = Primitive.Word8.toInt o Prim.toWord8Unsafe
val minChar: char = #"\000"
val numChars: int = 256
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 14:43:37
|
Bug fixes
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-03 15:32:34 UTC (rev 4441)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/integer/int-inf0.sml 2006-05-03 21:43:35 UTC (rev 4442)
@@ -671,7 +671,7 @@
val numw = dropTagCoerce num
val numi = W.toObjptrIntX numw
val denw = dropTagCoerce den
- val deni = W.toObjptrIntX numw
+ val deni = W.toObjptrIntX denw
in
if numw = badObjptrWord
andalso deni = ~1
@@ -702,7 +702,7 @@
val numw = dropTagCoerce num
val numi = W.toObjptrIntX numw
val denw = dropTagCoerce den
- val deni = W.toObjptrIntX numw
+ val deni = W.toObjptrIntX denw
val ansi = I.rem (numi, deni)
val answ = W.fromObjptrInt ansi
val ans = addTag answ
|
|
From: Matthew F. <fl...@ml...> - 2006-05-03 08:32:35
|
Formatting ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml 2006-05-03 03:18:11 UTC (rev 4440) +++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/config/c/x86-linux/c-types.sml 2006-05-03 15:32:34 UTC (rev 4441) @@ -131,4 +131,3 @@ structure C_MPLimb = struct open Word32 type t = word end functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) - Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-03 03:18:11 UTC (rev 4440) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-03 15:32:34 UTC (rev 4441) @@ -55,7 +55,9 @@ OPTCFLAGS = $(CFLAGS) -O2 $(OPTFLAGS) GCOPTCFLAGS = --param inline-unit-growth=75 --param max-inline-insns-single=1000 DEBUGCFLAGS = $(CFLAGS) -gstabs+ -g2 -O1 -DASSERT=1 -WARNFLAGS = -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function \ +WARNFLAGS = \ + -pedantic -Wall -Wextra \ + -Wno-unused-parameter -Wno-unused-function \ -Wformat-nonliteral \ -Wuninitialized -Winit-self \ -Wstrict-aliasing=2 \ |
|
From: Matthew F. <fl...@ml...> - 2006-05-02 20:18:16
|
Type checking errors
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/Makefile
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/real/real-global.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-03 03:03:50 UTC (rev 4439)
+++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-03 03:18:11 UTC (rev 4440)
@@ -222,7 +222,14 @@
mlbpathmap:
touch $(MLBPATHMAP)
( echo 'MLTON_ROOT $$(LIB_MLTON_DIR)/sml'; \
- echo 'SML_LIB $$(LIB_MLTON_DIR)/sml' ) \
+ echo 'SML_LIB $$(LIB_MLTON_DIR)/sml'; \
+ echo 'OBJPTR_REP objptr-rep32.sml'; \
+ echo 'HEADER_WORD header-word32.sml'; \
+ echo 'SEQ_INDEX seqindex-int32.sml'; \
+ echo 'DEFAULT_CHAR default-char8.sml'; \
+ echo 'DEFAULT_INT default-int32.sml'; \
+ echo 'DEFAULT_REAL default-real64.sml'; \
+ echo 'DEFAULT_WORD default-word32.sml'; ) \
>>$(MLBPATHMAP).tmp
mv $(MLBPATHMAP).tmp $(MLBPATHMAP)
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-03 03:03:50 UTC (rev 4439)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/build/sources.mlb 2006-05-03 03:18:11 UTC (rev 4440)
@@ -180,8 +180,6 @@
../real/math.sig
../real/real.sig
../real/real.sml
- ../real/pack-real.sig
- ../real/pack-real.sml
local
../config/bind/real-top.sml
in ann "forceUsed" in
@@ -189,6 +187,8 @@
../config/default/large-real.sml
end end
../real/real-global.sml
+ ../real/pack-real.sig
+ ../real/pack-real.sml
local
../config/bind/int-top.sml
(* ../config/bind/pointer-prim.sml *)
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml 2006-05-03 03:03:50 UTC (rev 4439)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/libs/basis-extra/top-level/basis-sigs.sml 2006-05-03 03:18:11 UTC (rev 4440)
@@ -101,7 +101,7 @@
signature MLTON_RLIMIT = MLTON_RLIMIT
signature MLTON_RUSAGE = MLTON_RUSAGE
signature MLTON_SIGNAL = MLTON_SIGNAL
-signature MLTON_SOCKET = MLTON_SOCKET
+(* signature MLTON_SOCKET = MLTON_SOCKET *)
signature MLTON_SYSLOG = MLTON_SYSLOG
signature MLTON_TEXT_IO = MLTON_TEXT_IO
signature MLTON_THREAD = MLTON_THREAD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb 2006-05-03 03:03:50 UTC (rev 4439)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton.mlb 2006-05-03 03:18:11 UTC (rev 4440)
@@ -33,7 +33,7 @@
signature MLTON_RLIMIT
signature MLTON_RUSAGE
signature MLTON_SIGNAL
- signature MLTON_SOCKET
+ (* signature MLTON_SOCKET *)
signature MLTON_SYSLOG
signature MLTON_TEXT_IO
signature MLTON_THREAD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/real/real-global.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/real/real-global.sml 2006-05-03 03:03:50 UTC (rev 4439)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/real/real-global.sml 2006-05-03 03:18:11 UTC (rev 4440)
@@ -6,5 +6,6 @@
* See the file MLton-LICENSE for details.
*)
+val real = Real.fromInt
structure RealGlobal: REAL_GLOBAL = Real
open RealGlobal
|
|
From: Matthew F. <fl...@ml...> - 2006-05-02 20:04:20
|
Use the .tgz files from smlnj.org as the base for SML/NJ libaries. ---------------------------------------------------------------------- U mlton/trunk/lib/ckit-lib/ckit.patch U mlton/trunk/lib/ckit-lib/ckit.tgz U mlton/trunk/lib/mlrisc-lib/MLRISC.patch U mlton/trunk/lib/mlrisc-lib/MLRISC.tgz U mlton/trunk/lib/smlnj-lib/smlnj-lib.patch U mlton/trunk/lib/smlnj-lib/smlnj-lib.tgz ---------------------------------------------------------------------- Modified: mlton/trunk/lib/ckit-lib/ckit.patch =================================================================== --- mlton/trunk/lib/ckit-lib/ckit.patch 2006-05-03 02:58:44 UTC (rev 4438) +++ mlton/trunk/lib/ckit-lib/ckit.patch 2006-05-03 03:03:50 UTC (rev 4439) @@ -1,11 +1,11 @@ diff -Naur ckit/ckit-lib.mlb ckit-mlton/ckit-lib.mlb --- ckit/ckit-lib.mlb 1969-12-31 19:00:00.000000000 -0500 -+++ ckit-mlton/ckit-lib.mlb 2005-08-18 09:31:14.000000000 -0400 ++++ ckit-mlton/ckit-lib.mlb 2006-05-02 22:38:21.000000000 -0400 @@ -0,0 +1 @@ +src/ckit-lib.mlb diff -Naur ckit/README.mlton ckit-mlton/README.mlton --- ckit/README.mlton 1969-12-31 19:00:00.000000000 -0500 -+++ ckit-mlton/README.mlton 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/README.mlton 2006-05-02 22:38:21.000000000 -0400 @@ -0,0 +1,13 @@ +The following changes were made to the ckit Library, in addition to +deriving the {{{.mlb}}} file from the {{{.cm}}} files: @@ -22,7 +22,7 @@ + * {{{ast/build-ast.sml}}} (modified): Rewrote use of ''or-patterns''. diff -Naur ckit/src/ast/ast-sig.sml ckit-mlton/src/ast/ast-sig.sml --- ckit/src/ast/ast-sig.sml 2001-10-31 15:22:41.000000000 -0500 -+++ ckit-mlton/src/ast/ast-sig.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/ast-sig.sml 2006-05-02 22:38:21.000000000 -0400 @@ -67,7 +67,12 @@ datatype declaration = TypeDecl of {shadow: {strct:bool} option, tid:tid} @@ -99,7 +99,7 @@ location : SourceMap.location, diff -Naur ckit/src/ast/build-ast.sml ckit-mlton/src/ast/build-ast.sml --- ckit/src/ast/build-ast.sml 2003-08-28 17:58:39.000000000 -0400 -+++ ckit-mlton/src/ast/build-ast.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/build-ast.sml 2006-05-02 22:38:21.000000000 -0400 @@ -290,7 +290,8 @@ of SOME{ntype=NONE,...} => true | _ => false @@ -225,7 +225,7 @@ else if repeated_declarations_ok diff -Naur ckit/src/ast/initializer-normalizer.sml ckit-mlton/src/ast/initializer-normalizer.sml --- ckit/src/ast/initializer-normalizer.sml 2003-08-28 17:58:39.000000000 -0400 -+++ ckit-mlton/src/ast/initializer-normalizer.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/initializer-normalizer.sml 2006-05-02 22:38:21.000000000 -0400 @@ -156,7 +156,13 @@ feed (unionNorm (ctype, fields), inits) | SOME _ => fail "Incomplete type for union ref" @@ -243,7 +243,7 @@ | Ast.Ellipses => fail "Cannot initialize ellipses" diff -Naur ckit/src/ast/pp/pp-ast-adornment-sig.sml ckit-mlton/src/ast/pp/pp-ast-adornment-sig.sml --- ckit/src/ast/pp/pp-ast-adornment-sig.sml 2000-04-05 14:34:56.000000000 -0400 -+++ ckit-mlton/src/ast/pp/pp-ast-adornment-sig.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/pp/pp-ast-adornment-sig.sml 2006-05-02 22:38:21.000000000 -0400 @@ -1,14 +1,14 @@ (* Copyright (c) 1998 by Lucent Technologies *) @@ -264,7 +264,7 @@ +(* end *) diff -Naur ckit/src/ast/pp/pp-ast-ext-sig.sml ckit-mlton/src/ast/pp/pp-ast-ext-sig.sml --- ckit/src/ast/pp/pp-ast-ext-sig.sml 2000-04-05 14:34:56.000000000 -0400 -+++ ckit-mlton/src/ast/pp/pp-ast-ext-sig.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/pp/pp-ast-ext-sig.sml 2006-05-02 22:38:21.000000000 -0400 @@ -1,13 +1,13 @@ (* Copyright (c) 1998 by Lucent Technologies *) @@ -289,7 +289,7 @@ +(* end *) diff -Naur ckit/src/ast/pp/pp-lib.sml ckit-mlton/src/ast/pp/pp-lib.sml --- ckit/src/ast/pp/pp-lib.sml 2000-04-05 14:34:57.000000000 -0400 -+++ ckit-mlton/src/ast/pp/pp-lib.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/pp/pp-lib.sml 2006-05-02 22:38:21.000000000 -0400 @@ -115,7 +115,10 @@ fun ppId pps ({name,uid,kind,stClass,global,...}: Ast.id) = @@ -304,7 +304,7 @@ | _ => ppSymbol pps (name,uid) diff -Naur ckit/src/ast/sizeof.sml ckit-mlton/src/ast/sizeof.sml --- ckit/src/ast/sizeof.sml 2000-04-05 14:34:55.000000000 -0400 -+++ ckit-mlton/src/ast/sizeof.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/sizeof.sml 2006-05-02 22:38:21.000000000 -0400 @@ -321,7 +321,9 @@ and process (sizesErrWarnBug as {sizes, err, warn, bug}) tidtab ty = case ty @@ -318,7 +318,7 @@ let val {bits,align} = #int sizes diff -Naur ckit/src/ast/type-util-sig.sml ckit-mlton/src/ast/type-util-sig.sml --- ckit/src/ast/type-util-sig.sml 2001-10-31 15:22:41.000000000 -0500 -+++ ckit-mlton/src/ast/type-util-sig.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/type-util-sig.sml 2006-05-02 22:38:21.000000000 -0400 @@ -1,10 +1,10 @@ (* Copyright (c) 1998 by Lucent Technologies *) @@ -340,7 +340,7 @@ +(* end (* local *) *) diff -Naur ckit/src/ast/type-util.sml ckit-mlton/src/ast/type-util.sml --- ckit/src/ast/type-util.sml 2001-10-31 15:22:41.000000000 -0500 -+++ ckit-mlton/src/ast/type-util.sml 2005-08-17 19:41:36.000000000 -0400 ++++ ckit-mlton/src/ast/type-util.sml 2006-05-02 22:38:21.000000000 -0400 @@ -282,7 +282,8 @@ fun isStructOrUnion tidtab ty = case reduceTypedef tidtab ty @@ -393,7 +393,7 @@ ) diff -Naur ckit/src/ckit-lib.mlb ckit-mlton/src/ckit-lib.mlb --- ckit/src/ckit-lib.mlb 1969-12-31 19:00:00.000000000 -0500 -+++ ckit-mlton/src/ckit-lib.mlb 2005-11-21 11:29:39.000000000 -0500 ++++ ckit-mlton/src/ckit-lib.mlb 2006-05-02 23:00:54.000000000 -0400 @@ -0,0 +1,876 @@ + +ann @@ -1271,120 +1271,18541 @@ +end + +end +diff -Naur ckit/src/parser/grammar/c.grm.desc ckit-mlton/src/parser/grammar/c.grm.desc +--- ckit/src/parser/grammar/c.grm.desc 1969-12-31 19:00:00.000000000 -0500 ++++ ckit-mlton/src/parser/grammar/c.grm.desc 2006-05-02 23:00:53.000000000 -0400 +@@ -0,0 +1,10001 @@ ++1 shift/reduce conflict ++ ++error: state 404: shift/reduce conflict (shift ELSE, reduce by rule 18) ++ ++state 0: ++ ++ translationUnit : . tu ++ ++ ++ translationUnit goto 420 ++ tu goto 1 ++ ++ . reduce by rule 1 ++ ++ ++state 1: ++ ++ translationUnit : tu . (reduce by rule 0) ++ tu : tu . externalDeclaration ++ ++ SEMICOLON shift 42 ++ LPAREN shift 41 ++ TIMES shift 40 ++ ID shift 39 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ pointer goto 18 ++ notypeDeclarator goto 17 ++ notypeDirectDeclarator goto 16 ++ declarationSpecifiers goto 15 ++ declarationModifiers goto 14 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ fDefDeclaration goto 7 ++ functionDefinition goto 6 ++ declaration goto 5 ++ declaration1 goto 4 ++ externalDeclaration goto 3 ++ structOrUnion goto 2 ++ ++ . reduce by rule 0 ++ ++ ++state 2: ++ ++ structOrUnionSpecifier : structOrUnion . LCURLY structDeclarationList RCURLY ++ structOrUnionSpecifier : structOrUnion . ID LCURLY structDeclarationList RCURLY ++ structOrUnionSpecifier : structOrUnion . TYPE_NAME LCURLY structDeclarationList RCURLY ++ structOrUnionSpecifier : structOrUnion . ID ++ structOrUnionSpecifier : structOrUnion . TYPE_NAME ++ ++ LCURLY shift 45 ++ ID shift 44 ++ TYPE_NAME shift 43 ++ ++ ++ . error ++ ++ ++state 3: ++ ++ tu : tu externalDeclaration . (reduce by rule 2) ++ ++ ++ ++ . reduce by rule 2 ++ ++ ++state 4: ++ ++ declaration : declaration1 . SEMICOLON ++ ++ SEMICOLON shift 46 ++ ++ ++ . error ++ ++ ++state 5: ++ ++ externalDeclaration : declaration . (reduce by rule 3) ++ ++ ++ ++ . reduce by rule 3 ++ ++ ++state 6: ++ ++ externalDeclaration : functionDefinition . (reduce by rule 5) ++ ++ ++ ++ . reduce by rule 5 ++ ++ ++state 7: ++ ++ functionDefinition : fDefDeclaration . compoundStatement ++ functionDefinition : fDefDeclaration . declarationList compoundStatement ++ ++ LCURLY shift 52 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ compoundStatement goto 51 ++ declarationSpecifiers goto 50 ++ declarationModifiers goto 49 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ declarationList goto 48 ++ declaration goto 47 ++ declaration1 goto 4 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 8: ++ ++ typeSpecifier : structOrUnionSpecifier . (reduce by rule 119) ++ ++ ++ ++ . reduce by rule 119 ++ ++ ++state 9: ++ ++ typeSpecifier : enumSpecifier . (reduce by rule 120) ++ ++ ++ ++ . reduce by rule 120 ++ ++ ++state 10: ++ ++ declarationModifiers : typeQualifier . (reduce by rule 110) ++ ++ ++ ++ . reduce by rule 110 ++ ++ ++state 11: ++ ++ typeSpecifier : typeSpecifierReserved . (reduce by rule 118) ++ ++ ++ ++ . reduce by rule 118 ++ ++ ++state 12: ++ ++ declarationSpecifiers : typeSpecifier . reservedDeclarationSpecifier ++ ++ ++ reservedDeclarationSpecifier goto 53 ++ ++ . reduce by rule 101 ++ ++ ++state 13: ++ ++ declarationModifiers : storageClassSpecifier . (reduce by rule 108) ++ ++ ++ ++ . reduce by rule 108 ++ ++ ++state 14: ++ ++ declarationSpecifiers : declarationModifiers . typeSpecifier reservedDeclarationSpecifier ++ declarationModifiers : declarationModifiers . storageClassSpecifier ++ declarationModifiers : declarationModifiers . typeQualifier ++ fDefDeclaration : declarationModifiers . notypeDeclarator ++ declaration1 : declarationModifiers . notypeInitDeclaratorList ++ ++ LPAREN shift 41 ++ TIMES shift 40 ++ ID shift 39 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ notypeInitDeclarator goto 59 ++ notypeInitDeclaratorList goto 58 ++ pointer goto 18 ++ notypeDeclarator goto 57 ++ notypeDirectDeclarator goto 16 ++ storageClassSpecifier goto 56 ++ typeSpecifier goto 55 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 54 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 15: ++ ++ fDefDeclaration : declarationSpecifiers . declarator ++ declaration1 : declarationSpecifiers . (reduce by rule 23) ++ declaration1 : declarationSpecifiers . initDeclaratorList ++ ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ initDeclarator goto 66 ++ initDeclaratorList goto 65 ++ pointer goto 64 ++ declarator goto 63 ++ aftertypeDeclarator goto 62 ++ notypeDeclarator goto 61 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ ++ . reduce by rule 23 ++ ++ ++state 16: ++ ++ notypeDeclarator : notypeDirectDeclarator . (reduce by rule 182) ++ notypeDirectDeclarator : notypeDirectDeclarator . LBRACE RBRACE ++ notypeDirectDeclarator : notypeDirectDeclarator . LBRACE expr RBRACE ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN parameterTypeList RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN identlist RPAREN ++ ++ LPAREN shift 70 ++ LBRACE shift 69 ++ ++ ++ . reduce by rule 182 ++ ++ ++state 17: ++ ++ fDefDeclaration : notypeDeclarator . (reduce by rule 218) ++ ++ ++ ++ . reduce by rule 218 ++ ++ ++state 18: ++ ++ notypeDeclarator : pointer . notypeDirectDeclarator ++ ++ LPAREN shift 41 ++ ID shift 39 ++ ++ notypeDirectDeclarator goto 71 ++ ++ . error ++ ++ ++state 19: ++ ++ typeSpecifier : TYPE_NAME . (reduce by rule 121) ++ ++ ++ ++ . reduce by rule 121 ++ ++ ++state 20: ++ ++ storageClassSpecifier : TYPEDEF . (reduce by rule 167) ++ ++ ++ ++ . reduce by rule 167 ++ ++ ++state 21: ++ ++ typeSpecifierReserved : VOID . (reduce by rule 122) ++ ++ ++ ++ . reduce by rule 122 ++ ++ ++state 22: ++ ++ typeSpecifierReserved : SIGNED . (reduce by rule 129) ++ ++ ++ ++ . reduce by rule 129 ++ ++ ++state 23: ++ ++ typeSpecifierReserved : UNSIGNED . (reduce by rule 130) ++ ++ ++ ++ . reduce by rule 130 ++ ++ ++state 24: ++ ++ structOrUnion : UNION . (reduce by rule 137) ++ ++ ++ ++ . reduce by rule 137 ++ ++ ++state 25: ++ ++ structOrUnion : STRUCT . (reduce by rule 136) ++ ++ ++ ++ . reduce by rule 136 ++ ++ ++state 26: ++ ++ typeSpecifierReserved : SHORT . (reduce by rule 124) ++ ++ ++ ++ . reduce by rule 124 ++ ++ ++state 27: ++ ++ typeSpecifierReserved : LONG . (reduce by rule 126) ++ ++ ++ ++ . reduce by rule 126 ++ ++ ++state 28: ++ ++ typeSpecifierReserved : INT . (reduce by rule 125) ++ ++ ++ ++ . reduce by rule 125 ++ ++ ++state 29: ++ ++ typeSpecifierReserved : FLOAT . (reduce by rule 127) ++ ++ ++ ++ . reduce by rule 127 ++ ++ ++state 30: ++ ++ enumSpecifier : ENUM . LCURLY enumeratorList trailingComma RCURLY ++ enumSpecifier : ENUM . ID LCURLY enumeratorList trailingComma RCURLY ++ enumSpecifier : ENUM . TYPE_NAME LCURLY enumeratorList trailingComma RCURLY ++ enumSpecifier : ENUM . ID ++ enumSpecifier : ENUM . TYPE_NAME ++ ++ LCURLY shift 74 ++ ID shift 73 ++ TYPE_NAME shift 72 ++ ++ ++ . error ++ ++ ++state 31: ++ ++ typeSpecifierReserved : DOUBLE . (reduce by rule 128) ++ ++ ++ ++ . reduce by rule 128 ++ ++ ++state 32: ++ ++ typeSpecifierReserved : CHAR . (reduce by rule 123) ++ ++ ++ ++ . reduce by rule 123 ++ ++ ++state 33: ++ ++ typeQualifier : VOLATILE . (reduce by rule 153) ++ ++ ++ ++ . reduce by rule 153 ++ ++ ++state 34: ++ ++ typeQualifier : CONST . (reduce by rule 152) ++ ++ ++ ++ . reduce by rule 152 ++ ++ ++state 35: ++ ++ storageClassSpecifier : REGISTER . (reduce by rule 166) ++ ++ ++ ++ . reduce by rule 166 ++ ++ ++state 36: ++ ++ storageClassSpecifier : STATIC . (reduce by rule 164) ++ ++ ++ ++ . reduce by rule 164 ++ ++ ++state 37: ++ ++ storageClassSpecifier : AUTO . (reduce by rule 165) ++ ++ ++ ++ . reduce by rule 165 ++ ++ ++state 38: ++ ++ storageClassSpecifier : EXTERN . (reduce by rule 163) ++ ++ ++ ++ . reduce by rule 163 ++ ++ ++state 39: ++ ++ notypeDirectDeclarator : ID . (reduce by rule 197) ++ ++ ++ ++ . reduce by rule 197 ++ ++ ++state 40: ++ ++ pointer : TIMES . (reduce by rule 186) ++ pointer : TIMES . typeQualifierList ++ pointer : TIMES . pointer ++ pointer : TIMES . typeQualifierList pointer ++ ++ TIMES shift 40 ++ CONST shift 34 ++ VOLATILE shift 33 ++ ++ pointer goto 77 ++ typeQualifier goto 76 ++ typeQualifierList goto 75 ++ ++ . reduce by rule 186 ++ ++ ++state 41: ++ ++ notypeDirectDeclarator : LPAREN . notypeDeclarator RPAREN ++ ++ LPAREN shift 41 ++ TIMES shift 40 ++ ID shift 39 ++ ++ pointer goto 18 ++ notypeDeclarator goto 78 ++ notypeDirectDeclarator goto 16 ++ ++ . error ++ ++ ++state 42: ++ ++ externalDeclaration : SEMICOLON . (reduce by rule 4) ++ ++ ++ ++ . reduce by rule 4 ++ ++ ++state 43: ++ ++ structOrUnionSpecifier : structOrUnion TYPE_NAME . LCURLY structDeclarationList RCURLY ++ structOrUnionSpecifier : structOrUnion TYPE_NAME . (reduce by rule 135) ++ ++ LCURLY shift 79 ++ ++ ++ . reduce by rule 135 ++ ++ ++state 44: ++ ++ structOrUnionSpecifier : structOrUnion ID . LCURLY structDeclarationList RCURLY ++ structOrUnionSpecifier : structOrUnion ID . (reduce by rule 134) ++ ++ LCURLY shift 80 ++ ++ ++ . reduce by rule 134 ++ ++ ++state 45: ++ ++ structOrUnionSpecifier : structOrUnion LCURLY . structDeclarationList RCURLY ++ ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclarationList goto 82 ++ structDeclaration goto 81 ++ ++ . error ++ ++ ++state 46: ++ ++ declaration : declaration1 SEMICOLON . (reduce by rule 22) ++ ++ ++ ++ . reduce by rule 22 ++ ++ ++state 47: ++ ++ declarationList : declaration . (reduce by rule 214) ++ ++ ++ ++ . reduce by rule 214 ++ ++ ++state 48: ++ ++ declarationList : declarationList . declaration ++ functionDefinition : fDefDeclaration declarationList . compoundStatement ++ ++ LCURLY shift 52 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ compoundStatement goto 87 ++ declarationSpecifiers goto 50 ++ declarationModifiers goto 49 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ declaration goto 86 ++ declaration1 goto 4 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 49: ++ ++ declarationSpecifiers : declarationModifiers . typeSpecifier reservedDeclarationSpecifier ++ declarationModifiers : declarationModifiers . storageClassSpecifier ++ declarationModifiers : declarationModifiers . typeQualifier ++ declaration1 : declarationModifiers . notypeInitDeclaratorList ++ ++ LPAREN shift 41 ++ TIMES shift 40 ++ ID shift 39 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ notypeInitDeclarator goto 59 ++ notypeInitDeclaratorList goto 58 ++ pointer goto 18 ++ notypeDeclarator goto 88 ++ notypeDirectDeclarator goto 16 ++ storageClassSpecifier goto 56 ++ typeSpecifier goto 55 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 54 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 50: ++ ++ declaration1 : declarationSpecifiers . (reduce by rule 23) ++ declaration1 : declarationSpecifiers . initDeclaratorList ++ ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ initDeclarator goto 66 ++ initDeclaratorList goto 65 ++ pointer goto 64 ++ declarator goto 89 ++ aftertypeDeclarator goto 62 ++ notypeDeclarator goto 61 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ ++ . reduce by rule 23 ++ ++ ++state 51: ++ ++ functionDefinition : fDefDeclaration compoundStatement . (reduce by rule 221) ++ ++ ++ ++ . reduce by rule 221 ++ ++ ++state 52: ++ ++ compoundStatement : LCURLY . pushScope declarationList ostatementlist popScope RCURLY ++ compoundStatement : LCURLY . ostatementlist RCURLY ++ ++ SEMICOLON shift 125 ++ LPAREN shift 124 ++ LCURLY shift 52 ++ RCURLY reduce by rule 27 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 115 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ EXTERN reduce by rule 245 ++ AUTO reduce by rule 245 ++ STATIC reduce by rule 245 ++ REGISTER reduce by rule 245 ++ CONST reduce by rule 245 ++ VOLATILE reduce by rule 245 ++ IF shift 110 ++ FOR shift 109 ++ DO shift 108 ++ SWITCH shift 107 ++ CASE shift 106 ++ DEFAULT shift 105 ++ WHILE shift 104 ++ RETURN shift 103 ++ BREAK shift 102 ++ CONTINUE shift 101 ++ GOTO shift 100 ++ CHAR reduce by rule 245 ++ DOUBLE reduce by rule 245 ++ ENUM reduce by rule 245 ++ FLOAT reduce by rule 245 ++ INT reduce by rule 245 ++ LONG reduce by rule 245 ++ SHORT reduce by rule 245 ++ STRUCT reduce by rule 245 ++ UNION reduce by rule 245 ++ UNSIGNED reduce by rule 245 ++ SIGNED reduce by rule 245 ++ VOID reduce by rule 245 ++ SIZEOF shift 99 ++ TYPEDEF reduce by rule 245 ++ TYPE_NAME reduce by rule 245 ++ ++ statement goto 98 ++ ostatementlist goto 97 ++ statementlist goto 96 ++ compoundStatement goto 95 ++ expr goto 94 ++ exprWComma goto 93 ++ unaryOperator goto 92 ++ pushScope goto 91 ++ strings goto 90 ++ ++ . error ++ ++ ++state 53: ++ ++ declarationSpecifiers : typeSpecifier reservedDeclarationSpecifier . (reduce by rule 99) ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier . specifierQualifierReserved ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier . storageClassSpecifier ++ ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ ++ specifierQualifierReserved goto 131 ++ storageClassSpecifier goto 130 ++ typeSpecifierReserved goto 129 ++ typeQualifier goto 128 ++ enumSpecifier goto 127 ++ structOrUnionSpecifier goto 126 ++ structOrUnion goto 2 ++ ++ . reduce by rule 99 ++ ++ ++state 54: ++ ++ declarationModifiers : declarationModifiers typeQualifier . (reduce by rule 111) ++ ++ ++ ++ . reduce by rule 111 ++ ++ ++state 55: ++ ++ declarationSpecifiers : declarationModifiers typeSpecifier . reservedDeclarationSpecifier ++ ++ ++ reservedDeclarationSpecifier goto 132 ++ ++ . reduce by rule 101 ++ ++ ++state 56: ++ ++ declarationModifiers : declarationModifiers storageClassSpecifier . (reduce by rule 109) ++ ++ ++ ++ . reduce by rule 109 ++ ++ ++state 57: ++ ++ notypeInitDeclarator : notypeDeclarator . (reduce by rule 176) ++ notypeInitDeclarator : notypeDeclarator . EQUALS initializer ++ fDefDeclaration : declarationModifiers notypeDeclarator . (reduce by rule 220) ++ ++ SEMICOLON reduce by rule 176 ++ LCURLY reduce by rule 220 ++ COMMA reduce by rule 176 ++ EQUALS shift 133 ++ EXTERN reduce by rule 220 ++ AUTO reduce by rule 220 ++ STATIC reduce by rule 220 ++ REGISTER reduce by rule 220 ++ CONST reduce by rule 220 ++ VOLATILE reduce by rule 220 ++ CHAR reduce by rule 220 ++ DOUBLE reduce by rule 220 ++ ENUM reduce by rule 220 ++ FLOAT reduce by rule 220 ++ INT reduce by rule 220 ++ LONG reduce by rule 220 ++ SHORT reduce by rule 220 ++ STRUCT reduce by rule 220 ++ UNION reduce by rule 220 ++ UNSIGNED reduce by rule 220 ++ SIGNED reduce by rule 220 ++ VOID reduce by rule 220 ++ TYPEDEF reduce by rule 220 ++ TYPE_NAME reduce by rule 220 ++ ++ ++ . error ++ ++ ++state 58: ++ ++ notypeInitDeclaratorList : notypeInitDeclaratorList . COMMA initDeclarator ++ declaration1 : declarationModifiers notypeInitDeclaratorList . (reduce by rule 25) ++ ++ COMMA shift 134 ++ ++ ++ . reduce by rule 25 ++ ++ ++state 59: ++ ++ notypeInitDeclaratorList : notypeInitDeclarator . (reduce by rule 174) ++ ++ ++ ++ . reduce by rule 174 ++ ++ ++state 60: ++ ++ aftertypeDeclarator : aftertypeDirectDeclarator . (reduce by rule 180) ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LBRACE RBRACE ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LBRACE expr RBRACE ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN parameterTypeList RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN identlist RPAREN ++ ++ LPAREN shift 136 ++ LBRACE shift 135 ++ ++ ++ . reduce by rule 180 ++ ++ ++state 61: ++ ++ declarator : notypeDeclarator . (reduce by rule 179) ++ ++ ++ ++ . reduce by rule 179 ++ ++ ++state 62: ++ ++ declarator : aftertypeDeclarator . (reduce by rule 178) ++ ++ ++ ++ . reduce by rule 178 ++ ++ ++state 63: ++ ++ initDeclarator : declarator . (reduce by rule 172) ++ initDeclarator : declarator . EQUALS initializer ++ fDefDeclaration : declarationSpecifiers declarator . (reduce by rule 219) ++ ++ SEMICOLON reduce by rule 172 ++ LCURLY reduce by rule 219 ++ COMMA reduce by rule 172 ++ EQUALS shift 137 ++ EXTERN reduce by rule 219 ++ AUTO reduce by rule 219 ++ STATIC reduce by rule 219 ++ REGISTER reduce by rule 219 ++ CONST reduce by rule 219 ++ VOLATILE reduce by rule 219 ++ CHAR reduce by rule 219 ++ DOUBLE reduce by rule 219 ++ ENUM reduce by rule 219 ++ FLOAT reduce by rule 219 ++ INT reduce by rule 219 ++ LONG reduce by rule 219 ++ SHORT reduce by rule 219 ++ STRUCT reduce by rule 219 ++ UNION reduce by rule 219 ++ UNSIGNED reduce by rule 219 ++ SIGNED reduce by rule 219 ++ VOID reduce by rule 219 ++ TYPEDEF reduce by rule 219 ++ TYPE_NAME reduce by rule 219 ++ ++ ++ . error ++ ++ ++state 64: ++ ++ aftertypeDeclarator : pointer . aftertypeDirectDeclarator ++ notypeDeclarator : pointer . notypeDirectDeclarator ++ ++ LPAREN shift 68 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ aftertypeDirectDeclarator goto 138 ++ notypeDirectDeclarator goto 71 ++ ++ . error ++ ++ ++state 65: ++ ++ initDeclaratorList : initDeclaratorList . COMMA initDeclarator ++ declaration1 : declarationSpecifiers initDeclaratorList . (reduce by rule 24) ++ ++ COMMA shift 139 ++ ++ ++ . reduce by rule 24 ++ ++ ++state 66: ++ ++ initDeclaratorList : initDeclarator . (reduce by rule 170) ++ ++ ++ ++ . reduce by rule 170 ++ ++ ++state 67: ++ ++ aftertypeDirectDeclarator : TYPE_NAME . (reduce by rule 190) ++ ++ ++ ++ . reduce by rule 190 ++ ++ ++state 68: ++ ++ aftertypeDirectDeclarator : LPAREN . aftertypeDeclarator RPAREN ++ notypeDirectDeclarator : LPAREN . notypeDeclarator RPAREN ++ ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ pointer goto 64 ++ aftertypeDeclarator goto 140 ++ notypeDeclarator goto 78 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ ++ . error ++ ++ ++state 69: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LBRACE . RBRACE ++ notypeDirectDeclarator : notypeDirectDeclarator LBRACE . expr RBRACE ++ ++ LPAREN shift 124 ++ RBRACE shift 143 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 141 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 70: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN . RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN . parameterTypeList RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN . identlist RPAREN ++ ++ RPAREN shift 151 ++ ID shift 150 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ declarationSpecifiers goto 149 ++ declarationModifiers goto 148 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ identlist goto 147 ++ parameterList goto 146 ++ parameterTypeList goto 145 ++ parameterDeclaration goto 144 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 71: ++ ++ notypeDeclarator : pointer notypeDirectDeclarator . (reduce by rule 183) ++ notypeDirectDeclarator : notypeDirectDeclarator . LBRACE RBRACE ++ notypeDirectDeclarator : notypeDirectDeclarator . LBRACE expr RBRACE ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN parameterTypeList RPAREN ++ notypeDirectDeclarator : notypeDirectDeclarator . LPAREN identlist RPAREN ++ ++ LPAREN shift 70 ++ LBRACE shift 69 ++ ++ ++ . reduce by rule 183 ++ ++ ++state 72: ++ ++ enumSpecifier : ENUM TYPE_NAME . LCURLY enumeratorList trailingComma RCURLY ++ enumSpecifier : ENUM TYPE_NAME . (reduce by rule 158) ++ ++ LCURLY shift 152 ++ ++ ++ . reduce by rule 158 ++ ++ ++state 73: ++ ++ enumSpecifier : ENUM ID . LCURLY enumeratorList trailingComma RCURLY ++ enumSpecifier : ENUM ID . (reduce by rule 157) ++ ++ LCURLY shift 153 ++ ++ ++ . reduce by rule 157 ++ ++ ++state 74: ++ ++ enumSpecifier : ENUM LCURLY . enumeratorList trailingComma RCURLY ++ ++ ID shift 156 ++ ++ enumeratorList goto 155 ++ enumerator goto 154 ++ ++ . error ++ ++ ++state 75: ++ ++ pointer : TIMES typeQualifierList . (reduce by rule 187) ++ pointer : TIMES typeQualifierList . pointer ++ ++ TIMES shift 40 ++ ++ pointer goto 157 ++ ++ . reduce by rule 187 ++ ++ ++state 76: ++ ++ typeQualifierList : typeQualifier . (reduce by rule 116) ++ typeQualifierList : typeQualifier . typeQualifierList ++ ++ CONST shift 34 ++ VOLATILE shift 33 ++ ++ typeQualifier goto 76 ++ typeQualifierList goto 158 ++ ++ . reduce by rule 116 ++ ++ ++state 77: ++ ++ pointer : TIMES pointer . (reduce by rule 188) ++ ++ ++ ++ . reduce by rule 188 ++ ++ ++state 78: ++ ++ notypeDirectDeclarator : LPAREN notypeDeclarator . RPAREN ++ ++ RPAREN shift 159 ++ ++ ++ . error ++ ++ ++state 79: ++ ++ structOrUnionSpecifier : structOrUnion TYPE_NAME LCURLY . structDeclarationList RCURLY ++ ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclarationList goto 160 ++ structDeclaration goto 81 ++ ++ . error ++ ++ ++state 80: ++ ++ structOrUnionSpecifier : structOrUnion ID LCURLY . structDeclarationList RCURLY ++ ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclarationList goto 161 ++ structDeclaration goto 81 ++ ++ . error ++ ++ ++state 81: ++ ++ structDeclarationList : structDeclaration . (reduce by rule 138) ++ ++ ++ ++ . reduce by rule 138 ++ ++ ++state 82: ++ ++ structOrUnionSpecifier : structOrUnion LCURLY structDeclarationList . RCURLY ++ structDeclarationList : structDeclarationList . structDeclaration ++ ++ RCURLY shift 163 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclaration goto 162 ++ ++ . error ++ ++ ++state 83: ++ ++ structDeclaration : specifierQualifierList . structDeclaratorList SEMICOLON ++ ++ COLON shift 167 ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ pointer goto 64 ++ declarator goto 166 ++ aftertypeDeclarator goto 62 ++ notypeDeclarator goto 61 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ structDeclarator goto 165 ++ structDeclaratorList goto 164 ++ ++ . error ++ ++ ++state 84: ++ ++ specifierQualifierList : typeQualifierList . typeSpecifier reservedSpecifierQualifiers ++ structDeclaration : typeQualifierList . notypeStructDeclaratorList SEMICOLON ++ ++ COLON shift 172 ++ LPAREN shift 41 ++ TIMES shift 40 ++ ID shift 39 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ pointer goto 18 ++ notypeDeclarator goto 171 ++ notypeDirectDeclarator goto 16 ++ typeSpecifier goto 170 ++ typeSpecifierReserved goto 11 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ notypeStructDeclarator goto 169 ++ notypeStructDeclaratorList goto 168 ++ ++ . error ++ ++ ++state 85: ++ ++ specifierQualifierList : typeSpecifier . reservedSpecifierQualifiers ++ ++ ++ reservedSpecifierQualifiers goto 173 ++ ++ . reduce by rule 114 ++ ++ ++state 86: ++ ++ declarationList : declarationList declaration . (reduce by rule 215) ++ ++ ++ ++ . reduce by rule 215 ++ ++ ++state 87: ++ ++ functionDefinition : fDefDeclaration declarationList compoundStatement . (reduce by rule 222) ++ ++ ++ ++ . reduce by rule 222 ++ ++ ++state 88: ++ ++ notypeInitDeclarator : notypeDeclarator . (reduce by rule 176) ++ notypeInitDeclarator : notypeDeclarator . EQUALS initializer ++ ++ EQUALS shift 133 ++ ++ ++ . reduce by rule 176 ++ ++ ++state 89: ++ ++ initDeclarator : declarator . (reduce by rule 172) ++ initDeclarator : declarator . EQUALS initializer ++ ++ EQUALS shift 137 ++ ++ ++ . reduce by rule 172 ++ ++ ++state 90: ++ ++ expr : strings . (reduce by rule 88) ++ ++ ++ ++ . reduce by rule 88 ++ ++ ++state 91: ++ ++ compoundStatement : LCURLY pushScope . declarationList ostatementlist popScope RCURLY ++ ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ declarationSpecifiers goto 50 ++ declarationModifiers goto 49 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ declarationList goto 174 ++ declaration goto 47 ++ declaration1 goto 4 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 92: ++ ++ expr : unaryOperator . expr ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 175 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 93: ++ ++ statement : exprWComma . SEMICOLON ++ exprWComma : exprWComma . COMMA expr ++ ++ SEMICOLON shift 177 ++ COMMA shift 176 ++ ++ ++ . error ++ ++ ++state 94: ++ ++ expr : expr . QUESTION exprWComma COLON expr ++ expr : expr . PLUSEQUALS expr ++ expr : expr . MINUSEQUALS expr ++ expr : expr . TIMESEQUALS expr ++ expr : expr . DIVEQUALS expr ++ expr : expr . MODEQUALS expr ++ expr : expr . XOREQUALS expr ++ expr : expr . OREQUALS expr ++ expr : expr . ANDEQUALS expr ++ expr : expr . LSHIFTEQUALS expr ++ expr : expr . RSHIFTEQUALS expr ++ expr : expr . EQUALS expr ++ expr : expr . OR expr ++ expr : expr . AND expr ++ expr : expr . BAR expr ++ expr : expr . HAT expr ++ expr : expr . AMP expr ++ expr : expr . EQ expr ++ expr : expr . NEQ expr ++ expr : expr . LT expr ++ expr : expr . GT expr ++ expr : expr . LTE expr ++ expr : expr . GTE expr ++ expr : expr . LSHIFT expr ++ expr : expr . RSHIFT expr ++ expr : expr . PLUS expr ++ expr : expr . MINUS expr ++ expr : expr . TIMES expr ++ expr : expr . DIVIDE expr ++ expr : expr . PERCENT expr ++ expr : expr . INC ++ expr : expr . DEC ++ expr : expr . LBRACE exprWComma RBRACE ++ expr : expr . LPAREN RPAREN ++ expr : expr . LPAREN argumentExprList RPAREN ++ expr : expr . DOT ID ++ expr : expr . ARROW ID ++ expr : expr . DOT TYPE_NAME ++ expr : expr . ARROW TYPE_NAME ++ exprWComma : expr . (reduce by rule 91) ++ ++ LPAREN shift 213 ++ LBRACE shift 212 ++ DOT shift 211 ++ QUESTION shift 210 ++ PERCENT shift 209 ++ AMP shift 208 ++ BAR shift 207 ++ DIVIDE shift 206 ++ PLUS shift 205 ++ MINUS shift 204 ++ HAT shift 203 ++ TIMES shift 202 ++ INC shift 201 ++ DEC shift 200 ++ ARROW shift 199 ++ EQUALS shift 198 ++ PLUSEQUALS shift 197 ++ MINUSEQUALS shift 196 ++ XOREQUALS shift 195 ++ MODEQUALS shift 194 ++ TIMESEQUALS shift 193 ++ DIVEQUALS shift 192 ++ OREQUALS shift 191 ++ ANDEQUALS shift 190 ++ LSHIFTEQUALS shift 189 ++ RSHIFTEQUALS shift 188 ++ LTE shift 187 ++ GTE shift 186 ++ LT shift 185 ++ GT shift 184 ++ EQ shift 183 ++ NEQ shift 182 ++ OR shift 181 ++ AND shift 180 ++ LSHIFT shift 179 ++ RSHIFT shift 178 ++ ++ ++ . reduce by rule 91 ++ ++ ++state 95: ++ ++ statement : compoundStatement . (reduce by rule 14) ++ ++ ++ ++ . reduce by rule 14 ++ ++ ++state 96: ++ ++ ostatementlist : statementlist . (reduce by rule 26) ++ statementlist : statementlist . statement ++ ++ SEMICOLON shift 125 ++ LPAREN shift 124 ++ LCURLY shift 52 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 115 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ IF shift 110 ++ FOR shift 109 ++ DO shift 108 ++ SWITCH shift 107 ++ CASE shift 106 ++ DEFAULT shift 105 ++ WHILE shift 104 ++ RETURN shift 103 ++ BREAK shift 102 ++ CONTINUE shift 101 ++ GOTO shift 100 ++ SIZEOF shift 99 ++ ++ statement goto 214 ++ compoundStatement goto 95 ++ expr goto 94 ++ exprWComma goto 93 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . reduce by rule 26 ++ ++ ++state 97: ++ ++ compoundStatement : LCURLY ostatementlist . RCURLY ++ ++ RCURLY shift 215 ++ ++ ++ . error ++ ++ ++state 98: ++ ++ statementlist : statement . (reduce by rule 28) ++ ++ ++ ++ . reduce by rule 28 ++ ++ ++state 99: ++ ++ expr : SIZEOF . expr ++ expr : SIZEOF . LPAREN typeName RPAREN ++ ++ LPAREN shift 217 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 216 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 100: ++ ++ statement : GOTO . ID SEMICOLON ++ ++ ID shift 218 ++ ++ ++ . error ++ ++ ++state 101: ++ ++ statement : CONTINUE . SEMICOLON ++ ++ SEMICOLON shift 219 ++ ++ ++ . error ++ ++ ++state 102: ++ ++ statement : BREAK . SEMICOLON ++ ++ SEMICOLON shift 220 ++ ++ ++ . error ++ ++ ++state 103: ++ ++ statement : RETURN . opExpr SEMICOLON ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 94 ++ opExpr goto 222 ++ exprWComma goto 221 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . reduce by rule 93 ++ ++ ++state 104: ++ ++ statement : WHILE . LPAREN exprWComma RPAREN statement ++ ++ LPAREN shift 223 ++ ++ ++ . error ++ ++ ++state 105: ++ ++ statement : DEFAULT . COLON statement ++ ++ COLON shift 224 ++ ++ ++ . error ++ ++ ++state 106: ++ ++ statement : CASE . exprWComma COLON statement ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 94 ++ exprWComma goto 225 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 107: ++ ++ statement : SWITCH . LPAREN exprWComma RPAREN statement ++ ++ LPAREN shift 226 ++ ++ ++ . error ++ ++ ++state 108: ++ ++ statement : DO . statement WHILE LPAREN exprWComma RPAREN SEMICOLON ++ ++ SEMICOLON shift 125 ++ LPAREN shift 124 ++ LCURLY shift 52 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 115 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ IF shift 110 ++ FOR shift 109 ++ DO shift 108 ++ SWITCH shift 107 ++ CASE shift 106 ++ DEFAULT shift 105 ++ WHILE shift 104 ++ RETURN shift 103 ++ BREAK shift 102 ++ CONTINUE shift 101 ++ GOTO shift 100 ++ SIZEOF shift 99 ++ ++ statement goto 227 ++ compoundStatement goto 95 ++ expr goto 94 ++ exprWComma goto 93 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 109: ++ ++ statement : FOR . LPAREN opExpr SEMICOLON opExpr SEMICOLON opExpr RPAREN statement ++ ++ LPAREN shift 228 ++ ++ ++ . error ++ ++ ++state 110: ++ ++ statement : IF . LPAREN exprWComma RPAREN statement ++ statement : IF . LPAREN exprWComma RPAREN statement ELSE statement ++ ++ LPAREN shift 229 ++ ++ ++ . error ++ ++ ++state 111: ++ ++ expr : CCONST . (reduce by rule 86) ++ ++ ++ ++ . reduce by rule 86 ++ ++ ++state 112: ++ ++ strings : STRING . (reduce by rule 89) ++ strings : STRING . strings ++ ++ STRING shift 112 ++ ++ strings goto 230 ++ ++ . reduce by rule 89 ++ ++ ++state 113: ++ ++ expr : REALNUM . (reduce by rule 85) ++ ++ ++ ++ . reduce by rule 85 ++ ++ ++state 114: ++ ++ expr : DECNUM . (reduce by rule 84) ++ ++ ++ ++ . reduce by rule 84 ++ ++ ++state 115: ++ ++ statement : ID . COLON statement ++ expr : ID . (reduce by rule 87) ++ ++ COLON shift 231 ++ ++ ++ . reduce by rule 87 ++ ++ ++state 116: ++ ++ expr : DEC . expr ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 232 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 117: ++ ++ expr : INC . expr ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 233 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 118: ++ ++ unaryOperator : TIMES . (reduce by rule 33) ++ ++ ++ ++ . reduce by rule 33 ++ ++ ++state 119: ++ ++ unaryOperator : BANG . (reduce by rule 37) ++ ++ ++ ++ . reduce by rule 37 ++ ++ ++state 120: ++ ++ unaryOperator : MINUS . (reduce by rule 35) ++ ++ ++ ++ . reduce by rule 35 ++ ++ ++state 121: ++ ++ unaryOperator : PLUS . (reduce by rule 34) ++ ++ ++ ++ . reduce by rule 34 ++ ++ ++state 122: ++ ++ unaryOperator : TILDE . (reduce by rule 36) ++ ++ ++ ++ . reduce by rule 36 ++ ++ ++state 123: ++ ++ unaryOperator : AMP . (reduce by rule 32) ++ ++ ++ ++ . reduce by rule 32 ++ ++ ++state 124: ++ ++ expr : LPAREN . typeName RPAREN expr ++ expr : LPAREN . exprWComma RPAREN ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ SIZEOF shift 99 ++ TYPE_NAME shift 19 ++ ++ expr goto 94 ++ exprWComma goto 237 ++ unaryOperator goto 92 ++ typeName goto 236 ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 235 ++ specifierQualifierList goto 234 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ strings goto 90 ++ ++ . error ++ ++ ++state 125: ++ ++ statement : SEMICOLON . (reduce by rule 21) ++ ++ ++ ++ . reduce by rule 21 ++ ++ ++state 126: ++ ++ specifierQualifierReserved : structOrUnionSpecifier . (reduce by rule 106) ++ ++ ++ ++ . reduce by rule 106 ++ ++ ++state 127: ++ ++ specifierQualifierReserved : enumSpecifier . (reduce by rule 107) ++ ++ ++ ++ . reduce by rule 107 ++ ++ ++state 128: ++ ++ specifierQualifierReserved : typeQualifier . (reduce by rule 105) ++ ++ ++ ++ . reduce by rule 105 ++ ++ ++state 129: ++ ++ specifierQualifierReserved : typeSpecifierReserved . (reduce by rule 104) ++ ++ ++ ++ . reduce by rule 104 ++ ++ ++state 130: ++ ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier storageClassSpecifier . (reduce by rule 103) ++ ++ ++ ++ . reduce by rule 103 ++ ++ ++state 131: ++ ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier specifierQualifierReserved . (reduce by rule 102) ++ ++ ++ ++ . reduce by rule 102 ++ ++ ++state 132: ++ ++ declarationSpecifiers : declarationModifiers typeSpecifier reservedDeclarationSpecifier . (reduce by rule 100) ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier . specifierQualifierReserved ++ reservedDeclarationSpecifier : reservedDeclarationSpecifier . storageClassSpecifier ++ ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ ++ specifierQualifierReserved goto 131 ++ storageClassSpecifier goto 130 ++ typeSpecifierReserved goto 129 ++ typeQualifier goto 128 ++ enumSpecifier goto 127 ++ structOrUnionSpecifier goto 126 ++ structOrUnion goto 2 ++ ++ . reduce by rule 100 ++ ++ ++state 133: ++ ++ notypeInitDeclarator : notypeDeclarator EQUALS . initializer ++ ++ LPAREN shift 124 ++ LCURLY shift 240 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 239 ++ unaryOperator goto 92 ++ initializer goto 238 ++ strings goto 90 ++ ++ . error ++ ++ ++state 134: ++ ++ notypeInitDeclaratorList : notypeInitDeclaratorList COMMA . initDeclarator ++ ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ initDeclarator goto 241 ++ pointer goto 64 ++ declarator goto 89 ++ aftertypeDeclarator goto 62 ++ notypeDeclarator goto 61 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ ++ . error ++ ++ ++state 135: ++ ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator LBRACE . RBRACE ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator LBRACE . expr RBRACE ++ ++ LPAREN shift 124 ++ RBRACE shift 243 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 242 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 136: ++ ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator LPAREN . RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator LPAREN . parameterTypeList RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator LPAREN . identlist RPAREN ++ ++ RPAREN shift 246 ++ ID shift 150 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ declarationSpecifiers goto 149 ++ declarationModifiers goto 148 ++ storageClassSpecifier goto 13 ++ typeSpecifier goto 12 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 10 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ identlist goto 245 ++ parameterList goto 146 ++ parameterTypeList goto 244 ++ parameterDeclaration goto 144 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 137: ++ ++ initDeclarator : declarator EQUALS . initializer ++ ++ LPAREN shift 124 ++ LCURLY shift 240 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 239 ++ unaryOperator goto 92 ++ initializer goto 247 ++ strings goto 90 ++ ++ . error ++ ++ ++state 138: ++ ++ aftertypeDeclarator : pointer aftertypeDirectDeclarator . (reduce by rule 181) ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LBRACE RBRACE ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LBRACE expr RBRACE ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN parameterTypeList RPAREN ++ aftertypeDirectDeclarator : aftertypeDirectDeclarator . LPAREN identlist RPAREN ++ ++ LPAREN shift 136 ++ LBRACE shift 135 ++ ++ ++ . reduce by rule 181 ++ ++ ++state 139: ++ ++ initDeclaratorList : initDeclaratorList COMMA . initDeclarator ++ ++ LPAREN shift 68 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 67 ++ ++ initDeclarator goto 248 ++ pointer goto 64 ++ declarator goto 89 ++ aftertypeDeclarator goto 62 ++ notypeDeclarator goto 61 ++ aftertypeDirectDeclarator goto 60 ++ notypeDirectDeclarator goto 16 ++ ++ . error ++ ++ ++state 140: ++ ++ aftertypeDirectDeclarator : LPAREN aftertypeDeclarator . RPAREN ++ ++ RPAREN shift 249 ++ ++ ++ . error ++ ++ ++state 141: ++ ++ expr : expr . QUESTION exprWComma COLON expr ++ expr : expr . PLUSEQUALS expr ++ expr : expr . MINUSEQUALS expr ++ expr : expr . TIMESEQUALS expr ++ expr : expr . DIVEQUALS expr ++ expr : expr . MODEQUALS expr ++ expr : expr . XOREQUALS expr ++ expr : expr . OREQUALS expr ++ expr : expr . ANDEQUALS expr ++ expr : expr . LSHIFTEQUALS expr ++ expr : expr . RSHIFTEQUALS expr ++ expr : expr . EQUALS expr ++ expr : expr . OR expr ++ expr : expr . AND expr ++ expr : expr . BAR expr ++ expr : expr . HAT expr ++ expr : expr . AMP expr ++ expr : expr . EQ expr ++ expr : expr . NEQ expr ++ expr : expr . LT expr ++ expr : expr . GT expr ++ expr : expr . LTE expr ++ expr : expr . GTE expr ++ expr : expr . LSHIFT expr ++ expr : expr . RSHIFT expr ++ expr : expr . PLUS expr ++ expr : expr . MINUS expr ++ expr : expr . TIMES expr ++ expr : expr . DIVIDE expr ++ expr : expr . PERCENT expr ++ expr : expr . INC ++ expr : expr . DEC ++ expr : expr . LBRACE exprWComma RBRACE ++ expr : expr . LPAREN RPAREN ++ expr : expr . LPAREN argumentExprList RPAREN ++ expr : expr . DOT ID ++ expr : expr . ARROW ID ++ expr : expr . DOT TYPE_NAME ++ expr : expr . ARROW TYPE_NAME ++ notypeDirectDeclarator : notypeDirectDeclarator LBRACE expr . RBRACE ++ ++ LPAREN shift 213 ++ LBRACE shift 212 ++ RBRACE shift 250 ++ DOT shift 211 ++ QUESTION shift 210 ++ PERCENT shift 209 ++ AMP shift 208 ++ BAR shift 207 ++ DIVIDE shift 206 ++ PLUS shift 205 ++ MINUS shift 204 ++ HAT shift 203 ++ TIMES shift 202 ++ INC shift 201 ++ DEC shift 200 ++ ARROW shift 199 ++ EQUALS shift 198 ++ PLUSEQUALS shift 197 ++ MINUSEQUALS shift 196 ++ XOREQUALS shift 195 ++ MODEQUALS shift 194 ++ TIMESEQUALS shift 193 ++ DIVEQUALS shift 192 ++ OREQUALS shift 191 ++ ANDEQUALS shift 190 ++ LSHIFTEQUALS shift 189 ++ RSHIFTEQUALS shift 188 ++ LTE shift 187 ++ GTE shift 186 ++ LT shift 185 ++ GT shift 184 ++ EQ shift 183 ++ NEQ shift 182 ++ OR shift 181 ++ AND shift 180 ++ LSHIFT shift 179 ++ RSHIFT shift 178 ++ ++ ++ . error ++ ++ ++state 142: ++ ++ expr : ID . (reduce by rule 87) ++ ++ ++ ++ . reduce by rule 87 ++ ++ ++state 143: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LBRACE RBRACE . (reduce by rule 199) ++ ++ ++ ++ . reduce by rule 199 ++ ++ ++state 144: ++ ++ parameterList : parameterDeclaration . (reduce by rule 237) ++ ++ ++ ++ . reduce by rule 237 ++ ++ ++state 145: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN parameterTypeList . RPAREN ++ ++ RPAREN shift 251 ++ ++ ++ . error ++ ++ ++state 146: ++ ++ parameterList : parameterList . COMMA parameterDeclaration ++ parameterTypeList : parameterList . (reduce by rule 235) ++ parameterTypeList : parameterList . COMMA ELIPSIS ++ ++ COMMA shift 252 ++ ++ ++ . reduce by rule 235 ++ ++ ++state 147: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN identlist . RPAREN ++ identlist : identlist . COMMA ID ++ ++ RPAREN shift 254 ++ COMMA shift 253 ++ ++ ++ . error ++ ++ ++state 148: ++ ++ declarationSpecifiers : declarationModifiers . typeSpecifier reservedDeclarationSpecifier ++ declarationModifiers : declarationModifiers . storageClassSpecifier ++ declarationModifiers : declarationModifiers . typeQualifier ++ parameterDeclaration : declarationModifiers . notypeDeclarator ++ parameterDeclaration : declarationModifiers . abstractDeclarator ++ ++ LPAREN shift 260 ++ LBRACE shift 259 ++ TIMES shift 40 ++ ID shift 39 ++ EXTERN shift 38 ++ AUTO shift 37 ++ STATIC shift 36 ++ REGISTER shift 35 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPEDEF shift 20 ++ TYPE_NAME shift 19 ++ ++ abstractDeclarator goto 258 ++ directAbstractDeclarator goto 257 ++ pointer goto 256 ++ notypeDeclarator goto 255 ++ notypeDirectDeclarator goto 16 ++ storageClassSpecifier goto 56 ++ typeSpecifier goto 55 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 54 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ ++ . error ++ ++ ++state 149: ++ ++ parameterDeclaration : declarationSpecifiers . notypeDeclarator ++ parameterDeclaration : declarationSpecifiers . parmDeclarator ++ parameterDeclaration : declarationSpecifiers . (reduce by rule 241) ++ parameterDeclaration : declarationSpecifiers . abstractDeclarator ++ ++ LPAREN shift 260 ++ LBRACE shift 259 ++ TIMES shift 40 ++ ID shift 39 ++ TYPE_NAME shift 266 ++ ++ abstractDeclarator goto 265 ++ directAbstractDeclarator goto 257 ++ pointer goto 264 ++ notypeDeclarator goto 263 ++ parmDeclarator goto 262 ++ notypeDirectDeclarator goto 16 ++ parmDirectDeclarator goto 261 ++ ++ . reduce by rule 241 ++ ++ ++state 150: ++ ++ identlist : ID . (reduce by rule 216) ++ ++ ++ ++ . reduce by rule 216 ++ ++ ++state 151: ++ ++ notypeDirectDeclarator : notypeDirectDeclarator LPAREN RPAREN . (reduce by rule 201) ++ ++ ++ ++ . reduce by rule 201 ++ ++ ++state 152: ++ ++ enumSpecifier : ENUM TYPE_NAME LCURLY . enumeratorList trailingComma RCURLY ++ ++ ID shift 156 ++ ++ enumeratorList goto 267 ++ enumerator goto 154 ++ ++ . error ++ ++ ++state 153: ++ ++ enumSpecifier : ENUM ID LCURLY . enumeratorList trailingComma RCURLY ++ ++ ID shift 156 ++ ++ enumeratorList goto 268 ++ enumerator goto 154 ++ ++ . error ++ ++ ++state 154: ++ ++ enumeratorList : enumerator . (reduce by rule 160) ++ ++ ++ ++ . reduce by rule 160 ++ ++ ++state 155: ++ ++ enumeratorList : enumeratorList . COMMA enumerator ++ enumSpecifier : ENUM LCURLY enumeratorList . trailingComma RCURLY ++ ++ COMMA shift 270 ++ ++ trailingComma goto 269 ++ ++ . reduce by rule 168 ++ ++ ++state 156: ++ ++ enumerator : ID . (reduce by rule 161) ++ enumerator : ID . EQUALS expr ++ ++ EQUALS shift 271 ++ ++ ++ . reduce by rule 161 ++ ++ ++state 157: ++ ++ pointer : TIMES typeQualifierList pointer . (reduce by rule 189) ++ ++ ++ ++ . reduce by rule 189 ++ ++ ++state 158: ++ ++ typeQualifierList : typeQualifier typeQualifierList . (reduce by rule 117) ++ ++ ++ ++ . reduce by rule 117 ++ ++ ++state 159: ++ ++ notypeDirectDeclarator : LPAREN notypeDeclarator RPAREN . (reduce by rule 198) ++ ++ ++ ++ . reduce by rule 198 ++ ++ ++state 160: ++ ++ structOrUnionSpecifier : structOrUnion TYPE_NAME LCURLY structDeclarationList . RCURLY ++ structDeclarationList : structDeclarationList . structDeclaration ++ ++ RCURLY shift 272 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclaration goto 162 ++ ++ . error ++ ++ ++state 161: ++ ++ structOrUnionSpecifier : structOrUnion ID LCURLY structDeclarationList . RCURLY ++ structDeclarationList : structDeclarationList . structDeclaration ++ ++ RCURLY shift 273 ++ CONST shift 34 ++ VOLATILE shift 33 ++ CHAR shift 32 ++ DOUBLE shift 31 ++ ENUM shift 30 ++ FLOAT shift 29 ++ INT shift 28 ++ LONG shift 27 ++ SHORT shift 26 ++ STRUCT shift 25 ++ UNION shift 24 ++ UNSIGNED shift 23 ++ SIGNED shift 22 ++ VOID shift 21 ++ TYPE_NAME shift 19 ++ ++ typeSpecifier goto 85 ++ typeSpecifierReserved goto 11 ++ typeQualifier goto 76 ++ typeQualifierList goto 84 ++ specifierQualifierList goto 83 ++ enumSpecifier goto 9 ++ structOrUnionSpecifier goto 8 ++ structOrUnion goto 2 ++ structDeclaration goto 162 ++ ++ . error ++ ++ ++state 162: ++ ++ structDeclarationList : structDeclarationList structDeclaration . (reduce by rule 139) ++ ++ ++ ++ . reduce by rule 139 ++ ++ ++state 163: ++ ++ structOrUnionSpecifier : structOrUnion LCURLY structDeclarationList RCURLY . (reduce by rule 131) ++ ++ ++ ++ . reduce by rule 131 ++ ++ ++state 164: ++ ++ structDeclaratorList : structDeclaratorList . COMMA structDeclarator ++ structDeclaration : specifierQualifierList structDeclaratorList . SEMICOLON ++ ++ SEMICOLON shift 275 ++ COMMA shift 274 ++ ++ ++ . error ++ ++ ++state 165: ++ ++ structDeclaratorList : structDeclarator . (reduce by rule 142) ++ ++ ++ ++ . reduce by rule 142 ++ ++ ++state 166: ++ ++ structDeclarator : declarator . (reduce by rule 146) ++ structDeclarator : declarator . COLON expr ++ ++ COLON shift 276 ++ ++ ++ . reduce by rule 146 ++ ++ ++state 167: ++ ++ structDeclarator : COLON . expr ++ ++ LPAREN shift 124 ++ AMP shift 123 ++ TILDE shift 122 ++ PLUS shift 121 ++ MINUS shift 120 ++ BANG shift 119 ++ TIMES shift 118 ++ INC shift 117 ++ DEC shift 116 ++ ID shift 142 ++ DECNUM shift 114 ++ REALNUM shift 113 ++ STRING shift 112 ++ CCONST shift 111 ++ SIZEOF shift 99 ++ ++ expr goto 277 ++ unaryOperator goto 92 ++ strings goto 90 ++ ++ . error ++ ++ ++state 168: ++ ++ notypeStructDeclaratorList : notypeStructDeclaratorList . COMMA structDeclarator ++ structDeclaration : typeQualifierList notypeStructDeclaratorList . SEMICOLON ++ ++ SEMICOLON shift 279 ++ CO... [truncated message content] |