mirror of
https://github.com/usatiuk/psil.git
synced 2025-10-28 18:57:48 +01:00
a bit of docs
This commit is contained in:
22
README.md
22
README.md
@@ -26,3 +26,25 @@ CLI tests (also assuming build in `build` and being in repo root):
|
|||||||
```shell
|
```shell
|
||||||
PSIL="../build/src/psil" clitests/testall.sh
|
PSIL="../build/src/psil" clitests/testall.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# How to use
|
||||||
|
|
||||||
|
You can just run the executable and you'll be in REPL mode,
|
||||||
|
or specify an input file like `-f <file>`, the effect is the same as if you
|
||||||
|
had put it there yourself.
|
||||||
|
|
||||||
|
When reading from a file, REPL is still enabled by default and can be disabled with `--repl-`
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
You can also change some of the behaviours of the interpreter:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
--cell_limit:limit (for example --cell_limit:10000) - limit the amount of cells that can be used
|
||||||
|
--command_strs[+/-] (for example --command_strs+) - use string representation of commands, useful
|
||||||
|
for debugging the compiler with verbose logging
|
||||||
|
--default_log_level:level (for example --default_log_level:3) - change the default logging level
|
||||||
|
--repl[+/-] (for example --repl-) - enable/disable repl
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void MemoryContext::gc_thread_entry() {
|
|||||||
for (const auto &r: _roots) {
|
for (const auto &r: _roots) {
|
||||||
Logger::log(
|
Logger::log(
|
||||||
"MemoryContext", [&](std::ostream &out) { out << "processing r " << r.first << " diff " << r.second; },
|
"MemoryContext", [&](std::ostream &out) { out << "processing r " << r.first << " diff " << r.second; },
|
||||||
Logger::DEBUG);
|
Logger::TRACE);
|
||||||
toVisit.emplace(r.first);
|
toVisit.emplace(r.first);
|
||||||
}
|
}
|
||||||
visitAll();
|
visitAll();
|
||||||
@@ -166,7 +166,7 @@ void MemoryContext::gc_thread_entry() {
|
|||||||
_cells.remove_if([&](Cell *l) {
|
_cells.remove_if([&](Cell *l) {
|
||||||
if (!l->_live) {
|
if (!l->_live) {
|
||||||
freed += 1;
|
freed += 1;
|
||||||
Logger::log("MemoryContext", [&](std::ostream &out) { out << "deleting: " << l; }, Logger::DEBUG);
|
Logger::log("MemoryContext", [&](std::ostream &out) { out << "deleting: " << l; }, Logger::TRACE);
|
||||||
delete l;
|
delete l;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user