guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for wip-rtl


From: Andy Wingo
Subject: Re: Patches for wip-rtl
Date: Tue, 23 Apr 2013 12:13:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Heya,

On Tue 23 Apr 2013 04:38, Noah Lavine <address@hidden> writes:

> I assume you're talking about the box-ref and box-set! stuff with
> checking for non-variables, right? I agree in general, but those
> instructions could plausibly be emitted for any code that uses module
> introspection to get its own variable objects, right?

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 this
> 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 can do that already to a degree... probably the best "fallback" that
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.

Just a thought!

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]