guile-devel
[Top][All Lists]
Advanced

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

Re: gc issues


From: Jim Blandy
Subject: Re: gc issues
Date: 15 Sep 2000 12:42:19 -0500

> #define scm_remember_object(obj) (asm("" : : "r"(obj)))

It may be worth pointing out that this just says that the value of
`obj' must be in a register when this "statement" is evaluated.  It
doesn't say it must live in a register the whole time.  It would be
perfectly correct for GCC to keep obj on the stack, and then load it
into a register just before this line.

Of course, that does mean that you can't keep a value live in that
register across this statement, which could cause some inefficiency.
But if you're only doing these things before you return, there aren't
going to be too many live values anyway.

Also, this isn't a cure-all.  It would be perfectly correct for GCC to
keep the value `obj + 3487' around in some register, and then subtract
3487 from the register before evaluating the null asm.  But it seems
unlikely that GCC would do that.

These kinds of problems are intrinsic in imprecise GC, though.  I
wouldn't worry about it.


reply via email to

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