Skip to content

Commit

Permalink
Add [isRef] built-in
Browse files Browse the repository at this point in the history
  • Loading branch information
MatwayBurkow committed Feb 20, 2021
1 parent 1aa7b1f commit b378372
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Empty file modified LICENSE
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion build/compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

FOR /F "tokens=*" %%v IN ('git log --date^=format:%%y%%m%%d --format^=%%cd -1') DO SET SOURCE_VERSION=%%v

mplc.exe -D COMPILER_SOURCE_VERSION=%SOURCE_VERSION% -D DEBUG=TRUE -D DEBUG_MEMORY=TRUE -I ../sl -call_trace 0 -debug_memory -ndebug -o mplc.ll ../main.mpl
mplc.exe -D COMPILER_SOURCE_VERSION=%SOURCE_VERSION% -D DEBUG=FALSE -D DEBUG_MEMORY=TRUE -I ../sl -call_trace 0 -debug_memory -ndebug -o mplc.ll ../main.mpl
9 changes: 9 additions & 0 deletions builtinImpl.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,15 @@ staticityOfBinResult: [
] when
] "mplBuiltinIsDynamic" @declareBuiltin ucall

[
refToVar: @processor @block pop;
processor compilable [
refToVar @block push
refToVar getVar.temporary ~ makeValuePair
VarCond @processor @block createVariable Static @processor @block makeStaticity @processor @block createPlainIR @block push
] when
] "mplBuiltinIsRef" @declareBuiltin ucall

[
refToVar: @processor @block pop;
processor compilable [
Expand Down
1 change: 1 addition & 0 deletions builtins.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ builtins: (
{name: "isCombined" ; impl: @mplBuiltinIsCombined ;}
{name: "isConst" ; impl: @mplBuiltinIsConst ;}
{name: "isDynamic" ; impl: @mplBuiltinIsDynamic ;}
{name: "isRef" ; impl: @mplBuiltinIsRef ;}
{name: "isStatic" ; impl: @mplBuiltinIsStatic ;}
{name: "log" ; impl: @mplBuiltinLog ;}
{name: "log10" ; impl: @mplBuiltinLog10 ;}
Expand Down

0 comments on commit b378372

Please sign in to comment.