Skip to content

Commit

Permalink
Make [failProc] to be static; Align the code with dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
x committed Jul 30, 2023
1 parent 8136496 commit 99f7ed7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions builtinImpl.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,8 @@ staticityOfBinResult: [
) sequence
] "mplBuiltinExportVariable" @declareBuiltin ucall

[
@processor @block defaultFailProc
[ # See also "createFailWithMessageImpl"
"deprecated, use custom [failProc] instead" @processor @block compilerError
] "mplBuiltinFailProc" @declareBuiltin ucall

[
Expand Down
2 changes: 1 addition & 1 deletion codeNode.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -2726,7 +2726,7 @@ killStruct: [

failProcRefToVar getVar.data.getTag VarBuiltin = [
#no overload
@processor @block defaultFailProc
"to access a field using a dynamic key, you have either to use a custom [failProc] or disable the bounds check" @processor @block compilerError
] [
@failProcRefToVar @processor @block derefAndPush
@processor @block defaultCall
Expand Down
5 changes: 0 additions & 5 deletions defaultImpl.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ makeVarDerefCaptured: [
TRUE @refToVar getVar.@capturedForDeref set
];

defaultFailProc: [
processor: block: ;;
text: @processor @block pop;
];

defaultSet: [
processor: block: ;;
refToDst: @processor @block pop;
Expand Down
6 changes: 3 additions & 3 deletions processorImpl.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 99f7ed7

Please sign in to comment.