diff --git a/README.md b/README.md index 468eab8..71804b2 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ make sudo make install ``` -## Build with shared libs only (no dependencies other than cmake and build-essentials) +## Build with shared libs only (self contained dependencies) ```bash cmake -S ../.. -B . -DTESSESFRAMEWORK_ENABLE_STATIC=OFF -DTESSESFRAMEWORK_ENABLE_SHARED=ON -DTESSESFRAMEWORK_FETCHCONTENT=ON make -j`nproc` diff --git a/src/vm/vm.cpp b/src/vm/vm.cpp index 7bd3a8d..5bd8da3 100644 --- a/src/vm/vm.cpp +++ b/src/vm/vm.cpp @@ -5459,7 +5459,35 @@ namespace Tesses::CrossLang { cse.back()->Push(gc, Undefined()); return false; } - + if(chunk != nullptr) + { + if(key == "Arguments") + { + auto myargs = TList::Create(ls); + gc->BarrierBegin(); + for(auto item : chunk->args) + { + myargs->Add(item); + } + gc->BarrierEnd(); + cse.back()->Push(gc, myargs); + return false; + } + if(key == "Code") + { + auto ba = TByteArray::Create(ls); + ba->data = chunk->code; + cse.back()->Push(gc, ba); + return false; + } + if(key == "File") + { + cse.back()->Push(gc, chunk->file); + return false; + } + cse.back()->Push(gc, Undefined()); + return false; + } if(callstackEntry != nullptr) { if(key == "IP")