final changes for -O C++ feature completeness, mainly "when" statement support

This commit is contained in:
Vern Paxson 2022-05-12 14:07:36 -07:00
parent 48f1e4df42
commit 56140046d3
9 changed files with 191 additions and 33 deletions

View file

@ -245,6 +245,16 @@ FuncValPtr lookup_func__CPP(string name, int num_bodies, vector<p_hash_type> has
return make_intrusive<FuncVal>(move(sf));
}
IDPtr find_global__CPP(const char* g)
{
auto gl = lookup_ID(g, GLOBAL_MODULE_NAME, false, false, false);
if ( ! gl )
reporter->CPPRuntimeError("global %s is missing", g);
return gl;
}
RecordTypePtr get_record_type__CPP(const char* record_type_name)
{
IDPtr existing_type;