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
|
Oct
|
Nov
|
Dec
|
From: Matthew F. <fl...@ml...> - 2006-05-21 07:32:17
|
Fixed warning on FreeBSD ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.c 2006-05-21 14:31:54 UTC (rev 4557) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.c 2006-05-21 14:32:14 UTC (rev 4558) @@ -18,7 +18,7 @@ size_t ss_size = align (SIGSTKSZ, s->sysvals.pageSize); size_t psize = s->sysvals.pageSize; void *ss_sp = GC_mmapAnon_safe_protect (NULL, 2 * ss_size, psize, psize); - altstack.ss_sp = (unsigned char*)ss_sp + ss_size; + altstack.ss_sp = (typeof(altstack.ss_sp))((pointer)ss_sp + ss_size); altstack.ss_size = ss_size; altstack.ss_flags = 0; sigaltstack (&altstack, NULL); |
From: Matthew F. <fl...@ml...> - 2006-05-21 07:31:55
|
Fine-grained gcc options ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-21 14:26:24 UTC (rev 4556) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-21 14:31:54 UTC (rev 4557) @@ -83,10 +83,11 @@ GCOPTCFLAGS = $(GCOPTFLAGS) WARNCFLAGS = WARNCFLAGS += -pedantic -Wall +ifeq ($(findstring $(GCC_MAJOR_VERSION), 3),$(GCC_MAJOR_VERSION)) +WARNCFLAGS += -W +endif ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Wextra -else -WARNCFLAGS += -W endif # -Wformat=2 implies -Wformat-nonliteral, which causes spurious warnings. WARNCFLAGS += -Wformat=2 |
From: Matthew F. <fl...@ml...> - 2006-05-21 07:26:25
|
Fine-grained gcc options ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-20 12:56:21 UTC (rev 4555) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-21 14:26:24 UTC (rev 4556) @@ -11,30 +11,52 @@ TARGET = self TARGET_ARCH = $(shell ../bin/host-arch) TARGET_OS = $(shell ../bin/host-os) -GCC_VERSION = \ - $(shell gcc -v 2>&1 | grep 'gcc version' | sed 's/.*gcc version \(.\).*/\1/') +GCC_MAJOR_VERSION = \ + $(shell gcc -v 2>&1 | grep 'gcc version' | \ + sed 's/.*gcc version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/') +GCC_MINOR_VERSION = \ + $(shell gcc -v 2>&1 | grep 'gcc version' | \ + sed 's/.*gcc version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/') +GCC_VERSION = $(GCC_MAJOR_VERSION).$(GCC_MINOR_VERSION) -FLAGS = +FLAGS = OPTFLAGS = -fomit-frame-pointer +GCOPTFLAGS = +DEBUGFLAGS = +WARNFLAGS = +OPTWARNFLAGS = +DEBUGWARNFLAGS = ifeq ($(TARGET_ARCH), x86) -ifneq ($(findstring $(GCC_VERSION), 3 4),) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 3 4),$(GCC_MAJOR_VERSION)) FLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5 else FLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5 endif +ifeq ($(findstring $(GCC_VERSION), 3.4 4.0),$(GCC_VERSION)) +GCOPTFLAGS += --param inline-unit-growth=125 --param max-inline-insns-single=1000 endif +DEBUGFLAGS += -gstabs+ +OPTWARNFLAGS += -Winline +endif ifeq ($(TARGET_ARCH), amd64) -ifeq ($(findstring $(GCC_VERSION), 4),4) -FLAGS += -m32 -mtune=opteron -else FLAGS += -m32 +ifeq ($(findstring $(GCC_MAJOR_VERSION), 3),$(GCC_MAJOR_VERSION)) +FLAGS += -mcpu=opteron endif +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) +FLAGS += -mtune=opteron endif +ifeq ($(findstring $(GCC_VERSION), 3.4 4.0),$(GCC_VERSION)) +GCOPTFLAGS += --param inline-unit-growth=75 --param max-inline-insns-single=1000 +endif +DEBUGFLAGS += -gstabs+ +OPTWARNFLAGS += -Winline +endif ifeq ($(TARGET_ARCH), sparc) -FLAGS += -m32 -mcpu=v8 +FLAGS += -m32 -mcpu=v8 -Wa,-xarch=v8plusa endif ifeq ($(TARGET_OS), freebsd) @@ -42,7 +64,7 @@ endif ifeq ($(TARGET_OS), solaris) -FLAGS += -Wa,-xarch=v8plusa -mcpu=ultrasparc -funroll-all-loops +FLAGS += -funroll-all-loops endif ifeq ($(TARGET), self) @@ -57,21 +79,11 @@ CC = gcc -std=gnu99 CFLAGS = -I. -Iplatform $(FLAGS) OPTCFLAGS = $(CFLAGS) -O2 $(OPTFLAGS) -DEBUGCFLAGS = $(CFLAGS) -ifneq ($(TARGET_ARCH), ia64) -ifneq ($(TARGET_ARCH), powerpc) -DEBUGCFLAGS += -gstabs+ -endif -endif -DEBUGCFLAGS += -g2 -O1 -DASSERT=1 -ifeq ($(findstring $(GCC_VERSION), 4),4) -GCOPTCFLAGS = --param inline-unit-growth=75 --param max-inline-insns-single=1000 -else -GCOPTCFLAGS = -endif +DEBUGCFLAGS = $(CFLAGS) -g2 -O1 -DASSERT=1 $(DEBUGFLAGS) +GCOPTCFLAGS = $(GCOPTFLAGS) WARNCFLAGS = WARNCFLAGS += -pedantic -Wall -ifeq ($(findstring $(GCC_VERSION), 4),4) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Wextra else WARNCFLAGS += -W @@ -81,10 +93,10 @@ WARNCFLAGS += -Wno-format-nonliteral # WARNCFLAGS += -Wswitch-default -Wswitch-enum WARNCFLAGS += -Wuninitialized -ifeq ($(findstring $(GCC_VERSION), 4),4) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Winit-self endif -ifeq ($(findstring $(GCC_VERSION), 4),4) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Wstrict-aliasing=2 endif WARNCFLAGS += -Wfloat-equal @@ -96,11 +108,11 @@ # WARNCFLAGS += -Wconversion WARNCFLAGS += -Waggregate-return WARNCFLAGS += -Wstrict-prototypes -ifeq ($(findstring $(GCC_VERSION), 4),4) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Wold-style-definition endif WARNCFLAGS += -Wmissing-prototypes -Wmissing-declarations -ifeq ($(findstring $(GCC_VERSION), 4),4) +ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION)) WARNCFLAGS += -Wmissing-field-initializers endif WARNCFLAGS += -Wmissing-noreturn @@ -110,8 +122,9 @@ WARNCFLAGS += -Wnested-externs WARNCFLAGS += -Wlong-long # WARNCFLAGS += -Wunreachable-code -OPTWARNCFLAGS = $(WARNCFLAGS) -Wdisabled-optimization -DEBUGWARNCFLAGS = $(WARNCFLAGS) +WARNCFLAGS += $(WARNFLAGS) +OPTWARNCFLAGS = $(WARNCFLAGS) -Wdisabled-optimization $(OPTWARNFLAGS) +DEBUGWARNCFLAGS = $(WARNCFLAGS) $(DEBUGWARNFLAGS) UTILCFILES = \ $(shell find util -type f | grep '\.c$$') @@ -257,6 +270,23 @@ %.o: %.S $(CC) $(OPTCFLAGS) -c -o $@ $< +.PHONY: flags +flags: + echo TARGET = $(TARGET) + echo TARGET_ARCH = $(TARGET_ARCH) + echo TARGET_OS = $(TARGET_OS) + echo GCC_MAJOR_VERSION = $(GCC_MAJOR_VERSION) + echo GCC_MINOR_VERSION = $(GCC_MINOR_VERSION) + echo GCC_VERSION = $(GCC_VERSION) + echo FLAGS = $(FLAGS) + echo OPTFLAGS = $(OPTFLAGS) + echo GCOPTFLAGS = $(GCOPTFLAGS) + echo DEBUGFLAGS = $(DEBUGFLAGS) + echo WARNFLAGS = $(WARNFLAGS) + echo OPTWARNFLAGS = $(OPTWARNFLAGS) + echo DEBUGWARNFLAGS = $(DEBUGWARNFLAGS) + + .PHONY: clean clean: ../bin/clean |
From: Matthew F. <fl...@ml...> - 2006-05-20 05:56:22
|
Typo ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-20 02:49:16 UTC (rev 4554) +++ mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-20 12:56:21 UTC (rev 4555) @@ -398,7 +398,7 @@ val castToSysWord = fn w => w end - val infinity: rlim = 0w0 + val infinity: RLim.t = 0w0 type t = int |
From: Matthew F. <fl...@ml...> - 2006-05-19 19:49:17
|
Add directory for platform ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-aix/ ---------------------------------------------------------------------- |
From: Matthew F. <fl...@ml...> - 2006-05-19 19:46:28
|
Merge trunk revisions 4437:4552 into x86_64 branch ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/Makefile U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml U mlton/branches/on-20050822-x86_64-branch/bin/mlton-script U mlton/branches/on-20050822-x86_64-branch/bin/platform U mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis U mlton/branches/on-20050822-x86_64-branch/bytecode/Makefile U mlton/branches/on-20050822-x86_64-branch/doc/changelog U mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/ckit.patch U mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/ckit.tgz U mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/MLRISC.patch U mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/MLRISC.tgz U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/platform.sig U mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/smlnj-lib.patch U mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/smlnj-lib.tgz U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c U mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c A mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.c A mlton/branches/on-20050822-x86_64-branch/runtime/platform/aix.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h A mlton/branches/on-20050822-x86_64-branch/runtime/platform/recv.nonblock.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-20 02:45:54 UTC (rev 4553) @@ -1,4 +1,4 @@ -## Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # Copyright (C) 1997-2000 NEC Research Institute. # @@ -419,7 +419,7 @@ cd "$(TMAN)" && $(GZIP) $(MAN_PAGES); \ fi case "$(TARGET_OS)" in \ - cygwin|darwin|solaris) \ + aix|cygwin|darwin|solaris) \ ;; \ *) \ for f in "$(TLIB)/$(AOUT)$(EXE)" "$(TBIN)/$(LEX)$(EXE)" \ Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig 2006-05-20 02:45:54 UTC (rev 4553) @@ -20,7 +20,8 @@ structure OS: sig datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml 2006-05-20 02:45:54 UTC (rev 4553) @@ -43,7 +43,8 @@ struct open OS - val all = [(Cygwin, "Cygwin"), + val all = [(AIX, "AIX"), + (Cygwin, "Cygwin"), (Darwin, "Darwin"), (FreeBSD, "FreeBSD"), (HPUX, "HPUX"), Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml 2006-05-20 02:45:54 UTC (rev 4553) @@ -154,7 +154,8 @@ structure OS = struct datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX @@ -166,7 +167,8 @@ val host: t = case _const "MLton_Platform_OS_host": String8.string; of - "cygwin" => Cygwin + "aix" => AIX + | "cygwin" => Cygwin | "darwin" => Darwin | "freebsd" => FreeBSD | "hpux" => HPUX Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml 2006-05-20 02:45:54 UTC (rev 4553) @@ -30,7 +30,8 @@ open MLton.Platform.OS in case host of - Cygwin => UNIX + AIX => UNIX + | Cygwin => UNIX | Darwin => MACOS | FreeBSD => UNIX | HPUX => UNIX Modified: mlton/branches/on-20050822-x86_64-branch/bin/mlton-script =================================================================== --- mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-05-20 02:45:54 UTC (rev 4553) @@ -96,10 +96,12 @@ -malign-functions=5 -malign-jumps=2 -malign-loops=2' \ + -target-link-opt aix '-lgmp' \ -target-link-opt amd64 '-m32' \ -target-link-opt cygwin '-lgmp' \ -target-link-opt darwin "$darwinLinkOpts -lgmp" \ -target-link-opt freebsd '-L/usr/local/lib/ -lgmp' \ + -target-link-opt hpux '-lgmp' \ -target-link-opt linux '-lgmp' \ -target-link-opt mingw \ '-lgmp -lws2_32 -lkernel32 -lpsapi -lnetapi32' \ Modified: mlton/branches/on-20050822-x86_64-branch/bin/platform =================================================================== --- mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-20 02:45:54 UTC (rev 4553) @@ -24,8 +24,13 @@ esac uname=`uname` +arch_flag=-m case "$uname" in +AIX) + HOST_OS='aix' + arch_flag=-p +;; CYGWIN*) HOST_OS='cygwin' ;; @@ -58,7 +63,7 @@ ;; esac -arch=`uname -m` +arch=`uname $arch_flag` case "$arch" in alpha*) @@ -90,6 +95,9 @@ # big-endian and little-endian detect via headers HOST_ARCH=mips ;; +powerpc) + HOST_ARCH=powerpc +;; ppc*) HOST_ARCH=powerpc ;; Modified: mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis =================================================================== --- mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-20 02:45:54 UTC (rev 4553) @@ -135,6 +135,9 @@ esac case "$OS" in +aix) + os='AIX' +;; cygwin) os='Cygwin' ;; @@ -209,10 +212,11 @@ structure OS = struct - datatype t = Cygwin | Darwin | FreeBSD | HPUX | Linux | MinGW - | NetBSD | OpenBSD | Solaris + datatype t = AIX | Cygwin | Darwin | FreeBSD | HPUX | Linux + | MinGW | NetBSD | OpenBSD | Solaris - val all = [(Cygwin, "Cygwin"), + val all = [(AIX, "AIX"), + (Cygwin, "Cygwin"), (Darwin, "Darwin"), (FreeBSD, "FreeBSD"), (HPUX, "HPUX"), Modified: mlton/branches/on-20050822-x86_64-branch/bytecode/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/bytecode/Makefile 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/bytecode/Makefile 2006-05-20 02:45:54 UTC (rev 4553) @@ -1,4 +1,4 @@ -## Copyright (C) 2004-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # # MLton is released under a BSD-style license. @@ -11,6 +11,13 @@ CC = gcc -std=gnu99 CFLAGS = -fomit-frame-pointer -I../runtime -I../include -Wall +DEBUGFLAGS = $(CFLAGS) +ifneq ($(TARGET_ARCH), ia64) +ifneq ($(TARGET_ARCH), powerpc) +DEBUGFLAGS += -gstabs+ +endif +endif +DEBUGFLAGS += -g2 ifeq ($(TARGET_ARCH), amd64) CFLAGS += -mtune=opteron -m32 @@ -24,7 +31,7 @@ $(CC) $(CFLAGS) -c -O2 interpret.c interpret-gdb.o: interpret.c interpret.h - $(CC) $(CFLAGS) -c -o $@ -gstabs+ -g2 -DASSERT=1 interpret.c + $(CC) $(DEBUGFLAGS) -c -o $@ -DASSERT=1 interpret.c print-opcodes: print-opcodes.c opcode.h $(CC) $(CFLAGS) -o print-opcodes -I../runtime -L../runtime \ Modified: mlton/branches/on-20050822-x86_64-branch/doc/changelog =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-05-20 02:45:54 UTC (rev 4553) @@ -1,5 +1,13 @@ Here are the changes since version 20051202. +* 2006-05-11 + - Ported to PowerPC-AIX. + - Fixed a bug in the runtime for the cases where nonblocking IO with + sockets was implemented using MSG_DONTWAIT. This flag does not + exist on AIX, Cygwin, HPUX, and MinGW and was previously just + ignored. Now the runtime simulates the flag for these platforms + (except MinGW, yet, where it's still ignored). + * 2006-04-25 - Ported to HPPA-HPUX. - Fixed PackReal{,32,64}{Big,Little} to follow the Basis Library Modified: mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/ckit.patch =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/ckit.patch 2006-05-20 00:33:51 UTC (rev 4552) +++ mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/ckit.patch 2006-05-20 02:45:54 UTC (rev 4553) @@ -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 ++ type... [truncated message content] |
From: Matthew F. <fl...@ml...> - 2006-05-19 17:33:52
|
Catch up with signature changes ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/rlimit.sig ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-20 00:28:28 UTC (rev 4551) +++ mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-20 00:33:51 UTC (rev 4552) @@ -389,23 +389,31 @@ structure Rlimit = struct - type rlim = Word.word + structure RLim = + struct + type t = SysWord.word + val castFromSysWord = fn w => w + val castToSysWord = fn w => w + end val infinity: rlim = 0w0 type t = int + val coreFileSize: t = 0 val cpuTime: t = 0 - val coreFileSize: t = 0 val dataSize: t = 0 val fileSize: t = 0 - val lockedInMemorySize: t = 0 val numFiles: t = 0 - val numProcesses: t = 0 - val residentSetSize: t = 0 val stackSize: t = 0 val virtualMemorySize: t = 0 +(* NOT STANDARD + val lockedInMemorySize: t = 0 + val numProcesses: t = 0 + val residentSetSize: t = 0 +*) + fun get _ = raise Fail "Rlimit.get" fun set _ = raise Fail "Rlimit.set" end Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/rlimit.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/rlimit.sig 2006-05-20 00:28:28 UTC (rev 4551) +++ mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/rlimit.sig 2006-05-20 00:33:51 UTC (rev 4552) @@ -6,13 +6,15 @@ * See the file MLton-LICENSE for details. *) -type word = Word.word - signature MLTON_RLIMIT = sig - type rlim = word + structure RLim : sig + type t + val castFromSysWord: SysWord.word -> t + val castToSysWord: t -> SysWord.word + end - val infinity: rlim + val infinity: RLim.t type t @@ -20,13 +22,16 @@ val cpuTime: t (* CPU CPU time in seconds *) val dataSize: t (* DATA max data size *) val fileSize: t (* FSIZE Maximum filesize *) + val numFiles: t (* NOFILE max number of open files *) + val stackSize: t (* STACK max stack size *) + val virtualMemorySize: t (* AS virtual memory limit *) + +(* NOT STANDARD val lockedInMemorySize: t (* MEMLOCK max locked address space *) - val numFiles: t (* NOFILE max number of open files *) val numProcesses: t (* NPROC max number of processes *) val residentSetSize: t (* RSS max resident set size *) - val stackSize: t (* STACK max stack size *) - val virtualMemorySize: t (* AS virtual memory limit *) - - val get: t -> {hard: rlim, soft: rlim} - val set: t * {hard: rlim, soft: rlim} -> unit + *) + + val get: t -> {hard: RLim.t, soft: RLim.t} + val set: t * {hard: RLim.t, soft: RLim.t} -> unit end |
From: Matthew F. <fl...@ml...> - 2006-05-19 17:28:29
|
Catch up with signature changes ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/regression/rlimit.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/regression/rlimit.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/regression/rlimit.sml 2006-05-19 22:04:19 UTC (rev 4550) +++ mlton/branches/on-20050822-x86_64-branch/regression/rlimit.sml 2006-05-20 00:28:28 UTC (rev 4551) @@ -2,7 +2,10 @@ val _ = List.app (fn r => set (r, get r) handle _ => ()) - [cpuTime, coreFileSize, dataSize, fileSize, lockedInMemorySize, numFiles, - numProcesses, residentSetSize, stackSize, virtualMemorySize] + [cpuTime, coreFileSize, dataSize, fileSize, (*lockedInMemorySize,*) + numFiles, (*numProcesses,*) (*residentSetSize,*) stackSize, + virtualMemorySize] -val _ = print (concat [Bool.toString (infinity >= 0wxFFFF), "\n"]) +val _ = print (concat + [Bool.toString ((RLim.castToSysWord infinity) >= 0wxFFFF), + "\n"]) |
From: Matthew F. <fl...@ml...> - 2006-05-19 15:04:24
|
Reworked the treatment of compile-time constants so that they are elaborated into the program at the proper size. This should fix the XML type errors on platforms with word constants that are not 32-bits. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.fun U mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.sig U mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.fun U mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.sig U mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.fun U mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.sig U mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.fun U mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.sig U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.fun U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.sig U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.fun U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.sig U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.fun U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.sig U mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun U mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/type-env.fun U mlton/branches/on-20050822-x86_64-branch/mlton/main/compile.fun U mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -10,36 +10,36 @@ open S -datatype t = C1 | C2 | C4 +datatype t = C8 | C16 | C32 -val all = [C1, C2, C4] +val all = [C8, C16, C32] fun bits s = Bits.fromInt (case s of - C1 => 8 - | C2 => 16 - | C4 => 32) + C8 => 8 + | C16 => 16 + | C32 => 32) val equals = op = fun fromBits b = case Bits.toInt b of - 8 => C1 - | 16 => C2 - | 32 => C4 + 8 => C8 + | 16 => C16 + | 32 => C32 | _ => Error.bug "CharSize.frombits" val memoize = fn f => let - val c1 = f C1 - val c2 = f C2 - val c4 = f C4 + val c8 = f C8 + val c16 = f C16 + val c32 = f C32 in - fn C1 => c1 - | C2 => c2 - | C4 => c4 + fn C8 => c8 + | C16 => c16 + | C32 => c32 end val cardinality = memoize (fn s => IntInf.pow (2, Bits.toInt (bits s))) Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/char-size.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -13,7 +13,7 @@ sig include CHAR_SIZE_STRUCTS - datatype t = C1 | C2 | C4 + datatype t = C8 | C16 | C32 val all: t list val bits: t -> Bits.t Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -50,35 +50,39 @@ memo (fn s => case Vector.peek (all, fn (_, s') => equalsA (s, s')) of - NONE => Error.bug "PrimTycons.make" + NONE => Error.bug "PrimTycons.make.fromSize" | SOME (tycon, _) => tycon) fun is t = Vector.exists (all, fn (t', _) => equals (t, t')) + fun de t = + case Vector.peek (all, fn (t', _) => equals (t, t')) of + NONE => Error.bug "PrimTycons.make.de" + | SOME (_, s') => s' val prims = Vector.toListMap (all, fn (tycon, _) => (tycon, Arity 0, admitsEquality)) in - (fromSize, all, is, prims) + (fromSize, all, is, de, prims) end in - val (char, _, isCharX, primChars) = + val (char, _, isCharX, deCharX, primChars) = let open CharSize in make ("char", all, bits, equals, memoize, Sometimes) end - val (int, ints, isIntX, primInts) = + val (int, ints, isIntX, deIntX, primInts) = let open IntSize in make ("int", all, bits, equals, memoize, Sometimes) end - val (real, reals, isRealX, primReals) = + val (real, reals, isRealX, deRealX, primReals) = let open RealSize in make ("real", all, bits, equals, memoize, Never) end - val (word, words, isWordX, primWords) = + val (word, words, isWordX, deWordX, primWords) = let open WordSize in @@ -88,7 +92,7 @@ val defaultChar = fn () => case !Control.defaultChar of - "char8" => char CharSize.C1 + "char8" => char CharSize.C8 | _ => Error.bug "PrimTycons.defaultChar" val defaultInt = fn () => case !Control.defaultInt of @@ -112,6 +116,7 @@ | _ => Error.bug "PrimTycons.defaultWord" val isIntX = fn c => equals (c, intInf) orelse isIntX c +val deIntX = fn c => if equals (c, intInf) then NONE else SOME (deIntX c) val prims = [(array, Arity 1, Always), Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/prim-tycons.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -37,10 +37,14 @@ val arrow: tycon val bool: tycon val char: CharSize.t -> tycon + val deCharX: tycon -> CharSize.t val defaultChar: unit -> tycon val defaultInt: unit -> tycon val defaultReal: unit -> tycon val defaultWord: unit -> tycon + val deIntX: tycon -> IntSize.t option + val deRealX: tycon -> RealSize.t + val deWordX: tycon -> WordSize.t val exn: tycon val int: IntSize.t -> tycon val ints: (tycon * IntSize.t) vector Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -14,8 +14,6 @@ val all = [R32, R64] -val default = R64 - val compare = fn (R32, R32) => EQUAL | (R32, _) => LESS Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/real-size.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -19,7 +19,6 @@ val bits: t -> Bits.t val bytes: t -> Bytes.t val compare: t * t -> Relation.t - val default: t val equals: t * t -> bool val layout: t -> Layout.t val memoize: (t -> 'a) -> t -> 'a Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -34,6 +34,8 @@ val byte = fromBits (Bits.fromInt 8) +val bool = fromBits (Bits.fromInt 32) + val allVector = Vector.tabulate (65, fn i => if isValidSize i then SOME (fromBits (Bits.fromInt i)) Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/ast/word-size.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -20,6 +20,7 @@ val + : t * t -> t val all: t list val bits: t -> Bits.t + val bool: t val bytes: t -> Bytes.t val byte: t val cardinality: t -> IntInf.t Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -11,12 +11,12 @@ open S -datatype t = Bool | Real | String | Word +datatype t = Bool | Real of RealSize.t | String | Word of WordSize.t val toString = fn Bool => "Bool" - | Real => "Real" + | Real rs => "Real" ^ (RealSize.toString rs) | String => "String" - | Word => "Word" + | Word ws => "Word" ^ (WordSize.toString ws) end Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const-type.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -8,13 +8,15 @@ signature CONST_TYPE_STRUCTS = sig + structure RealSize: REAL_SIZE + structure WordSize: WORD_SIZE end signature CONST_TYPE = sig include CONST_TYPE_STRUCTS - datatype t = Bool | Real | String | Word + datatype t = Bool | Real of RealSize.t | String | Word of WordSize.t val toString: t -> string end Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -11,7 +11,10 @@ open S -structure ConstType = ConstType () +structure ConstType = ConstType (struct + structure RealSize = RealX.RealSize + structure WordSize = WordX.WordSize + end) structure SmallIntInf = struct Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/const.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -20,6 +20,8 @@ include CONST_STRUCTS structure ConstType: CONST_TYPE + sharing ConstType.RealSize = RealX.RealSize + sharing ConstType.WordSize = WordX.WordSize structure SmallIntInf: sig Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -33,7 +33,6 @@ val word = WordSize.memoize (fn s => nullary (Tycon.word s)) end -val defaultReal = real RealSize.default val defaultWord = word WordSize.default local Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.sig =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.sig 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/type-ops.sig 2006-05-19 22:04:19 UTC (rev 4550) @@ -50,7 +50,6 @@ val deVector: t -> t val deWeak: t -> t val deWeakOpt: t -> t option - val defaultReal: t val defaultWord: t val exn: t val intInf: t Modified: mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -2616,11 +2616,15 @@ if Tycon.equals (c, Tycon.bool) then ConstType.Bool else if Tycon.isIntX c - then ConstType.Word + then case Tycon.deIntX c of + NONE => bug () + | SOME is => + ConstType.Word + (WordSize.fromBits (IntSize.bits is)) else if Tycon.isRealX c - then ConstType.Real + then ConstType.Real (Tycon.deRealX c) else if Tycon.isWordX c - then ConstType.Word + then ConstType.Word (Tycon.deWordX c) else if Tycon.equals (c, Tycon.vector) andalso 1 = Vector.length ts andalso @@ -2628,7 +2632,8 @@ (Vector.sub (ts, 0))) of NONE => false | SOME (c, _) => - Tycon.isCharX c) + Tycon.isCharX c + andalso (Tycon.deCharX c = CharSize.C8)) then ConstType.String else bug () val finish = Modified: mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/type-env.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/type-env.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/type-env.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -771,7 +771,7 @@ open Ops Type fun char s = con (Tycon.char s, Vector.new0 ()) - val string = con (Tycon.vector, Vector.new1 (char CharSize.C1)) + val string = con (Tycon.vector, Vector.new1 (char CharSize.C8)) val unit = tuple (Vector.new0 ()) Modified: mlton/branches/on-20050822-x86_64-branch/mlton/main/compile.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/main/compile.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/main/compile.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -445,7 +445,7 @@ let fun get (name: string): Bytes.t = case lookupConstant ({default = NONE, name = name}, - ConstType.Word) of + ConstType.Word WordSize.default) of Const.Word w => Bytes.fromInt (WordX.toInt w) | _ => Error.bug "Compile.elaborate: GC_state offset must be an int" in Modified: mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun 2006-05-17 21:18:10 UTC (rev 4549) +++ mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun 2006-05-19 22:04:19 UTC (rev 4550) @@ -16,7 +16,6 @@ structure RealX = RealX structure WordX = WordX end -structure RealSize = RealX.RealSize structure WordSize = WordX.WordSize val buildConstants: (string * (unit -> string)) list = @@ -61,7 +60,7 @@ List.map (gcFields, fn s => {name = s, value = concat ["offsetof (struct GC_state, ", s, ")"], - ty = ConstType.Word}) + ty = ConstType.Word WordSize.default}) fun build (constants, out) = let @@ -85,9 +84,15 @@ val (format, value) = case ty of Bool => ("%s", concat [value, "? \"true\" : \"false\""]) - | Real => ("%.20f", value) + | Real _ => ("%.20f", value) | String => ("%s", value) - | Word => ("%u", value) + | Word ws => + (case WordSize.prim (WordSize.roundUpToPrim ws) of + WordSize.W8 => "%\"PRIu8\"" + | WordSize.W16 => "%\"PRIu16\"" + | WordSize.W32 => "%\"PRIu32\"" + | WordSize.W64 => "%\"PRIu64\"", + value) in concat ["fprintf (stdout, \"", name, " = ", format, "\\n\", ", value, ");"] @@ -158,19 +163,16 @@ Bool => (case Bool.fromString value of NONE => error "bool" - | SOME b => - Const.Word (WordX.fromIntInf - (if b then 1 else 0, WordSize.default))) - | Real => - (case RealX.make (value, RealSize.default) of + | SOME b => Const.Word (WordX.fromIntInf (if b then 1 else 0, WordSize.bool))) + | Real rs => + (case RealX.make (value, rs) of NONE => error "real" | SOME r => Const.Real r) | String => Const.string value - | Word => + | Word ws => (case IntInf.fromString value of - NONE => error "int" - | SOME i => - Const.Word (WordX.fromIntInf (i, WordSize.default))) + NONE => error "word" + | SOME i => Const.Word (WordX.fromIntInf (i, ws))) end in lookupConstant |
From: Matthew F. <fl...@ml...> - 2006-05-17 14:18:17
|
Added typedef const unsigned char* code_pointer; This is used for time profiling with coverage via code labels (which, is only enabled by default on x86 with the native-codegen). This also fixes issues with commits r4541 and r4545. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h U mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h ---------------------------------------------------------------------- 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-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -315,7 +315,7 @@ static GC_state handleSigProfState; -void GC_handleSigProf (pointer pc) { +void GC_handleSigProf (code_pointer pc) { GC_frameIndex frameIndex; GC_state s; GC_sourceSeqIndex sourceSeqsIndex; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-17 21:18:10 UTC (rev 4549) @@ -123,5 +123,5 @@ #endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ -void GC_handleSigProf (pointer pc); +void GC_handleSigProf (code_pointer pc); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -56,16 +56,16 @@ void initTextSources (GC_state s) { GC_sourceLabelIndex i; - pointer p; + code_pointer p; GC_sourceSeqIndex sourceSeqIndex; sortSourceLabels (s); /* Initialize s->sourceMaps.textSources. */ - s->sourceMaps.textEnd = (pointer)(GC_getTextEnd()); - s->sourceMaps.textStart = (pointer)(GC_getTextStart()); + s->sourceMaps.textEnd = GC_getTextEnd(); + s->sourceMaps.textStart = GC_getTextStart(); if (ASSERT) for (i = 0; i < s->sourceMaps.sourceLabelsLength; i++) { - pointer label; + code_pointer label; label = s->sourceMaps.sourceLabels[i].label; assert (0 == label @@ -73,7 +73,7 @@ and label < s->sourceMaps.textEnd)); } s->sourceMaps.textSources = - (uint32_t*) + (GC_sourceSeqIndex *) (calloc_safe((size_t)(s->sourceMaps.textEnd - s->sourceMaps.textStart), sizeof(*(s->sourceMaps.textSources)))); p = s->sourceMaps.textStart; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2006-05-17 21:18:10 UTC (rev 4549) @@ -36,7 +36,7 @@ } *GC_source; typedef struct GC_sourceLabel { - pointer label; + code_pointer label; GC_sourceSeqIndex sourceSeqIndex; } *GC_sourceLabel; @@ -63,12 +63,12 @@ */ struct GC_source *sources; uint32_t sourcesLength; - pointer textEnd; + code_pointer textEnd; /* An array of indices, one entry for each address in the text * segment, giving an index into sourceSeqs. */ GC_sourceSeqIndex *textSources; - pointer textStart; + code_pointer textStart; }; #endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -8,17 +8,17 @@ #include "mmap-protect.c" #include "use-mmap.c" -void *GC_getTextEnd (void) { - return (const void*)(long)(get_etext ()); +code_pointer GC_getTextEnd (void) { + return (code_pointer)(long)(get_etext ()); } -void *GC_getTextStart (void) { +code_pointer GC_getTextStart (void) { void *address; const struct mach_header *mh; _dyld_lookup_and_bind ("_main", &address, 0); mh = _dyld_get_image_header_containing_address (address); - return mh; + return (code_pointer)mh; } void GC_displayMem (void) { @@ -30,9 +30,9 @@ } static void catcher (__attribute__ ((unused)) int sig, - __attribute__ ((unused)) siginfo_t *sip, - ucontext_t *ucp) { - GC_handleSigProf ((pointer) ucp->uc_mcontext->ss.srr0); + __attribute__ ((unused)) siginfo_t *sip, + ucontext_t *ucp) { + GC_handleSigProf ((code_pointer) ucp->uc_mcontext->ss.srr0); } void GC_setSigProfHandler (struct sigaction *sa) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -13,9 +13,9 @@ } static void catcher (__attribute__ ((unused)) int sig, - __attribute__ ((unused)) siginfo_t *sip, - ucontext_t *ucp) { - GC_handleSigProf ((pointer) ucp->uc_mcontext.mc_eip); + __attribute__ ((unused)) siginfo_t *sip, + ucontext_t *ucp) { + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_eip); } void GC_setSigProfHandler (struct sigaction *sa) { 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-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -1,11 +1,11 @@ /* To get the beginning and end of the text segment. */ -extern char _start; -extern char etext; +extern unsigned char _start; +extern unsigned char etext; -void *GC_getTextStart (void) { +code_pointer GC_getTextStart (void) { return &_start; } -void *GC_getTextEnd (void) { +code_pointer GC_getTextEnd (void) { return &etext; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -12,14 +12,14 @@ #include "mkdir2.c" #include "setenv.putenv.c" -extern void *__text_start; -extern void *etext; +extern unsigned char __text_start; +extern unsigned_char etext; -void *getTextStart () { +code_pointer getTextStart () { return &__text_start; } -void *getTextEnd () { +code_pointer getTextEnd () { return &etext; } @@ -91,10 +91,10 @@ static void catcher (__attribute__ ((unused)) int sig, - __attribute__ ((unused)) siginfo_t* sip, - void* mystery) { + __attribute__ ((unused)) siginfo_t* sip, + void* mystery) { ucontext_t* ucp = (ucontext_t*)mystery; - GC_handleSigProf ((pointer) (ucp->uc_link)); + GC_handleSigProf ((code_pointer) (ucp->uc_link)); } void GC_setSigProfHandler (struct sigaction *sa) { 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-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -29,23 +29,23 @@ #define REG_RIP REG_INDEX(rip) /* seems to be 16 */ #endif ucontext_t* ucp = (ucontext_t*)mystery; - GC_handleSigProf ((pointer) ucp->uc_mcontext.gregs[REG_RIP]); + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[REG_RIP]); #elif (defined (__hppa__)) ucontext_t* ucp = (ucontext_t*)mystery; - GC_handleSigProf ((pointer) (ucp->uc_mcontext.sc_iaoq[0] & ~0x3UL)); + GC_handleSigProf ((code_pointer) (ucp->uc_mcontext.sc_iaoq[0] & ~0x3UL)); #elif (defined (__ppc__)) || (defined (__powerpc__)) ucontext_t* ucp = (ucontext_t*)mystery; - GC_handleSigProf ((pointer) ucp->uc_mcontext.regs->nip); + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.regs->nip); #elif (defined (__sparc__)) struct sigcontext* scp = (struct sigcontext*)mystery; #if __WORDSIZE == 64 - GC_handleSigProf ((pointer) scp->sigc_regs.tpc); + GC_handleSigProf ((code_pointer) scp->sigc_regs.tpc); #else - GC_handleSigProf ((pointer) scp->si_regs.pc); + GC_handleSigProf ((code_pointer) scp->si_regs.pc); #endif #elif (defined (__i386__)) ucontext_t* ucp = (ucontext_t*)mystery; - GC_handleSigProf ((pointer) ucp->uc_mcontext.gregs[EIP]); + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[EIP]); #else #error Profiling handler is missing for this architecture #endif Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -8,9 +8,9 @@ #include "use-mmap.c" static void catcher (__attribute__ ((unused)) int sig, - __attribute__ ((unused)) int code, - struct sigcontext *ucp) { - GC_handleSigProf ((pointer) ucp->sc_eip); + __attribute__ ((unused)) int code, + struct sigcontext *ucp) { + GC_handleSigProf ((code_pointer) ucp->sc_eip); } void GC_setSigProfHandler (struct sigaction *sa) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -8,9 +8,9 @@ #include "use-mmap.c" static void catcher (__attribute__ ((unused)) int sig, - __attribute__ ((unused)) siginfo_t *sip, - ucontext_t *ucp) { - GC_handleSigProf ((pointer) ucp->sc_eip); + __attribute__ ((unused)) siginfo_t *sip, + ucontext_t *ucp) { + GC_handleSigProf ((code_pointer) ucp->sc_eip); } void GC_setSigProfHandler (struct sigaction *sa) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-05-17 21:18:10 UTC (rev 4549) @@ -71,7 +71,7 @@ static void catcher (__attribute__ ((unused)) int sig, __attribute__ ((unused)) siginfo_t *sip, ucontext_t *ucp) { - GC_handleSigProf ((pointer) ucp->uc_mcontext.gregs[REG_PC]); + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.gregs[REG_PC]); } void GC_setSigProfHandler (struct sigaction *sa) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-17 21:18:10 UTC (rev 4549) @@ -149,8 +149,8 @@ /* Text Segment */ /* ------------------------------------------------- */ -void *GC_getTextEnd (void); -void *GC_getTextStart (void); +code_pointer GC_getTextEnd (void); +code_pointer GC_getTextStart (void); /* ------------------------------------------------- */ /* SigProf Handler */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-16 03:02:10 UTC (rev 4548) +++ mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-17 21:18:10 UTC (rev 4549) @@ -13,3 +13,5 @@ #define POINTER_SIZE sizeof(pointer) #define FMTPTR "0x%016"PRIxPTR + +typedef const unsigned char* code_pointer; |
From: Matthew F. <fl...@ml...> - 2006-05-15 20:02:17
|
Regularized the internal int/word conversions. This makes it easier to use coercion functions without knowing the signedness of the structure. (This is difficult with the Basis Library functions; for instance, Int<N>.fromInt has different semantics from Word<N>.fromInt.) Added config/c/sys-types.sml which adds signatures to the C system types, exposing the minimally needed functions. Most types need only (unchecked) casts from and to SysWord.word. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile U mlton/branches/on-20050822-x86_64-branch/basis-library/arrays-and-vectors/sequence.fun U mlton/branches/on-20050822-x86_64-branch/basis-library/build/sources.mlb A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sys-types.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/config/default/fixed-int.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-int.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-word.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf0.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int.sml D mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int0.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/integer.sig A mlton/branches/on-20050822-x86_64-branch/basis-library/integer/iwconv0.sml A mlton/branches/on-20050822-x86_64-branch/basis-library/integer/num0.sml A mlton/branches/on-20050822-x86_64-branch/basis-library/integer/num1.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word.sig U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word.sml D mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word0.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/itimer.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/process.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rlimit.sig U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/net/net-host-db.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/net/net.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/net/socket.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/flags.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/io.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/process.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/tty.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-char.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-int.sml A mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-iwconv.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-seq.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-string.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-word.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.mlb U mlton/branches/on-20050822-x86_64-branch/basis-library/real/real.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/system/io.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/system/process.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/system/time.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/text/byte.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/text/char0.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/text/string-cvt.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/util/CUtil.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/util/integral-comparisons.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-16 03:02:10 UTC (rev 4548) @@ -33,7 +33,7 @@ .PHONY: type-check-def type-check-def: "$(MLTON)" -disable-ann deadCode -stop tc -show-types true \ - libs/all.mlb; \ + libs/all.mlb; .PHONY: type-check-all type-check-all: @@ -63,4 +63,5 @@ -default-type "$$defreal" \ -default-type "$$defword" \ libs/all.mlb; \ + rm -f target.map; \ done; done; done; done; done; done; done; done; done Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/arrays-and-vectors/sequence.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/arrays-and-vectors/sequence.fun 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/arrays-and-vectors/sequence.fun 2006-05-16 03:02:10 UTC (rev 4548) @@ -6,6 +6,61 @@ * See the file MLton-LICENSE for details. *) +structure SeqIndex = + struct + open SeqIndex + + val maxLen' = maxInt' + local + structure S = + Int_ChooseInt + (type 'a t = 'a -> int + val fInt8 = SeqIndex.sextdFromInt8 + val fInt16 = SeqIndex.sextdFromInt16 + val fInt32 = SeqIndex.sextdFromInt32 + val fInt64 = SeqIndex.sextdFromInt64 + val fIntInf = SeqIndex.sextdFromIntInf) + in + val fromIntUnsafe = S.f + end + local + structure S = + Int_ChooseInt + (type 'a t = 'a -> int + val fInt8 = SeqIndex.schckFromInt8 + val fInt16 = SeqIndex.schckFromInt16 + val fInt32 = SeqIndex.schckFromInt32 + val fInt64 = SeqIndex.schckFromInt64 + val fIntInf = SeqIndex.schckFromIntInf) + in + val fromInt = S.f + end + local + structure S = + Int_ChooseInt + (type 'a t = int -> 'a + val fInt8 = SeqIndex.sextdToInt8 + val fInt16 = SeqIndex.sextdToInt16 + val fInt32 = SeqIndex.sextdToInt32 + val fInt64 = SeqIndex.sextdToInt64 + val fIntInf = SeqIndex.sextdToIntInf) + in + val toIntUnsafe = S.f + end + local + structure S = + Int_ChooseInt + (type 'a t = int -> 'a + val fInt8 = SeqIndex.schckToInt8 + val fInt16 = SeqIndex.schckToInt16 + val fInt32 = SeqIndex.schckToInt32 + val fInt64 = SeqIndex.schckToInt64 + val fIntInf = SeqIndex.schckToIntInf) + in + val toInt = S.f + end + end + functor Sequence (S: sig type 'a sequence type 'a elt @@ -48,20 +103,20 @@ local fun doit (toInt, fromInt, maxInt') = - (Array.maxLen', toInt Array.maxLen') + (SeqIndex.maxLen', toInt SeqIndex.maxLen') handle Overflow => (fromInt maxInt', maxInt') structure S = Int_ChooseInt (type 'a t = SeqIndex.int * 'a - val fInt8 = doit (SeqIndex.toInt8, SeqIndex.fromInt8, + val fInt8 = doit (SeqIndex.schckToInt8, SeqIndex.schckFromInt8, Primitive.Int8.maxInt') - val fInt16 = doit (SeqIndex.toInt16, SeqIndex.fromInt16, + val fInt16 = doit (SeqIndex.schckToInt16, SeqIndex.schckFromInt16, Primitive.Int16.maxInt') - val fInt32 = doit (SeqIndex.toInt32, SeqIndex.fromInt32, + val fInt32 = doit (SeqIndex.schckToInt32, SeqIndex.schckFromInt32, Primitive.Int32.maxInt') - val fInt64 = doit (SeqIndex.toInt64, SeqIndex.fromInt64, + val fInt64 = doit (SeqIndex.schckToInt64, SeqIndex.schckFromInt64, Primitive.Int64.maxInt') - val fIntInf = (Array.maxLen', SeqIndex.toIntInf Array.maxLen')) + val fIntInf = (SeqIndex.maxLen', SeqIndex.schckToIntInf SeqIndex.maxLen')) in val (maxLen', maxLen) = S.f end Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/build/sources.mlb =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/build/sources.mlb 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/build/sources.mlb 2006-05-16 03:02:10 UTC (rev 4548) @@ -17,8 +17,8 @@ ../util/dynamic-wind.sig ../util/dynamic-wind.sml - ../integer/int0.sml - ../integer/word0.sml + ../integer/iwconv0.sml + ../integer/num0.sml local ../config/bind/int-prim.sml ../config/bind/pointer-prim.sml @@ -29,8 +29,6 @@ ../config/header/$(HEADER_WORD) ../config/seqindex/$(SEQINDEX_INT) ../config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml - ../config/c/position.sml - ../config/c/sys-word.sml end end ../integer/int-inf0.sml local @@ -41,12 +39,14 @@ in ann "forceUsed" in ../config/default/$(DEFAULT_INT) ../config/default/$(DEFAULT_WORD) + ../config/default/fixed-int.sml ../config/default/large-int.sml ../config/default/large-word.sml + ../config/c/position.sml + ../config/c/sys-word.sml end end in - ../integer/int1.sml - ../integer/word1.sml + ../integer/num1.sml end local @@ -61,6 +61,7 @@ ../config/default/$(DEFAULT_INT) ../config/default/$(DEFAULT_REAL) ../config/default/$(DEFAULT_WORD) + ../config/default/fixed-int.sml ../config/default/large-int.sml ../config/default/large-real.sml ../config/default/large-word.sml @@ -207,6 +208,7 @@ ../util/cleaner.sig ../util/cleaner.sml + ../config/c/sys-types.sml ../system/pre-os.sml ../posix/error.sig Added: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sys-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sys-types.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sys-types.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -0,0 +1,83 @@ +(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + +signature C_SYSTYPE = + sig + type t + val castFromSysWord: SysWord.word -> t + val castToSysWord: t -> SysWord.t + end +signature C_FLAGTYPE = + sig + include C_SYSTYPE + val andb: t * t -> t + val notb: t -> t + val orb: t * t -> t + end + +(* from <dirent.h> *) +structure C_DirP : C_SYSTYPE = C_DirP + +(* from <poll.h> *) +structure C_NFds : sig + include C_SYSTYPE + val fromInt: Int.int -> t + end = C_NFds + +(* from <resource.h> *) +structure C_RLim : C_SYSTYPE = C_RLim + +(* from <sys/types.h> *) +structure C_Clock : sig + include C_SYSTYPE + val castFromFixedInt: FixedInt.int -> t + val toLargeInt: t -> LargeInt.int + end = C_Clock +structure C_Dev : C_SYSTYPE = C_Dev +structure C_GId : C_SYSTYPE = C_GId +structure C_Id : C_SYSTYPE = C_Id +structure C_INo : C_SYSTYPE = C_INo +structure C_Mode : C_FLAGTYPE = C_Mode +structure C_NLink : sig + include C_SYSTYPE + val toInt: t -> int + end = C_NLink +structure C_Off = C_Off +structure C_PId : sig + include C_SYSTYPE + val castFromFixedInt: FixedInt.int -> t + val ~ : t -> t + end = C_PId +structure C_SSize : sig + include C_SYSTYPE + val castFromFixedInt: FixedInt.int -> t + val toInt: t -> Int.int + end = C_SSize +structure C_SUSeconds : sig + include C_SYSTYPE + val fromLargeInt: LargeInt.int -> t + val toLargeInt: t -> LargeInt.int + end = C_SUSeconds +structure C_Time : sig + include C_SYSTYPE + val fromInt: Int.int -> t + val toInt: t -> Int.int + val fromLargeInt: LargeInt.int -> t + val toLargeInt: t -> LargeInt.int + end = C_Time +structure C_UId : C_SYSTYPE = C_UId + +(* from <sys/socket.h> *) +structure C_Socklen = C_Socklen + +(* from <termios.h> *) +structure C_CC : C_SYSTYPE = C_CC +structure C_Speed : sig + include C_SYSTYPE + val compare: t * t -> order + end = C_Speed +structure C_TCFlag : C_FLAGTYPE = C_TCFlag Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/config/default/fixed-int.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/default/fixed-int.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/default/fixed-int.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -7,6 +7,6 @@ structure FixedInt = Int64 -functor FixedInt_ChooseIntN (A: CHOOSE_INT_ARG) : +functor FixedInt_ChooseIntN (A: CHOOSE_INTN_ARG) : sig val f : FixedInt.int A.t end = ChooseIntN_Int64 (A) Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-int.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-int.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-int.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -10,8 +10,8 @@ eqtype int type big - val precision': Int32.int val fromBigUnsafe: big -> int + val sizeInBits: Int32.int val toBig: int -> big end @@ -21,7 +21,7 @@ structure Small = struct open Small - val precision': Int.int = Int32.toInt precision' + val precision': Int.int = Int32.toInt sizeInBits end val () = if Int.< (Small.precision', Big.precision') then () Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-word.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-word.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/embed-word.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -11,8 +11,8 @@ type big val fromBigUnsafe: big -> word + val sizeInBits: Int32.int val toBig: word -> big - val wordSize: Int32.int end functor EmbedWord (structure Big: WORD @@ -21,7 +21,7 @@ structure Small = struct open Small - val wordSize: Int.int = Int32.toInt wordSize + val wordSize: Int.int = Int32.toInt sizeInBits end val () = if Int.< (Small.wordSize, Big.wordSize) then () Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -47,6 +47,11 @@ val ~>> = make ~>> end + val fromInt = schckFromInt + val toInt = schckToInt + val fromLarge = schckFromLargeInt + val toLarge = schckToLargeInt + local open StringCvt @@ -305,7 +310,7 @@ else i * evenPow (Int.- (j, 1)) (* evenPow (j) returns (i ^ j), assuming j is even *) and evenPow (j: Int.int): int = - square (pow (Int.~>> (j, 0w1))) + square (pow (Int.div (j, 2))) in pow j end Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf0.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf0.sml 2006-05-16 02:49:56 UTC (rev 4547) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/int-inf0.sml 2006-05-16 03:02:10 UTC (rev 4548) @@ -6,7 +6,7 @@ * See the file MLton-LICENSE for details. *) -signature INT_INF0 = +signature PRIM_INT_INF = sig eqtype int type t = int @@ -69,9 +69,11 @@ val isNeg: int -> bool val andb: int * int -> int + val <<? : int * Primitive.Word32.word -> int val << : int * Primitive.Word32.word -> int val notb: int -> int val orb: int * int -> int + val ~>>? : int * Primitive.Word32.word -> int val ~>> : int * Primitive.Word32.word -> int val xorb: int * int -> int @@ -83,88 +85,251 @@ numLimbsMinusOne: SeqIndex.int} -> 'a} -> int -> 'a) - (* Sign extend. *) - val fromInt8Unsafe: Primitive.Int8.int -> int - val fromInt16Unsafe: Primitive.Int16.int -> int - val fromInt32Unsafe: Primitive.Int32.int -> int - val fromInt64Unsafe: Primitive.Int64.int -> int - val fromIntInfUnsafe: Primitive.IntInf.int -> int + val zextdFromInt8: Primitive.Int8.int -> int + val zextdFromInt16: Primitive.Int16.int -> int + val zextdFromInt32: Primitive.Int32.int -> int + val zextdFromInt64: Primitive.Int64.int -> int + val zextdFromIntInf: Primitive.IntInf.int -> int + val zextdFromWord8: Primitive.Word8.word -> int + val zextdFromWord16: Primitive.Word16.word -> int + val zextdFromWord32: Primitive.Word32.word -> int + val zextdFromWord64: Primitive.Word64.word -> int + val zextdToInt8: int -> Primitive.Int8.int + val zextdToInt16: int -> Primitive.Int16.int + val zextdToInt32: int -> Primitive.Int32.int + val zextdToInt64: int -> Primitive.Int64.int + val zextdToIntInf: int -> Primitive.IntInf.int + val zextdToWord8: int -> Primitive.Word8.word + val zextdToWord16: int -> Primitive.Word16.word + val zextdToWord32: int -> Primitive.Word32.word + val zextdToWord64: int -> Primitive.Word64.word - (* Sign extend. *) - val fromInt8: Primitive.Int8.int -> int - val fromInt16: Primitive.Int16.int -> int - val fromInt32: Primitive.Int32.int -> int - val fromInt64: Primitive.Int64.int -> int - val fromIntInf: Primitive.IntInf.int -> int + val sextdFromInt8: Primitive.Int8.int -> int + val sextdFromInt16: Primitive.Int16.int -> int + val sextdFromInt32: Primitive.Int32.int -> int + val sextdFromInt64: Primitive.Int64.int -> int + val sextdFromIntInf: Primitive.IntInf.int -> int + val sextdFromWord8: Primitive.Word8.word -> int + val sextdFromWord16: Primitive.Word16.word -> int + val sextdFromWord32: Primitive.Word32.word -> int + val sextdFromWord64: Primitive.Word64.word -> int + val sextdToInt8: int -> Primitive.Int8.int + val sextdToInt16: int -> Primitive.Int16.int + val sextdToInt32: int -> Primitive.Int32.int + val sextdToInt64: int -> Primitive.Int64.int + val sextdToIntInf: int -> Primitive.IntInf.int + val sextdToWord8: int -> Primitive.Word8.word + val sextdToWord16: int -> Primitive.Word16.word + val sextdToWord32: int -> Primitive.Word32.word + val sextdToWord64: int -> Primitive.Word64.word - (* Zero extend. *) - val fromWord8Unsafe: Primitive.Word8.word -> int - val fromWord16Unsafe: Primitive.Word16.word -> int - val fromWord32Unsafe: Primitive.Word32.word -> int - val fromWord64Unsafe: Primitive.Word64.word -> int + val castFromInt8: Primitive.Int8.int -> int + val castFromInt16: Primitive.Int16.int -> int + val castFromInt32: Primitive.Int32.int -> int + val castFromInt64: Primitive.Int64.int -> int + val castFromIntInf: Primitive.IntInf.int -> int + val castFromWord8: Primitive.Word8.word -> int + val castFromWord16: Primitive.Word16.word -> int + val castFromWord32: Primitive.Word32.word -> int + val castFromWord64: Primitive.Word64.word -> int + val castToInt8: int -> Primitive.Int8.int + val castToInt16: int -> Primitive.Int16.int + val castToInt32: int -> Primitive.Int32.int + val castToInt64: int -> Primitive.Int64.int + val castToIntInf: int -> Primitive.IntInf.int + val castToWord8: int -> Primitive.Word8.word + val castToWord16: int -> Primitive.Word16.word + val castToWord32: int -> Primitive.Word32.word + val castToWord64: int -> Primitive.Word64.word - (* Zero extend. *) - val fromWord8: Primitive.Word8.word -> int - val fromWord16: Primitive.Word16.word -> int - val fromWord32: Primitive.Word32.word -> int - val fromWord64: Primitive.Word64.word -> int + val zchckFromInt8: Primitive.Int8.int -> int + val zchckFromInt16: Primitive.Int16.int -> int + val zchckFromInt32: Primitive.Int32.int -> int + val zchckFromInt64: Primitive.Int64.int -> int + val zchckFromIntInf: Primitive.IntInf.int -> int + val zchckFromWord8: Primitive.Word8.word -> int + val zchckFromWord16: Primitive.Word16.word -> int + val zchckFromWord32: Primitive.Word32.word -> int + val zchckFromWord64: Primitive.Word64.word -> int + val zchckToInt8: int -> Primitive.Int8.int + val zchckToInt16: int -> Primitive.Int16.int + val zchckToInt32: int -> Primitive.Int32.int + val zchckToInt64: int -> Primitive.Int64.int + val zchckToIntInf: int -> Primitive.IntInf.int + val zchckToWord8: int -> Primitive.Word8.word + val zchckToWord16: int -> Primitive.Word16.word + val zchckToWord32: int -> Primitive.Word32.word + val zchckToWord64: int -> Primitive.Word64.word - (* Sign extend. *) - val fromWord8XUnsafe: Primitive.Word8.word -> int - val fromWord16XUnsafe: Primitive.Word16.word -> int - val fromWord32XUnsafe: Primitive.Word32.word -> int - val fromWord64XUnsafe: Primitive.Word64.word -> int + val schckFromInt8: Primitive.Int8.int -> int + val schckFromInt16: Primitive.Int16.int -> int + val schckFromInt32: Primitive.Int32.int -> int + val schckFromInt64: Primitive.Int64.int -> int + val schckFromIntInf: Primitive.IntInf.int -> int + val schckFromWord8: Primitive.Word8.word -> int + val schckFromWord16: Primitive.Word16.word -> int + val schckFromWord32: Primitive.Word32.word -> int + val schckFromWord64: Primitive.Word64.word -> int + val schckToInt8: int -> Primitive.Int8.int + val schckToInt16: int -> Primitive.Int16.int + val schckToInt32: int -> Primitive.Int32.int + val schckToInt64: int -> Primitive.Int64.int + val schckToIntInf: int -> Primitive.IntInf.int + val schckToWord8: int -> Primitive.Word8.word + val schckToWord16: int -> Primitive.Word16.word + val schckToWord32: int -> Primitive.Word32.word + val schckToWord64: int -> Primitive.Word64.word + end - (* Sign extend. *) - val fromWord8X: Primitive.Word8.word -> int - val fromWord16X: Primitive.Word16.word -> int - val fromWord32X: Primitive.Word32.word -> int - val fromWord64X: Primitive.Word64.word -> int +signature PRIM_INTWORD_CONV = + sig + include PRIM_INTWORD_CONV - (* Lowbits. *) - val toInt8Unsafe: int -> Primitive.Int8.int - val toInt16Unsafe: int -> Primitive.Int16.int - val toInt32Unsafe: int -> Primitive.Int32.int - val toInt64Unsafe: int -> Primitive.Int64.int - val toIntInfUnsafe: int -> Primitive.IntInf.int + val idFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int - (* Overflow checking. *) - val toInt8: int -> Primitive.Int8.int - val toInt16: int -> Primitive.Int16.int - val toInt32: int -> Primitive.Int32.int - val toInt64: int -> Primitive.Int64.int - val toIntInf: int -> Primitive.IntInf.int + val zextdFromInt8ToIntInf: Primitive.Int8.int -> Primitive.IntInf.int + val zextdFromInt16ToIntInf: Primitive.Int16.int -> Primitive.IntInf.int + val zextdFromInt32ToIntInf: Primitive.Int32.int -> Primitive.IntInf.int + val zextdFromInt64ToIntInf: Primitive.Int64.int -> Primitive.IntInf.int + val zextdFromWord8ToIntInf: Primitive.Word8.word -> Primitive.IntInf.int + val zextdFromWord16ToIntInf: Primitive.Word16.word -> Primitive.IntInf.int + val zextdFromWord32ToIntInf: Primitive.Word32.word -> Primitive.IntInf.int + val zextdFromWord64ToIntInf: Primitive.Word64.word -> Primitive.IntInf.int - (* Lowbits. *) - val toWord8Unsafe: int -> Primitive.Word8.word - val toWord16Unsafe: int -> Primitive.Word16.word - val toWord32Unsafe: int -> Primitive.Word32.word - val toWord64Unsafe: int -> Primitive.Word64.word + val zextdFromIntInfToInt8: Primitive.IntInf.int -> Primitive.Int8.int + val zextdFromIntInfToInt16: Primitive.IntInf.int -> Primitive.Int16.int + val zextdFromIntInfToInt32: Primitive.IntInf.int -> Primitive.Int32.int + val zextdFromIntInfToInt64: Primitive.IntInf.int -> Primitive.Int64.int + val zextdFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int + val zextdFromIntInfToWord8: Primitive.IntInf.int -> Primitive.Word8.word + val zextdFromIntInfToWord16: Primitive.IntInf.int -> Primitive.Word16.word + val zextdFromIntInfToWord32: Primitive.IntInf.int -> Primitive.Word32.word + val zextdFromIntInfToWord64: Primitive.IntInf.int -> Primitive.Word64.word - (* Lowbits. *) - val toWord8: int -> Primitive.Word8.word - val toWord16: int -> Primitive.Word16.word - val toWord32: int -> Primitive.Word32.word - val toWord64: int -> Primitive.Word64.word - (* Lowbits. *) - val toWord8XUnsafe: int -> Primitive.Word8.word - val toWord16XUnsafe: int -> Primitive.Word16.word - val toWord32XUnsafe: int -> Primitive.Word32.word - val toWord64XUnsafe: int -> Primitive.Word64.word + val sextdFromInt8ToIntInf: Primitive.Int8.int -> Primitive.IntInf.int + val sextdFromInt16ToIntInf: Primitive.Int16.int -> Primitive.IntInf.int + val sextdFromInt32ToIntInf: Primitive.Int32.int -> Primitive.IntInf.int + val sextdFromInt64ToIntInf: Primitive.Int64.int -> Primitive.IntInf.int + val sextdFromWord8ToIntInf: Primitive.Word8.word -> Primitive.IntInf.int + val sextdFromWord16ToIntInf: Primitive.Word16.word -> Primitive.IntInf.int + val sextdFromWord32ToIntInf: Primitive.Word32.word -> Primitive.IntInf.int + val sextdFromWord64ToIntInf: Primitive.Word64.word -> Primitive.IntInf.int - (* Lowbits. *) - val toWord8X: int -> Primitive.Word8.word - val toWord16X: int -> Primitive.Word16.word - val toWord32X: int -> Primitive.Word32.word - val toWord64X: int -> Primitive.Word64.word + val sextdFromIntInfToInt8: Primitive.IntInf.int -> Primitive.Int8.int + val sextdFromIntInfToInt16: Primitive.IntInf.int -> Primitive.Int16.int + val sextdFromIntInfToInt32: Primitive.IntInf.int -> Primitive.Int32.int + val sextdFromIntInfToInt64: Primitive.IntInf.int -> Primitive.Int64.int + val sextdFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int + val sextdFromIntInfToWord8: Primitive.IntInf.int -> Primitive.Word8.word + val sextdFromIntInfToWord16: Primitive.IntInf.int -> Primitive.Word16.word + val sextdFromIntInfToWord32: Primitive.IntInf.int -> Primitive.Word32.word + val sextdFromIntInfToWord64: Primitive.IntInf.int -> Primitive.Word64.word + + + val castFromInt8ToIntInf: Primitive.Int8.int -> Primitive.IntInf.int + val castFromInt16ToIntInf: Primitive.Int16.int -> Primitive.IntInf.int + val castFromInt32ToIntInf: Primitive.Int32.int -> Primitive.IntInf.int + val castFromInt64ToIntInf: Primitive.Int64.int -> Primitive.IntInf.int + val castFromWord8ToIntInf: Primitive.Word8.word -> Primitive.IntInf.int + val castFromWord16ToIntInf: Primitive.Word16.word -> Primitive.IntInf.int + val castFromWord32ToIntInf: Primitive.Word32.word -> Primitive.IntInf.int + val castFromWord64ToIntInf: Primitive.Word64.word -> Primitive.IntInf.int + + val castFromIntInfToInt8: Primitive.IntInf.int -> Primitive.Int8.int + val castFromIntInfToInt16: Primitive.IntInf.int -> Primitive.Int16.int + val castFromIntInfToInt32: Primitive.IntInf.int -> Primitive.Int32.int + val castFromIntInfToInt64: Primitive.IntInf.int -> Primitive.Int64.int + val castFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int + val castFromIntInfToWord8: Primitive.IntInf.int -> Primitive.Word8.word + val castFromIntInfToWord16: Primitive.IntInf.int -> Primitive.Word16.word + val castFromIntInfToWord32: Primitive.IntInf.int -> Primitive.Word32.word + val castFromIntInfToWord64: Primitive.IntInf.int -> Primitive.Word64.word + + + val zchckFromInt8ToIntInf: Primitive.Int8.int -> Primitive.IntInf.int + val zchckFromInt16ToIntInf: Primitive.Int16.int -> Primitive.IntInf.int + val zchckFromInt32ToIntInf: Primitive.Int32.int -> Primitive.IntInf.int + val zchckFromInt64ToIntInf: Primitive.Int64.int -> Primitive.IntInf.int + val zchckFromWord8ToIntInf: Primitive.Word8.word -> Primitive.IntInf.int + val zchckFromWord16ToIntInf: Primitive.Word16.word -> Primitive.IntInf.int + val zchckFromWord32ToIntInf: Primitive.Word32.word -> Primitive.IntInf.int + val zchckFromWord64ToIntInf: Primitive.Word64.word -> Primitive.IntInf.int + + val zchckFromIntInfToInt8: Primitive.IntInf.int -> Primitive.Int8.int + val zchckFromIntInfToInt16: Primitive.IntInf.int -> Primitive.Int16.int + val zchckFromIntInfToInt32: Primitive.IntInf.int -> Primitive.Int32.int + val zchckFromIntInfToInt64: Primitive.IntInf.int -> Primitive.Int64.int + val zchckFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int + val zchckFromIntInfToWord8: Primitive.IntInf.int -> Primitive.Word8.word + val zchckFromIntInfToWord16: Primitive.IntInf.int -> Primitive.Word16.word + val zchckFromIntInfToWord32: Primitive.IntInf.int -> Primitive.Word32.word + val zchckFromIntInfToWord64: Primitive.IntInf.int -> Primitive.Word64.word + + + val schckFromInt8ToIntInf: Primitive.Int8.int -> Primitive.IntInf.int + val schckFromInt16ToIntInf: Primitive.Int16.int -> Primitive.IntInf.int + val schckFromInt32ToIntInf: Primitive.Int32.int -> Primitive.IntInf.int + val schckFromInt64ToIntInf: Primitive.Int64.int -> Primitive.IntInf.int + val schckFromWord8ToIntInf: Primitive.Word8.word -> Primitive.IntInf.int + val schckFromWord16ToIntInf: Primitive.Word16.word -> Primitive.IntInf.int + val schckFromWord32ToIntInf: Primitive.Word32.word -> Primitive.IntInf.int + val schckFromWord64ToIntInf: Primitive.Word64.word -> Primitive.IntInf.int + + val schckFromIntInfToInt8: Primitive.IntInf.int -> Primitive.Int8.int + val schckFromIntInfToInt16: Primitive.IntInf.int -> Primitive.Int16.int + val schckFromIntInfToInt32: Primitive.IntInf.int -> Primitive.Int32.int + val schckFromIntInfToInt64: Primitive.IntInf.int -> Primitive.Int64.int + val schckFromIntInfToIntInf: Primitive.IntInf.int -> Primitive.IntInf.int + val schckFromIntInfToWord8: Primitive.IntInf.int -> Primitive.Word8.word + val schckFromIntInfToWord16: Primitive.IntInf.int -> Primitive.Word16.word + val schckFromIntInfToWord32: Primitive.IntInf.int -> Primitive.Word32.word + val schckFromIntInfToWord64: Primitive.IntInf.int -> Primitive.Word64.word end +signature PRIM_INTEGER = + sig + include PRIM_INTEGER + val zextdFromIntInf: Primitive.IntInf.int -> int + val zextdToIntInf: int -> Primitive.IntInf.int + + val sextdFromIntInf: Primitive.IntInf.int -> int + val sextdToIntInf: int -> Primitive.IntInf.int + + val castFromIntInf: Primitive.IntInf.int -> int + val castToIntInf: int -> Primitive.IntInf.int + + val zchckFromIntInf: Primitive.IntInf.int -> int + val zchckToIntInf: int -> Primitive.IntInf.int + + val schckFromIntInf: Primitive.IntInf.int -> int + val schckToIntInf: int -> Primitive.IntInf.int + end +signature PRIM_WORD = + sig + include PRIM_WORD + + val zextdFromIntInf: Primitive.IntInf.int -> word + val zextdToIntInf: word -> Primitive.IntInf.int + + val sextdFromIntInf: Primitive.IntInf.int -> word + val sextdToIntInf: word -> Primitive.IntInf.int + + val castFromIntInf: Primitive.IntInf.int -> word + val castToIntInf: word -> Primitive.IntInf.int + + val zchckFromIntInf: Primitive.IntInf.int -> word + val zchckToIntInf: word -> Primitive.IntInf.int + + val schckFromIntInf: Primitive.IntInf.int -> word + val schckToIntInf: word -> Primitive.IntInf.int + end + structure Primitive = struct open Primitive -structure IntInf : INT_INF0 = +structure IntInf = struct structure Prim = Primitive.IntInf @@ -177,35 +342,24 @@ structure S = ObjptrInt_ChooseIntN (type 'a t = 'a -> ObjptrWord.word - val fInt8 = ObjptrWord.fromInt8 - val fInt16 = ObjptrWord.fromInt16 - val fInt32 = ObjptrWord.fromInt32 - val fInt64 = ObjptrWord.fromInt64) + val fInt8 = ObjptrWord.zextdFromInt8 + val fInt16 = ObjptrWord.zextdFromInt16 + val fInt32 = ObjptrWord.zextdFromInt32 + val fInt64 = ObjptrWord.zextdFromInt64) in - val fromObjptrInt = S.f + val idFromObjptrInt = S.f end local structure S = ObjptrInt_ChooseIntN (type 'a t = ObjptrWord.word -> 'a - val fInt8 = ObjptrWord.toInt8 - val fInt16 = ObjptrWord.toInt16 - val fInt32 = ObjptrWord.toInt32 - val fInt64 = ObjptrWord.toInt64) + val fInt8 = ObjptrWord.zextdToInt8 + val fInt16 = ObjptrWord.zextdToInt16 + val fInt32 = ObjptrWord.zextdToInt32 + val fInt64 = ObjptrWord.zextdToInt64) in - val toObjptrInt = S.f + val idToObjptrInt = S.f end - local - structure S = - ObjptrInt_ChooseIntN - (type 'a t = ObjptrWord.word -> 'a - val fInt8 = ObjptrWord.toInt8X - val fInt16 = ObjptrWord.toInt16X - val fInt32 = ObjptrWord.toInt32X - val fInt64 = ObjptrWord.toInt64X) - in - val toObjptrIntX = S.f - end end structure I = ObjptrInt structure MPLimb = C_MPLimb @@ -215,13 +369,24 @@ structure S = SeqIndex_ChooseIntN (type 'a t = 'a -> C_Size.word - val fInt8 = C_Size.fromInt8 - val fInt16 = C_Size.fromInt16 - val fInt32 = C_Size.fromInt32 - val fInt64 = C_Size.fromInt64) + val fInt8 = C_Size.zextdFromInt8 + val fInt16 = C_Size.zextdFromInt16 + val fInt32 = C_Size.zextdFromInt32 + val fInt64 = C_Size.zextdFromInt64) in - val fromSeqIndex = S.f + val zextdFromSeqIndex = S.f end + local + structure S = + SeqIndex_ChooseIntN + (type 'a t = 'a -> C_Size.word + val fInt8 = C_Size.sextdFromInt8 + val fInt16 = C_Size.sextdFromInt16 + val fInt32 = C_Size.sextdFromInt32 + val fInt64 = C_Size.sextdFromInt64) + in + val sextdFromSeqIndex = S.f + end end type bigInt = Prim.int @@ -248,12 +413,12 @@ then 1 else bigNumLimbs i - fun dropTag (w: W.word): W.word = W.~>> (w, 0w1) + fun dropTag (w: W.word): W.word = W.~>>? (w, 0w1) fun dropTagCoerce (i: bigInt): W.word = dropTag (Prim.toWord i) - fun dropTagCoerceInt (i: bigInt): I.int = W.toObjptrIntX (dropTagCoerce i) - fun addTag (w: W.word): W.word = W.orb (W.<< (w, 0w1), 0w1) + fun dropTagCoerceInt (i: bigInt): I.int = W.idToObjptrInt (dropTagCoerce i) + fun addTag (w: W.word): W.word = W.orb (W.<<? (w, 0w1), 0w1) fun addTagCoerce (w: W.word): bigInt = Prim.fromWord (addTag w) - fun addTagCoerceInt (i: I.int): bigInt = addTagCoerce (W.fromObjptrInt i) + fun addTagCoerceInt (i: I.int): bigInt = addTagCoerce (W.idFromObjptrInt i) fun zeroTag (w: W.word): W.word = W.andb (w, W.notb 0w1) fun oneTag (w: W.word): W.word = W.orb (w, 0w1) fun oneTagCoerce (w: W.word): bigInt = Prim.fromWord (oneTag w) @@ -264,42 +429,47 @@ else Big (Prim.toVector i) local - fun 'a make {toMPLimb: 'a -> MPLimb.word, - toObjptrWordX: 'a -> ObjptrWord.word, - other : {wordSize: Int32.int, + fun 'a make {zextdToMPLimb: 'a -> MPLimb.word, + zextdToObjptrWord: 'a -> ObjptrWord.word, + sextdToObjptrWord: 'a -> ObjptrWord.word, + other : {sizeInBits: Int32.int, zero: 'a, eq: 'a * 'a -> bool, + isNeg: 'a -> bool, neg: 'a -> 'a, notb: 'a -> 'a, - rshift: 'a * Word32.word -> 'a}} - (isneg, w) = - if Int32.> (ObjptrWord.wordSize, #wordSize other) + rashift: 'a * Word32.word -> 'a, + rshift: 'a * Word32.word -> 'a}} + (sextd, w) = + if Int32.> (ObjptrWord.sizeInBits, #sizeInBits other) orelse let - 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) + val shift = Word32.- (ObjptrWord.sizeInBitsWord, 0w2) + val upperBits = (#rashift other) (w, shift) + val zeroBits = #zero other + val oneBits = (#notb other) zeroBits in - (#eq other) (upperBits, upperZeroBits) + (#eq other) (upperBits, zeroBits) orelse - (isneg andalso (#eq other) (upperBits, upperOneBits)) + (sextd andalso (#eq other) (upperBits, oneBits)) end - then Prim.fromWord (addTag (toObjptrWordX w)) + then if sextd + then Prim.fromWord (addTag (sextdToObjptrWord w)) + else Prim.fromWord (addTag (zextdToObjptrWord w)) else let fun loop (w, i, acc) = if (#eq other) (w, (#zero other)) then (i, acc) else let - val limb = toMPLimb w + val limb = zextdToMPLimb w val w = (#rshift other) - (w, MPLimb.wordSizeWord) + (w, MPLimb.sizeInBitsWord) in loop (w, S.+ (i, 1), (i, limb) :: acc) end val (n, acc) = - if isneg + if sextd andalso (#isNeg other) w then loop ((#neg other) w, 1, [(0,0w1)]) else loop (w, 1, [(0,0w0)]) val a = A.arrayUnsafe n @@ -313,93 +483,128 @@ Prim.fromVector (V.fromArray a) end in - val fromWordAux8 = - make {toMPLimb = MPLimb.fromWord8, - toObjptrWordX = ObjptrWord.fromWord8X, - other = {wordSize = Word8.wordSize, + fun extdFromWord8 (sextd, w) = + make {zextdToMPLimb = MPLimb.zextdFromWord8, + zextdToObjptrWord = ObjptrWord.zextdFromWord8, + sextdToObjptrWord = ObjptrWord.sextdFromWord8, + other = {sizeInBits = Word8.sizeInBits, zero = Word8.zero, eq = ((op =) : Word8.word * Word8.word -> bool), + isNeg = fn w => Int8.< (IntWordConv.idFromWord8ToInt8 w, 0), neg = Word8.~, notb = Word8.notb, - rshift = Word8.>>}} - fun fromWord8 w = fromWordAux8 (false, w) - fun fromInt8 i = fromWordAux8 (Int8.< (i, 0), Word8.fromInt8 i) - fun fromWord8X w = fromInt8 (Word8.toInt8X w) - val fromInt8Unsafe = fromInt8 - val fromWord8Unsafe = fromWord8 - val fromWord8XUnsafe = fromWord8X + rashift = Word8.~>>?, + rshift = Word8.>>?}} + (sextd, w) + fun zextdFromWord8 w = extdFromWord8 (false, w) + fun zextdFromInt8 i = zextdFromWord8 (IntWordConv.idFromInt8ToWord8 i) + fun sextdFromWord8 w = extdFromWord8 (true, w) + fun sextdFromInt8 i = sextdFromWord8 (IntWordConv.idFromInt8ToWord8 i) + val castFromInt8 = sextdFromInt8 + val castFromWord8 = zextdFromWord8 + val zchckFromInt8 = zextdFromInt8 + val zchckFromWord8 = zextdFromWord8 + val schckFromInt8 = sextdFromInt8 + val schckFromWord8 = sextdFromWord8 - val fromWordAux16 = - make {toMPLimb = MPLimb.fromWord16, - toObjptrWordX = ObjptrWord.fromWord16X, - other = {wordSize = Word16.wordSize, + fun extdFromWord16 (sextd, w) = + make {zextdToMPLimb = MPLimb.zextdFromWord16, + zextdToObjptrWord = ObjptrWord.zextdFromWord16, + sextdToObjptrWord = ObjptrWord.sextdFromWord16, + other = {sizeInBits = Word16.sizeInBits, zero = Word16.zero, eq = ((op =) : Word16.word * Word16.word -> bool), + isNeg = fn w => Int16.< (IntWordConv.idFromWord16ToInt16 w, 0), neg = Word16.~, notb = Word16.notb, - rshift = Word16.>>}} - fun fromWord16 w = fromWordAux16 (false, w) - fun fromInt16 i = fromWordAux16 (Int16.< (i, 0), Word16.fromInt16 i) - fun fromWord16X w = fromInt16 (Word16.toInt16X w) - val fromInt16Unsafe = fromInt16 - val fromWord16Unsafe = fromWord16 - val fromWord16XUnsafe = fromWord16X + rashift = Word16.~>>?, + rshift = Word16.>>?}} + (sextd, w) + fun zextdFromWord16 w = extdFromWord16 (false, w) + fun zextdFromInt16 i = zextdFromWord16 (IntWordConv.idFromInt16ToWord16 i) + fun sextdFromWord16 w = extdFromWord16 (true, w) + fun sextdFromInt16 i = sextdFromWord16 (IntWordConv.idFromInt16ToWord16 i) + val castFromInt16 = sextdFromInt16 + val castFromWord16 = zextdFromWord16 + val zchckFromInt16 = zextdFromInt16 + val zchckFromWord16 = zextdFromWord16 + val schckFromInt16 = sextdFromInt16 + val schckFromWord16 = sextdFromWord16 - val fromWordAux32 = - make {toMPLimb = MPLimb.fromWord32, - toObjptrWordX = ObjptrWord.fromWord32X, - other = {wordSize = Word32.wordSize, + fun extdFromWord32 (sextd, w) = + make {zextdToMPLimb = MPLimb.zextdFromWord32, + zextdToObjptrWord = ObjptrWord.zextdFromWord32, + sextdToObjptrWord = ObjptrWord.sextdFromWord32, + other = {sizeInBits = Word32.sizeInBits, zero = Word32.zero, eq = ((op =) : Word32.word * Word32.word -> bool), + isNeg = fn w => Int32.< (IntWordConv.idFromWord32ToInt32 w, 0), neg = Word32.~, notb = Word32.notb, - rshift = Word32.>>}} - fun fromWord32 w = fromWordAux32 (false, w) - fun fromInt32 i = fromWordAux32 (Int32.< (i, 0), Word32.fromInt32 i) - fun fromWord32X w = fromInt32 (Word32.toInt32X w) - val fromInt32Unsafe = fromInt32 - val fromWord32Unsafe = fromWord32 - val fromWord32XUnsafe = fromWord32X + rashift = Word32.~>>?, + rshift = Word32.>>?}} + (sextd, w) + fun zextdFromWord32 w = extdFromWord32 (false, w) + fun zextdFromInt32 i = zextdFromWord32 (IntWordConv.idFromInt32ToWord32 i) + fun sextdFromWord32 w = extdFromWord32 (true, w) + fun sextdFromInt32 i = sextdFromWord32 (IntWordConv.idFromInt32ToWord32 i) + val castFromInt32 = sextdFromInt32 + val castFromWord32 = zextdFromWord32 + val zchckFromInt32 = zextdFromInt32 + val zchckFromWord32 = zextdFromWord32 + val schckFromInt32 = sextdFromInt32 + val schckFromWord32 = sextdFromWord32 - val fromWordAux64 = - make {toMPLimb = MPLimb.fromWord64, - toObjptrWordX = ObjptrWord.fromWord64X, - other = {wordSize = Word64.wordSize, + fun extdFromWord64 (sextd, w) = + make {zextdToMPLimb = MPLimb.zextdFromWord64, + zextdToObjptrWord = ObjptrWord.zextdFromWord64, + sextdToObjptrWord = ObjptrWord.sextdFromWord64, + other = {sizeInBits = Word64.sizeInBits, zero = Word64.zero, eq = ((op =) : Word64.word * Word64.word -> bool), + isNeg = fn w => Int64.< (IntWordConv.idFromWord64ToInt64 w, 0), neg = Word64.~, notb = Word64.notb, - rshift = Word64.>>}} - fun fromWord64 w = fromWordAux64 (false, w) - fun fromInt64 i = fromWordAux64 (Int64.< (i, 0), Word64.fromInt64 i) - fun fromWord64X w = fromInt64 (Word64.toInt64X w) - val fromInt64Unsafe = fromInt64 - val fromWord64Unsafe = fromWord64 - val fromWord64XUnsafe = fromWord64X + rashift = Word64.~>>?, + rshift = Word64.>>?}} + (sextd, w) + fun zextdFromWord64 w = extdFromWord64 (false, w) + fun zextdFromInt64 i = zextdFromWord64 (IntWordConv.idFromInt64ToWord64 i) + fun sextdFromWord64 w = extdFromWord64 (true, w) + fun sextdFromInt64 i = sextdFromWord64 (IntWordConv.idFromInt64ToWord64 i) + val castFromInt64 = sextdFromInt64 + val castFromWord64 = zextdFromWord64 + val zchckFromInt64 = zextdFromInt64 + val zchckFromWord64 = zextdFromWord64 + val schckFromInt64 = sextdFromInt64 + val schckFromWord64 = sextdFromWord64 - fun fromIntInf i = i - fun fromIntInfUnsafe i = i + fun zextdFromIntInf ii = ii + fun sextdFromIntInf ii = ii + fun castFromIntInf ii = ii + fun zchckFromIntInf ii = ii + fun schckFromIntInf ii = ii end local structure S = ObjptrInt_ChooseIntN (type 'a t = 'a -> bigInt - val fInt8 = fromInt8 - val fInt16 = fromInt16 - val fInt32 = fromInt32 - val fInt64 = fromInt64) + val fInt8 = sextdFromInt8 + val fInt16 = sextdFromInt16 + val fInt32 = sextdFromInt32 + val fInt64 = sextdFromInt64) in - val fromObjptrInt = S.f + val sextdFromObjptrInt = S.f end local datatype 'a ans = Big of bool * bool * 'a | Small of ObjptrWord.word - fun 'a make {fromMPLimb: MPLimb.word -> 'a, - other : {wordSize: Int32.int, - wordSizeWord: Word32.word, + fun 'a make {zextdFromMPLimb: MPLimb.word -> 'a, + other : {sizeInBits: Int32.int, + sizeInBitsWord: Word32.word, zero: 'a, lshift: 'a * Word32.word -> 'a, orb: 'a * 'a -> 'a}} i = @@ -410,24 +615,24 @@ val n = V.length v val isneg = V.subUnsafe (v, 0) <> 0w0 in - if Int32.>= (MPLimb.wordSize, #wordSize other) + if Int32.>= (MPLimb.sizeInBits, #sizeInBits other) then let val limbsPer = 1 val limb = V.subUnsafe (v, 1) val extra = S.> (n, S.+ (limbsPer, 1)) orelse - (MPLimb.>> (limb, #wordSizeWord other)) <> 0w0 - val ans = fromMPLimb limb + (MPLimb.>>? (limb, #sizeInBitsWord other)) <> 0w0 + val ans = zextdFromMPLimb limb in Big (isneg, extra, ans) end else let val limbsPer = - S.fromInt32 (Int32.quot (#wordSize other, - MPLimb.wordSize)) - val extra = - S.> (n, S.+ (limbsPer, 1)) + S.sextdFromInt32 + (Int32.quot (#sizeInBits other, + MPLimb.sizeInBits)) + val extra = S.> (n, S.+ (limbsPer, 1)) val ans = let fun loop (i, ans) = @@ -437,8 +642,8 @@ val ans = (#orb other) ((#lshift other) - (ans, MPLimb.wordSizeWord), - fromMPLimb limb) + (ans, MPLimb.sizeInBitsWord), + zextdFromMPLimb limb) in loop (S.- (i, 1), ans) end @@ -451,149 +656,223 @@ end end in - val toWordAux8 = - make {fromMPLimb = MPLimb.toWord8, - other = {wordSize = Word8.wordSize, - wordSizeWord = Word8.wordSizeWord, + val chckToWord8Aux = + make {zextdFromMPLimb = MPLimb.zextdToWord8, + other = {sizeInBits = Word8.sizeInBits, + sizeInBitsWord = Word8.sizeInBitsWord, zero = Word8.zero, - lshift = Word8.<<, + lshift = Word8.<<?, orb = Word8.orb}} - fun toWord8X i = - case toWordAux8 i of - Small w => ObjptrWord.toWord8X w + fun sextdToWord8 i = + case chckToWord8Aux i of + Small w => ObjptrWord.sextdToWord8 w | Big (isneg, _, ans) => if isneg then Word8.~ ans else ans - fun toWord8 i = toWord8X i - fun toInt8 i = - case toWordAux8 i of - Small w => ObjptrWord.toInt8X w - | Big (isneg, extra, ans) => + fun sextdToInt8 i = IntWordConv.idFromWord8ToInt8 (sextdToWord8 i) + val zextdToWord8 = sextdToWord8 + fun zextdToInt8 i = IntWordConv.idFromWord8ToInt8 (zextdToWord8 i) + val castToWord8 = sextdToWord8 + val castToInt8 = sextdToInt8 + fun schckToWord8 i = + case chckToWord8Aux i of + Small w => ObjptrWord.schckToWord8 w + | Big (isneg, extra, ans) => if extra then raise Overflow else if isneg then let - val ans = Word8.toInt8X (Word8.~ ans) - in - if Int8.>= (ans, 0) + val ans = Word8.~ ans + val ans' = IntWordConv.idFromWord8ToInt8 ans + in + if Int8.> (ans', 0) then raise Overflow else ans end - else Word8.toInt8 ans - val toWord8Unsafe = toWord8 - val toWord8XUnsafe = toWord8X - fun toInt8Unsafe i = Word8.toInt8X (toWord8X i) + else let + val ans' = IntWordConv.idFromWord8ToInt8 ans + in + if Int8.< (ans', 0) + then raise Overflow + else ans + end + fun schckToInt8 i = IntWordConv.idFromWord8ToInt8 (schckToWord8 i) + fun zchckToWord8 i = + case chckToWord8Aux i of + Small w => ObjptrWord.schckToWord8 w + | Big (isneg, extra, ans) => + if isneg orelse extra + then raise Overflow + else ans + fun zchckToInt8 i = IntWordConv.idFromWord8ToInt8 (zchckToWord8 i) - val toWordAux16 = - make {fromMPLimb = MPLimb.toWord16, - other = {wordSize = Word16.wordSize, - wordSizeWord = Word16.wordSizeWord, + val chckToWord16Aux = + make {zextdFromMPLimb = MPLimb.zextdToWord16, + other = {sizeInBits = Word16.sizeInBits, + sizeInBitsWord = Word16.sizeInBitsWord, zero = Word16.zero, - lshift = Word16.<<, + lshift = Word16.<<?, orb = Word16.orb}} - fun toWord16X i = - case toWordAux16 i of - Small w => ObjptrWord.toWord16X w + fun sextdToWord16 i = + case chckToWord16Aux i of + Small w => ObjptrWord.sextdToWord16 w | Big (isneg, _, ans) => if isneg then Word16.~ ans else ans - fun toWord16 i = toWord16X i - fun toInt16 i = - case toWordAux16 i of - Small w => ObjptrWord.toInt16X w - | Big (isneg, extra, ans) => + fun sextdToInt16 i = IntWordConv.idFromWord16ToInt16 (sextdToWord16 i) + val zextdToWord16 = sextdToWord16 + fun zextdToInt16 i = IntWordConv.idFromWord16ToInt16 (zextdToWord16 i) + val castToWord16 = sextdToWord16 + val castToInt16 = sextdToInt16 + fun schckToWord16 i = + case chckToWord16Aux i of + Small w => ObjptrWord.schckToWord16 w + | Big (isneg, extra, ans) => if extra then raise Overflow else if isneg then let - val ans = Word16.toInt16X (Word16.~ ans) - in - if Int16.>= (ans, 0) + val ans = Word16.~ ans + val ans' = IntWordConv.idFromWord16ToInt16 ans + in + if Int16.> (ans', 0) then raise Overflow else ans end - else Word16.toInt16 ans - val toWord16Unsafe = toWord16 - val toWord16XUnsafe = toWord16X - fun toInt16Unsafe i = Word16.toInt16X (toWord16X i) - - val toWordAux32 = - make {fromMPLimb = MPLimb.toWord32, - other = {wordSize = Word32.wordSize, - wordSizeWord = Word32.wordSizeWord, + else let + val ans' = IntWordConv.idFromWord16ToInt16 ans + in + if Int16.< (ans', 0) + then raise Overflow + else ans + end + fun schckToInt16 i = IntWordConv.idFromWord16ToInt16 (schckToWord16 i) + fun zchckToWord16 i = + case chckToWord16Aux i of + Small w => ObjptrWord.schckToWord16 w + | Big (isneg, extra, ans) => + if isneg orelse extra + then raise Overflow + else ans + fu... [truncated message content] |
From: Matthew F. <fl...@ml...> - 2006-05-15 19:49:57
|
Typo ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-16 02:45:59 UTC (rev 4546) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-16 02:49:56 UTC (rev 4547) @@ -99,7 +99,7 @@ static void writeProfileCount (GC_state s, int fd, GC_profileData p, GC_profileMasterIndex i); static void setProfTimer (long usec); -static void initProfilingTime (GC_state s) +static void initProfilingTime (GC_state s); static void atexitForProfiling (void); static void initProfiling (GC_state s); |
From: Matthew F. <fl...@ml...> - 2006-05-15 19:46:00
|
Fixed attribute sytax ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h ---------------------------------------------------------------------- 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-16 02:06:02 UTC (rev 4545) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2006-05-16 02:45:59 UTC (rev 4546) @@ -306,7 +306,7 @@ * mlton/main/main.fun to make sure that time profiling is never * turned on. */ -static void initProfilingTime (GC_state s) __attribute__ ((noreturn)); +__attribute__ ((noreturn)) void initProfilingTime (__attribute__ ((unused)) GC_state s) { die ("no time profiling"); } @@ -346,7 +346,6 @@ incForProfiling (s, 1, sourceSeqsIndex); } -static void initProfilingTime (GC_state s); static void initProfilingTime (GC_state s) { struct sigaction sa; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-16 02:06:02 UTC (rev 4545) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2006-05-16 02:45:59 UTC (rev 4546) @@ -99,8 +99,9 @@ static void writeProfileCount (GC_state s, int fd, GC_profileData p, GC_profileMasterIndex i); static void setProfTimer (long usec); +static void initProfilingTime (GC_state s) +static void atexitForProfiling (void); static void initProfiling (GC_state s); -static void atexitForProfiling (void); #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ |
From: Stephen W. <sw...@ml...> - 2006-05-15 19:06:03
|
Used the same gcc-specific attributes to define "pointer" to be 4-byte aligned as we did for "Pointer". This eliminated all but six of the warning about "cast increases required alignment of target type". ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-16 01:51:43 UTC (rev 4544) +++ mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-16 02:06:02 UTC (rev 4545) @@ -6,7 +6,10 @@ * See the file MLton-LICENSE for details. */ -typedef unsigned char* pointer; // typedef void* pointer; +// typedef unsigned char* pointer; +typedef unsigned char pointerAux __attribute__ ((aligned (4), may_alias)); +typedef pointerAux* pointer; + #define POINTER_SIZE sizeof(pointer) #define FMTPTR "0x%016"PRIxPTR |
From: Stephen W. <sw...@ml...> - 2006-05-15 18:51:44
|
Fixed type warning. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c ---------------------------------------------------------------------- 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-16 01:50:24 UTC (rev 4543) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c 2006-05-16 01:51:43 UTC (rev 4544) @@ -45,7 +45,7 @@ return (size_t)i << CARD_SIZE_LOG2; } GC_cardMapElem *pointerToCardMapAddr (GC_state s, pointer p) { - pointer res; + GC_cardMapElem *res; res = &s->generationalMaps.cardMapAbsolute[pointerToCardMapIndexAbsolute (p)]; if (DEBUG_CARD_MARKING) |
From: Stephen W. <sw...@ml...> - 2006-05-15 18:50:24
|
Fixed typo. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c ---------------------------------------------------------------------- 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-16 01:29:31 UTC (rev 4542) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-16 01:50:24 UTC (rev 4543) @@ -68,7 +68,7 @@ // "typedef unsigned char* Pointer;", // "struct PointerAux { unsigned char z[4]; } __attribute__ ((aligned (4), may_alias));", "typedef unsigned char PointerAux __attribute__ ((aligned (4), may_alias));", - "typedef struct PointerAux* Pointer;", + "typedef PointerAux* Pointer;", "#define Array(t) Pointer", "#define Ref(t) Pointer", "#define Vector(t) const Pointer", |
From: Stephen W. <sw...@ml...> - 2006-05-15 18:29:32
|
Tweaked the assert macro to call a dummy "asok" function in the event that the assertion is true. This avoids spurious warnings like the following: gc/mark-compact.c:18: warning: statement with no effect gc/mark-compact.c:30: warning: statement with no effect These warnings come when compiling with -pedantic -Wall, and appear to be due to gcc simplifying the assert test (p) in (p) ? (void)0 : asfail(__FILE__, __LINE__, #p) to TRUE at compile time and replacing expression with (void)0. Now, why this should cause a warning is beyond me, since (void)0 by itself as source code doesn't. Anyways, introducing the call to "asok" instead of (void)0 suppresses the warning. And the performance shouldn't matter since this is an assert and is only on when debugging. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c U mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h ---------------------------------------------------------------------- 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-16 00:49:09 UTC (rev 4541) +++ mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.c 2006-05-16 01:29:31 UTC (rev 4542) @@ -7,6 +7,9 @@ #include "util.h" +void asok (void) { +} + void asfail(const char *file, int line, const char *prop) { fflush(stdout); fprintf(stderr, "%s:%d: assert(%s) failed.\n", file, line, prop); 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-16 00:49:09 UTC (rev 4541) +++ mlton/branches/on-20050822-x86_64-branch/runtime/util/assert.h 2006-05-16 01:29:31 UTC (rev 4542) @@ -13,9 +13,11 @@ extern void asfail (const char *file, int line, const char *prop) __attribute__ ((noreturn)); +extern void asok (void); + /* Assertion verifier */ #if ASSERT -#define assert(p) ((p) ? (void)0 : asfail(__FILE__, __LINE__, #p)) +#define assert(p) ((p) ? asok() : asfail(__FILE__, __LINE__, #p)) #else #define assert(p) ((void)0) #endif |
From: Stephen W. <sw...@ml...> - 2006-05-15 17:49:10
|
Took out "const" from const void *GC_getTextEnd (void); const void *GC_getTextStart (void); It was causing the following warnings when compiling the runtime. gc/sources.c:64: warning: cast discards qualifiers from pointer target type gc/sources.c:65: warning: cast discards qualifiers from pointer target type ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-16 00:21:20 UTC (rev 4540) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-16 00:49:09 UTC (rev 4541) @@ -8,11 +8,11 @@ #include "mmap-protect.c" #include "use-mmap.c" -const void *GC_getTextEnd (void) { +void *GC_getTextEnd (void) { return (const void*)(long)(get_etext ()); } -const void *GC_getTextStart (void) { +void *GC_getTextStart (void) { void *address; const struct mach_header *mh; 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-16 00:21:20 UTC (rev 4540) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-16 00:49:09 UTC (rev 4541) @@ -2,9 +2,10 @@ extern char _start; extern char etext; -const void *GC_getTextStart (void) { +void *GC_getTextStart (void) { return &_start; } -const void *GC_getTextEnd (void) { + +void *GC_getTextEnd (void) { return &etext; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-16 00:21:20 UTC (rev 4540) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-16 00:49:09 UTC (rev 4541) @@ -149,8 +149,8 @@ /* Text Segment */ /* ------------------------------------------------- */ -const void *GC_getTextEnd (void); -const void *GC_getTextStart (void); +void *GC_getTextEnd (void); +void *GC_getTextStart (void); /* ------------------------------------------------- */ /* SigProf Handler */ |
From: Stephen W. <sw...@ml...> - 2006-05-15 17:21:21
|
Improved definition of PointerAux type. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c ---------------------------------------------------------------------- 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-16 00:20:07 UTC (rev 4539) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-16 00:21:20 UTC (rev 4540) @@ -66,7 +66,8 @@ // "typedef void* Pointer;", // "typedef uintptr_t Pointer;", // "typedef unsigned char* Pointer;", - "struct PointerAux { unsigned char z[4]; } __attribute__ ((aligned (4), may_alias));", + // "struct PointerAux { unsigned char z[4]; } __attribute__ ((aligned (4), may_alias));", + "typedef unsigned char PointerAux __attribute__ ((aligned (4), may_alias));", "typedef struct PointerAux* Pointer;", "#define Array(t) Pointer", "#define Ref(t) Pointer", |
From: Stephen W. <sw...@ml...> - 2006-05-15 17:20:07
|
Added c-types.sml for Sparc/Solaris. ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sparc-solaris/c-types.sml ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sparc-solaris/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sparc-solaris/c-types.sml 2006-05-15 20:45:05 UTC (rev 4538) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/sparc-solaris/c-types.sml 2006-05-16 00:20:07 UTC (rev 4539) @@ -0,0 +1,131 @@ +(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + + +(* C *) +structure C_Char = struct open Int8 type t = int end +functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_SChar = struct open Int8 type t = int end +functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_UChar = struct open Word8 type t = word end +functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Short = struct open Int16 type t = int end +functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_SShort = struct open Int16 type t = int end +functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_UShort = struct open Word16 type t = word end +functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Int = struct open Int32 type t = int end +functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SInt = struct open Int32 type t = int end +functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UInt = struct open Word32 type t = word end +functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Long = struct open Int32 type t = int end +functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SLong = struct open Int32 type t = int end +functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_ULong = struct open Word32 type t = word end +functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_LongLong = struct open Int64 type t = int end +functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_SLongLong = struct open Int64 type t = int end +functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_ULongLong = struct open Word64 type t = word end +functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Float = struct open Real32 type t = real end +functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A) +structure C_Double = struct open Real64 type t = real end +functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A) +structure C_Size = struct open Word32 type t = word end +functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +structure C_Pointer = struct open Word32 type t = word end +functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_String = struct open Word32 type t = word end +functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_StringArray = struct open Word32 type t = word end +functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* Generic integers *) +structure C_Fd = C_Int +functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Signal = C_Int +functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Status = C_Int +functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Sock = C_Int +functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) + +(* C99 *) +structure C_Ptrdiff = struct open Int32 type t = int end +functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Intmax = struct open Int64 type t = int end +functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_UIntmax = struct open Word64 type t = word end +functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Intptr = struct open Int32 type t = int end +functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UIntptr = struct open Word32 type t = word end +functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <dirent.h> *) +structure C_DirP = struct open Word32 type t = word end +functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <poll.h> *) +structure C_NFds = struct open Word32 type t = word end +functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <resource.h> *) +structure C_RLim = struct open Word64 type t = word end +functor C_RLim_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) + +(* from <sys/types.h> *) +structure C_Clock = struct open Int32 type t = int end +functor C_Clock_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Dev = struct open Word32 type t = word end +functor C_Dev_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_GId = struct open Int32 type t = int end +functor C_GId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Id = struct open Int32 type t = int end +functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_INo = struct open Word64 type t = word end +functor C_INo_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Mode = struct open Word32 type t = word end +functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_NLink = struct open Word32 type t = word end +functor C_NLink_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Off = struct open Int64 type t = int end +functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_PId = struct open Int32 type t = int end +functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SSize = struct open Int32 type t = int end +functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SUSeconds = struct open Int32 type t = int end +functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Time = struct open Int32 type t = int end +functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UId = struct open Int32 type t = int end +functor C_UId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) + +(* from <sys/socket.h> *) +structure C_Socklen = struct open Word32 type t = word end +functor C_Socklen_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <termios.h> *) +structure C_CC = struct open Word8 type t = word end +functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Speed = struct open Word32 type t = word end +functor C_Speed_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_TCFlag = struct open Word32 type t = word end +functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from "gmp.h" *) +structure C_MPLimb = struct open Word32 type t = word end +functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + |
From: Matthew F. <fl...@ml...> - 2006-05-15 13:45:05
|
Fixed script for exnHistory regressions ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/bin/regression ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/bin/regression =================================================================== --- mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-14 05:35:04 UTC (rev 4537) +++ mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-15 20:45:05 UTC (rev 4538) @@ -18,6 +18,7 @@ short='false' skipTo='' declare -a flags +declare -a extraFlags while [ "$#" -gt 0 ]; do case "$1" in -cross) @@ -147,13 +148,12 @@ ;; esac echo "testing $f" + unset extraFlags case "$f" in exnHistory*) - extraFlags="-const 'Exn.keepHistory true'" + extraFlags[${#extraFlags[@]}]="-const" + extraFlags[${#extraFlags[@]}]="Exn.keepHistory true" ;; - *) - extraFlags="" - ;; esac if (! $runOnly); then mlb="$f.mlb" @@ -167,7 +167,7 @@ \"redundantMatch ignore\" in $f.sml end" >"$mlb" - "$mlton" "${flags[@]}" $extraFlags -output "$f" "$mlb" + "$mlton" "${flags[@]}" "${extraFlags[@]}" -output "$f" "$mlb" if [ "$?" -ne '0' ] || ((! $cross) && [ ! -x "$f" ]); then compFail "$f" fi @@ -214,7 +214,7 @@ /c/cygwin/bin/sed 's/$/\r/' <"$f.ok" >"$compare" fi if ! diff "$compare" "$tmp"; then - echo "difference with ${flags[*]}" + echo "difference with ${flags[*]} ${extraFlags[*]}" fi fi fi |
From: Ville L. <vi...@ml...> - 2006-05-13 22:35:08
|
AIX doesn't use GNU binutils, so GNU options for `strip' don't work. ---------------------------------------------------------------------- U mlton/trunk/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/Makefile =================================================================== --- mlton/trunk/Makefile 2006-05-13 21:26:09 UTC (rev 4536) +++ mlton/trunk/Makefile 2006-05-14 05:35:04 UTC (rev 4537) @@ -1,4 +1,4 @@ -## Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # Copyright (C) 1997-2000 NEC Research Institute. # @@ -411,7 +411,7 @@ cd $(TMAN) && $(GZIP) $(MAN_PAGES); \ fi case "$(TARGET_OS)" in \ - cygwin|darwin|solaris) \ + aix|cygwin|darwin|solaris) \ ;; \ *) \ for f in $(TLIB)/$(AOUT)$(EXE) $(TBIN)/$(LEX)$(EXE) \ |
From: Ville L. <vi...@ml...> - 2006-05-13 15:07:50
|
Ported to PowerPC/AIX. Fixed a bug in the runtime for the cases where nonblocking IO with sockets was implemented using MSG_DONTWAIT. This flag does not exist on AIX, Cygwin, HPUX, and MinGW and was previously just ignored. Now the runtime simulates the flag for these platforms (except MinGW, yet, where it's still ignored). Some cosmetics. ---------------------------------------------------------------------- U mlton/trunk/basis-library/misc/primitive.sml U mlton/trunk/basis-library/mlton/platform.sig U mlton/trunk/basis-library/mlton/platform.sml U mlton/trunk/basis-library/sml-nj/sml-nj.sml U mlton/trunk/bin/mlton-script U mlton/trunk/bin/platform U mlton/trunk/bin/upgrade-basis U mlton/trunk/doc/changelog U mlton/trunk/lib/mlton-stubs/mlton.sml U mlton/trunk/lib/mlton-stubs/platform.sig U mlton/trunk/runtime/basis/Net/Socket/Socket.c A mlton/trunk/runtime/platform/aix.c A mlton/trunk/runtime/platform/aix.h U mlton/trunk/runtime/platform/cygwin.c U mlton/trunk/runtime/platform/cygwin.h U mlton/trunk/runtime/platform/darwin.h U mlton/trunk/runtime/platform/freebsd.h U mlton/trunk/runtime/platform/hpux.c U mlton/trunk/runtime/platform/hpux.h U mlton/trunk/runtime/platform/linux.h U mlton/trunk/runtime/platform/mingw.h U mlton/trunk/runtime/platform/netbsd.h U mlton/trunk/runtime/platform/openbsd.h A mlton/trunk/runtime/platform/recv.nonblock.c U mlton/trunk/runtime/platform/solaris.h U mlton/trunk/runtime/platform.h U mlton/trunk/runtime/types.h ---------------------------------------------------------------------- Modified: mlton/trunk/basis-library/misc/primitive.sml =================================================================== --- mlton/trunk/basis-library/misc/primitive.sml 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/basis-library/misc/primitive.sml 2006-05-13 21:26:09 UTC (rev 4536) @@ -964,7 +964,8 @@ structure OS = struct datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX @@ -976,7 +977,8 @@ val host: t = case _const "MLton_Platform_OS_host": string; of - "cygwin" => Cygwin + "aix" => AIX + | "cygwin" => Cygwin | "darwin" => Darwin | "freebsd" => FreeBSD | "hpux" => HPUX Modified: mlton/trunk/basis-library/mlton/platform.sig =================================================================== --- mlton/trunk/basis-library/mlton/platform.sig 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/basis-library/mlton/platform.sig 2006-05-13 21:26:09 UTC (rev 4536) @@ -20,7 +20,8 @@ structure OS: sig datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX Modified: mlton/trunk/basis-library/mlton/platform.sml =================================================================== --- mlton/trunk/basis-library/mlton/platform.sml 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/basis-library/mlton/platform.sml 2006-05-13 21:26:09 UTC (rev 4536) @@ -43,7 +43,8 @@ struct open OS - val all = [(Cygwin, "Cygwin"), + val all = [(AIX, "AIX"), + (Cygwin, "Cygwin"), (Darwin, "Darwin"), (FreeBSD, "FreeBSD"), (HPUX, "HPUX"), Modified: mlton/trunk/basis-library/sml-nj/sml-nj.sml =================================================================== --- mlton/trunk/basis-library/sml-nj/sml-nj.sml 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/basis-library/sml-nj/sml-nj.sml 2006-05-13 21:26:09 UTC (rev 4536) @@ -30,7 +30,8 @@ open MLton.Platform.OS in case host of - Cygwin => UNIX + AIX => UNIX + | Cygwin => UNIX | Darwin => MACOS | FreeBSD => UNIX | HPUX => UNIX Modified: mlton/trunk/bin/mlton-script =================================================================== --- mlton/trunk/bin/mlton-script 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/bin/mlton-script 2006-05-13 21:26:09 UTC (rev 4536) @@ -96,10 +96,12 @@ -malign-functions=5 -malign-jumps=2 -malign-loops=2' \ + -target-link-opt aix '-lgmp' \ -target-link-opt amd64 '-m32' \ -target-link-opt cygwin '-lgmp' \ -target-link-opt darwin "$darwinLinkOpts -lgmp" \ -target-link-opt freebsd '-L/usr/local/lib/ -lgmp' \ + -target-link-opt hpux '-lgmp' \ -target-link-opt linux '-lgmp' \ -target-link-opt mingw \ '-lgmp -lws2_32 -lkernel32 -lpsapi -lnetapi32' \ Modified: mlton/trunk/bin/platform =================================================================== --- mlton/trunk/bin/platform 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/bin/platform 2006-05-13 21:26:09 UTC (rev 4536) @@ -24,8 +24,13 @@ esac uname=`uname` +arch_flag=-m case "$uname" in +AIX) + HOST_OS='aix' + arch_flag=-p +;; CYGWIN*) HOST_OS='cygwin' ;; @@ -58,7 +63,7 @@ ;; esac -arch=`uname -m` +arch=`uname $arch_flag` case "$arch" in alpha*) @@ -90,6 +95,9 @@ # big-endian and little-endian detect via headers HOST_ARCH=mips ;; +powerpc) + HOST_ARCH=powerpc +;; ppc*) HOST_ARCH=powerpc ;; Modified: mlton/trunk/bin/upgrade-basis =================================================================== --- mlton/trunk/bin/upgrade-basis 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/bin/upgrade-basis 2006-05-13 21:26:09 UTC (rev 4536) @@ -135,6 +135,9 @@ esac case "$OS" in +aix) + os='AIX' +;; cygwin) os='Cygwin' ;; @@ -209,10 +212,11 @@ structure OS = struct - datatype t = Cygwin | Darwin | FreeBSD | HPUX | Linux | MinGW - | NetBSD | OpenBSD | Solaris + datatype t = AIX | Cygwin | Darwin | FreeBSD | HPUX | Linux + | MinGW | NetBSD | OpenBSD | Solaris - val all = [(Cygwin, "Cygwin"), + val all = [(AIX, "AIX"), + (Cygwin, "Cygwin"), (Darwin, "Darwin"), (FreeBSD, "FreeBSD"), (HPUX, "HPUX"), Modified: mlton/trunk/doc/changelog =================================================================== --- mlton/trunk/doc/changelog 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/doc/changelog 2006-05-13 21:26:09 UTC (rev 4536) @@ -1,5 +1,13 @@ Here are the changes since version 20051202. +* 2006-05-11 + - Ported to PowerPC-AIX. + - Fixed a bug in the runtime for the cases where nonblocking IO with + sockets was implemented using MSG_DONTWAIT. This flag does not + exist on AIX, Cygwin, HPUX, and MinGW and was previously just + ignored. Now the runtime simulates the flag for these platforms + (except MinGW, yet, where it's still ignored). + * 2006-04-25 - Ported to HPPA-HPUX. - Fixed PackReal{,32,64}{Big,Little} to follow the Basis Library Modified: mlton/trunk/lib/mlton-stubs/mlton.sml =================================================================== --- mlton/trunk/lib/mlton-stubs/mlton.sml 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/lib/mlton-stubs/mlton.sml 2006-05-13 21:26:09 UTC (rev 4536) @@ -210,7 +210,8 @@ structure OS = struct datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX @@ -222,7 +223,8 @@ val host: t = Linux - val all = [(Cygwin, "Cygwin"), + val all = [(AIX, "AIX"), + (Cygwin, "Cygwin"), (Darwin, "Darwin"), (FreeBSD, "FreeBSD"), (HPUX, "HPUX"), Modified: mlton/trunk/lib/mlton-stubs/platform.sig =================================================================== --- mlton/trunk/lib/mlton-stubs/platform.sig 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/lib/mlton-stubs/platform.sig 2006-05-13 21:26:09 UTC (rev 4536) @@ -20,7 +20,8 @@ structure OS: sig datatype t = - Cygwin + AIX + | Cygwin | Darwin | FreeBSD | HPUX Modified: mlton/trunk/runtime/basis/Net/Socket/Socket.c =================================================================== --- mlton/trunk/runtime/basis/Net/Socket/Socket.c 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/basis/Net/Socket/Socket.c 2006-05-13 21:26:09 UTC (rev 4536) @@ -30,13 +30,13 @@ Int Socket_recv (Int s, Char *msg, Int start, Int len, Word flags) { MLton_initSockets (); - return recv (s, (void*)((char *)msg + start), (size_t)len, flags); + return mlton_recv (s, (void*)((char *)msg + start), (size_t)len, flags); } Int Socket_recvFrom (Int s, Char *msg, Int start, Int len, Word flags, Char* addr, Int *addrlen) { MLton_initSockets (); - return recvfrom (s, (void*)((char *)msg + start), (size_t)len, flags, + return mlton_recvfrom (s, (void*)((char *)msg + start), (size_t)len, flags, (struct sockaddr*)addr, (socklen_t*)addrlen); } Added: mlton/trunk/runtime/platform/aix.c =================================================================== --- mlton/trunk/runtime/platform/aix.c 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/aix.c 2006-05-13 21:26:09 UTC (rev 4536) @@ -0,0 +1,170 @@ + +/* On AIX 5.1 (and older) there is no fegetround() or fesetround(). + Instead, float.h defines fp_read_rnd() and fp_swap_rnd() with + equivalent functionality. GCC has its own version of float.h, so + we include the system header directly before everything else. */ +#include "/usr/include/float.h" +#include "platform.h" + +#include <sys/mman.h> +#include <sys/procfs.h> +#include <sys/vminfo.h> + +#include "getrusage.c" +#include "mkdir2.c" +#include "recv.nonblock.c" +#include "ssmmap.c" +#include "use-mmap.c" + +int fegetround(void) +{ + return fp_read_rnd (); +} + +void fesetround(int mode) +{ + fp_swap_rnd (mode); +} + +int fpclassify64(double d) +{ + int c; + c = class (d); + switch (c) { + case FP_PLUS_NORM: + case FP_MINUS_NORM: + return FP_NORMAL; + case FP_PLUS_ZERO: + case FP_MINUS_ZERO: + return FP_ZERO; + case FP_PLUS_INF: + case FP_MINUS_INF: + return FP_INFINITE; + case FP_PLUS_DENORM: + case FP_MINUS_DENORM: + return FP_SUBNORMAL; + case FP_SNAN: + case FP_QNAN: + return FP_NAN; + default: + die ("Real_class error: invalid class %d\n", c); + } +} + +W32 totalRam (GC_state s) { + struct vminfo info; + int pagesize; + + pagesize = sysconf (_SC_PAGESIZE); + if (vmgetinfo (&info, VMINFO, sizeof(info)) < 0) + diee ("totalRam error: vmgetinfo failed\n"); + return info.memsizepgs * pagesize; +} + + +struct map_type { + int flag; + char *type; +}; + +static struct map_type map_types[] = + {{MA_MAINEXEC, "main"}, + {MA_KERNTEXT, "kern"}, + {MA_SHARED, "shared"}, + {MA_STACK, "stack"}, + {0, NULL}}; + + +struct map_segment { + prptr64_t start; + prptr64_t end; + char *name; +}; + +static struct map_segment map_segments[] = + {{0x00000000, 0x0fffffff, "kernel"}, + /* Application program text. */ + {0x10000000, 0x1fffffff, "text"}, + /* Application program data and the application stack. */ + {0x20000000, 0x2fffffff, "data"}, + /* Available for use by shared memory or mmap services. */ + {0x30000000, 0xafffffff, "mmap"}, + /* Shared library text. */ + {0xd0000000, 0xdfffffff, "shtext"}, + /* Miscellaneous kernel data. */ + {0xe0000000, 0xefffffff, "kdata"}, + /* Application shared library data. */ + {0xf0000000, 0xffffffff, "shdata"}, + {0, 0, NULL}}; + + +static char * +get_map_type(int flags, prptr64_t addr) +{ + struct map_type *m; + + for (m = map_types; m->flag; m++) + if (m->flag & flags) + return m->type; + if ((addr >= 0xd0000000 && addr <= 0xdfffffff) + || (addr >= 0xf0000000 && addr <= 0xffffffff)) + return "shlib"; + return ""; +} + +static char * +get_map_segment(prptr64_t addr) +{ + struct map_segment *m; + + for (m = map_segments; m->name; m++) + if (m->start <= addr && m->end >= addr) + return m->name; + return ""; +} + +#define BUFLEN 65536 + +void showMem(void) +{ + pid_t pid = getpid (); + char fname[128]; + int fd = 0; + char *buf; + struct prmap *map; + + printf ("va_start va_end perm type segment file (member) [object]\n"); + printf ("--------+--------+---+------+------+----------------------\n"); + + snprintf (fname, sizeof (fname), "/proc/%d/map", pid); + fd = open (fname, O_RDONLY); + if (fd == -1) + diee ("showMem error: opening %s failed", fname); + + /* I couldn't figure out a way to get the size of the map file + beforehand (only open, read, write, and close work on files under + /proc), so let's just hope that 64k will be enough. */ + buf = malloc (BUFLEN); + if (buf == NULL) + die ("showMem error: out of memory."); + + read (fd, buf, BUFLEN); + map = (struct prmap*)buf; + + for (map = (struct prmap*)buf; map->pr_size; map++) { + char *m = buf + map->pr_pathoff; + m += strlen (m) + 1; + if (!m[0]) + m = NULL; + printf ("%08llx %08llx %s%s%s %-6s %-6s %s %s%s%s[%s]\n", + map->pr_vaddr, map->pr_vaddr + map->pr_size, + map->pr_mflags & MA_READ ? "r" : "-", + map->pr_mflags & MA_WRITE ? "w" : "-", + map->pr_mflags & MA_EXEC ? "x" : "-", + get_map_type (map->pr_mflags, map->pr_vaddr), + get_map_segment (map->pr_vaddr), + buf + map->pr_pathoff, + m ? "(" : "", m ? m : "", m ? ") " : "", + map->pr_mapname); + } +} Added: mlton/trunk/runtime/platform/aix.h =================================================================== --- mlton/trunk/runtime/platform/aix.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/aix.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -0,0 +1,52 @@ +#define HAS_FEROUND TRUE +#define HAS_FPCLASSIFY FALSE +#define HAS_FPCLASSIFY64 TRUE +#define HAS_MSG_DONTWAIT FALSE +#define HAS_PTRACE FALSE +#define HAS_REMAP FALSE +#define HAS_SIGALTSTACK TRUE +#define HAS_SIGNBIT FALSE +#define HAS_SPAWN FALSE +#define HAS_TIME_PROFILING FALSE + +#define MLton_Platform_OS_host "aix" +#define __ppc__ + +#include <grp.h> +#include <math.h> +#include <netdb.h> +#include <netinet/in.h> +#include <netinet/tcp.h> +#include <pwd.h> +#include <sys/ioctl.h> +#include <sys/poll.h> +#include <sys/select.h> +#include <sys/socket.h> +#include <sys/syslog.h> +#include <sys/times.h> +#include <sys/types.h> +#include <sys/types.h> +#include <sys/un.h> +#include <sys/utsname.h> +#include <termios.h> + + +#include "feround.h" + +#define FE_TOWARDZERO 0 // FP_RND_RZ +#define FE_TONEAREST 1 // FP_RND_RN +#define FE_UPWARD 2 // FP_RND_RP +#define FE_DOWNWARD 3 // FP_RND_RM + +enum { + FP_NAN, + FP_INFINITE, + FP_ZERO, + FP_SUBNORMAL, + FP_NORMAL +}; + +int fpclassify64(double d); + +/* This should not conflict with existing flags. */ +#define MSG_DONTWAIT 0x1000000 Modified: mlton/trunk/runtime/platform/cygwin.c =================================================================== --- mlton/trunk/runtime/platform/cygwin.c 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/cygwin.c 2006-05-13 21:26:09 UTC (rev 4536) @@ -5,6 +5,7 @@ #include "getrusage.c" #include "mkdir2.c" #include "mmap.c" +#include "recv.nonblock.c" #include "totalRam.sysconf.c" #include "windows.c" Modified: mlton/trunk/runtime/platform/cygwin.h =================================================================== --- mlton/trunk/runtime/platform/cygwin.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/cygwin.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -23,8 +23,9 @@ #define MLton_Platform_OS_host "cygwin" +#define HAS_FEROUND FALSE #define HAS_FPCLASSIFY TRUE -#define HAS_FEROUND FALSE +#define HAS_MSG_DONTWAIT FALSE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK FALSE @@ -47,7 +48,8 @@ #define _SC_RE_DUP_MAX _SC_BOGUS #define _SC_STREAM_MAX _SC_BOGUS -#define MSG_DONTWAIT 0 +/* This should not conflict with existing flags. */ +#define MSG_DONTWAIT 0x1000000 #define PF_INET6 0 struct sockaddr_in6 {}; Modified: mlton/trunk/runtime/platform/darwin.h =================================================================== --- mlton/trunk/runtime/platform/darwin.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/darwin.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -25,6 +25,7 @@ #define HAS_FEROUND TRUE #define HAS_FPCLASSIFY TRUE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE Modified: mlton/trunk/runtime/platform/freebsd.h =================================================================== --- mlton/trunk/runtime/platform/freebsd.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/freebsd.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -25,6 +25,7 @@ #define HAS_FEROUND TRUE #define HAS_FPCLASSIFY TRUE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE TRUE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE Modified: mlton/trunk/runtime/platform/hpux.c =================================================================== --- mlton/trunk/runtime/platform/hpux.c 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/hpux.c 2006-05-13 21:26:09 UTC (rev 4536) @@ -1,17 +1,19 @@ #include "platform.h" + #include <sys/mman.h> -#define MAP_ANON MAP_ANONYMOUS - +#include <sys/newsig.h> #include <sys/param.h> #include <sys/pstat.h> -#include <sys/newsig.h> -#include "ssmmap.c" +#define MAP_ANON MAP_ANONYMOUS + #include "getrusage.c" -#include "use-mmap.c" #include "mkdir2.c" +#include "recv.nonblock.c" #include "setenv.putenv.c" +#include "ssmmap.c" +#include "use-mmap.c" W32 totalRam (GC_state s) { struct pst_static buf; Modified: mlton/trunk/runtime/platform/hpux.h =================================================================== --- mlton/trunk/runtime/platform/hpux.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/hpux.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -22,6 +22,7 @@ #define HAS_FEROUND TRUE #define HAS_FPCLASSIFY TRUE +#define HAS_MSG_DONTWAIT FALSE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE @@ -34,7 +35,8 @@ #define LOG_PERROR 0 #define LOG_AUTHPRIV LOG_AUTH -#define MSG_DONTWAIT 0 +/* This should not conflict with existing flags. */ +#define MSG_DONTWAIT 0x1000000 #ifndef PF_INET6 /* Old versions of HP-UX don't have IPv6 support. */ Modified: mlton/trunk/runtime/platform/linux.h =================================================================== --- mlton/trunk/runtime/platform/linux.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/linux.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -24,6 +24,7 @@ #define HAS_FEROUND TRUE #define HAS_FPCLASSIFY TRUE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE TRUE #define HAS_REMAP TRUE #define HAS_SIGALTSTACK TRUE Modified: mlton/trunk/runtime/platform/mingw.h =================================================================== --- mlton/trunk/runtime/platform/mingw.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/mingw.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -19,6 +19,7 @@ // classifies subnormals as normals. So, we disable it here, which causes the // runtime to use our own version. #define HAS_FPCLASSIFY FALSE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK FALSE @@ -61,8 +62,6 @@ #define F_SETLKW 9 #define FD_CLOEXEC 1 -#define MSG_DONTWAIT 0 - #define SHUT_RD SD_RECEIVE #define SHUT_WR SD_SEND #define SHUT_RDWR SD_BOTH Modified: mlton/trunk/runtime/platform/netbsd.h =================================================================== --- mlton/trunk/runtime/platform/netbsd.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/netbsd.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -22,6 +22,7 @@ #define HAS_FEROUND FALSE #define HAS_FPCLASSIFY TRUE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE Modified: mlton/trunk/runtime/platform/openbsd.h =================================================================== --- mlton/trunk/runtime/platform/openbsd.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/openbsd.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -21,6 +21,7 @@ #define HAS_FEROUND FALSE #define HAS_FPCLASSIFY FALSE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE FALSE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE Added: mlton/trunk/runtime/platform/recv.nonblock.c =================================================================== --- mlton/trunk/runtime/platform/recv.nonblock.c 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/recv.nonblock.c 2006-05-13 21:26:09 UTC (rev 4536) @@ -0,0 +1,38 @@ +/* Simulates MSG_DONTWAIT using fcntl() and O_NONBLOCK. */ + +static void fd_modify(int fd, int flags, int add, int remove) +{ + if (flags & MSG_DONTWAIT) { + int f = fcntl(fd, F_GETFL); + fcntl(fd, F_SETFL, (f | add) & ~remove); + } +} + +static void set_nonblock(int fd, int flags) +{ + fd_modify(fd, flags, O_NONBLOCK, 0); +} + +static void clear_nonblock(int fd, int flags) +{ + fd_modify(fd, flags, 0, O_NONBLOCK); +} + +int mlton_recv(int s, void *buf, int len, int flags) +{ + int ret; + set_nonblock(s, flags); + ret = recv(s, buf, len, flags & ~MSG_DONTWAIT); + clear_nonblock(s, flags); + return ret; +} + +int mlton_recvfrom(int s, void *buf, int len, int flags, void *from, + socklen_t *fromlen) +{ + int ret; + set_nonblock(s, flags); + ret = recvfrom(s, buf, len, flags & ~MSG_DONTWAIT, from, fromlen); + clear_nonblock(s, flags); + return ret; +} Modified: mlton/trunk/runtime/platform/solaris.h =================================================================== --- mlton/trunk/runtime/platform/solaris.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform/solaris.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -34,6 +34,7 @@ #define HAS_FEROUND TRUE #define HAS_FPCLASSIFY FALSE #define HAS_FPCLASSIFY64 TRUE +#define HAS_MSG_DONTWAIT TRUE #define HAS_PTRACE TRUE #define HAS_REMAP FALSE #define HAS_SIGALTSTACK TRUE Modified: mlton/trunk/runtime/platform.h =================================================================== --- mlton/trunk/runtime/platform.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/platform.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -58,7 +58,9 @@ #define __Darwin__ #endif -#if (defined (__CYGWIN__)) +#if (defined (_AIX)) +#include "platform/aix.h" +#elif (defined (__CYGWIN__)) #include "platform/cygwin.h" #elif (defined (__Darwin__)) #include "platform/darwin.h" @@ -160,6 +162,10 @@ #error HAS_TIME_PROFILING not defined #endif +#ifndef HAS_MSG_DONTWAIT +#error HAS_MSG_DONTWAIT not defined +#endif + #ifndef EXECVP #define EXECVP execvp #endif @@ -201,6 +207,17 @@ #endif #endif +#if HAS_MSG_DONTWAIT +#define mlton_recv recv +#define mlton_recvfrom recvfrom +#else +/* Platform has no MSG_DONTWAIT flag for recv(), so these must be + defined to simulate that flag. */ +int mlton_recv(int s, void *buf, int len, int flags); +int mlton_recvfrom(int s, void *buf, int len, int flags, void *from, + socklen_t *fromlen); +#endif + /* If HAS_TIME_PROFILING, then you must define these. */ void *getTextStart (); void *getTextEnd (); Modified: mlton/trunk/runtime/types.h =================================================================== --- mlton/trunk/runtime/types.h 2006-05-13 21:11:02 UTC (rev 4535) +++ mlton/trunk/runtime/types.h 2006-05-13 21:26:09 UTC (rev 4536) @@ -16,7 +16,7 @@ #ifndef _ISOC99_SOURCE #define _ISOC99_SOURCE #endif -#if (defined(__hpux__) || defined (__OpenBSD__)) +#if defined(_AIX) || (defined(__hpux__) || defined (__OpenBSD__)) #include <inttypes.h> #elif (defined (__sun__)) #include <sys/int_types.h> |
From: Ville L. <vi...@ml...> - 2006-05-13 15:07:45
|
Don't try to use -gstabs+ on ia64 and powerpc. ---------------------------------------------------------------------- U mlton/trunk/bytecode/Makefile U mlton/trunk/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/bytecode/Makefile =================================================================== --- mlton/trunk/bytecode/Makefile 2006-05-13 15:51:31 UTC (rev 4534) +++ mlton/trunk/bytecode/Makefile 2006-05-13 21:11:02 UTC (rev 4535) @@ -1,4 +1,4 @@ -## Copyright (C) 2004-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # # MLton is released under a BSD-style license. @@ -11,6 +11,13 @@ CC = gcc -std=gnu99 CFLAGS = -fomit-frame-pointer -I../runtime -I../include -Wall +DEBUGFLAGS = $(CFLAGS) +ifneq ($(TARGET_ARCH), ia64) +ifneq ($(TARGET_ARCH), powerpc) +DEBUGFLAGS += -gstabs+ +endif +endif +DEBUGFLAGS += -g2 ifeq ($(TARGET_ARCH), amd64) CFLAGS += -mtune=opteron -m32 @@ -24,7 +31,7 @@ $(CC) $(CFLAGS) -c -O2 interpret.c interpret-gdb.o: interpret.c interpret.h - $(CC) $(CFLAGS) -c -o $@ -gstabs+ -g2 -DASSERT=1 interpret.c + $(CC) $(DEBUGFLAGS) -c -o $@ -DASSERT=1 interpret.c print-opcodes: print-opcodes.c opcode.h $(CC) $(CFLAGS) -o print-opcodes -I../runtime -L../runtime \ Modified: mlton/trunk/runtime/Makefile =================================================================== --- mlton/trunk/runtime/Makefile 2006-05-13 15:51:31 UTC (rev 4534) +++ mlton/trunk/runtime/Makefile 2006-05-13 21:11:02 UTC (rev 4535) @@ -50,7 +50,13 @@ CC = gcc -std=gnu99 CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) -DEBUGFLAGS = $(CFLAGS) -gstabs+ -g2 +DEBUGFLAGS = $(CFLAGS) +ifneq ($(TARGET_ARCH), ia64) +ifneq ($(TARGET_ARCH), powerpc) +DEBUGFLAGS += -gstabs+ +endif +endif +DEBUGFLAGS += -g2 CFILES = \ $(shell find basis -type f | grep '\.c$$' | grep -v Real/) \ |
From: Matthew F. <fl...@ml...> - 2006-05-13 08:51:32
|
Type-check all platforms with c-types.sml. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile D mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/test/ ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-13 15:50:55 UTC (rev 4533) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-13 15:51:31 UTC (rev 4534) @@ -23,8 +23,8 @@ OBJPTR_MAPS = objptr-rep32.map objptr-rep64.map HEADER_MAPS = header-word32.map header-word64.map SEQINDEX_MAPS = seqindex-int32.map seqindex-int64.map -TARGET_ARCH = x86 amd64 -TARGET_OS = linux +TARGET_ARCH = amd64 hppa powerpc sparc x86 +TARGET_OS = cygwin darwin freebsd hpux linux mingw netbsd openbsd solaris DEFAULT_CHAR = char8 DEFAULT_INT = int32 int64 intinf DEFAULT_REAL = real32 real64 @@ -40,21 +40,24 @@ for objptrrep in $(OBJPTR_MAPS); do \ for header in $(HEADER_MAPS); do \ for seqindex in $(SEQINDEX_MAPS); do \ - for targetarch in $(TARGET_ARCH); do \ - for targetos in $(TARGET_OS); do \ for defchar in $(DEFAULT_CHAR); do \ for defint in $(DEFAULT_INT); do \ for defreal in $(DEFAULT_REAL); do \ for defword in $(DEFAULT_WORD); do \ + for targetarch in $(TARGET_ARCH); do \ + for targetos in $(TARGET_OS); do \ if [ ! -r config/c/$$targetarch-$$targetos/c-types.sml ]; then \ - break; \ + continue; \ fi; \ echo "Type checking: $$objptrrep $$header $$seqindex $$targetarch $$targetos $$defchar $$defint $$defreal $$defword"; \ + rm -f target.map; \ + ( echo "TARGET_ARCH $$targetarch"; \ + echo "TARGET_OS $$targetos"; ) > target.map; \ "$(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/c-types.$$targetarch-$$targetos.map" \ + -mlb-path-map "target.map" \ -default-type "$$defchar" \ -default-type "$$defint" \ -default-type "$$defreal" \ |