|
From: | Noah Lavine |
Subject: | Re: Patches for wip-rtl |
Date: | Sat, 4 May 2013 21:29:34 -0400 |
Heya,
Ah I see what you mean. There are two uses of variables in the VM: one
for calls to variable-ref or variable-set, and the other for internal
use. For the internal uses, we know the variable should indeed be a
variable and so we should emit the checks. For calls to variable-ref /
variable-set, I think it would be best if somehow the compiler could
replace those calls with (if (call variable? x) (primcall box-ref x)
(call error ...)). Dunno. WDYT?
> One thing that would be interesting - and I don't know if we do thisWe can do that already to a degree... probably the best "fallback" that
> now - is using different VMs for different parts of the
> code. Specifically, if the REPL ran in a different VM than user code,
> then the REPL wouldn't die in these cases. That might also enable
> cool debugging things, like single-stepping the user VM and examining
> its registers. I noticed that we already have support for changing the
> active VM. What do you think?
we have is the stack VM, actually. What happens if you install traps on
the VM that call stack VM procedures and then you run an RTL function?
I would think that you should be able to do something useful there.
[Prev in Thread] | Current Thread | [Next in Thread] |