[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] JIT and ContextPart/Exception issue
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] JIT and ContextPart/Exception issue |
Date: |
Sat, 1 Feb 2014 19:28:30 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Feb 01, 2014 at 06:28:07PM +0100, Holger Hans Peter Freyther wrote:
> On Mon, Jan 20, 2014 at 02:44:38PM +0100, Holger Hans Peter Freyther wrote:
>
> Hi Paolo,
Hi again,
so maybe there are two bugs. The JIT should not assume a "dense" bytecode
and actually know where/if there is a next bytecode and somehow I think
there should not be a gap? The below is the easiest re-producer of the
issue.
Object subclass: Foo [
bytecodeIndex [
]
dispatchTo [
"Disassemble the bytecodes and tell anObject about them in the form
of message sends. param is given as an argument to every message
send."
<category: 'decoding bytecodes'>
| lastOfs anObject param i byte arg |
anObject := self.
"Remove the send to have the issue go away"
anObject bytecodeIndex.
self
dispatchByte: byte
with: arg
at: i
to: anObject
with: param
]
]
Eval [
" ((CompiledMethod lookupSelector: #dispatchTo:with:) literalAt: 3)
inspect.
(CompiledMethod lookupSelector: #dispatchTo:with:) methodSourceString
printNl.
(Foo >> #dispatchTo) inspect."
Foo new dispatchTo
]
An instance of CompiledMethod
header: 12416
Header Flags:
flags: 0
primitive index: 0
number of arguments: 0
number of temporaries: 6
number of literals: 2
needed stack slots: 16
descriptor: a MethodInfo
literals: [
[1] #bytecodeIndex
[2] #dispatchByte:with:at:to:with:
]
byte codes: [
Code...?
[1] source code line number 5
[3] source code line number 8
push self
[5] store into Temporary[1]
source code line number 9
[7] send 0 args message #bytecodeIndex
[9] source code line number 10
pop stack top
push self
[11] source code line number 11
push Temporary[4]
[13] source code line number 12
[15] push Temporary[5]
[17] source code line number 13
push Temporary[3]
[19] source code line number 14
push Temporary[1]
[21] source code line number 15
push Temporary[2]
[23] send 5 args message #dispatchByte:with:at:to:with:
[27] push self
return stack top
]
note [23] and [27]. I am not sure if there is actually anything
between these two?