VariableNode.st
author Claus Gittinger <cg@exept.de>
Sun, 26 Sep 1999 13:12:37 +0200
changeset 980 1818e8c13e2a
parent 965 5f893e013e73
child 1035 8848672cb893
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     1
"
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1994 by Claus Gittinger
53
c5dd7abf8431 *** empty log message ***
claus
parents: 31
diff changeset
     3
	      All Rights Reserved
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     4
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    11
"
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    12
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    13
PrimaryNode subclass:#VariableNode
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    14
	instanceVariableNames:'name token index block'
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    15
	classVariableNames:''
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    16
	poolDictionaries:''
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    17
	category:'System-Compiler-Support'
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    18
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    19
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    20
!VariableNode class methodsFor:'documentation'!
20
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    21
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    22
copyright
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    23
"
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    24
 COPYRIGHT (c) 1994 by Claus Gittinger
53
c5dd7abf8431 *** empty log message ***
claus
parents: 31
diff changeset
    25
	      All Rights Reserved
20
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    26
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    27
 This software is furnished under a license and may be used
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    28
 only in accordance with the terms of that license and with the
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    30
 be provided or otherwise made available to, or used by, any
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    31
 other person.  No title to or ownership of the software is
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    32
 hereby transferred.
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    33
"
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    34
!
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    35
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    36
documentation
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    37
"
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    38
    node for parse-trees, representing variables
261
0372e948ca2d commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    39
    This is a helper class for the compiler.
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    40
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    41
    [author:]
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    42
        Claus Gittinger
20
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    43
"
f8dd8ba75205 *** empty log message ***
claus
parents: 14
diff changeset
    44
! !
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    45
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    46
!VariableNode class methodsFor:'instance creation'!
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    47
98
claus
parents: 53
diff changeset
    48
type:t class:class name:n
claus
parents: 53
diff changeset
    49
    ^ (self basicNew) type:t class:class name:n
claus
parents: 53
diff changeset
    50
!
claus
parents: 53
diff changeset
    51
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
    52
type:t context:aContext
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
    53
    ^ (self basicNew) type:t context:aContext
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    54
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    55
    "Created: / 17.1.1998 / 04:00:35 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    56
!
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    57
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
    58
type:t holder:holder name:n
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
    59
    ^ (self basicNew) type:t holder:holder name:n
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
    60
!
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
    61
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    62
type:t name:n
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    63
    ^ (self basicNew) type:t name:n
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    64
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    65
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
    66
type:t name:n context:aContext index:i
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
    67
    ^ (self basicNew) type:t name:n context:aContext index:i
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    68
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    69
    "Created: / 17.1.1998 / 02:40:32 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    70
!
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
    71
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    72
type:t name:n index:i selfClass:s
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    73
    ^ (self basicNew) type:t name:n index:i selfClass:s
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    74
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    75
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    76
type:t name:n index:i selfValue:s
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    77
    ^ (self basicNew) type:t name:n index:i selfValue:s
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    78
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    79
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    80
type:t name:n token:tok index:i
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    81
    ^ (self basicNew) type:t name:n token:tok index:i
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    82
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    83
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
    84
type:t name:n token:tok index:i block:b from:codeBlock
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
    85
    ^ (self basicNew) type:t name:n token:tok index:i block:b from:codeBlock
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    86
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
    87
    "Modified: 2.7.1997 / 10:55:48 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    88
! !
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    89
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    90
!VariableNode methodsFor:'accessing'!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
    91
577
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    92
block
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    93
    ^ block
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    94
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    95
    "Created: 2.7.1997 / 18:53:38 / cg"
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    96
!
efda2402cd70 oops - more fixes
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
    97
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    98
index
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    99
    ^ index
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   100
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   101
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   102
name
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   103
    ^ name
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   104
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   105
875
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   106
token
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   107
    ^ token
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   108
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   109
    "Created: 2.7.1997 / 18:53:38 / cg"
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   110
!
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   111
869
c483b1e6a0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   112
type
c483b1e6a0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   113
    ^ type
c483b1e6a0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   114
!
c483b1e6a0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   115
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   116
type:t class:class name:n
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   117
    type := t.
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   118
    name := n.
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   119
    value := class
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   120
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   121
    "Modified: / 17.1.1998 / 04:03:55 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   122
!
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   123
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   124
type:t context:aContext
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   125
    type := t.
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   126
    value := aContext.
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   127
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   128
    "Modified: / 17.1.1998 / 04:01:55 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   129
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   130
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   131
type:t holder:holder name:n
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   132
    type := t.
875
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   133
    token := holder.
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   134
    name := n
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   135
!
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   136
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   137
type:t name:n
98
claus
parents: 53
diff changeset
   138
    type := t.
claus
parents: 53
diff changeset
   139
    value := nil.
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   140
    name := n
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   141
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   142
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   143
type:t name:n context:aContext index:i
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   144
    type := t.
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   145
    index := i.
642
de97c93c4f49 renamed con to aContext - stc has problems with it.
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   146
    value := aContext.
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   147
    name := n
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   148
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   149
    "Created: / 17.1.1998 / 02:40:55 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   150
    "Modified: / 17.1.1998 / 04:01:21 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   151
!
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   152
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   153
type:t name:n index:i selfClass:s
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   154
    type := t.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   155
    index := i.
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   156
    value := s.
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   157
    name := n
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   158
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   159
    "Modified: / 17.1.1998 / 04:04:04 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   160
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   161
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   162
type:t name:n index:i selfValue:s
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   163
    type := t.
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   164
    index := i.
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   165
    value := s.
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   166
    name := n
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   167
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   168
    "Modified: / 17.1.1998 / 04:02:58 / cg"
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   169
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   170
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   171
type:t name:n token:tok index:i
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   172
    type := t.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   173
    index := i.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   174
    token := tok.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   175
    name := n
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   176
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   177
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   178
type:t name:n token:tok index:i block:variableBlock from:codeBlock
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   179
    type := t.
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   180
    index := i.
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   181
    block := variableBlock.
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   182
    token := tok.
535
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   183
    name := n.
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   184
    (type == #BlockArg) ifTrue:[
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   185
        variableBlock blockArgAccessed:true.
535
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   186
    ].
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   187
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   188
    codeBlock ~~ variableBlock ifTrue:[
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   189
        codeBlock rememberOuterBlockVarAccess:self
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   190
    ]
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   191
574
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   192
    "Created: 2.7.1997 / 10:54:50 / cg"
993d1182782b fixed inlining of blocks where subBlocks
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   193
    "Modified: 2.7.1997 / 11:12:58 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   194
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   195
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   196
type:t token:tok index:i block:b
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   197
    type := t.
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   198
    index := i.
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   199
    block := b.
535
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   200
    token := tok.
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   201
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   202
    (type == #BlockArg) ifTrue:[
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   203
        b blockArgAccessed:true.
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   204
    ].
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   205
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   206
    "Modified: 18.6.1997 / 11:41:05 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   207
! !
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   208
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   209
!VariableNode methodsFor:'code generation'!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   210
104
claus
parents: 103
diff changeset
   211
codeForSideEffectOn:aStream inBlock:b for:aCompiler
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   212
    "no code at all"
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   213
    ^ self
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   214
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   215
843
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   216
codeForSimpleReturnOn:aStream inBlock:b lineNumber:lineNrOrNil for:aCompiler
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   217
    |code|
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   218
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   219
    lineNrOrNil notNil ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   220
        self codeLineNumber:lineNrOrNil on:aStream for:aCompiler
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   221
    ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   222
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   223
    (type == #InstanceVariable) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   224
        (index <= 8) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   225
            code := #( retInstVar1
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   226
                       retInstVar2
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   227
                       retInstVar3
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   228
                       retInstVar4
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   229
                       retInstVar5
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   230
                       retInstVar6
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   231
                       retInstVar7
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   232
                       retInstVar8) at:index.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   233
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   234
            aStream nextPut:code.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   235
            ^ self
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   236
        ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   237
    ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   238
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   239
    (type == #MethodVariable) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   240
        (index <= 6) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   241
            code := #( retMethodVar1
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   242
                       retMethodVar2
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   243
                       retMethodVar3
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   244
                       retMethodVar4
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   245
                       retMethodVar5
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   246
                       retMethodVar6) at:index.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   247
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   248
            aStream nextPut:code.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   249
            ^ self
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   250
        ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   251
    ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   252
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   253
    (type == #MethodArg) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   254
        (index <= 2) ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   255
            code := #(retMethodArg1
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   256
                      retMethodArg2) at:index.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   257
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   258
            aStream nextPut:code.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   259
            ^ self
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   260
        ]
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   261
    ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   262
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   263
    "/ anything else must be pushed, then top rturned
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   264
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   265
    self codeOn:aStream inBlock:b for:aCompiler.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   266
    aStream nextPut:#retTop
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   267
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   268
!
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   269
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   270
codeLoadOn:aStream type:type index:index inBlock:codeBlock for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   271
    |theCode b deltaLevel litIndex specialGlobalIndex
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   272
     bvIdx bvTyp blocksCode selLitIdx |
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   273
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   274
    (type == #MethodArg) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   275
        (index <= 4) ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   276
            aStream nextPut:(#(pushMethodArg1
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   277
                               pushMethodArg2
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   278
                               pushMethodArg3 
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   279
                               pushMethodArg4) at:index).
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   280
            ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   281
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   282
        aStream nextPut:#pushMethodArg; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   283
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   284
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   285
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   286
    (type == #MethodVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   287
        (index <= 6) ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   288
            aStream nextPut:(#(pushMethodVar1
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   289
                               pushMethodVar2
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   290
                               pushMethodVar3
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   291
                               pushMethodVar4
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   292
                               pushMethodVar5
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   293
                               pushMethodVar6) at:index).
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   294
            ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   295
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   296
        aStream nextPut:#pushMethodVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   297
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   298
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   299
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   300
    (type == #InstanceVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   301
        (index <= 10) ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   302
            theCode := #(pushInstVar1 pushInstVar2 pushInstVar3
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   303
                         pushInstVar4 pushInstVar5 pushInstVar6
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   304
                         pushInstVar7 pushInstVar8 pushInstVar9
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   305
                         pushInstVar10) at:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   306
            aStream nextPut:theCode.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   307
            ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   308
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   309
        aStream nextPut:#pushInstVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   310
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   311
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   312
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   313
    ((type == #BlockArg) 
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   314
    or:[type == #BlockVariable]) ifTrue:[
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   315
        "/ compiling for codeBlock; accessing variable in block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   316
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   317
        bvIdx := index.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   318
        bvTyp := type.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   319
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   320
        "/ find the context where that variable is contained physically
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   321
        blocksCode := block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   322
        [blocksCode notNil and:[blocksCode isInlineBlock]] whileTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   323
            blocksCode := blocksCode home
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   324
        ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   325
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   326
        "/ find deltaLevel from code-context to the containing block
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   327
        b := codeBlock.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   328
        deltaLevel := 0.
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   329
        [b notNil and:[b ~~ blocksCode]] whileTrue:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   330
            b isInlineBlock ifFalse:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   331
                deltaLevel := deltaLevel + 1
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   332
            ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   333
            b := b home
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   334
        ].
535
713142116e40 remember access to blockArgs
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
   335
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   336
        b isNil ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   337
            codeBlock isNil ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   338
                "/ a var of a block which is inlined in the method. 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   339
                "/ Generate a pushMVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   340
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   341
                bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   342
                type == #BlockVariable ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   343
                    bvIdx := bvIdx + block numArgs
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   344
                ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   345
                ^ self 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   346
                    codeLoadOn:aStream
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   347
                    type:#MethodVariable
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   348
                    index:bvIdx
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   349
                    inBlock:codeBlock
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   350
                    for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   351
            ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   352
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   353
            "/ a var of a block which is inlined in the outer block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   354
            "/ Generate a pushBVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   355
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   356
            bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   357
            type == #BlockVariable ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   358
                bvIdx := bvIdx + block numArgs
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   359
            ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   360
            bvTyp := #BlockVariable.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   361
        ] ifFalse:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   362
            block isInlineBlock ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   363
                "/ a var of a block which is inlined in another block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   364
                "/ Generate a pushBVAR / pushOuterBVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   365
                bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   366
                type == #BlockVariable ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   367
                    bvIdx := bvIdx + block numArgs
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   368
                ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   369
                bvTyp := #BlockVariable.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   370
            ]
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   371
        ].
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   372
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   373
        (bvTyp == #BlockVariable) ifTrue:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   374
            (deltaLevel == 0) ifTrue:[
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   375
                bvIdx <= 3 ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   376
                    aStream nextPut:(#(pushBlockVar1 pushBlockVar2 pushBlockVar3) at:bvIdx).
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   377
                    ^ self
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   378
                ].
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   379
                aStream nextPut:#pushBlockVar.
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   380
            ] ifFalse:[
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   381
                aStream nextPut:#pushOuterBlockVar; nextPut:deltaLevel.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   382
            ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   383
        ] ifFalse:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   384
            (deltaLevel == 0) ifTrue:[
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   385
                (bvIdx <= 4) ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   386
                    aStream nextPut:(#(pushBlockArg1 pushBlockArg2 pushBlockArg3
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   387
                                       pushBlockArg4) at:bvIdx).
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   388
                    ^ self
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   389
                ].
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   390
                aStream nextPut:#pushBlockArg.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   391
            ] ifFalse:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   392
                (deltaLevel == 1) ifTrue:[
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   393
                    aStream nextPut:#pushOuter1BlockArg
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   394
                ] ifFalse:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   395
                    (deltaLevel == 2) ifTrue:[
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   396
                        aStream nextPut:#pushOuter2BlockArg
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   397
                    ] ifFalse:[
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   398
                        aStream nextPut:#pushOuterBlockArg; nextPut:deltaLevel
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   399
                    ]
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   400
                ].
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   401
            ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   402
        ].
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   403
        aStream nextPut:bvIdx.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   404
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   405
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   406
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   407
    (type == #GlobalVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   408
        litIndex := aCompiler addLiteral:name asSymbol.
531
1d037c37e5a2 code cleanup
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
   409
        specialGlobalIndex := aCompiler specialGlobalCodeFor:name.
1d037c37e5a2 code cleanup
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
   410
        specialGlobalIndex notNil ifTrue:[
1d037c37e5a2 code cleanup
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
   411
            aStream nextPut:#pushSpecialGlobal; nextPut:specialGlobalIndex.
243
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   412
            ^ self
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   413
        ].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   414
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   415
        litIndex < 256 ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   416
            aStream nextPut:#pushGlobalS; nextPut:litIndex
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   417
        ] ifFalse:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   418
            aStream nextPut:#pushGlobalL; nextPut:litIndex; nextPut:0
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   419
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   420
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   421
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   422
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   423
    (type == #ClassVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   424
        litIndex := aCompiler addLiteral:(value name , ':' , name) asSymbol.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   425
        litIndex < 256 ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   426
            aStream nextPut:#pushClassVarS; nextPut:litIndex
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   427
        ] ifFalse:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   428
            aStream nextPut:#pushClassVarL; nextPut:litIndex; nextPut:0
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   429
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   430
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   431
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   432
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   433
    (type == #PrivateClass) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   434
        litIndex := aCompiler addLiteral:(value name , '::' , name) asSymbol.
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   435
        litIndex < 256 ifTrue:[
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   436
            aStream nextPut:#pushGlobalS; nextPut:litIndex
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   437
        ] ifFalse:[
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   438
            aStream nextPut:#pushGlobalL; nextPut:litIndex; nextPut:0
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   439
        ].
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   440
        ^ self
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   441
    ].
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   442
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   443
    (type == #ClassInstanceVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   444
        aStream nextPut:#pushClassInstVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   445
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   446
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   447
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   448
    (type == #ThisContext) ifTrue:[
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   449
        aStream nextPut:#pushThisContext. 
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   450
        ^ self
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   451
    ].
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   452
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   453
    (type == #WorkspaceVariable) ifTrue:[
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   454
        "/ this is done by keeping the valueHolder in the literalArray,
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   455
        "/ and coding a #value message here.
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   456
875
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   457
        litIndex := aCompiler addLiteral:token.
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   458
        aStream nextPut:#pushLitS; nextPut:litIndex.
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   459
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   460
        selLitIdx := aCompiler addLiteral:#value.
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   461
        selLitIdx <= 255 ifTrue:[
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   462
            aStream nextPut:#send0; nextPut:("lineNr ?" 1); nextPut:selLitIdx.
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   463
        ] ifFalse:[
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   464
            aStream nextPut:#sendL; nextPut:("lineNr ?" 1); nextPut:selLitIdx; nextPut:0; nextPut:1 "nargs".
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   465
        ].
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   466
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   467
    ].
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   468
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   469
    "not reached"
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   470
    self halt:'bad type'.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   471
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   472
    "Created: / 25.6.1997 / 16:14:17 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   473
    "Modified: / 17.1.1998 / 04:04:17 / cg"
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   474
!
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   475
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   476
codeOn:aStream inBlock:codeBlock for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   477
    self
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   478
        codeLoadOn:aStream type:type index:index inBlock:codeBlock for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   479
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   480
    "Modified: 26.6.1997 / 10:06:10 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   481
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   482
104
claus
parents: 103
diff changeset
   483
codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   484
    self
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   485
        codeStoreOn:aStream type:type index:index
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   486
        inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   487
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   488
    "Modified: 25.6.1997 / 16:15:28 / cg"
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   489
!
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   490
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   491
codeStoreOn:aStream type:type index:index inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   492
    |theCode b deltaLevel litIndex bvIdx blocksCode|
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   493
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   494
    valueNeeded ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   495
        aStream nextPut:#dup
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   496
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   497
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   498
    (type == #MethodVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   499
        (index <= 6) ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   500
            theCode := #(storeMethodVar1 storeMethodVar2
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   501
                         storeMethodVar3 storeMethodVar4
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   502
                         storeMethodVar5 storeMethodVar6) at:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   503
            aStream nextPut:theCode.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   504
            ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   505
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   506
        aStream nextPut:#storeMethodVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   507
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   508
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   509
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   510
    (type == #InstanceVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   511
        (index <= 10) ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   512
            theCode := #(storeInstVar1 storeInstVar2
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   513
                         storeInstVar3 storeInstVar4
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   514
                         storeInstVar5 storeInstVar6
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   515
                         storeInstVar7 storeInstVar8
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   516
                         storeInstVar9 storeInstVar10) at:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   517
            aStream nextPut:theCode.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   518
            ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   519
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   520
        aStream nextPut:#storeInstVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   521
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   522
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   523
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   524
    (type == #BlockVariable) ifTrue:[
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   525
        bvIdx := index.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   526
        
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   527
        "/ find the context where that variable is contained physically
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   528
        blocksCode := block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   529
        [blocksCode notNil and:[blocksCode isInlineBlock]] whileTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   530
            blocksCode := blocksCode home
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   531
        ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   532
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   533
        "find deltaLevel to block, where variable was defined"
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   534
        b := codeBlock.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   535
        deltaLevel := 0.
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   536
        [b notNil and:[b ~~ blocksCode]] whileTrue:[
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   537
            b isInlineBlock ifFalse:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   538
                deltaLevel := deltaLevel + 1
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   539
            ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   540
            b := b home
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   541
        ].
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   542
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   543
        b isNil ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   544
            codeBlock isNil ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   545
                "/ a block which is inlined in the method. 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   546
                "/ Generate a pushMVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   547
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   548
                bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   549
                bvIdx := bvIdx + block numArgs.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   550
                ^ self
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   551
                    codeStoreOn:aStream 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   552
                    type:#MethodVariable index:bvIdx 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   553
                    inBlock:codeBlock 
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   554
                    valueNeeded:false       "/ already dupped if value is needed
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   555
                    for:aCompiler
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   556
            ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   557
            "/ a var of a block which is inlined in the outer block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   558
            "/ Generate a pushBVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   560
            bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   561
            bvIdx := bvIdx + block numArgs.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   562
        ] ifFalse:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   563
            block isInlineBlock ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   564
                "/ a var of a block which is inlined in another block.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   565
                "/ Generate a pushBVAR / pushOuterBVAR
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   566
                bvIdx := block indexOfFirstTemp + index - 1.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   567
                bvIdx := bvIdx + block numArgs.
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   568
            ]
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   569
        ].
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   570
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   571
        (deltaLevel == 0) ifTrue:[
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   572
            bvIdx <= 3 ifTrue:[
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   573
                aStream nextPut:(#(storeBlockVar1 storeBlockVar2 storeBlockVar3) at:bvIdx).
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   574
                ^ self
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   575
            ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   576
            aStream nextPut:#storeBlockVar
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   577
        ] ifFalse:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   578
            aStream nextPut:#storeOuterBlockVar; nextPut:deltaLevel
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   579
        ].
559
42cf4afd99b3 inline blocks withs args
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   580
        aStream nextPut:bvIdx.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   581
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   582
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   583
117
claus
parents: 106
diff changeset
   584
    (type == #GlobalVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   585
        litIndex := aCompiler addLiteral:name asSymbol.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   586
        litIndex < 256 ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   587
            aStream nextPut:#storeGlobalS; nextPut:litIndex
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   588
        ] ifFalse:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   589
            aStream nextPut:#storeGlobalL; nextPut:litIndex; nextPut:0
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   590
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   591
        ^ self
117
claus
parents: 106
diff changeset
   592
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   593
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   594
    (type == #ClassVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   595
        litIndex := aCompiler addLiteral:(value name , ':' , name) asSymbol.
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   596
        litIndex < 256 ifTrue:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   597
            aStream nextPut:#storeClassVarS; nextPut:litIndex
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   598
        ] ifFalse:[
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   599
            aStream nextPut:#storeClassVarL; nextPut:litIndex; nextPut:0
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   600
        ].
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   601
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   602
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   603
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   604
    (type == #ClassInstanceVariable) ifTrue:[
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   605
        aStream nextPut:#storeClassInstVar; nextPut:index.
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   606
        ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   607
    ].
554
d5e548c4d49d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 539
diff changeset
   608
106
claus
parents: 104
diff changeset
   609
    "not reached"
941
0ae34d664798 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   610
    self error:'bad assignment'
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   611
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   612
    "Created: / 25.6.1997 / 16:14:40 / cg"
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   613
    "Modified: / 17.1.1998 / 04:04:23 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   614
! !
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   615
539
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   616
!VariableNode methodsFor:'enumeration'!
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   617
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   618
nodeDo:anEnumerator
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   619
    "helper for parse tree walking"
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   620
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   621
    ^ anEnumerator doVariable:self name:name
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   622
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   623
    "Created: 19.6.1997 / 16:41:35 / cg"
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   624
! !
69a1cd05c7d6 added node-walk facility (ST80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
   625
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   626
!VariableNode methodsFor:'evaluating'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   627
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   628
evaluate
980
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   629
    |nameSym|
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   630
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   631
    (type == #ContextVariable) ifTrue:[
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   632
        ^ value at:index
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   633
    ].
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   634
    (type == #MethodVariable
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   635
    or:[type == #BlockArg
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   636
    or:[type == #BlockVariable]]) ifTrue:[
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   637
        ^ token variableValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   638
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   639
    (type == #InstanceVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   640
        ^ value instVarAt:index
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   641
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   642
    (type == #GlobalVariable) ifTrue:[
980
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   643
        nameSym := name asSymbolIfInterned.
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   644
        nameSym notNil ifTrue:[
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   645
            (Smalltalk includesKey:nameSym) ifTrue:[
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   646
                ^ Smalltalk at:name
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   647
            ]
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   648
        ].
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   649
"
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   650
        self error:('global ' , name , ' is undefined').
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   651
"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   652
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   653
        ^ UndefinedVariable name:name.
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   654
        ^ nil
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   655
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   656
    (type == #ClassVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   657
        ^ Smalltalk at:(value name , ':' , name) asSymbol
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   658
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   659
    (type == #ClassInstanceVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   660
        ^ value instVarAt:index
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   661
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   662
    (type == #ThisContext) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   663
        value notNil ifTrue:[
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   664
            ^ value
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   665
        ].
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   666
        ^ thisContext
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   667
    ].
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   668
    (type == #PrivateClass) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   669
        ^ value privateClassesAt:name asSymbol
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   670
    ].
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   671
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   672
    "/ synthetic; for evaluation only
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   673
    (type == #EvaluationContextLocal) ifTrue:[
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   674
        ^ token variableValue
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   675
    ].
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   676
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   677
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   678
    "not reached"
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   679
    self halt:'internal error - bad variable type:' , type.
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   680
    ^ value
420
ad567fb4e732 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
   681
980
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   682
    "Modified: / 26.9.1999 / 13:04:42 / cg"
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   683
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   684
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   685
store:aValue
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   686
    (type == #ContextVariable) ifTrue:[
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   687
        value at:index put:aValue. ^ aValue
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   688
    ].
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   689
    (type == #MethodVariable
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   690
    or:[type == #BlockVariable]) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   691
        token value:aValue. ^ aValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   692
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   693
    (type == #InstanceVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   694
        ^ value instVarAt:index put:aValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   695
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   696
    (type == #GlobalVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   697
        ^ Smalltalk at:name put:aValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   698
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   699
    (type == #ClassVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   700
        ^ Smalltalk at:(value name , ':' , name) asSymbol put:aValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   701
    ].
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   702
    (type == #ClassInstanceVariable) ifTrue:[
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   703
        ^ value instVarAt:index put:aValue
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   704
    ].
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   705
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   706
    "/ synthetic; for evaluation only
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   707
    (type == #EvaluationContextLocal) ifTrue:[
875
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   708
        token value:aValue. ^ aValue
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   709
    ].
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   710
    (type == #WorkspaceVariable) ifTrue:[
2561654973eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 872
diff changeset
   711
        token value:aValue. ^ aValue
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   712
    ].
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   713
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   714
    "not reached"
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   715
    self halt:'internal error - bad variable type:' , type.
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   716
    ^ aValue
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   717
719
9ccbae6ba13e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
   718
    "Modified: / 16.5.1998 / 18:35:03 / cg"
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   719
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   720
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   721
!VariableNode methodsFor:'printing'!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   722
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   723
displayString
612
2748896a66c8 comments
Claus Gittinger <cg@exept.de>
parents: 577
diff changeset
   724
    "return a string for display in inspectors etc."
2748896a66c8 comments
Claus Gittinger <cg@exept.de>
parents: 577
diff changeset
   725
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   726
    ^ 'InterpreterVariable(' , self printString , ')'
612
2748896a66c8 comments
Claus Gittinger <cg@exept.de>
parents: 577
diff changeset
   727
2748896a66c8 comments
Claus Gittinger <cg@exept.de>
parents: 577
diff changeset
   728
    "Modified: 20.9.1997 / 11:42:07 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   729
!
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   730
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   731
printOn:aStream indent:i
98
claus
parents: 53
diff changeset
   732
641
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   733
    "/ actually only a debug-check
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   734
    (
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   735
    type == #ContextVariable              
e18daf10662c added support for context-vars (for evaluation in the debuggers code-frame)
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   736
    or:[type == #MethodArg            
98
claus
parents: 53
diff changeset
   737
    or:[type == #MethodVariable
claus
parents: 53
diff changeset
   738
    or:[type == #InstanceVariable
claus
parents: 53
diff changeset
   739
    or:[type == #BlockArg
claus
parents: 53
diff changeset
   740
    or:[type == #GlobalVariable
claus
parents: 53
diff changeset
   741
    or:[type == #ClassVariable
claus
parents: 53
diff changeset
   742
    or:[type == #BlockVariable
465
67e5205a81cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   743
    or:[type == #PrivateClass
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   744
    or:[type == #WorkspaceVariable
720
6b3d43ba7273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 719
diff changeset
   745
    or:[type == #EvaluationContextLocal
872
7cf38a8125e6 support for workspace variables.
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   746
    or:[type == #ClassInstanceVariable]]]]]]]]]]]) ifTrue:[
465
67e5205a81cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   747
        aStream nextPutAll:name. ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   748
    ].
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   749
    (type == #ThisContext) ifTrue:[
465
67e5205a81cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   750
        aStream nextPutAll:'thisContext'. ^ self
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   751
    ].
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   752
    "not reached"
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   753
    self halt:'bad type'.
465
67e5205a81cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   754
720
6b3d43ba7273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 719
diff changeset
   755
    "Modified: / 17.5.1998 / 00:17:12 / cg"
14
f08ffd9958a5 Initial revision
claus
parents:
diff changeset
   756
! !
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   757
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   758
!VariableNode methodsFor:'queries'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   759
243
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   760
canReuseAsArg:anotherNode
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   761
    anotherNode isVariable ifTrue:[
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   762
        anotherNode type ~~ type ifTrue:[^ false].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   763
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   764
        (type == #ThisContext) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   765
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   766
        index notNil ifTrue:[
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   767
            anotherNode index ~~ index ifTrue:[^ false].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   768
        ].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   769
        (type == #MethodArg) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   770
        (type == #MethodVariable) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   771
        (type == #InstanceVariable) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   772
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   773
        name notNil ifTrue:[
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   774
            anotherNode name ~~ name ifTrue:[^ false].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   775
        ].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   776
        (type == #GlobalVariable) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   777
        (type == #ClassVariable) ifTrue:[^ true].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   778
    ].
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   779
    ^ false
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   780
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   781
    "Created: 14.4.1996 / 00:46:18 / cg"
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   782
    "Modified: 14.4.1996 / 00:55:25 / cg"
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   783
!
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   784
566
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   785
isArgument
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   786
    "return true, if this is a node for an argument (block or method)"
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   787
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   788
    ^ (type == #MethodArg) or:[type == #BlockArg]
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   789
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   790
    "Created: 27.6.1997 / 13:07:05 / cg"
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   791
    "Modified: 27.6.1997 / 13:07:19 / cg"
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   792
!
90969df02c85 added #isArgument query
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
   793
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   794
isGlobal
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   795
    "return true, if this is a node for a global variable"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   796
789
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   797
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   798
    ^ (type == #GlobalVariable) 
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   799
      and:[name isSymbol
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   800
      and:[Smalltalk includesKey:name]]
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   801
d9bbb0970239 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 720
diff changeset
   802
    "Modified: / 19.10.1998 / 19:43:04 / cg"
218
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   803
!
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   804
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   805
isLocal
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   806
    "return true, if this is a node for a local (block or method) variable"
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   807
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   808
    ^ (type == #MethodVariable) or:[type == #BlockVariable]
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   809
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   810
    "Created: 1.3.1996 / 00:03:53 / cg"
748b4c509a51 use new BlockVar instructions
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
   811
    "Modified: 1.3.1996 / 00:04:46 / cg"
243
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   812
!
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   813
965
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   814
isUndeclared
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   815
    type == #PrivateClass ifTrue:[
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   816
        ^ (Smalltalk includesKey:(value name , '::' , name) asSymbol) not
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   817
    ].
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   818
    type == #GlobalVariable ifTrue:[
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   819
        ^ (Smalltalk includesKey:name) not
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   820
    ].
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   821
    ^ false
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   822
!
5f893e013e73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   823
243
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   824
isVariable
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   825
    "return true, if this is a node for a variable"
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   826
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   827
    ^ true
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   828
cdc1424ddaac use dup if possible when pushing args / faster access to common globals
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
   829
    "Created: 14.4.1996 / 00:46:32 / cg"
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   830
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   831
360
9b26a5a4da70 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   832
!VariableNode class methodsFor:'documentation'!
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   833
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   834
version
980
1818e8c13e2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
   835
    ^ '$Header: /cvs/stx/stx/libcomp/VariableNode.st,v 1.45 1999-09-26 11:12:37 cg Exp $'
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   836
! !