fix for deprecated when's where the inner frame is larger than the outer frame

This commit is contained in:
Vern Paxson 2022-09-25 19:55:47 -07:00
parent 19ba30d77a
commit 71d1022269
3 changed files with 20 additions and 1 deletions

View file

@ -190,6 +190,20 @@ ScopePtr pop_scope()
return old_top;
}
void merge_top_scope()
{
if ( scopes.size() < 2 )
reporter->InternalError("scope merge underflow");
auto t = pop_scope();
for ( auto v : t->OrderedVars() )
{
v->SetOffset(top_scope->Length());
top_scope->Insert(v->Name(), v);
}
}
ScopePtr current_scope()
{
return top_scope;