check_m7.c textually included check.c, renamed three entry points aside, and selected between two whole checkers by scanning each unit for `?`, `!`, `try` and friends. A unit that mentioned any of them was checked by a second implementation, so an M1-M6 rule fixed in check.c never reached it -- and the split hid real defects, since the M7 half was reached by no existing fixture until M7 cases were registered. The split was cheaper to undo than it looked: every M7 dispatcher already delegated to its M6 counterpart for nodes it did not handle. So the M7 entry points become the single check_expr/check_stmt/check_lvalue/check_call, and the former M6 bodies become check_expr_core/check_stmt_core/check_lvalue_core, reached as the fallback. Recursion runs through the unified entry, which is what makes an optional nested inside otherwise-M6 code get checked at all. m7_check_fn and m7_check_method were identical to the M6 versions apart from which check_stmt they called, so they are dropped. The feature scanner (m7_type_ast, m7_node_feature, m7_program_feature) is gone with the dispatch it fed, including the loop case that still consulted it. fe_check_program and fe_check_expr_type keep the M7 bodies, which are supersets. The build compiles check.c directly again. No behaviour intended to change: the unified checker applies the union of the rules to every unit, which for M1-M6 sources is what the M6 half already did.
50 lines
1.8 KiB
Batchfile
50 lines
1.8 KiB
Batchfile
@echo off
|
|
rem Open Watcom C89 build. TEST-DOS.BAT runs this from C:\FEC.
|
|
C:
|
|
cd \FEC
|
|
if exist BUILD.OK del BUILD.OK
|
|
if exist BUILD.FAIL del BUILD.FAIL
|
|
if exist fec.exe del fec.exe
|
|
if exist __wcl__.lnk del __wcl__.lnk
|
|
if exist *.obj del *.obj
|
|
|
|
if "%WATCOM%"=="" set WATCOM=C:\DEVEL\WATCOMC
|
|
if not exist %WATCOM%\BINW\WCL.EXE goto build_fail
|
|
set PATH=%WATCOM%\BINW;%WATCOM%\BINP;%PATH%
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=arena.obj src\arena.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=diag.obj src\diag.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=lexer.obj src\lexer.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=ast.obj src\ast.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=parser.obj src\parser.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=types.obj src\types.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=m7.obj src\m7.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=own.obj src\own.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=check.obj src\check.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=lower.obj src\lower.c
|
|
if errorlevel 1 goto build_fail
|
|
rem Use an unambiguous short object name for the M7 emitter source.
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=emitc.obj src\emitcm7.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -c -fo=driver.obj src\driver.c
|
|
if errorlevel 1 goto build_fail
|
|
wcl -q -za -wx -bt=dos -ml -k32768 -fe=fec.exe *.obj
|
|
if errorlevel 1 goto build_fail
|
|
if not exist fec.exe goto build_fail
|
|
echo OK>BUILD.OK
|
|
cd C:\FEC
|
|
goto build_done
|
|
|
|
:build_fail
|
|
echo FAIL>BUILD.FAIL
|
|
|
|
:build_done
|