xo-jit: + runtime_binding_path, ++ to activation_record

This commit is contained in:
Roland Conybeare 2024-07-05 20:26:07 -04:00
commit fdc5d46fd7
3 changed files with 86 additions and 8 deletions

View file

@ -25,7 +25,8 @@ namespace xo {
} /*lookup_var*/
llvm::AllocaInst *
activation_record::alloc_var(const std::string & x,
activation_record::alloc_var(std::size_t j_slot,
const std::string & x,
llvm::AllocaInst * alloca)
{
if (frame_.find(x) != frame_.end()) {
@ -35,6 +36,11 @@ namespace xo {
return nullptr;
}
if (j_slot >= binding_v_.size())
binding_v_.resize(j_slot + 1);
binding_v_[j_slot] = runtime_binding_path::local(j_slot);
frame_[x] = alloca;
return alloca;
} /*alloc_var*/