Replace time-based GC with allocation-count trigger, migrate all Create factories to GCList::Create(), fix VFSPath root path, reorder TObject variant
Build and Deploy on Tag / 🔨 Build for PowerPC (push) Successful in 1m11s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-riscv64:latest, riscv64-linux-gnu, riscv64) (push) Successful in 3m22s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x64:latest, x86_64-linux-gnu, amd64) (push) Successful in 3m34s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm:latest, arm-linux-gnueabihf, arm7) (push) Successful in 3m37s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm64:latest, aarch64-linux-gnu, arm64) (push) Successful in 3m39s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x86:latest, i386-linux-gnu, 386) (push) Successful in 55s
Build and Deploy on Tag / update-tap (push) Failing after 4m8s
Build and Deploy on Tag / 🔨 Build for PowerPC (push) Successful in 1m11s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-riscv64:latest, riscv64-linux-gnu, riscv64) (push) Successful in 3m22s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x64:latest, x86_64-linux-gnu, amd64) (push) Successful in 3m34s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm:latest, arm-linux-gnueabihf, arm7) (push) Successful in 3m37s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm64:latest, aarch64-linux-gnu, arm64) (push) Successful in 3m39s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x86:latest, i386-linux-gnu, 386) (push) Successful in 55s
Build and Deploy on Tag / update-tap (push) Failing after 4m8s
This commit is contained in:
@@ -82,16 +82,24 @@ TObject TSubEnvironment::GetVariable(std::string key) {
|
||||
if (this->dict->HasValue(key)) {
|
||||
return this->dict->GetValue(key);
|
||||
}
|
||||
if (this->decls.count(key) > 0 &&
|
||||
this->decls[key] == TEnvironmentDeclType::TEDT_VAR) {
|
||||
return Undefined();
|
||||
}
|
||||
if (this->env->HasVariableRecurse(key)) {
|
||||
return this->env->GetVariable(key);
|
||||
}
|
||||
return Undefined();
|
||||
}
|
||||
void TSubEnvironment::DeclareVariable(std::string key, TObject value) {
|
||||
if (this->decls.count(key) == 0)
|
||||
this->decls[key] = TEnvironmentDeclType::TEDT_VAR;
|
||||
|
||||
this->dict->SetValue(key, value);
|
||||
}
|
||||
void TSubEnvironment::SetVariable(std::string key, TObject value) {
|
||||
if (this->dict->HasValue(key)) {
|
||||
|
||||
if (this->dict->HasValue(key) || this->decls.count(key) > 0) {
|
||||
this->dict->SetValue(key, value);
|
||||
return;
|
||||
}
|
||||
@@ -102,10 +110,10 @@ void TSubEnvironment::SetVariable(std::string key, TObject value) {
|
||||
}
|
||||
}
|
||||
bool TSubEnvironment::HasVariable(std::string key) {
|
||||
return this->dict->HasValue(key);
|
||||
return this->dict->HasValue(key) || this->decls.count(key) > 0;
|
||||
}
|
||||
bool TSubEnvironment::HasVariableRecurse(std::string key) {
|
||||
if (this->dict->HasValue(key))
|
||||
if (this->dict->HasValue(key) || this->decls.count(key) > 0)
|
||||
return true;
|
||||
return this->env->HasVariableRecurse(key);
|
||||
}
|
||||
@@ -159,19 +167,11 @@ TSubEnvironment *TEnvironment::GetSubEnvironment(GCList &gc) {
|
||||
}
|
||||
TSubEnvironment *TSubEnvironment::Create(GCList *gc, TEnvironment *env,
|
||||
TDictionary *dict) {
|
||||
TSubEnvironment *senv = new TSubEnvironment(env, dict);
|
||||
std::shared_ptr<GC> _gc = gc->GetGC();
|
||||
gc->Add(senv);
|
||||
_gc->Watch(senv);
|
||||
return senv;
|
||||
return gc->Create<TSubEnvironment>(env, dict);
|
||||
}
|
||||
TSubEnvironment *TSubEnvironment::Create(GCList &gc, TEnvironment *env,
|
||||
TDictionary *dict) {
|
||||
TSubEnvironment *senv = new TSubEnvironment(env, dict);
|
||||
std::shared_ptr<GC> _gc = gc.GetGC();
|
||||
gc.Add(senv);
|
||||
_gc->Watch(senv);
|
||||
return senv;
|
||||
return gc.Create<TSubEnvironment>(env, dict);
|
||||
}
|
||||
TEnvironment *TSubEnvironment::GetParentEnvironment() { return this->env; }
|
||||
TRootEnvironment *TSubEnvironment::GetRootEnvironment() {
|
||||
|
||||
Reference in New Issue
Block a user