Updated NamespaceAwareLookup w.r.t. ILC-enabled MOP jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 13 Oct 2011 16:42:52 +0100
branchjv
changeset 17888 e650d3cb3084
parent 17887 c9a530f29f7d
child 17889 e16990b8d1fd
Updated NamespaceAwareLookup w.r.t. ILC-enabled MOP
Lookup.st
NamespaceAwareLookup.st
stx_libbasic.st
--- a/Lookup.st	Thu Oct 13 12:04:01 2011 +0100
+++ b/Lookup.st	Thu Oct 13 16:42:52 2011 +0100
@@ -136,7 +136,9 @@
 
 %{
     method = __lookup(initialSearchClass, selector);
-    __ilcBind(ilcCache, initialSearchClass, method, selector);
+    if ( method ) {
+        __ilcBind(ilcCache, initialSearchClass, method, selector);
+    }
     RETURN (method);
 %}.
 
@@ -150,7 +152,7 @@
 !Lookup class methodsFor:'documentation'!
 
 version_SVN
-    ^ '$Id: Lookup.st 10717 2011-10-11 15:53:59Z vranyj1 $'
+    ^ '$Id: Lookup.st 10722 2011-10-13 15:42:52Z vranyj1 $'
 ! !
 
 Lookup initialize!
--- a/NamespaceAwareLookup.st	Thu Oct 13 12:04:01 2011 +0100
+++ b/NamespaceAwareLookup.st	Thu Oct 13 16:42:52 2011 +0100
@@ -57,7 +57,7 @@
 
 !NamespaceAwareLookup class methodsFor:'lookup'!
 
-lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext 
+lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext ilc: ilc
 
     "JV @ 2010-07-24
      Following C code is just a performance optimization.
@@ -72,19 +72,22 @@
 	if (__Class(sendingMthd) == Method &&
 		__MethodInstPtr(sendingMthd)->m_annotation == nil) {
 		OBJ m = __lookup(initialSearchClass, selector);
-		if (m != nil) RETURN ( m );
+		if (m != nil) {
+            __ilcBind(ilc, initialSearchClass, m, selector);
+            RETURN ( m );
+        }
 	}
 %}.
 
     ^Instance lookupMethodForSelector: selector directedTo: initialSearchClass
 			  for: receiver withArguments: argArrayOrNil 
-			  from: sendingContext 
+			  from: sendingContext ilc: ilc
 
 ! !
 
 !NamespaceAwareLookup methodsFor:'lookup'!
 
-lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext 
+lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext ilc: ilc
     "Invoked by the VM to ask me for a method to fire.
      For details, see comment inLookup>>lookupMethodForSelector:directedTo:for:withArguments:from:"
 
@@ -102,7 +105,10 @@
 	if (__Class(sendingMthd) == Method &&
 		__MethodInstPtr(sendingMthd)->m_annotation == nil) {
 		OBJ m = __lookup(initialSearchClass, selector);
-		if (m != nil) RETURN ( m );
+		if (m != nil) {
+            __ilcBind(ilc, initialSearchClass, m, selector);
+            RETURN ( m );
+        }
 	}
 %}.
     "If you remove C code above, uncomment the line below."
@@ -117,7 +123,10 @@
 %{
 	if (sendingNs == nil) {
 		OBJ m = __lookup(initialSearchClass, selector);
-		if (m != nil) RETURN ( m );
+		if (m != nil) {
+            __ilcBind(ilc, initialSearchClass, m, selector);
+            RETURN ( m );
+        }
     }
 %}.
     "
@@ -351,7 +360,7 @@
 !NamespaceAwareLookup class methodsFor:'documentation'!
 
 version_SVN
-    ^ '$Id: NamespaceAwareLookup.st 10700 2011-09-29 15:44:37Z vranyj1 $'
+    ^ '$Id: NamespaceAwareLookup.st 10722 2011-10-13 15:42:52Z vranyj1 $'
 ! !
 
 NamespaceAwareLookup initialize!
--- a/stx_libbasic.st	Thu Oct 13 12:04:01 2011 +0100
+++ b/stx_libbasic.st	Thu Oct 13 16:42:52 2011 +0100
@@ -551,7 +551,7 @@
     "Return a SVN revision number of myself.
      This number is updated after a commit"
 
-    ^ "$SVN-Revision:"'10716MP'"$"
+    ^ "$SVN-Revision:"'10721MP'"$"
 ! !
 
 !stx_libbasic class methodsFor:'private-prerequisites'!
@@ -569,7 +569,7 @@
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Id: stx_libbasic.st 10717 2011-10-11 15:53:59Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10722 2011-10-13 15:42:52Z vranyj1 $'
 !
 
 version_CVS
@@ -577,5 +577,5 @@
 !
 
 version_SVN
-    ^ '$Id: stx_libbasic.st 10717 2011-10-11 15:53:59Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10722 2011-10-13 15:42:52Z vranyj1 $'
 ! !