Add thumbnailer support and TVMVersion and TFile are now accessable from language

This commit is contained in:
2025-03-28 22:01:56 -05:00
parent 0a87476cfa
commit 0af37d2b9f
29 changed files with 1706 additions and 101 deletions

View File

@ -32,6 +32,13 @@ namespace Tesses::CrossLang {
if(this->marked) return;
this->marked = true;
this->callable->Mark();
GC::Mark(this->tag);
}
void TCallable::Mark()
{
if(this->marked) return;
this->marked=true;
GC::Mark(this->tag);
}
void TClosure::Mark()
{
@ -40,7 +47,7 @@ namespace Tesses::CrossLang {
this->file->Mark();
this->env->Mark();
this->closure->Mark();
GC::Mark(this->tag);
}
TClosure* TClosure::Create(GCList& ls,TEnvironment* env,TFile* file,uint32_t chunkId,bool ownScope)
{

View File

@ -72,6 +72,15 @@ namespace Tesses::CrossLang {
return TEnumerator::CreateFromObject(ls,cb->Call(ls,{dict}));
}
bool TDictionary::MethodExists(GCList& ls,std::string method)
{
ls.GetGC()->BarrierBegin();
auto r = this->GetValue(method);
TCallable* callable;
bool res = GetObjectHeap(r,callable);
ls.GetGC()->BarrierEnd();
return res;
}
bool TDynamicDictionary::MethodExists(GCList& ls,std::string name)
{
auto dict = TDictionary::Create(ls);