Recover lost method from 50c2416f962a - required for MOP!
ObjectMemory class>>lookupMethodForSelectorUnwindHandlerFor: and
ObjectMemory class>>unwindHandlerInContext: were somehow lost
but they are required for lookup MOP to work correctly.
This commits recovers them from rev 50c2416f962a.
--- a/ObjectMemory.st Wed Sep 04 09:43:51 2013 +0100
+++ b/ObjectMemory.st Thu Sep 05 02:20:15 2013 +0100
@@ -916,6 +916,52 @@
%}
! !
+!ObjectMemory class methodsFor:'VM unwind protect support'!
+
+lookupMethodForSelectorUnwindHandlerFor: lookup
+
+ "
+ An unwind handler for external method lookup
+ (MOP). This method effectively called only
+ from handler block returned by
+ ObjectMemory>>unwindHandlerInContext:.
+
+ The VM also create an artifical context with
+ ObjectMemory as receiver and selector if this
+ method as selector and marks it for unwind.
+
+ See: ObjectMemory>>unwindHandlerInContext:
+ "
+
+ Processor activeProcess externalLookupPopIfEqual: lookup.
+
+ "Created: / 06-10-2011 / 16:31:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+unwindHandlerInContext:aContext
+
+ "
+ Return an unwind handler block for given context.
+ Selector of that context denotes which unwind handler
+ to use.
+
+ Occasionally, the VM needs to unwind-protect some C code.
+ If so, it creates and artificial context on the stack and
+ marks it for unwind, so stack unwinding logic finds it
+ and handles it.
+
+ Now, only #lookupMethodForSelectorUnwindProtect is supported
+ (ensures the lookup is popped out from the lookupActications)
+ "
+ aContext selector == #lookupMethodForSelectorUnwindHandlerFor: ifTrue:[
+ ^[self lookupMethodForSelectorUnwindHandlerFor: (aContext argAt: 1)]
+ ].
+
+ self internalError:'Unknown VM unwind protect action'
+
+ "Created: / 01-10-2011 / 19:15:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!ObjectMemory class methodsFor:'access debugging'!
debugPrivacyChecks:aBoolean