Lookup.st
author Stefan Vogel <sv@exept.de>
Mon, 22 Jun 2015 11:33:37 +0200
branchexpecco_2_7_5_branch
changeset 18499 b132ac7c9d6a
parent 15957 b8ad4b672f8a
child 18120 e3a375d5f6a8
child 18365 806d5402c9c0
permissions -rw-r--r--
GLIBC 2.12 compatibility
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
     1
"
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     2
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
     3
              All Rights Reserved
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
     4
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     5
Permission is hereby granted, free of charge, to any person
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     6
obtaining a copy of this software and associated documentation
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     7
files (the 'Software'), to deal in the Software without
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     8
restriction, including without limitation the rights to use,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
     9
copy, modify, merge, publish, distribute, sublicense, and/or sell
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    10
copies of the Software, and to permit persons to whom the
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    11
Software is furnished to do so, subject to the following
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    12
conditions:
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    13
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    14
The above copyright notice and this permission notice shall be
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    15
included in all copies or substantial portions of the Software.
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    16
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    17
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    19
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    20
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    21
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    22
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    23
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    24
OTHER DEALINGS IN THE SOFTWARE.
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    25
"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    26
"{ Package: 'stx:libbasic' }"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    27
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    28
Object subclass:#Lookup
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    29
	instanceVariableNames:''
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    30
	classVariableNames:''
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    31
	poolDictionaries:''
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    32
	category:'Kernel-Extensions'
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    33
!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    34
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    35
!Lookup class methodsFor:'documentation'!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    36
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    37
copyright
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    38
"
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    39
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    40
              All Rights Reserved
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    41
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    42
Permission is hereby granted, free of charge, to any person
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    43
obtaining a copy of this software and associated documentation
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    44
files (the 'Software'), to deal in the Software without
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    45
restriction, including without limitation the rights to use,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    46
copy, modify, merge, publish, distribute, sublicense, and/or sell
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    47
copies of the Software, and to permit persons to whom the
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    48
Software is furnished to do so, subject to the following
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    49
conditions:
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    50
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    51
The above copyright notice and this permission notice shall be
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    52
included in all copies or substantial portions of the Software.
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    53
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    54
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    55
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    56
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    57
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    58
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    59
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    60
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
    61
OTHER DEALINGS IN THE SOFTWARE.
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    62
"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    63
! !
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    64
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    65
!Lookup class methodsFor:'initialization'!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    66
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    67
initialize
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    68
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    69
    self lookupObject: Lookup builtin
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    70
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    71
    "Created: / 26-04-2010 / 21:15:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    72
! !
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    73
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    74
!Lookup class methodsFor:'accessing'!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    75
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    76
builtin
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    77
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    78
    ^BuiltinLookup instance
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    79
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    80
    "Created: / 26-04-2010 / 19:26:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    81
! !
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    82
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    83
!Lookup methodsFor:'lookup'!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    84
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    85
lookupMethodForSelector: selector directedTo: initialSearchClass
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    86
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    87
     |cls md method|
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    88
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    89
	"Following C code is just a performance optimization.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    90
	 It is not neccessary, however it speeds up UI code,
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    91
	 since it heavily uses perform:"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    92
%{
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    93
	RETURN (  __lookup(initialSearchClass, selector) );
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    94
%}.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    95
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    96
     cls := initialSearchClass.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    97
     [ cls notNil ] whileTrue:[
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    98
        md := cls methodDictionary.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
    99
        method := md at:selector ifAbsent:nil.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   100
        method notNil ifTrue:[^ method ].
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   101
        cls := cls superclass.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   102
     ].
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   103
     ^ nil
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   104
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   105
    "Created: / 27-04-2010 / 15:30:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   106
!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   107
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   108
lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext
15957
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   109
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   110
    <resource: #obsolete>
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   111
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   112
	"
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   113
	 This method is no longer sent by the VM as it nows pass
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   114
	 inline/poly cache object. 
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   115
	"
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   116
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   117
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   118
    "invoked by the VM to ask me for a method to call.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   119
     The arguments are: the selector, receiver and arguments,
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   120
     the class to start the search in (for here-, super and directed sends)
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   121
     the sending context.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   122
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   123
     The returned method object will be put into the inline- and polyCache
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   124
     at the call site; it might therefore be called more than once for the
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   125
     same receiver-class/selector combination (once for each call site).
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   126
     If I return nil, a doesNotUnderstand will be invoked."
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   127
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   128
     |cls md method|
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   129
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   130
	"Following C code is just a performance optimization.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   131
	 It is not neccessary, however it speeds up UI code,
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   132
	 since it heavily uses perform:"
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   133
%{
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   134
	RETURN (  __lookup(initialSearchClass, selector) );
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   135
%}.
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   136
    ^ self lookupMethodForSelector: selector 
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   137
		   directedTo: initialSearchClass
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   138
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   139
15957
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   140
!
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   141
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   142
lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext ilc: ilcCache
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   143
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   144
    "Invoked by the VM to ask me for a method to call.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   145
     The arguments are: the selector, receiver and arguments,
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   146
     the class to start the search in (for here-, super and directed sends)
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   147
     the sending context and the inline/poly cache (instance of
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   148
	 PolymorphicInlineCache). 
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   149
	 	
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   150
     The returned method object will NOT be put into the inline- and 
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   151
	 polyCache bu default. To update the call site's cache, you have to
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   152
	 call ilcCache bindTo: method forClass: initialSearch class. If you
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   153
	 dont call it, inline/poly cache won't be updated and next call
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   154
	 won't be cached (therefore it will be relatively slow. 
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   155
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   156
     If I return nil, a doesNotUnderstand: will be send."
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   157
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   158
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   159
    | method |
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   160
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   161
	"Following C code is just a performance optimization.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   162
	 It is not neccessary, however it speeds up UI code,
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   163
	 since it heavily uses perform:"
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   164
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   165
%{
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   166
    method = __lookup(initialSearchClass, selector);
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   167
    if ( method ) {
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   168
        __ilcBind(ilcCache, initialSearchClass, method, selector);
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   169
    }
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   170
    RETURN (method);
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   171
%}.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   172
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   173
    method := self lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   174
    ilcCache bindTo: method forClass: initialSearchClass.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   175
    ^ method.
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   176
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   177
    "Created: / 01-10-2011 / 13:18:40 / Jan Kurs <kursjan@fit.cvut.cz>"
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   178
! !
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   179
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   180
!Lookup class methodsFor:'documentation'!
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   181
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
   182
version_CVS
15957
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   183
    ^ '$Header: /cvs/stx/stx/libbasic/Lookup.st,v 1.3 2014-02-05 17:17:53 cg Exp $'
13405
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
   184
!
13dea24362ff initial checkin
Claus Gittinger <cg@exept.de>
parents: 13401
diff changeset
   185
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   186
version_SVN
15957
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   187
    ^ '$Id: Lookup.st,v 1.3 2014-02-05 17:17:53 cg Exp $'
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   188
! !
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   189
15957
b8ad4b672f8a class: Lookup
Claus Gittinger <cg@exept.de>
parents: 13405
diff changeset
   190
13401
36713d9bc967 Added Lookup.st BuiltinLookup.st
vrany
parents:
diff changeset
   191
Lookup initialize!