author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 04 Oct 2011 22:59:41 +0100 | |
branch | jv |
changeset 17879 | 4ed4eb60a67e |
parent 17877 | 55e81c704074 |
child 18120 | e3a375d5f6a8 |
permissions | -rw-r--r-- |
17868 | 1 |
" |
2 |
COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs |
|
3 |
SWING Research Group, Czech Technical University in Prague |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
26 |
"{ Package: 'stx:libbasic' }" |
|
27 |
||
28 |
Object subclass:#PolymorphicInlineCache |
|
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
29 |
instanceVariableNames:'address numArgs' |
17868 | 30 |
classVariableNames:'' |
31 |
poolDictionaries:'' |
|
32 |
category:'Kernel-Classes' |
|
33 |
! |
|
34 |
||
35 |
!PolymorphicInlineCache class methodsFor:'documentation'! |
|
36 |
||
37 |
copyright |
|
38 |
" |
|
39 |
COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs |
|
40 |
SWING Research Group, Czech Technical University in Prague |
|
41 |
||
42 |
Permission is hereby granted, free of charge, to any person |
|
43 |
obtaining a copy of this software and associated documentation |
|
44 |
files (the 'Software'), to deal in the Software without |
|
45 |
restriction, including without limitation the rights to use, |
|
46 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
47 |
copies of the Software, and to permit persons to whom the |
|
48 |
Software is furnished to do so, subject to the following |
|
49 |
conditions: |
|
50 |
||
51 |
The above copyright notice and this permission notice shall be |
|
52 |
included in all copies or substantial portions of the Software. |
|
53 |
||
54 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
55 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
56 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
57 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
58 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
59 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
60 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
61 |
OTHER DEALINGS IN THE SOFTWARE. |
|
62 |
||
63 |
" |
|
64 |
! |
|
65 |
||
66 |
documentation |
|
67 |
" |
|
68 |
This class provides a basic access to inline cache structure as |
|
69 |
used by the virtual machine. |
|
70 |
||
71 |
[author:] |
|
72 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
73 |
Janb Kurs <kursjan@fit.cvut.cz> |
17868 | 74 |
|
75 |
[instance variables:] |
|
76 |
address <ExternalAddress> a pointer to the VM inline cache structure. |
|
77 |
if the adress is NULL, then PolymorphicInlineCache |
|
78 |
is invalid. |
|
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
79 |
numArgs <SmallInteger> a number of arguments |
17868 | 80 |
[class variables:] |
81 |
||
82 |
[see also:] |
|
83 |
||
84 |
" |
|
85 |
! ! |
|
86 |
||
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
87 |
!PolymorphicInlineCache methodsFor:'binding / unbinding'! |
17875
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
88 |
|
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
89 |
bindTo: aMethod forClass: aClass |
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
90 |
|
17875
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
91 |
| selector | |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
92 |
selector := aMethod selector. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
93 |
%{ |
17879
4ed4eb60a67e
__ilcBind is called directly from Lookup.st - smoke tested only
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17877
diff
changeset
|
94 |
__ilcBind(self, aClass, aMethod, selector); |
17877
55e81c704074
PolymorphicInlineCache: calls __ilcBind VM entry
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17876
diff
changeset
|
95 |
RETURN(self); |
17875
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
96 |
%}. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
97 |
self primitiveFailed. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
98 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
99 |
"Created: / 02-10-2011 / 18:05:26 / Jan Kurs <kursjan@fit.cvut.cz>" |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
100 |
! ! |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
101 |
|
17868 | 102 |
!PolymorphicInlineCache class methodsFor:'documentation'! |
103 |
||
104 |
version_SVN |
|
17879
4ed4eb60a67e
__ilcBind is called directly from Lookup.st - smoke tested only
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17877
diff
changeset
|
105 |
^ '$Id: PolymorphicInlineCache.st 10712 2011-10-04 21:59:41Z kursjan $' |
17868 | 106 |
! ! |