[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help compiling the JIT
From: |
Piotr Klibert |
Subject: |
Re: Need help compiling the JIT |
Date: |
Fri, 04 Jun 2021 11:11:58 +0200 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 |
> I don't think the JIT is finished.
Thank you! It's not a problem for me, right now at least, it's just that while
I'm reasonably confident in being able to understand the byte-code compiler and
interpreter, the JITs are still a bit of an unknown land to me, so I wasn't
able to immediately tell how complete this one is :-)
> JIT is hard to get right; for example,
> Erlang only get JIT this year, at version 24, at the mature
> age of 35 :)
Yes, but: Erlang had an AOT compiler in HiPE for the last 15 years (although it
was found not to improve things much, due to the inability of optimizing calls
across modules and there being too little sequential code in most Erlang
systems). On the other hand, it had at least four attempts at making a JIT in
its history, which also shows that it's indeed tricky to get one right ;-)
On another note: I found a bug that affected VisualGST browse
senders/implementors functionality, located here:
https://github.com/gnu-smalltalk/smalltalk/blob/master/kernel/ProcEnv.st#L77-L88
valueIfAbsent: aBlock [
"Return the value of this variable in the current process."
<category: 'accessing'>
^Processor activeProcess environment at: self key ifAbsent: [ nil ]
]
value [
"Return the value of this variable in the current process."
<category: 'accessing'>
^Processor activeProcess environment at: self key ifAbsent: [ nil ]
]
The #valueIfAbsent: doesn't use its argument block at all, probably due to
copy&paste from #value.
What should I do to make my discovery (I'd say "a fix", but its a bit too
trivial to be called that ;-)) useful to others? I also made some improvements
to smalltalk-mode.el, and will probably continue to do so as I work with GST.
Best regards,
Piotr Klibert