NamespaceAwareLookup.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 23386 e7d124bf6282
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
     1
"
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     2
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
     3
	      All Rights Reserved
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
     4
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     5
Permission is hereby granted, free of charge, to any person
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     6
obtaining a copy of this software and associated documentation
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     7
files (the 'Software'), to deal in the Software without
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     8
restriction, including without limitation the rights to use,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
     9
copy, modify, merge, publish, distribute, sublicense, and/or sell
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    10
copies of the Software, and to permit persons to whom the
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    11
Software is furnished to do so, subject to the following
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    12
conditions:
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    13
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    14
The above copyright notice and this permission notice shall be
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    15
included in all copies or substantial portions of the Software.
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    16
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    17
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    19
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    20
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    21
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    22
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    23
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    24
OTHER DEALINGS IN THE SOFTWARE.
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    25
"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    26
"{ Package: 'stx:libbasic' }"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    27
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
    28
"{ NameSpace: Smalltalk }"
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
    29
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    30
Lookup subclass:#NamespaceAwareLookup
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    31
	instanceVariableNames:''
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    32
	classVariableNames:'Instance'
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    33
	poolDictionaries:''
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    34
	category:'Kernel-Extensions'
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    35
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    36
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    37
!NamespaceAwareLookup class methodsFor:'documentation'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    38
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    39
copyright
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    40
"
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    41
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
    42
	      All Rights Reserved
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    43
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    44
Permission is hereby granted, free of charge, to any person
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    45
obtaining a copy of this software and associated documentation
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    46
files (the 'Software'), to deal in the Software without
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    47
restriction, including without limitation the rights to use,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    48
copy, modify, merge, publish, distribute, sublicense, and/or sell
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    49
copies of the Software, and to permit persons to whom the
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    50
Software is furnished to do so, subject to the following
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    51
conditions:
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    52
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    53
The above copyright notice and this permission notice shall be
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    54
included in all copies or substantial portions of the Software.
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    55
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    56
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    57
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    58
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    59
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    60
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    61
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    62
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
    63
OTHER DEALINGS IN THE SOFTWARE.
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    64
"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    65
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    66
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    67
!NamespaceAwareLookup class methodsFor:'initialization'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    68
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    69
initialize
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    70
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    71
    Instance := self basicNew
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    72
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    73
    "Created: / 10-07-2010 / 21:12:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    74
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    75
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    76
!NamespaceAwareLookup class methodsFor:'accessing'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    77
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    78
instance
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    79
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    80
    ^Instance
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    81
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    82
    "Created: / 20-05-2010 / 11:18:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    83
    "Modified: / 10-07-2010 / 21:12:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    84
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    85
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    86
!NamespaceAwareLookup class methodsFor:'lookup'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    87
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
    88
lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    89
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    90
    "JV @ 2010-07-24
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    91
     Following C code is just a performance optimization.
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
    92
     It is not necessary, however it speeds things in most
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    93
     cases. Such optimization significantly speeds up the IDE
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    94
     since class browser involves dozens of super-polymorphic
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
    95
     sends (> 1000 receiver classes per send-site).
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
    96
        "
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    97
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
    98
%{
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
    99
    OBJ sendingMthd = __ContextInstPtr(sendingContext)->c_method;
22310
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   100
    if (__Class(sendingMthd) == Method && __MethodInstPtr(sendingMthd)->m_annotation == nil) {
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   101
        OBJ m = __lookup(initialSearchClass, selector);
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   102
        if (m != nil) RETURN ( m );
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   103
    }
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   104
%}.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   105
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   106
    ^Instance lookupMethodForSelector: selector directedTo: initialSearchClass
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   107
                          for: receiver withArguments: argArrayOrNil
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   108
                          from: sendingContext
22310
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   109
!
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   110
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   111
lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext ilc:ilc
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   112
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   113
    "JV @ 2010-07-24
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   114
     Following C code is just a performance optimization.
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   115
     It is not necessary, however it speeds things in most
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   116
     cases. Such optimization significantly speeds up the IDE
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   117
     since class browser involves dozens of super-polymorphic
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   118
     sends (> 1000 receiver classes per send-site).
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   119
        "
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   120
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   121
%{
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   122
    OBJ sendingMthd = __ContextInstPtr(sendingContext)->c_method;
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   123
    if (__Class(sendingMthd) == Method && __MethodInstPtr(sendingMthd)->m_annotation == nil) {
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   124
        OBJ m = __lookup(initialSearchClass, selector);
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   125
        if (m != nil) RETURN ( m );
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   126
    }
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   127
%}.
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   128
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   129
    ^Instance lookupMethodForSelector: selector directedTo: initialSearchClass
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   130
                          for: receiver withArguments: argArrayOrNil
7c2de8ff3d04 #BUGFIX by sr
sr
parents: 22296
diff changeset
   131
                          from: sendingContext ilc:ilc
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   132
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   133
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   134
!NamespaceAwareLookup methodsFor:'lookup'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   135
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   136
lookupMethodForSelector: selector directedTo: initialSearchClass for: receiver withArguments: argArrayOrNil from: sendingContext ilc: ilcCache
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   137
    "Invoked by the VM to ask me for a method to fire.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   138
     For details, see comment inLookup>>lookupMethodForSelector:directedTo:for:withArguments:from:"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   139
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   140
    | sendingNs sendingMthd queue seen namespaces methods imports numMethods|
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   141
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   142
    "JV @ 2010-07-24
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   143
     Following C code is just a performance optimization.
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   144
     It is not necessary, however it speeds things in most
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   145
     cases. Such optimization significantly speeds up the IDE
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   146
     since class browser involves dozens of super-polymorphic
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   147
     sends (> 1000 receiver classes per send-site).
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   148
    "
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   149
%{
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   150
    sendingMthd = __ContextInstPtr(sendingContext)->c_method;
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   151
    if (__Class(sendingMthd) == Method &&
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   152
            __MethodInstPtr(sendingMthd)->m_annotation == nil) {
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   153
            OBJ m = __lookup(initialSearchClass, selector);
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   154
            if (m != nil) {
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   155
                if (ilcCache != nil) __ilcBind(ilcCache, initialSearchClass, m, selector);
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   156
                RETURN ( m );
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   157
            }
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   158
    }
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   159
%}.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   160
    "If you remove C code above, uncomment the line below."
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   161
    "sendingMthd := sendingContext method."
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   162
    sendingNs := sendingMthd isNil
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   163
            ifTrue:[nil]
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   164
            ifFalse:[sendingMthd nameSpace].
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   165
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   166
        "Second chance to speed up things (in case sending method
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   167
         has resource or so)"
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   168
%{
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   169
    if (sendingNs == nil) {
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   170
        OBJ m = __lookup(initialSearchClass, selector);
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   171
        if (m != nil) {
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   172
            if (ilcCache != nil) __ilcBind(ilcCache, initialSearchClass, m, selector);
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   173
            RETURN ( m );
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   174
        }
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   175
    }
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   176
%}.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   177
    "
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   178
    Stderr
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   179
            show: 'sel='; show: selector; show: ' ns='; show: sendingNs printString;
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   180
            show: ' method=', sendingMthd printString; cr.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   181
        "
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   182
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   183
    sendingNs notNil ifTrue: [
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   184
        seen := Set new.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   185
        namespaces := Array with: sendingNs.
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   186
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   187
        [namespaces notEmpty] whileTrue:[
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   188
            methods := self
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   189
                        lookupMethodsForSelector: selector
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   190
                        directedTo: initialSearchClass
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   191
                        inNamespaces: namespaces.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   192
            numMethods := methods size.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   193
            numMethods == 1 ifTrue:[
22296
5abec1c29d53 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 21100
diff changeset
   194
                ^ methods anElement
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   195
            ].
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   196
            numMethods > 1 ifTrue:[
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   197
                ^self ambiguousMessageSend: selector withArgs: argArrayOrNil
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   198
            ].
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   199
            "No method found"
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   200
            seen addAll: namespaces.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   201
            imports := Set new.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   202
            namespaces do:[:namespace|
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   203
                namespace notNil ifTrue:[
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   204
                    namespace imports do:[:import|
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   205
                        (seen includes: import) ifFalse: [
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   206
                            imports add: import
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   207
                        ]
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   208
                    ]
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   209
                ]
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   210
            ].
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   211
            namespaces := imports
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   212
        ].
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   213
    ].
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   214
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   215
    methods := self lookupMethodsForSelector: selector
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   216
                        directedTo: initialSearchClass.
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   217
    methods size == 1 ifTrue:[
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   218
        | m |
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   219
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   220
        m := methods anyOne.
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   221
        ilcCache notNil ifTrue:[ ilcCache bindTo: m forClass: initialSearchClass ].
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   222
        ^ m
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   223
    ].
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   224
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   225
    ^nil
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   226
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   227
    "Created: / 19-02-2014 / 21:49:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
22296
5abec1c29d53 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 21100
diff changeset
   228
    "Modified: / 09-10-2017 / 17:19:51 / stefan"
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   229
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   230
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   231
!NamespaceAwareLookup methodsFor:'lookup - helpers'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   232
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   233
lookupMethodsForSelector: selector directedTo: initialSearchClass
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   234
    "Searches initialSearchClass for a methods with in any namespace"
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   235
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   236
    ^self
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   237
	lookupMethodsForSelector: selector
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   238
	directedTo: initialSearchClass
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   239
	suchThat:[:sel :mthd|true].
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   240
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   241
    "Created: / 19-07-2010 / 15:37:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   242
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   243
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   244
lookupMethodsForSelector: selector directedTo: initialSearchClass inNamespaces: namespaces
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   245
    "Searches initialSearchClass for a methods with given selector in given namespaces."
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   246
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   247
    ^self
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   248
	lookupMethodsForSelector: selector
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   249
	directedTo: initialSearchClass
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   250
	suchThat:[:sel :mthd|namespaces includes: mthd nameSpace].
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   251
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   252
    "Created: / 19-07-2010 / 15:13:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   253
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   254
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   255
lookupMethodsForSelector: selector directedTo: initialSearchClass suchThat: block
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   256
    "Searches initialSearchClass for a method with given selector in given nameSpace.
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   257
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   258
     if no method in given namespace is found, returns nil"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   259
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   260
    | searchClass methods seen |
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   261
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   262
    searchClass := initialSearchClass.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   263
    methods := Set new.
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   264
    seen := OrderedCollection new.
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   265
    [ searchClass notNil ] whileTrue:[
23386
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   266
        searchClass selectorsAndMethodsDo:[:sel :mthd|
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   267
            (sel selectorWithoutNameSpace = selector
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   268
              and:[ (seen includes: mthd nameSpace) not
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   269
              and:[ block value: sel value: mthd]]
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   270
            ) ifTrue:[
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   271
                methods add: mthd.
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   272
                seen add: mthd nameSpace
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   273
            ]
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   274
        ].
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   275
        searchClass := searchClass superclass
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   276
    ].
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   277
    ^methods
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   278
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   279
    "Created: / 19-07-2010 / 15:34:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   280
    "Modified: / 20-07-2010 / 10:42:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23386
e7d124bf6282 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 22310
diff changeset
   281
    "Modified: / 24-09-2018 / 21:17:59 / Claus Gittinger"
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   282
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   283
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   284
!NamespaceAwareLookup methodsFor:'trampolines'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   285
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   286
ambiguousMessageSend
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   287
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   288
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   289
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   290
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   291
	    arguments: #()
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   292
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   293
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   294
    "Created: / 19-08-2010 / 22:05:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   295
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   296
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   297
ambiguousMessageSend: selector withArgs: argArrayOrNil
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   298
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   299
    | trampoline |
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   300
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   301
    trampoline := self class methodDictionary at:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   302
		     (#(" 0"ambiguousMessageSend
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   303
			" 1"ambiguousMessageSendWith:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   304
			" 2"ambiguousMessageSendWith:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   305
			" 3"ambiguousMessageSendWith:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   306
			" 4"ambiguousMessageSendWith:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   307
			" 5"ambiguousMessageSendWith:with:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   308
			" 6"ambiguousMessageSendWith:with:with:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   309
			" 7"ambiguousMessageSendWith:with:with:with:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   310
			" 8"ambiguousMessageSendWith:with:with:with:with:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   311
			)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   312
			at: argArrayOrNil size + 1).
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   313
    trampoline := trampoline asByteCodeMethod.
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   314
    1 to: trampoline numLiterals do: [:litNr|
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   315
	(trampoline literalAt: litNr) == #__placeholder__ ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   316
	    (trampoline literalAt: litNr put: selector)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   317
	]
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   318
    ].
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   319
    ^trampoline
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   320
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   321
    "Created: / 19-08-2010 / 22:09:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   322
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   323
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   324
ambiguousMessageSendWith: a1
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   325
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   326
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   327
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   328
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   329
	    arguments: (Array with: a1)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   330
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   331
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   332
    "Created: / 19-08-2010 / 22:06:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   333
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   334
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   335
ambiguousMessageSendWith: a1 with: a2
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   336
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   337
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   338
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   339
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   340
	    arguments: (Array with: a1 with: a2)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   341
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   342
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   343
    "Created: / 19-08-2010 / 22:06:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   344
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   345
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   346
ambiguousMessageSendWith: a1 with: a2 with: a3
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   347
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   348
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   349
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   350
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   351
	    arguments: (Array with: a1 with: a2 with: a3)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   352
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   353
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   354
    "Created: / 19-08-2010 / 22:06:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   355
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   356
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   357
ambiguousMessageSendWith: a1 with: a2 with: a3 with: a4
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   358
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   359
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   360
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   361
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   362
	    arguments: (Array with: a1 with: a2 with: a3 with: a4)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   363
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   364
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   365
    "Created: / 19-08-2010 / 22:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   366
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   367
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   368
ambiguousMessageSendWith: a1 with: a2 with: a3 with: a4
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   369
		    with: a5
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   370
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   371
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   372
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   373
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   374
	    arguments: (Array with: a1 with: a2 with: a3 with: a4
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   375
			      with: a5)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   376
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   377
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   378
    "Created: / 19-08-2010 / 22:07:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   379
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   380
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   381
ambiguousMessageSendWith: a1 with: a2 with: a3 with: a4
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   382
		    with: a5 with: a6
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   383
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   384
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   385
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   386
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   387
	    arguments: (Array with: a1 with: a2 with: a3 with: a4
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   388
			      with: a5 with: a6)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   389
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   390
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   391
    "Created: / 19-08-2010 / 22:07:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   392
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   393
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   394
ambiguousMessageSendWith: a1 with: a2 with: a3 with: a4
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   395
		    with: a5 with: a6 with: a7
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   396
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   397
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   398
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   399
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   400
	    arguments: (Array with: a1 with: a2 with: a3 with: a4
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   401
			      with: a5 with: a6 with: a7)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   402
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   404
    "Created: / 19-08-2010 / 22:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   405
!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   406
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   407
ambiguousMessageSendWith: a1 with: a2 with: a3 with: a4
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   408
		    with: a5 with: a6 with: a7 with: a8
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   409
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   410
    ^self ambiguousMessage:
18359
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   411
	(Message
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   412
	    selector: #__placeholder__
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   413
	    arguments: (Array with: a1 with: a2 with: a3 with: a4
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   414
			      with: a5 with: a6 with: a7 with: a8)
Claus Gittinger <cg@exept.de>
parents: 16080
diff changeset
   415
	)
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   416
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   417
    "Created: / 19-08-2010 / 22:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   418
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   419
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   420
!NamespaceAwareLookup class methodsFor:'documentation'!
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   421
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
   422
version_CVS
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   423
    ^ '$Header$'
13478
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
   424
!
0212bdc3f19c changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 13403
diff changeset
   425
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   426
version_SVN
21100
6cd737df7462 #OTHER by mawalch
mawalch
parents: 18359
diff changeset
   427
    ^ '$Id$'
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   428
! !
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   429
16080
e12fe7f621a8 class: NamespaceAwareLookup
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13478
diff changeset
   430
13403
9cdd42752750 added AmbiguousMessage, Annotation, NamespaceAwareLookup
vrany
parents:
diff changeset
   431
NamespaceAwareLookup initialize!