Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Aug 2015 02:20:38 GMT
From:      clord@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r289734 - soc2015/clord/head/sys/contrib/ficl/softcore
Message-ID:  <201508140220.t7E2KcAH033363@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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";
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508140220.t7E2KcAH033363>