socsvn commit: r289734 - soc2015/clord/head/sys/contrib/ficl/softcore
clord at FreeBSD.org
clord at FreeBSD.org
Fri Aug 14 02:20:38 UTC 2015
Author: clord
Date: Fri Aug 14 02:20:37 2015
New Revision: 289734
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289734
Log:
Update ficlSystemCompileSoftCore to use the newer Ficl 4 constructs. The
behaviour has remained the same though.
Modified:
soc2015/clord/head/sys/contrib/ficl/softcore/softcore.awk
Modified: soc2015/clord/head/sys/contrib/ficl/softcore/softcore.awk
==============================================================================
--- soc2015/clord/head/sys/contrib/ficl/softcore/softcore.awk Fri Aug 14 02:14:37 2015 (r289733)
+++ soc2015/clord/head/sys/contrib/ficl/softcore/softcore.awk Fri Aug 14 02:20:37 2015 (r289734)
@@ -167,17 +167,19 @@
if (commenting) end_comments();
printf "#endif /* WANT_SOFTWORDS */\n";
printf " \"quit \";\n";
- printf "\n\nvoid ficlSystemCompileSoftCore(ficlSystem *pSys)\n";
+ printf "\n\nvoid ficlSystemCompileSoftCore(ficlSystem *system)\n";
printf "{\n";
- printf " ficlVm *pVM = pSys->vmList;\n";
- printf " CELL id = pVM->sourceId;\n";
+ printf " ficlVm *vm = system->vmList;\n";
+ printf " int returnValue;\n";
+ printf " ficlCell oldSourceID = vm->sourceId;\n";
+ printf " ficlString s;\n";
printf " int ret = sizeof (softWords);\n";
- printf " assert(pVM);\n";
- printf " pVM->sourceId.i = -1;\n";
- printf " ret = ficlExec(pVM, softWords);\n";
- printf " pVM->sourceId = id;\n";
- printf " if (ret == VM_ERREXIT)\n";
- printf " assert(FALSE);\n";
+ printf " vm->sourceId.i = -1;\n";
+ printf " FICL_STRING_SET_POINTER(s, (char *)(softWords));\n";
+ printf " FICL_STRING_SET_LENGTH(s, ret);\n";
+ printf " returnValue = ficlVmExecuteString(vm, s);\n";
+ printf " vm->sourceId = oldSourceID;\n";
+ printf " FICL_VM_ASSERT(vm, returnValue != FICL_VM_STATUS_ERROR_EXIT);\n";
printf " return;\n";
printf "}\n";
}
More information about the svn-soc-all
mailing list