|
Fix:
OpalEncoderForV3PlusClosures>>markerOrNilFor: compiledMethod
"What is a marker method? It is method with body like
'self subclassResponsibility' or '^ self subclassResponsibility'
used to indicate ('mark') a special property.
Marker methods compile to bytecode like:
33 <70> self
34 <D0> send: <literal 1>
35 <87> pop
36 <78> returnSelf
for the first form, or
33 <70> self
34 <D0> send: <literal 1>
35 <7C> returnTop
for the second form."
| e |
((e := compiledMethod endPC) = 36 or: [e = 35]) ifFalse: [^ nil].
(compiledMethod numLiterals = 3) ifFalse:[^ nil].
(compiledMethod at: 33) = 16r70 ifFalse:[^ nil]. "push self"
(compiledMethod at: 34) = 16rD0 ifFalse:[^ nil]. "send <literal 1>"
"If we reach this point, we have a marker method that sends self <literal 1>"
^ compiledMethod literalAt: 1
|
|
|
Priority: 3 – Must Fix
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Later
|
Go to Case
|
|