emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Daniel Colascione
Subject: Re: Dynamic loading progress
Date: Mon, 19 Oct 2015 20:38:53 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/19/2015 08:32 PM, Tom Tromey wrote:
> Daniel> A runtime describes Emacs as a whole. It lives forever and has
> Daniel> no thread affinity.
> 
> Thanks.
> 
> Daniel> We have a perfectly good sentinel: NULL. NULL will never be a valid
> Daniel> local or global reference, so it's safe to use it to indicate that
> Daniel> something went wrong.
> 
> Ok, I see, it really is JNI.  I was confused because the module API
> doesn't implement this.

Sure, although I'd like it to. If we use the currently-implemented
approach, it's not a disaster. It'd just be a shame to have to cart
around long long values on 32-bit platforms even when Emacs is compiled
with plain 32-bit values.

> This design seems a bit odd for Emacs in that "immediate" things like
> ints will still have to be wrapped in references.

Right, because we're not strongly typed like Java. The references are
cheap enough though, and there's no awkardness around pointer width or
type tagging. Once we get a numeric tower, it'll be possible to store a
full 32 bits in an emacs_value without having to be aware that there's
an indirection. This approach also completely insulates us from GC
changes: we could even implement a compacting collector without modules
being aware of it.

FWIW, it's not just JNI. V8 works the same way.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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