[Vm-dev] VM Maker: VMMaker.oscog-AlistairGrant.2455.mcz
Alistair Grant
akgrant0710 at gmail.com
Tue Oct 16 06:21:58 UTC 2018
Hi Eliot,
On Mon, 15 Oct 2018 at 21:58, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
>
> Hi Alistair,
>
> also
> var := (self getenv: (self cCode: [key] inSmalltalk: [key allButLast])) ifNil: [0].
> doesn't make sense to me. In C nil == 0. So ifNil: [0] is a no-op in C. Either the genenv: simulation should answer 0 or it should answer nil. But we shouldn't fix the primitive two handle incorrect simulation; we should instead implement the simulated getenv: to match what the primitive expects. Make sense?
Sorry I didn't get to this last night.
On Mon, 15 Oct 2018 at 21:55, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> support code like this should be tuned for simulation speed. Don't bother with the asserts: (asserts belong in code that will be translated to C, or tests), and try and use and ifTrue:ifFalse: style rather than foo isBar ifTrue: []. foo isBaz ifTrue: [], to reduce the number of types comparisons done.
Done.
Thanks for your feedback,
Alistair
More information about the Vm-dev
mailing list