Commit 138433d8 authored by Marius Wachtler's avatar Marius Wachtler

add back an assert which I accidentally removed in the BST change

parent defc3153
......@@ -359,6 +359,15 @@ protected:
(*sym_table)[*vreg] = NULL;
return false;
}
bool visit_storename(BST_StoreName* node) override {
InternedString name = getCodeConstants().getInternedString(node->index_id);
assert(name.c_str()[0] == '#'); // it must be a temporary
// You might think I need to check whether `name' is being assigned globally or locally,
// since a global assign doesn't affect the symbol table. However, the CFG pass only
// generates invoke-assigns to temporary variables. Just to be sure, we assert:
assert(node->lookup_type != ScopeInfo::VarScopeType::GLOBAL);
return false;
}
public:
static std::pair<SymbolTable*, bool /* created_new_sym_table */>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment