From 76e9332fb59021bdf6382773bc515a2b4c09a6dd Mon Sep 17 00:00:00 2001 From: Ruurd Wiersma Date: Tue, 5 Nov 2024 08:22:15 +0100 Subject: [PATCH] Patch Tuesday - M --- appveyor.yml | 20 -------------------- doc/JOYimplJOY.md | 16 ++++++++-------- globals.h | 8 ++++++-- interp.c | 12 ++++++++++-- macros.h | 14 ++++++++++++-- main.c | 32 ++++++++++++++++++++++++++++++-- src/argc.c | 6 +++--- src/compare.h | 28 ++++++---------------------- src/drop.c | 13 +++++-------- src/fgets.c | 9 +++++---- src/filetime.c | 16 +++++++++------- src/finclude.c | 10 +++------- src/first.c | 10 +++------- src/fopen.c | 16 +++++++--------- src/fputchars.c | 10 +++------- src/fremove.c | 10 +++------- src/frename.c | 13 ++++--------- src/getenv.c | 10 +++------- src/include.c | 10 +++------- src/intern.c | 10 +++------- src/rest.c | 13 +++++-------- src/strftime.c | 10 +++------- src/strtod.c | 10 +++------- src/strtol.c | 10 +++------- src/system.c | 10 +++------- table.c | 2 +- test4/CMakeLists.txt | 6 +++--- 27 files changed, 147 insertions(+), 187 deletions(-) delete mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d33f45f..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 1.0.0.{build} - -image: Visual Studio 2022 -platform: - - x64 - -environment: - BDWGC_VERSION: 8.2.6 - BDWGC_ARCHIVE: gc-%BDWGC_VERSION%.tar.gz - -install: - # install BDWGC - - if not exist %BDWGC_ARCHIVE% appveyor DownloadFile "https://github.com/ivmai/bdwgc/releases/download/v%BDWGC_VERSION%/%BDWGC_ARCHIVE%" - - tar xf %BDWGC_ARCHIVE% - - move gc-%BDWGC_VERSION% bdwgc - -build_script: - - call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" - - cmake . - - cmake --build . --config Release diff --git a/doc/JOYimplJOY.md b/doc/JOYimplJOY.md index 15f019d..e0e9015 100644 --- a/doc/JOYimplJOY.md +++ b/doc/JOYimplJOY.md @@ -25,10 +25,10 @@ this version: JOY - compiled at 16:57:51 on Mar 17 2003. - The user manual has been updated with annotations, documenting some of the above. -Stating that this repository differs slightly from the legacy version is a bit -of an understatement. All source files have been modified. The statement is -true w.r.t. the language. The aim of this repository is to not change the -language. +Stating that this repository differs slightly from the legacy version is +somewhat of an understatement. All source files have been modified. The +statement is true w.r.t. the language. The aim of this repository is to +not change the language, while still allowing some development. Roadmap ======= @@ -47,8 +47,8 @@ be used and in that case the language is still the same as it was in 2003. Compiler -------- -There is some conditional compilation, activated by -DBYTECODE or -DCOMPILER -that adds the option to compile Joy source code to bytecode or C. +There is some conditional compilation, activated with -DBYTECODE or -DCOMPILER +that adds the option to compile Joy source code to bytecode or to C. At this moment there are no repositories with Joy source code that could benefit from such compilation and because of that, these options are not @@ -57,8 +57,8 @@ activated. When activated, they will only be available for joy1 and Moy, not Joy, due to the incompatible Node type of Joy. -Bignum ------- +Bignums +------- There is also a bignum type, but no big numbers. There is no application yet that would need them. diff --git a/globals.h b/globals.h index 26eb327..fc2cb44 100644 --- a/globals.h +++ b/globals.h @@ -1,12 +1,16 @@ /* FILE: globals.h */ /* * module : globals.h - * version : 1.116 - * date : 10/11/24 + * version : 1.117 + * date : 10/28/24 */ #ifndef GLOBALS_H #define GLOBALS_H +#ifdef MALLOC_DEBUG +#include "rmalloc.h" +#endif + /* #define USE_KHASHL */ #include diff --git a/interp.c b/interp.c index 2eac900..288f05a 100644 --- a/interp.c +++ b/interp.c @@ -1,8 +1,8 @@ /* FILE: interp.c */ /* * module : interp.c - * version : 1.85 - * date : 10/11/24 + * version : 1.86 + * date : 10/18/24 */ /* @@ -33,6 +33,7 @@ fputstring (== fputchars for Heiko Kuhrt's program) */ #include "globals.h" +#include "builtin.h" static void writestack(pEnv env, Index n) { @@ -209,6 +210,13 @@ void exeterm(pEnv env, Index n) ent = vec_at(env->symtab, index); ent.cflags |= IS_USED; vec_at(env->symtab, index) = ent; + /* + * An exception needs to be made for dup_ in case the stack + * contains a list. + */ + if (env->stck && nodetype(env->stck) == LIST_ && + ent.u.proc == dup_) + nofun = 1; /* * Functions that cannot be evaluated at compile time * are sent to output. There is no need for a nickname. diff --git a/macros.h b/macros.h index d79d1db..b6268c6 100644 --- a/macros.h +++ b/macros.h @@ -1,7 +1,7 @@ /* * module : macros.h - * version : 1.1 - * date : 10/11/24 + * version : 1.2 + * date : 10/18/24 */ #define POP(X) X = nextnode1(X) @@ -43,3 +43,13 @@ env->stck = newnode2(env, NODE, nextnode2(env->stck)) #define GTERNARY(NODE) \ env->stck = newnode2(env, NODE, nextnode3(env->stck)) + +/* + * Strings are stored in consecutive nodes in the NOBDW version; the BDW + * version stores them somewhere else. + */ +#ifdef NOBDW +#define GETSTRING(NODE) (char *)&nodevalue(NODE) +#else +#define GETSTRING(NODE) nodevalue(NODE).str +#endif diff --git a/main.c b/main.c index 03a210c..8943508 100644 --- a/main.c +++ b/main.c @@ -1,8 +1,8 @@ /* FILE: main.c */ /* * module : main.c - * version : 1.107 - * date : 10/11/24 + * version : 1.108 + * date : 10/28/24 */ /* @@ -121,6 +121,9 @@ static jmp_buf begin; /* restart with empty program */ char *bottom_of_stack; /* needed in gc.c */ static void stats(pEnv env), dump(pEnv env); +#ifdef MALLOC_DEBUG +static void mem_free(pEnv env); +#endif void printcandidates(pEnv env); @@ -494,6 +497,9 @@ static void my_main(int argc, char **argv) stats(&env); if (psdump) dump(&env); +#ifdef MALLOC_DEBUG + mem_free(&env); +#endif } int main(int argc, char **argv) @@ -556,3 +562,25 @@ static void dump(pEnv env) } } } + +#ifdef MALLOC_DEBUG +static void mem_free(pEnv env) +{ + int i, j; + Entry ent; + + /* + * The strings in the symbol table have been moved to permanent memory. + * They need to be released explicitly. + */ + for (i = tablesize(), j = vec_size(env->symtab); i < j; i++) { + ent = vec_at(env->symtab, i); + free(ent.name); + } +#ifdef NOBDW + free(env->memory); +#endif + kh_destroy(Symtab, env->hash); + kh_destroy(Funtab, env->prim); +} +#endif diff --git a/src/argc.c b/src/argc.c index 1f452cf..edf0b4f 100644 --- a/src/argc.c +++ b/src/argc.c @@ -1,7 +1,7 @@ /* module : argc.c - version : 1.6 - date : 09/26/24 + version : 1.7 + date : 10/24/24 */ #ifndef ARGC_C #define ARGC_C @@ -9,7 +9,7 @@ /** Q0 OK 3050 argc : -> I [RUNTIME] Pushes the number of command line arguments. -This is quivalent to 'argv size'. +This is equivalent to 'argv size'. */ PUSH(argc_, INTEGER_NEWNODE, env->g_argc) diff --git a/src/compare.h b/src/compare.h index e754311..d58adf5 100644 --- a/src/compare.h +++ b/src/compare.h @@ -1,7 +1,7 @@ /* module : compare.h - version : 1.21 - date : 09/17/24 + version : 1.22 + date : 10/18/24 */ #ifndef COMPARE_H #define COMPARE_H @@ -59,11 +59,7 @@ int Compare(pEnv env, Index first, Index second) goto cmpstr; case STRING_: case BIGNUM_: -#ifdef NOBDW - name2 = (char *)&nodevalue(second); -#else - name2 = nodevalue(second).str; -#endif + name2 = GETSTRING(second); goto cmpstr; } break; @@ -78,11 +74,7 @@ int Compare(pEnv env, Index first, Index second) goto cmpstr; case STRING_: case BIGNUM_: -#ifdef NOBDW - name2 = (char *)&nodevalue(second); -#else - name2 = nodevalue(second).str; -#endif + name2 = GETSTRING(second); goto cmpstr; } break; @@ -147,11 +139,7 @@ int Compare(pEnv env, Index first, Index second) break; case STRING_: case BIGNUM_: -#ifdef NOBDW - name1 = (char *)&nodevalue(first); -#else - name1 = nodevalue(first).str; -#endif + name1 = GETSTRING(first); switch (type2) { case USR_: name2 = vec_at(env->symtab, nodevalue(second).ent).name; @@ -161,11 +149,7 @@ int Compare(pEnv env, Index first, Index second) goto cmpstr; case STRING_: case BIGNUM_: -#ifdef NOBDW - name2 = (char *)&nodevalue(second); -#else - name2 = nodevalue(second).str; -#endif + name2 = GETSTRING(second); goto cmpstr; } break; diff --git a/src/drop.c b/src/drop.c index 8b94092..357f935 100644 --- a/src/drop.c +++ b/src/drop.c @@ -1,7 +1,7 @@ /* module : drop.c - version : 1.12 - date : 09/17/24 + version : 1.15 + date : 10/28/24 */ #ifndef DROP_C #define DROP_C @@ -33,15 +33,12 @@ void drop_(pEnv env) UNARY(SET_NEWNODE, set); break; case STRING_: -#ifdef NOBDW - str = strdup((char *)&nodevalue(env->stck)); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); while (n-- > 0 && str[i]) i++; #ifdef NOBDW - UNARY(STRING_NEWNODE, str + i); + str = strdup(str + i); + UNARY(STRING_NEWNODE, str); free(str); #else UNARY(STRING_NEWNODE, GC_strdup(str + i)); diff --git a/src/fgets.c b/src/fgets.c index 8803b3e..3af7cb3 100644 --- a/src/fgets.c +++ b/src/fgets.c @@ -1,7 +1,7 @@ /* module : fgets.c - version : 1.9 - date : 09/20/24 + version : 1.10 + date : 10/28/24 */ #ifndef FGETS_C #define FGETS_C @@ -30,8 +30,9 @@ void fgets_(pEnv env) if ((leng = strlen(buf)) > 0 && buf[leng - 1] == '\n') break; #ifdef NOBDW - if ((tmp = realloc(buf, size <<= 1)) != 0) - buf = tmp; + if ((tmp = realloc(buf, size <<= 1)) == 0) + break; /* LCOV_EXCLUDE_LINE */ + buf = tmp; #else buf = GC_realloc(buf, size <<= 1); #endif diff --git a/src/filetime.c b/src/filetime.c index 70d5471..82b7f9c 100644 --- a/src/filetime.c +++ b/src/filetime.c @@ -1,7 +1,7 @@ /* module : filetime.c - version : 1.9 - date : 09/17/24 + version : 1.11 + date : 10/28/24 */ #ifndef FILETIME_C #define FILETIME_C @@ -21,17 +21,19 @@ void filetime_(pEnv env) ONEPARAM("filetime"); STRING("filetime"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); mtime = 0; if ((fp = fopen(str, "r")) != 0) { +#ifdef NOBDW buf = malloc(sizeof(struct stat)); +#else + buf = GC_malloc_atomic(sizeof(struct stat)); +#endif if (fstat(fileno(fp), buf) >= 0) mtime = buf->st_mtime; +#ifdef NOBDW free(buf); +#endif fclose(fp); } UNARY(INTEGER_NEWNODE, mtime); diff --git a/src/finclude.c b/src/finclude.c index 5cbc676..c29cc40 100644 --- a/src/finclude.c +++ b/src/finclude.c @@ -1,7 +1,7 @@ /* module : finclude.c - version : 1.16 - date : 10/11/24 + version : 1.17 + date : 10/18/24 */ #ifndef FINCLUDE_C #define FINCLUDE_C @@ -18,11 +18,7 @@ void finclude_(pEnv env) ONEPARAM("finclude"); STRING("finclude"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck);/* read file name */ -#else - str = nodevalue(env->stck).str; /* read file name */ -#endif + str = GETSTRING(env->stck); /* read file name */ POP(env->stck); /* remove file name from stack */ if (include(env, str)) /* include new file */ return; diff --git a/src/first.c b/src/first.c index 4cbd20a..23032bd 100644 --- a/src/first.c +++ b/src/first.c @@ -1,7 +1,7 @@ /* module : first.c - version : 1.9 - date : 09/17/24 + version : 1.10 + date : 10/18/24 */ #ifndef FIRST_C #define FIRST_C @@ -22,11 +22,7 @@ void first_(pEnv env) GUNARY(nodevalue(env->stck).lis); break; case STRING_: -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); CHECKEMPTYSTRING(str, "first"); UNARY(CHAR_NEWNODE, *str); break; diff --git a/src/fopen.c b/src/fopen.c index dfc44d7..9436073 100644 --- a/src/fopen.c +++ b/src/fopen.c @@ -1,7 +1,7 @@ /* module : fopen.c - version : 1.7 - date : 09/17/24 + version : 1.9 + date : 10/18/24 */ #ifndef FOPEN_C #define FOPEN_C @@ -14,15 +14,13 @@ is pushed. */ void fopen_(pEnv env) { + char *path, *mode; + TWOPARAMS("fopen"); STRING("fopen"); STRING2("fopen"); -#ifdef NOBDW - BINARY(FILE_NEWNODE, fopen((char *)&nodevalue(nextnode1(env->stck)), - (char *)&nodevalue(env->stck))); -#else - BINARY(FILE_NEWNODE, fopen(nodevalue(nextnode1(env->stck)).str, - nodevalue(env->stck).str)); -#endif + path = GETSTRING(nextnode1(env->stck)); + mode = GETSTRING(env->stck); + BINARY(FILE_NEWNODE, fopen(path, mode)); } #endif diff --git a/src/fputchars.c b/src/fputchars.c index 913e29f..069fa87 100644 --- a/src/fputchars.c +++ b/src/fputchars.c @@ -1,7 +1,7 @@ /* module : fputchars.c - version : 1.8 - date : 09/17/24 + version : 1.9 + date : 10/18/24 */ #ifndef FPUTCHARS_C #define FPUTCHARS_C @@ -18,11 +18,7 @@ void fputchars_(pEnv env) /* suggested by Heiko Kuhrt, as "fputstring_" */ TWOPARAMS("fputchars"); STRING("fputchars"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); POP(env->stck); ISFILE("fputchars"); fp = nodevalue(env->stck).fil; diff --git a/src/fremove.c b/src/fremove.c index 093bd24..eecdeef 100644 --- a/src/fremove.c +++ b/src/fremove.c @@ -1,7 +1,7 @@ /* module : fremove.c - version : 1.7 - date : 09/17/24 + version : 1.8 + date : 10/18/24 */ #ifndef FREMOVE_C #define FREMOVE_C @@ -17,11 +17,7 @@ void fremove_(pEnv env) ONEPARAM("fremove"); STRING("fremove"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); UNARY(BOOLEAN_NEWNODE, !remove(str)); } #endif diff --git a/src/frename.c b/src/frename.c index e131a4e..d8fbaf4 100644 --- a/src/frename.c +++ b/src/frename.c @@ -1,7 +1,7 @@ /* module : frename.c - version : 1.7 - date : 09/17/24 + version : 1.8 + date : 10/18/24 */ #ifndef FRENAME_C #define FRENAME_C @@ -18,13 +18,8 @@ void frename_(pEnv env) TWOPARAMS("frename"); STRING("frename"); STRING2("frename"); -#ifdef NOBDW - p1 = (char *)&nodevalue(nextnode1(env->stck)); - p2 = (char *)&nodevalue(env->stck); -#else - p1 = nodevalue(nextnode1(env->stck)).str; - p2 = nodevalue(env->stck).str; -#endif + p1 = GETSTRING(nextnode1(env->stck)); + p2 = GETSTRING(env->stck); BINARY(BOOLEAN_NEWNODE, !rename(p1, p2)); } #endif diff --git a/src/getenv.c b/src/getenv.c index 9df54ad..6846dc2 100644 --- a/src/getenv.c +++ b/src/getenv.c @@ -1,7 +1,7 @@ /* module : getenv.c - version : 1.8 - date : 09/26/24 + version : 1.9 + date : 10/18/24 */ #ifndef GETENV_C #define GETENV_C @@ -16,11 +16,7 @@ void getenv_(pEnv env) ONEPARAM("getenv"); STRING("getenv"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); if ((str = getenv(str)) == 0) str = ""; UNARY(STRING_NEWNODE, str); diff --git a/src/include.c b/src/include.c index 7a87422..0bf83e6 100644 --- a/src/include.c +++ b/src/include.c @@ -1,7 +1,7 @@ /* module : include.c - version : 1.15 - date : 10/11/24 + version : 1.16 + date : 10/18/24 */ #ifndef INCLUDE_C #define INCLUDE_C @@ -17,11 +17,7 @@ void include_(pEnv env) ONEPARAM("include"); STRING("include"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); if (include(env, str)) execerror(env, "valid file name", "include"); POP(env->stck); diff --git a/src/intern.c b/src/intern.c index 3fe6e32..d7076be 100644 --- a/src/intern.c +++ b/src/intern.c @@ -1,7 +1,7 @@ /* module : intern.c - version : 1.13 - date : 09/26/24 + version : 1.14 + date : 10/18/24 */ #ifndef INTERN_C #define INTERN_C @@ -18,11 +18,7 @@ void intern_(pEnv env) ONEPARAM("intern"); STRING("intern"); -#ifdef NOBDW - ptr = str = (char *)&nodevalue(env->stck); -#else - ptr = str = nodevalue(env->stck).str; -#endif + ptr = str = GETSTRING(env->stck); if (!strchr("\"#'().0123456789;[]{}", *ptr)) { if (*ptr == '-' && isdigit((int)ptr[1])) ; diff --git a/src/rest.c b/src/rest.c index dd2f153..ef89000 100644 --- a/src/rest.c +++ b/src/rest.c @@ -1,7 +1,7 @@ /* module : rest.c - version : 1.10 - date : 09/17/24 + version : 1.13 + date : 10/28/24 */ #ifndef REST_C #define REST_C @@ -24,14 +24,11 @@ void rest_(pEnv env) UNARY(SET_NEWNODE, nodevalue(env->stck).set & ~((int64_t)1 << i)); break; case STRING_: -#ifdef NOBDW - str = strdup((char *)&nodevalue(env->stck)); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); CHECKEMPTYSTRING(str, "rest"); #ifdef NOBDW - UNARY(STRING_NEWNODE, str + 1); + str = strdup(str + 1); + UNARY(STRING_NEWNODE, str); free(str); #else UNARY(STRING_NEWNODE, GC_strdup(str + 1)); diff --git a/src/strftime.c b/src/strftime.c index 6838e28..e3487ab 100644 --- a/src/strftime.c +++ b/src/strftime.c @@ -1,7 +1,7 @@ /* module : strftime.c - version : 1.8 - date : 09/17/24 + version : 1.9 + date : 10/18/24 */ #ifndef STRFTIME_C #define STRFTIME_C @@ -21,11 +21,7 @@ void strftime_(pEnv env) TWOPARAMS("strftime"); STRING("strftime"); -#ifdef NOBDW - fmt = (char *)&nodevalue(env->stck); -#else - fmt = nodevalue(env->stck).str; -#endif + fmt = GETSTRING(env->stck); POP(env->stck); LIST("strftime"); decode_time(env, &t); diff --git a/src/strtod.c b/src/strtod.c index 5067ff8..040bcb8 100644 --- a/src/strtod.c +++ b/src/strtod.c @@ -1,7 +1,7 @@ /* module : strtod.c - version : 1.6 - date : 09/17/24 + version : 1.7 + date : 10/18/24 */ #ifndef STRTOD_C #define STRTOD_C @@ -16,11 +16,7 @@ void strtod_(pEnv env) ONEPARAM("strtod"); STRING("strtod"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); UNARY(FLOAT_NEWNODE, strtod(str, 0)); } #endif diff --git a/src/strtol.c b/src/strtol.c index 80d0c89..9f35e97 100644 --- a/src/strtol.c +++ b/src/strtol.c @@ -1,7 +1,7 @@ /* module : strtol.c - version : 1.7 - date : 09/17/24 + version : 1.8 + date : 10/18/24 */ #ifndef STRTOL_C #define STRTOL_C @@ -22,11 +22,7 @@ void strtol_(pEnv env) base = nodevalue(env->stck).num; POP(env->stck); STRING("strtol"); -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); UNARY(INTEGER_NEWNODE, strtoll(str, 0, base)); } #endif diff --git a/src/system.c b/src/system.c index e0a256d..6b7a237 100644 --- a/src/system.c +++ b/src/system.c @@ -1,7 +1,7 @@ /* module : system.c - version : 1.13 - date : 09/30/24 + version : 1.14 + date : 10/18/24 */ #ifndef SYSTEM_C #define SYSTEM_C @@ -20,11 +20,7 @@ void system_(pEnv env) ONEPARAM("system"); STRING("system"); #ifndef WINDOWS_S -#ifdef NOBDW - str = (char *)&nodevalue(env->stck); -#else - str = nodevalue(env->stck).str; -#endif + str = GETSTRING(env->stck); (void)system(str); #endif POP(env->stck); diff --git a/table.c b/table.c index 9e91f0d..ee6ddf5 100644 --- a/table.c +++ b/table.c @@ -203,7 +203,7 @@ /* 3020 */ { Q0, IGNORE_POP, "system", system_, "\"command\" ->", "[IMPURE] Escapes to shell, executes string \"command\".\nThe string may cause execution of another program.\nWhen that has finished, the process returns to Joy.\n" }, /* 3030 */ { Q0, OK, "getenv", getenv_, "\"variable\" -> \"value\"", "[RUNTIME] Retrieves the value of the environment variable \"variable\".\n" }, /* 3040 */ { Q0, OK, "argv", argv_, "-> A", "[RUNTIME] Creates an aggregate A containing the interpreter's command line\narguments.\n" }, -/* 3050 */ { Q0, OK, "argc", argc_, "-> I", "[RUNTIME] Pushes the number of command line arguments.\nThis is quivalent to 'argv size'.\n" }, +/* 3050 */ { Q0, OK, "argc", argc_, "-> I", "[RUNTIME] Pushes the number of command line arguments.\nThis is equivalent to 'argv size'.\n" }, /* 3060 */ { Q0, IGNORE_PUSH, "__memoryindex", __memoryindex_, "-> I", "[IMPURE] Pushes current value of memory.\n" }, /* 3070 */ { Q0, POSTPONE, "get", get_, "-> F", "[IMPURE] Reads a factor from input and pushes it onto stack.\n" }, /* 3080 */ { Q0, IGNORE_POP, "put", put_, "X ->", "[IMPURE] Writes X to output, pops X off stack.\n" }, diff --git a/test4/CMakeLists.txt b/test4/CMakeLists.txt index 57ab00f..64ad483 100644 --- a/test4/CMakeLists.txt +++ b/test4/CMakeLists.txt @@ -1,7 +1,7 @@ # -# module : %M% -# version : %I% -# date : %G% +# module : CMakeLists.txt +# version : 1.2 +# date : 10/29/24 # macro(exe9 src) add_custom_target(${src}.out ALL