PolymorphicInlineCache.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 01 Jun 2021 20:19:13 +0100
branchjv
changeset 25424 51bd8a6b196f
parent 20131 4118d61ddba0
permissions -rw-r--r--
Cherry-picked `Context` cherry-picked Context.st from a6b6dda4caff: * 4aaf30c174e9: #DOCUMENTATION by cg, Claus Gittinger <cg@exept.de> * c67311afcc6c: #OTHER by cg, Claus Gittinger <cg@exept.de> * 883f79e7b2a6: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 716f3fbb09e9: Don't mark contexts with `CATCHMARK`, Jan Vrany <jan.vrany@fit.cvut.cz> * cff24fa817b0: #REFACTORING by stefan, Stefan Vogel <sv@exept.de> * 521f0d837330: #UI_ENHANCEMENT by cg, Claus Gittinger <cg@exept.de> * bf1118f0fcca: #UI_ENHANCEMENT by cg, Claus Gittinger <cg@exept.de> * e587cdd22868: #BUGFIX by cg, Claus Gittinger <cg@exept.de> * fe9f9487a3ed: #DOCUMENTATION by cg, Claus Gittinger <cg@exept.de> * d5b781899274: #BUGFIX by cg, Claus Gittinger <cg@exept.de> * 8258751a7465: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 40173e082cbc: Copyright updates, Jan Vrany <jan.vrany@fit.cvut.cz> * 6db5c28207d5: #UI_ENHANCEMENT by cg, Claus Gittinger <cg@exept.de> * 871ea64fd5dc: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 4b544a108e4e: #DOCUMENTATION by cg, Claus Gittinger <cg@exept.de> * 9a8d8399e566: #FEATURE by cgexept.de, Claus Gittinger <cg@exept.de> * 170b00be0103: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * a6c73965eae8: #FEATURE by cg, Claus Gittinger <cg@exept.de> * ce2a0e462ff0: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 46a260a9ca92: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 46cab49167fb: #UI_ENHANCEMENT by exept, Claus Gittinger <cg@exept.de> * 7d52dfd3997d: #DOCUMENTATION by exept, Claus Gittinger <cg@exept.de> * c52eeea62763: Fix `Context >> argAndVarNames` in cases when debug info is not available, Jan Vrany <jan.vrany@labware.com> * b5d6963fe4a9: Backed out changeset c52eeea62763, Jan Vrany <jan.vrany@labware.com> * 6fd3896f8703: #FEATURE by exept, Claus Gittinger <cg@exept.de> * b530ee616256: #REFACTORING by cg, Claus Gittinger <cg@exept.de> * ef9b481d7498: #FEATURE by cg, Claus Gittinger <cg@exept.de> * ea663b72bd51: #UI_ENHANCEMENT by cg, Claus Gittinger <cg@exept.de> * 6179572a733c: #FEATURE by exept, Claus Gittinger <cg@exept.de> * 84155b1b6622: #DOCUMENTATION by exept, Claus Gittinger <cg@exept.de> * 37d06602d856: *** empty log message ***, Claus Gittinger <cg@exept.de> * f927b9022fea: *** empty log message ***, Claus Gittinger <cg@exept.de> * 427d3be62d97: #UI_ENHANCEMENT by exept, Claus Gittinger <cg@exept.de>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs
18358
a81c233c6da4 format only
Claus Gittinger <cg@exept.de>
parents: 15955
diff changeset
     3
		       SWING Research Group, Czech Technical University in Prague
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 Permission is hereby granted, free of charge, to any person
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 obtaining a copy of this software and associated documentation
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 files (the 'Software'), to deal in the Software without
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 restriction, including without limitation the rights to use,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 copy, modify, merge, publish, distribute, sublicense, and/or sell
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 copies of the Software, and to permit persons to whom the
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 Software is furnished to do so, subject to the following
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
 conditions:
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
 The above copyright notice and this permission notice shall be
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
 included in all copies or substantial portions of the Software.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
 OTHER DEALINGS IN THE SOFTWARE.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libbasic' }"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    28
"{ NameSpace: Smalltalk }"
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    29
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
Object subclass:#PolymorphicInlineCache
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:'address numArgs'
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	category:'Kernel-Classes'
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!PolymorphicInlineCache class methodsFor:'documentation'!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
 COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs
18358
a81c233c6da4 format only
Claus Gittinger <cg@exept.de>
parents: 15955
diff changeset
    42
		       SWING Research Group, Czech Technical University in Prague
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
 Permission is hereby granted, free of charge, to any person
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
 obtaining a copy of this software and associated documentation
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
 files (the 'Software'), to deal in the Software without
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
 restriction, including without limitation the rights to use,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
 copy, modify, merge, publish, distribute, sublicense, and/or sell
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
 copies of the Software, and to permit persons to whom the
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
 Software is furnished to do so, subject to the following
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
 conditions:
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
 The above copyright notice and this permission notice shall be
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
 included in all copies or substantial portions of the Software.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
 OTHER DEALINGS IN THE SOFTWARE.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
documentation
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    This class provides a basic access to inline cache structure as
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    used by the virtual machine.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    [author:]
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    74
        Jan Vrany <jan.vrany@fit.cvut.cz>
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    75
        Janb Kurs <kursjan@fit.cvut.cz>
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    [instance variables:]
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    78
        address     <ExternalAddress> a pointer to the VM inline cache structure.
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    79
                                    if the address is NULL, then PolymorphicInlineCache
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    80
                                    is invalid.
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
    81
        numArgs    <SmallInteger> a number of arguments
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    [class variables:]
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    [see also:]
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
! !
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!PolymorphicInlineCache methodsFor:'binding / unbinding'!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
bindTo: aMethod forClass: aClass
18358
a81c233c6da4 format only
Claus Gittinger <cg@exept.de>
parents: 15955
diff changeset
    92
    | selector |
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    selector := aMethod selector.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
%{
18358
a81c233c6da4 format only
Claus Gittinger <cg@exept.de>
parents: 15955
diff changeset
    96
    __ilcBind(self, aClass, aMethod,  selector);
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    RETURN(self);
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
%}.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    self primitiveFailed.
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    "Created: / 02-10-2011 / 18:05:26 / Jan Kurs <kursjan@fit.cvut.cz>"
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
! !
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
!PolymorphicInlineCache class methodsFor:'documentation'!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
version
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
   107
    ^ '$Header$'
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
!
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
version_CVS
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
   111
    ^ '$Header$'
15955
5092a16d31ab initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
! !
20084
3ef7d1039a05 #OTHER by mawalch
mawalch
parents: 18358
diff changeset
   113