From owner-svn-soc-all@freebsd.org Fri Aug 14 02:20:38 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D743F99FB2E for ; Fri, 14 Aug 2015 02:20:38 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7A6211A2 for ; Fri, 14 Aug 2015 02:20:38 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id t7E2KcGb033635 for ; Fri, 14 Aug 2015 02:20:38 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id t7E2KcAH033363 for svn-soc-all@FreeBSD.org; Fri, 14 Aug 2015 02:20:38 GMT (envelope-from clord@FreeBSD.org) Date: Fri, 14 Aug 2015 02:20:38 GMT Message-Id: <201508140220.t7E2KcAH033363@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r289734 - soc2015/clord/head/sys/contrib/ficl/softcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 02:20:38 -0000 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"; }