[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is it hard to write a fast JIT for a language that distinguishes between NULL and Int32=0
- From: Alex Queiroz <asandroq@...>
- Date: Tue, 11 Oct 2011 17:21:41 +0200
Hallo,
On Tue, Oct 11, 2011 at 4:46 PM, Ben Harper <rogojin@gmail.com> wrote:
> I'm sort of targeting Mike Pall in this question, but maybe there are other
> VM/JIT experts hanging out here who can answer my question.
> Looking at the initial Dart spec, I see that the language allows an Int or a
> Double to have the value NULL, which is distinct from zero. My guess is that
> this single feature makes it much harder to write a performant JIT/Compiler
> for the language.
> Is this true?
Although I am no expert, I will try to answer anyway: NULL in this
case can be a non-pointer type which has a single value. In this case
all is needed is a encoding for this new type inside a machine word.
But this is for a dynamic language, I don't know about Dart.
--
-alex
http://www.artisancoder.com/