ExecutableFunction.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 22369 6510a4f3fbd9
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     1
"
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1994 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 131
diff changeset
     3
	      All Rights Reserved
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     4
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1eba5946aea2 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    11
"
5459
684192d793bd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5284
diff changeset
    12
"{ Package: 'stx:libbasic' }"
684192d793bd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5284
diff changeset
    13
18944
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    14
"{ NameSpace: Smalltalk }"
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    15
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    16
Object subclass:#ExecutableFunction
1180
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    17
	instanceVariableNames:'code*'
7602
d048f13cd50a Exception classes initialize themself.
Stefan Vogel <sv@exept.de>
parents: 7257
diff changeset
    18
	classVariableNames:''
1180
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    19
	poolDictionaries:''
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    20
	category:'Kernel-Methods'
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    21
!
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    22
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    23
!ExecutableFunction class methodsFor:'documentation'!
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    24
88
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    25
copyright
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    26
"
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    27
 COPYRIGHT (c) 1994 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 131
diff changeset
    28
	      All Rights Reserved
88
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    29
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    30
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    31
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    33
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    34
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    35
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    36
"
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    37
!
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    38
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    39
documentation
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    40
"
88
81dacba7a63a *** empty log message ***
claus
parents: 84
diff changeset
    41
    This is an abstract class, to merge common attributes of all kinds of
357
claus
parents: 345
diff changeset
    42
    executable code objects; i.e. non-ST functions, Blocks and Methods
claus
parents: 345
diff changeset
    43
    and whatever there might be in the future.
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    44
2244
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    45
    Instances of ExecutableCode are not meant to be created by user code -
20956
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
    46
    the compilers create instances of subclasses, such as Method & Block
2244
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    47
    (the VM would not even know what to do with such an instance, and triggered
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    48
     and exception, if ever encountered during block/method execution).
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    49
1254
48c2748b5197 commentary
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    50
1669
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1293
diff changeset
    51
    NOTICE: layout known by runtime system and compiler - do not change
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1293
diff changeset
    52
1254
48c2748b5197 commentary
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    53
1293
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    54
    [Instance variables:]
225
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    55
      code        <not_an_object>   the function pointer to the machine code.
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    56
				    Not accessible from smalltalk code.
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    57
				    (notice the '*' in the instVarNames definition)
225
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    58
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    59
1293
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    60
    [Class variables:]
225
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    61
      ExecutionErrorSignal          parent of all execution errors
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    62
				    (not raised itself)
225
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    63
7c8e57cc5b13 commenting
claus
parents: 159
diff changeset
    64
      InvalidCodeSignal             codeObject is not executable
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    65
1293
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    66
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    67
    [author:]
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    68
	Claus Gittinger
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    69
"
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    70
! !
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    71
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    72
!ExecutableFunction class methodsFor:'queries'!
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    73
18944
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    74
isAbstract
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    75
    ^ self == ExecutableFunction
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    76
!
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
    77
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    78
isBuiltInClass
1264
8d916aa63bce commentary
Claus Gittinger <cg@exept.de>
parents: 1254
diff changeset
    79
    "return true if this class is known by the run-time-system.
8d916aa63bce commentary
Claus Gittinger <cg@exept.de>
parents: 1254
diff changeset
    80
     Here, true is returned for myself, false for subclasses."
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    81
2244
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    82
    ^ self == ExecutableFunction
1180
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    83
2244
20ca280cad60 commentary
Claus Gittinger <cg@exept.de>
parents: 1871
diff changeset
    84
    "Modified: 23.1.1997 / 13:47:58 / cg"
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    85
! !
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    86
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    87
!ExecutableFunction methodsFor:'accessing'!
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    88
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    89
code
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    90
    "return the code field. This is not an object but the address of the machine instructions.
20511
a23fe67b2d89 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 19330
diff changeset
    91
     Therefore an externalAddress representing the code-address is returned"
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    92
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    93
%{  /* NOCONTEXT */
2870
2939917c5119 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2667
diff changeset
    94
    unsigned INT addr;
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
    95
1133
961f2b095c22 underline cleanup
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
    96
    if (__INST(code_) != nil) {
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    97
3421
78a276e71115 present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents: 3193
diff changeset
    98
#ifdef OLD
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
    99
	// returned an integer in very old versions.
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   100
	addr = (unsigned INT)__INST(code_);
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   101
	if (addr <= _MAX_INT) {
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   102
	    RETURN ( __mkSmallInteger(addr) );
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   103
	}
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   104
	RETURN ( __MKUINT(addr));
3421
78a276e71115 present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents: 3193
diff changeset
   105
#endif
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   106
	RETURN (__MKEXTERNALADDRESS(__INST(code_)));
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   107
    }
328
claus
parents: 326
diff changeset
   108
%}.
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   109
    ^ nil
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   110
!
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   111
22369
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   112
getCode
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   113
    "return the code field. This is not an object but the address of the machine instructions.
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   114
     Therefore an externalAddress representing the code-address is returned"
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   115
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   116
    ^ self code
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   117
!
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   118
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   119
instVarAt:index
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   120
    "have to catch instVar access to code - since its no object"
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   121
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   122
    (index == 1) ifTrue:[^ self code].
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   123
    ^ super instVarAt:index
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   124
!
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   125
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   126
instVarAt:index put:value
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   127
    "have to catch instVar access to code - since its no object"
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   128
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   129
    (index == 1) ifTrue:[^ self code:value].
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   130
    ^ super instVarAt:index put:value
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   131
! !
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   132
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   133
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   134
!ExecutableFunction methodsFor:'error handling'!
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   135
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   136
invalidCode
1871
d6e2d0570fa8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
   137
    "{ Pragma: +optSpace }"
d6e2d0570fa8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
   138
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   139
    "this error is triggered by the interpreter when something is wrong
107
f3e3e2dad7fd *** empty log message ***
claus
parents: 92
diff changeset
   140
     with the code object (any error not handled by Method-signals).
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   141
     In this case, the VM sends this to the bad method/block (the receiver).
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   142
     Can only happen when the Compiler/runtime system is broken or
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   143
     someone played around."
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   144
7602
d048f13cd50a Exception classes initialize themself.
Stefan Vogel <sv@exept.de>
parents: 7257
diff changeset
   145
    ^ InvalidCodeError raise.
1871
d6e2d0570fa8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
   146
d6e2d0570fa8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
   147
    "Modified: 4.11.1996 / 22:47:21 / cg"
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   148
! !
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   149
357
claus
parents: 345
diff changeset
   150
!ExecutableFunction methodsFor:'printing & storing'!
claus
parents: 345
diff changeset
   151
claus
parents: 345
diff changeset
   152
printOn:aStream
1254
48c2748b5197 commentary
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
   153
    "append a printed representation of the receiver to aStream"
48c2748b5197 commentary
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
   154
357
claus
parents: 345
diff changeset
   155
    |addr|
claus
parents: 345
diff changeset
   156
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   157
    addr := self getCode.
357
claus
parents: 345
diff changeset
   158
    addr isNil ifTrue:[^ super printOn:aStream].
claus
parents: 345
diff changeset
   159
3193
6eaf01d47d81 Use #nextPut to put a char
Stefan Vogel <sv@exept.de>
parents: 2880
diff changeset
   160
    aStream nextPutAll:self class name; nextPutAll:'(address: 0x'.
9260
44978d675f85 oops - address print fixed
Claus Gittinger <cg@exept.de>
parents: 8913
diff changeset
   161
    addr address printOn:aStream base:16.
3193
6eaf01d47d81 Use #nextPut to put a char
Stefan Vogel <sv@exept.de>
parents: 2880
diff changeset
   162
    aStream nextPut:$)
1254
48c2748b5197 commentary
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
   163
3193
6eaf01d47d81 Use #nextPut to put a char
Stefan Vogel <sv@exept.de>
parents: 2880
diff changeset
   164
    "Modified: / 22.4.1996 / 16:36:05 / cg"
6eaf01d47d81 Use #nextPut to put a char
Stefan Vogel <sv@exept.de>
parents: 2880
diff changeset
   165
    "Modified: / 20.1.1998 / 14:10:46 / stefan"
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   166
!
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   167
5284
37c436edfa71 printStringForBrowser
Claus Gittinger <cg@exept.de>
parents: 4977
diff changeset
   168
printStringForBrowserWithSelector:selector inClass:aClass
37c436edfa71 printStringForBrowser
Claus Gittinger <cg@exept.de>
parents: 4977
diff changeset
   169
    "return a printString to represent myself to the user in a browser."
37c436edfa71 printStringForBrowser
Claus Gittinger <cg@exept.de>
parents: 4977
diff changeset
   170
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   171
    ^ selector
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   172
357
claus
parents: 345
diff changeset
   173
! !
claus
parents: 345
diff changeset
   174
7257
b9f0fb923c72 method category rename
Claus Gittinger <cg@exept.de>
parents: 7150
diff changeset
   175
!ExecutableFunction methodsFor:'private-accessing'!
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   176
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   177
code:anAddress
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   178
    "set the code field - DANGER ALERT.
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   179
     This is not an object but the address of the machine instructions.
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   180
     Therefore the argument must be an integer representing this address.
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   181
     You can crash Smalltalk very badly when playing around here ...
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   182
     This method is for compiler support and very special cases (debugging) only
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   183
     - do not use"
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   184
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   185
%{  /* NOCONTEXT */
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   186
3421
78a276e71115 present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents: 3193
diff changeset
   187
    if (__isExternalAddress(anAddress)) {
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   188
	__INST(code_) = (OBJ)(__externalAddressVal(anAddress));
3421
78a276e71115 present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents: 3193
diff changeset
   189
    } else {
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   190
	if (__isSmallInteger(anAddress))
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   191
	    __INST(code_) = (OBJ)(__intVal(anAddress));
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   192
	else {
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   193
	    if (anAddress == nil) {
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   194
		__INST(code_) = nil;
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   195
	    } else {
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   196
		__INST(code_) = (OBJ)(__longIntVal(anAddress));
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   197
	    }
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   198
	}
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   199
    }
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   200
%}
9394
f085cd1af3e4 +invalidate
ca
parents: 9260
diff changeset
   201
!
f085cd1af3e4 +invalidate
ca
parents: 9260
diff changeset
   202
f085cd1af3e4 +invalidate
ca
parents: 9260
diff changeset
   203
invalidate
f085cd1af3e4 +invalidate
ca
parents: 9260
diff changeset
   204
    self code:0
84
1eba5946aea2 Initial revision
claus
parents:
diff changeset
   205
! !
623
6795a71e39d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   206
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   207
!ExecutableFunction methodsFor:'queries'!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   208
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   209
category
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   210
    "return the category of this codeObject.
20956
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   211
     Return nil here, to allow alien codeObjects to be handled by the browsers."
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   212
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   213
    ^ nil
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   214
20956
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   215
    "Created: / 16-04-1996 / 16:31:15 / cg"
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   216
    "Modified (comment): / 12-11-2016 / 11:46:00 / cg"
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   217
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   218
16270
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   219
hasCanvasResource
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   220
    "Return true, if this method is an canvas-resource method, false otherwise.
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   221
     This is done by looking for a #canvas key in the method's resources."
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   222
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   223
    ^ self hasResource:#canvas
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   224
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   225
    "Modified (comment): / 20-03-2014 / 16:58:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   226
!
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   227
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   228
hasCode
5459
684192d793bd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5284
diff changeset
   229
    "return true, if this codeObject has machinecode to execute."
19330
ecda55e8c18a #FEATURE
Claus Gittinger <cg@exept.de>
parents: 19111
diff changeset
   230
ecda55e8c18a #FEATURE
Claus Gittinger <cg@exept.de>
parents: 19111
diff changeset
   231
%{  /* NOCONTEXT */
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   232
    if (__INST(code_)) {
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   233
	RETURN (true);
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   234
    }
19330
ecda55e8c18a #FEATURE
Claus Gittinger <cg@exept.de>
parents: 19111
diff changeset
   235
    RETURN (false);
5459
684192d793bd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5284
diff changeset
   236
%}.
684192d793bd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5284
diff changeset
   237
    ^ false
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   238
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   239
    "Created: / 13.11.1998 / 23:13:29 / cg"
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   240
!
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   241
16270
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   242
hasImageResource
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   243
    "return true, if this method is an image-resource method.
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   244
     This is done by looking for a #image key in the method's resources."
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   245
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   246
    ^ self hasResource:#image
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   247
!
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   248
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   249
hasMenuResource
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   250
    "return true, if this method is a menu-resource method.
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   251
     This is done by looking for a #image key in the method's resources."
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   252
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   253
    ^ self hasResource:#menu
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   254
!
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   255
5534
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   256
hasResource
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   257
    "return true, if this codeObject has a resource (false here - only real methods have)."
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   258
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   259
    ^ false
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   260
!
bf00d9a2dfd5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
   261
16270
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   262
hasResource:aSymbol
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   263
    "return true if the method has a <resource> definition for aSymbol."
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   264
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   265
    ^ self hasResource and:[ (self resources ? #()) includesKey:aSymbol ]
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   266
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   267
    "
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   268
     Method allInstancesDo:[:m |
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   269
	(m hasResource:#image) ifTrue:[self halt]
16270
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   270
     ].
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   271
    "
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   272
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   273
    "Modified: / 01-12-2010 / 13:59:58 / cg"
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   274
!
2b544a163c71 Moved hasResource, has(Image|Canvas|Menu)Resource to ExecutableFunction.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16263
diff changeset
   275
2532
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   276
isBreakpointed
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   277
    "return true, if this is a wrapper method for a breakpoint.
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   278
     False is returned here - this method is redefined in WrappedMethod"
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   279
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   280
    ^ false
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   281
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   282
    "Created: 7.4.1997 / 17:24:40 / cg"
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   283
!
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   284
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   285
isExecutable
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   286
    "return true, if this codeObject is executable."
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   287
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   288
    self isInvalid ifTrue:[^ false].
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   289
    ^ self hasCode
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   290
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   291
    "Created: / 16.4.1996 / 20:13:32 / cg"
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   292
    "Modified: / 13.11.1998 / 23:16:32 / cg"
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   293
!
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   294
12898
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   295
isInstrumented
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   296
    "return true, if this is an instrumented method.
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   297
     False is returned here - this method is redefined in InstrumentedMethod"
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   298
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   299
    ^ false
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   300
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   301
    "Created: / 27-04-2010 / 12:26:05 / cg"
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   302
!
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   303
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   304
isInvalid
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   305
    "return true, if this codeObject is invalidated.
20956
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   306
     Return false here, to allow alien codeObjects to be handled by the browsers."
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   307
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   308
    ^ false
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   309
20956
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   310
    "Created: / 16-04-1996 / 16:31:42 / cg"
d8ed7f775615 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20797
diff changeset
   311
    "Modified (comment): / 12-11-2016 / 11:46:07 / cg"
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   312
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   313
3924
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   314
isJavaMethod
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   315
    ^ false
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   316
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   317
    "Created: / 10.11.1998 / 18:26:44 / cg"
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   318
!
48aee282d627 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
   319
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   320
isLazyMethod
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   321
    "return true, if this is a lazy method.
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   322
     False is returned here - this method is redefined in LazyMethod"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   323
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   324
    ^ false
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   325
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   326
    "Created: 16.4.1996 / 16:32:11 / cg"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   327
    "Modified: 16.4.1996 / 16:32:36 / cg"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   328
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   329
5936
97baccca8c8e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5904
diff changeset
   330
isObsolete
97baccca8c8e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5904
diff changeset
   331
    ^ false
97baccca8c8e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5904
diff changeset
   332
!
97baccca8c8e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5904
diff changeset
   333
2536
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   334
isTimed
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   335
    "return true, if this is a wrapper method for a time measurement.
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   336
     False is returned here - this method is redefined in WrappedMethod"
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   337
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   338
    ^ false
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   339
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   340
    "Created: 11.4.1997 / 17:06:32 / cg"
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   341
!
41f4c3159f6b #isTimed query
Claus Gittinger <cg@exept.de>
parents: 2532
diff changeset
   342
2532
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   343
isTraced
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   344
    "return true, if this is a wrapper method for a trace point.
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   345
     False is returned here - this method is redefined in WrappedMethod"
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   346
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   347
    ^ false
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   348
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   349
    "Created: 7.4.1997 / 17:24:50 / cg"
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   350
!
e555281237f1 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   351
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   352
isUnloaded
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   353
    "return true, if the objects machine code has been unloaded
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   354
     from the system (i.e. it is not executable)."
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   355
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   356
    ^ self hasCode not
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   357
3932
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   358
    "Created: / 16.4.1996 / 20:15:52 / cg"
bbfde2a0eef1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3924
diff changeset
   359
    "Modified: / 13.11.1998 / 23:19:52 / cg"
1195
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   360
!
618e2cf3fb56 moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
   361
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   362
isWrapped
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   363
    "return true, if this is a wrapper method.
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   364
     False is returned here - this method is redefined in WrappedMethod"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   365
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   366
    ^ false
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   367
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   368
    "Created: 16.4.1996 / 16:33:24 / cg"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   369
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   370
5904
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   371
messagesSent
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   372
    ^ #()       "/ actually: unknown here in this abstract class
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   373
!
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   374
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   375
messagesSentToSelf
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   376
    ^ #()       "/ actually: unknown here in this abstract class
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   377
!
5198e81b5669 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
   378
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   379
privacy
22369
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   380
    "return a symbol describing the method's access rights (privacy);
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   381
     Currently, this is one of #private, #protected, #public or #ignored.
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   382
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   383
     Here we unconditionally return #public, to allow alien code objects
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   384
     to be handled by the browsers."
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   385
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   386
    ^ #public
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   387
22369
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   388
    "Created: / 16-04-1996 / 16:35:18 / cg"
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   389
    "Modified (comment): / 21-11-2017 / 13:01:32 / cg"
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   390
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   391
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   392
referencesGlobal:aGlobalSymbol
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   393
    "return true, if this method references the global
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   394
     bound to aGlobalSymbol.
20797
7c5592a95e76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20511
diff changeset
   395
     Return false (we don't know) here, to allow alien code objects to be
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   396
     handled by the browsers."
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   397
8464
e9f4d3766157 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7602
diff changeset
   398
    ^ false
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   399
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   400
    "Created: 16.4.1996 / 16:37:48 / cg"
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   401
!
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   402
4977
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   403
referencesGlobalMatching:aMatchPattern
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   404
    "return true, if this method references a global
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   405
     whose name matches aMatchPattern.
20797
7c5592a95e76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20511
diff changeset
   406
     Return false (we don't know) here, to allow alien code objects to be
4977
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   407
     handled by the browsers."
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   408
8464
e9f4d3766157 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7602
diff changeset
   409
    ^ false
4977
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   410
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   411
    "Created: / 9.11.1999 / 16:58:48 / cg"
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   412
!
17a819360ad5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3932
diff changeset
   413
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   414
referencesLiteral:aLiteral
5537
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   415
    "return true, if this executable references the literal directly (i.e. a flat search).
20797
7c5592a95e76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20511
diff changeset
   416
     Return false (we don't know) here, to allow alien code objects to be
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   417
     handled by the browsers."
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   418
8464
e9f4d3766157 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7602
diff changeset
   419
    ^ false
5537
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   420
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   421
    "Modified: / 18.8.2000 / 21:18:43 / cg"
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   422
!
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   423
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   424
refersToLiteral:aLiteral
5537
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   425
    "return true, if this executable references the literal directly or indirectly (i.e. a deep search).
16263
881e5090c287 class: ExecutableFunction
Claus Gittinger <cg@exept.de>
parents: 14257
diff changeset
   426
     Return false (we don't know) here, to allow alien code objects to be
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   427
     handled by the browsers."
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   428
8464
e9f4d3766157 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7602
diff changeset
   429
    ^ false
5537
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   430
05d01dd462f6 comments
Claus Gittinger <cg@exept.de>
parents: 5534
diff changeset
   431
    "Modified: / 18.8.2000 / 21:18:03 / cg"
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   432
!
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   433
14257
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   434
refersToLiteralMatching:aMatchPattern
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   435
    "return true if the receiver or recursively any array element in the
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   436
     receiver is symbolic and matches aMatchPattern (i.e. a deep search).
20797
7c5592a95e76 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20511
diff changeset
   437
     Return false (we don't know) here, to allow alien code objects to be
14257
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   438
     handled by the browsers."
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   439
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   440
    ^ false
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   441
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   442
    "Modified: / 18-08-2000 / 21:18:03 / cg"
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   443
    "Created: / 26-07-2012 / 15:38:26 / cg"
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   444
!
b971b4b2318a added: #refersToLiteralMatching:
Claus Gittinger <cg@exept.de>
parents: 12898
diff changeset
   445
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   446
resources
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   447
    ^ nil
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   448
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   449
    "Created: / 3.11.1997 / 09:09:01 / cg"
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   450
!
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   451
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   452
sends:aSelectorSymbol
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   453
    <resource: #obsolete>
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   454
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   455
    "return true, if this code object contains a message-send with aSelectorSymbol as selector.
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   456
     - due to the simple check in the literal array, also simple uses
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   457
       of aSelectorSymbol as symbol will return true.
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   458
       Should ask compiler, if there is really a send."
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   459
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   460
    self obsoleteFeatureWarning:'please use #sendsSelector:'.
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   461
    ^ self sendsSelector:aSelectorSymbol
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   462
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   463
    "Created: / 16-04-1996 / 16:35:53 / cg"
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   464
    "Modified: / 05-02-2017 / 01:21:26 / cg"
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   465
!
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   466
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   467
sendsAny:aCollectionOfSelectorSymbols
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   468
    <resource: #obsolete>
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   469
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   470
    "return true, if this method contains a message-send
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   471
     to any of aCollectionOfSelectorSymbols."
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   472
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   473
    self obsoleteFeatureWarning:'please use #sendsAnySelector:'.
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   474
    ^ self sendsAnySelector:aCollectionOfSelectorSymbols
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   475
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   476
    "Created: / 08-08-2011 / 18:53:24 / cg"
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   477
    "Modified: / 05-02-2017 / 01:31:22 / cg"
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   478
!
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   479
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   480
sendsAnySelector:aCollectionOfSelectorSymbols
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   481
    "return true, if this method contains a message-send
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   482
     to any of aCollectionOfSelectorSymbols."
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   483
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   484
    (aCollectionOfSelectorSymbols contains:[:sym | self referencesLiteral:sym]) ifTrue:[
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   485
	^ true.
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   486
    ].
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   487
    ^ false
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   488
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   489
    "Created: / 05-02-2017 / 01:27:11 / cg"
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   490
!
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   491
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   492
sendsSelector:aSelectorSymbol
21623
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   493
    "return true, if this code object contains a message-send with aSelectorSymbol as selector.
0fd2de531f9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21340
diff changeset
   494
     - due to the simple check in the literal array, also simple uses
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   495
       of aSelectorSymbol as symbol will return true.
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   496
       Should ask compiler, if there is really a send."
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   497
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   498
    ^ self referencesLiteral:aSelectorSymbol
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   499
21340
df3769bd1417 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 20956
diff changeset
   500
    "Created: / 05-02-2017 / 01:19:03 / cg"
5533
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   501
!
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   502
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   503
usedGlobals
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   504
    "return a collection with the global names referred to by the receiver.
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   505
     Uses Parser to parse methods source and extract them."
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   506
3bc865a859cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5459
diff changeset
   507
    ^ #()
1190
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   508
! !
4ad1c8d6d94d moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
   509
1180
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   510
!ExecutableFunction class methodsFor:'documentation'!
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   511
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   512
version
18944
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
   513
    ^ '$Header$'
12898
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   514
!
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   515
1801994138bd added: #isInstrumented
Claus Gittinger <cg@exept.de>
parents: 9650
diff changeset
   516
version_CVS
18944
c8a1f76e1c16 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16270
diff changeset
   517
    ^ '$Header$'
1180
7f4a68385ac7 only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   518
! !
22369
6510a4f3fbd9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21623
diff changeset
   519