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