[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question About the Variable Allocator
From: |
Noah Lavine |
Subject: |
Question About the Variable Allocator |
Date: |
Sun, 3 Jun 2012 10:20:12 -0400 |
Hello,
I've always been puzzled about part of the variable allocator. In
module/language/tree-il/analyze.scm, we deal with allocations, which
are hash tables that say where in the stack each local variable goes.
The maps are two level, symbol -> {lambda -> location}. The reason
given is that different lambdas could have different variables with
the same symbol.
But if I understand correctly, each variable also gets a gensym, and
the gensyms are globally unique. So wouldn't it be possible to use the
gensyms as keys instead, and only have a single level map? If so, why
don't we do it?
Thanks,
Noah
- Question About the Variable Allocator,
Noah Lavine <=