3,586 changes: 0 additions & 3,586 deletions src/magicport.json

This file was deleted.

781 changes: 0 additions & 781 deletions src/magicport/ast.d

This file was deleted.

1,746 changes: 0 additions & 1,746 deletions src/magicport/dprinter.d

This file was deleted.

316 changes: 0 additions & 316 deletions src/magicport/magicport2.d

This file was deleted.

100 changes: 0 additions & 100 deletions src/magicport/namer.d

This file was deleted.

1,497 changes: 0 additions & 1,497 deletions src/magicport/parser.d

This file was deleted.

831 changes: 0 additions & 831 deletions src/magicport/scanner.d

This file was deleted.

232 changes: 0 additions & 232 deletions src/magicport/tokens.d

This file was deleted.

16 changes: 0 additions & 16 deletions src/magicport/typenames.d

This file was deleted.

388 changes: 0 additions & 388 deletions src/magicport/visitor.d

This file was deleted.

301 changes: 43 additions & 258 deletions src/posix.mak

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions src/root/async.h

This file was deleted.

24 changes: 0 additions & 24 deletions src/root/checkedint.h

This file was deleted.

229 changes: 37 additions & 192 deletions src/win32.mak
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,17 @@ DMDMAKE=$(MAKE) -fwin32.mak C=$C TK=$(TK) ROOT=$(ROOT) HOST_DC="$(HOST_DC)"

# D front end
# mars.obj
FRONTOBJ= enum.obj struct.obj dsymbol.obj import.obj id.obj \
staticassert.obj identifier.obj mtype.obj expression.obj \
optimize.obj template.obj lexer.obj declaration.obj cast.obj \
init.obj func.obj nogc.obj utf.obj parse.obj statement.obj \
constfold.obj version.obj inifile.obj cppmangle.obj \
module.obj scope.obj cond.obj inline.obj opover.obj \
entity.obj class.obj mangle.obj attrib.obj impcnvtab.obj \
link.obj access.obj doc.obj macro.obj hdrgen.obj delegatize.obj \
interpret.obj ctfeexpr.obj traits.obj aliasthis.obj \
builtin.obj clone.obj arrayop.obj \
json.obj unittests.obj imphint.obj argtypes.obj apply.obj sapply.obj \
sideeffect.obj intrange.obj canthrow.obj target.obj nspace.obj \
errors.obj escape.obj tokens.obj globals.obj objc_stubs.obj
DMD_SRCS=access.d aggregate.d aliasthis.d apply.d argtypes.d arrayop.d \
arraytypes.d attrib.d backend.d builtin.d canthrow.d clone.d complex.d \
cond.d constfold.d cppmangle.d ctfeexpr.d dcast.d dclass.d \
declaration.d delegatize.d denum.d dimport.d dinifile.d dinterpret.d \
dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d \
dtemplate.d dunittest.d dversion.d entity.d errors.d escape.d \
expression.d func.d globals.d hdrgen.d id.d identifier.d imphint.d \
impcnvtab.d init.d inline.d intrange.d json.d lexer.d lib.d link.d \
mars.d mtype.d nogc.d nspace.d objc_stubs.d opover.d optimize.d parse.d \
sapply.d sideeffect.d statement.d staticassert.d target.d tokens.d \
traits.d utf.d visitor.d

# Glue layer
GLUEOBJ=glue.obj msc.obj s2ir.obj todt.obj e2ir.obj tocsym.obj \
Expand All @@ -173,29 +171,19 @@ BACKOBJ= go.obj gdag.obj gother.obj gflow.obj gloop.obj var.obj el.obj \


# Root package
ROOTOBJS= man.obj port.obj checkedint.obj \
stringtable.obj response.obj async.obj speller.obj aav.obj outbuffer.obj \
object.obj filename.obj file.obj \
rmem.obj newdelete.obj
ROOT_SRCS=$(ROOT)/aav.d $(ROOT)/array.d $(ROOT)/file.d $(ROOT)/filename.d \
$(ROOT)/longdouble.d $(ROOT)/man.d $(ROOT)/outbuffer.d $(ROOT)/port.d \
$(ROOT)/response.d $(ROOT)/rmem.d $(ROOT)/rootobject.d \
$(ROOT)/speller.d $(ROOT)/stringtable.d

# D front end
SRCS= mars.c enum.c struct.c dsymbol.c import.c idgen.d impcnvgen.c utf.h \
utf.c entity.c identifier.c mtype.c expression.c optimize.c \
template.h template.c lexer.c declaration.c cast.c \
cond.h cond.c link.c aggregate.h staticassert.h parse.c statement.c \
constfold.c version.h version.c inifile.c staticassert.c \
module.c scope.c init.h init.c attrib.h attrib.c opover.c \
class.c mangle.c func.c nogc.c inline.c access.c complex_t.h cppmangle.c \
identifier.h parse.h scope.h enum.h import.h \
mars.h module.h mtype.h dsymbol.h \
declaration.h lexer.h expression.h statement.h doc.h doc.c \
macro.h macro.c hdrgen.h hdrgen.c arraytypes.h \
delegatize.c interpret.c ctfeexpr.c traits.c builtin.c \
clone.c lib.h arrayop.c nspace.h nspace.c errors.h errors.c escape.c \
aliasthis.h aliasthis.c json.h json.c unittests.c imphint.c argtypes.c \
apply.c sapply.c sideeffect.c ctfe.h \
intrange.h intrange.c canthrow.c target.c target.h visitor.h \
tokens.h tokens.c globals.h globals.c objc.h objc_stubs.c objc.c
SRCS = win32.mak posix.mak osmodel.mak aggregate.h aliasthis.h arraytypes.h \
attrib.h complex_t.h cond.h ctfe.h ctfe.h declaration.h dsymbol.h \
enum.h errors.h expression.h globals.h hdrgen.h identifier.h idgen.d \
impcnvgen.c import.h init.h intrange.h json.h lexer.h lib.h macro.h \
mars.h module.h mtype.h nspace.h objc.h parse.h scanmscoff.c scanomf.c \
scope.h statement.h staticassert.h target.h template.h tokens.h utf.h \
version.h visitor.h $(DMD_SRCS)

# Glue layer
GLUESRC= glue.c msc.c s2ir.c todt.c e2ir.c tocsym.c \
Expand Down Expand Up @@ -232,25 +220,15 @@ TKSRCC= $(TK)\filespec.c $(TK)\mem.c $(TK)\vec.c $(TK)\list.c
TKSRC= $(TK)\filespec.h $(TK)\mem.h $(TK)\list.h $(TK)\vec.h $(TKSRCC)

# Root package
ROOTSRCC=$(ROOT)\rmem.c $(ROOT)\stringtable.c \
$(ROOT)\man.c $(ROOT)\port.c $(ROOT)\async.c $(ROOT)\response.c \
$(ROOT)\speller.c $(ROOT)\aav.c $(ROOT)\longdouble.c \
$(ROOT)\checkedint.c $(ROOT)\newdelete.c \
$(ROOT)\outbuffer.c $(ROOT)\object.c $(ROOT)\filename.c $(ROOT)\file.c
ROOTSRC= $(ROOT)\root.h \
$(ROOT)\rmem.h $(ROOT)\port.h \
$(ROOT)\stringtable.h \
$(ROOT)\async.h \
$(ROOT)\checkedint.h \
$(ROOT)\speller.h \
$(ROOT)\aav.h \
$(ROOT)\longdouble.h \
$(ROOT)\outbuffer.h \
$(ROOT)\object.h \
$(ROOT)\filename.h \
$(ROOT)\file.h \
$(ROOT)\array.h \
$(ROOTSRCC)
ROOTSRCC=$(ROOT)\newdelete.c
ROOTSRCD=$(ROOT)\rmem.d $(ROOT)\stringtable.d $(ROOT)\man.d $(ROOT)\port.d \
$(ROOT)\response.d $(ROOT)\rootobject.d $(ROOT)\speller.d $(ROOT)\aav.d \
$(ROOT)\longdouble.d $(ROOT)\outbuffer.d $(ROOT)\filename.d \
$(ROOT)\file.d
ROOTSRC= $(ROOT)\root.h $(ROOT)\stringtable.h $(ROOT)\speller.h $(ROOT)\aav.h \
$(ROOT)\longdouble.h $(ROOT)\outbuffer.h $(ROOT)\object.h \
$(ROOT)\filename.h $(ROOT)\file.h $(ROOT)\array.h $(ROOTSRCC) \
$(ROOTSRCD)
# Removed garbage collector bits (look in history)
# $(ROOT)\gc\bits.c $(ROOT)\gc\gc.c $(ROOT)\gc\gc.h $(ROOT)\gc\mscbitops.h \
# $(ROOT)\gc\bits.h $(ROOT)\gc\gccbitops.h $(ROOT)\gc\linux.c $(ROOT)\gc\os.h \
Expand All @@ -271,7 +249,6 @@ defaulttarget: debdmd
auto-tester-build: dmd checkwhitespace

dmd: reldmd
ddmd: relddmd

release:
$(DMDMAKE) clean
Expand All @@ -282,123 +259,33 @@ debdmd:
$(DMDMAKE) "OPT=" "DEBUG=-D -g -DUNITTEST" "DDEBUG=-debug -g" "DOPT=" "LFLAGS=-L/ma/co/la" $(TARGETEXE)

reldmd:
$(DMDMAKE) "OPT=-o" "DEBUG=" "DDEBUG=" "DOPT=-inline -O" "LFLAGS=-L/delexe/la" $(TARGETEXE)
$(DMDMAKE) "OPT=-o" "DEBUG=" "DDEBUG=" "DOPT=-O -release -inline" "LFLAGS=-L/delexe/la" $(TARGETEXE)

trace:
$(DMDMAKE) "OPT=-o" "DEBUG=-gt -Nc" "DDEBUG=-debug -g" "DOPT=" "LFLAGS=-L/ma/co/delexe/la" $(TARGETEXE)

debddmd:
$(DMDMAKE) "OPT=" "DEBUG=-D -g -DUNITTEST" "DDEBUG=-debug -g" "DOPT=" "LFLAGS=-L/ma/co/la" ddmd.exe

relddmd:
$(DMDMAKE) "OPT=-o" "DEBUG=" "DDEBUG=" "DOPT=-inline -O" "LFLAGS=-L/delexe/la" ddmd.exe

################################ Libraries ##################################

frontend.lib : $(FRONTOBJ)
$(LIB) -p512 -n -c frontend.lib $(FRONTOBJ)

glue.lib : $(GLUEOBJ)
$(LIB) -p512 -n -c glue.lib $(GLUEOBJ)

backend.lib : $(BACKOBJ)
$(LIB) -p512 -n -c backend.lib $(BACKOBJ)

root.lib : $(ROOTOBJS)
$(LIB) -p512 -n -c root.lib $(ROOTOBJS)

LIBS= frontend.lib glue.lib backend.lib root.lib

#$(TARGETEXE): mars.obj $(LIBS) win32.mak
# $(CC) -o$(TARGETEXE) mars.obj $(LIBS) -cpp -mn -Ar -L/STACK:8388608 $(LFLAGS)

############################# DDMD stuff ############################

MAGICPORTDIR = magicport
MAGICPORTSRC = \
$(MAGICPORTDIR)\magicport2.d $(MAGICPORTDIR)\ast.d \
$(MAGICPORTDIR)\scanner.d $(MAGICPORTDIR)\tokens.d \
$(MAGICPORTDIR)\parser.d $(MAGICPORTDIR)\dprinter.d \
$(MAGICPORTDIR)\typenames.d $(MAGICPORTDIR)\visitor.d \
$(MAGICPORTDIR)\namer.d

MAGICPORT = $(MAGICPORTDIR)\magicport2.exe

$(MAGICPORT) : $(MAGICPORTSRC)
$(HOST_DC) -of$(MAGICPORT) $(MAGICPORTSRC)

GENSRC=access.d aggregate.d aliasthis.d apply.d \
argtypes.d arrayop.d arraytypes.d \
attrib.d builtin.d canthrow.d dcast.d \
dclass.d clone.d cond.d constfold.d \
cppmangle.d ctfeexpr.d declaration.d \
delegatize.d doc.d dsymbol.d \
denum.d expression.d func.d \
hdrgen.d identifier.d imphint.d \
dimport.d dinifile.d inline.d init.d \
dinterpret.d json.d lexer.d link.d \
dmacro.d dmangle.d mars.d \
dmodule.d mtype.d opover.d optimize.d \
parse.d sapply.d dscope.d sideeffect.d \
statement.d staticassert.d dstruct.d \
target.d dtemplate.d traits.d dunittest.d \
utf.d dversion.d visitor.d lib.d \
nogc.d nspace.d errors.d tokens.d \
globals.d escape.d \
$(ROOT)\aav.d $(ROOT)\outbuffer.d $(ROOT)\stringtable.d \
$(ROOT)\file.d $(ROOT)\filename.d $(ROOT)\speller.d \
$(ROOT)\man.d $(ROOT)\response.d

MANUALSRC= \
intrange.d complex.d \
entity.d backend.d objc_stubs.d \
$(ROOT)\array.d $(ROOT)\longdouble.d \
$(ROOT)\rootobject.d $(ROOT)\port.d \
$(ROOT)\rmem.d id.d impcnvtab.d

#$(GENSRC) : $(SRCS) $(ROOTSRC) magicport.json $(MAGICPORT)
# $(MAGICPORT) . .

DSRC= $(GENSRC) $(MANUALSRC)

dmd.exe: $(DSRC) newdelete.obj glue.lib backend.lib verstr.h
$(HOST_DC) $(DSRC) -ofdmd.exe newdelete.obj glue.lib backend.lib -vtls -J. -d -L/STACK:8388608 $(DFLAGS)


DELSRCS=access.c aliasthis.c apply.c argtypes.c arrayop.c attrib.c builtin.c \
canthrow.c cast.c class.c clone.c cond.c constfold.c cppmangle.c \
ctfeexpr.c declaration.c delegatize.c doc.c dsymbol.c entity.c enum.c \
errors.c escape.c expression.c func.c globals.c hdrgen.c identifier.c \
imphint.c import.c inifile.c init.c inline.c interpret.c intrange.c \
json.c lexer.c link.c macro.c mangle.c mars.c module.c mtype.c nogc.c \
nspace.c objc.c objc_stubs.c opover.c optimize.c parse.c root/aav.c \
root/async.c root/async.h root/checkedint.c root/checkedint.h \
root/file.c root/filename.c root/longdouble.c root/man.c root/object.c \
root/outbuffer.c root/port.c root/response.c root/rmem.c root/speller.c \
root/stringtable.c sapply.c scope.c sideeffect.c statement.c \
staticassert.c struct.c target.c template.c tokens.c traits.c \
unittests.c utf.c version.c

convert_tree : $(SRC) $(ROOT_SRC) magicport.json $(MAGICPORT)
$(MAGICPORT) . .
$(DEL) $(DELSRCS)
$(DEL) $(MAGICPORT) $(MAGICPORTDIR)\*.obj

convert_index : $(SRC) $(ROOT_SRC) magicport.json $(MAGICPORT)
$(MAGICPORT) . .
git add $(GENSRC) objc.d
git rm $(DELSRCS)
LIBS= glue.lib backend.lib

$(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) verstr.h
$(HOST_DC) $(DSRC) -of$@ -vtls -J. -d -L/STACK:8388608 $(DFLAGS) $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS)

############################ Maintenance Targets #############################

clean:
$(DEL) *.obj *.lib *.map
$(DEL) msgs.h msgs.c
$(DEL) elxxx.c cdxxx.c optab.c debtab.c fltables.c tytab.c
$(DEL) impcnvtab.d impcnvtab.c impcnvgen.exe optabgen.exe
$(DEL) id.h id.c id.d
$(DEL) verstr.h
$(DEL) $(MAGICPORT) $(MAGICPORTDIR)\*.obj
$(DEL) impcnvtab.c impcnvtab.d impcnvgen.exe optabgen.exe

install: detab install-copy

Expand Down Expand Up @@ -716,51 +603,9 @@ tk.obj : tk.c
$(CC) -c $(MFLAGS) tk.c

# Root
aav.obj : $(ROOT)\aav.h $(ROOT)\aav.c
$(CC) -c $(CFLAGS) $(ROOT)\aav.c

async.obj : $(ROOT)\async.h $(ROOT)\async.c
$(CC) -c $(CFLAGS) $(ROOT)\async.c

checkedint.obj : $(ROOT)\checkedint.h $(ROOT)\checkedint.c
$(CC) -c $(CFLAGS) $(ROOT)\checkedint.c

dmgcmem.obj : $(ROOT)\dmgcmem.c
$(CC) -c $(CFLAGS) $(ROOT)\dmgcmem.c

man.obj : $(ROOT)\man.c
$(CC) -c $(CFLAGS) $(ROOT)\man.c

rmem.obj : $(ROOT)\rmem.c
$(CC) -c $(CFLAGS) $(ROOT)\rmem.c

newdelete.obj : $(ROOT)\newdelete.c
$(CC) -c $(CFLAGS) $(ROOT)\newdelete.c

port.obj : $(ROOT)\port.c
$(CC) -c $(CFLAGS) $(ROOT)\port.c

response.obj : $(ROOT)\response.c
$(CC) -c $(CFLAGS) $(ROOT)\response.c

speller.obj : $(ROOT)\speller.h $(ROOT)\speller.c
$(CC) -c $(CFLAGS) $(ROOT)\speller.c

stringtable.obj : $(ROOT)\stringtable.c
$(CC) -c $(CFLAGS) $(ROOT)\stringtable.c

outbuffer.obj : $(ROOT)\outbuffer.c
$(CC) -c $(CFLAGS) $(ROOT)\outbuffer.c

object.obj : $(ROOT)\object.c
$(CC) -c $(CFLAGS) $(ROOT)\object.c

filename.obj : $(ROOT)\filename.c
$(CC) -c $(CFLAGS) $(ROOT)\filename.c

file.obj : $(ROOT)\file.c
$(CC) -c $(CFLAGS) $(ROOT)\file.c

# Root/GC -- Removed (look in history)
#
#bits.obj : $(ROOT)\gc\bits.h $(ROOT)\gc\bits.c
Expand Down
14 changes: 7 additions & 7 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set -exo pipefail

N=2

make -j$N -C src -f posix.mak ddmd HOST_DMD=$DMD
make -j$N -C src -f posix.mak dmd.conf
make -j$N -C src -f posix.mak HOST_DMD=$DMD
make -j$N -C src -f posix.mak dmd.conf HOST_DMD=$DMD
git clone --depth=1 https://github.com/D-Programming-Language/druntime.git ../druntime
git clone --depth=1 https://github.com/D-Programming-Language/phobos.git ../phobos
make -j$N -C ../druntime -f posix.mak DMD=../dmd/src/ddmd
make -j$N -C ../phobos -f posix.mak DMD=../dmd/src/ddmd
make -j$N -C ../druntime -f posix.mak
make -j$N -C ../phobos -f posix.mak

make -j$N -C ../druntime -f posix.mak DMD=../dmd/src/ddmd unittest
make -j$N -C ../phobos -f posix.mak DMD=../dmd/src/ddmd unittest
make -j$N -C test DMD=../src/ddmd MODEL=64
make -j$N -C ../druntime -f posix.mak unittest
make -j$N -C ../phobos -f posix.mak unittest
make -j$N -C test MODEL=64