This file is indexed.

/usr/share/gnu-smalltalk/kernel/SysDict.st is in gnu-smalltalk-common 3.2.4-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
"======================================================================
|
|   SystemDictionary Method Definitions
|
|
 ======================================================================"

"======================================================================
|
| Copyright 1988,89,90,91,92,94,95,99,2000,2001,2002,2006,2008,2009
| Free Software Foundation, Inc.
| Written by Steve Byrne.
|
| This file is part of the GNU Smalltalk class library.
|
| The GNU Smalltalk class library is free software; you can redistribute it
| and/or modify it under the terms of the GNU Lesser General Public License
| as published by the Free Software Foundation; either version 2.1, or (at
| your option) any later version.
| 
| The GNU Smalltalk class library is distributed in the hope that it will be
| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
| General Public License for more details.
| 
| You should have received a copy of the GNU Lesser General Public License
| along with the GNU Smalltalk class library; see the file COPYING.LIB.
| If not, write to the Free Software Foundation, 59 Temple Place - Suite
| 330, Boston, MA 02110-1301, USA.  
|
 ======================================================================"



RootNamespace subclass: SystemDictionary [
    
    <shape: #pointer>
    <category: 'Language-Implementation'>
    <comment: 'I am a special namespace. I only have one instance, called "Smalltalk",
which is known to the Smalltalk interpreter.  I define
several methods that are "system" related, such as #quitPrimitive.
My instance also helps keep track of dependencies between objects.'>

    SystemDictionary class >> initialize [
	"Create the kernel's private namespace."
	<category: 'initialization'>
	Smalltalk addSubspace: #Kernel.
	Smalltalk addFeature: #Kernel.
	KernelInitialized := true
    ]

    basicBacktrace [
	"Prints the method invocation stack backtrace, as an aid to debugging"

	<category: 'builtins'>
	<primitive: VMpr_SystemDictionary_backtrace>
	self primitiveFailed
    ]

    backtrace [
	"Print a backtrace on the Transcript."

	"This replaces the primitive in builtins.st"

	<category: 'miscellaneous'>
	thisContext parentContext backtrace
    ]

    getTraceFlag: anIndex [
	"Private - Returns a boolean value which is one of the interpreter's
	 tracing flags"

	<category: 'builtins'>
	<primitive: VMpr_SystemDictionary_getTraceFlag>
	self primitiveFailed
    ]

    setTraceFlag: anIndex to: aBoolean [
	"Private - Sets the value of one of the interpreter's tracing flags
	 (indicated by 'anIndex') to the value aBoolean."

	<category: 'builtins'>
	<primitive: VMpr_SystemDictionary_setTraceFlag>
	self primitiveFailed
    ]

    byteCodeCounter [
	"Answer the number of bytecodes executed by the VM"

	<category: 'builtins'>
	<primitive: VMpr_SystemDictionary_byteCodeCounter>
	
    ]

    debug [
	"This methods provides a way to break in the VM code.  Set a breakpoint
	 in _gst_debug and call this method near the point where you think
	 the bug happens."

	<category: 'builtins'>
	<primitive: VMpr_SystemDictionary_debug>
	
    ]

    executionTrace [
	"Answer whether executed bytecodes are printed on stdout"

	<category: 'builtins'>
	^self getTraceFlag: 1
    ]

    executionTrace: aBoolean [
	"Set whether executed bytecodes are printed on stdout"

	<category: 'builtins'>
	^self setTraceFlag: 1 to: aBoolean
    ]

    declarationTrace [
	"Answer whether compiled bytecodes are printed on stdout"

	<category: 'builtins'>
	^self getTraceFlag: 0
    ]

    declarationTrace: aBoolean [
	"Set whether compiled bytecodes are printed on stdout"

	<category: 'builtins'>
	^self setTraceFlag: 0 to: aBoolean
    ]

    verboseTrace [
	"Answer whether execution tracing prints the object on the stack top"

	<category: 'builtins'>
	^self getTraceFlag: 2
    ]

    verboseTrace: aBoolean [
	"Set whether execution tracing prints the object on the stack top"

	<category: 'builtins'>
	^self setTraceFlag: 2 to: aBoolean
    ]

    hash [
	"Smalltalk usually contains a reference to itself, avoid infinite
	 loops"

	<category: 'basic'>
	^self identityHash
    ]

    halt [
	"Interrupt interpreter"

	<category: 'basic'>
	thisContext environment continue: nil
    ]

    printOn: aStream in: aNamespace [
	"Store Smalltalk code compiling to the receiver"

	<category: 'printing'>
	aStream nextPutAll: 'Smalltalk'
    ]

    nameIn: aNamespace [
	<category: 'printing'>
	^'Smalltalk'
    ]

    storeOn: aStream [
	"Store Smalltalk code compiling to the receiver"

	<category: 'printing'>
	aStream nextPutAll: 'Smalltalk'
    ]

    arguments [
	"Return the command line arguments after the -a switch"

	<category: 'miscellaneous'>
	self getArgc > 0 ifFalse: [^#()].
	^(1 to: self getArgc) collect: [:i | self getArgv: i]
    ]

    hostSystem [
	"Answer the triplet corresponding to the system for which GNU
	 Smalltalk was built."

	<category: 'miscellaneous'>
	^CSymbols.HostSystem
    ]

    hasFeatures: features [
	"Returns true if the feature or features in 'features' is one of the
	 implementation dependent features present"

	<category: 'special accessing'>
	(features isKindOf: String) 
	    ifTrue: [^Features includes: features asSymbol]
	    ifFalse: 
		[features 
		    do: [:feature | (Features includes: feature asSymbol) ifTrue: [^true]].
		^false]
    ]

    addFeature: aFeature [
	"Add the aFeature feature to the Features set"

	<category: 'special accessing'>
	Features class == Set ifFalse: [Features := Features asSet].
	Features add: aFeature asSymbol
    ]

    removeFeature: aFeature [
	"Remove the aFeature feature to the Features set"

	<category: 'special accessing'>
	Features class == Set ifFalse: [Features := Features asSet].
	Features remove: aFeature ifAbsent: []
    ]

    version [
	"Answer the current version of the GNU Smalltalk environment"

	<category: 'special accessing'>
	^Version
    ]

    imageLocal [
	"Answer whether the kernel directory is a subdirectory of the image
	 directory (non-local image) or not."

	<category: 'testing'>
	^Directory kernel parent ~= Directory image
    ]

    isSmalltalk [
	<category: 'testing'>
	^true
    ]

    rawProfile: anIdentityDictionary [
	"Set the raw profile to be anIdentityDictionary and return the
         old one."

	<category: 'profiling'>
	<primitive: VMpr_SystemDictionary_rawProfile>
    ]
]