author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 02 Oct 2011 17:42:05 +0100 | |
branch | jv |
changeset 17875 | 76b088500bd1 |
parent 17872 | 55a6f54e36ff |
child 17876 | 874a323bb674 |
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 |
|
17872
55a6f54e36ff
New parameter added to PolymorhicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17868
diff
changeset
|
29 |
instanceVariableNames:'address argSize' |
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> |
|
73 |
||
74 |
[instance variables:] |
|
75 |
address <ExternalAddress> a pointer to the VM inline cache structure. |
|
76 |
if the adress is NULL, then PolymorphicInlineCache |
|
77 |
is invalid. |
|
17872
55a6f54e36ff
New parameter added to PolymorhicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17868
diff
changeset
|
78 |
argSize <SmallInt> is a number of arguments |
17868 | 79 |
[class variables:] |
80 |
||
81 |
[see also:] |
|
82 |
||
83 |
" |
|
84 |
! ! |
|
85 |
||
17875
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
86 |
!PolymorphicInlineCache methodsFor:'* uncategorized *'! |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
87 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
88 |
bind: aMethod to: initialSearchClass |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
89 |
| selector | |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
90 |
selector := aMethod selector. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
91 |
%{ |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
92 |
inlineCachePtr pIlc; |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
93 |
OBJ srch; |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
94 |
OBJFUNC code; |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
95 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
96 |
pIlc = __externalAddressVal(__INST(xyz)); |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
97 |
srch = initialSearchClass; |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
98 |
code = __MethodInstrPtr(aMethod)->m_code; |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
99 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
100 |
__poly_enter(pIlc, srch, code, __SEND0ADDR__, selector); |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
101 |
RETURN(1); |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
102 |
%}. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
103 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
104 |
self primitiveFailed. |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
105 |
|
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
106 |
"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
|
107 |
! ! |
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
108 |
|
17868 | 109 |
!PolymorphicInlineCache class methodsFor:'documentation'! |
110 |
||
111 |
version_SVN |
|
17875
76b088500bd1
First (unchecked) try for bind:to: method in PolymorphicInlineCache
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17872
diff
changeset
|
112 |
^ '$Id: PolymorphicInlineCache.st 10707 2011-10-02 16:42:05Z kursjan $' |
17868 | 113 |
! ! |