Problem trying to change SmallInt < SmallInt primitive
Jaco van der Merwe
jaco.lists at telkomsa.net
Tue Aug 10 06:02:42 PDT 2004
Hi
It seems that the problem occurs when the arguments to the
ObjectPointer_asSmallInt() function are local stack variables, such as x and
y below. Quite interestingly, when I declare x and y as volatile the problem
disappears, which indicates some register allocation problem. Strangely the
problem disappears when the local variables x and y are replaced with their
function argument equivalents, arguments[0] and arguments[1]. I believe this
is worthwhile submitting to Microsoft as a defect.
In the meantime we need a working solution. One option is either to switch
of global optimisation alltogether for the whole project, or finding a way
of structuring the code that does not cause the optimisation bug to surface.
Regards
Jaco
----- Original Message -----
From: "Paul Dufresne" <dufrp at hotmail.com>
To: <slate at tunes.org>
Sent: Tuesday, August 10, 2004 12:15 AM
Subject: Problem trying to change SmallInt < SmallInt primitive
> I have tried to change the Slate version of primitive33 in
> src/mobius/vm/ext/prims.slate to:
> ===
> x at SmallIntegerTraits < y at SmallIntegerTraits
> [
> interpreter stackPush:
> [| a!LongInt b!LongInt |
> a: x asSmallInt.
> b: y asSmallInt.
> ( x < y
> ifTrue: [CurrentMemory TrueObject]
> ifFalse: [CurrentMemory FalseObject])] do.
> ] `pidginPrimitive.
> ===
> but got:
> ===
> Generating load of interpreter
> Generating argument
> Casting
> Generating message do
>
> Checking infixes
> Checking prefixes
> Checking accessors
> Searching for function do
> The following condition was signaled:
> Error: A method translation wasn't found for do.
>
> The following restarts are available:
> 0) Inspect a stack frame
> 1) Abort evaluation of expression
> 2) Quit Slate
> ===
>
> Am I trying too much for a primitive, I means evaluating a block?
>
> --Paul
>
> _________________________________________________________________
> Gardez le contrôle grâce à la protection contre les fenêtres pop-up
> articulée sur la technologie brevetée Microsoft SmartScreen
> http://join.msn.com/?pgmarket=fr-ca&page=features/popup Commencez dès
> maintenant à profiter de tous les avantages de MSN Premium et obtenez les
> deux premiers mois GRATUITS*.
>
>
More information about the Slate
mailing list