ArkScript v4.0.0-10 #504
SuperFola
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Added
$repr
macro to get a string representation of a given nodearkscript -f|--format
VM::forceReloadPlugins
, to be used by the REPL to force reload the plugins and be sure that their symbols are all definehelp
,save
(save history to disk),history
(print history),reset
(reset vm and code) commands to the REPL>
to:
)type
list
,concat
,append
and friends to only push valid nodes (that produces a value)$paste
to paste a node inside a maro without evaluating it further ; useful to stop recursive evaluation of nodes inside function macrosArk::internal::Pass
to describe compiler passes: they all output an AST (parser, import solver, macro processor, and optimizer for now)-f(no-)importsolver
,-f(no-)macroprocessor
and-f(no-)optimizer
to toggle on and off those compiler passesempty?
as a macro when possibleand
andor
implementation--check
to the formatter as an option: returns 0 if the code is correctly formatted, 1 otherwiseappend!
,concat!
andpop!
MAKE_CLOSURE <page addr>
instruction, generated in place of aLOAD_CONST
when a closure is made-fdump-ir
to dump the IR entities to a file named{file}.ark.ir
(string:setAt string index char)
(bound checked)(@= list|string index new_value)
,(@@= list|list<string> index1 index2 new_value|char)
(bound checked)and
andor
Changed
(= closure1 closure2)
will work only if they have the same fields (name) and if the values match($ name value)
/($ name (args args args) body)
/($if cond then else)
(import package.sub.file)
arkscript --version
andarkscript --help
now output ArkScript version with the commit hashvoid Value::toString(std::ostream&, VM&)
now becomesstd::string Value::toString(VM&)
Node::operator<<
to replace it withNode::debugPrint
let
,mut
orset
, resulting in a compiler crashargcount
and crash the processor(fun)
as the argument block, resulting in a crashlet
/mut
/set
nodes($ test (@ [1 2 3] -5))
(concat! lst lst)
(print nil?)
(+)
while
nodesfun
nodeslet
,mut
orset
nodes inside macros with an invalid node typeinternal::listInstructions
with the different instructions, to be used by the compiler and name resolution passsymcat
andargcount
to$symcat
and$argcount
for uniformityArk::VM
class is nowfinal
STORE
instruction has been renamedSET_VAL
STORE
instruction is emitted in place of theLET
andMUT
instructions, without any mutability checking nowio:writeFile
no longer takes a mode and has been split intoio:writeFile
andio:appendToFile
inst byte1 byte2 byte3
CALL_BUILTIN <builtin> <arg count>
super instructionstr:xyz
builtins tostring:xyz
for uniformity with the standard librarystring:find
takes an optional third argument, startIndex (where to start the lookup from, default 0list:setAt
can work with negative indexes, and is now bound checkedarkscript
executable (not enabled when embedding arkscript, so that one can grab variables from the VM)Removed
NodeType::Closure
Utils::digPlaces
andUtils::decPlaces
got removed as they were no longer neededlist:removeAt
,ark
executable now replaced byarkscript
)VM::getUserPointer
andVM::setUserPointer
ARK_PROFILER_COUNT
define\0
escape in stringstermcolor
dependency to rely onfmt
for coloring outputsand
andor
instructions in favor of a better implementation to support short-circuitingLET
andMUT
instructions in favor of a single newSTORE
instructionSAVE_ENV
instructionThis discussion was created from the release ArkScript v4.0.0-10.
Beta Was this translation helpful? Give feedback.
All reactions