From de21e344b3909fb2d88a885818ff7df84acdbd62 Mon Sep 17 00:00:00 2001 From: x Date: Tue, 16 May 2023 07:56:21 +0000 Subject: [PATCH] Make [failProc] to be static; Align the code with dependencies --- builtinImpl.mpl | 4 ++-- codeNode.mpl | 2 +- defaultImpl.mpl | 5 ----- processorImpl.mpl | 6 +++--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/builtinImpl.mpl b/builtinImpl.mpl index 8243ecc..ee22e46 100644 --- a/builtinImpl.mpl +++ b/builtinImpl.mpl @@ -1116,8 +1116,8 @@ staticityOfBinResult: [ ) sequence ] "mplBuiltinExportVariable" @declareBuiltin ucall -[ - @processor @block defaultFailProc +[ # See also "createFailWithMessageImpl" + "there is no [failProc] provided" @processor @block compilerError ] "mplBuiltinFailProc" @declareBuiltin ucall [ diff --git a/codeNode.mpl b/codeNode.mpl index cb52077..bbc3d5f 100644 --- a/codeNode.mpl +++ b/codeNode.mpl @@ -2726,7 +2726,7 @@ killStruct: [ failProcRefToVar getVar.data.getTag VarBuiltin = [ #no overload - @processor @block defaultFailProc + "The key doesn't known at compile-time. To use such keys either provide [failProc] or disable bounds check" @processor @block compilerError ] [ @failProcRefToVar @processor @block derefAndPush @processor @block defaultCall diff --git a/defaultImpl.mpl b/defaultImpl.mpl index 31a81f1..330a7cf 100644 --- a/defaultImpl.mpl +++ b/defaultImpl.mpl @@ -78,11 +78,6 @@ makeVarDerefCaptured: [ TRUE @refToVar getVar.@capturedForDeref set ]; -defaultFailProc: [ - processor: block: ;; - text: @processor @block pop; -]; - defaultSet: [ processor: block: ;; refToDst: @processor @block pop; diff --git a/processorImpl.mpl b/processorImpl.mpl index 2b6d89c..2e22013 100644 --- a/processorImpl.mpl +++ b/processorImpl.mpl @@ -340,13 +340,13 @@ debugMemory [ where:; result: 0nx; - where.dataReserve Natx cast where.elementSize * result + !result + where.reserve Natx cast where.@Item storageSize * result + !result where [ where1:; - where1.dataReserve Natx cast where1.elementSize * result + !result + where1.reserve Natx cast where1.@Item storageSize * result + !result where1 [ where2:; - where2.dataReserve Natx cast where2.elementSize * result + !result + where2.reserve Natx cast where2.@Item storageSize * result + !result ] each ] each