This document describes the class libraries that are distributed together with the GNU Smalltalk programming language.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
• Base classes: | The class reference | |
• Class index: | Index to the classes in the class reference | |
• Method index: | Index to the method selectors in the class reference | |
• Cross-reference: | Cross-reference between selectors |
Next: Class index, Up: Top [Index]
Alphabetic list: | ||
---|---|---|
• AbstractNamespace: | ||
• AlternativeObjectProxy: | ||
• ArithmeticError: | ||
• Array: | ||
• ArrayedCollection: | ||
• Association: | ||
• Autoload: | ||
• Bag: | ||
• Behavior: | ||
• BindingDictionary: | ||
• BlockClosure: | ||
• BlockContext: | ||
• Boolean: | ||
• ByteArray: | ||
• CAggregate: | ||
• CallinProcess: | ||
• CArray: | ||
• CArrayCType: | ||
• CBoolean: | ||
• CByte: | ||
• CCallable: | ||
• CCallbackDescriptor: | ||
• CChar: | ||
• CCompound: | ||
• CDouble: | ||
• CFloat: | ||
• CFunctionDescriptor: | ||
• Character: | ||
• CharacterArray: | ||
• CInt: | ||
• Class: | ||
• ClassDescription: | ||
• CLong: | ||
• CLongDouble: | ||
• CLongLong: | ||
• CObject: | ||
• Collection: | ||
• CompiledBlock: | ||
• CompiledCode: | ||
• CompiledMethod: | ||
• ContextPart: | ||
• Continuation: | ||
• CPtr: | ||
• CPtrCType: | ||
• CScalar: | ||
• CScalarCType: | ||
• CShort: | ||
• CSmalltalk: | ||
• CString: | ||
• CStringCType: | ||
• CStruct: | ||
• CType: | ||
• CUChar: | ||
• CUInt: | ||
• CULong: | ||
• CULongLong: | ||
• CUnion: | ||
• CUShort: | ||
• Date: | ||
• DateTime: | ||
• DeferredVariableBinding: | ||
• Delay: | ||
• DelayedAdaptor: | ||
• Dictionary: | ||
• DirectedMessage: | ||
• Directory: | ||
• DLD: | ||
• DumperProxy: | ||
• Duration: | ||
• DynamicVariable: | ||
• Error: | ||
• Exception: | ||
• ExceptionSet: | ||
• False: | ||
• File: | ||
• FileDescriptor: | ||
• FilePath: | ||
• FileSegment: | ||
• FileStream: | ||
• Float: | ||
• FloatD: | ||
• FloatE: | ||
• FloatQ: | ||
• Fraction: | ||
• Generator: | ||
• Getopt: | ||
• Halt: | ||
• HashedCollection: | ||
• HomedAssociation: | ||
• IdentityDictionary: | ||
• IdentitySet: | ||
• Integer: | ||
• Interval: | ||
• Iterable: | ||
• LargeArray: | ||
• LargeArrayedCollection: | ||
• LargeByteArray: | ||
• LargeInteger: | ||
• LargeNegativeInteger: | ||
• LargePositiveInteger: | ||
• LargeWordArray: | ||
• LargeZeroInteger: | ||
• Link: | ||
• LinkedList: | ||
• LookupKey: | ||
• LookupTable: | ||
• Magnitude: | ||
• MappedCollection: | ||
• Memory: | ||
• Message: | ||
• MessageNotUnderstood: | ||
• Metaclass: | ||
• MethodContext: | ||
• MethodDictionary: | ||
• MethodInfo: | ||
• Namespace: | ||
• NetClients.URIResolver: | ||
• NetClients.URL: | ||
• Notification: | ||
• NullProxy: | ||
• NullValueHolder: | ||
• Number: | ||
• Object: | ||
• ObjectDumper: | ||
• ObjectMemory: | ||
• OrderedCollection: | ||
• Package: | ||
• PackageLoader: | ||
• Permission: | ||
• PluggableAdaptor: | ||
• PluggableProxy: | ||
• Point: | ||
• PositionableStream: | ||
• Process: | ||
• ProcessEnvironment: | ||
• ProcessorScheduler: | ||
• ProcessVariable: | ||
• Promise: | ||
• Random: | ||
• ReadStream: | ||
• ReadWriteStream: | ||
• Rectangle: | ||
• RecursionLock: | ||
• Regex: | ||
• RegexResults: | ||
• RootNamespace: | ||
• RunArray: | ||
• ScaledDecimal: | ||
• SecurityPolicy: | ||
• Semaphore: | ||
• SequenceableCollection: | ||
• Set: | ||
• SharedQueue: | ||
• SingletonProxy: | ||
• SmallInteger: | ||
• SortedCollection: | ||
• Stream: | ||
• String: | ||
• Symbol: | ||
• SymLink: | ||
• SystemDictionary: | ||
• SystemExceptions.AlreadyDefined: | ||
• SystemExceptions.ArgumentOutOfRange: | ||
• SystemExceptions.BadReturn: | ||
• SystemExceptions.CInterfaceError: | ||
• SystemExceptions.EmptyCollection: | ||
• SystemExceptions.EndOfStream: | ||
• SystemExceptions.FileError: | ||
• SystemExceptions.IndexOutOfRange: | ||
• SystemExceptions.InvalidArgument: | ||
• SystemExceptions.InvalidProcessState: | ||
• SystemExceptions.InvalidSize: | ||
• SystemExceptions.InvalidState: | ||
• SystemExceptions.InvalidValue: | ||
• SystemExceptions.MustBeBoolean: | ||
• SystemExceptions.MutationError: | ||
• SystemExceptions.NoRunnableProcess: | ||
• SystemExceptions.NotEnoughElements: | ||
• SystemExceptions.NotFound: | ||
• SystemExceptions.NotImplemented: | ||
• SystemExceptions.NotIndexable: | ||
• SystemExceptions.NotYetImplemented: | ||
• SystemExceptions.PackageNotAvailable: | ||
• SystemExceptions.PrimitiveFailed: | ||
• SystemExceptions.ProcessBeingTerminated: | ||
• SystemExceptions.ProcessTerminated: | ||
• SystemExceptions.ReadOnlyObject: | ||
• SystemExceptions.SecurityError: | ||
• SystemExceptions.ShouldNotImplement: | ||
• SystemExceptions.SubclassResponsibility: | ||
• SystemExceptions.UnhandledException: | ||
• SystemExceptions.UserInterrupt: | ||
• SystemExceptions.VerificationError: | ||
• SystemExceptions.VMError: | ||
• SystemExceptions.WrongArgumentCount: | ||
• SystemExceptions.WrongClass: | ||
• SystemExceptions.WrongMessageSent: | ||
• TextCollector: | ||
• Time: | ||
• True: | ||
• UndefinedObject: | ||
• UnicodeCharacter: | ||
• UnicodeString: | ||
• ValueAdaptor: | ||
• ValueHolder: | ||
• VariableBinding: | ||
• VersionableObjectProxy: | ||
• VFS.ArchiveFile: | ||
• VFS.ArchiveMember: | ||
• VFS.FileWrapper: | ||
• VFS.StoredZipMember: | ||
• VFS.TmpFileArchiveMember: | ||
• VFS.ZipFile: | ||
• Warning: | ||
• WeakArray: | ||
• WeakIdentitySet: | ||
• WeakKeyDictionary: | ||
• WeakKeyIdentityDictionary: | ||
• WeakSet: | ||
• WeakValueIdentityDictionary: | ||
• WeakValueLookupTable: | ||
• WordArray: | ||
• WriteStream: | ||
• ZeroDivide: | ||
Classes documented in this manual are boldfaced. Autoload Object Behavior ClassDescription Class Metaclass BlockClosure Boolean False True CObject CAggregate CArray CPtr CString CCallable CCallbackDescriptor CFunctionDescriptor CCompound CStruct CUnion CScalar CChar CDouble CFloat CInt CLong CLongDouble CLongLong CShort CSmalltalk CUChar CByte CBoolean CUInt CULong CULongLong CUShort ContextPart BlockContext MethodContext Continuation CType CPtrCType CArrayCType CScalarCType CStringCType Delay Directory DLD DumperProxy AlternativeObjectProxy NullProxy VersionableObjectProxy PluggableProxy SingletonProxy DynamicVariable Exception Error ArithmeticError ZeroDivide MessageNotUnderstood SystemExceptions.InvalidValue SystemExceptions.EmptyCollection SystemExceptions.InvalidArgument SystemExceptions.AlreadyDefined SystemExceptions.ArgumentOutOfRange SystemExceptions.IndexOutOfRange SystemExceptions.InvalidSize SystemExceptions.NotFound SystemExceptions.PackageNotAvailable SystemExceptions.InvalidProcessState SystemExceptions.InvalidState SystemExceptions.NotIndexable SystemExceptions.ProcessTerminated SystemExceptions.ReadOnlyObject SystemExceptions.WrongClass SystemExceptions.MustBeBoolean SystemExceptions.MutationError SystemExceptions.NotEnoughElements SystemExceptions.NotImplemented SystemExceptions.NotYetImplemented SystemExceptions.ShouldNotImplement SystemExceptions.SubclassResponsibility SystemExceptions.WrongMessageSent SystemExceptions.VMError SystemExceptions.BadReturn SystemExceptions.NoRunnableProcess SystemExceptions.PrimitiveFailed SystemExceptions.CInterfaceError SystemExceptions.FileError SystemExceptions.WrongArgumentCount SystemExceptions.SecurityError SystemExceptions.UserInterrupt SystemExceptions.VerificationError Halt Notification SystemExceptions.EndOfStream SystemExceptions.ProcessBeingTerminated Warning SystemExceptions.UnhandledException ExceptionSet FilePath File VFS.ArchiveMember VFS.TmpFileArchiveMember VFS.StoredZipMember VFS.FileWrapper VFS.ArchiveFile VFS.ZipFile FileSegment Getopt Iterable Collection Bag HashedCollection Dictionary BindingDictionary AbstractNamespace Namespace RootNamespace SystemDictionary LookupTable IdentityDictionary MethodDictionary WeakValueLookupTable WeakValueIdentityDictionary WeakKeyDictionary WeakKeyIdentityDictionary Set IdentitySet WeakSet WeakIdentitySet MappedCollection SequenceableCollection ArrayedCollection Array WeakArray ByteArray CharacterArray String Symbol UnicodeString CompiledCode CompiledBlock CompiledMethod Interval LargeArrayedCollection LargeArray LargeByteArray LargeWordArray WordArray LinkedList Semaphore OrderedCollection RunArray SortedCollection Stream FileDescriptor FileStream Generator ObjectDumper PositionableStream ReadStream WriteStream ReadWriteStream Random TextCollector Kernel.PackageInfo Package Link Process CallinProcess SymLink Magnitude Character UnicodeCharacter Date DateTime LookupKey Association HomedAssociation VariableBinding DeferredVariableBinding ProcessVariable Number Float FloatD FloatE FloatQ Fraction Integer LargeInteger LargeNegativeInteger LargePositiveInteger LargeZeroInteger SmallInteger ScaledDecimal Time Duration Memory Message DirectedMessage MethodInfo NetClients.URIResolver NetClients.URL ObjectMemory PackageLoader Permission Point ProcessEnvironment ProcessorScheduler Rectangle RecursionLock Regex RegexResults SecurityPolicy SharedQueue UndefinedObject ValueAdaptor NullValueHolder PluggableAdaptor DelayedAdaptor ValueHolder Promise |
Next: AlternativeObjectProxy, Up: Base classes [Index]
I am a special form of dictionary. Classes hold on an instance of me; it is called their ‘environment’.
• AbstractNamespace class-instance creation: | (class) | |
• AbstractNamespace-accessing: | (instance) | |
• AbstractNamespace-compiling: | (instance) | |
• AbstractNamespace-copying: | (instance) | |
• AbstractNamespace-namespace hierarchy: | (instance) | |
• AbstractNamespace-overrides for superspaces: | (instance) | |
• AbstractNamespace-printing: | (instance) | |
• AbstractNamespace-testing: | (instance) |
Next: AbstractNamespace-accessing, Up: AbstractNamespace [Index]
Disabled - use #new to create instances
Private - Create a new namespace with the given name and parent, and add to the parent a key that references it.
Next: AbstractNamespace-compiling, Previous: AbstractNamespace class-instance creation, Up: AbstractNamespace [Index]
Answer a Dictionary with all of the associations in the receiver and each of its superspaces (duplicate keys are associated to the associations that are deeper in the namespace hierarchy)
Evaluate aBlock once for each class and metaclass in the namespace.
Evaluate aBlock once for each class and metaclass in the namespace.
Evaluate aBlock once for each class in the namespace.
Evaluate aBlock once for each metaclass in the namespace.
Answer the value corrisponding to aKey if it is a class. Fail if either aKey is not found or it is associated to something different from a class.
Answer the value corrisponding to aKey if it is a class. Evaluate aBlock and answer its result if either aKey is not found or it is associated to something different from a class.
Next: AbstractNamespace-copying, Previous: AbstractNamespace-accessing, Up: AbstractNamespace [Index]
Import the given bindings for classes compiled with me as environment.
Import the given bindings for classes compiled with me as environment.
Remove aDictionary from my list of direct pools.
Answer the shared pools (not names) imported for my classes.
Next: AbstractNamespace-namespace hierarchy, Previous: AbstractNamespace-compiling, Up: AbstractNamespace [Index]
Answer an empty copy of the receiver whose size is newSize
Evaluate aBlock with the current namespace set to the receiver. Answer the result of the evaluation.
Next: AbstractNamespace-overrides for superspaces, Previous: AbstractNamespace-copying, Up: AbstractNamespace [Index]
Create a namespace named aSymbol, add it to the receiver’s subspaces, and answer it.
Invokes aBlock once for every association in each of the receiver’s subspaces.
Answer the direct and indirect subspaces of the receiver in a Set
Invokes aBlock for all subspaces, both direct and indirect.
Evaluate aBlock once for each of the receiver’s superspaces
Answer whether the receiver or any of its superspaces include the given class – note that this method (unlike #includesKey:) does not require aString to be interned and (unlike #includesGlobalNamed:) only returns true if the global is a class object.
Answer whether the receiver or any of its superspaces include the given key – note that this method (unlike #includesKey:) does not require aString to be interned but (unlike #includesClassNamed:) returns true even if the global is not a class object.
Remove my subspace named aSymbol from the hierarchy.
Return a Set of subspaces of the receiver satisfying aBlock.
Return a Set of superspaces of the receiver satisfying aBlock.
Answer all the other children of the same namespace as the receiver.
Evaluate aBlock once for each of the other root namespaces, passing the namespace as a parameter.
Answer the receiver’s direct subspaces
Invokes aBlock for all direct subspaces.
Answer the receiver’s superspace.
Set the superspace of the receiver to be ’aNamespace’. Also adds the receiver as a subspace of it.
Answer a Set containing the receiver together with its direct and indirect subspaces
Invokes aBlock for the receiver and all subclasses, both direct and indirect.
Next: AbstractNamespace-printing, Previous: AbstractNamespace-namespace hierarchy, Up: AbstractNamespace [Index]
Answer a Set of all the keys in the receiver and its superspaces
Assign newValue to the variable named as specified by ‘key’. This method won’t define a new variable; instead if the key is not found it will search in superspaces and raising an error if the variable cannot be found in any of the superspaces. Answer newValue.
Assign newValue to the variable named as specified by ‘key’. This method won’t define a new variable; instead if the key is not found it will search in superspaces and evaluate aBlock if it is not found. Answer newValue.
Answer a Bag containing the values of the receiver
Next: AbstractNamespace-testing, Previous: AbstractNamespace-overrides for superspaces, Up: AbstractNamespace [Index]
Answer the receiver’s name
Change the receiver’s name to aSymbol
Answer Smalltalk code compiling to the receiver when the current namespace is aNamespace
Print a representation of the receiver
Store Smalltalk code compiling to the receiver
Previous: AbstractNamespace-printing, Up: AbstractNamespace [Index]
Answer ‘true’.
Answer ‘false’.
Next: ArithmeticError, Previous: AbstractNamespace, Up: Base classes [Index]
I am a proxy that uses the same ObjectDumper to store an object which is not the object to be dumped, but from which the dumped object can be reconstructed. I am an abstract class, using me would result in infinite loops because by default I try to store the same object again and again. See the method comments for more information
• AlternativeObjectProxy class-instance creation: | (class) | |
• AlternativeObjectProxy-accessing: | (instance) |
Next: AlternativeObjectProxy-accessing, Up: AlternativeObjectProxy [Index]
The receiver was asked to be used as a proxy for the class aClass. Answer whether the registration is fine. By default, answer true except if AlternativeObjectProxy itself is being used.
Answer a proxy to be used to save anObject. IMPORTANT: this method MUST be overridden so that the overridden version sends #on: to super passing an object that is NOT the same as anObject (alternatively, you can override #dumpTo:, which is what NullProxy does), because that would result in an infinite loop! This also means that AlternativeObjectProxy must never be used directly – only as a superclass.
Previous: AlternativeObjectProxy class-instance creation, Up: AlternativeObjectProxy [Index]
Reconstruct the object stored in the proxy and answer it. A subclass will usually override this
Set the object to be dumped to theObject. This should not be overridden.
Reconstruct the object stored in the proxy and answer it. This method must not be overridden
Next: Array, Previous: AlternativeObjectProxy, Up: Base classes [Index]
An ArithmeticError exception is raised by numeric classes when a program tries to do something wrong, such as extracting the square root of a negative number.
• ArithmeticError-description: | (instance) |
Up: ArithmeticError [Index]
Answer a textual description of the exception.
Answer true. Arithmetic exceptions are by default resumable.
Next: ArrayedCollection, Previous: ArithmeticError, Up: Base classes [Index]
My instances are objects that have array-like properties: they are directly indexable by integers starting at 1, and they are fixed in size. I inherit object creation behavior messages such as #with:, as well as iteration and general access behavior from SequenceableCollection.
• Array class-instance creation: | (class) | |
• Array-built ins: | (instance) | |
• Array-mutating objects: | (instance) | |
• Array-printing: | (instance) | |
• Array-testing: | (instance) |
Next: Array-built ins, Up: Array [Index]
Answer anArray, which is expected to be an array specified with a brace-syntax expression per my inherited protocol.
Next: Array-mutating objects, Previous: Array class-instance creation, Up: Array [Index]
Answer the index-th indexed instance variable of the receiver
Replace the characters from start to stop with new characters whose ASCII codes are contained in byteArray, starting at the replaceStart location of byteArray
Next: Array-printing, Previous: Array-built ins, Up: Array [Index]
Transform every object in the receiver in each corresponding object in anArray. anArray and the receiver must have the same size
Next: Array-testing, Previous: Array-mutating objects, Up: Array [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Print a representation for the receiver on aStream
Store a Smalltalk literal compiling to the receiver on aStream
Store Smalltalk code compiling to the receiver on aStream
Previous: Array-printing, Up: Array [Index]
Answer ‘true’.
Next: Association, Previous: Array, Up: Base classes [Index]
My instances are objects that are generally fixed size, and are accessed by an integer index. The ordering of my instance’s elements is determined externally; I will not rearrange the order of the elements.
• ArrayedCollection class-instance creation: | (class) | |
• ArrayedCollection-basic: | (instance) | |
• ArrayedCollection-built ins: | (instance) | |
• ArrayedCollection-compiler: | (instance) | |
• ArrayedCollection-copying Collections: | (instance) | |
• ArrayedCollection-enumerating the elements of a collection: | (instance) | |
• ArrayedCollection-sorting: | (instance) | |
• ArrayedCollection-storing: | (instance) | |
• ArrayedCollection-streams: | (instance) |
Next: ArrayedCollection-basic, Up: ArrayedCollection [Index]
Where aCollection is a collection of SequenceableCollections, answer a new instance with all the elements therein, in order.
Where aCollection is a collection of SequenceableCollections, answer a new instance with all the elements therein, in order, each separated by an occurrence of sepCollection.
Answer a collection with the given size, whose elements are all set to anObject
Create a ReadWriteStream on an empty instance of the receiver; pass the stream to aBlock, then retrieve its contents and answer them.
Answer a collection whose only element is element1
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose elements are the same as those in aCollection
Next: ArrayedCollection-built ins, Previous: ArrayedCollection class-instance creation, Up: ArrayedCollection [Index]
Answer a new instance of an ArrayedCollection containing all the elements in the receiver, followed by all the elements in aSequenceableCollection
This method should not be called for instances of this class.
Answer a collection of the same kind returned by #collect:, that only includes the values at the given indices. Fail if any of the values in keyCollection is out of bounds for the receiver.
Answer a new collection containing all the items in the receiver from the start-th and to the stop-th
Answer a new instance of an ArrayedCollection containing all the elements in the receiver, followed by the single item anElement
Answer a copy of the receiver to which all occurrences of oldElement are removed
Next: ArrayedCollection-compiler, Previous: ArrayedCollection-basic, Up: ArrayedCollection [Index]
Answer the size of the receiver
Next: ArrayedCollection-copying Collections, Previous: ArrayedCollection-built ins, Up: ArrayedCollection [Index]
Not commented.
Not commented.
Next: ArrayedCollection-enumerating the elements of a collection, Previous: ArrayedCollection-compiler, Up: ArrayedCollection [Index]
Answer a new collection in which all the sequences matching oldSubCollection are replaced with newSubCollection
Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index ‘start’ to index ‘stop’.
If start < stop, these are replaced by the contents of the replacementCollection. Instead, If start = (stop + 1), like in ‘copyReplaceFrom: 4 to: 3 with: anArray’, then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index ‘start’.
Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index ‘start’ to index ‘stop’.
If start < stop, these are replaced by stop-start+1 copies of anObject. Instead, If start = (stop + 1), then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index ‘start’.
Answer the receivers’ contents in reverse order
Next: ArrayedCollection-sorting, Previous: ArrayedCollection-copying Collections, Up: ArrayedCollection [Index]
Answer a new instance of an ArrayedCollection containing all the results of evaluating aBlock passing each of the receiver’s elements
Answer a new instance of an ArrayedCollection containing all the elements in the receiver which, when passed to aBlock, answer false
Answer a new instance of an ArrayedCollection containing all the elements in the receiver which, when passed to aBlock, answer true
Evaluate aBlock for each pair of elements took respectively from the receiver and from aSequenceableCollection; answer a collection of the same kind of the receiver, made with the block’s return values. Fail if the receiver has not the same size as aSequenceableCollection.
Next: ArrayedCollection-storing, Previous: ArrayedCollection-enumerating the elements of a collection, Up: ArrayedCollection [Index]
Return a copy of the receiver sorted according to the default sort block, which uses #<= to compare items.
Return a copy of the receiver sorted according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one.
Next: ArrayedCollection-streams, Previous: ArrayedCollection-sorting, Up: ArrayedCollection [Index]
Store Smalltalk code compiling to the receiver on aStream
Previous: ArrayedCollection-storing, Up: ArrayedCollection [Index]
Answer a WriteStream streaming on the receiver
Next: Autoload, Previous: ArrayedCollection, Up: Base classes [Index]
My instances represent a mapping between two objects. Typically, my "key" object is a symbol, but I don’t require this. My "value" object has no conventions associated with it; it can be any object at all.
• Association class-basic: | (class) | |
• Association-accessing: | (instance) | |
• Association-finalization: | (instance) | |
• Association-printing: | (instance) | |
• Association-storing: | (instance) | |
• Association-testing: | (instance) |
Next: Association-accessing, Up: Association [Index]
Answer a new association with the given key and value
Next: Association-finalization, Previous: Association class-basic, Up: Association [Index]
Answer nil. This is present to achieve polymorphism with instances of VariableBinding.
Do nothing. This is present to achieve polymorphism with instances of VariableBinding.
Set the association’s key to aKey, and its value to aValue
Answer the association’s value
Set the association’s value to aValue
Next: Association-printing, Previous: Association-accessing, Up: Association [Index]
Finalize the receiver
Next: Association-storing, Previous: Association-finalization, Up: Association [Index]
Put on aStream a representation of the receiver
Next: Association-testing, Previous: Association-printing, Up: Association [Index]
Put on aStream some Smalltalk code compiling to the receiver
Previous: Association-storing, Up: Association [Index]
Answer whether the association’s key and value are the same as anAssociation’s, or false if anAssociation is not an Association. As a special case, identical values are considered equal even if #= returns false (as is the case for NaN floating-point values).
Answer an hash value for the receiver
Next: Bag, Previous: Association, Up: Base classes [Index]
I am not a part of the normal Smalltalk kernel class system. I provide the ability to do late ("on-demand") loading of class definitions. Through me, you can define any class to be loaded when any message is sent to the class itself (such as to create an instance) or to its metaclass (such as #methodsFor: to extend it with class-side methods).
• Autoload class-instance creation: | (class) | |
• Autoload-accessing: | (instance) |
Next: Autoload-accessing, Up: Autoload [Index]
Make Smalltalk automatically load the class named nameSymbol from fileNameString when needed
Make Smalltalk automatically load the class named nameSymbol and residing in aNamespace from fileNameString when needed
Make Smalltalk automatically load the class named nameSymbol and residing in aNamespace. When the class is needed, anObject will be sent #autoload. By default, instances of FilePath and Package can be used.
Make Smalltalk automatically load the class named nameSymbol. When the class is needed, anObject will be sent #autoload. By default, instances of FilePath and Package can be used.
Previous: Autoload class-instance creation, Up: Autoload [Index]
We need it to access the metaclass instance, because that’s what will load the file.
Load the class and resend the message to it
Next: Behavior, Previous: Autoload, Up: Base classes [Index]
My instances are unordered collections of objects. You can think of me as a set with a memory; that is, if the same object is added to me twice, then I will report that that element has been stored twice.
• Bag class-basic: | (class) | |
• Bag-adding: | (instance) | |
• Bag-enumerating the elements of a collection: | (instance) | |
• Bag-extracting items: | (instance) | |
• Bag-printing: | (instance) | |
• Bag-removing: | (instance) | |
• Bag-storing: | (instance) | |
• Bag-testing collections: | (instance) |
Next: Bag-adding, Up: Bag [Index]
Answer a new instance of the receiver
Answer a new instance of the receiver, with space for size distinct objects
Next: Bag-enumerating the elements of a collection, Previous: Bag class-basic, Up: Bag [Index]
Add an occurrence of newObject to the receiver. Answer newObject. Fail if newObject is nil.
If anInteger > 0, add anInteger occurrences of newObject to the receiver. If anInteger < 0, remove them. Answer newObject. Fail if newObject is nil.
Next: Bag-extracting items, Previous: Bag-adding, Up: Bag [Index]
Answer a set with the elements of the receiver
Evaluate the block for all members in the collection.
Next: Bag-printing, Previous: Bag-enumerating the elements of a collection, Up: Bag [Index]
Answer a collection of counts with elements, sorted by decreasing count.
Next: Bag-removing, Previous: Bag-extracting items, Up: Bag [Index]
Put on aStream a representation of the receiver
Next: Bag-storing, Previous: Bag-printing, Up: Bag [Index]
Remove oldObject from the collection and return it. If can’t be found, answer instead the result of evaluationg anExceptionBlock
Next: Bag-testing collections, Previous: Bag-removing, Up: Bag [Index]
Put on aStream some Smalltalk code compiling to the receiver
Previous: Bag-storing, Up: Bag [Index]
Answer whether the receiver and aBag contain the same objects
Answer an hash value for the receiver
Answer whether we include anObject
Answer the number of occurrences of anObject found in the receiver
Answer the total number of objects found in the receiver
Next: BindingDictionary, Previous: Bag, Up: Base classes [Index]
I am the parent class of all "class" type methods. My instances know about the subclass/superclass relationships between classes, contain the description that instances are created from, and hold the method dictionary that’s associated with each class. I provide methods for compiling methods, modifying the class inheritance hierarchy, examining the method dictionary, and iterating over the class hierarchy.
Next: Behavior-accessing instances and variables, Up: Behavior [Index]
Answer the direct and indirect subclasses of the receiver in a Set
Answer all the receiver’s superclasses in a collection
Answer the direct subclasses of the receiver in a Set
Answer the receiver’s superclass (if any, otherwise answer nil)
Answer a Set containing the receiver together with its direct and indirect subclasses
Answer the receiver and all of its superclasses in a collection
Next: Behavior-accessing the method dictionary, Previous: Behavior-accessing class hierarchy, Up: Behavior [Index]
Return all the class variables understood by the receiver
Answer the names of every instance variables the receiver contained in the receiver’s instances
Returns a set of all instances of the receiver
Return the shared pools defined by the class and any of its superclasses, in the correct search order.
Return the names of the shared pools defined by the class and any of its superclasses, in the correct search order.
Answer the class pool dictionary. Since Behavior does not support classes with class variables, we answer an empty one; adding variables to it results in an error.
Answer all the class variables for instances of the receiver
Answer the index of aString in the fixed instance variables of the instances of the receiver, or 0 if the variable is missing.
Answer the index of aString in the fixed instance variables of the instances of the receiver, or 0 if the variable is missing.
Answer an Array containing the instance variables defined by the receiver
Return a count of all the instances of the receiver
Return the names of the shared pools defined by the class
Answer the names of the instance variables the receiver inherited from its superclass
Next: Behavior-built ins, Previous: Behavior-accessing instances and variables, Up: Behavior [Index]
Return the compiled method associated with selector, from the local method dictionary. Error if not found.
Answer a Set of all the selectors understood by the receiver
Return the compiled method associated with selector, from the local method dictionary. Error if not found.
Return the compiled method associated with selector, from the local method dictionary. Evaluate aBlock if not found.
Answer the method source code as a formatted string (if available) for the given selector. Requires package Parser.
Answer a Set of all the compiled method associated with selector. from the local method dictionary and all of the superclasses.
Return the compiled method associated with selector, from the local method dictionary or one of a superclass; return nil if not found.
Answer the parse tree for the given selector, or nil if there was an error. Requires the Parser package to be loaded.
Return selector for the given CompiledMethod
Answer a Set of the receiver’s selectors
Answer source code (if available) for the given selector.
Answer source code (if available) for the given selector.
This is too dependent on the original implementation
Next: Behavior-builtin, Previous: Behavior-accessing the method dictionary, Up: Behavior [Index]
Create a new instance of a class with no indexed instance variables. The instance is guaranteed not to move across garbage collections. Like #basicNew, this method should not be overridden.
Create a new instance of a class with indexed instance variables. The instance has numInstanceVariables indexed instance variables. The instance is guaranteed not to move across garbage collections. Like #basicNew:, this method should not be overridden.
Invalidate the method cache kept by the virtual machine. This message should not need to be called by user programs.
Compile the following code inside the receiver, with the given category, if condition is true; else ignore it
Compile the code, a string or readable stream, with no category. Fail if the code does not obey Smalltalk syntax. Answer the generated CompiledMethod if it does.
Do not send this in user code; use #compile: or related methods instead.
As with #primCompile:, but evaluate aBlock (passing the file name, line number and description of the error) if the code does not obey Smalltalk syntax.
Do not send this in user code; use #compile:ifError: or related methods instead.
Private - Answer the first instance of the receiver in the object table
Next: Behavior-compilation, Previous: Behavior-built ins, Up: Behavior [Index]
Create a new instance of a class with no indexed instance variables; this method must not be overridden.
Create a new instance of a class with indexed instance variables. The instance has numInstanceVariables indexed instance variables; this method must not be overridden.
Create a new instance of a class with no indexed instance variables
Create a new instance of a class with indexed instance variables. The instance has numInstanceVariables indexed instance variables.
Next: Behavior-compilation (alternative), Previous: Behavior-builtin, Up: Behavior [Index]
Answer the dictionary that is used when the receiver is before a period in Smalltalk source code.
Next: Behavior-compiling, Previous: Behavior-compilation, Up: Behavior [Index]
Don’t use this, it’s only present to file in from Smalltalk/V
Don’t use this, it’s only present to file in from Dolphin Smalltalk
Start compiling methods in the receiver if this implementation of Smalltalk has the given features, else skip the section
Don’t use this, it’s only present to file in from Squeak
Don’t use this, it’s only present to file in from IBM Smalltalk
Don’t use this, it’s only present to file in from IBM Smalltalk
Next: Behavior-compiling methods, Previous: Behavior-compilation (alternative), Up: Behavior [Index]
Return the class that will be used to compile the parse nodes into bytecodes.
Next: Behavior-creating a class hierarchy, Previous: Behavior-compiling, Up: Behavior [Index]
Calling this method prepares the parser to receive methods to be compiled and installed in the receiver’s method dictionary. The methods are put in the category identified by the parameter.
Answer a PoolResolution class to be used for resolving pool variables while compiling methods on this class.
Next: Behavior-enumerating, Previous: Behavior-compiling methods, Up: Behavior [Index]
Add aClass asone of the receiver’s subclasses.
Remove aClass from the list of the receiver’s subclasses
Set the receiver’s superclass.
Next: Behavior-evaluating, Previous: Behavior-creating a class hierarchy, Up: Behavior [Index]
Invokes aBlock for all instances of the receiver
Invokes aBlock for all subclasses, both direct and indirect.
Invokes aBlock for all instances of each of the receiver’s subclasses.
Invokes aBlock for all superclasses, both direct and indirect.
Return a Set of subclasses of the receiver satisfying aBlock.
Return a Set of superclasses of the receiver satisfying aBlock.
Invokes aBlock for all direct subclasses.
Invokes aBlock for the receiver and all subclasses, both direct and indirect.
Invokes aBlock for the receiver and all superclasses, both direct and indirect.
Next: Behavior-instance creation, Previous: Behavior-enumerating, Up: Behavior [Index]
Answer the stack top at the end of the evaluation of the code in aString. The code is executed as part of anObject
Answer the stack top at the end of the evaluation of the code in aString. If aString cannot be parsed, evaluate aBlock (see compile:ifError:). The code is executed as part of anObject
Evaluate Smalltalk expression in ’code’ and return result.
Evaluate ’code’. If a parsing error is detected, invoke ’block’
Evaluate Smalltalk expression in ’code’. If a parsing error is encountered, send #error: to requestor
Evaluate Smalltalk expression as part of anObject’s method definition
Evaluate Smalltalk expression as part of anObject’s method definition. This method is used to support Inspector expression evaluation. If a parsing error is encountered, invoke error block, ’block’
Next: Behavior-instance variables, Previous: Behavior-evaluating, Up: Behavior [Index]
Create a new instance of a class without indexed instance variables. The instance is guaranteed not to move across garbage collections. If a subclass overrides #new, the changes will apply to this method too.
Create a new instance of a class with indexed instance variables. The instance has numInstanceVariables indexed instance variables. The instance is guaranteed not to move across garbage collections. If a subclass overrides #new:, the changes will apply to this method too.
Next: Behavior-method dictionary, Previous: Behavior-instance creation, Up: Behavior [Index]
Add the given instance variable to instance of the receiver
Set the instance variables for the receiver to be those in instVarNames
Remove the given instance variable from the receiver and recompile all of the receiver’s subclasses
Next: Behavior-parsing class declarations, Previous: Behavior-instance variables, Up: Behavior [Index]
Add the given compiledMethod to the method dictionary, giving it the passed selector. Answer compiledMethod
Compile method source. If there are parsing errors, answer nil. Else, return a CompiledMethod result of compilation
Compile method source. If there are parsing errors, invoke exception block, ’block’ passing file name, line number and error. Return a CompiledMethod result of compilation
Compile method source. If there are parsing errors, send #error: to the requestor object, else return a CompiledMethod result of compilation
Recompile all selectors in the receiver. Ignore errors.
Recompile all selectors in the receiver. Notify aNotifier by sending #error: messages if something goes wrong.
Recompile all selector of all subclasses. Notify aNotifier by sending #error: messages if something goes wrong.
Recompile all selector of all subclasses. Notify aNotifier by sending #error: messages if something goes wrong.
Create a method accessing the variable ‘what’.
Create a method accessing the variable ‘what’, with a default value of ‘value’, using lazy initialization
Create a method which sets the variable ‘what’.
Decompile the bytecodes for the given selector.
Please lookup the part on the C interface in the manual. This method is deprecated, you should use the asyncCCall:args: attribute.
Please lookup the part on the C interface in the manual. This method is deprecated, you should use the cCall:returning:args: attribute.
Open Emacs to edit the method with the passed selector, then compile it
Answer the receiver’s method dictionary. Don’t modify the method dictionary unless you exactly know what you’re doing
Set the receiver’s method dictionary to aDictionary
Recompile the given selector, answer nil if something goes wrong or the new CompiledMethod if everything’s ok.
Recompile the given selector. If there are parsing errors, send #error: to the aNotifier object, else return a CompiledMethod result of compilation
Remove the given selector from the method dictionary, answer the CompiledMethod attached to that selector
Remove the given selector from the method dictionary, answer the CompiledMethod attached to that selector. If the selector cannot be found, answer the result of evaluating aBlock.
Evaluate aBlock, passing for each evaluation a selector that’s defined in the receiver and the corresponding method.
Next: Behavior-pluggable behavior (not yet implemented), Previous: Behavior-method dictionary, Up: Behavior [Index]
As with #parseVariableString:, but answer symbols that name the variables instead of strings.
Answer an array of instance variable names. aString should specify these in traditional file-in ‘instanceVariableNames’ format. Signal an error if aString contains something other than valid Smalltalk variables.
Next: Behavior-printing hierarchy, Previous: Behavior-parsing class declarations, Up: Behavior [Index]
Answer which class is to be used to debug a chain of contexts which includes the receiver. nil means ’do not debug’; other classes are sent #debuggingPriority and the one with the highest priority is picked.
Answer the class that can be used to decompile methods, or nil if there is none (as is the case now).
Answer the class that can be used to evaluate doits, or nil if there is none (as is the case now).
Answer the class that can be used to parse methods, or nil if there is none (as is the case now).
Next: Behavior-source code, Previous: Behavior-pluggable behavior (not yet implemented), Up: Behavior [Index]
Answer the indent to be used by #printHierarchy - 4 by default
Print my full hierarchy (i.e. all my superclasses and subclasses) on the terminal.
Print my entire subclass hierarchy on the terminal.
Next: Behavior-still unclassified, Previous: Behavior-printing hierarchy, Up: Behavior [Index]
Answer the method source code as a formatted string. Requires package Parser.
Next: Behavior-support for lightweight classes, Previous: Behavior-source code, Up: Behavior [Index]
Answer the shared pools visible from methods in the metaclass, in the correct search order.
Available only when the Parser package is loaded–Answer an RBMethodNode that compiles to my method named by selector.
Update instance variables and instance spec of the class and all its subclasses. variableArray lists the new variables, including inherited ones.
Next: Behavior-testing functionality, Previous: Behavior-still unclassified, Up: Behavior [Index]
Answer an article (‘a’ or ‘an’) which is ok for the receiver’s name
Answer the first superclass that is a full-fledged Class object
Answer the namespace that this class belongs to - the same as the superclass, since Behavior does not support namespaces yet.
Answer the class name; this prints to the name of the superclass enclosed in braces. This class name is used, for example, to print the receiver.
Answer the class name when the class is referenced from aNamespace - a dummy one, since Behavior does not support names.
Answer the class name when the class is referenced from aNamespace - a dummy one, since Behavior does not support names.
Not commented.
This method should not be called for instances of this class.
Next: Behavior-testing the class hierarchy, Previous: Behavior-support for lightweight classes, Up: Behavior [Index]
Answer ‘true’.
Next: Behavior-testing the form of the instances, Previous: Behavior-testing functionality, Up: Behavior [Index]
Returns true if aClass is the receiver or a superclass of the receiver.
Returns true if aClass is a superclass of the receiver
Return a string indicating the type of class the receiver is
Answer the symbolic shape of my instances.
Give the provided shape to the receiver’s instances. The shape can be nil, or one of #byte #int8 #character #short #word #ushort #int #uint #int64 #uint64 #utf32 #float #double or #pointer. In addition, the special value #inherit means to use the shape of the superclass; note however that this is a static setting, and subclasses that used #inherit are not mutated when the superclass adopts a different shape.
Next: Behavior-testing the method dictionary, Previous: Behavior-testing the class hierarchy, Up: Behavior [Index]
Answer how many fixed instance variables are reserved to each of the receiver’s instances
Answer whether my instances’ variables are immediate, non-OOP values.
Answer whether the receiver’s instances have no indexed instance variables
Answer whether x = y implies x == y for instances of the receiver
Answer whether, if x is an instance of the receiver, x copy == x
Answer whether the instance variables of the receiver’s instances are objects
Answer whether the receiver’s instances have indexed instance variables
Previous: Behavior-testing the form of the instances, Up: Behavior [Index]
Returns true if the instances of the receiver understand the given selector
Return whether the receiver has any methods defined
Returns true if the local method dictionary contains the given selector
If methods understood by the receiver’s instances have access to a symbol named ’name’, evaluate aBlock
Answer which class in the receiver’s hierarchy contains the implementation of selector used by instances of the class (nil if none does)
Answer a Set of selectors which access the given instance variable
Answer a Set of selectors which read the given instance variable
Answer a Set of selectors which read the given instance variable
Returns a Set of selectors that refer to anObject
Return the collection of selectors in the class which reference the byte code, aByteCode
Next: BlockClosure, Previous: Behavior, Up: Base classes [Index]
I am a special form of dictionary that provides special ways to access my keys, which typically begin with an uppercase letter; also, my associations are actually VariableBinding instances.
My keys are (expected to be) symbols, so I use == to match searched keys to those in the dictionary – this is done expecting that it brings a bit more speed.
• BindingDictionary-accessing: | (instance) | |
• BindingDictionary-basic & copying: | (instance) | |
• BindingDictionary-copying: | (instance) | |
• BindingDictionary-forward declarations: | (instance) | |
• BindingDictionary-printing: | (instance) | |
• BindingDictionary-testing: | (instance) |
Next: BindingDictionary-basic & copying, Up: BindingDictionary [Index]
Define aSymbol as equal to nil inside the receiver. Fail if such a variable already exists (use #at:put: if you don’t want to fail)
Try to map unary selectors to read accesses to the Namespace, and one-argument keyword selectors to write accesses. Note that: a) this works only if the selector has an uppercase first letter; and b) ‘aNamespace Variable: value’ is the same as ‘aNamespace set: #Variable to: value’, not the same as ‘aNamespace at: #Variable put: value’ — the latter always refers to the current namespace, while the former won’t define a new variable, instead searching in superspaces (and raising an error if the variable cannot be found).
Answer the environment to which the receiver is connected. This can be the class for a dictionary that holds class variables, or the super-namespace. In general it is used to compute the receiver’s name.
Set the environment to which the receiver is connected. This can be the class for a dictionary that holds class variables, or the super-namespace. In general it is used to compute the receiver’s name.
Add to the receiver the symbol aSymbol, associated to the same value as in aNamespace. Fail if aNamespace does not contain the given key.
Answer the receiver’s name, which by default is the same as the name of the receiver’s environment.
Answer the receiver’s name when referred to from aNamespace; by default the computation is deferred to the receiver’s environment.
Next: BindingDictionary-copying, Previous: BindingDictionary-accessing, Up: BindingDictionary [Index]
Answer whether the receiver is equal to arg. The equality test is by default the same as that for equal objects. = must not fail; answer false if the receiver cannot be compared to arg
Answer an hash value for the receiver. This is the same as the object’s #identityHash.
Next: BindingDictionary-forward declarations, Previous: BindingDictionary-basic & copying, Up: BindingDictionary [Index]
Answer the receiver.
Answer an empty copy of the receiver whose size is newSize
Answer an empty copy of the receiver which is filled in to compute the result of #collect:
Answer an empty copy of the receiver which is filled in to compute the result of #collect:
Answer the receiver.
Answer the receiver.
Next: BindingDictionary-printing, Previous: BindingDictionary-copying, Up: BindingDictionary [Index]
Store value as associated to the given key. If any, recycle Associations temporarily stored by the compiler inside the ‘Undeclared’ dictionary.
Next: BindingDictionary-testing, Previous: BindingDictionary-forward declarations, Up: BindingDictionary [Index]
Print the receiver’s name when referred to from aNamespace; by default the computation is deferred to the receiver’s environment.
Previous: BindingDictionary-printing, Up: BindingDictionary [Index]
Answer ‘IdentityDictionary’.
Next: BlockContext, Previous: BindingDictionary, Up: Base classes [Index]
I am a factotum class. My instances represent Smalltalk blocks, portions of executeable code that have access to the environment that they were declared in, take parameters, and can be passed around as objects to be executed by methods outside the current class. Block closures are sent a message to compute their value and create a new execution context; this property can be used in the construction of control flow methods. They also provide some methods that are used in the creation of Processes from blocks.
• BlockClosure class-instance creation: | (class) | |
• BlockClosure class-testing: | (class) | |
• BlockClosure-accessing: | (instance) | |
• BlockClosure-built ins: | (instance) | |
• BlockClosure-control structures: | (instance) | |
• BlockClosure-exception handling: | (instance) | |
• BlockClosure-multiple process: | (instance) | |
• BlockClosure-overriding: | (instance) | |
• BlockClosure-testing: | (instance) | |
• BlockClosure-unwind protection: | (instance) |
Next: BlockClosure class-testing, Up: BlockClosure [Index]
Answer a BlockClosure that activates the passed CompiledBlock.
Answer a BlockClosure that activates the passed CompiledBlock with the given receiver.
Answer a BlockClosure that activates the passed CompiledBlock with the given receiver.
Answer a BlockClosure for a new CompiledBlock that is created using the passed parameters. To make it work, you must put the BlockClosure into a CompiledMethod’s literals.
Next: BlockClosure-accessing, Previous: BlockClosure class-instance creation, Up: BlockClosure [Index]
Answer whether, if x is an instance of the receiver, x copy == x
Next: BlockClosure-built ins, Previous: BlockClosure class-testing, Up: BlockClosure [Index]
Answer the number of arguments passed to the receiver
Answer the CompiledBlock which contains the receiver’s bytecodes
Set the CompiledBlock which contains the receiver’s bytecodes
Answer the last instruction that can be executed by the receiver
This should fix the values of the temporary variables used in the block that are ordinarily shared with the method in which the block is defined. Not defined yet, but it is not harmful that it isn’t. Answer the receiver.
Answer the initial instruction pointer into the receiver.
Answer the CompiledMethod in which the receiver lies
Answer the number of arguments passed to the receiver
Answer the number of temporary variables used by the receiver
Answer the method/block context which is the immediate outer of the receiver
Set the method/block context which is the immediate outer of the receiver
Answer the object that is used as ‘self’ when executing the receiver (if nil, it might mean that the receiver is not valid though...)
Set the object that is used as ‘self’ when executing the receiver
Answer the number of stack slots needed for the receiver
Next: BlockClosure-control structures, Previous: BlockClosure-accessing, Up: BlockClosure [Index]
Evaluate the receiver, passing arg1 as the only parameter if the receiver has parameters.
Evaluate the receiver, passing arg1 and arg2 as parameters if the receiver accepts them.
Evaluate the receiver, passing arg1, arg2 and arg3 as parameters if the receiver accepts them.
Evaluate the receiver passing no parameters
Evaluate the receiver passing arg1 as the only parameter
Evaluate the receiver passing arg1 and arg2 as the parameters
Evaluate the receiver passing arg1, arg2 and arg3 as the parameters
Evaluate the receiver passing argArray’s elements as the parameters
Next: BlockClosure-exception handling, Previous: BlockClosure-built ins, Up: BlockClosure [Index]
Evaluate the receiver ’forever’ (actually until a return is executed or the process is terminated).
Evaluate the receiver until it returns true
Evaluate the receiver. If it returns false, evaluate aBlock and restart
Evaluate the receiver until it returns false
Evaluate the receiver. If it returns true, evaluate aBlock and restart
Next: BlockClosure-multiple process, Previous: BlockClosure-control structures, Up: BlockClosure [Index]
Evaluate the receiver; when #error: is called, pass to aBlock the receiver and the parameter, and answer the result of evaluating aBlock. If another exception is raised, it is passed to an outer handler; if no exception is raised, the result of evaluating the receiver is returned.
Evaluate the receiver; when anException is signaled, evaluate aBlock passing a Signal describing the exception. Answer either the result of evaluating the receiver or the parameter of a Signal>>#return:
Evaluate the receiver; when e1 or e2 are signaled, evaluate respectively b1 or b2, passing a Signal describing the exception. Answer either the result of evaluating the receiver or the argument of a Signal>>#return:
Evaluate the receiver; when e1, e2 or e3 are signaled, evaluate respectively b1, b2 or b3, passing a Signal describing the exception. Answer either the result of evaluating the receiver or the parameter of a Signal>>#return:
Evaluate the receiver; when e1, e2, e3 or e4 are signaled, evaluate respectively b1, b2, b3 or b4, passing a Signal describing the exception. Answer either the result of evaluating the receiver or the parameter of a Signal>>#return:
Evaluate the receiver; when e1, e2, e3, e4 or e5 are signaled, evaluate respectively b1, b2, b3, b4 or b5, passing a Signal describing the exception. Answer either the result of evaluating the receiver or the parameter of a Signal>>#return:
Next: BlockClosure-overriding, Previous: BlockClosure-exception handling, Up: BlockClosure [Index]
Create a new process executing the receiver and start it
Create a new process executing the receiver with given priority and start it
Evaluate the receiver in a process that cannot be preempted. If the receiver expect a parameter, pass the current process.
Create a new process executing the receiver in suspended state. The priority is the same as for the calling process. The receiver must not contain returns
Create a new process executing the receiver with the passed arguments, and leave it in suspended state. The priority is the same as for the calling process. The receiver must not contain returns
Evaluate aBlock and delay all interrupts that are requested to the active process during its execution to after aBlock returns.
Evaluate the receiver with external interrupts disabled. This effectively disables preemption as long as the block does not explicitly yield control, wait on semaphores, and the like.
Next: BlockClosure-testing, Previous: BlockClosure-multiple process, Up: BlockClosure [Index]
Answer the receiver.
Answer a shallow copy.
Next: BlockClosure-unwind protection, Previous: BlockClosure-overriding, Up: BlockClosure [Index]
Answer whether the block contains a method return
Previous: BlockClosure-testing, Up: BlockClosure [Index]
Evaluate the receiver; when any exception is signaled exit returning the result of evaluating aBlock; if no exception is raised, return the result of evaluating aBlock when the receiver has ended
Evaluate the receiver; if its execution triggers an unwind which truncates the execution of the block (‘curtails’ the block), evaluate aBlock. The three cases which can curtail the execution of the receiver are: a non-local return in the receiver, a non-local return in a block evaluated by the receiver which returns past the receiver itself, and an exception raised and not resumed during the execution of the receiver.
Evaluate the receiver. Any errors caused by the block will cause a backtrace, but execution will continue in the method that sent #valueWithUnwind, after that call. Example: [ 1 / 0 ] valueWithUnwind. ’unwind works!’ printNl.
Important: this method is public, but it is intended to be used in very special cases (as a rule of thumb, use it only when the corresponding C code uses the _gst_prepare_execution_environment and _gst_finish_execution_environment functions). You should usually rely on #ensure: and #on:do:.
Next: Boolean, Previous: BlockClosure, Up: Base classes [Index]
My instances represent executing Smalltalk blocks, which are portions of executeable code that have access to the environment that they were declared in, take parameters, and result from BlockClosure objects created to be executed by methods outside the current class. Block contexts are created by messages sent to compute a closure’s value. They contain a stack and also provide some methods that can be used in inspection or debugging.
• BlockContext-accessing: | (instance) | |
• BlockContext-debugging: | (instance) | |
• BlockContext-printing: | (instance) |
Next: BlockContext-debugging, Up: BlockContext [Index]
Answer the context that called the receiver
Answer the MethodContext to which the receiver refers, or nil if it has been optimized away
Answer whether the receiver is a block context
Answers false, because contexts that are skipped when doing a return are always MethodContexts. BlockContexts are removed from the chain whenever a non-local return is done, while MethodContexts need to stay there in case there is a non-local return from the #ensure: block.
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context whose selector is nil and which can be used as a marker for the current execution environment. Answer whether the receiver is that kind of context (always false, since those contexts are always MethodContexts).
Answers whether the context must continue execution even after a non-local return (a return from the enclosing method of a block, or a call to the #continue: method of ContextPart). Such contexts are created only by #ensure: and are always MethodContexts.
Answer the n-th outer block/method context for the receiver
Answer the outer block/method context for the receiver
Next: BlockContext-printing, Previous: BlockContext-accessing, Up: BlockContext [Index]
Answer whether the receiver is a context that should be hidden to the user when presenting a backtrace. Such contexts are never blocks, but check the rest of the chain.
Previous: BlockContext-debugging, Up: BlockContext [Index]
Print a representation for the receiver on aStream
Next: ByteArray, Previous: BlockContext, Up: Base classes [Index]
I have two instances in the Smalltalk system: true and false. I provide methods that are conditional on boolean values, such as conditional execution and loops, and conditional testing, such as conditional and and conditional or. I should say that I appear to provide those operations; my subclasses True and False actually provide those operations.
• Boolean class-testing: | (class) | |
• Boolean-basic: | (instance) | |
• Boolean-C hacks: | (instance) | |
• Boolean-overriding: | (instance) | |
• Boolean-storing: | (instance) |
Next: Boolean-basic, Up: Boolean [Index]
Answer whether x = y implies x == y for instances of the receiver
Answer whether, if x is an instance of the receiver, x copy == x
Next: Boolean-C hacks, Previous: Boolean class-testing, Up: Boolean [Index]
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
This method’s functionality should be implemented by subclasses of Boolean
Next: Boolean-overriding, Previous: Boolean-basic, Up: Boolean [Index]
This method’s functionality should be implemented by subclasses of Boolean
Next: Boolean-storing, Previous: Boolean-C hacks, Up: Boolean [Index]
Answer the receiver.
Answer the receiver.
Previous: Boolean-overriding, Up: Boolean [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store on aStream some Smalltalk code which compiles to the receiver
Store on aStream some Smalltalk code which compiles to the receiver
Next: CAggregate, Previous: Boolean, Up: Base classes [Index]
My instances are similar to strings in that they are both represented as a sequence of bytes, but my individual elements are integers, where as a String’s elements are characters.
• ByteArray class-instance creation: | (class) | |
• ByteArray-basic: | (instance) | |
• ByteArray-built ins: | (instance) | |
• ByteArray-CObject: | (instance) | |
• ByteArray-converting: | (instance) | |
• ByteArray-more advanced accessing: | (instance) | |
• ByteArray-storing: | (instance) |
Next: ByteArray-basic, Up: ByteArray [Index]
Answer a ByteArray containing anInteger bytes starting at the location pointed to by aCObject
Next: ByteArray-built ins, Previous: ByteArray class-instance creation, Up: ByteArray [Index]
Answer whether the receiver’s items match those in aCollection
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Next: ByteArray-CObject, Previous: ByteArray-basic, Up: ByteArray [Index]
Allocate memory with malloc for a copy of the receiver, and return it converted to a CObject with the given type
Answer the index-th indexed instance variable of the receiver
Answer the index-th indexed instance variable of the receiver
Store the ‘value’ byte in the index-th indexed instance variable of the receiver
Answer an hash value for the receiver
Replace the characters from start to stop with the bytes contained in aByteArray (which, actually, can be any variable byte class), starting at the replaceStart location of aByteArray
Replace the characters from start to stop with the ASCII codes contained in aString (which, actually, can be any variable byte class), starting at the replaceStart location of aString
Next: ByteArray-converting, Previous: ByteArray-built ins, Up: ByteArray [Index]
Allocate memory with malloc for a copy of the receiver, and return a pointer to it as a CByte.
Give access to the receiver as a value with the given CType.
Next: ByteArray-more advanced accessing, Previous: ByteArray-CObject, Up: ByteArray [Index]
Answer a String whose character’s ASCII codes are the receiver’s contents
Answer a UnicodeString whose character’s codes are the receiver’s contents. This is not implemented unless you load the I18N package.
Next: ByteArray-storing, Previous: ByteArray-converting, Up: ByteArray [Index]
Access the C char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.
Access the C double at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C double. Indices are 1-based just like for other Smalltalk access.
Access the C float at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C float. Indices are 1-based just like for other Smalltalk access.
Access the C int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C long double at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Float object identified by ‘value’, at the given index in the receiver, writing it like a C double. Indices are 1-based just like for other Smalltalk access.
Access the Smalltalk object (OOP) at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store a pointer (OOP) to the Smalltalk object identified by ‘value’, at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Access the C short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.
Access the string pointed by the C ‘char *’ at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk String object identified by ‘value’, at the given index in the receiver, writing it like a *FRESHLY ALLOCATED* C string. It is the caller’s responsibility to free it if necessary. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned char at the given index in the receiver. The value is returned as a Smalltalk Character. Indices are 1-based just like for other Smalltalk access.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given index in the receiver, using sizeof(char) bytes - i.e. 1 byte. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(int) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned long int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(long) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.
Access the C unsigned short int at the given index in the receiver. Indices are 1-based just like for other Smalltalk access.
Store the Smalltalk Integer object identified by ‘value’, at the given index in the receiver, using sizeof(short) bytes. Indices are 1-based just like for other Smalltalk access.
Previous: ByteArray-more advanced accessing, Up: ByteArray [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Put a Smalltalk literal evaluating to the receiver on aStream.
Put Smalltalk code evaluating to the receiver on aStream.
Next: CallinProcess, Previous: ByteArray, Up: Base classes [Index]
• CAggregate class-accessing: | (class) | |
• CAggregate-accessing: | (instance) |
Next: CAggregate-accessing, Up: CAggregate [Index]
Answer the receiver’s instances required aligment
Answer the receiver’s instances size
Previous: CAggregate class-accessing, Up: CAggregate [Index]
Answer the type over which the receiver is constructed.
Next: CArray, Previous: CAggregate, Up: Base classes [Index]
I represent a unit of computation for which external C code requested execution, so I must store the returned value once my computation terminates and I must not survive across image saves (since those who invoked me no longer exist). I am otherwise equivalent to a Process.
• CallinProcess-debugging: | (instance) |
Up: CallinProcess [Index]
Continue running the receiver as a normal Process, and return nil from the callin.
Next: CArrayCType, Previous: CallinProcess, Up: Base classes [Index]
• CArray-accessing: | (instance) |
Answer the receiver’s required aligment
Answer the receiver’s size
Next: CBoolean, Previous: CArray, Up: Base classes [Index]
• CArrayCType class-instance creation: | (class) | |
• CArrayCType-accessing: | (instance) | |
• CArrayCType-basic: | (instance) | |
• CArrayCType-storing: | (instance) |
Next: CArrayCType-accessing, Up: CArrayCType [Index]
This method should not be called for instances of this class.
Answer a new instance of CPtrCType that maps an array whose elements are of the given CType, and whose size is exactly anInteger elements (of course, anInteger only matters for allocation, not for access, since no out-of-bounds protection is provided for C objects).
Private - Called by CType>>from: for arrays
Next: CArrayCType-basic, Previous: CArrayCType class-instance creation, Up: CArrayCType [Index]
Answer the alignment of the receiver’s instances
Answer the number of elements in the receiver’s instances
Answer the size of the receiver’s instances
Next: CArrayCType-storing, Previous: CArrayCType-accessing, Up: CArrayCType [Index]
Return whether the receiver and anObject are equal.
Return a hash code for the receiver.
Previous: CArrayCType-basic, Up: CArrayCType [Index]
As with super.
Next: CByte, Previous: CArrayCType, Up: Base classes [Index]
I return true if a byte is not zero, false otherwise.
• CBoolean class-conversion: | (class) | |
• CBoolean-accessing: | (instance) |
Next: CBoolean-accessing, Up: CBoolean [Index]
Answer a CType for the receiver
Previous: CBoolean class-conversion, Up: CBoolean [Index]
Get the receiver’s value - answer true if it is != 0, false if it is 0.
Set the receiver’s value - it’s the same as for CBytes, but we get a Boolean, not a Character
Next: CCallable, Previous: CBoolean, Up: Base classes [Index]
You know what a byte is, don’t you?!?
• CByte class-conversion: | (class) | |
• CByte-accessing: | (instance) |
Next: CByte-accessing, Up: CByte [Index]
Nothing special in the default case - answer a CType for the receiver
Answer a CType for the receiver
Previous: CByte class-conversion, Up: CByte [Index]
Nothing special in the default case - answer the receiver’s CType
Answer the value the receiver is pointing to. The returned value is a SmallInteger
Set the receiver to point to the value, aValue (a SmallInteger).
Next: CCallbackDescriptor, Previous: CByte, Up: Base classes [Index]
I am not part of the Smalltalk definition. My instances contain information about C functions that can be called from within Smalltalk, such as number and type of parameters. This information is used by the C callout mechanism to perform the actual call-out to C routines.
• CCallable class-instance creation: | (class) | |
• CCallable-accessing: | (instance) | |
• CCallable-calling: | (instance) | |
• CCallable-restoring: | (instance) |
Next: CCallable-accessing, Up: CCallable [Index]
Answer a CFunctionDescriptor with the given address, return type and arguments. The address will be reset to NULL upon image save (and it’s the user’s task to figure out a way to reinitialize it!)
Next: CCallable-calling, Previous: CCallable class-instance creation, Up: CCallable [Index]
Answer whether the object represents a valid function.
Not commented.
Next: CCallable-restoring, Previous: CCallable-accessing, Up: CCallable [Index]
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the parent context. Asynchronous call-outs don’t return a value, but if the function calls back into Smalltalk the process that started the call-out is not suspended.
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the base of the stack of aContext. Asynchronous call-outs don’t return a value, but if the function calls back into Smalltalk the process that started the call-out is not suspended. Unlike #asyncCallFrom:, this method does not attempt to find functions in shared objects.
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the parent context, and the the result is stored into aValueHolder. aValueHolder is also returned.
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the base of the stack of aContext, and the result is stored into aValueHolder. aValueHolder is also returned. Unlike #callFrom:into:, this method does not attempt to find functions in shared objects.
Previous: CCallable-calling, Up: CCallable [Index]
Rebuild the object after the image is restarted.
Next: CChar, Previous: CCallable, Up: Base classes [Index]
I am not part of the Smalltalk definition. My instances are able to convert blocks into C functions that can be passed to C.
• CCallbackDescriptor class-instance creation: | (class) | |
• CCallbackDescriptor-accessing: | (instance) | |
• CCallbackDescriptor-restoring: | (instance) |
Next: CCallbackDescriptor-accessing, Up: CCallbackDescriptor [Index]
Answer a CCallbackDescriptor with the given block, return type and arguments.
Next: CCallbackDescriptor-restoring, Previous: CCallbackDescriptor class-instance creation, Up: CCallbackDescriptor [Index]
Answer the block of the function represented by the receiver.
Set the block of the function represented by the receiver.
Previous: CCallbackDescriptor-accessing, Up: CCallbackDescriptor [Index]
Make the address of the function point to the registered address.
Next: CCompound, Previous: CCallbackDescriptor, Up: Base classes [Index]
• CChar class-accessing: | (class) | |
• CChar-accessing: | (instance) | |
• CChar-conversion: | (instance) |
Next: CChar-accessing, Up: CChar [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Next: CChar-conversion, Previous: CChar class-accessing, Up: CChar [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Previous: CChar-accessing, Up: CChar [Index]
Convert size bytes pointed to by the receiver to a String
Convert the data pointed to by the receiver, up to the first NULL byte, to a String
Convert size bytes pointed to by the receiver to a String
Next: CDouble, Previous: CChar, Up: Base classes [Index]
• CCompound class-instance creation: | (class) | |
• CCompound class-subclass creation: | (class) | |
• CCompound-debugging: | (instance) |
Next: CCompound class-subclass creation, Up: CCompound [Index]
Allocate a new instance of the receiver, backed by garbage-collected storage.
Allocate a new instance of the receiver. To free the memory after GC, remember to call #addToBeFinalized.
Next: CCompound-debugging, Previous: CCompound class-instance creation, Up: CCompound [Index]
Answer 1, the alignment of an empty struct
Return the pragmas that are written in the file-out of this class.
Private - Compile sizeof and alignof methods
Return the description of the fields in the receiver class.
This method’s functionality should be implemented by subclasses of CCompound
Compile methods that implement the declaration in array. To compute the offset after each field, the value of the old offset plus the new field’s size is passed to aBlock, together with the new field’s alignment requirements.
Private - Emit onto the given stream the code for adding the given selector to the CCompound’s #examineOn: method.
The old way to create a CStruct. Superseded by #subclass:declaration:...
Answer 0, the size of an empty struct
Create a new class with the given name that contains code to implement the given C struct. All the parameters except ‘array’ are the same as for a standard class creation message; see documentation for more information
Previous: CCompound class-subclass creation, Up: CCompound [Index]
Print the contents of the receiver’s fields on aStream
Answer a list of selectors whose return values should be printed by #examineOn:.
Next: CFloat, Previous: CCompound, Up: Base classes [Index]
• CDouble class-accessing: | (class) | |
• CDouble-accessing: | (instance) |
Next: CDouble-accessing, Up: CDouble [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CDouble class-accessing, Up: CDouble [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CFunctionDescriptor, Previous: CDouble, Up: Base classes [Index]
• CFloat class-accessing: | (class) | |
• CFloat-accessing: | (instance) |
Next: CFloat-accessing, Up: CFloat [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CFloat class-accessing, Up: CFloat [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: Character, Previous: CFloat, Up: Base classes [Index]
I am not part of the Smalltalk definition. My instances contain information about C functions that can be called from within Smalltalk, such as number and type of parameters. This information is used by the C callout mechanism to perform the actual call-out to C routines.
• CFunctionDescriptor class-instance creation: | (class) | |
• CFunctionDescriptor class-testing: | (class) | |
• CFunctionDescriptor-accessing: | (instance) | |
• CFunctionDescriptor-printing: | (instance) | |
• CFunctionDescriptor-restoring: | (instance) |
Next: CFunctionDescriptor class-testing, Up: CFunctionDescriptor [Index]
Answer a CFunctionDescriptor with the given function name, return type and arguments. funcName must be a String.
Next: CFunctionDescriptor-accessing, Previous: CFunctionDescriptor class-instance creation, Up: CFunctionDescriptor [Index]
Answer whether a function is registered (on the C side) with the given name or is dynamically loadable.
Answer whether a function is registered (on the C side) with the given name.
Next: CFunctionDescriptor-printing, Previous: CFunctionDescriptor class-testing, Up: CFunctionDescriptor [Index]
Answer the name of the function (on the C side) represented by the receiver
Set the name of the function (on the C side) represented by the receiver
Next: CFunctionDescriptor-restoring, Previous: CFunctionDescriptor-accessing, Up: CFunctionDescriptor [Index]
Print a representation of the receiver onto aStream
Previous: CFunctionDescriptor-printing, Up: CFunctionDescriptor [Index]
Make the address of the function point to the registered address.
Next: CharacterArray, Previous: CFunctionDescriptor, Up: Base classes [Index]
My instances represent the 256 characters of the character set. I provide messages to translate between integers and character objects, and provide names for some of the common unprintable characters.
Character is always used (mostly for performance reasons) when referring to characters whose code point is between 0 and 127. Above 127, instead, more care is needed: Character refers to bytes that are used as part of encoding of a character, while UnicodeCharacter refers to the character itself.
• Character class-built ins: | (class) | |
• Character class-constants: | (class) | |
• Character class-initializing lookup tables: | (class) | |
• Character class-instance creation: | (class) | |
• Character class-testing: | (class) | |
• Character-built ins: | (instance) | |
• Character-coercion methods: | (instance) | |
• Character-comparing: | (instance) | |
• Character-converting: | (instance) | |
• Character-printing: | (instance) | |
• Character-storing: | (instance) | |
• Character-testing: | (instance) | |
• Character-testing functionality: | (instance) |
Next: Character class-constants, Up: Character [Index]
Returns the character object corresponding to anInteger. Error if anInteger is not an integer, or not in 0..127.
Returns the character object, possibly an UnicodeCharacter, corresponding to anInteger. Error if anInteger is not an integer, or not in 0..16r10FFFF.
Returns the character object corresponding to anInteger. Error if anInteger is not an integer, or not in 0..255.
Next: Character class-initializing lookup tables, Previous: Character class-built ins, Up: Character [Index]
Returns the character ’backspace’
Returns the character ’bel’
Returns the character ’cr’
Returns the character ’eof’, also known as ’sub’
Returns the character ’eot’, also known as ’Ctrl-D’
Returns the character ’esc’
Returns the character ’ff’, also known as ’newPage’
Returns the character ’lf’, also known as ’nl’
Returns the character ’newPage’, also known as ’ff’
Returns the character ’nl’, also known as ’lf’
Returns the character ’nul’
Returns the character ’space’
Returns the character ’tab’
Next: Character class-instance creation, Previous: Character class-constants, Up: Character [Index]
Initialize the lookup table which is used to make case and digit-to-char conversions faster. Indices in Table are ASCII values incremented by one. Indices 1-256 classify chars (0 = nothing special, 2 = separator, 48 = digit, 55 = uppercase, 3 = lowercase), indices 257-512 map to lowercase chars, indices 513-768 map to uppercase chars.
Next: Character class-testing, Previous: Character class-initializing lookup tables, Up: Character [Index]
Returns a character that corresponds to anInteger. 0-9 map to $0-$9, 10-35 map to $A-$Z
Next: Character-built ins, Previous: Character class-instance creation, Up: Character [Index]
Answer whether, if x is an instance of the receiver, x copy == x
Next: Character-coercion methods, Previous: Character class-testing, Up: Character [Index]
Boolean return value; true if the characters are equal
Returns the integer value corresponding to self. #codePoint, #asciiValue, #value, and #asInteger are synonyms.
Returns the integer value corresponding to self. #codePoint, #asciiValue, #value, and #asInteger are synonyms.
Returns the integer value corresponding to self. #codePoint, #asciiValue, #value, and #asInteger are synonyms.
Returns the integer value corresponding to self. #codePoint, #asciiValue, #value, and #asInteger are synonyms.
Next: Character-comparing, Previous: Character-built ins, Up: Character [Index]
Returns a String with aNumber occurrences of the receiver.
Returns self as a lowercase character if it’s an uppercase letter, otherwise returns the character unchanged.
Returns the character self as a string. Only valid if the character is between 0 and 255.
Returns the character self as a symbol.
Returns the character self as a Unicode string.
Returns self as a uppercase character if it’s an lowercase letter, otherwise returns the character unchanged.
Next: Character-converting, Previous: Character-coercion methods, Up: Character [Index]
Compare the character’s ASCII value. Answer whether the receiver’s is the least.
Compare the character’s ASCII value. Answer whether the receiver’s is the least or their equal.
Compare the character’s ASCII value. Answer whether the receiver’s is the greatest.
Compare the character’s ASCII value. Answer whether the receiver’s is the greatest or their equal.
Next: Character-printing, Previous: Character-comparing, Up: Character [Index]
Return the receiver, since it is already a character.
Returns the value of self interpreted as a digit. Here, ’digit’ means either 0-9, or A-Z, which maps to 10-35.
Next: Character-storing, Previous: Character-converting, Up: Character [Index]
Print a representation of the receiver on aStream. Unlike #printOn:, this method strips the leading dollar.
Print a representation of the receiver on aStream
Store on aStream some Smalltalk code which compiles to the receiver
Next: Character-testing, Previous: Character-printing, Up: Character [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store Smalltalk code compiling to the receiver on aStream
Next: Character-testing functionality, Previous: Character-storing, Up: Character [Index]
True if self is a letter or a digit
True if self is a 0-9 digit
Answer whether the receiver is a valid character in the given radix.
True if self is an upper- or lowercase letter
True if self is a lowercase letter
Returns true if self is a path separator ($/ or $\ under Windows, $/ only under Unix systems including Mac OS X).
Returns true if self is one of ’.,:;!?’
Returns true if self is a space, cr, tab, nl, or newPage
True if self is uppercase
Returns true if self is a, e, i, o, or u; case insensitive
Previous: Character-testing, Up: Character [Index]
Answer True. We’re definitely characters
Next: CInt, Previous: Character, Up: Base classes [Index]
My instances represent a generic textual (string) data type. I provide accessing and manipulation methods for strings.
• CharacterArray class-basic: | (class) | |
• CharacterArray class-multibyte encodings: | (class) | |
• CharacterArray-basic: | (instance) | |
• CharacterArray-built ins: | (instance) | |
• CharacterArray-comparing: | (instance) | |
• CharacterArray-converting: | (instance) | |
• CharacterArray-multibyte encodings: | (instance) | |
• CharacterArray-still unclassified: | (instance) | |
• CharacterArray-string processing: | (instance) | |
• CharacterArray-testing functionality: | (instance) |
Next: CharacterArray class-multibyte encodings, Up: CharacterArray [Index]
Make up an instance of the receiver containing the same characters as aCharacterArray, and answer it.
Answer a CharacterArray which one can use as a line delimiter. This is meant to be used on subclasses of CharacterArray.
Next: CharacterArray-basic, Previous: CharacterArray class-basic, Up: CharacterArray [Index]
Answer whether the receiver stores bytes (i.e. an encoded form) or characters (if true is returned).
Next: CharacterArray-built ins, Previous: CharacterArray class-multibyte encodings, Up: CharacterArray [Index]
Answer the ascii value of the anIndex-th character of the receiver, or evaluate aBlock and answer the result if the index is out of range.
Next: CharacterArray-comparing, Previous: CharacterArray-basic, Up: CharacterArray [Index]
Answer the ascii value of index-th character variable of the receiver
Store (Character value: value) in the index-th indexed instance variable of the receiver
Next: CharacterArray-converting, Previous: CharacterArray-built ins, Up: CharacterArray [Index]
Return true if the receiver is less than aCharacterArray, ignoring case differences.
Returns true if the receiver is less than or equal to aCharacterArray, ignoring case differences. If is receiver is an initial substring of aCharacterArray, it is considered to be less than aCharacterArray.
Answer whether the receiver’s items match those in aCollection
Return true if the receiver is greater than aCharacterArray, ignoring case differences.
Returns true if the receiver is greater than or equal to aCharacterArray, ignoring case differences. If is aCharacterArray is an initial substring of the receiver, it is considered to be less than the receiver.
Answer an Interval of indices in the receiver which match the aCharacterArray pattern. # in aCharacterArray means ’match any character’, * in aCharacterArray means ’match any sequence of characters’. The first item of the returned interval is >= anIndex. If aBoolean is false, the search is case-insensitive, else it is case-sensitive. If no Interval matches the pattern, answer nil.
Answer whether aCharacterArray matches the pattern contained in the receiver. # in the receiver means ’match any character’, * in receiver means ’match any sequence of characters’.
Answer whether aCharacterArray matches the pattern contained in the receiver. # in the receiver means ’match any character’, * in receiver means ’match any sequence of characters’. The case of alphabetic characters is ignored if aBoolean is true.
Returns true if the receiver is the same CharacterArray as aCharacterArray, ignoring case differences.
Next: CharacterArray-multibyte encodings, Previous: CharacterArray-comparing, Up: CharacterArray [Index]
Return the receiver, converted to a ByteArray of ASCII values
Return the receiver, ready to be put in a class pool dictionary
Return the receiver, ready to be put in the Smalltalk dictionary
Parse an Integer number from the receiver until the input character is invalid and answer the result at this point
Returns a copy of self as a lowercase CharacterArray
Parse a Number from the receiver until the input character is invalid and answer the result at this point
Return the receiver, ready to be put in a pool dictionary
But I already am a String! Really!
Returns the symbol corresponding to the CharacterArray
Answer a UnicodeString whose character’s codes are the receiver’s contents This is not implemented unless you load the I18N package.
Returns a copy of self as an uppercase CharacterArray
But I don’t HAVE a file name!
But I don’t HAVE a file position!
Answer whether the receiver denotes a number
Return a copy of the reciever without any spaces on front or back. The implementation is protected against the ‘all blanks’ case.
Next: CharacterArray-still unclassified, Previous: CharacterArray-converting, Up: CharacterArray [Index]
Answer the encoding used by the receiver.
Answer whether the receiver stores bytes (i.e. an encoded form) or characters (if true is returned).
Answer the number of Unicode characters in the receiver. This is not implemented unless you load the I18N package.
Next: CharacterArray-string processing, Previous: CharacterArray-multibyte encodings, Up: CharacterArray [Index]
Answer the receiver with special shell characters converted to a backslash sequence.
Answer the receiver with Windows shell characters escaped properly.
Next: CharacterArray-testing functionality, Previous: CharacterArray-still unclassified, Up: CharacterArray [Index]
Answer the receiver with special escape sequences replaced by elements of aCollection. %n (1<=n<=9, A<=n<=Z) are replaced by the n-th element of aCollection (A being the 10-th element and so on until the 35th). %(string) sequences are accessed as strings, which makes sense only if aCollection is a Dictionary or LookupTable. In addition, the special pattern %<trueString|falseString>n or %<trueString|falseString>(string) is replaced with one of the two strings depending on the element of aCollection being true or false. The replaced elements are ‘displayed’ (i.e. their displayString is used).
Answer the receiver with every %1 replaced by the displayString of s1
Answer the receiver with every %1 or %2 replaced by s1 or s2, respectively. s1 and s2 are ‘displayed’ (i.e. their displayString is used) upon replacement.
Answer the receiver with every %1, %2 or %3 replaced by s1, s2 or s3, respectively. s1, s2 and s3 are ‘displayed’ (i.e. their displayString is used) upon replacement.
Answer the receiver with every %1, %2, %3 or %4 replaced by s1, s2, s3 or s4, respectively. s1, s2, s3 and s4 are ‘displayed’ (i.e. their displayString is used) upon replacement.
Answer the receiver with special escape sequences replaced by elements of aCollection. %n (1<=n<=9, A<=n<=Z) are replaced by the n-th element of aCollection (A being the 10-th element and so on until the 35th). %(string) sequences are accessed as strings, which makes sense only if aCollection is a Dictionary or LookupTable. In addition, the special pattern %<trueString|falseString>n or %<trueString|falseString>(string) is replaced with one of the two strings depending on the element of aCollection being true or false. The replaced elements are ‘displayed’ (i.e. their displayString is used).
Either return myself, or a copy shortened to smallSize characters by inserting an ellipsis (three dots: ...)
Answer an Array of Strings each representing one line in the receiver.
Evaluate aBlock once for every newline delimited line in the receiver, passing the line to the block.
Answer an OrderedCollection of substrings of the receiver. A new substring start at the start of the receiver, or after every sequence of white space characters
Answer an OrderedCollection of substrings of the receiver. A new substring start at the start of the receiver, or after every occurrence of one of the characters in sep
Answer an OrderedCollection of substrings of the receiver. A new substring start at the start of the receiver, or after every sequence of white space characters. This message is preserved for backwards compatibility; the ANSI standard mandates ‘subStrings’, with an uppercase s.
Answer an OrderedCollection of substrings of the receiver. A new substring start at the start of the receiver, or after every occurrence of one of the characters in sep. This message is preserved for backwards compatibility; the ANSI standard mandates ‘subStrings:’, with an uppercase s.
Answer the receiver with special shell characters converted to a backslash sequence.
Previous: CharacterArray-string processing, Up: CharacterArray [Index]
Answer ‘true’.
Next: Class, Previous: CharacterArray, Up: Base classes [Index]
• CInt class-accessing: | (class) | |
• CInt-accessing: | (instance) |
Next: CInt-accessing, Up: CInt [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s size
Previous: CInt class-accessing, Up: CInt [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s instances size
Next: ClassDescription, Previous: CInt, Up: Base classes [Index]
I am THE class object. My instances are the classes of the system. I provide information commonly attributed to classes: namely, the class name, class comment (you wouldn’t be reading this if it weren’t for me), a list of the instance variables of the class, and the class category.
• Class class-initialize: | (class) | |
• Class-accessing instances and variables: | (instance) | |
• Class-filing: | (instance) | |
• Class-instance creation: | (instance) | |
• Class-instance creation - alternative: | (instance) | |
• Class-pragmas: | (instance) | |
• Class-printing: | (instance) | |
• Class-saving and loading: | (instance) | |
• Class-security: | (instance) | |
• Class-still unclassified: | (instance) | |
• Class-testing: | (instance) | |
• Class-testing functionality: | (instance) |
Next: Class-accessing instances and variables, Up: Class [Index]
Perform the special initialization of root classes.
Next: Class-filing, Previous: Class class-initialize, Up: Class [Index]
Add a class variable with the given name to the class pool dictionary.
Add a class variable with the given name to the class pool dictionary, and evaluate valueBlock as its initializer.
Add the given shared pool to the list of the class’ pool dictionaries
Answer the names of the variables in the receiver’s class pool dictionary and in each of the superclasses’ class pool dictionaries
Answer the variable binding for the class variable with the given name
Answer the class category
Change the class category to aString
Answer the class pool dictionary
Return the pragmas that are written in the file-out of this class.
Answer the names of the variables in the class pool dictionary
Answer the class comment
Change the class name
Answer ‘environment’.
Set the receiver’s environment to aNamespace and recompile everything
redefined in children (?)
Perform special initialization reserved to root classes.
Answer the class name
Removes the class variable from the class, error if not present, or still in use.
Remove the given dictionary to the list of the class’ pool dictionaries
Return the names of the shared pools defined by the class
Set the receiver’s superclass.
Next: Class-instance creation, Previous: Class-accessing instances and variables, Up: Class [Index]
File out class definition to aFileStream. Requires package Parser.
File out complete class description: class definition, class and instance methods. Requires package Parser.
Next: Class-instance creation - alternative, Previous: Class-filing, Up: Class [Index]
Redefine a version of the receiver in the current namespace. Note: this method can bite you in various ways when sent to system classes; read the section on namespaces in the manual for some examples of the problems you can encounter.
Answer whether subclasses will have by default the same shape as this class. The default is false.
Define a subclass of the receiver with the given name. If the class is already defined, don’t modify its instance or class variables but still, if necessary, recompile everything needed.
Define a fixed subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a variable subclass of the receiver with the given name, shape, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed. The shape can be one of #byte #int8 #character #short #ushort #int #uint #int64 #uint64 #utf32 #float #double or #pointer.
Define a byte variable subclass of the receiver with the given name, instance variables (must be ”), class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a variable pointer subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a word variable subclass of the receiver with the given name, instance variables (must be ”), class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Next: Class-pragmas, Previous: Class-instance creation, Up: Class [Index]
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Next: Class-printing, Previous: Class-instance creation - alternative, Up: Class [Index]
Answer the (possibly inherited) registered handler for pragma aSymbol, or nil if not found.
While compiling methods, on every encounter of the pragma with the given name, call aBlock with the CompiledMethod and an array of pragma argument values.
Next: Class-saving and loading, Previous: Class-pragmas, Up: Class [Index]
Answer an article (‘a’ or ‘an’) which is ok for the receiver’s name
Print a representation of the receiver on aStream
Store Smalltalk code compiling to the receiver on aStream
Next: Class-security, Previous: Class-printing, Up: Class [Index]
Answer a number >= 0 which represents the current version of the object’s representation. The default implementation answers zero.
This method is called if a VersionableObjectProxy is attached to a class. It receives the version number that was stored for the object (or nil if the object did not use a VersionableObjectProxy), the fixed instance variables, the indexed instance variables, and the ObjectDumper that has read the object. The default implementation ignores the version and simply fills in an instance of the receiver with the given fixed and indexed instance variables (nil if the class instances are of fixed size). If instance variables were removed from the class, extras are ignored; if the class is now fixed and used to be indexed, indexed is not used.
Answer the number of instance variables that the class used to have when objects were stored without using a VersionableObjectProxy. The default implementation answers the current instSize.
Next: Class-still unclassified, Previous: Class-saving and loading, Up: Class [Index]
Not commented.
Answer ‘securityPolicy’.
Not commented.
Next: Class-testing, Previous: Class-security, Up: Class [Index]
Answer the shared pools visible from methods in the metaclass, in the correct search order.
Not commented.
Next: Class-testing functionality, Previous: Class-still unclassified, Up: Class [Index]
Returns true if the two class objects are to be considered equal.
Previous: Class-testing, Up: Class [Index]
Answer the receiver.
Answer ‘true’.
Next: CLong, Previous: Class, Up: Base classes [Index]
My instances provide methods that access classes by category, and allow whole categories of classes to be filed out to external disk files.
• ClassDescription-compiling: | (instance) | |
• ClassDescription-conversion: | (instance) | |
• ClassDescription-copying: | (instance) | |
• ClassDescription-filing: | (instance) | |
• ClassDescription-organization of messages and classes: | (instance) | |
• ClassDescription-parsing class declarations: | (instance) | |
• ClassDescription-printing: | (instance) | |
• ClassDescription-still unclassified: | (instance) |
Next: ClassDescription-conversion, Up: ClassDescription [Index]
Compile code in the receiver, assigning the method to the given category. Answer the newly created CompiledMethod, or nil if an error was found.
Compile method source and install in method category, categoryName. If there are parsing errors, invoke exception block, ’block’ (see compile:ifError:). Return the method
Compile method source and install in method category, categoryName. If there are parsing errors, send an error message to requestor
Next: ClassDescription-copying, Previous: ClassDescription-compiling, Up: ClassDescription [Index]
This method’s functionality should be implemented by subclasses of ClassDescription
Answer the metaclass associated to the receiver
Answer a VariableBinding object whose value is the receiver
Next: ClassDescription-filing, Previous: ClassDescription-conversion, Up: ClassDescription [Index]
Copy the given selector from aClass, assigning it the same category
Copy the given selector from aClass, assigning it the given category
Copy all the selectors in arrayOfSelectors from class, assigning them the same category they have in class
Copy all the selectors in arrayOfSelectors from aClass, assigning them the given category
Copy all the selectors in aClass, assigning them the original category
Copy all the selectors in from aClass that belong to the given category
Copy all the selectors in from aClass that belong to the given category, reclassifying them as belonging to the given category
Next: ClassDescription-organization of messages and classes, Previous: ClassDescription-copying, Up: ClassDescription [Index]
Open the given file and to file out a complete class description to it. Requires package Parser.
File out all the methods belonging to the method category, categoryName, to the fileName file. Requires package Parser.
File out complete class description: class definition, class and instance methods. Requires package Parser.
File out the given selector to fileName. Requires package Parser.
Next: ClassDescription-parsing class declarations, Previous: ClassDescription-filing, Up: ClassDescription [Index]
Put the method identified by the selector aSelector under the category given by aString.
Create a method accessing the variable ‘what’.
Create a method accessing the variable ‘what’, with a default value of ‘value’, using lazy initialization
Create a method which sets the variable ‘what’.
See documentation. This function is deprecated, you should use the <asyncCCall: ... > special syntax instead.
See documentation. This function is deprecated, you should use the <asyncCCall: ... > special syntax instead.
Remove from the receiver every method belonging to the given category
Answer the category for the given selector, or nil if the selector is not found
Next: ClassDescription-printing, Previous: ClassDescription-organization of messages and classes, Up: ClassDescription [Index]
Add the given shared pool to the list of the class’ pool dictionaries
Add the given shared pool to the list of the class’ pool dictionaries
Next: ClassDescription-still unclassified, Previous: ClassDescription-parsing class declarations, Up: ClassDescription [Index]
This method’s functionality should be implemented by subclasses of ClassDescription
Answer a string containing the name of the receiver’s instance variables.
Answer the class name when the class is referenced from aNamespace
Print on aStream the class name when the class is referenced from aNamespace
This method’s functionality should be implemented by subclasses of ClassDescription
Previous: ClassDescription-printing, Up: ClassDescription [Index]
File out all the methods belonging to the method category, category, to aFileStream. Requires package Parser.
File out all the methods belonging to the method category, category, to aFileStream. Requires package Parser.
Next: CLongDouble, Previous: ClassDescription, Up: Base classes [Index]
• CLong class-accessing: | (class) | |
• CLong-accessing: | (instance) |
Next: CLong-accessing, Up: CLong [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CLong class-accessing, Up: CLong [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CLongLong, Previous: CLong, Up: Base classes [Index]
• CLongDouble class-accessing: | (class) | |
• CLongDouble-accessing: | (instance) |
Next: CLongDouble-accessing, Up: CLongDouble [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CLongDouble class-accessing, Up: CLongDouble [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CObject, Previous: CLongDouble, Up: Base classes [Index]
• CLongLong class-accessing: | (class) | |
• CLongLong-accessing: | (instance) |
Next: CLongLong-accessing, Up: CLongLong [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CLongLong class-accessing, Up: CLongLong [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: Collection, Previous: CLongLong, Up: Base classes [Index]
I am not part of the standard Smalltalk kernel class hierarchy. My instances contain values that are not interpreted by the Smalltalk system; they frequently hold "pointers" to data outside of the Smalltalk environment. The C callout mechanism allows my instances to be transformed into their corresponding C values for use in external routines.
• CObject class-conversion: | (class) | |
• CObject class-instance creation: | (class) | |
• CObject class-primitive allocation: | (class) | |
• CObject class-subclass creation: | (class) | |
• CObject-accessing: | (instance) | |
• CObject-basic: | (instance) | |
• CObject-C data access: | (instance) | |
• CObject-conversion: | (instance) | |
• CObject-finalization: | (instance) | |
• CObject-pointer-like behavior: | (instance) | |
• CObject-testing: | (instance) | |
• CObject-testing functionality: | (instance) |
Next: CObject class-instance creation, Up: CObject [Index]
Nothing special in the default case - answer a CType for the receiver
Next: CObject class-primitive allocation, Previous: CObject class-conversion, Up: CObject [Index]
Answer a new object pointing to the passed address, anInteger
Allocate nBytes bytes and return an instance of the receiver
Allocate nBytes bytes and return an instance of the receiver
Allocate nBytes bytes and return an instance of the receiver
Answer a new object pointing to NULL.
Allocate nBytes bytes and return an instance of the receiver
Next: CObject class-subclass creation, Previous: CObject class-instance creation, Up: CObject [Index]
Allocate nBytes bytes and return a CObject of the given type
Allocate nBytes bytes and return a CObject of the given type
Next: CObject-accessing, Previous: CObject class-primitive allocation, Up: CObject [Index]
Answer whether subclasses will have by default the same shape as this class. The default is true for the CObject hierarchy.
Next: CObject-basic, Previous: CObject class-subclass creation, Up: CObject [Index]
Answer the address the receiver is pointing to. The address can be absolute if the storage is nil, or relative to the Smalltalk object in #storage. In this case, an address of 0 corresponds to the first instance variable.
Set the receiver to point to the passed address, anInteger
Answer whether the object points into a garbage-collected Smalltalk storage, or it is an absolute address.
Print a representation of the receiver
Answer the storage that the receiver is pointing into, or nil if the address is absolute.
Change the receiver to point to the storage of anObject.
Set the receiver’s type to aCType.
Next: CObject-C data access, Previous: CObject-accessing, Up: CObject [Index]
Return true if the receiver and aCObject are equal.
Return a hash value for anObject.
Next: CObject-conversion, Previous: CObject-basic, Up: CObject [Index]
Store aValue as data of the given type from byteOffset bytes after the pointer stored in the receiver
Answer some data of the given type from byteOffset bytes after the pointer stored in the receiver
Free the receiver’s pointer and set it to null. Big trouble hits you if the receiver doesn’t point to the base of a malloc-ed area.
Next: CObject-finalization, Previous: CObject-C data access, Up: CObject [Index]
Answer another CObject, pointing to the same address as the receiver, but belonging to the aType CType.
This method is called on CObjects returned by a C call-out whose return type is specified as a CType; it mostly allows one to change the class of the returned CObject. By default it does nothing, and that’s why it is not called when #cObject is used to specify the return type.
Answer a CType for the receiver
Next: CObject-pointer-like behavior, Previous: CObject-conversion, Up: CObject [Index]
To make the VM call this, use #addToBeFinalized. It frees automatically any memory pointed to by the CObject. It is not automatically enabled because big trouble hits you if you use #free and the receiver doesn’t point to the base of a malloc-ed area.
Next: CObject-testing, Previous: CObject-finalization, Up: CObject [Index]
Return another instance of the receiver’s class which points at &receiver[anInteger] (or, if you prefer, what ‘receiver + anInteger’ does in C).
If intOrPtr is an integer, return another instance of the receiver’s class pointing at &receiver[-anInteger] (or, if you prefer, what ‘receiver - anInteger’ does in C). If it is the same class as the receiver, return the difference in chars, i.e. in bytes, between the two pointed addresses (or, if you prefer, what ‘receiver - anotherCharPtr’ does in C)
Return a new CObject of the element type, corresponding to an object that is anIndex places past the receiver (remember that CObjects represent pointers and that C pointers behave like arrays). anIndex is zero-based, just like with all other C-style accessing.
Dereference a pointer that is anIndex places past the receiver (remember that CObjects represent pointers and that C pointers behave like arrays). anIndex is zero-based, just like with all other C-style accessing.
Store anIndex places past the receiver the passed Smalltalk object or CObject ‘aValue’; if it is a CObject is dereferenced: that is, this method is equivalent either to cobj[anIndex]=aValue or cobj[anIndex]=*aValue. anIndex is zero-based, just like with all other C-style accessing.
In both cases, aValue should be of the element type or of the corresponding Smalltalk type (that is, a String is ok for an array of CStrings) to avoid typing problems which however will not be signaled because C is untyped.
Adjust the pointer by sizeof(dereferencedType) bytes down (i.e. –receiver)
Adjust the pointer by anInteger elements down (i.e. receiver -= anInteger)
Adjust the pointer by sizeof(dereferencedType) bytes up (i.e. ++receiver)
Adjust the pointer by anInteger elements up (i.e. receiver += anInteger)
Next: CObject-testing functionality, Previous: CObject-pointer-like behavior, Up: CObject [Index]
Return true if the receiver points to NULL.
Previous: CObject-testing, Up: CObject [Index]
Answer ‘true’.
Next: CompiledBlock, Previous: CObject, Up: Base classes [Index]
I am an abstract class. My instances are collections of objects. My subclasses may place some restrictions or add some definitions to how the objects are stored or organized; I say nothing about this. I merely provide some object creation and access routines for general collections of objects.
• Collection class-instance creation: | (class) | |
• Collection class-multibyte encodings: | (class) | |
• Collection-adding: | (instance) | |
• Collection-compiler: | (instance) | |
• Collection-concatenating: | (instance) | |
• Collection-converting: | (instance) | |
• Collection-copying Collections: | (instance) | |
• Collection-copying SequenceableCollections: | (instance) | |
• Collection-enumeration: | (instance) | |
• Collection-finalization: | (instance) | |
• Collection-printing: | (instance) | |
• Collection-removing: | (instance) | |
• Collection-sorting: | (instance) | |
• Collection-storing: | (instance) | |
• Collection-testing collections: | (instance) |
Next: Collection class-multibyte encodings, Up: Collection [Index]
Convert anArray to an instance of the receiver. anArray is structured such that the instance can be conveniently and fully specified using brace-syntax, possibly by imposing some additional structure on anArray.
Answer a collection formed by treating each element in aCollection as a ‘withAll:’ argument collection to be added to a new instance.
Answer a collection whose only element is anObject
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose elements are all those in aCollection
Next: Collection-adding, Previous: Collection class-instance creation, Up: Collection [Index]
Answer true; the receiver is able to store arbitrary Unicode characters.
Next: Collection-compiler, Previous: Collection class-multibyte encodings, Up: Collection [Index]
Add newObject to the receiver, answer it
Adds all the elements of ’aCollection’ to the receiver, answer aCollection
Next: Collection-concatenating, Previous: Collection-adding, Up: Collection [Index]
Not commented.
Not commented.
Next: Collection-converting, Previous: Collection-compiler, Up: Collection [Index]
Answer a new collection like my first element, with all the elements (in order) of all my elements, which should be collections.
I use my first element instead of myself as a prototype because my elements are more likely to share the desired properties than I am, such as in:
#(’hello, ’ ’world’) join => ’hello, world’
Next: Collection-copying Collections, Previous: Collection-concatenating, Up: Collection [Index]
Answer an Array containing all the elements in the receiver
Answer a Bag containing all the elements in the receiver
Answer a ByteArray containing all the elements in the receiver
Answer an OrderedCollection containing all the elements in the receiver
Answer the receiver converted to a RunArray. If the receiver is not ordered the order of the elements in the RunArray might not be the #do: order.
Answer a Set containing all the elements in the receiver with no duplicates
Answer a SortedCollection containing all the elements in the receiver with the default sort block - [ :a :b | a <= b ]
Answer a SortedCollection whose elements are the elements of the receiver, sorted according to the sort block aBlock
Answer a String containing all the elements in the receiver
Answer a UnicodeString containing all the elements in the receiver
Next: Collection-copying SequenceableCollections, Previous: Collection-converting, Up: Collection [Index]
Copy replacing each object which is = to targetObject with newObject
Answer a copy of the receiver to which newElement is added
Answer a copy of the receiver to which all occurrences of oldElement are removed
Next: Collection-enumeration, Previous: Collection-copying Collections, Up: Collection [Index]
Append anIterable at the end of a copy of the receiver (using #add:), and answer a new collection
Next: Collection-finalization, Previous: Collection-copying SequenceableCollections, Up: Collection [Index]
Answer an unspecified element of the collection.
This method is private, but it is quite interesting so it is documented. It ensures that a collection is in a consistent state before attempting to iterate on it; its presence reduces the number of overrides needed by collections who try to amortize their execution times. The default implementation does nothing, so it is optimized out by the virtual machine and so it loses very little on the performance side. Note that descendants of Collection have to call it explicitly since #do: is abstract in Collection.
Answer a new instance of a Collection containing all the results of evaluating aBlock passing each of the receiver’s elements
Answer a new instance of a Collection containing all the results of evaluating aBlock, joined together. aBlock should return collections. The result is the same kind as the first collection, returned by aBlock (as for #join).
Answer a stream that gives elements of the receiver
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, don’t answer true
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, answer true
Next: Collection-printing, Previous: Collection-enumeration, Up: Collection [Index]
Private - anObject has been found to have a weak key, remove it and possibly finalize the key.
Next: Collection-removing, Previous: Collection-finalization, Up: Collection [Index]
Print each element of the receiver to a line on standard output.
Print all the instance variables and objects in the receiver on aStream
Print a representation of the receiver on aStream
Next: Collection-sorting, Previous: Collection-printing, Up: Collection [Index]
Remove everything from the receiver.
Remove oldObject from the receiver. If absent, fail, else answer oldObject.
Remove oldObject from the receiver. If absent, evaluate anExceptionBlock and answer the result, else answer oldObject.
Remove each object in aCollection, answer aCollection, fail if some of them is absent. Warning: this could leave the collection in a semi-updated state.
Remove each object in aCollection, answer aCollection; if some element is absent, pass it to aBlock.
Remove from the receiver all objects for which aBlock returns true.
Next: Collection-storing, Previous: Collection-removing, Up: Collection [Index]
Return a sequenceable collection with the contents of the receiver sorted according to the default sort block, which uses #<= to compare items.
Return a sequenceable collection with the contents of the receiver sorted according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one.
Next: Collection-testing collections, Previous: Collection-sorting, Up: Collection [Index]
Store Smalltalk code compiling to the receiver on aStream
Previous: Collection-storing, Up: Collection [Index]
Answer how many elements the receiver can hold before having to grow.
Answer whether we include the anObject object
Answer whether we include anObject
Answer whether we include all of the objects in aCollection
Answer whether we include any of the objects in aCollection
Answer whether we are (still) empty
Answer whether the receiver can be accessed by a numeric index with #at:/#at:put:.
Answer whether we include at least one object
Answer how many occurrences of anObject we include
Answer how many objects we include
Next: CompiledCode, Previous: Collection, Up: Base classes [Index]
I represent a block that has been compiled.
• CompiledBlock class-instance creation: | (class) | |
• CompiledBlock-accessing: | (instance) | |
• CompiledBlock-basic: | (instance) | |
• CompiledBlock-printing: | (instance) | |
• CompiledBlock-saving and loading: | (instance) |
Next: CompiledBlock-accessing, Up: CompiledBlock [Index]
Answer a new instance of the receiver with room for the given number of bytecodes and the given header.
Answer an (almost) full fledged CompiledBlock. To make it complete, you must either set the new object’s ‘method’ variable, or put it into a BlockClosure and put the BlockClosure into a CompiledMethod’s literals. The clean-ness of the block is automatically computed.
Next: CompiledBlock-basic, Previous: CompiledBlock class-instance creation, Up: CompiledBlock [Index]
Answer the ‘cleanness’ of the block. 0 = clean; 1 = access to receiver variables and/or self; 2-30 = access to variables that are 1-29 contexts away; 31 = return from method or push thisContext
Answer the CompiledMethod in which the receiver lies
Answer the class in which the receiver is installed.
Set the receiver’s class instance variable
Answer the number of arguments passed to the receiver
Answer the number of literals for the receiver
Answer the number of temporary variables used by the receiver
Answer the selector through which the method is called
Set the selector through which the method is called
Answer the delta from the numbers in LINE_NUMBER bytecodes to source code line numbers.
Answer an array which maps bytecode indices to source code line numbers. 0 values represent invalid instruction pointer indices.
Answer the number of stack slots needed for the receiver
Next: CompiledBlock-printing, Previous: CompiledBlock-accessing, Up: CompiledBlock [Index]
Answer whether the receiver and aMethod are equal
Answer the method category
Set the method category to the given string
Answer the method source code (a FileSegment or String or nil)
Answer the file where the method source code is stored
Answer the location where the method source code is stored in the methodSourceFile
Answer the method source code as a string
Next: CompiledBlock-saving and loading, Previous: CompiledBlock-basic, Up: CompiledBlock [Index]
Print the receiver’s class and selector on aStream
Previous: CompiledBlock-printing, Up: CompiledBlock [Index]
This method is implemented to allow for a PluggableProxy to be used with CompiledBlocks. Answer a DirectedMessage which sends #blockAt: to the CompiledMethod containing the receiver.
Next: CompiledMethod, Previous: CompiledBlock, Up: Base classes [Index]
I represent code that has been compiled. I am an abstract superclass for blocks and methods
• CompiledCode class-cache flushing: | (class) | |
• CompiledCode class-instance creation: | (class) | |
• CompiledCode class-tables: | (class) | |
• CompiledCode-accessing: | (instance) | |
• CompiledCode-basic: | (instance) | |
• CompiledCode-copying: | (instance) | |
• CompiledCode-debugging: | (instance) | |
• CompiledCode-decoding bytecodes: | (instance) | |
• CompiledCode-literals - iteration: | (instance) | |
• CompiledCode-security: | (instance) | |
• CompiledCode-testing accesses: | (instance) | |
• CompiledCode-translation: | (instance) |
Next: CompiledCode class-instance creation, Up: CompiledCode [Index]
Answer any kind of cache mantained by a just-in-time code translator in the virtual machine (if any). Do nothing for now.
Next: CompiledCode class-tables, Previous: CompiledCode class-cache flushing, Up: CompiledCode [Index]
Answer a new instance of the receiver with room for the given number of bytecodes and the given header
Answer a new instance of the receiver with room for the given number of bytecodes and the given header
Next: CompiledCode-accessing, Previous: CompiledCode class-instance creation, Up: CompiledCode [Index]
Return a ByteArray which defines some properties of the bytecodes. For each bytecode, 4 bytes are reserved. The fourth byte is a flag byte: bit 7 means that the argument is a line number to be used in creating the bytecode->line number map.
The first three have a meaning only for those bytecodes that represent a combination of operations: the combination can be BC1 ARG BC2 OPERAND if the fourth byte’s bit 0 = 0 or BC1 OPERAND BC2 ARG if the fourth byte’s bit 0 = 1
where BC1 is the first byte, BC2 is the second, ARG is the third and OPERAND is the bytecode argument as it appears in the bytecode stream.
Answer an array of message names that don’t need to be in literals to be sent in a method. Their position here reflects their integer code in bytecode.
Answer a harmoniously-indexed array of arities for the messages answered by #specialSelectors.
Next: CompiledCode-basic, Previous: CompiledCode class-tables, Up: CompiledCode [Index]
Store aBytecode as the anIndex-th bytecode
Answer the CompiledBlock attached to the anIndex-th literal, assuming that the literal is a CompiledBlock or a BlockClosure.
Answer the anIndex-th bytecode
Store aBytecode as the anIndex-th bytecode
Private - Answer the optimization flags for the receiver
Answer ‘false’.
Answer the anIndex-th literal
Store aValue as the anIndex-th literal
Answer the literals referenced by my code or any CompiledCode instances I own.
Answer the parent method for the receiver, or self if it is a method.
Answer the class in which the receiver is installed.
Set the receiver’s class instance variable
Answer the number of arguments for the receiver
Answer the number of literals for the receiver
Answer the number of temporaries for the receiver
Answer the primitive called by the receiver
Answer the selector through which the method is called
Set the selector through which the method is called
Answer the delta from the numbers in LINE_NUMBER bytecodes to source code line numbers.
Answer the number of stack slots needed for the receiver
Next: CompiledCode-copying, Previous: CompiledCode-accessing, Up: CompiledCode [Index]
Answer whether the receiver is the same object as arg. Testing for equality could break the browser, since it’s possible to put arbitrary objects via ##(...), so this is safer.
Answer an hash value for the receiver
Answer the method category
Set the method category to the given string
Answer the method source code (a FileSegment or String or nil)
Answer the file where the method source code is stored
Answer the location where the method source code is stored in the methodSourceFile
Answer the method source code as a string
Next: CompiledCode-debugging, Previous: CompiledCode-basic, Up: CompiledCode [Index]
Answer a deep copy of the receiver
Next: CompiledCode-decoding bytecodes, Previous: CompiledCode-copying, Up: CompiledCode [Index]
Print the contents of the receiver in a verbose way.
Next: CompiledCode-literals - iteration, Previous: CompiledCode-debugging, Up: CompiledCode [Index]
Disassemble the bytecodes and tell anObject about them in the form of message sends. param is given as an argument to every message send.
Next: CompiledCode-security, Previous: CompiledCode-decoding bytecodes, Up: CompiledCode [Index]
As with #allLiteralsDo:, but only call aBlock with found Symbols.
Walk my literals, descending into Arrays and Messages, invoking aBlock with each touched object.
Invoke aBlock with each object immediately in my list of literals.
Next: CompiledCode-testing accesses, Previous: CompiledCode-literals - iteration, Up: CompiledCode [Index]
Verify the bytecodes for the receiver, and raise an exception if the verification process failed.
Next: CompiledCode-translation, Previous: CompiledCode-security, Up: CompiledCode [Index]
Answer whether the receiver accesses the instance variable with the given index
Answer whether the receiver writes to the instance variable with the given index
Answer if the receiver contains a literal which is equal to anObject.
Answer whether the receiver includes the ‘byte’ bytecode in any of the indices between firstIndex and lastIndex.
Answer where the jump at bytecode index ‘anIndex’ lands
Answer whether the receiver reads the instance variable with the given index
Answer whether the receiver refers to the given object
Answer whether the receiver includes a send to super.
Answer an array which maps bytecode indices to source code line numbers. 0 values represent invalid instruction pointer indices.
Previous: CompiledCode-testing accesses, Up: CompiledCode [Index]
Flush the just-in-time translated code for the receiver (if any).
Next: ContextPart, Previous: CompiledCode, Up: Base classes [Index]
I represent methods that have been compiled. I can recompile methods from their source code, I can invoke Emacs to edit the source code for one of my instances, and I know how to access components of my instances.
• CompiledMethod class-c call-outs: | (class) | |
• CompiledMethod class-instance creation: | (class) | |
• CompiledMethod class-lean images: | (class) | |
• CompiledMethod-accessing: | (instance) | |
• CompiledMethod-attributes: | (instance) | |
• CompiledMethod-basic: | (instance) | |
• CompiledMethod-c call-outs: | (instance) | |
• CompiledMethod-compiling: | (instance) | |
• CompiledMethod-invoking: | (instance) | |
• CompiledMethod-printing: | (instance) | |
• CompiledMethod-saving and loading: | (instance) | |
• CompiledMethod-source code: | (instance) | |
• CompiledMethod-testing: | (instance) |
Next: CompiledMethod class-instance creation, Up: CompiledMethod [Index]
Return a CompiledMethod corresponding to a #asyncCCall:args: pragma with the given arguments.
Return a CompiledMethod corresponding to a #cCall:returning:args: pragma with the given arguments.
Next: CompiledMethod class-lean images, Previous: CompiledMethod class-c call-outs, Up: CompiledMethod [Index]
Answer a full fledged CompiledMethod. Construct the method header from the parameters, and set the literals and bytecodes to the provided ones. Also, the bytecodes are optimized and any embedded CompiledBlocks modified to refer to these literals and to the newly created CompiledMethod.
Create a user-defined method (one that is sent #valueWithReceiver:withArguments: when it is invoked) with numArgs arguments. This only makes sense when called for a subclass of CompiledMethod.
Next: CompiledMethod-accessing, Previous: CompiledMethod class-instance creation, Up: CompiledMethod [Index]
Remove all the references to method source code from the system
Next: CompiledMethod-attributes, Previous: CompiledMethod class-lean images, Up: CompiledMethod [Index]
Evaluate aBlock, passing to it all the CompiledBlocks it holds
Answer the literals referred to by the receiver and all the blocks in it
Private - Answer the optimization flags for the receiver
Answer whether the method was written with the old (chunk-format) syntax
Answer the receiver, since it is already a method.
Answer the method category
Set the method category to the given string
Answer the class in which the receiver is installed.
Set the receiver’s class instance variable
Remember that the method is written with the old (chunk-format) syntax
Answer the number of arguments for the receiver
Answer the number of temporaries for the receiver
Answer the primitive called by the receiver
Answer the selector through which the method is called
Set the selector through which the method is called
Answer the delta from the numbers in LINE_NUMBER bytecodes to source code line numbers.
Answer the number of stack slots needed for the receiver
Evaluate aBlock, passing the receiver and all the CompiledBlocks it holds
Answer either the receiver or a copy of it, with the method class set to class
Answer either the receiver or a copy of it, with the method class set to class
Next: CompiledMethod-basic, Previous: CompiledMethod-accessing, Up: CompiledMethod [Index]
Return a Message for the first attribute named aSymbol defined by the receiver, or answer an error if none was found.
Return a Message for the first attribute named aSymbol defined by the receiver, or evaluate aBlock is none was found.
Return an Array of Messages, one for each attribute defined by the receiver.
Evaluate aBlock once for each attribute defined by the receiver, passing a Message each time.
If the receiver has any attributes, answer true.
If the receiver defines a primitive, return a Message resembling the attribute that was used to define it.
Next: CompiledMethod-c call-outs, Previous: CompiledMethod-attributes, Up: CompiledMethod [Index]
Answer whether the receiver and aMethod are equal
Answer an hash value for the receiver
Next: CompiledMethod-compiling, Previous: CompiledMethod-basic, Up: CompiledMethod [Index]
Answer whether I appear to have the valid flags, information, and ops to invoke a C function and answer its result.
Not commented.
Not commented.
Not commented.
Next: CompiledMethod-invoking, Previous: CompiledMethod-c call-outs, Up: CompiledMethod [Index]
Answer the method source code as a string, formatted using the RBFormatter. Requires package Parser.
Answer the parse tree for the receiver, or nil if there is an error. Requires package Parser.
Answer a parser class, similar to Behavior>>parserClass, that can parse my source code. Requires package Parser.
Recompile the method in the scope of the class where it leaves.
Recompile the method in the scope of the class where it leaves, notifying errors to aNotifier by sending it #error:.
Next: CompiledMethod-printing, Previous: CompiledMethod-compiling, Up: CompiledMethod [Index]
Execute the method within anObject, passing the elements of the args Array as parameters. The method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
If the flags field of the method header is 6, this method instead provides a hook from which the virtual machine can call back whenever execution of the method is requested. In this case, invoking the method would cause an infinite loop (the VM asks the method to run, the method asks the VM to invoke it, and so on), so this method fails with a #subclassResponsibility error.
Next: CompiledMethod-saving and loading, Previous: CompiledMethod-invoking, Up: CompiledMethod [Index]
Print the receiver’s class and selector on aStream
Print code to create the receiver on aStream
Next: CompiledMethod-source code, Previous: CompiledMethod-printing, Up: CompiledMethod [Index]
This method is implemented to allow for a PluggableProxy to be used with CompiledMethods. Answer a DirectedMessage which sends #>> to the class object containing the receiver.
Next: CompiledMethod-testing, Previous: CompiledMethod-saving and loading, Up: CompiledMethod [Index]
Answer the method source code as a string, ensuring that it is in new syntax (it has brackets).
Answer the method source code (a FileSegment or String or nil)
Answer the file where the method source code is stored
Answer the location where the method source code is stored in the methodSourceFile
Answer the method source code as a string
Previous: CompiledMethod-source code, Up: CompiledMethod [Index]
Answer whether the receiver or the blocks it contains accesses the instance variable with the given index
Answer whether the receiver or the blocks it contains writes to the instance variable with the given index
Answer whether the receiver is abstract.
Answer whether the receiver or the blocks it contains reads to the instance variable with the given index
Answer whether the receiver or the blocks it contains have sends to super
Next: Continuation, Previous: CompiledMethod, Up: Base classes [Index]
My instances represent executing Smalltalk code, which represent the local environment of executable code. They contain a stack and also provide some methods that can be used in inspection or debugging.
• ContextPart class-built ins: | (class) | |
• ContextPart class-exception handling: | (class) | |
• ContextPart-accessing: | (instance) | |
• ContextPart-built ins: | (instance) | |
• ContextPart-copying: | (instance) | |
• ContextPart-debugging: | (instance) | |
• ContextPart-enumerating: | (instance) | |
• ContextPart-printing: | (instance) | |
• ContextPart-security checks: | (instance) |
Next: ContextPart class-exception handling, Up: ContextPart [Index]
Return the value of the thisContext variable. Called internally when the variable is accessed.
Next: ContextPart-accessing, Previous: ContextPart class-built ins, Up: ContextPart [Index]
Print a backtrace from the caller to the bottom of the stack on the Transcript
Print a backtrace from the caller to the bottom of the stack on aStream
Next: ContextPart-built ins, Previous: ContextPart class-exception handling, Up: ContextPart [Index]
Answer the index-th slot in the receiver. Any read access from (self size + 1) to (self basicSize) will give nil.
Answer the index-th slot in the receiver. Any write access from (self size + 1) to (self basicSize) will give an error unless nil is being written. This is because doing such an access first, and then updating sp, is racy: the garbage collector may trigger in the middle and move anObject, but the slot in the context won’t be adjusted.
Answer the client of this context, that is, the object that sent the message that created this context. Fail if the receiver has no parent
Answer the name of the file where the method source code is
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context whose selector is nil and which can be used as a marker for the current execution environment. This method answers that context. For processes, it answers the process block itself
Answer the MethodContext to which the receiver refers
Answer the value of the instruction pointer when execution starts in the current context
Answer the current instruction pointer into the receiver
Set the instruction pointer for the receiver
Answer whether the receiver is a block context
Answers whether the context is skipped when doing a return. Contexts are marked as disabled whenever a non-local return is done (either by returning from the enclosing method of a block, or with the #continue: method of ContextPart) and there are unwind contexts such as those created by #ensure:. All non-unwind contexts are then marked as disabled.
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context which invokes a special “termination” method. Such a context can be used as a marker for the current execution environment. Answer whether the receiver is that kind of context.
Answer whether the receiver represents a process context, i.e. a context created by BlockClosure>>#newProcess. Such a context can be recognized because it has no parent but its flags are different from those of the contexts created by the VM’s prepareExecutionEnvironment function.
Answers whether the context must continue execution even after a non-local return (a return from the enclosing method of a block, or a call to the #continue: method of ContextPart). Such contexts are created by #ensure:.
Return the CompiledMethod being executed
Return the class in which the CompiledMethod being executed is defined
Answer the number of arguments passed to the receiver
Answer the number of temporaries used by the receiver
Answer the context that called the receiver
Set the context to which the receiver will return
Push an object on the receiver’s stack.
Return the receiver (self) for the method being executed
Return the selector for the method being executed
Answer the number of valid fields for the receiver. Any read access from (self size + 1) to (self basicSize) will give nil.
Answer the current stack pointer into the receiver
Set the stack pointer for the receiver.
Answer how many elements in the receiver should be inspected
Next: ContextPart-copying, Previous: ContextPart-accessing, Up: ContextPart [Index]
Resume execution from the receiver, faking that the context on top of it in the execution chain has returned anObject. The receiver must belong to the same process as the executing context, otherwise the results are not predictable. All #ensure: (and possibly #ifCurtailed:) blocks between the currently executing context and the receiver are evaluated (which is not what would happen if you directly bashed at the parent context of thisContext).
Next: ContextPart-debugging, Previous: ContextPart-built ins, Up: ContextPart [Index]
Answer a copy of the entire stack.
Answer a copy of the entire stack, but don’t copy any of the other instance variables of the context.
Next: ContextPart-enumerating, Previous: ContextPart-copying, Up: ContextPart [Index]
Answer the 1-based number of the line that is pointed to by the receiver’s instruction pointer. The DebugTools package caches information, thus making the implementation faster.
Answer the 1-based number of the line that is pointed to by the receiver’s instruction pointer, relative to the method’s file. The implementation is slow unless the DebugTools package is loaded.
Answer the debugger that is attached to the given context. It is always nil unless the DebugTools package is loaded.
Answer which debugger should be used to debug the current context chain. The class with the highest debugging priority is picked among those mentioned in the chain.
Answer whether the receiver is a context that should be hidden to the user when presenting a backtrace.
Next: ContextPart-printing, Previous: ContextPart-debugging, Up: ContextPart [Index]
Scan the backtrace for contexts whose selector is among those listed in selectors; if one is found, invoke aBlock passing the context.
Scan the backtrace for contexts which have the attribute selector listed in selectors; if one is found, invoke aBlock passing the context and the attribute.
Next: ContextPart-security checks, Previous: ContextPart-enumerating, Up: ContextPart [Index]
Print a backtrace from the receiver to the bottom of the stack on the Transcript.
Print a backtrace from the caller to the bottom of the stack on aStream.
Previous: ContextPart-printing, Up: ContextPart [Index]
Answer the receiver.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Next: CPtr, Previous: ContextPart, Up: Base classes [Index]
At my heart, I am something like the goto instruction; my creation sets the label, and my methods do the jump. However, this is a really powerful kind of goto instruction. If your hair is turning green at this point, don’t worry as you will probably only deal with users of continuations, rather than with the concept itself.
• Continuation class-instance creation: | (class) | |
• Continuation-invocation: | (instance) |
Next: Continuation-invocation, Up: Continuation [Index]
Return a continuation.
Pass a continuation to the one-argument block, aBlock and return the result of evaluating it.
Pass a continuation to the one-argument block, knowing that aBlock does not fall off (either because it includes a method return, or because it yields control to another continuation). If it does, an exception will be signalled and the current process terminated.
Previous: Continuation class-instance creation, Up: Continuation [Index]
Activate the original continuation, passing back in turn a continuation for the caller. The called continuation becomes unusable, and any attempt to reactivate it will cause an exception. This is not a limitation, in general, because this method is used to replace a continuation with another (see the implementation of the Generator class).
Return nil to the original continuation, which becomes unusable. Attempting to reactivate it will cause an exception. This is an optimization over #value.
Return anObject to the original continuation, which becomes unusable. Attempting to reactivate it will cause an exception. This is an optimization over #value:.
Return nil to the original continuation, copying the stack to allow another activation.
Return anObject to the original continuation, copying the stack to allow another activation.
Return the sole element of aCollection to the original continuation (or nil if aCollection is empty), copying the stack to allow another activation
Next: CPtrCType, Previous: Continuation, Up: Base classes [Index]
• CPtr-accessing: | (instance) |
Answer the receiver’s required aligment
Answer the receiver’s size
Answer the address of the location pointed to by the receiver.
Set the address of the location pointed to by the receiver to anObject, which can be either an Integer or a CObject. if anObject is an Integer, it is interpreted as a 32-bit or 64-bit address. If it is a CObject, its address is stored.
Next: CScalar, Previous: CPtr, Up: Base classes [Index]
• CPtrCType class-instance creation: | (class) | |
• CPtrCType-accessing: | (instance) | |
• CPtrCType-basic: | (instance) | |
• CPtrCType-storing: | (instance) |
Next: CPtrCType-accessing, Up: CPtrCType [Index]
Answer a new instance of CPtrCType that maps pointers to the given CType
Private - Called by computeAggregateType: for pointers
Next: CPtrCType-basic, Previous: CPtrCType class-instance creation, Up: CPtrCType [Index]
Answer the type of the elements in the receiver’s instances
Next: CPtrCType-storing, Previous: CPtrCType-accessing, Up: CPtrCType [Index]
Return whether the receiver and anObject are equal.
Return a hash code for the receiver.
Previous: CPtrCType-basic, Up: CPtrCType [Index]
Not commented.
Next: CScalarCType, Previous: CPtrCType, Up: Base classes [Index]
• CScalar class-instance creation: | (class) | |
• CScalar-accessing: | (instance) |
Next: CScalar-accessing, Up: CScalar [Index]
Answer a newly allocated CObject containing the passed value, anObject, in garbage-collected storage.
Answer a CType for the receiver—for example, CByteType if the receiver is CByte.
Answer a newly allocated CObject containing the passed value, anObject. Remember to call #addToBeFinalized if you want the CObject to be automatically freed
Previous: CScalar class-instance creation, Up: CScalar [Index]
Private - Provide a conversion from a CObject to a Smalltalk object to be stored by #at:put:
Answer the value the receiver is pointing to. The exact returned value depends on the receiver’s class
Set the receiver to point to the value, aValue. The exact meaning of aValue depends on the receiver’s class
Next: CShort, Previous: CScalar, Up: Base classes [Index]
• CScalarCType-accessing: | (instance) | |
• CScalarCType-storing: | (instance) |
Next: CScalarCType-storing, Up: CScalarCType [Index]
valueType is used as a means to communicate to the interpreter the underlying type of the data. For scalars, it is supplied by the CObject subclass.
Previous: CScalarCType-accessing, Up: CScalarCType [Index]
Store Smalltalk code that compiles to the receiver
Next: CSmalltalk, Previous: CScalarCType, Up: Base classes [Index]
• CShort class-accessing: | (class) | |
• CShort-accessing: | (instance) |
Next: CShort-accessing, Up: CShort [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CShort class-accessing, Up: CShort [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CString, Previous: CShort, Up: Base classes [Index]
• CSmalltalk class-accessing: | (class) | |
• CSmalltalk-accessing: | (instance) |
Next: CSmalltalk-accessing, Up: CSmalltalk [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CSmalltalk class-accessing, Up: CSmalltalk [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CStringCType, Previous: CSmalltalk, Up: Base classes [Index]
Technically, CString is really a pointer to CChar. However, it can be very useful as a distinct datatype because it is a separate datatype in Smalltalk, so we allow developers to express their semantics more precisely by using a more descriptive type.
Note that like CChar is a pointer to char, CString is actually a *pointer* to string: a char ** in C terms. If you need to take a String out of a char *, use CChar>>#asString.
In general, I behave like a cross between an array of characters and a pointer to a character. I provide the protocol for both data types. My #value method returns a Smalltalk String, as you would expect for a scalar datatype.
• CString class-accessing: | (class) | |
• CString class-instance creation: | (class) | |
• CString-accessing: | (instance) |
Next: CString class-instance creation, Up: CString [Index]
Private - Provide a conversion from a CObject to a Smalltalk object to be stored by #at:put:
Next: CString-accessing, Previous: CString class-accessing, Up: CString [Index]
Answer a CType for the receiver—for example, CByteType if the receiver is CByte.
Answer a newly allocated CObject containing the passed value, anObject. Remember to call #addToBeFinalized if you want the CObject to be automatically freed
Previous: CString class-instance creation, Up: CString [Index]
Private - Provide a conversion from a CObject to a Smalltalk object to be stored by #at:put:
Answer the value the receiver is pointing to. The exact returned value depends on the receiver’s class
Set the receiver to point to the value, aValue. The exact meaning of aValue depends on the receiver’s class
Next: CStruct, Previous: CString, Up: Base classes [Index]
• CStringCType-accessing: | (instance) |
Up: CStringCType [Index]
Answer the type of the elements in the receiver’s instances
Next: CType, Previous: CStringCType, Up: Base classes [Index]
• CStruct class-subclass creation: | (class) |
Compile methods that implement the declaration in array.
Next: CUChar, Previous: CStruct, Up: Base classes [Index]
I am not part of the standard Smalltalk kernel class hierarchy. I contain type information used by subclasses of CObject, which represents external C data items.
My only instance variable, cObjectType, is used to hold onto the CObject subclass that gets created for a given CType. Used primarily in the C part of the interpreter because internally it cannot execute methods to get values, so it has a simple way to access instance variable which holds the desired subclass.
My subclasses have instances which represent the actual data types; for the scalar types, there is only one instance created of each, but for the aggregate types, there is at least one instance per base type and/or number of elements.
• CType class-C instance creation: | (class) | |
• CType class-initialization: | (class) | |
• CType-accessing: | (instance) | |
• CType-basic: | (instance) | |
• CType-C instance creation: | (instance) | |
• CType-storing: | (instance) |
Next: CType class-initialization, Up: CType [Index]
Create a new CType for the given subclass of CObject
Create a new CType for the given subclass of CObject
Private - Called by from: for pointers/arrays. Format of type: (#array #int 3) or (#ptr #{FooStruct})
Private - Pass the size, alignment, and description of CType for aBlock, given the field description in ‘type’ (the second element of each pair).
Next: CType-accessing, Previous: CType class-C instance creation, Up: CType [Index]
Initialize the receiver’s TypeMap
Next: CType-basic, Previous: CType class-initialization, Up: CType [Index]
Answer the size of the receiver’s instances
Answer a CArrayCType which represents an array with the given size of CObjects whose type is in turn represented by the receiver
Answer the CObject subclass whose instance is created when new is sent to the receiver
Allocate a new CObject with room for anInteger C objects of the type (class) identified by the receiver. It is the caller’s responsibility to free the memory allocated for it.
Answer a CPtrCType which represents a pointer to CObjects whose type is in turn represented by the receiver
Answer the size of the receiver’s instances
valueType is used as a means to communicate to the interpreter the underlying type of the data. For anything but scalars, it’s just ’self’
Next: CType-C instance creation, Previous: CType-accessing, Up: CType [Index]
Return whether the receiver and anObject are equal.
Return a hash code for the receiver.
Next: CType-storing, Previous: CType-basic, Up: CType [Index]
Create a new CObject with the type (class) identified by the receiver, pointing to the given address (identified by an Integer or CObject).
Allocate a new CObject with the type (class) identified by the receiver. The object is movable in memory, but on the other hand it is garbage-collected automatically.
Allocate a new CObject with room for anInteger C object of the type (class) identified by the receiver. The object is movable in memory, but on the other hand it is garbage-collected automatically.
Allocate a new CObject with the type (class) identified by the receiver. It is the caller’s responsibility to free the memory allocated for it.
Previous: CType-C instance creation, Up: CType [Index]
Store Smalltalk code that compiles to the receiver
Next: CUInt, Previous: CType, Up: Base classes [Index]
• CUChar class-getting info: | (class) | |
• CUChar-accessing: | (instance) |
Next: CUChar-accessing, Up: CUChar [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CUChar class-getting info, Up: CUChar [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CULong, Previous: CUChar, Up: Base classes [Index]
• CUInt class-accessing: | (class) | |
• CUInt-accessing: | (instance) |
Next: CUInt-accessing, Up: CUInt [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CUInt class-accessing, Up: CUInt [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CULongLong, Previous: CUInt, Up: Base classes [Index]
• CULong class-accessing: | (class) | |
• CULong-accessing: | (instance) |
Next: CULong-accessing, Up: CULong [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CULong class-accessing, Up: CULong [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CUnion, Previous: CULong, Up: Base classes [Index]
• CULongLong class-accessing: | (class) | |
• CULongLong-accessing: | (instance) |
Next: CULongLong-accessing, Up: CULongLong [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CULongLong class-accessing, Up: CULongLong [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: CUShort, Previous: CULongLong, Up: Base classes [Index]
• CUnion class-subclass creation: | (class) |
Compile methods that implement the declaration in array.
Next: Date, Previous: CUnion, Up: Base classes [Index]
• CUShort class-accessing: | (class) | |
• CUShort-accessing: | (instance) |
Next: CUShort-accessing, Up: CUShort [Index]
Answer the receiver’s instances required aligment
Private - Answer an index referring to the receiver’s instances scalar type
Answer the receiver’s instances size
Previous: CUShort class-accessing, Up: CUShort [Index]
Answer the receiver’s required aligment
Private - Answer an index referring to the receiver’s scalar type
Answer the receiver’s size
Next: DateTime, Previous: CUShort, Up: Base classes [Index]
My instances represent dates. My base date is defined to be Jan 1, 1901. I provide methods for instance creation (including via "symbolic" dates, such as "Date newDay: 14 month: #Feb year: 1990".
PLEASE BE WARNED – use this class only for dates after 1582 AD; that’s the beginning of the epoch. Dates before 1582 will not be correctly printed. In addition, since ten days were lost from October 5 through October 15, operations between a Gregorian date (after 15-Oct-1582) and a Julian date (before 5-Oct-1582) will give incorrect results; or, 4-Oct-1582 + 2 days will yield 6-Oct-1582 (a non-existent day!), not 16-Oct-1582.
In fact, if you pass a year < 1582 to a method like #newDay:month:year: it will assume that it is a two-digit year (e.g. 90=1990, 1000=2900). The only way to create Julian calendar dates is with the #fromDays: instance creation method.
• Date class-basic: | (class) | |
• Date class-instance creation (ANSI): | (class) | |
• Date class-instance creation (Blue Book): | (class) | |
• Date-basic: | (instance) | |
• Date-compatibility (non-ANSI): | (instance) | |
• Date-date computations: | (instance) | |
• Date-printing: | (instance) | |
• Date-still unclassified: | (instance) | |
• Date-storing: | (instance) | |
• Date-testing: | (instance) |
Next: Date class-instance creation (ANSI), Up: Date [Index]
Answer the abbreviated name of the day of week corresponding to the given index
Answer the index of the day of week corresponding to the given name
Answer the number of days in the given (named) month for the given year
Answer the number of days in the given year
Answer the index of the month corresponding to the given name
Initialize the DayNameDict to the names of the days
Initialize the MonthNameDict to the names of the months
Initialize the receiver
Answer the name of the day of week corresponding to the given index
Answer the name of the month corresponding to the given index
Answer the name of the month corresponding to the given index
Next: Date class-instance creation (Blue Book), Previous: Date class-basic, Up: Date [Index]
Answer a Date denoting the d-th day of the given year
Answer a Date denoting the d-th day of the given (as a number) month and year
Next: Date-basic, Previous: Date class-instance creation (ANSI), Up: Date [Index]
Answer an array containing the current date and time
Answer a Date denoting dayCount days past 1/1/1901
Answer a Date denoting the jd-th day in the astronomical Julian calendar.
Answer a Date denoting the date time seconds past Jan 1st, 1901
Answer a Date denoting the dayCount day of the given (named) month and year
Answer a Date denoting the dayCount day of the given (as a number) month and year
Answer a Date denoting the dayCount day of the yearInteger year
Parse an instance of the receiver from aStream
Answer a Date denoting the current date in local time
Answer an array containing the current date and time in Coordinated Universal Time (UTC)
Answer a Date denoting the current date in Coordinated Universal Time (UTC)
Next: Date-compatibility (non-ANSI), Previous: Date class-instance creation (Blue Book), Up: Date [Index]
Answer a new Duration counting the number of days between the receiver and aDate.
Answer a new Date pointing dayCount past the receiver
Answer the number of days between aDate and the receiver (negative if the receiver is before aDate)
Answer a new Date pointing dayCount before the receiver
Next: Date-date computations, Previous: Date-basic, Up: Date [Index]
Answer the day represented by the receiver
Answer the day of week of the receiver as a Symbol
Answer the abbreviated name of the month represented by the receiver
Next: Date-printing, Previous: Date-compatibility (non-ANSI), Up: Date [Index]
Answer the date as the number of seconds from 1/1/1901.
Answer the day represented by the receiver (same as #day)
Answer the day of week of the receiver. 1 = Monday, 7 = Sunday
Answer the day of week of the receiver as a Symbol
Answer the day of week of the receiver as a Symbol
Answer the days passed since 31/12 of last year; e.g. New Year’s Day is 1
Answer the days passed since 1/1/1901
Answer the days in the month represented by the receiver
Answer the days in the year represented by the receiver
Answer the days to the end of the month represented by the receiver
Answer the days to the end of the year represented by the receiver
Answer a Date representing the first day of the month represented by the receiver
Answer whether the receiver refers to a date in a leap year.
Answer a Date representing the last day of the month represented by the receiver
Answer the index of the month represented by the receiver
Answer the abbreviated name of the month represented by the receiver
Answer the index of the month represented by the receiver
Answer the name of the month represented by the receiver
Answer the year represented by the receiver
Next: Date-still unclassified, Previous: Date-date computations, Up: Date [Index]
Print a representation for the receiver on aStream
Next: Date-storing, Previous: Date-printing, Up: Date [Index]
Answer a new Date or DateTime pointing aDuration time past the receiver.
Next: Date-testing, Previous: Date-still unclassified, Up: Date [Index]
Store on aStream Smalltalk code compiling to the receiver
Previous: Date-storing, Up: Date [Index]
Answer whether the receiver indicates a date preceding aDate
Answer whether the receiver indicates the same date as aDate
Answer an hash value for the receievr
Next: DeferredVariableBinding, Previous: Date, Up: Base classes [Index]
My instances represent timestamps.
• DateTime class-information: | (class) | |
• DateTime class-instance creation: | (class) | |
• DateTime class-instance creation (non-ANSI): | (class) | |
• DateTime-basic: | (instance) | |
• DateTime-computations: | (instance) | |
• DateTime-printing: | (instance) | |
• DateTime-splitting in dates & times: | (instance) | |
• DateTime-storing: | (instance) | |
• DateTime-testing: | (instance) | |
• DateTime-time zones: | (instance) |
Next: DateTime class-instance creation, Up: DateTime [Index]
Answer ‘ClockPrecision’.
Initialize the receiver’s class variables
Next: DateTime class-instance creation (non-ANSI), Previous: DateTime class-information, Up: DateTime [Index]
Answer an instance of the receiver referring to the current date and time.
Parse an instance of the receiver from aStream
Answer an instance of the receiver referring to midnight of today in local time.
Answer a DateTime denoting the d-th day of the given year, and setting the time part to the given hour, minute, and second
Answer a DateTime denoting the d-th day of the given year. Set the offset field to ofs (a Duration), and the time part to the given hour, minute, and second
Answer a DateTime denoting the d-th day of the given (as a number) month and year, setting the time part to the given hour, minute, and second
Answer a DateTime denoting the d-th day of the given (as a number) month and year. Set the offset field to ofs (a Duration), and the the time part to the given hour, minute, and second
Next: DateTime-basic, Previous: DateTime class-instance creation, Up: DateTime [Index]
Answer a DateTime denoting the given date and time. Set the offset field to ofs (a Duration).
Answer a DateTime denoting the given date and time. Set the offset field to ofs (a Duration).
Answer a DateTime denoting the given date (as days since January 1, 1901) and time (as seconds since UTC midnight).
Answer a DateTime denoting the given date (as days since January 1, 1901) and time (as seconds since midnight). Set the offset field to ofs (a Duration).
Answer a DateTime denoting the given date and time (as seconds since January 1, 1901 midnight UTC).
Answer a DateTime denoting the given date and time (as seconds since January 1, 1901 midnight). Set the offset field to ofs (a Duration).
Next: DateTime-computations, Previous: DateTime class-instance creation (non-ANSI), Up: DateTime [Index]
Answer a new Date pointing aDuration time past the receiver
Answer a new Date pointing dayCount before the receiver
Next: DateTime-printing, Previous: DateTime-basic, Up: DateTime [Index]
Answer the date as the number of seconds from 1/1/1901.
Answer the day of week of the receiver. Unlike Dates, DateAndTimes have 1 = Sunday, 7 = Saturday
Answer the hour in a 24-hour clock
Answer the hour in a 12-hour clock
Answer the hour in a 24-hour clock
Answer either #AM (for anti-meridian) or #PM (for post-meridian)
Answer the minute
Answer the month represented by the receiver
Next: DateTime-splitting in dates & times, Previous: DateTime-computations, Up: DateTime [Index]
Print a representation for the receiver on aStream
Next: DateTime-storing, Previous: DateTime-printing, Up: DateTime [Index]
Answer a Date referring to the same day as the receiver
Answer a Time referring to the same time (from midnight) as the receiver
Since in the past timestamps were referred to as Arrays containing a Date and a Time (in this order), this method provides access to DateTime objects like if they were two-element Arrays.
Next: DateTime-testing, Previous: DateTime-splitting in dates & times, Up: DateTime [Index]
Store on aStream Smalltalk code compiling to the receiver
Next: DateTime-time zones, Previous: DateTime-storing, Up: DateTime [Index]
Answer whether the receiver indicates a date preceding aDate
Answer whether the receiver indicates the same date as aDate
Answer an hash value for the receievr
Previous: DateTime-testing, Up: DateTime [Index]
Answer the receiver, since DateTime objects store themselves in Local time
Convert the receiver to UTC time, and answer a new DateTime object.
Answer the receiver’s offset from UTC to local time (e.g. +3600 seconds for Central Europe Time, -3600*6 seconds for Eastern Standard Time). The offset is expressed as a Duration
Answer a copy of the receiver with the offset from UTC to local time changed to anOffset (a Duration).
Answer an abbreviated indication of the receiver’s offset, expressed as ‘shhmm’, where ‘hh’ is the number of hours and ‘mm’ is the number of minutes between UTC and local time, and ‘s’ can be ‘+’ for the Eastern hemisphere and ‘-’ for the Western hemisphere.
Answer the time zone name for the receiver (currently, it is simply ‘GMT +xxxx’, where ‘xxxx’ is the receiver’s #timeZoneAbbreviation).
Next: Delay, Previous: DateTime, Up: Base classes [Index]
I represent a binding to a variable that is not tied to a particular dictionary until the first access. Then, lookup rules for global variables in the scope of a given class are used.
• DeferredVariableBinding class-basic: | (class) | |
• DeferredVariableBinding-basic: | (instance) | |
• DeferredVariableBinding-storing: | (instance) |
Next: DeferredVariableBinding-basic, Up: DeferredVariableBinding [Index]
Answer a binding that will look up aSymbol as a variable in aClass’s environment at first access. See #resolveBinding’s comment for aDictionary’s meaning.
As with #key:class:defaultDictionary:, but accepting an array of symbols, representing a namespace path, instead.
Next: DeferredVariableBinding-storing, Previous: DeferredVariableBinding class-basic, Up: DeferredVariableBinding [Index]
Answer the path followed after resolving the first key.
Answer a new instance of the receiver with the given key and value
Answer a new instance of the receiver with the given key and value
Previous: DeferredVariableBinding-basic, Up: DeferredVariableBinding [Index]
Put on aStream some Smalltalk code compiling to the receiver
Put on aStream some Smalltalk code compiling to the receiver
Next: DelayedAdaptor, Previous: DeferredVariableBinding, Up: Base classes [Index]
I am the ultimate agent for frustration in the world. I cause things to wait (sometimes much more than is appropriate, but it is those losing operating systems’ fault). When a process sends one of my instances a wait message, that process goes to sleep for the interval specified when the instance was created.
• Delay class-instance creation: | (class) | |
• Delay class-still unclassified: | (class) | |
• Delay class-timer process: | (class) | |
• Delay-accessing: | (instance) | |
• Delay-comparing: | (instance) | |
• Delay-copying: | (instance) | |
• Delay-delaying: | (instance) | |
• Delay-initialization: | (instance) | |
• Delay-instance creation: | (instance) | |
• Delay-testing: | (instance) | |
• Delay-timeout: | (instance) |
Next: Delay class-still unclassified, Up: Delay [Index]
Answer a Delay waiting for millisecondCount milliseconds
Answer a Delay waiting for nanosecondCount nanoseconds
Answer a Delay waiting for secondCount seconds
Answer a Delay waiting until millisecondCount milliseconds after startup
Answer a Delay waiting until nanosecondCount nanoseconds after startup
Next: Delay class-timer process, Previous: Delay class-instance creation, Up: Delay [Index]
Prime the timer event loop when the image starts running.
Next: Delay-accessing, Previous: Delay class-still unclassified, Up: Delay [Index]
Return the delay at the head of the queue.
Handle a timer event; which can be either: - a schedule or unschedule request (DelayRequestor notNil) - a timer signal (not explicitly specified) We check for timer expiry every time we get a signal.
Run the timer event loop.
Private - Schedule this Delay. Run in the timer process, which is the only one that manipulates Queue.
Start the timer event loop.
Private - Unschedule this Delay. Run in the timer process, which is the only one that manipulates Queue.
Next: Delay-comparing, Previous: Delay class-timer process, Up: Delay [Index]
Answer a delay that waits until the current delay’s resumptionTime, or delayDuration milliseconds from now if that would be nil. May answer the receiver if it is already waiting until an absolute time.
Answer the time I have left to wait, in milliseconds.
Answer whether the receiver waits until an absolute time on the millisecond clock.
Answer ‘resumptionTime’.
Next: Delay-copying, Previous: Delay-accessing, Up: Delay [Index]
Answer whether the receiver and aDelay denote the same delay
Answer an hash value for the receiver
Next: Delay-delaying, Previous: Delay-comparing, Up: Delay [Index]
Adjust the current delay so that it behaves as if it had just been created.
Next: Delay-initialization, Previous: Delay-copying, Up: Delay [Index]
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created, or until aSemaphore is signaled.
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created.
Next: Delay-instance creation, Previous: Delay-delaying, Up: Delay [Index]
Initialize a Delay waiting for millisecondCount milliseconds
Next: Delay-testing, Previous: Delay-initialization, Up: Delay [Index]
Initialize a Delay waiting for millisecondCount milliseconds after startup
Next: Delay-timeout, Previous: Delay-instance creation, Up: Delay [Index]
Answer whether this Delay is being waited on.
Previous: Delay-testing, Up: Delay [Index]
Execute aBlock for up to the time of my own delay; in case the code did not finish abort the execution, unwind the block and then evaluate aTimeoutBlock.
Next: Dictionary, Previous: Delay, Up: Base classes [Index]
I can be used where many expensive updates must be performed. My instances buffer the last value that was set, and only actually set the value when the #trigger message is sent. Apart from this, I’m equivalent to PluggableAdaptor.
• DelayedAdaptor-accessing: | (instance) |
Up: DelayedAdaptor [Index]
Really set the value of the receiver.
Get the value of the receiver.
Set the value of the receiver - actually, the value is cached and is not set until the #trigger method is sent.
Next: DirectedMessage, Previous: DelayedAdaptor, Up: Base classes [Index]
I implement a dictionary, which is an object that is indexed by unique objects (typcially instances of Symbol), and associates another object with that index. I use the equality operator = to determine equality of indices.
In almost all places where you would use a plain Dictionary, a LookupTable would be more efficient; see LookupTable’s comment before you use it. I do have a couple of special features that are useful in certain special cases.
• Dictionary class-instance creation: | (class) | |
• Dictionary-accessing: | (instance) | |
• Dictionary-awful ST-80 compatibility hacks: | (instance) | |
• Dictionary-compilation: | (instance) | |
• Dictionary-dictionary enumerating: | (instance) | |
• Dictionary-dictionary removing: | (instance) | |
• Dictionary-dictionary testing: | (instance) | |
• Dictionary-namespace protocol: | (instance) | |
• Dictionary-printing: | (instance) | |
• Dictionary-rehashing: | (instance) | |
• Dictionary-removing: | (instance) | |
• Dictionary-storing: | (instance) | |
• Dictionary-testing: | (instance) |
Next: Dictionary-accessing, Up: Dictionary [Index]
Answer a new dictionary created from the keys and values of Associations in anArray, such as {1 -> 2. 3 -> 4}. anArray should be specified using brace-syntax.
Create a new dictionary with a default size
Next: Dictionary-awful ST-80 compatibility hacks, Previous: Dictionary class-instance creation, Up: Dictionary [Index]
Add the newObject association to the receiver
Adds all the elements of ’aCollection’ to the receiver, answer aCollection
Answer the key/value Association for the given key. Fail if the key is not found
Answer the key/value Association for the given key. Evaluate aBlock (answering the result) if the key is not found
Returns the content of a Dictionary as a Set of Associations.
Answer the value associated to the given key. Fail if the key is not found
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
Answer the value associated to the given key. If the key is not found, evaluate aBlock and associate the result to aKey before returning.
If aKey is absent, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation
Store value as associated to the given key
Answer a Dictionary that only includes the given keys. Fail if any of them is not found
Answer the key associated to the given value, or nil if the value is not found
Answer the key associated to the given value. Evaluate exceptionBlock (answering the result) if the value is not found. IMPORTANT: == is used to compare values
Answer a kind of Set containing the keys of the receiver
Answer an Array containing the values of the receiver
Next: Dictionary-compilation, Previous: Dictionary-accessing, Up: Dictionary [Index]
Tries to see if key exists as a the key of an indexed variable. As soon as nil or an association with the correct key is found, the index of that slot is answered
Next: Dictionary-dictionary enumerating, Previous: Dictionary-awful ST-80 compatibility hacks, Up: Dictionary [Index]
Answer the dictionary that is used when the receiver is before a period in Smalltalk source code.
Next: Dictionary-dictionary removing, Previous: Dictionary-compilation, Up: Dictionary [Index]
Pass each association in the dictionary to aBlock
Answer a new dictionary where the keys are the same and the values are obtained by passing each value to aBlock and collecting the return values
Pass each value in the dictionary to aBlock
Pass each key/value pair in the dictionary as two distinct parameters to aBlock
Pass each key in the dictionary to aBlock
Answer a new dictionary containing the key/value pairs for which aBlock returns false. aBlock only receives the value part of the pairs.
Answer a new dictionary containing the key/value pairs for which aBlock returns true. aBlock only receives the value part of the pairs.
Next: Dictionary-dictionary testing, Previous: Dictionary-dictionary enumerating, Up: Dictionary [Index]
Remove anAssociation’s key from the dictionary
Remove anAssociation’s key from the dictionary
Remove all the keys in keys, without raising any errors
Remove all the keys in keys, passing the missing keys as parameters to aBlock as they’re encountered
Remove the passed key from the dictionary, fail if it is not found
Remove the passed key from the dictionary, answer the result of evaluating aBlock if it is not found
Next: Dictionary-namespace protocol, Previous: Dictionary-dictionary removing, Up: Dictionary [Index]
Answer whether the receiver contains anObject as one of its values
Answer whether the receiver contains the key which is anAssociation’s key and its value is anAssociation’s value
Answer whether the receiver contains the given key
Answer whether the number of occurrences of aValue as one of the receiver’s values
Next: Dictionary-printing, Previous: Dictionary-dictionary testing, Up: Dictionary [Index]
Answer all the receiver’s superspaces in a collection
Evaluate aBlock once for each of the receiver’s superspaces (which is none for BindingDictionary).
Answer a kind of Set containing the keys of the receiver
Answer whether the receiver defines the given key. ‘Defines’ means that the receiver’s superspaces, if any, are not considered.
Return the association for the variable named as specified by ‘key’ *in this namespace*. If the key is not found search will *not* be carried on in superspaces and the method will fail.
Return the association for the variable named as specified by ‘key’ *in this namespace*. If the key is not found search will *not* be carried on in superspaces and aBlock will be immediately evaluated.
Return the value associated to the variable named as specified by ‘key’ *in this namespace*. If the key is not found search will *not* be carried on in superspaces and the method will fail.
Return the value associated to the variable named as specified by ‘key’ *in this namespace*. If the key is not found search will *not* be carried on in superspaces and aBlock will be immediately evaluated.
Answer whether aNamespace is one of the receiver’s direct and indirect superspaces
Answer the receiver’s superspace, which is nil for BindingDictionary.
Answer the receiver and all of its superspaces in a collection, which is none for BindingDictionary
Invokes aBlock for the receiver and all superspaces, both direct and indirect (though a BindingDictionary does not have any).
Next: Dictionary-rehashing, Previous: Dictionary-namespace protocol, Up: Dictionary [Index]
Print all the instance variables and objects in the receiver on aStream
Print a representation of the receiver on aStream
Next: Dictionary-removing, Previous: Dictionary-printing, Up: Dictionary [Index]
Rehash the receiver
Next: Dictionary-storing, Previous: Dictionary-rehashing, Up: Dictionary [Index]
Remove from the receiver all keys for which aBlock returns true.
Next: Dictionary-testing, Previous: Dictionary-removing, Up: Dictionary [Index]
Print Smalltalk code compiling to the receiver on aStream
Previous: Dictionary-storing, Up: Dictionary [Index]
Answer whether the receiver and aDictionary are equal
Answer the hash value for the receiver
Next: Directory, Previous: Dictionary, Up: Base classes [Index]
I represent a message send: I contain the receiver, selector and arguments for a message.
• DirectedMessage class-creating instances: | (class) | |
• DirectedMessage-accessing: | (instance) | |
• DirectedMessage-basic: | (instance) | |
• DirectedMessage-multiple process: | (instance) | |
• DirectedMessage-saving and loading: | (instance) |
Next: DirectedMessage-accessing, Up: DirectedMessage [Index]
Create a new instance of the receiver
Create a new instance of the receiver
Create a new instance of the receiver
This method should not be called for instances of this class.
Create a new instance of the receiver
Next: DirectedMessage-basic, Previous: DirectedMessage class-creating instances, Up: DirectedMessage [Index]
Answer the receiver
Change the receiver
Next: DirectedMessage-multiple process, Previous: DirectedMessage-accessing, Up: DirectedMessage [Index]
Print a representation of the receiver on aStream
Send the message
Send the message (this message provides interoperability between DirectedMessages and blocks)
Send the message with the sole argument anObject (this message provides interoperability between DirectedMessages and blocks)
Send the message with the arguments obj1 and obj2 (this message provides interoperability between DirectedMessages and blocks)
Send the message with the arguments replaced by anArray (this message provides interoperability between DirectedMessages and blocks)
Next: DirectedMessage-saving and loading, Previous: DirectedMessage-basic, Up: DirectedMessage [Index]
Create a new process executing the receiver and start it
Create a new process executing the receiver with given priority and start it
Create a new process executing the receiver in suspended state. The priority is the same as for the calling process. The receiver must not contain returns
Previous: DirectedMessage-multiple process, Up: DirectedMessage [Index]
This method is used when DirectedMessages are used together with PluggableProxies (see ObjectDumper). It sends the receiver to reconstruct the object that was originally stored.
Next: DLD, Previous: DirectedMessage, Up: Base classes [Index]
I am the counterpart of File in a tree-structured file system. I provide the notion of a current working directory and know several well-known places in the file system.
However, all navigation methods for directories are under FilePath or File for efficiency reasons. Refer to the manual of FilePath for information on how to use the instances returned by my class methods.
• Directory class-file name management: | (class) | |
• Directory class-file operations: | (class) | |
• Directory class-reading system defaults: | (class) |
Next: Directory class-file operations, Up: Directory [Index]
Answer the name of a file named ‘fileName’ which resides in a directory named ‘directory’.
Answer (as a Character) the character used to separate directory names
Answer (in a String) the character used to separate directory names
Next: Directory class-reading system defaults, Previous: Directory class-file name management, Up: Directory [Index]
Invoke #allFilesMatching:do: on the current working directory.
Create a directory named dirName and answer it.
Create an empty directory whose name starts with prefix and answer it.
Answer the current working directory, not following symlinks.
Change the current working directory to dirName.
Previous: Directory class-file operations, Up: Directory [Index]
Answer the path to GNU Smalltalk’s executable installation prefix
Answer the path to the user’s home directory
Answer the path to GNU Smalltalk’s image file
Answer the path in which a local version of the GNU Smalltalk kernel’s Smalltalk source files were searched when the image was created.
Answer the path to GNU Smalltalk’s auxiliary executables
Answer the path to the GNU Smalltalk kernel’s Smalltalk source files. Same as ‘Directory kernel’ since GNU Smalltalk 3.0.
Answer the path to GNU Smalltalk’s dynamically loaded modules
Answer the path to GNU Smalltalk’s installation prefix
Answer the path to the installed Smalltalk kernel source files.
Answer the path in which temporary files can be created. This is read from the environment, and guessed if that fails.
Answer the base path under which file for user customization of GNU Smalltalk are stored.
Next: DumperProxy, Previous: Directory, Up: Base classes [Index]
...and Gandalf said: “Many folk like to know beforehand what is to be set on the table; but those who have laboured to prepare the feast like to keep their secret; for wonder makes the words of praise louder.”
I am just an ancillary class used to reference some C functions. Most of my actual functionality is used by redefinitions of methods in CFunctionDescriptor.
• DLD class-C call-outs: | (class) | |
• DLD class-dynamic linking: | (class) |
Next: DLD class-dynamic linking, Up: DLD [Index]
Register aFuncAddr as the target for cCalls to aName.
Previous: DLD class-C call-outs, Up: DLD [Index]
Add library to the search path of libraries to be used by DLD.
This is called internally by gst_dlopen. The library will be open and put in the search path.
Add library to the list of modules to be loaded when the image is started. The gst_initModule function in the library is called, but the library will not be put in the search path used whenever a C function is requested but not registered.
This method calls #primDefineExternFunc: to try to link to a function with the given name, and answers whether the linkage was successful. You can redefine this method to restrict the ability to do dynamic linking.
Private - Initialize the receiver’s class variables
Answer a copy of the search path of libraries to be used by DLD
Answer a copy of the modules reloaded when the image is started
This method tries to link to a function with the given name, and answers whether the linkage was successful. It should not be overridden.
Called on startup - Make DLD re-link and reset the addresses of all the externally defined functions
Next: Duration, Previous: DLD, Up: Base classes [Index]
I am an helper class for ObjectDumper. When an object cannot be saved in the standard way, you can register a subclass of me to provide special means to save that object.
• DumperProxy class-accessing: | (class) | |
• DumperProxy class-instance creation: | (class) | |
• DumperProxy-saving and restoring: | (instance) |
Next: DumperProxy class-instance creation, Up: DumperProxy [Index]
The receiver was asked to be used as a proxy for the class aClass. Answer whether the registration is fine. By default, answer true
Reload a proxy stored in anObjectDumper and reconstruct the object
Next: DumperProxy-saving and restoring, Previous: DumperProxy class-accessing, Up: DumperProxy [Index]
Answer a proxy to be used to save anObject. This method MUST be overridden and anObject must NOT be stored in the object’s instance variables unless you override #dumpTo:, because that would result in an infinite loop!
Previous: DumperProxy class-instance creation, Up: DumperProxy [Index]
Dump the proxy to anObjectDumper – the #loadFrom: class method will reconstruct the original object.
Reconstruct the object stored in the proxy and answer it
Next: DynamicVariable, Previous: DumperProxy, Up: Base classes [Index]
My instances represent differences between timestamps.
• Duration class-instance creation: | (class) | |
• Duration class-instance creation (non ANSI): | (class) | |
• Duration-arithmetics: | (instance) | |
• Duration-processes: | (instance) | |
• Duration-storing: | (instance) |
Next: Duration class-instance creation (non ANSI), Up: Duration [Index]
Answer a duration of ‘d’ days
Answer a duration of ‘d’ days and the given number of hours, minutes, and seconds.
Initialize the receiver’s instance variables
Answer a duration of ‘msec’ milliseconds
Parse an instance of the receiver (hours/minutes/seconds) from aStream
Answer a duration of ‘w’ weeks
Answer a duration of zero seconds.
Next: Duration-arithmetics, Previous: Duration class-instance creation, Up: Duration [Index]
Answer a duration of ‘d’ days and ‘secs’ seconds. The last parameter is unused; this message is available for interoperability with the DateTime class.
Next: Duration-processes, Previous: Duration class-instance creation (non ANSI), Up: Duration [Index]
Answer a Duration that is ‘factor’ times longer than the receiver
Answer a Duration that is the sum of the receiver and aDuration’s lengths.
Answer a Duration that is the difference of the receiver and aDuration’s lengths.
If the parameter is a Duration, answer the ratio between the receiver and factorOrDuration. Else divide the receiver by factorOrDuration (a Number) and answer a new Duration that is correspondingly shorter.
Answer a Duration that is as long as the receiver, but always in the future.
Answer the number of days in the receiver
Answer whether the receiver correspond to a duration of zero seconds.
Answer a Duration that is as long as the receiver, but with past and future exchanged.
Answer whether the receiver is in the past.
Answer whether the receiver is a zero-second duration or is in the future.
Print a represention of the receiver on aStream.
Next: Duration-storing, Previous: Duration-arithmetics, Up: Duration [Index]
Answer a Delay waiting for the amount of time represented by the receiver and start waiting on it.
Previous: Duration-processes, Up: Duration [Index]
Store on aStream Smalltalk code compiling to the receiver
Next: Error, Previous: Duration, Up: Base classes [Index]
I am a variable that is visible only in the stackframes outgoing from this one. Do not use DynamicVariable directly, instead create a subclass for each variable you want to use.
You can override the #value class method, and call #valueIfAbsent: from there if you want the default value to be something else than nil.
• DynamicVariable class-evaluating: | (class) |
Up: DynamicVariable [Index]
Not commented.
Not commented.
Not commented.
Next: Exception, Previous: DynamicVariable, Up: Base classes [Index]
Error represents a fatal error. Instances of it are not resumable.
• Error-exception description: | (instance) |
Answer a textual description of the exception.
Answer false. Error exceptions are by default unresumable; subclasses can override this method if desired.
Next: ExceptionSet, Previous: Error, Up: Base classes [Index]
My instances describe an exception that has happened, and are passed to exception handlers. Classes describe the kind of exception.
Apart from containing information on the generated exception, my instances contain methods that allow you to resume execution, leave the #on:do:... block, and pass the exception to an handler with a lower priority.
• Exception class-comparison: | (class) | |
• Exception class-creating ExceptionCollections: | (class) | |
• Exception class-instance creation: | (class) | |
• Exception class-interoperability with TrappableEvents: | (class) | |
• Exception-accessing: | (instance) | |
• Exception-built ins: | (instance) | |
• Exception-comparison: | (instance) | |
• Exception-copying: | (instance) | |
• Exception-exception description: | (instance) | |
• Exception-exception handling: | (instance) | |
• Exception-exception signaling: | (instance) | |
• Exception-still unclassified: | (instance) |
Next: Exception class-creating ExceptionCollections, Up: Exception [Index]
Answer how good the receiver is at handling the given exception. A negative value indicates that the receiver is not able to handle the exception.
Answer whether the receiver handles ‘anException’.
Next: Exception class-instance creation, Previous: Exception class-comparison, Up: Exception [Index]
Answer an ExceptionCollection containing all the exceptions in the receiver and all the exceptions in aTrappableEvent
Next: Exception class-interoperability with TrappableEvents, Previous: Exception class-creating ExceptionCollections, Up: Exception [Index]
Create an instance of the receiver, which you will be able to signal later.
Create an instance of the receiver, give it default attributes, and signal it immediately.
Create an instance of the receiver, set its message text, and signal it immediately.
Next: Exception-accessing, Previous: Exception class-instance creation, Up: Exception [Index]
Private - Pass ourselves to aBlock
Next: Exception-built ins, Previous: Exception class-interoperability with TrappableEvents, Up: Exception [Index]
Answer an exception’s message text. Do not override this method.
Answer an exception’s message text.
Set an exception’s message text.
Answer an exception’s tag value. If not specified, it is the same as the message text.
Set an exception’s tag value. If nil, the tag value will be the same as the message text.
Next: Exception-comparison, Previous: Exception-accessing, Up: Exception [Index]
This might start the debugger... Note that we use #basicPrint ’cause #printOn: might invoke an error.
Next: Exception-copying, Previous: Exception-built ins, Up: Exception [Index]
Answer whether the receiver is equal to anObject. This is true if either the receiver or its class are the same object as anObject.
Next: Exception-exception description, Previous: Exception-comparison, Up: Exception [Index]
Modify the receiver so that it does not refer to any instantiated exception handler.
Next: Exception-exception handling, Previous: Exception-copying, Up: Exception [Index]
Execute the default action that is attached to the receiver.
Answer a textual description of the exception.
Answer true. Exceptions are by default resumable.
Next: Exception-exception signaling, Previous: Exception-exception description, Up: Exception [Index]
Return the execution context for the #on:do: snippet
Answer whether the current exception handler is within the scope of another handler for the same exception.
Raise the exception that instantiated the receiver, passing the same parameters. If the receiver is resumable and the evaluated exception action resumes then the result returned from #outer will be the resumption value of the evaluated exception action. If the receiver is not resumable or if the exception action does not resume then this message will not return, and #outer will be equivalent to #pass.
Yield control to the enclosing exception action for the receiver. Similar to #outer, but control does not return to the currently active exception handler.
Reinstate all handlers and execute the handler for ‘replacementException’; control does not return to the currently active exception handler. The new Signal object that is created has the same contents as the receiver (this might or not be correct – if it isn’t you can use an idiom such as ‘sig retryUsing: [ replacementException signal ])
If the exception is resumable, resume the execution of the block that raised the exception; the method that was used to signal the exception will answer the receiver. Use this method IF AND ONLY IF you know who caused the exception and if it is possible to resume it in that particular case
If the exception is resumable, resume the execution of the block that raised the exception; the method that was used to signal the exception will answer anObject. Use this method IF AND ONLY IF you know who caused the exception and if it is possible to resume it in that particular case
Re-execute the receiver of the #on:do: message. All handlers are reinstated: watch out, this can easily cause an infinite loop.
Execute aBlock reinstating all handlers, and return its result from the #signal method.
Exit the #on:do: snippet, answering nil to its caller.
Exit the #on:do: snippet, answering anObject to its caller.
Next: Exception-still unclassified, Previous: Exception-exception handling, Up: Exception [Index]
Raise the exceptional event represented by the receiver
Raise the exceptional event represented by the receiver, setting its message text to messageText.
Previous: Exception-exception signaling, Up: Exception [Index]
Return the execution context for the place that signaled the exception, or nil if it is not available anymore (for example if the exception handler has returned.
Next: False, Previous: Exception, Up: Base classes [Index]
My instances are not real exceptions: they can only be used as arguments to #on:do:... methods in BlockClosure. They act as shortcuts that allows you to use the same handler for many exceptions without having to write duplicate code
• ExceptionSet class-instance creation: | (class) | |
• ExceptionSet-enumerating: | (instance) | |
• ExceptionSet-instance creation: | (instance) |
Next: ExceptionSet-enumerating, Up: ExceptionSet [Index]
Private - Answer a new, empty ExceptionSet
Next: ExceptionSet-instance creation, Previous: ExceptionSet class-instance creation, Up: ExceptionSet [Index]
Private - Evaluate aBlock for every exception in the receiver. Answer the receiver
Answer how good the receiver is at handling the given exception. A negative value indicates that the receiver is not able to handle the exception.
Answer whether the receiver handles ‘exception’.
Previous: ExceptionSet-enumerating, Up: ExceptionSet [Index]
Answer an ExceptionSet containing all the exceptions in the receiver and all the exceptions in aTrappableEvent
Next: File, Previous: ExceptionSet, Up: Base classes [Index]
I always tell lies. I have a single instance in the system, which represents the value false.
• False-basic: | (instance) | |
• False-C hacks: | (instance) | |
• False-printing: | (instance) |
Next: False-C hacks, Up: False [Index]
We are false – anded with anything, we always answer false
We are false – anded with anything, we always answer false
Answer whether the receiver and aBoolean represent the same boolean value
We are false – evaluate the falseBlock
We are false – evaluate the falseBlock
We are false – answer nil
We are false – evaluate the falseBlock
We are false – answer true
We are false – ored with anything, we always answer the other operand, so evaluate aBlock
Answer whether the receiver and aBoolean represent different boolean values
We are false – ored with anything, we always answer the other operand
Next: False-printing, Previous: False-basic, Up: False [Index]
Answer ‘0’.
Previous: False-C hacks, Up: False [Index]
Print a representation of the receiver on aStream
Next: FileDescriptor, Previous: False, Up: Base classes [Index]
I enable access to the properties of files that are on disk.
• File class-C functions: | (class) | |
• File class-file operations: | (class) | |
• File class-initialization: | (class) | |
• File class-instance creation: | (class) | |
• File class-reading system defaults: | (class) | |
• File class-testing: | (class) | |
• File-accessing: | (instance) | |
• File-basic: | (instance) | |
• File-directory operations: | (instance) | |
• File-file name management: | (instance) | |
• File-file operations: | (instance) | |
• File-still unclassified: | (instance) | |
• File-testing: | (instance) |
Next: File class-file operations, Up: File [Index]
Answer the current value of C errno.
Answer C strerror’s result for errno.
Next: File class-initialization, Previous: File class-C functions, Up: File [Index]
Return whether an error had been reported or not. If there had been one, raise an exception too
The error with the C code ‘errno’ has been reported. If errno >= 1, raise an exception
Remove the file with the given path name
Rename the file with the given path name oldFileName to newFileName
Create a symlink for the srcName file with the given path name
Create a symlink named destName file from the given path (relative to destName)
Update the timestamp of the file with the given path name.
Next: File class-instance creation, Previous: File class-file operations, Up: File [Index]
Initialize the receiver’s class variables
Next: File class-reading system defaults, Previous: File class-initialization, Up: File [Index]
Answer a new file with the given path. The path is turned into an absolute path.
Answer a new file with the given path. The path is not validated until some of the fields of the newly created objects are accessed
Next: File class-testing, Previous: File class-instance creation, Up: File [Index]
Answer the full path to the executable being run.
Answer the full path to the image being used.
Next: File-accessing, Previous: File class-reading system defaults, Up: File [Index]
Answer whether a file with the given name exists
Answer whether a directory with the given name exists and can be accessed
Answer whether a file with the given name exists and can be executed
Answer whether a file with the given name exists and is readable
Answer whether a file with the given name exists and is writeable
Next: File-basic, Previous: File class-testing, Up: File [Index]
Answer the name of the file identified by the receiver
Answer a File or Directory object as appropriate for a file named ’aName’ in the directory represented by the receiver.
Answer the creation time of the file identified by the receiver. On some operating systems, this could actually be the last change time (the ‘last change time’ has to do with permissions, ownership and the like).
Answer whether the file is a directory.
Answer whether the file is an AF_UNIX socket.
Answer whether the file is a symbolic link.
Answer the last access time of the file identified by the receiver
Answer the last change time of the file identified by the receiver (the ‘last change time’ has to do with permissions, ownership and the like). On some operating systems, this could actually be the file creation time.
Answer the last modify time of the file identified by the receiver (the ‘last modify time’ has to do with the actual file contents).
Answer the permission bits for the file identified by the receiver
Set the permission bits for the file identified by the receiver to be anInteger.
Answer the name of the file identified by the receiver
Compute the relative path from the receiver to destName.
Refresh the statistics for the receiver
Answer the size of the file identified by the receiver
Next: File-directory operations, Previous: File-accessing, Up: File [Index]
Answer whether the receiver represents the same file as the receiver.
Answer a hash value for the receiver.
Next: File-file name management, Previous: File-basic, Up: File [Index]
Create the receiver as a directory.
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name. aBlock should not return.
Next: File-file operations, Previous: File-directory operations, Up: File [Index]
Answer the full name of the receiver, resolving the ‘.’ and ‘..’ directory entries, and answer the result. Answer nil if the name is invalid (such as ’/usr/../../badname’)
Next: File-still unclassified, Previous: File-file name management, Up: File [Index]
Set the receiver’s timestamps to be accessDateTime and modifyDateTime.
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Set the receiver’s owner and group to be ownerString and groupString.
Compute the relative path from the directory dirName to the receiver
Remove the file with the given path name
Rename the file with the given path name to newFileName
Create destName as a symbolic link of the receiver. The appropriate relative path is computed automatically.
Create the receiver as a symlink from path destName
Next: File-testing, Previous: File-file operations, Up: File [Index]
Answer an object of the same kind as the receiver, whose name is suffixed with aName.
Previous: File-still unclassified, Up: File [Index]
Answer whether a file with the name contained in the receiver does exist.
Answer whether the receiver identifies an absolute path.
Answer whether a directory with the name contained in the receiver does exist and is accessible
Answer whether a file with the name contained in the receiver does exist and is executable
Answer whether the receiver corresponds to a real filesystem path.
Answer whether a file with the name contained in the receiver does exist and is readable
Answer whether a file with the name contained in the receiver does exist and is writeable
Next: FilePath, Previous: File, Up: Base classes [Index]
My instances are what conventional programmers think of as files. My instance creation methods accept the name of a disk file (or any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS). In addition, they accept a virtual filesystem path like ‘configure.gz#ugz’ which can be used to transparently extract or decompress files from archives, or do arbitrary processing on the files.
• FileDescriptor class-initialization: | (class) | |
• FileDescriptor class-instance creation: | (class) | |
• FileDescriptor class-still unclassified: | (class) | |
• FileDescriptor-accessing: | (instance) | |
• FileDescriptor-basic: | (instance) | |
• FileDescriptor-binary I/O: | (instance) | |
• FileDescriptor-built ins: | (instance) | |
• FileDescriptor-class type methods: | (instance) | |
• FileDescriptor-initialize-release: | (instance) | |
• FileDescriptor-low-level access: | (instance) | |
• FileDescriptor-overriding inherited methods: | (instance) | |
• FileDescriptor-polymorphism: | (instance) | |
• FileDescriptor-positioning: | (instance) | |
• FileDescriptor-printing: | (instance) | |
• FileDescriptor-testing: | (instance) |
Next: FileDescriptor class-instance creation, Up: FileDescriptor [Index]
Initialize the receiver’s class variables
Close open files before quitting
Next: FileDescriptor class-still unclassified, Previous: FileDescriptor class-initialization, Up: FileDescriptor [Index]
Open for writing. The file is created if it does not exist. The stream is positioned at the end of the file.
Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.
Open fileName in the required mode - answered by #append, #create, #readWrite, #read or #write - and fail if the file cannot be opened. Else answer a new FileStream. For mode anyway you can use any standard C non-binary fopen mode. The file will be automatically closed upon GC if the object is not referenced anymore, but it is better to close it as soon as you’re finished with it anyway, using #close. To keep a file open even when no references exist anymore, send it #removeToBeFinalized
Open fileName in the required mode - answered by #append, #create, #readWrite, #read or #write - and evaluate aBlock if the file cannot be opened. Else answer a new FileStream. For mode anyway you can use any The file will be automatically closed upon GC if the object is not referenced anymore, but it is better to close it as soon as you’re finished with it anyway, using #close. To keep a file open even when no references exist anymore, send it #removeToBeFinalized
Open a FileDescriptor on the given file descriptor. Read-write access is assumed.
Open fileName in read-write mode - fail if the file cannot be opened. Else answer a new FileStream. The file will be automatically closed upon GC if the object is not referenced anymore, but you should close it with #close anyway. To keep a file open, send it #removeToBeFinalized
Open fileName in the required mode - answered by #append, #create, #readWrite, #read or #write - and evaluate aBlock if the file cannot be opened. Else answer a new instance of the receiver. For mode anyway you can use any standard C non-binary fopen mode. fileName can be a ‘virtual filesystem’ path, including URLs and ’#’ suffixes that are inspected by the virtual filesystem layers and replaced with tasks such as un-gzipping a file or extracting a file from an archive.
The file will be automatically closed upon GC if the object is not referenced anymore, but it is better to close it as soon as you’re finished with it anyway, using #close. To keep a file open even when no references exist anymore, send it #removeToBeFinalized
Open for writing a file whose name starts with baseName, followed by six random alphanumeric characters. The file is created with mode read/write and permissions 0666 or 0600 on most recent operating systems (beware, the former behavior might constitute a security problem). The file is opened with the O_EXCL flag, guaranteeing that when the method returns successfully we are the only user.
Open a pipe on the given command and fail if the file cannot be opened. Else answer a new FileStream. The pipe will not be automatically closed upon GC, even if the object is not referenced anymore, because when you close a pipe you have to wait for the associated process to terminate. direction is returned by #read or #write (’r’ or ’w’) and is interpreted from the point of view of Smalltalk: reading means Smalltalk reads the standard output of the command, writing means Smalltalk writes the standard input of the command. The other channel (stdin when reading, stdout when writing) is the same as GST’s, unless commandName alters it.
Open a pipe on the given command and evaluate aBlock file cannot be opened. Else answer a new FileStream. The pipe will not be automatically closed upon GC, even if the object is not referenced anymore, because when you close a pipe you have to wait for the associated process to terminate. direction is interpreted from the point of view of Smalltalk: reading means that Smalltalk reads the standard output of the command, writing means that Smalltalk writes the standard input of the command
Open text file for reading. The stream is positioned at the beginning of the file.
Open for reading and writing. The stream is positioned at the beginning of the file.
Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file.
Next: FileDescriptor-accessing, Previous: FileDescriptor class-instance creation, Up: FileDescriptor [Index]
Open fileName in the required mode - answered by #append, #create, #readWrite, #read or #write - and fail if the file cannot be opened. Else answer a new FileStream. For mode anyway you can use any standard C non-binary fopen mode. fileName can be a ‘virtual filesystem’ path, including URLs and ’#’ suffixes that are inspected by the virtual filesystem layers and replaced with tasks such as un-gzipping a file or extracting a file from an archive.
The file will be automatically closed upon GC if the object is not referenced anymore, but it is better to close it as soon as you’re finished with it anyway, using #close. To keep a file open even when no references exist anymore, send it #removeToBeFinalized
Next: FileDescriptor-basic, Previous: FileDescriptor class-still unclassified, Up: FileDescriptor [Index]
Answer whether the file is open and we can read from it
Answer whether the file is open and we can write from it
If the file is open, wait until data can be read from it. The wait allows other Processes to run.
If the file is open, wait until we can write to it. The wait allows other Processes to run.
Answer whether the file is open and an exceptional condition (such as presence of out of band data) has occurred on it
Return the OS file descriptor of the file
Return the name of the file
Answer whether the file is still open
Present for compatibility with sockets. For files, it answers whether the file is still open
Answer whether the file is a pipe or an actual disk file
Return the name of the file
If the file is open, wait until an exceptional condition (such as presence of out of band data) has occurred on it. The wait allows other Processes to run.
Next: FileDescriptor-binary I/O, Previous: FileDescriptor-accessing, Up: FileDescriptor [Index]
Perform error checking. By default, we call File class>>#checkError.
Close the file
Answer the whole contents of the file
Answer the contents of the file between the two given positions
Close the file if it is still open by the time the object becomes garbage.
Invalidate a file descriptor
Return the next character in the file, or nil at eof
Return the next byte in the file, or nil at eof
Store aCharacter on the file
Store the byte, anInteger, on the file
Store aByteArray on the file
Returns the next element of the stream without moving the pointer. Returns nil when at end of stream.
Returns whether the next element of the stream is equal to anObject, without moving the pointer if it is not.
Answer the zero-based position from the start of the file
Set the file pointer to the zero-based position n
Reset the stream to its beginning
Close the transmission side of a full-duplex connection. This is useful on read-write pipes.
Return the current size of the file, in bytes
Truncate the file at the current position
Next: FileDescriptor-built ins, Previous: FileDescriptor-basic, Up: FileDescriptor [Index]
Return the next numBytes bytes in the byte array
Return the next 64-bit float in the byte array
Return the next 32-bit float in the byte array
Return the next 4 bytes in the byte array, interpreted as a 32 bit signed int
Return the next 8 bytes in the byte array, interpreted as a 64 bit signed int
Store aDouble as a 64-bit float in the byte array
Return the next 32-bit float in the byte array
Store anInteger (range: -2^63..2^64-1) on the byte array as 8 bytes
Store anInteger (range: -2^31..2^32-1) on the byte array as 4 bytes
Store anInteger (range: -32768..65535) on the byte array as 2 bytes
Return the next 2 bytes in the byte array, interpreted as a 16 bit signed int
Return the next byte in the byte array, interpreted as a 8 bit signed number
Return the next 8 bytes in the byte array, interpreted as a 64 bit unsigned int
Return the next 4 bytes in the byte array, interpreted as a 32 bit unsigned int
Return the next 2 bytes in the byte array, interpreted as a 16 bit unsigned int
Next: FileDescriptor-class type methods, Previous: FileDescriptor-binary I/O, Up: FileDescriptor [Index]
File in the contents of the receiver. During a file in operation, global variables (starting with an uppercase letter) that are not declared don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
Private - Used to limit the number of primitives used by FileStreams
Private - Used to limit the number of primitives used by FileStreams.
Private - Used to limit the number of primitives used by FileStreams
Private - Used to limit the number of primitives used by FileStreams.
Private - Used to limit the number of primitives used by FileStreams
Private - Used to limit the number of primitives used by FileStreams.
Private - Used to limit the number of primitives used by FileStreams
Private - Used to limit the number of primitives used by FileStreams.
Private - Used to limit the number of primitives used by FileStreams
Private - Used to limit the number of primitives used by FileStreams.
Next: FileDescriptor-initialize-release, Previous: FileDescriptor-built ins, Up: FileDescriptor [Index]
We answer characters, so answer false
We stream on an external entity (a file), so answer true
We answer characters, so answer true
Next: FileDescriptor-low-level access, Previous: FileDescriptor-class type methods, Up: FileDescriptor [Index]
Add me to the list of open files.
Initialize the receiver’s instance variables
Answer myself, or an alternate stream coerced for reading.
Remove me from the list of open files.
Next: FileDescriptor-overriding inherited methods, Previous: FileDescriptor-initialize-release, Up: FileDescriptor [Index]
Put the characters in the supplied range of aCollection in the file
Ignoring any buffering, try to fill the given range of aCollection with the contents of the file
Next: FileDescriptor-polymorphism, Previous: FileDescriptor-low-level access, Up: FileDescriptor [Index]
Answer whether the receiver is empty
Put all the characters of the receiver in aStream.
Return the contents of the file from the last byte to the first
Reset the file pointer to the end of the file
Skip anInteger bytes in the file
Next: FileDescriptor-positioning, Previous: FileDescriptor-overriding inherited methods, Up: FileDescriptor [Index]
The end of the stream has been reached. Signal a Notification.
Next: FileDescriptor-printing, Previous: FileDescriptor-polymorphism, Up: FileDescriptor [Index]
Answer true if the stream supports moving backwards with #skip:.
Next: FileDescriptor-testing, Previous: FileDescriptor-positioning, Up: FileDescriptor [Index]
Print a representation of the receiver on aStream
Previous: FileDescriptor-printing, Up: FileDescriptor [Index]
Answer whether data has come to an end
Next: FileSegment, Previous: FileDescriptor, Up: Base classes [Index]
I expose the syntax of file names, including paths. I know how to manipulate such a path by splitting it into its components. In addition, I expose information about files (both real and virtual) such as their size and timestamps.
• FilePath class-file name management: | (class) | |
• FilePath class-still unclassified: | (class) | |
• FilePath-accessing: | (instance) | |
• FilePath-converting: | (instance) | |
• FilePath-decoration: | (instance) | |
• FilePath-directory operations: | (instance) | |
• FilePath-enumerating: | (instance) | |
• FilePath-file name management: | (instance) | |
• FilePath-file operations: | (instance) | |
• FilePath-printing: | (instance) | |
• FilePath-still unclassified: | (instance) | |
• FilePath-testing: | (instance) | |
• FilePath-virtual filesystems: | (instance) |
Next: FilePath class-still unclassified, Up: FilePath [Index]
Answer the name of a file named ‘fileName’ which resides in a directory named ‘directory’.
Answer the extension of a file named ‘aString’. Note: the extension includes an initial dot.
Answer the full path to a file called ‘aString’, resolving the ‘.’ and ‘..’ directory entries, and answer the result. ‘/..’ is the same as ’/’.
Determine the path of the name of a file called ‘aString’, and answer the result. With the exception of the root directory, the final slash is stripped.
Determine the path of the name of a file called ‘aString’, and answer the result. With the exception of the root directory, the final slash is stripped. If there is no path, evaluate aBlock and return the result.
Answer the relative path to destName when the current directory is srcName’s directory.
Remove the extension from the name of a file called ‘aString’, and answer the result.
Determine the path of the name of a file called ‘aString’, and answer the result as a directory name including the final slash.
Remove the path from the name of a file called ‘aString’, and answer the file name plus extension.
Next: FilePath-accessing, Previous: FilePath class-file name management, Up: FilePath [Index]
Answer whether aString is an absolute ptah.
Next: FilePath-converting, Previous: FilePath class-still unclassified, Up: FilePath [Index]
Answer a File or Directory object as appropriate for a file named ’aName’ in the directory represented by the receiver.
Answer the creation time of the file identified by the receiver. On some operating systems, this could actually be the last change time (the ‘last change time’ has to do with permissions, ownership and the like).
Set the group of the file identified by the receiver to be aString.
Answer whether a file named ‘aName’ exists in the directory represented by the receiver.
Answer the last access time of the file identified by the receiver
Update the last access time of the file corresponding to the receiver, to be aDateTime.
Update the timestamps of the file corresponding to the receiver, to be accessDateTime and modifyDateTime.
Answer the last change time of the file identified by the receiver (the ‘last change time’ has to do with permissions, ownership and the like). On some operating systems, this could actually be the file creation time.
Answer the last modify time of the file identified by the receiver (the ‘last modify time’ has to do with the actual file contents).
Update the last modification timestamp of the file corresponding to the receiver, to be aDateTime.
Answer the permission bits for the file identified by the receiver
Set the permission bits for the file identified by the receiver to be anInteger.
Set the owner of the file identified by the receiver to be aString.
Set the owner and group of the file identified by the receiver to be aString.
Compute the relative path from the receiver to destName.
Refresh the statistics for the receiver
Answer the size of the file identified by the receiver
Next: FilePath-decoration, Previous: FilePath-accessing, Up: FilePath [Index]
Answer the receiver.
Next: FilePath-directory operations, Previous: FilePath-converting, Up: FilePath [Index]
Return a decorator of the receiver that will provide recursive descent into directories for iteration methods. Furthermore, iteration on the returned wrapper will not include ’.’ or ’..’ directory entries, and will include the receiver (directly, not via ’.’).
Next: FilePath-enumerating, Previous: FilePath-decoration, Up: FilePath [Index]
Create the receiver as a directory, together with all its parents.
Create the receiver as a directory, together with all its parents.
Answer a FilePath for a file named ‘aName’ residing in the directory represented by the receiver.
Next: FilePath-file name management, Previous: FilePath-directory operations, Up: FilePath [Index]
Evaluate aBlock on the File objects that match aPattern (according to String>>#match:) in the directory named by the receiver. Recursively descend into directories.
Answer an Array with Directory objects for the subdirectories of the directory represented by the receiver.
Evaluate aBlock once for each file in the directory represented by the receiver, passing a FilePath object (or a subclass) to it. It depends on the subclass whether iteration will include the ’.’ and ’..’ directory entries.
Answer an Array with File or Directory objects for the contents of the directory represented by the receiver.
Answer an Array with the names of the files in the directory represented by the receiver.
Answer an Array with File objects for the contents of the directory represented by the receiver.
Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.
Evaluate block on the File objects that match aPattern (according to String>>#match:) in the directory named by the receiver.
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name. It depends on the subclass whether iteration will include the ’.’ and ’..’ directory entries.
Evaluate block on the file names that match aPattern (according to String>>#match:) in the directory named by the receiver.
Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.
Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.
Next: FilePath-file operations, Previous: FilePath-enumerating, Up: FilePath [Index]
Answer the Directory object for the receiver’s path
Answer the extension of the receiver
Answer the full name of the receiver, resolving the ‘.’ and ‘..’ directory entries, and answer the result. Answer nil if the name is invalid (such as ’/usr/../../badname’)
Answer a String with the full path to the receiver (same as #name; it is useless to override this method).
Answer String with the full path to the receiver (same as #fullName).
Answer the Directory object for the receiver’s path
Answer the path (if any) of the receiver
Answer the path (if any) and file name of the receiver
Answer the path of the receiver, always including a directory name (possibly ‘.’) and the final directory separator
Answer the file name and extension (if any) of the receiver
Next: FilePath-printing, Previous: FilePath-file name management, Up: FilePath [Index]
Open a read-only FileStream on the receiver, read its contents, close the stream and answer the contents
File in the receiver
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Open the receiver in the given mode (as answered by FileStream’s class constant methods). Upon failure, evaluate aBlock.
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Open the receiver in the given mode (as answered by FileStream’s class constant methods). Upon failure, evaluate aBlock.
Compute the relative path from the directory dirName to the receiver
Open a read-only FileStream on the receiver
Remove the file identified by the receiver
Rename the file identified by the receiver to newName
Create destName as a symbolic link of the receiver. The appropriate relative path is computed automatically.
Create the receiver as a symbolic link from srcName (relative to the path of the receiver).
Update the timestamp of the file corresponding to the receiver.
Answer the result of invoking aBlock with a reading stream open on me, closing it when the dynamic extent of aBlock ends.
Answer the result of invoking aBlock with a writing stream open on me, closing it when the dynamic extent of aBlock ends.
Open a write-only FileStream on the receiver
Next: FilePath-still unclassified, Previous: FilePath-file operations, Up: FilePath [Index]
Print a representation of the receiver on aStream.
Print a representation of the receiver on aStream.
Print a representation of the receiver on aStream.
Return the representation of the receiver with shell characters escaped.
Next: FilePath-testing, Previous: FilePath-printing, Up: FilePath [Index]
Answer a File or Directory object as appropriate for a file named ’aName’ in the directory represented by the receiver.
Next: FilePath-virtual filesystems, Previous: FilePath-still unclassified, Up: FilePath [Index]
Answer whether a file with the name contained in the receiver does exist.
Answer whether the receiver identifies an absolute path.
Answer whether a directory with the name contained in the receiver does exist and can be accessed
Answer whether a file with the name contained in the receiver does exist and identifies a directory.
Answer whether a file with the name contained in the receiver does exist and is executable
Answer whether a file with the name contained in the receiver does exist and does not identify a directory.
Answer whether the receiver corresponds to a real filesystem path.
Answer whether a file with the name contained in the receiver does exist and is readable
Answer whether the receiver identifies a relative path.
Answer whether a file with the name contained in the receiver does exist and identifies a symbolic link.
Answer whether a file with the name contained in the receiver does exist and is writeable
Previous: FilePath-testing, Up: FilePath [Index]
Not commented.
Next: FileStream, Previous: FilePath, Up: Base classes [Index]
My instances represent sections of files. I am primarily used by the compiler to record source code locations. I am not a part of the normal Smalltalk-80 kernel; I am specific to the GNU Smalltalk implementation.
• FileSegment class-basic: | (class) | |
• FileSegment class-installing: | (class) | |
• FileSegment-basic: | (instance) | |
• FileSegment-equality: | (instance) | |
• FileSegment-printing: | (instance) |
Next: FileSegment class-installing, Up: FileSegment [Index]
Create a new FileSegment referring to the contents of the given file, from the startPos-th byte and for sizeInteger bytes. Note that FileSegments should always be created with full paths because relative paths are interpreted to be relative to the kernel directory.
Next: FileSegment-basic, Previous: FileSegment class-basic, Up: FileSegment [Index]
Remove the kernel path from all paths that start with it. Needed to support $(DESTDIR) and relocatable installation.
Next: FileSegment-equality, Previous: FileSegment class-installing, Up: FileSegment [Index]
Answer a String containing the required segment of the file
Answer a String containing the given subsegment of the file. As for streams, from and to are 0-based.
Answer the File object for the file containing the segment
Answer the name of the file containing the segment
Answer the position in the file where the segment starts
If the path starts with startPath, remove that part of the path. map is a Dictionary that is used so that equal filenames stay equal, without increasing the amount of memory that the image uses.
Answer the length of the segment
Evaluate aBlock passing it the FileStream in which the segment identified by the receiver is stored
Next: FileSegment-printing, Previous: FileSegment-basic, Up: FileSegment [Index]
Answer whether the receiver and aFileSegment are equal.
Answer an hash value for the receiver.
Previous: FileSegment-equality, Up: FileSegment [Index]
Answer a printed representation of the file containing the segment. While introducing some ambiguity, this representation is compact eliminates the path for kernel files, and produces a relative path from the current working directory for other files.
Next: Float, Previous: FileSegment, Up: Base classes [Index]
My instances are what conventional programmers think of as files. My instance creation methods accept the name of a disk file (or any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS).
• FileStream class-file-in: | (class) | |
• FileStream class-standard streams: | (class) | |
• FileStream-basic: | (instance) | |
• FileStream-buffering: | (instance) | |
• FileStream-compiling: | (instance) | |
• FileStream-initialize-release: | (instance) | |
• FileStream-overriding inherited methods: | (instance) | |
• FileStream-testing: | (instance) |
Next: FileStream class-standard streams, Up: FileStream [Index]
File in the aFileName file. During a file in operation, global variables (starting with an uppercase letter) that are not declared yet don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
Conditionally do a file in, only if the key (often a class) specified by ’aSymbol’ is not present in the Smalltalk system dictionary already. During a file in operation, global variables (starting with an uppercase letter) that are not declared don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
Conditionally do a file in, only if the supplied boolean is true. During a file in operation, global variables (starting with an uppercase letter) that are not declared don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
File in the aFileName file giving errors such as if it was loaded from the given line, file name and starting position (instead of 1).
Generate a make file for the file-ins since record was last set to true. Store it on aStream
Private - Initialize the receiver’s class variables
Set whether Smalltalk should record information about nested file-ins. When recording is enabled, use #generateMakefileOnto: to automatically generate a valid makefile for the intervening file-ins.
Conditionally do a file in from the value of assoc, only if the key of assoc is not present in the Smalltalk system dictionary already. During a file in operation, global variables (starting with an uppercase letter) that are not declared don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
Set whether Smalltalk should output debugging messages when filing in
Next: FileStream-basic, Previous: FileStream class-file-in, Up: FileStream [Index]
Answer a FileStream that is attached the Smalltalk program’s standard error file handle, which can be used for error messages and diagnostics issued by the program.
Answer a FileStream that is attached the Smalltalk program’s standard input file handle, which is the normal source of input for the program.
Answer a FileStream that is attached the Smalltalk program’s standard output file handle; this is used for normal output from the program.
Next: FileStream-buffering, Previous: FileStream class-standard streams, Up: FileStream [Index]
Private - Answer the offset from the start of the file corresponding to the beginning of the read buffer.
Answer the contents of the file between the two given positions
Return the next character in the file, or nil at eof
Store aCharacter on the file
Return the next character in the file, or nil at eof. Don’t advance the file pointer.
Answer the zero-based position from the start of the file
Set the file pointer to the zero-based position n
Return the current size of the file, in bytes
Truncate the file at the current position
Next: FileStream-compiling, Previous: FileStream-basic, Up: FileStream [Index]
Answer the file’s current buffer
Flush the file and set the buffer’s size to bufSize
Synchronize the file descriptor’s state with the object’s state.
Private - Fill the input buffer
Flush the output buffer.
Private - Answer a String to be used as the receiver’s buffer
Private - Assuming that the buffer has space for n characters, store n characters of aCollection in the buffer, starting from the pos-th.
Read up to anInteger bytes from the stream and store them into aCollection. Return the number of bytes read.
Copy up to anInteger bytes from the stream into aStream. Return the number of bytes read.
Answer whether the output buffer is full.
Next: FileStream-initialize-release, Previous: FileStream-buffering, Up: FileStream [Index]
Answer an object that, when sent #asString, will yield the result of sending ‘copyFrom: startPos to: endPos’ to the receiver
Next: FileStream-overriding inherited methods, Previous: FileStream-compiling, Up: FileStream [Index]
Initialize the receiver’s instance variables
Next: FileStream-testing, Previous: FileStream-initialize-release, Up: FileStream [Index]
Write n values from aCollection, the first being at pos.
Returns a collection of the same type that the stream accesses, containing the next line up to the next new-line character. Returns the entire rest of the stream’s contents if no new-line character is found.
Put all the characters of the receiver in aStream.
Returns a collection of the same type that the stream accesses, containing data up to aCharacter. Returns the entire rest of the stream’s contents if no such character is found.
Previous: FileStream-overriding inherited methods, Up: FileStream [Index]
Answer whether data has come to an end
Next: FloatD, Previous: FileStream, Up: Base classes [Index]
My instances represent floating point numbers that have arbitrary precision. Besides the standard numerical operations, they provide transcendental operations too. They implement IEEE-754 correctly if the hardware supports it.
• Float class-byte-order dependancies: | (class) | |
• Float class-characterization: | (class) | |
• Float-arithmetic: | (instance) | |
• Float-basic: | (instance) | |
• Float-built ins: | (instance) | |
• Float-coercing: | (instance) | |
• Float-coercion: | (instance) | |
• Float-comparing: | (instance) | |
• Float-compiler: | (instance) | |
• Float-converting: | (instance) | |
• Float-floating point: | (instance) | |
• Float-misc math: | (instance) | |
• Float-printing: | (instance) | |
• Float-storing: | (instance) | |
• Float-testing: | (instance) | |
• Float-testing functionality: | (instance) | |
• Float-transcendental operations: | (instance) | |
• Float-truncation and round off: | (instance) |
Next: Float class-characterization, Up: Float [Index]
Answer the byte of the receiver that contains the sign bit
Next: Float-arithmetic, Previous: Float class-byte-order dependancies, Up: Float [Index]
Answer whether instances of the receiver can be in denormalized form.
Returns the value of e. Hope is that it is precise enough
Return the smallest Float x for which is 1 + x ~= 1
Return the smallest Float that is > 0.
Return the smallest Float that is > 0 if denormalized values are supported, else return 0.
Returns the value of ln 10. Hope is that it is precise enough
Returns the value of log2 10. Hope is that it is precise enough
Returns the value of pi. Hope is that it is precise enough
Answer the base in which computations between instances of the receiver are made. This should be 2 on about every known computer, so GNU Smalltalk always answers 2.
Next: Float-basic, Previous: Float class-characterization, Up: Float [Index]
Return the receiver’s integer part
Return the negation of the receiver. Unlike 0-self, this converts correctly signed zeros.
Return self raised to the anInteger-th power
Next: Float-built ins, Previous: Float-arithmetic, Up: Float [Index]
Answer an hash value for the receiver. Not-a-number values do not have a hash code and cannot be put in a hashed collection.
Next: Float-coercing, Previous: Float-basic, Up: Float [Index]
Answer the arc-cosine of the receiver
Answer the arc-sine of the receiver
Answer the arc-tangent of the receiver
Answer the integer part of the receiver, truncated towards +infinity
Answer the cosine of the receiver
Answer ’e’ (2.718281828459...) raised to the receiver
Answer the integer part of the receiver, truncated towards -infinity
Answer the logarithm of the receiver in base ’e’ (2.718281828459...)
Private - Answer an hash value for the receiver
Answer the receiver raised to its aNumber power
Answer the sine of the receiver
Answer the square root of the receiver
Answer the tangent of the receiver
Next: Float-coercion, Previous: Float-built ins, Up: Float [Index]
Convert the receiver into a fraction with optimal approximation, but with usually huge terms.
Convert the receiver into a fraction with a good (but undefined) approximation
Convert the receiver to an Integer. Only used for LargeIntegers, there are primitives for the other cases.
Next: Float-comparing, Previous: Float-coercing, Up: Float [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Next: Float-compiler, Previous: Float-coercion, Up: Float [Index]
Answer the maximum between the receiver and aNumber. Redefine in subclasses if necessary to ensure that if either self or aNumber is a NaN, it is always answered.
Answer the minimum between the receiver and aNumber. Redefine in subclasses if necessary to ensure that if either self or aNumber is a NaN, it is always answered.
Answer the receiver, with its sign possibly changed to match that of aNumber.
Next: Float-converting, Previous: Float-comparing, Up: Float [Index]
Not commented.
Not commented.
Next: Float-floating point, Previous: Float-compiler, Up: Float [Index]
Answer 0.5 in the representation of the receiver
Next: Float-misc math, Previous: Float-converting, Up: Float [Index]
Not commented.
Not commented.
Next: Float-printing, Previous: Float-floating point, Up: Float [Index]
Answer log base aNumber of the receiver
Next: Float-storing, Previous: Float-misc math, Up: Float [Index]
Print a representation of the receiver on aStream
Next: Float-testing, Previous: Float-printing, Up: Float [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store on aStream some Smalltalk code which compiles to the receiver
Print a representation of the receiver on aStream
Next: Float-testing functionality, Previous: Float-storing, Up: Float [Index]
Answer whether the receiver performs exact arithmetic. Floats do not.
Answer whether the receiver does not represent infinity, nor a NaN
Answer whether the receiver represents positive or negative infinity
Answer whether the receiver represents a NaN
Answer whether the receiver is negative
Answer whether the receiver is positive. Negative zero is not positive, so the definition is not simply >= 0.
Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0. Negative zero is the same as positive zero.
Answer whether the receiver is > 0
Next: Float-transcendental operations, Previous: Float-testing, Up: Float [Index]
Answer ‘true’.
Next: Float-truncation and round off, Previous: Float-testing functionality, Up: Float [Index]
Just defined for completeness. Return the receiver.
Answer (self log: radix) ceiling. Use exact arithmetic if radix is not a floating point value.
Answer an estimate of (self abs floorLog: 10)
Answer (self log: radix) floor. Use exact arithmetic if radix is not a floating point value.
Answer log base 10 of the receiver.
Previous: Float-transcendental operations, Up: Float [Index]
Answer the receiver, rounded to the nearest integer
Next: FloatE, Previous: Float, Up: Base classes [Index]
My instances represent floating point numbers that have the same accuracy as C’s "double" numbers.
• FloatD class-byte-order dependencies: | (class) | |
• FloatD class-characterization: | (class) | |
• FloatD class-converting: | (class) | |
• FloatD-built ins: | (instance) | |
• FloatD-coercing: | (instance) | |
• FloatD-converting: | (instance) |
Next: FloatD class-characterization, Up: FloatD [Index]
Answer a float with the bytes in aByteArray, which are in big-endian format.
Answer the byte of the receiver that contains the sign bit
Next: FloatD class-converting, Previous: FloatD class-byte-order dependencies, Up: FloatD [Index]
Return the number of decimal digits of precision for a FloatD. Technically, if P is the precision for the representation, then the decimal precision Q is the maximum number of decimal digits such that any floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and back again, without change to the Q decimal digits.
Return the maximum allowable exponent for a FloatD that is finite.
Return the maximum allowable exponent for a FloatD that is finite.
Return the largest normalized FloatD that is not infinite.
Return the smallest normalized FloatD that is > 0
Return a FloatD that represents positive infinity.
Return a FloatD that represents a mathematically indeterminate value (e.g. Inf - Inf, Inf / Inf).
Return a FloatD that represents negative infinity.
Answer the number of bits in the mantissa. 1 + (2^-precision) = 1
Next: FloatD-built ins, Previous: FloatD class-characterization, Up: FloatD [Index]
Answer aNumber converted to a FloatD
Next: FloatD-coercing, Previous: FloatD class-converting, Up: FloatD [Index]
Multiply the receiver and arg and answer another Number
Sum the receiver and arg and answer another Number
Subtract arg from the receiver and answer another Number
Divide the receiver by arg and answer another FloatD
Answer whether the receiver is less than arg
Answer whether the receiver is less than or equal to arg
Answer whether the receiver is equal to arg
Answer whether the receiver is greater than arg
Answer whether the receiver is greater than or equal to arg
Answer the receiver converted to a FloatE
Answer the receiver converted to a FloatQ
Answer the exponent of the receiver in mantissa*2^exponent representation ( |mantissa|<=1 )
Answer the fractional part of the receiver
Answer the receiver multiplied by 2^arg
Truncate the receiver towards zero and answer the result
Answer whether the receiver is not equal to arg
Next: FloatD-converting, Previous: FloatD-built ins, Up: FloatD [Index]
Just defined for completeness. Return the receiver.
Coerce aNumber to the receiver’s class
Answer the receiver’s generality
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Previous: FloatD-coercing, Up: FloatD [Index]
Coerce 0.5 to the receiver’s class
Next: FloatQ, Previous: FloatD, Up: Base classes [Index]
My instances represent floating point numbers that have the same accuracy as C’s "float" numbers.
• FloatE class-byte-order dependancies: | (class) | |
• FloatE class-byte-order dependencies: | (class) | |
• FloatE class-characterization: | (class) | |
• FloatE class-converting: | (class) | |
• FloatE-built ins: | (instance) | |
• FloatE-coercing: | (instance) | |
• FloatE-converting: | (instance) |
Next: FloatE class-byte-order dependencies, Up: FloatE [Index]
Answer the byte of the receiver that contains the sign bit
Next: FloatE class-characterization, Previous: FloatE class-byte-order dependancies, Up: FloatE [Index]
Answer a float with the bytes in aByteArray, which are in big-endian format.
Next: FloatE class-converting, Previous: FloatE class-byte-order dependencies, Up: FloatE [Index]
Return the number of decimal digits of precision for a FloatE. Technically, if P is the precision for the representation, then the decimal precision Q is the maximum number of decimal digits such that any floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and back again, without change to the Q decimal digits.
Returns the value of e. Hope is that it is precise enough
Return the maximum allowable exponent for a FloatE that is finite.
Return the maximum allowable exponent for a FloatE that is finite.
Return the largest normalized FloatE that is not infinite.
Return the smallest normalized FloatE that is > 0
Return a FloatE that represents positive infinity.
Returns the value of ln 10. Hope is that it is precise enough
Returns the value of log2 10. Hope is that it is precise enough
Return a FloatE that represents a mathematically indeterminate value (e.g. Inf - Inf, Inf / Inf).
Return a FloatE that represents negative infinity.
Returns the value of pi. Hope is that it is precise enough
Answer the number of bits in the mantissa. 1 + (2^-precision) = 1
Next: FloatE-built ins, Previous: FloatE class-characterization, Up: FloatE [Index]
Answer aNumber converted to a FloatE
Next: FloatE-coercing, Previous: FloatE class-converting, Up: FloatE [Index]
Multiply the receiver and arg and answer another Number
Sum the receiver and arg and answer another Number
Subtract arg from the receiver and answer another Number
Divide the receiver by arg and answer another FloatE
Answer whether the receiver is less than arg
Answer whether the receiver is less than or equal to arg
Answer whether the receiver is equal to arg
Answer whether the receiver is greater than arg
Answer whether the receiver is greater than or equal to arg
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatQ
Answer the exponent of the receiver in mantissa*2^exponent representation ( |mantissa|<=1 )
Answer the fractional part of the receiver
Answer the receiver multiplied by 2^arg
Truncate the receiver towards zero and answer the result
Answer whether the receiver is not equal to arg
Next: FloatE-converting, Previous: FloatE-built ins, Up: FloatE [Index]
Just defined for completeness. Return the receiver.
Coerce aNumber to the receiver’s class
Answer the receiver’s generality
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Previous: FloatE-coercing, Up: FloatE [Index]
Coerce 0.5 to the receiver’s class
Next: Fraction, Previous: FloatE, Up: Base classes [Index]
My instances represent floating point numbers that have the same accuracy as C’s "long double" numbers.
• FloatQ class-byte-order dependancies: | (class) | |
• FloatQ class-characterization: | (class) | |
• FloatQ class-converting: | (class) | |
• FloatQ-built ins: | (instance) | |
• FloatQ-coercing: | (instance) | |
• FloatQ-converting: | (instance) |
Next: FloatQ class-characterization, Up: FloatQ [Index]
Answer the byte of the receiver that contains the sign bit
Next: FloatQ class-converting, Previous: FloatQ class-byte-order dependancies, Up: FloatQ [Index]
Return the number of decimal digits of precision for a FloatQ. Technically, if P is the precision for the representation, then the decimal precision Q is the maximum number of decimal digits such that any floating point number with Q base 10 digits can be rounded to a floating point number with P base 2 digits and back again, without change to the Q decimal digits.
Returns the value of e. Hope is that it is precise enough
Return the maximum allowable exponent for a FloatQ that is finite.
Return the maximum allowable exponent for a FloatQ that is finite.
Return the largest normalized FloatQ that is not infinite.
Return the smallest normalized FloatQ that is > 0
Return a FloatQ that represents positive infinity.
Returns the value of ln 10. Hope is that it is precise enough
Returns the value of log2 10. Hope is that it is precise enough
Return a FloatQ that represents a mathematically indeterminate value (e.g. Inf - Inf, Inf / Inf).
Return a FloatQ that represents negative infinity.
Returns the value of pi. Hope is that it is precise enough
Answer the number of bits in the mantissa. 1 + (2^-precision) = 1
Next: FloatQ-built ins, Previous: FloatQ class-characterization, Up: FloatQ [Index]
Answer aNumber converted to a FloatQ
Next: FloatQ-coercing, Previous: FloatQ class-converting, Up: FloatQ [Index]
Multiply the receiver and arg and answer another Number
Sum the receiver and arg and answer another Number
Subtract arg from the receiver and answer another Number
Divide the receiver by arg and answer another FloatQ
Answer whether the receiver is less than arg
Answer whether the receiver is less than or equal to arg
Answer whether the receiver is equal to arg
Answer whether the receiver is greater than arg
Answer whether the receiver is greater than or equal to arg
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatE
Answer the exponent of the receiver in mantissa*2^exponent representation ( |mantissa|<=1 )
Answer the fractional part of the receiver
Answer the receiver multiplied by 2^arg
Truncate the receiver towards zero and answer the result
Answer whether the receiver is not equal to arg
Next: FloatQ-converting, Previous: FloatQ-built ins, Up: FloatQ [Index]
Just defined for completeness. Return the receiver.
Coerce aNumber to the receiver’s class
Answer the receiver’s generality
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Previous: FloatQ-coercing, Up: FloatQ [Index]
Coerce 0.5 to the receiver’s class
Next: Generator, Previous: FloatQ, Up: Base classes [Index]
I represent rational numbers in the form (p/q) where p and q are integers. The arithmetic operations *, +, -, /, on fractions, all return a reduced fraction.
• Fraction class-converting: | (class) | |
• Fraction class-instance creation: | (class) | |
• Fraction-accessing: | (instance) | |
• Fraction-arithmetic: | (instance) | |
• Fraction-coercing: | (instance) | |
• Fraction-coercion: | (instance) | |
• Fraction-comparing: | (instance) | |
• Fraction-converting: | (instance) | |
• Fraction-optimized cases: | (instance) | |
• Fraction-printing: | (instance) | |
• Fraction-testing: | (instance) |
Next: Fraction class-instance creation, Up: Fraction [Index]
Answer aNumber converted to a Fraction
Next: Fraction-accessing, Previous: Fraction class-converting, Up: Fraction [Index]
Initialize the receiver’s class variables
Answer a new instance of fraction (nInteger/dInteger)
Next: Fraction-arithmetic, Previous: Fraction class-instance creation, Up: Fraction [Index]
Answer the receiver’s denominator
Answer the receiver’s numerator
Next: Fraction-coercing, Previous: Fraction-accessing, Up: Fraction [Index]
Multiply two numbers and answer the result.
Sum two numbers and answer the result.
Subtract aNumber from the receiver and answer the result.
Divide the receiver by aNumber and answer the result.
Return the integer quotient of dividing the receiver by aNumber with truncation towards negative infinity.
Return the remainder from dividing the receiver by aNumber, (using //).
Answer an estimate of (self abs floorLog: 10)
Next: Fraction-coercion, Previous: Fraction-arithmetic, Up: Fraction [Index]
Truncate the receiver towards positive infinity and return the truncated result
Coerce aNumber to the receiver’s class
Truncate the receiver towards negative infinity and return the truncated result
Return the receiver’s generality
Truncate the receiver and return the truncated result
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Next: Fraction-comparing, Previous: Fraction-coercing, Up: Fraction [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Next: Fraction-converting, Previous: Fraction-coercion, Up: Fraction [Index]
Test if the receiver is less than arg.
Test if the receiver is less than or equal to arg.
Test if the receiver equals arg.
Test if the receiver is more than arg.
Test if the receiver is greater than or equal to arg.
Answer an hash value for the receiver
Next: Fraction-optimized cases, Previous: Fraction-comparing, Up: Fraction [Index]
Answer the receiver, it is already a Fraction
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatD
Answer the receiver, it is already a Fraction
Answer the integer part of the receiver, expressed as a Fraction
Next: Fraction-printing, Previous: Fraction-converting, Up: Fraction [Index]
Return the receiver, with its sign changed.
Return self raised to the anInteger-th power.
Return the reciprocal of the receiver
Return the square root of the receiver.
Return the square of the receiver.
Next: Fraction-testing, Previous: Fraction-optimized cases, Up: Fraction [Index]
Print a representation of the receiver on aStream
Store Smalltalk code compiling to the receiver on aStream
Previous: Fraction-printing, Up: Fraction [Index]
Answer whether the receiver is rational - true
Next: Getopt, Previous: Fraction, Up: Base classes [Index]
A Generator object provides a way to use blocks to define a Stream of many return values. The return values are computed one at a time, as needed, and hence need not even be finite.
A generator block is converted to a Generator with "Generator on: [...]". The Generator itself is passed to the block, and as soon as a message like #next, #peek, #atEnd or #peekFor: is sent to the generator, execution of the block starts/resumes and goes on until the generator’s #yield: method is called: then the argument of #yield: will be the Generator’s next element. If the block goes on to the end without calling #yield:, the Generator will produce no more elements and #atEnd will return true.
You could achieve the effect of generators manually by writing your own class and storing all the local variables of the generator as instance variables. For example, returning a list of integers could be done by setting a variable to 0, and having the #next method increment it and return it. However, for a moderately complicated generator, writing a corresponding class would be much messier (and might lead to code duplication or inefficiency if you want to support #peek, #peekFor: and/or #atEnd): in general, providing a #do:-like interface is easy, but not providing a Stream-like one (think binary trees).
The idea of generators comes from other programming languages, in particular this interface looks much like Scheme streams and Python generators. But Python in turn mutuated the idea for example from Icon, where the idea of generators is central. In Icon, every expression and function call behaves like a generator, and if a statement manages scalars, it automatically uses up all the results that the corresponding generator provides; on the other hand, Icon does not represent generators as first-class objects like Python and Smalltalk do.
• Generator class-instance creation: | (class) | |
• Generator-stream protocol: | (instance) |
Next: Generator-stream protocol, Up: Generator [Index]
Return an infinite generator; the first item is aValue, the following items are obtained by passing the previous value to aBlock.
Return a generator and pass it to aBlock. When #next is sent to the generator, the block will start execution, and will be suspended again as soon as #yield: is sent from the block to the generator.
Return a generator; for each item of aCollection, evaluate aBlock passing the generator and the item.
Previous: Generator class-instance creation, Up: Generator [Index]
Answer whether more data can be generated.
Evaluate the generator until it generates the next value or decides that nothing else can be generated.
Evaluate the generator until it generates the next value or decides that nothing else can be generated, and save the value so that #peek or #next will return it again.
Evaluate the generator until it generates the next value or decides that nothing else can be generated, and if it is not equal to anObject, save the value so that #peek or #next will return it again.
When entering from the generator the code in the block is executed and control flow goes back to the consumer. When entering from the consumer, the code after the continuation is executed, which resumes execution of the generator block.
Next: Halt, Previous: Generator, Up: Base classes [Index]
This class is usually not instantiated. Class methods provide a way to parse command lines from Smalltalk.
• Getopt class-instance creation: | (class) |
Parse the command-line arguments in args according to the syntax specified in pattern. For every command-line option found, the two-argument block actionBlock is evaluated passing the option name and the argument. For file names (or in general, other command-line arguments than options) the block’s first argument will be nil. For options without arguments, or with unspecified optional arguments, the block’s second argument will be nil. The option name will be passed as a character object for short options, and as a string for long options.
If an error is found, nil is returned. For more information on the syntax of pattern, see #parse:with:do:ifError:.
Parse the command-line arguments in args according to the syntax specified in pattern. For every command-line option found, the two-argument block actionBlock is evaluated passing the option name and the argument. For file names (or in general, other command-line arguments than options) the block’s first argument will be nil. For options without arguments, or with unspecified optional arguments, the block’s second argument will be nil. The option name will be passed as a character object for short options, and as a string for long options.
If an error is found, the parsing is interrupted, errorBlock is evaluated, and the returned value is answered.
Every whitespace-separated part (‘word’) of pattern specifies a command-line option. If a word ends with a colon, the option will have a mandatory argument. If a word ends with two colons, the option will have an optional argument. Before the colons, multiple option names (either short names like ‘-l’ or long names like ‘–long’) can be specified. Before passing the option to actionBlock, the name will be canonicalized to the last one.
Prefixes of long options are accepted as long as they’re unique, and they are canonicalized to the full name before passing it to actionBlock. Additionally, the full name of an option is accepted even if it is the prefix of a longer option.
Mandatory arguments can appear in the next argument, or in the same argument (separated by an = for arguments to long options). Optional arguments must appear in the same argument.
Next: HashedCollection, Previous: Getopt, Up: Base classes [Index]
Halt represents a resumable error, usually a bug.
• Halt-description: | (instance) |
Answer a textual description of the exception.
Answer true. #halt exceptions are by default resumable.
Next: HomedAssociation, Previous: Halt, Up: Base classes [Index]
I am an hashed collection that can store objects uniquely and give fast responses on their presence in the collection.
• HashedCollection class-instance creation: | (class) | |
• HashedCollection-accessing: | (instance) | |
• HashedCollection-builtins: | (instance) | |
• HashedCollection-copying: | (instance) | |
• HashedCollection-enumerating the elements of a collection: | (instance) | |
• HashedCollection-rehashing: | (instance) | |
• HashedCollection-removing: | (instance) | |
• HashedCollection-saving and loading: | (instance) | |
• HashedCollection-storing: | (instance) | |
• HashedCollection-testing collections: | (instance) |
Next: HashedCollection-accessing, Up: HashedCollection [Index]
Answer a new instance of the receiver with a default size
Answer a new instance of the receiver with the given capacity
Answer a collection whose elements are all those in aCollection
Next: HashedCollection-builtins, Previous: HashedCollection class-instance creation, Up: HashedCollection [Index]
Add newObject to the set, if and only if the set doesn’t already contain an occurrence of it. Don’t fail if a duplicate is found. Answer anObject
This method should not be called for instances of this class.
This method should not be called for instances of this class.
Next: HashedCollection-copying, Previous: HashedCollection-accessing, Up: HashedCollection [Index]
Private - Answer the anIndex-th item of the hash table for the receiver. Using this instead of basicAt: allows for easier changes in the representation
Private - Store value in the anIndex-th item of the hash table for the receiver. Using this instead of basicAt:put: allows for easier changes in the representation
Private - Answer the size of the hash table for the receiver. Using this instead of basicSize allows for easier changes in the representation
Next: HashedCollection-enumerating the elements of a collection, Previous: HashedCollection-builtins, Up: HashedCollection [Index]
Returns a deep copy of the receiver (the instance variables are copies of the receiver’s instance variables)
Returns a shallow copy of the receiver (the instance variables are not copied)
Next: HashedCollection-rehashing, Previous: HashedCollection-copying, Up: HashedCollection [Index]
Enumerate all the non-nil members of the set
Next: HashedCollection-removing, Previous: HashedCollection-enumerating the elements of a collection, Up: HashedCollection [Index]
Rehash the receiver
Next: HashedCollection-saving and loading, Previous: HashedCollection-rehashing, Up: HashedCollection [Index]
Remove oldObject from the set. If it is found, answer oldObject. Otherwise, evaluate anExceptionBlock and answer its value.
Next: HashedCollection-storing, Previous: HashedCollection-removing, Up: HashedCollection [Index]
Called after loading an object; rehash the collection because identity objects will most likely mutate their hashes.
Called after an object is dumped. Do nothing – necessary because by default this calls #postLoad by default
Next: HashedCollection-testing collections, Previous: HashedCollection-saving and loading, Up: HashedCollection [Index]
Store on aStream some Smalltalk code which compiles to the receiver
Previous: HashedCollection-storing, Up: HashedCollection [Index]
Returns true if the two sets have the same membership, false if not
Answer how many elements the receiver can hold before having to grow.
Return the hash code for the members of the set. Since order is unimportant, we use a commutative operator to compute the hash value.
Answer whether the receiver contains an instance of anObject.
Answer whether the receiver is empty.
Return the number of occurrences of anObject. Since we’re a set, this is either 0 or 1. Nil is never directly in the set, so we special case it (the result is always 1).
Answer the receiver’s size
Next: IdentityDictionary, Previous: HashedCollection, Up: Base classes [Index]
My instances represent know about their parent namespace, which is of use when implementing weak collections and finalizations.
• HomedAssociation class-basic: | (class) | |
• HomedAssociation-accessing: | (instance) | |
• HomedAssociation-finalization: | (instance) | |
• HomedAssociation-storing: | (instance) |
Next: HomedAssociation-accessing, Up: HomedAssociation [Index]
Answer a new association with the given key and value
Next: HomedAssociation-finalization, Previous: HomedAssociation class-basic, Up: HomedAssociation [Index]
Answer the namespace in which I live.
Set the namespace in which I live to be aNamespace.
Next: HomedAssociation-storing, Previous: HomedAssociation-accessing, Up: HomedAssociation [Index]
This message is sent to the receiver when the object is made ephemeron (which is common when HomedAssociations are used by a WeakKeyDictionary or a WeakSet). The mourning of the object’s key is first of all demanded to the environment (which will likely remove the object from itself), and then performed as usual by clearing the key and value fields.
Previous: HomedAssociation-finalization, Up: HomedAssociation [Index]
Put on aStream some Smalltalk code compiling to the receiver
Next: IdentitySet, Previous: HomedAssociation, Up: Base classes [Index]
I am similar to LookupTable, except that I use the object identity comparision message == to determine equivalence of indices.
Next: Integer, Previous: IdentityDictionary, Up: Base classes [Index]
I am the typical set object; I can store any objects uniquely. I use the == operator to determine duplication of objects.
• IdentitySet-testing: | (instance) |
Up: IdentitySet [Index]
Answer whether we include the anObject object; for IdentitySets this is identical to #includes:
Next: Interval, Previous: IdentitySet, Up: Base classes [Index]
I am the abstract integer class of the GNU Smalltalk system. My subclasses’ instances can represent signed integers of various sizes (a subclass is picked according to the size), with varying efficiency.
• Integer class-converting: | (class) | |
• Integer-accessing: | (instance) | |
• Integer-basic: | (instance) | |
• Integer-bit operators: | (instance) | |
• Integer-converting: | (instance) | |
• Integer-extension: | (instance) | |
• Integer-iterators: | (instance) | |
• Integer-math methods: | (instance) | |
• Integer-printing: | (instance) | |
• Integer-storing: | (instance) | |
• Integer-testing functionality: | (instance) |
Next: Integer-accessing, Up: Integer [Index]
Answer aNumber converted to a kind of Integer
Next: Integer-basic, Previous: Integer class-converting, Up: Integer [Index]
Answer ‘1’.
Answer the receiver.
Next: Integer-bit operators, Previous: Integer-accessing, Up: Integer [Index]
Answer an hash value for the receiver
Next: Integer-converting, Previous: Integer-basic, Up: Integer [Index]
True if all 1 bits in anInteger are 1 in the receiver
True if any 1 bits in anInteger are 1 in the receiver
Answer the index-th bit of the receiver (the LSB has an index of 1)
Answer an integer which is identical to the receiver, possibly with the exception of the index-th bit of the receiver (the LSB having an index of 1), which assumes a value equal to the low-order bit of the second parameter.
Answer an Integer equal to the receiver, except that all the bits that are set in aMask are cleared.
Return the 1’s complement of the bits of the receiver
Clear the index-th bit of the receiver and answer a new Integer
Answer the index-th base-256 digit of the receiver (byte), expressed in two’s complement
Return the index of the highest order 1 bit of the receiver.
Answer whether the index-th bit of the receiver is set
Return the index of the lowest order 1 bit of the receiver.
Answer true if no 1 bits in anInteger are 1 in the receiver.
Set the index-th bit of the receiver and answer a new Integer
Next: Integer-extension, Previous: Integer-bit operators, Up: Integer [Index]
Return self as a Character or UnicodeCharacter object.
Return the receiver converted to a fraction
Answer the receiver, converted to a ScaledDecimal object. The scale is forced to be 0.
Return the receiver - it’s already truncated
Coerce aNumber to the receiver’s class.
Return the receiver - it’s already truncated
Return the receiver - it’s already truncated
Return the receiver - it’s already truncated
Next: Integer-iterators, Previous: Integer-converting, Up: Integer [Index]
Answer the receiver, truncated to the first higher or equal multiple of anInteger (which must be a power of two)
Next: Integer-math methods, Previous: Integer-extension, Up: Integer [Index]
Evaluate aBlock a number of times equal to the receiver’s value. Compiled in-line for no argument aBlocks without temporaries, and therefore not overridable.
Next: Integer-printing, Previous: Integer-iterators, Up: Integer [Index]
Compute the number of combinations of anInteger objects among a number of objects given by the receiver.
Answer (self log: radix) ceiling. Optimized to answer an integer.
Answer an estimate of (self abs floorLog: 10)
Return whether the receiver is even
Return the receiver’s factorial.
Answer (self log: radix) floor. Optimized to answer an integer.
Return the greatest common divisor (Euclid’s algorithm) between the receiver and anInteger
Return the least common multiple between the receiver and anInteger
Return whether the receiver is odd
Next: Integer-storing, Previous: Integer-math methods, Up: Integer [Index]
Print on aStream the base 10 representation of the receiver
Return the base 10 representation of the receiver
Answer whether the receiver is expressible as a Smalltalk literal.
Print on aStream the base 10 representation of the receiver
Print on aStream the base b representation of the receiver
Print on aStream the base 10 representation of the receiver, padded if necessary to size characters with copies of padding.
Print on aStream the base b representation of the receiver, padded if necessary to size characters with copies of padding.
Return the base baseInteger representation of the receiver, padded if necessary to size characters with copies of padding.
Return the base baseInteger representation of the receiver, padded if necessary to size characters with copies of padding.
Return the base 10 representation of the receiver
Return the base baseInteger representation of the receiver
Return the base baseInteger representation of the receiver, with BBr in front of it
Return the base baseInteger representation of the receiver, with BBr in front of it. This method is deprecated, use #printStringRadix: instead.
Store on aStream some Smalltalk code which compiles to the receiver
Print on aStream Smalltalk code compiling to the receiver, represented in base b
Next: Integer-testing functionality, Previous: Integer-printing, Up: Integer [Index]
Print on aStream the base 10 representation of the receiver
Return the base 10 representation of the receiver
Previous: Integer-storing, Up: Integer [Index]
Answer ‘true’.
Answer whether the receiver is rational - true
Next: Iterable, Previous: Integer, Up: Base classes [Index]
My instances represent ranges of objects, typically Number type objects. I provide iteration/enumeration messages for producing all the members that my instance represents.
• Interval class-instance creation: | (class) | |
• Interval-basic: | (instance) | |
• Interval-printing: | (instance) | |
• Interval-storing: | (instance) | |
• Interval-testing: | (instance) |
Next: Interval-basic, Up: Interval [Index]
Answer an Interval going from startInteger to the stopInteger, with a step of 1
Answer an Interval going from startInteger to the stopInteger, with a step of stepInteger
Answer an Interval containing the same elements as aCollection. Fail if it is not possible to create one.
Next: Interval-printing, Previous: Interval class-instance creation, Up: Interval [Index]
Answer the index-th element of the receiver.
This method should not be called for instances of this class.
Evaluate the receiver for each element in aBlock, collect in an array the result of the evaluations.
Not commented.
Evaluate the receiver for each element in aBlock
Answer whether the receiver is empty.
Answer a copy of the receiver with all of its items reversed
Answer the number of elements in the receiver.
Answer ‘Array’.
Next: Interval-storing, Previous: Interval-basic, Up: Interval [Index]
Not commented.
Answer ‘step’.
Answer the last value.
Print a representation for the receiver on aStream
Next: Interval-testing, Previous: Interval-printing, Up: Interval [Index]
Store Smalltalk code compiling to the receiver on aStream
Previous: Interval-storing, Up: Interval [Index]
Answer whether anInterval is the same interval as the receiver
Answer an hash value for the receiver
Answer whether elements of the receiver are computed using exact arithmetic. This is true as long as the start and step value are exact (i.e. not floating-point).
Next: LargeArray, Previous: Interval, Up: Base classes [Index]
I am an abstract class. My instances are collections of objects that can be iterated. The details on how they can be mutated (if at all possible) are left to the subclasses.
• Iterable class-multibyte encodings: | (class) | |
• Iterable-enumeration: | (instance) | |
• Iterable-iteration: | (instance) | |
• Iterable-streaming: | (instance) |
Next: Iterable-enumeration, Up: Iterable [Index]
Answer true; the receiver is able to store arbitrary Unicode characters.
Next: Iterable-iteration, Previous: Iterable class-multibyte encodings, Up: Iterable [Index]
Answer an iterable that enumerates first the elements of the receiver and then the elements of anIterable.
Search the receiver for an element for which aBlock returns false. Answer true if none does, false otherwise.
Search the receiver for an element for which aBlock returns true. Answer true if some does, false otherwise.
Answer a new instance of a Collection containing all the results of evaluating aBlock passing each of the receiver’s elements
Search the receiver for an element for which aBlock returns false. Answer true if none does, false otherwise.
Search the receiver for an element for which aBlock returns true. Answer true if some does, false otherwise.
Count the elements of the receiver for which aBlock returns true, and return their number.
Search the receiver for an element for which aBlock returns true. If some does, answer it. If none does, fail
Search the receiver for an element for which aBlock returns true. If some does, answer it. If none does, answer the result of evaluating aBlock
Enumerate each object of the receiver, passing them to aBlock
Enumerate each object of the receiver, passing them to aBlock. Between every two invocations of aBlock, invoke separatorBlock
First, pass to binaryBlock the first and second elements of the receiver; for each subsequent element, pass the result of the previous evaluation and an element. Answer the result of the last invocation, or the first element if the collection has size 1. Fail if the collection is empty.
First, pass to binaryBlock thisValue and the first element of the receiver; for each subsequent element, pass the result of the previous evaluation and an element. Answer the result of the last invocation.
Search the receiver for an element for which aBlock returns true. Answer true if none does, false otherwise.
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, don’t answer true
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, answer true
Next: Iterable-streaming, Previous: Iterable-enumeration, Up: Iterable [Index]
Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock with each element of the receiver (which should be an Iterable).
Evaluate iterableBlock with each element of the receiver (which should be an Iterable) if not nil. Else answer nil
Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock, passing each element of the receiver (which should be an Iterable).
Previous: Iterable-iteration, Up: Iterable [Index]
Write all the objects in the receiver to aStream
Return a stream with the same contents as the receiver.
Next: LargeArrayedCollection, Previous: Iterable, Up: Base classes [Index]
I am similar to a plain array, but I’m specially designed to save memory when lots of items are nil.
• LargeArray-overridden: | (instance) |
Up: LargeArray [Index]
Create an Array of the given size
Next: LargeByteArray, Previous: LargeArray, Up: Base classes [Index]
I am an abstract class specially designed to save memory when lots of items have the same value.
• LargeArrayedCollection class-instance creation: | (class) | |
• LargeArrayedCollection-accessing: | (instance) | |
• LargeArrayedCollection-basic: | (instance) |
Next: LargeArrayedCollection-accessing, Up: LargeArrayedCollection [Index]
Answer a new instance of the receiver, with room for anInteger elements.
Next: LargeArrayedCollection-basic, Previous: LargeArrayedCollection class-instance creation, Up: LargeArrayedCollection [Index]
Answer the anIndex-th item of the receiver.
Replace the anIndex-th item of the receiver with anObject.
Arrange the representation of the array for maximum memory saving.
Previous: LargeArrayedCollection-accessing, Up: LargeArrayedCollection [Index]
Answer whether the receiver and aLargeArray have the same contents
Answer an hash value for the receiver
Answer the maximum valid index for the receiver
Next: LargeInteger, Previous: LargeArrayedCollection, Up: Base classes [Index]
I am similar to a plain ByteArray, but I’m specially designed to save memory when lots of items are zero.
• LargeByteArray-overridden: | (instance) |
Up: LargeByteArray [Index]
Answer the maximum number of consecutive items set to the defaultElement that can be present in a compressed array.
Answer the value which is hoped to be the most common in the array
Create a ByteArray of the given size
Next: LargeNegativeInteger, Previous: LargeByteArray, Up: Base classes [Index]
I represent a large integer, which has to be stored as a long sequence of bytes. I have methods to do arithmetics and comparisons, but I need some help from my children, LargePositiveInteger and LargeNegativeInteger, to speed them up a bit.
• LargeInteger-accessing: | (instance) | |
• LargeInteger-arithmetic: | (instance) | |
• LargeInteger-bit operations: | (instance) | |
• LargeInteger-built-ins: | (instance) | |
• LargeInteger-coercion: | (instance) | |
• LargeInteger-disabled: | (instance) | |
• LargeInteger-primitive operations: | (instance) | |
• LargeInteger-testing: | (instance) |
Next: LargeInteger-arithmetic, Up: LargeInteger [Index]
Return self raised to the anInteger-th power
Next: LargeInteger-bit operations, Previous: LargeInteger-accessing, Up: LargeInteger [Index]
Multiply aNumber and the receiver, answer the result
Sum the receiver and aNumber, answer the result
Subtract aNumber from the receiver, answer the result
Divide aNumber and the receiver, answer the result (an Integer or Fraction)
Divide aNumber and the receiver, answer the result truncated towards -infinity
Divide aNumber and the receiver, answer the remainder truncated towards -infinity
Dividing receiver by arg assuming that the remainder is zero, and answer the result
Answer an estimate of (self abs floorLog: 10)
Answer the receiver’s negated
Divide aNumber and the receiver, answer the result truncated towards 0
Divide aNumber and the receiver, answer the remainder truncated towards 0
Next: LargeInteger-built-ins, Previous: LargeInteger-arithmetic, Up: LargeInteger [Index]
Answer the receiver ANDed with aNumber
Answer the aNumber-th bit in the receiver, where the LSB is 1
Answer the receiver’s 1’s complement
Answer the receiver ORed with aNumber
Answer the receiver shifted by aNumber places
Answer the receiver XORed with aNumber
Return the index of the lowest order 1 bit of the receiver.
Next: LargeInteger-coercion, Previous: LargeInteger-bit operations, Up: LargeInteger [Index]
Answer the anIndex-th byte in the receiver’s representation
Set the anIndex-th byte in the receiver’s representation
Answer the index-th base-256 digit of the receiver (byte), expressed in two’s complement
Set the anIndex-th base-256 digit in the receiver’s representation
Answer the number of base-256 digits in the receiver
Answer an hash value for the receiver
Private - Replace the characters from start to stop with new characters contained in replacementString (which, actually, can be any variable byte class), starting at the replaceStart location of replacementString
Answer the number of indexed instance variable in the receiver
Next: LargeInteger-disabled, Previous: LargeInteger-built-ins, Up: LargeInteger [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Truncate the number; if needed, convert it to LargeInteger representation.
Answer the receiver’s generality
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Next: LargeInteger-primitive operations, Previous: LargeInteger-coercion, Up: LargeInteger [Index]
This method always fails. The number of OOPs is far less than the minimum number represented with a LargeInteger.
Answer ‘nil’.
Next: LargeInteger-testing, Previous: LargeInteger-disabled, Up: LargeInteger [Index]
Private - Left shift the receiver by aNumber places
Private - Right shift the receiver by ’shift’ places
Private - Same as negated, but always answer a LargeInteger
Previous: LargeInteger-primitive operations, Up: LargeInteger [Index]
Answer whether the receiver is smaller than aNumber
Answer whether the receiver is smaller than aNumber or equal to it
Answer whether the receiver and aNumber identify the same number.
Answer whether the receiver is greater than aNumber
Answer whether the receiver is greater than aNumber or equal to it
Answer whether the receiver and aNumber identify different numbers.
Next: LargePositiveInteger, Previous: LargeInteger, Up: Base classes [Index]
Just like my brother LargePositiveInteger, I provide a few methods that allow LargeInteger to determine the sign of a large integer in a fast way during its calculations. For example, I know that I am smaller than any LargePositiveInteger
• LargeNegativeInteger-converting: | (instance) | |
• LargeNegativeInteger-numeric testing: | (instance) | |
• LargeNegativeInteger-reverting to LargePositiveInteger: | (instance) |
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatE
Answer the receiver converted to a FloatQ
Next: LargeNegativeInteger-reverting to LargePositiveInteger, Previous: LargeNegativeInteger-converting, Up: LargeNegativeInteger [Index]
Answer the receiver’s absolute value.
Answer whether the receiver is < 0
Answer whether the receiver is >= 0
Answer the receiver’s sign
Answer whether the receiver is > 0
Previous: LargeNegativeInteger-numeric testing, Up: LargeNegativeInteger [Index]
Sum the receiver and aNumber, answer the result
Subtract aNumber from the receiver, answer the result
Return the greatest common divisor between the receiver and anInteger
Answer the receiver’s highest bit’s index
Next: LargeWordArray, Previous: LargeNegativeInteger, Up: Base classes [Index]
Just like my brother LargeNegativeInteger, I provide a few methods that allow LargeInteger to determine the sign of a large integer in a fast way during its calculations. For example, I know that I am larger than any LargeNegativeInteger. In addition I implement the guts of arbitrary precision arithmetic.
• LargePositiveInteger-arithmetic: | (instance) | |
• LargePositiveInteger-converting: | (instance) | |
• LargePositiveInteger-helper byte-level methods: | (instance) | |
• LargePositiveInteger-numeric testing: | (instance) | |
• LargePositiveInteger-primitive operations: | (instance) |
Next: LargePositiveInteger-converting, Up: LargePositiveInteger [Index]
Sum the receiver and aNumber, answer the result
Subtract aNumber from the receiver, answer the result
Calculate the GCD between the receiver and anInteger
Answer the receiver’s highest bit’s index
Next: LargePositiveInteger-helper byte-level methods, Previous: LargePositiveInteger-arithmetic, Up: LargePositiveInteger [Index]
Answer the receiver converted to a FloatD
Answer the receiver converted to a FloatE
Answer the receiver converted to a FloatQ
Return in a String str the base radix representation of the receiver.
Next: LargePositiveInteger-numeric testing, Previous: LargePositiveInteger-converting, Up: LargePositiveInteger [Index]
Private - Answer the sign of byteArray2 - byteArray1; the j-th byte of byteArray1 is compared with the first of byteArray2, the j+1-th with the second, and so on.
Private - Sutract the bytes in byteArray2 from those in byteArray1
Private - Multiply the bytes in bytes by anInteger, which must be < 255. Put the result back in bytes.
Private - Left shift by 1 place the bytes in aByteArray
Private - Left shift the bytes in aByteArray by totalShift places
Private - Left shift by shift places the bytes in aByteArray (shift <= 7)
Private - Right shift the bytes in aByteArray by totalShift places
Private - Right shift the bytes in ‘bytes’ by ’aNumber’ places (shift <= 7)
Private - Answer the number of trailing zero bits in the receiver
Private - Implements Knuth’s divide and correct algorithm from ‘Seminumerical Algorithms’ 3rd Edition, section 4.3.1 (which is basically an enhanced version of the divide ‘algorithm’ for two-digit divisors which is taught in primary school!!!)
Next: LargePositiveInteger-primitive operations, Previous: LargePositiveInteger-helper byte-level methods, Up: LargePositiveInteger [Index]
Answer the receiver’s absolute value
Answer whether the receiver is < 0
Answer whether the receiver is >= 0
Answer the receiver’s sign
Answer whether the receiver is > 0
Previous: LargePositiveInteger-numeric testing, Up: LargePositiveInteger [Index]
Private - Divide the receiver by aNumber (unsigned division). Evaluate aBlock passing the result ByteArray, the remainder ByteArray, and whether the division had a remainder
Private - Answer whether the receiver is small enough to employ simple scalar algorithms for division and multiplication
Private - Multiply the receiver by aNumber (unsigned multiply)
Next: LargeZeroInteger, Previous: LargePositiveInteger, Up: Base classes [Index]
I am similar to a plain WordArray, but I’m specially designed to save memory when lots of items are zero.
• LargeWordArray-overridden: | (instance) |
Up: LargeWordArray [Index]
Answer the value which is hoped to be the most common in the array
Create a WordArray of the given size
Next: Link, Previous: LargeWordArray, Up: Base classes [Index]
I am quite a strange class. Indeed, the concept of a "large integer" that is zero is a weird one. Actually my only instance is zero but is represented like LargeIntegers, has the same generality as LargeIntegers, and so on. That only instance is stored in the class variable Zero, and is used in arithmetical methods, when we have to coerce a parameter that is zero.
• LargeZeroInteger-accessing: | (instance) | |
• LargeZeroInteger-arithmetic: | (instance) | |
• LargeZeroInteger-numeric testing: | (instance) | |
• LargeZeroInteger-printing: | (instance) |
Next: LargeZeroInteger-arithmetic, Up: LargeZeroInteger [Index]
Answer ‘0’.
Answer ‘0’.
Answer ‘0’.
Next: LargeZeroInteger-numeric testing, Previous: LargeZeroInteger-accessing, Up: LargeZeroInteger [Index]
Multiply aNumber and the receiver, answer the result
Sum the receiver and aNumber, answer the result
Subtract aNumber from the receiver, answer the result
Divide aNumber and the receiver, answer the result (an Integer or Fraction)
Divide aNumber and the receiver, answer the result truncated towards -infinity
Divide aNumber and the receiver, answer the remainder truncated towards -infinity
Divide aNumber and the receiver, answer the result truncated towards 0
Divide aNumber and the receiver, answer the remainder truncated towards 0
Next: LargeZeroInteger-printing, Previous: LargeZeroInteger-arithmetic, Up: LargeZeroInteger [Index]
Answer the receiver’s sign
Answer whether the receiver is > 0
Previous: LargeZeroInteger-numeric testing, Up: LargeZeroInteger [Index]
Return in a string the base radix representation of the receiver.
Next: LinkedList, Previous: LargeZeroInteger, Up: Base classes [Index]
I represent simple linked lists. Generally, I am not used by myself, but rather a subclass adds other instance variables that hold the information for each node, and I hold the glue that keeps them together.
• Link class-instance creation: | (class) | |
• Link-basic: | (instance) | |
• Link-iteration: | (instance) |
Next: Link-basic, Up: Link [Index]
Create an instance with the given next link
Next: Link-iteration, Previous: Link class-instance creation, Up: Link [Index]
Answer the next item in the list
Set the next item in the list
Previous: Link-basic, Up: Link [Index]
Retrieve a node (instance of Link) that is at a distance of ‘index’ after the receiver.
This method should not be called for instances of this class.
Evaluate aBlock for each element in the list
Answer the number of elements in the list. Warning: this is O(n)
Next: LookupKey, Previous: Link, Up: Base classes [Index]
I provide methods that access and manipulate linked lists. I assume that the elements of the linked list are subclasses of Link, because I use the methods that class Link supplies to implement my methods.
• LinkedList-accessing: | (instance) | |
• LinkedList-adding: | (instance) | |
• LinkedList-enumerating: | (instance) | |
• LinkedList-iteration: | (instance) | |
• LinkedList-testing: | (instance) |
Next: LinkedList-adding, Up: LinkedList [Index]
Return the element that is index into the linked list.
This method should not be called for instances of this class.
Next: LinkedList-enumerating, Previous: LinkedList-accessing, Up: LinkedList [Index]
Add aLink at the end of the list; return aLink.
Add aLink at the head of the list; return aLink.
Add aLink at then end of the list; return aLink.
Remove aLink from the list and return it, or invoke aBlock if it’s not found in the list.
Remove the first element from the list and return it, or error if the list is empty.
Remove the final element from the list and return it, or error if the list is empty.
Next: LinkedList-iteration, Previous: LinkedList-adding, Up: LinkedList [Index]
Enumerate each object in the list, passing it to aBlock (actual behavior might depend on the subclass of Link that is being used).
Answer whether we include the anObject object
Answer whether we include anObject
Next: LinkedList-testing, Previous: LinkedList-enumerating, Up: LinkedList [Index]
Retrieve the first element of the list and return it, or error if the list is empty.
Retrieve the last element of the list and return it, or error if the list is empty.
Previous: LinkedList-iteration, Up: LinkedList [Index]
Returns true if the list contains no members
Returns true if the list contains at least a member
Answer the number of elements in the list. Warning: this is O(n)
Next: LookupTable, Previous: LinkedList, Up: Base classes [Index]
I represent a key for looking up entries in a data structure. Subclasses of me, such as Association, typically represent dictionary entries.
• LookupKey class-basic: | (class) | |
• LookupKey-accessing: | (instance) | |
• LookupKey-printing: | (instance) | |
• LookupKey-storing: | (instance) | |
• LookupKey-testing: | (instance) |
Next: LookupKey-accessing, Up: LookupKey [Index]
Answer a new instance of the receiver with the given key and value
Next: LookupKey-printing, Previous: LookupKey class-basic, Up: LookupKey [Index]
Answer the receiver’s key
Set the receiver’s key to aKey
Next: LookupKey-storing, Previous: LookupKey-accessing, Up: LookupKey [Index]
Put on aStream a representation of the receiver
Next: LookupKey-testing, Previous: LookupKey-printing, Up: LookupKey [Index]
Put on aStream some Smalltalk code compiling to the receiver
Previous: LookupKey-storing, Up: LookupKey [Index]
Answer whether the receiver’s key is less than aLookupKey’s
Answer whether the receiver’s key and value are the same as aLookupKey’s, or false if aLookupKey is not an instance of the receiver
Answer an hash value for the receiver
Next: Magnitude, Previous: LookupKey, Up: Base classes [Index]
I am a more efficient variant of Dictionary that cannot be used as a pool dictionary of variables, as I don’t use Associations to store key-value pairs. I also cannot have nil as a key; if you need to be able to store nil as a key, use Dictionary instead. I use the object equality comparison message #= to determine equivalence of indices.
• LookupTable class-instance creation: | (class) | |
• LookupTable-accessing: | (instance) | |
• LookupTable-enumerating: | (instance) | |
• LookupTable-hashing: | (instance) | |
• LookupTable-rehashing: | (instance) | |
• LookupTable-removing: | (instance) | |
• LookupTable-storing: | (instance) |
Next: LookupTable-accessing, Up: LookupTable [Index]
Create a new LookupTable with a default size
Next: LookupTable-enumerating, Previous: LookupTable class-instance creation, Up: LookupTable [Index]
Add the anAssociation key to the receiver
Answer the key/value Association for the given key. Evaluate aBlock (answering the result) if the key is not found
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
If aKey is absent, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation
Store value as associated to the given key
Next: LookupTable-hashing, Previous: LookupTable-accessing, Up: LookupTable [Index]
Pass each association in the LookupTable to aBlock.
Pass each value in the LookupTable to aBlock.
Pass each key/value pair in the LookupTable as two distinct parameters to aBlock.
Pass each key in the LookupTable to aBlock.
Next: LookupTable-rehashing, Previous: LookupTable-enumerating, Up: LookupTable [Index]
Answer the hash value for the receiver
Next: LookupTable-removing, Previous: LookupTable-hashing, Up: LookupTable [Index]
Rehash the receiver
Next: LookupTable-storing, Previous: LookupTable-rehashing, Up: LookupTable [Index]
Remove anAssociation’s key from the dictionary
Remove anAssociation’s key from the dictionary
Remove the passed key from the LookupTable, answer the result of evaluating aBlock if it is not found
Previous: LookupTable-removing, Up: LookupTable [Index]
Print Smalltalk code compiling to the receiver on aStream
Next: MappedCollection, Previous: LookupTable, Up: Base classes [Index]
I am an abstract class. My objects represent things that are discrete and map to a number line. My instances can be compared with < and >.
• Magnitude-basic: | (instance) | |
• Magnitude-misc methods: | (instance) |
Next: Magnitude-misc methods, Up: Magnitude [Index]
Answer whether the receiver is less than aMagnitude
Answer whether the receiver is less than or equal to aMagnitude
Answer whether the receiver is equal to aMagnitude
Answer whether the receiver is greater than aMagnitude
Answer whether the receiver is greater than or equal to aMagnitude
Previous: Magnitude-basic, Up: Magnitude [Index]
Returns true if object is inclusively between min and max.
Returns the greatest object between the receiver and aMagnitude
Returns the least object between the receiver and aMagnitude
Next: Memory, Previous: Magnitude, Up: Base classes [Index]
I represent collections of objects that are indirectly indexed by names. There are really two collections involved: domain and a map. The map maps between external names and indices into domain, which contains the real association. In order to work properly, the domain must be an instance of a subclass of SequenceableCollection, and the map must be an instance of Dictionary, or of a subclass of SequenceableCollection.
As an example of using me, consider implenting a Dictionary whose elements are indexed. The domain would be a SequenceableCollection with n elements, the map a Dictionary associating each key to an index in the domain. To access by key, to perform enumeration, etc. you would ask an instance of me; to access by index, you would access the domain directly.
Another idea could be to implement row access or column access to a matrix implemented as a single n*m Array: the Array would be the domain, while the map would be an Interval.
• MappedCollection class-instance creation: | (class) | |
• MappedCollection-basic: | (instance) |
Next: MappedCollection-basic, Up: MappedCollection [Index]
Answer a new MappedCollection using the given domain (aCollection) and map
This method should not be used; instead, use #collection:map: to create MappedCollection.
Previous: MappedCollection class-instance creation, Up: MappedCollection [Index]
This method should not be called for instances of this class.
Answer the object at the given key
Store value at the given key
Answer a new MappedCollection that only includes the given keys. The new MappedCollection might use keyCollection or consecutive integers for the keys, depending on the map’s type. Fail if any of them is not found in the map.
Answer a Collection with the same keys as the map, where accessing a key yields the value obtained by passing through aBlock the value accessible from the key in the receiver. The result need not be another MappedCollection
Answer a bag with the receiver’s values
Answer a new collection containing all the items in the receiver from the a-th to the b-th.
Evaluate aBlock for each object
Answer the receiver’s domain
Answer the keys that can be used to access this collection.
Evaluate aBlock passing two arguments, one being a key that can be used to access this collection, and the other one being the value.
Evaluate aBlock on the keys that can be used to access this collection.
Answer the receiver’s map
Answer the objects in the domain for which aBlock returns false
Answer the objects in the domain for which aBlock returns true
Answer the receiver’s size
Next: Message, Previous: MappedCollection, Up: Base classes [Index]
I provide access to actual machine addresses of OOPs and objects. I have no instances; you send messages to my class to map between an object and the address of its OOP or object. In addition I provide direct memory access with different C types (ints, chars, OOPs, floats,...).
• Memory class-accessing: | (class) |
Access the Smalltalk object (OOP) at the given address.
Store a pointer (OOP) to the Smalltalk object identified by ‘value’ at the given address.
Answer whether we’re running on a big- or little-endian system.
Access the C char at the given address. The value is returned as a Smalltalk Character.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given address, using sizeof(char) bytes - i.e. 1 byte.
Access the C int pointed by the given address
Access the C double at the given address.
Store the Smalltalk Float object identified by ‘value’, at the given address, writing it like a C double.
Access the C float at the given address.
Store the Smalltalk Float object identified by ‘value’, at the given address, writing it like a C float.
Access the C int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(int) bytes.
Access the C long int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(long) bytes.
Access the C long double at the given address.
Store the Smalltalk Float object identified by ‘value’, at the given address, writing it like a C long double.
Access the C short int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(short) bytes.
Access the string pointed by the C ‘char *’ at the given given address.
Store the Smalltalk String object identified by ‘value’, at the given address in memory, writing it like a *FRESHLY ALLOCATED* C string. It is the caller’s responsibility to free it if necessary.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given address, using sizeof(char) bytes - i.e. 1 byte.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(int) bytes.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(long) bytes.
Access the C unsigned char at the given address. The value is returned as a Smalltalk Character.
Store as a C char the Smalltalk Character or Integer object identified by ‘value’, at the given address, using sizeof(char) bytes - i.e. 1 byte.
Access the C unsigned int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(int) bytes.
Access the C unsigned long int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(long) bytes.
Access the C unsigned short int at the given address.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(short) bytes.
Store the Smalltalk Integer object identified by ‘value’, at the given address, using sizeof(short) bytes.
Next: MessageNotUnderstood, Previous: Memory, Up: Base classes [Index]
I represent a message send. My instances are created to hold a message that has failed, so that error reporting methods can examine the sender and arguments, but also to represent method attributes (like <primitive: 111> since their syntax is isomorphic to that of a message send.
• Message class-creating instances: | (class) | |
• Message-accessing: | (instance) | |
• Message-basic: | (instance) | |
• Message-printing: | (instance) |
Next: Message-accessing, Up: Message [Index]
Create a new Message with the given selector and argument
Create a new Message with the given selector and arguments
Next: Message-basic, Previous: Message class-creating instances, Up: Message [Index]
Answer the first of the receiver’s arguments
Answer the receiver’s arguments
Set the receiver’s arguments
Answer the receiver’s selector
Set the receiver’s selector
Next: Message-printing, Previous: Message-accessing, Up: Message [Index]
Print a representation of the receiver on aStream, modeling it after the source code for a attribute.
Previous: Message-basic, Up: Message [Index]
Print a representation of the receiver on aStream
Resend to aReceiver - present for compatibility
Resend to aReceiver
Next: Metaclass, Previous: Message, Up: Base classes [Index]
MessageNotUnderstood represents an error during message lookup. Signaling it is the default action of the #doesNotUnderstand: handler
• MessageNotUnderstood-accessing: | (instance) | |
• MessageNotUnderstood-description: | (instance) |
Next: MessageNotUnderstood-description, Up: MessageNotUnderstood [Index]
Answer the message that wasn’t understood
Answer the object to whom the message send was directed
Previous: MessageNotUnderstood-accessing, Up: MessageNotUnderstood [Index]
Answer a textual description of the exception.
Answer true. #doesNotUnderstand: exceptions are by default resumable.
Next: MethodContext, Previous: MessageNotUnderstood, Up: Base classes [Index]
I am the root of the class hierarchy. My instances are metaclasses, one for each real class. My instances have a single instance, which they hold onto, which is the class that they are the metaclass of. I provide methods for creation of actual class objects from metaclass object, and the creation of metaclass objects, which are my instances. If this is confusing to you, it should be...the Smalltalk metaclass system is strange and complex.
• Metaclass class-instance creation: | (class) | |
• Metaclass-accessing: | (instance) | |
• Metaclass-basic: | (instance) | |
• Metaclass-compiling methods: | (instance) | |
• Metaclass-delegation: | (instance) | |
• Metaclass-filing: | (instance) | |
• Metaclass-printing: | (instance) | |
• Metaclass-testing functionality: | (instance) |
Next: Metaclass-accessing, Up: Metaclass [Index]
Answer a new metaclass representing a subclass of superMeta
Next: Metaclass-basic, Previous: Metaclass class-instance creation, Up: Metaclass [Index]
Answer the only instance of the metaclass
Answer the only instance of the metaclass - present for compatibility
Answer the only instance of the metaclass - present for compatibility
Next: Metaclass-compiling methods, Previous: Metaclass-accessing, Up: Metaclass [Index]
Private - create a full featured class and install it, or change the superclass or shape of an existing one; instance variable names, class variable names and pool dictionaries are left untouched.
Private - create a full featured class and install it, or change an existing one
Private - parse the instance and class variables, and the pool dictionaries, then create the class.
Private - create a full featured class and install it
Next: Metaclass-delegation, Previous: Metaclass-basic, Up: Metaclass [Index]
Use my instance’s poolResolution.
Next: Metaclass-filing, Previous: Metaclass-compiling methods, Up: Metaclass [Index]
Add a class variable with the given name to the class pool dictionary
Add the given shared pool to the list of the class’ pool dictionaries
Answer the names of the variables in the receiver’s class pool dictionary and in each of the superclasses’ class pool dictionaries
Answer the shared pools visible from methods in the metaclass, in the correct search order.
Return the names of the shared pools defined by the class and any of its superclasses
Answer the class category
Answer the class pool dictionary
Answer the names of the variables in the class pool dictionary
Answer the class comment
Answer the debugger class that was set in the instance class
Answer the namespace in which the receiver is implemented
Answer the class name - it has none, actually
Answer the (possibly inherited) registered handler for pragma aSymbol, or nil if not found.
Removes the class variable from the class, error if not present, or still in use.
Remove the given dictionary to the list of the class’ pool dictionaries
Return the names of the shared pools defined by the class
Next: Metaclass-printing, Previous: Metaclass-delegation, Up: Metaclass [Index]
File out complete class description: class definition, class and instance methods
Next: Metaclass-testing functionality, Previous: Metaclass-filing, Up: Metaclass [Index]
Answer the class name when the class is referenced from aNamespace.
Print a represention of the receiver on aStream
Print on aStream the class name when the class is referenced from aNamespace.
Store Smalltalk code compiling to the receiver on aStream
Previous: Metaclass-printing, Up: Metaclass [Index]
Answer ‘instanceClass’.
Answer ‘true’.
Next: MethodDictionary, Previous: Metaclass, Up: Base classes [Index]
My instances represent an actively executing method. They record various bits of information about the execution environment, and contain the execution stack.
• MethodContext-accessing: | (instance) | |
• MethodContext-debugging: | (instance) | |
• MethodContext-printing: | (instance) |
Next: MethodContext-debugging, Up: MethodContext [Index]
Answer the MethodContext to which the receiver refers (i.e. the receiver itself)
Answer whether the receiver is a block context
Answers whether the receiver has actually ended execution and will be skipped when doing a return. BlockContexts are removed from the chain whenever a non-local return is done, but MethodContexts need to stay there in case there is a non-local return from the #ensure: block.
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context which invokes a special “termination” method. Such a context can be used as a marker for the current execution environment. Answer whether the receiver is that kind of context.
Answers whether the context must continue execution even after a non-local return (a return from the enclosing method of a block, or a call to the #continue: method of ContextPart). Such contexts are created only by #ensure:.
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context which invokes a special “termination” method. A similar context is created by #valueWithUnwind, by using this method.
Return the context from which the receiver was sent
Next: MethodContext-printing, Previous: MethodContext-accessing, Up: MethodContext [Index]
Answer whether the receiver is a context that should be hidden to the user when presenting a backtrace. Such contexts are identified through the #exceptionHandlingInternal: attribute: if there is such a context in the backtrace, all those above it are marked as internal.
That is, the attribute being set to true means that the context and all those above it are to be hidden, while the attribute being set to false means that the contexts above it must be hidden, but not the context itself.
Previous: MethodContext-debugging, Up: MethodContext [Index]
Print a representation for the receiver on aStream
Next: MethodInfo, Previous: MethodContext, Up: Base classes [Index]
I am similar to an IdentityDictionary, except that removal and rehashing operations inside my instances look atomic to the interpreter.
• MethodDictionary-adding: | (instance) | |
• MethodDictionary-rehashing: | (instance) | |
• MethodDictionary-removing: | (instance) |
Next: MethodDictionary-rehashing, Up: MethodDictionary [Index]
Store value as associated to the given key
Next: MethodDictionary-removing, Previous: MethodDictionary-adding, Up: MethodDictionary [Index]
Rehash the receiver
Previous: MethodDictionary-rehashing, Up: MethodDictionary [Index]
Remove anAssociation’s key from the dictionary
Remove the passed key from the dictionary, answer the result of evaluating aBlock if it is not found
Next: Namespace, Previous: MethodDictionary, Up: Base classes [Index]
I provide information about particular methods. I can produce the category that a method was filed under, and can be used to access the source code of the method.
• MethodInfo-accessing: | (instance) | |
• MethodInfo-equality: | (instance) |
Next: MethodInfo-equality, Up: MethodInfo [Index]
Answer the method category
Set the method category
Answer the class in which the method is defined
Set the class in which the method is defined
Answer the selector through which the method is called
Set the selector through which the method is called
Answer a FileSegment or String or nil containing the method source code
Answer the name of the file where the method source code is
Answer the starting position of the method source code in the sourceFile
Answer a String containing the method source code
Remove the reference to the source code for the method
Previous: MethodInfo-accessing, Up: MethodInfo [Index]
Compare the receiver and aMethodInfo, answer whether they’re equal
Answer an hash value for the receiver
Next: NetClients.URIResolver, Previous: MethodInfo, Up: Base classes [Index]
I am a Namespace that has a super-namespace.
• Namespace class-accessing: | (class) | |
• Namespace class-disabling instance creation: | (class) | |
• Namespace class-initialization: | (class) | |
• Namespace-accessing: | (instance) | |
• Namespace-namespace hierarchy: | (instance) | |
• Namespace-overrides for superspaces: | (instance) | |
• Namespace-printing: | (instance) |
Next: Namespace class-disabling instance creation, Up: Namespace [Index]
Answer the current namespace
Set the current namespace to be aNamespace or, if it is a class, its class pool (the Dictionary that holds class variables).
Next: Namespace class-initialization, Previous: Namespace class-accessing, Up: Namespace [Index]
Disabled - use #addSubspace: to create instances
Disabled - use #addSubspace: to create instances
Next: Namespace-accessing, Previous: Namespace class-disabling instance creation, Up: Namespace [Index]
This actually is not needed, the job could be done in dict.c (function namespace_new). But I’m lazy and I prefer to rely on the Smalltalk implementation of IdentitySet.
Next: Namespace-namespace hierarchy, Previous: Namespace class-initialization, Up: Namespace [Index]
Answer a Set of all the keys in the receiver and its superspaces
Next: Namespace-overrides for superspaces, Previous: Namespace-accessing, Up: Namespace [Index]
Answer all the other namespaces that inherit from the receiver’s superspace.
Evaluate aBlock once for each of the other namespaces that inherit from the receiver’s superspace, passing the namespace as a parameter.
Next: Namespace-printing, Previous: Namespace-namespace hierarchy, Up: Namespace [Index]
Return the key/value pair associated to the variable named as specified by ‘key’. If the key is not found search will be brought on in superspaces, finally evaluating aBlock if the variable cannot be found in any of the superspaces.
Pass each association in the namespace to aBlock
Return the value associated to the variable named as specified by ‘key’. If the key is not found search will be brought on in superspaces, finally evaluating aBlock if the variable cannot be found in any of the superspaces.
If aKey is absent from the receiver and all its superspaces, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation
Pass each value in the namespace to aBlock
Answer whether the receiver or any of its superspaces contain the given key
Pass to aBlock each of the receiver’s keys and values, in two separate parameters
Pass to aBlock each of the receiver’s keys
Assign newValue to the variable named as specified by ‘key’. This method won’t define a new variable; instead if the key is not found it will search in superspaces and evaluate aBlock if it is not found. Answer newValue.
Answer the number of keys in the receiver and each of its superspaces
Previous: Namespace-overrides for superspaces, Up: Namespace [Index]
Answer Smalltalk code compiling to the receiver when the current namespace is aNamespace
Print on aStream some Smalltalk code compiling to the receiver when the current namespace is aNamespace
Store Smalltalk code compiling to the receiver
Next: NetClients.URL, Previous: Namespace, Up: Base classes [Index]
This class publishes methods to download files from the Internet.
• NetClients.URIResolver class-api: | (class) | |
• NetClients.URIResolver class-instance creation: | (class) |
Always raise an error, as this method is not supported without loading the additional NetClients package.
Always evaluate aBlock and answer the result if the additional NetClients package is not loaded. If it is, instead, return a WebEntity with the contents of the resource specified by anURI, and only evaluate the block if loading the resource fails.
Check if aURI can be fetched from the Internet or from the local system, and if so return a Stream with its contents. If this is not possible, raise an exception.
Check if aURI can be fetched from the Internet or from the local system, and if so return a Stream with its contents. If this is not possible, instead, evaluate the zero-argument block aBlock and answer the result of the evaluation.
Previous: NetClients.URIResolver class-api, Up: NetClients.URIResolver [Index]
Answer a new URIResolver that will do its best to fetch the data for anURL from the Internet.
Next: Notification, Previous: NetClients.URIResolver, Up: Base classes [Index]
Copyright (c) Kazuki Yasumatsu, 1995. All rights reserved.
• NetClients.URL class-encoding URLs: | (class) | |
• NetClients.URL class-instance creation: | (class) | |
• NetClients.URL-accessing: | (instance) | |
• NetClients.URL-comparing: | (instance) | |
• NetClients.URL-copying: | (instance) | |
• NetClients.URL-initialize-release: | (instance) | |
• NetClients.URL-printing: | (instance) | |
• NetClients.URL-still unclassified: | (instance) | |
• NetClients.URL-testing: | (instance) | |
• NetClients.URL-utilities: | (instance) |
Next: NetClients.URL class-instance creation, Up: NetClients.URL [Index]
Decode a text/x-www-form-urlencoded String into a text/plain String.
Encode a text/plain into a text/x-www-form-urlencoded String (those things with lots of % in them).
Initialize the receiver’s class variables.
Next: NetClients.URL-accessing, Previous: NetClients.URL class-encoding URLs, Up: NetClients.URL [Index]
Parse the given URL and answer an URL object based on it.
Answer a ’blank’ URL.
Answer an URL object made from all the parts passed as arguments.
Answer an URL object made from all the parts passed as arguments.
Answer an URL object made from all the parts passed as arguments.
Answer an URL object made from all the parts passed as arguments.
Next: NetClients.URL-comparing, Previous: NetClients.URL class-instance creation, Up: NetClients.URL [Index]
Answer the full request string corresponding to the URL. This is how the URL would be printed in the address bar of a web browser, except that the query data is printed even if it is to be sent through a POST request.
Convert the form fields to a Dictionary, answer nil if no question mark is found in the URL.
Answer the file part of the URL, decoding it from x-www-form-urlencoded format.
Answer the fragment part of the URL, decoding it from x-www-form-urlencoded format.
Answer the fragment part of the URL, leaving it in x-www-form-urlencoded format.
Set the fragment part of the URL, which should be in x-www-form-urlencoded format.
Answer the full request string corresponding to the URL. This is how the URL would be printed in the address bar of a web browser, except that the query data is printed even if it is to be sent through a POST request.
Answer whether the URL has a query part but is actually for an HTTP POST request and not really part of the URL (as it would be for the HTTP GET request).
Set whether the query part of the URL is actually the data for an HTTP POST request and not really part of the URL (as it would be for the HTTP GET request).
Answer the host part of the URL.
Set the host part of the URL to aString.
If the receiver is an nntp url, return the news group.
Answer the password part of the URL.
Set the password part of the URL to aString.
Answer the path part of the URL.
Set the path part of the URL to aString.
Answer the port number part of the URL.
Set the port number part of the URL to anInteger.
Answer whether the URL has a query part and it is meant for an HTTP POST request, answer it. Else answer nil.
Associate to the URL some data that is meant to be sent through an HTTP POST request, answer it.
Answer the query data associated to the URL.
Set the query data associated to the URL to aString.
Answer the URL as it would be sent in an HTTP stream (that is, the path and the query data, the latter only if it is to be sent with an HTTP POST request).
Answer the URL’s scheme.
Set the URL’s scheme to be aString.
Answer the username part of the URL.
Set the username part of the URL to aString.
Next: NetClients.URL-copying, Previous: NetClients.URL-accessing, Up: NetClients.URL [Index]
Answer whether the two URLs are equal. The file and anchor are converted to full 8-bit ASCII (contrast with urlencoded) and the comparison is case-sensitive; on the other hand, the protocol and host are compared without regard to case.
Answer an hash value for the receiver
Next: NetClients.URL-initialize-release, Previous: NetClients.URL-comparing, Up: NetClients.URL [Index]
Answer a copy of the receiver where the fragment and query parts of the URL have been cleared.
Answer a copy of the receiver where the fragment parts of the URL has been cleared.
All the variables are copied when an URL object is copied.
Next: NetClients.URL-printing, Previous: NetClients.URL-copying, Up: NetClients.URL [Index]
Initialize the object to a consistent state.
Next: NetClients.URL-still unclassified, Previous: NetClients.URL-initialize-release, Up: NetClients.URL [Index]
Print a representation of the URL on the given stream.
Next: NetClients.URL-testing, Previous: NetClients.URL-printing, Up: NetClients.URL [Index]
Not commented.
Not commented.
Not commented.
Next: NetClients.URL-utilities, Previous: NetClients.URL-still unclassified, Up: NetClients.URL [Index]
Answer whether the URL is cacheable. The current implementation considers file URLs not to be cacheable, and everything else to be.
Answer whether the URL points to a particular fragment (anchor) of the resource.
Answer whether the URL includes query arguments to be submitted when retrieving the resource.
Answer whether the URL is a file URL.
Answer whether the URL only includes the name of a particular fragment (anchor) of the resource to which it refers.
Previous: NetClients.URL-testing, Up: NetClients.URL [Index]
Construct an absolute URL based on the relative URL anURL and the base path represented by the receiver
Next: NullProxy, Previous: NetClients.URL, Up: Base classes [Index]
Notification represents a resumable, exceptional yet non-erroneous, situation. Signaling a notification in absence of an handler simply returns nil.
• Notification-exception description: | (instance) |
Up: Notification [Index]
Do the default action for notifications, which is to resume execution of the context which signaled the exception.
Answer a textual description of the exception.
Answer true. Notification exceptions are by default resumable.
Next: NullValueHolder, Previous: Notification, Up: Base classes [Index]
I am a proxy that does no special processing on the object to be saved. I can be used to disable proxies for particular subclasses. My subclasses add to the stored information, but share the fact that the format is about the same as that of #dump: without a proxy.
• NullProxy class-instance creation: | (class) | |
• NullProxy-accessing: | (instance) |
Next: NullProxy-accessing, Up: NullProxy [Index]
Reload the object stored in anObjectDumper
Previous: NullProxy class-instance creation, Up: NullProxy [Index]
Dump the object stored in the proxy to anObjectDumper
Next: Number, Previous: NullProxy, Up: Base classes [Index]
I pretend to store my value in a variable, but I don’t actually. You can use the only instance of my class (returned by ‘ValueHolder null’) if you’re not interested in a value that is returned as described in ValueHolder’s comment.
• NullValueHolder class-creating instances: | (class) | |
• NullValueHolder-accessing: | (instance) |
Next: NullValueHolder-accessing, Up: NullValueHolder [Index]
Not used – use ‘ValueHolder null’ instead
Answer the sole instance of NullValueHolder
Previous: NullValueHolder class-creating instances, Up: NullValueHolder [Index]
Retrive the value of the receiver. Always answer nil
Set the value of the receiver. Do nothing, discard the value
Next: Object, Previous: NullValueHolder, Up: Base classes [Index]
I am an abstract class that provides operations on numbers, both floating point and integer. I provide some generic predicates, and supply the implicit type coercing code for binary operations.
• Number class-converting: | (class) | |
• Number class-testing: | (class) | |
• Number-arithmetic: | (instance) | |
• Number-coercion: | (instance) | |
• Number-comparing: | (instance) | |
• Number-converting: | (instance) | |
• Number-copying: | (instance) | |
• Number-error raising: | (instance) | |
• Number-misc math: | (instance) | |
• Number-point creation: | (instance) | |
• Number-retrying: | (instance) | |
• Number-shortcuts and iterators: | (instance) | |
• Number-testing: | (instance) | |
• Number-truncation and round off: | (instance) |
Next: Number class-testing, Up: Number [Index]
Answer aNumber - whatever class it belongs to, it is good
Answer the number read from the rest of aStream, converted to an instance of the receiver. If the receiver is number, the class of the result is undefined – but the result is good.
Answer the number read from the rest of aStream, converted to an instance of the receiver. If the receiver is number, the class of the result is undefined – but the result is good.
The exponent (for example 1.2e-1) is only parsed if anInteger is 10.
Next: Number-arithmetic, Previous: Number class-converting, Up: Number [Index]
Answer whether, if x is an instance of the receiver, x copy == x
Next: Number-coercion, Previous: Number class-testing, Up: Number [Index]
Subtract the receiver and aNumber, answer the result
Sum the receiver and aNumber, answer the result
Subtract aNumber from the receiver, answer the result
Divide the receiver by aNumber, answer the result (no loss of precision). Raise a ZeroDivide exception or return a valid (possibly infinite) continuation value if aNumber is zero.
Return the integer quotient of dividing the receiver by aNumber with truncation towards negative infinity. Raise a ZeroDivide exception if aNumber is zero
Return the remainder of dividing the receiver by aNumber with truncation towards negative infinity. Raise a ZeroDivide exception if aNumber is zero
Return the integer quotient of dividing the receiver by aNumber with truncation towards zero. Raise a ZeroDivide exception if aNumber is zero
Return the reciprocal of the receiver
Return the remainder of dividing the receiver by aNumber with truncation towards zero. Raise a ZeroDivide exception if aNumber is zero
Next: Number-comparing, Previous: Number-arithmetic, Up: Number [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Next: Number-converting, Previous: Number-coercion, Up: Number [Index]
Answer the maximum between the receiver and aNumber. Redefine in subclasses if necessary to ensure that if either self or aNumber is a NaN, it is always answered.
Answer the minimum between the receiver and aNumber. Redefine in subclasses if necessary to ensure that if either self or aNumber is a NaN, it is always answered.
Next: Number-copying, Previous: Number-comparing, Up: Number [Index]
Return the receiver, converted to a Fraction retaining the exact value of the receiver.
Convert the receiver to an arbitrary subclass of Float
This method’s functionality should be implemented by subclasses of Number
This method’s functionality should be implemented by subclasses of Number
This method’s functionality should be implemented by subclasses of Number
This method’s functionality should be implemented by subclasses of Number
Answer the receiver, since it is already a number
Answer an empty rectangle whose origin is (self asPoint)
Answer the receiver, converted to a ScaledDecimal object.
Answer the receiver, divided by base^denDigits and converted to a ScaledDecimal object.
Answer the receiver’s #displayString, which should be a good enough conversion to String for a number.
Answer aNumber, converted to an integer or floating-point number.
Convert the receiver to radians
Answer the receiver’s generality
Convert the receiver from radians to degrees
Coerce 1 to the receiver’s class. The default implementation works, but is inefficient
Coerce 0 to the receiver’s class. The default implementation works, but is inefficient
Next: Number-error raising, Previous: Number-converting, Up: Number [Index]
Return the receiver - it’s an immediate (immutable) object
Return the receiver - it’s an immediate (immutable) object
Next: Number-misc math, Previous: Number-copying, Up: Number [Index]
Raise an ArithmeticError exception having msg as its message text.
Raise a division-by-zero (ZeroDivide) exception whose dividend is the receiver.
Next: Number-point creation, Previous: Number-error raising, Up: Number [Index]
Answer the absolute value of the receiver
Answer the arc cosine of the receiver
Answer the hyperbolic arc-cosine of the receiver.
Answer the arc sine of the receiver
Answer the hyperbolic arc-sine of the receiver.
Answer the arc tangent of the receiver
Answer the angle (measured counterclockwise) between (x, self) and a ray starting in (0, 0) and moving towards (1, 0) - i.e. 3 o’clock
Answer the hyperbolic arc-tangent of the receiver.
Answer (self log: radix) ceiling. Optimized to answer an integer.
Answer the cosine of the receiver
Answer the hyperbolic cosine of the receiver.
Answer an estimate of (self abs floorLog: 10). This method should be overridden by subclasses, but Number’s implementation does not raise errors - simply, it gives a correct result, so it is slow.
Answer e raised to the receiver
Answer (self log: radix) floor. Optimized to answer an integer.
Answer log base e of the receiver
Answer log base 10 of the receiver
Answer log base aNumber of the receiver
Answer the negated of the receiver
Answer the positive difference of the receiver and aNumber, that is self - aNumber if it is positive, 0 otherwise.
Return self raised to aNumber power
Return self raised to the anInteger-th power
Answer the sine of the receiver
Answer the hyperbolic sine of the receiver.
Answer the square root of the receiver
Answer the square of the receiver
Answer the tangent of the receiver
Answer the hyperbolic tangent of the receiver.
Answer the receiver, with its sign possibly changed to match that of aNumber.
Next: Number-retrying, Previous: Number-misc math, Up: Number [Index]
Answer a new point whose x is the receiver and whose y is y
Answer a new point, self @ self
Next: Number-shortcuts and iterators, Previous: Number-point creation, Up: Number [Index]
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling aSymbol. aSymbol is supposed not to be #= or #~= (since those don’t fail if aNumber is not a Number).
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #-.
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #/.
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #=.
Raise an error—a retrying method was called with two arguments having the same generality.
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #~=.
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #*.
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling aSymbol (<, <=, >, >=).
Coerce to the other number’s class the one number between the receiver and aNumber which has the lowest, and retry calling #+.
Next: Number-testing, Previous: Number-retrying, Up: Number [Index]
Return an interval going from the receiver to stop by 1
Return an interval going from the receiver to stop with the given step
Evaluate aBlock for each value in the interval going from the receiver to stop with the given step. The results are collected in an Array and returned.
Evaluate aBlock for each value in the interval going from the receiver to stop with the given step. Compiled in-line for integer literal steps, and for one-argument aBlocks without temporaries, and therefore not overridable.
Evaluate aBlock for each value in the interval going from the receiver to stop by 1. The results are collected in an Array and returned.
Evaluate aBlock for each value in the interval going from the receiver to stop by 1. Compiled in-line for one-argument aBlocks without temporaries, and therefore not overridable.
Next: Number-truncation and round off, Previous: Number-shortcuts and iterators, Up: Number [Index]
Answer whether the receiver can be considered sufficiently close to num (this is done by checking equality if num is not a number, and by checking with 0.01% tolerance if num is a number).
Returns true if self is divisible by 2
Answer whether the receiver performs exact arithmetic. Most numeric classes do (in fact the only exceptions is Float and its descendants), so the default is to answer true rather than calling #subclassResponsibility.
Answer whether the receiver represents a finite quantity. Most numeric classes are for finite quantities, so the default is to answer true rather than calling #subclassResponsibility.
Answer whether the receiver represents an infinite quantity. Most numeric classes are for finite quantities, so the default is to answer false rather than calling #subclassResponsibility.
Answer whether the receiver is a Not-A-Number. Most numeric classes don’t handle nans, so the default is to answer false rather than calling #subclassResponsibility.
Answer ‘true’.
Answer whether the receiver is rational - false by default
Answer whether the receiver is < 0
Returns true if self is not divisible by 2
Answer whether the receiver is >= 0
Returns the sign of the receiver.
Answer whether the receiver is > 0
Previous: Number-testing, Up: Number [Index]
Answer the receiver, rounded to the nearest integer
Return the integer nearest the receiver toward negative infinity.
Answer a number which, summed to the #integerPart of the receiver, gives the receiver itself.
Answer the receiver, truncated towards zero
Answer the receiver, truncated to the nearest multiple of aNumber
Returns the integer nearest the receiver
Answer the receiver, truncated towards zero to a multiple of aNumber
Answer the receiver, truncated towards zero
Next: ObjectDumper, Previous: Number, Up: Base classes [Index]
I am the root of the Smalltalk class system. All classes in the system are subclasses of me.
• Object class-initialization: | (class) | |
• Object-built ins: | (instance) | |
• Object-change and update: | (instance) | |
• Object-class type methods: | (instance) | |
• Object-compiler: | (instance) | |
• Object-conversion: | (instance) | |
• Object-copying: | (instance) | |
• Object-debugging: | (instance) | |
• Object-dependents access: | (instance) | |
• Object-error raising: | (instance) | |
• Object-finalization: | (instance) | |
• Object-introspection: | (instance) | |
• Object-printing: | (instance) | |
• Object-relational operators: | (instance) | |
• Object-saving and loading: | (instance) | |
• Object-storing: | (instance) | |
• Object-syntax shortcuts: | (instance) | |
• Object-testing functionality: | (instance) | |
• Object-VM callbacks: | (instance) |
Next: Object-built ins, Up: Object [Index]
Answer a dictionary that associates an object with its dependents.
Use anObject as the dictionary that associates an object with its dependents.
Answer a set of finalizable objects.
Initialize the Dependencies dictionary to be a WeakKeyIdentityDictionary.
Do any global tasks for the ObjectMemory events.
Next: Object-change and update, Previous: Object class-initialization, Up: Object [Index]
Answer whether the receiver is equal to arg. The equality test is by default the same as that for identical objects. = must not fail; answer false if the receiver cannot be compared to arg
Answer whether the receiver is the same object as arg. This is a very fast test and is called ’object identity’.
Return an Array of Objects that point to the receiver.
Answer the object index associated to the receiver. The object index doesn’t change when garbage collection is performed.
Answer the index-th indexed instance variable of the receiver
Store value in the index-th indexed instance variable of the receiver
Answer the index-th indexed instance variable of the receiver. This method must not be overridden, override at: instead
Store value in the index-th indexed instance variable of the receiver This method must not be overridden, override at:put: instead
Print a basic representation of the receiver
Answer the number of indexed instance variable in the receiver
Change all references to the receiver into references to otherObject. Depending on the implementation, references to otherObject might or might not be transformed into the receiver (respectively, ’two-way become’ and ’one-way become’). Implementations doing one-way become answer the receiver (so that it is not lost). Most implementations doing two-way become answer otherObject, but this is not assured - so do answer the receiver for consistency. GNU Smalltalk does two-way become and answers otherObject, but this might change in future versions: programs should not rely on the behavior and results of #become: .
Change all references to the receiver into references to otherObject. References to otherObject are not transformed into the receiver. Answer the receiver so that it is not lost.
Mutate the class of the receiver to be aBehavior. Note: Tacitly assumes that the structure is the same for the original and new class!!
Private - Check the reason why an access to the given indexed instance variable failed
Private - Check the reason why an access to the given indexed instance variable failed. Evaluate aBlock for an invalid index.
Private - Check the reason why a store to the given indexed instance variable failed
Answer the class to which the receiver belongs
Called to enter the debugger
Answer an hash value for the receiver. This hash value is ok for objects that do not redefine ==.
Answer an hash value for the receiver. This method must not be overridden
Answer the index-th instance variable of the receiver. This method must not be overridden.
Store value in the index-th instance variable of the receiver. This method must not be overridden.
Answer whether the object’s indexed instance variables can be written
Answer whether the object is to be considered untrusted.
Make the object an ’ephemeron’. An ephemeron is marked after all other objects, and if no references are found to the key except from the object itself, it is sent the #mourn message.
Avoid that the receiver moves in memory across garbage collections.
Set whether the object’s indexed instance variables can be written
Set whether the object is to be considered untrusted.
Make the object a ’weak’ one. When an object is only referenced by weak objects, it is collected and the slots in the weak objects are changed to nils by the VM; the weak object is then sent the #mourn message.
Private - use this method to mark code which needs to be reworked, removed, etc. You can then find all senders of #mark: to find all marked methods or you can look for all senders of the symbol that you sent to #mark: to find a category of marked methods.
Private - answer another instance of the receiver’s class, or nil if the entire object table has been walked
Called when a method defined by a class is not yet implemented, but is going to be
Send the unary message named selectorOrMessageOrMethod (if a Symbol) to the receiver, or the message and arguments it identifies (if a Message or DirectedMessage), or finally execute the method within the receiver (if a CompiledMethod). In the last case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Send the message named selectorOrMethod (if a Symbol) to the receiver, passing arg1 to it, or execute the method within the receiver (if a CompiledMethod). In the latter case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Send the message named selectorOrMethod (if a Symbol) to the receiver, passing arg1 and arg2 to it, or execute the method within the receiver (if a CompiledMethod). In the latter case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Send the message named selectorOrMethod (if a Symbol) to the receiver, passing the other arguments to it, or execute the method within the receiver (if a CompiledMethod). In the latter case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Send the message named selectorOrMethod (if a Symbol) to the receiver, passing the other arguments to it, or execute the method within the receiver (if a CompiledMethod). In the latter case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Send the message named selectorOrMethod (if a Symbol) to the receiver, passing the elements of argumentsArray as parameters, or execute the method within the receiver (if a CompiledMethod). In the latter case, the method need not reside on the hierarchy from the receiver’s class to Object – it need not reside at all in a MethodDictionary, in fact – but doing bad things will compromise stability of the Smalltalk virtual machine (and don’t blame anybody but yourself).
This method should not be overridden
Called when a VM primitive fails
Returns a shallow copy of the receiver (the instance variables are not copied)
Called when objects belonging to a class should not answer a selector defined by a superclass
Answer the number of indexed instance variable in the receiver
Called when a method defined by a class should be overridden in a subclass
Move the object to oldspace.
Next: Object-class type methods, Previous: Object-built ins, Up: Object [Index]
Send the unary message aSymbol to each of the receiver’s dependents
Send the message aSymbol to each of the receiver’s dependents, passing anObject
Send the message aSymbol to each of the receiver’s dependents, passing arg1 and arg2 as parameters
Send the message aSymbol to each of the receiver’s dependents, passing the parameters in anArray
Send the message aSymbol to each of the receiver’s dependents, passing the result of evaluating aBlock with each dependent as the parameter
Send update: for each of the receiver’s dependents, passing them the receiver
Send update: for each of the receiver’s dependents, passing them aParameter
Default behavior is to do nothing. Called by #changed and #changed:
Next: Object-compiler, Previous: Object-change and update, Up: Object [Index]
This method has no unique definition. Generally speaking, methods which always return the same type usually don’t use #class, but #species. For example, a PositionableStream’s species is the class of the collection on which it is streaming (used by upTo:, upToAll:, upToEnd). Stream uses species for obtaining the class of next:’s return value, Collection uses it in its #copyEmpty: message, which in turn is used by all collection-returning methods. An Interval’s species is Array (used by collect:, select:, reject:, etc.).
Answer the receiver
Next: Object-conversion, Previous: Object-class type methods, Up: Object [Index]
Not commented.
Not commented.
Next: Object-copying, Previous: Object-compiler, Up: Object [Index]
Answer a ValueHolder whose initial value is the receiver.
Next: Object-debugging, Previous: Object-conversion, Up: Object [Index]
Returns a shallow copy of the receiver (the instance variables are not copied). The shallow copy receives the message postCopy and the result of postCopy is passed back.
Returns a deep copy of the receiver (the instance variables are copies of the receiver’s instance variables)
Performs any changes required to do on a copied object. This is the place where one could, for example, put code to replace objects with copies of the objects
Next: Object-dependents access, Previous: Object-copying, Up: Object [Index]
Print all the instance variables of the receiver on the Transcript
Print all the instance variables of the receiver on aStream
In a GUI environment, this opens a tool to examine and modify the receiver. In the default image, it just calls #examine.
Answer how many elements in the receiver should be inspected
Next: Object-error raising, Previous: Object-debugging, Up: Object [Index]
Add anObject to the set of the receiver’s dependents. Important: if an object has dependents, it won’t be garbage collected.
Answer a collection of the receiver’s dependents.
Remove all of the receiver’s dependents from the set and allow the receiver to be garbage collected.
Remove anObject to the set of the receiver’s dependents. No problem if anObject is not in the set of the receiver’s dependents.
Next: Object-finalization, Previous: Object-dependents access, Up: Object [Index]
Called by the system when a selector was not found. message is a Message containing information on the receiver
Display a walkback for the receiver, with the given error message. Signal an ‘Error’ exception.
Display a walkback for the receiver, with the given error message. Signal an ‘Halt’ exception.
Next: Object-introspection, Previous: Object-error raising, Up: Object [Index]
Arrange things so that #finalize is sent to the object when the garbage collector finds out there are only weak references to it.
Do nothing by default
This method is sent by the VM to weak and ephemeron objects when one of their fields is found out to be garbage collectable (this means, for weak objects, that there are no references to it from non-weak objects, and for ephemeron objects, that the only paths to the first instance variable pass through other instance variables of the same ephemeron). The default behavior is to do nothing.
Unregister the object, so that #finalize is no longer sent to the object when the garbage collector finds out there are only weak references to it.
Next: Object-printing, Previous: Object-finalization, Up: Object [Index]
Answer the instance variable named aString in the receiver.
Answer the instance variable named aString in the receiver.
Next: Object-relational operators, Previous: Object-introspection, Up: Object [Index]
Print a basic representation of the receiver, followed by a new line.
Print a represention of the receiver on aStream
Print a represention of the receiver on the Transcript (stdout the GUI is not active). For most objects this is simply its #print representation, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Print a represention of the receiver, then put a new line on the Transcript (stdout the GUI is not active). For most objects this is simply its #printNl representation, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Print a represention of the receiver on aStream. For most objects this is simply its #printOn: representation, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Answer a String representing the receiver. For most objects this is simply its #printString, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Print a represention of the receiver on the Transcript (stdout the GUI is not active)
Print a represention of the receiver on stdout, put a new line the Transcript (stdout the GUI is not active)
Print a represention of the receiver on aStream
Answer a String representing the receiver
Next: Object-saving and loading, Previous: Object-printing, Up: Object [Index]
Answer whether the receiver and anObject are not equal
Answer whether the receiver and anObject are not the same object
Next: Object-storing, Previous: Object-relational operators, Up: Object [Index]
This method must be implemented if PluggableProxies are used with the receiver’s class. The default implementation raises an exception.
Called after loading an object; must restore it to the state before ‘preStore’ was called. Do nothing by default
Called after an object is dumped; must restore it to the state before ‘preStore’ was called. Call #postLoad by default
Called before dumping an object; it must *change* it (it must not answer a new object) if necessary. Do nothing by default
Used if an instance of the receiver’s class is returned as the #binaryRepresentationObject of another object. The default implementation raises an exception.
Next: Object-syntax shortcuts, Previous: Object-saving and loading, Up: Object [Index]
Put a String of Smalltalk code compiling to the receiver on the Transcript (stdout the GUI is not active)
Put a Smalltalk literal compiling to the receiver on aStream
Put a String of Smalltalk code compiling to the receiver, followed by a new line, on the Transcript (stdout the GUI is not active)
Put Smalltalk code compiling to the receiver on aStream
Answer a String of Smalltalk code compiling to the receiver
Next: Object-testing functionality, Previous: Object-storing, Up: Object [Index]
Creates a new instance of Association with the receiver being the key and the argument becoming the value
Next: Object-VM callbacks, Previous: Object-syntax shortcuts, Up: Object [Index]
Evaluate nilBlock if the receiver is nil, else answer self
Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.
Evaluate notNilBlock if the receiver is not nil, passing the receiver. Else answer nil.
Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer whether the receiver’s class is aClass or a subclass of aClass
Returns true if the receiver is an instance of the class ’aClass’
Same as isMetaclass
Same as isMetaclass
Answer ‘false’.
Answer ‘false’.
Answer whether the receiver is nil
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer ‘false’.
Answer whether the receiver is not nil
Returns true if the receiver understands the given selector
Previous: Object-testing functionality, Up: Object [Index]
Called back when a block performs a bad return.
Called by the system when ifTrue:*, ifFalse:*, and: or or: are sent to anything but a boolean
Called back when all processes are suspended
Called back when the user presses Ctrl-Break
Next: ObjectMemory, Previous: Object, Up: Base classes [Index]
I’m not part of a normal Smalltalk system, but most Smalltalks provide a similar feature: that is, support for storing objects in a binary format; there are many advantages in using me instead of #storeOn: and the Smalltalk compiler.
The data is stored in a very compact format, which has the side effect of making loading much faster when compared with compiling the Smalltalk code prepared by #storeOn:. In addition, my instances support circular references between objects, while #storeOn: supports it only if you know of such references at design time and you override #storeOn: to deal with them
• ObjectDumper class-establishing proxy classes: | (class) | |
• ObjectDumper class-instance creation: | (class) | |
• ObjectDumper class-shortcuts: | (class) | |
• ObjectDumper class-testing: | (class) | |
• ObjectDumper-accessing: | (instance) | |
• ObjectDumper-loading/dumping objects: | (instance) | |
• ObjectDumper-stream interface: | (instance) |
Next: ObjectDumper class-instance creation, Up: ObjectDumper [Index]
Disable proxies for instances of aClass and its descendants
Answer whether a proxy class has been registered for instances of aClass.
Answer the class of a valid proxy for an object, or nil if none could be found
Answer a valid proxy for an object, or the object itself if none could be found
Register the proxy class aProxyClass - descendent of DumperProxy - to be used for instances of aClass and its descendants
Next: ObjectDumper class-shortcuts, Previous: ObjectDumper class-establishing proxy classes, Up: ObjectDumper [Index]
This method should not be called for instances of this class.
Answer an ObjectDumper working on aFileStream.
Next: ObjectDumper class-testing, Previous: ObjectDumper class-instance creation, Up: ObjectDumper [Index]
Dump anObject to aFileStream. Answer anObject
Load an object from aFileStream and answer it
Next: ObjectDumper-accessing, Previous: ObjectDumper class-shortcuts, Up: ObjectDumper [Index]
This is a real torture test: it outputs recursive objects, identical objects multiple times, classes, metaclasses, integers, characters and proxies (which is also a test of more complex objects)!
Next: ObjectDumper-loading/dumping objects, Previous: ObjectDumper class-testing, Up: ObjectDumper [Index]
‘Forget’ any information on previously stored objects.
Answer the ByteStream to which the ObjectDumper will write and from which it will read.
Set the ByteStream to which the ObjectDumper will write and from which it will read.
Next: ObjectDumper-stream interface, Previous: ObjectDumper-accessing, Up: ObjectDumper [Index]
Dump anObject on the stream associated with the receiver. Answer anObject
Load an object from the stream associated with the receiver and answer it
Previous: ObjectDumper-loading/dumping objects, Up: ObjectDumper [Index]
Answer whether the underlying stream is at EOF
Load an object from the underlying stream
Store an object on the underlying stream
Next: OrderedCollection, Previous: ObjectDumper, Up: Base classes [Index]
I provide a few methods that enable one to tune the virtual machine’s usage of memory. In addition, I can signal to my dependants some ‘events’ that can happen during the virtual machine’s life.
ObjectMemory has both class-side and instance-side methods. In general, class-side methods provide means to tune the parameters of the memory manager, while instance-side methods are used together with the #current class-side method to take a look at statistics on the memory manager’s state.
• ObjectMemory class-accessing: | (class) | |
• ObjectMemory class-builtins: | (class) | |
• ObjectMemory class-initialization: | (class) | |
• ObjectMemory class-saving the image: | (class) | |
• ObjectMemory-accessing: | (instance) | |
• ObjectMemory-builtins: | (instance) | |
• ObjectMemory-derived information: | (instance) |
Next: ObjectMemory class-builtins, Up: ObjectMemory [Index]
Return a snapshot of the VM’s memory management statistics.
Next: ObjectMemory class-initialization, Previous: ObjectMemory class-accessing, Up: ObjectMemory [Index]
Quit the Smalltalk environment, dumping core.
Returns the address of the actual object that anObject references. Note that, with the exception of fixed objects this address is only valid until the next garbage collection; thus it’s pretty risky to count on the address returned by this method for very long.
Returns the address of the OOP (object table slot) for anObject. The address is an Integer and will not change over time (i.e. is immune from garbage collector action) except if the virtual machine is stopped and restarted.
Answer the smallest size for objects that are allocated outside the main heap in the hope of providing more locality of reference between small objects.
Set the smallest size for objects that are allocated outside the main heap in the hope of providing more locality of reference between small objects. bytes must be a positive SmallInteger.
Force a full garbage collection, including compaction of oldspace
Do a step in the incremental garbage collection.
Answer whether messages indicating that garbage collection is taking place are printed on stdout
Set whether messages indicating that garbage collection is taking place are printed on stdout
Force a full garbage collection
Answer the percentage of the amount of memory used by the system grows which has to be full for the system to allocate more memory
Set the percentage of the amount of memory used by the system grows which has to be full for the system to allocate more memory
Grow the amount of memory used by the system grows to numBytes.
Do a step in the incremental garbage collection.
Quit the Smalltalk environment. Whether files are closed and other similar cleanup occurs depends on the platform
Quit the Smalltalk environment, passing the exitStatus integer to the OS. Files are closed and other similar cleanups occur.
Force a minor garbage collection
Answer the factor (between 0 and 1) used to smooth the statistics provided by the virtual machine about memory handling. 0 disables updating the averages, 1 disables the smoothing (the statistics return the last value).
Set the factor (between 0 and 1) used to smooth the statistics provided by the virtual machine about memory handling. 0 disables updating the averages, 1 disables the smoothing (the statistics return the last value).
Answer the rate with which the amount of memory used by the system grows
Set the rate with which the amount of memory used by the system grows
Next: ObjectMemory class-saving the image, Previous: ObjectMemory class-builtins, Up: ObjectMemory [Index]
Not commented.
Initialize the globals
Next: ObjectMemory-accessing, Previous: ObjectMemory class-initialization, Up: ObjectMemory [Index]
Save a snapshot on the image file that was loaded on startup.
Save an image on the aString file
Next: ObjectMemory-builtins, Previous: ObjectMemory class-saving the image, Up: ObjectMemory [Index]
Answer the number of times that the old-space allocator found no block that was at least as big as requested, and had to ask the operating system for more memory.
Answer the number of times that the old-space allocator found a block that was exactly as big as requested.
Answer the number of free blocks that the old-space allocator had to examine so far to allocate all the objects that are in old-space
Answer the number of times that the old-space allocator could not find a block that was exactly as big as requested, and had to split a larger free block in two parts.
Answer the number of bytes that is taken by an ordinary object pointer (in practice, a field such as a named instance variable).
Answer the number of bytes that is taken by an object table entry (in practice, the overhead incurred by every object in the system, with the sole exception of SmallIntegers).
Answer the number of bytes in the ‘eden’ area of the young generation (in practice, the number of allocated bytes between two scavenges).
Answer the number of bytes that are currently filled in the ‘eden’ area of the young generation.
Answer the number of bytes in the special heap devoted to objects that the garbage collector cannot move around in memory.
Answer the number of bytes that are currently filled in the special heap devoted to objects that the garbage collector cannot move around in memory.
Answer the number of oldspace compactions that happened since the VM was started.
Answer the number of objects that the garbage collector cannot move around in memory.
Answer the number of entries that are currently free in the object table.
Answer the number of global garbage collections (collection of the entire heap) that happened since the VM was started.
Answer the number of times that oldspace was grown since the VM was started.
Answer the number of entries that are currently allocated for the object table.
Answer the number of objects that reside in the old generation.
Answer the number of scavenges (fast collections of the young generation) that happened since the VM was started.
Answer the number of weak objects that the garbage collector is currently tracking.
Answer the number of bytes in the old generation.
Answer the number of bytes that are currently filled in the old generation.
Answer the average number of bytes that are found to be garbage during a global garbage collections.
Answer the average number of bytes that are found to be garbage during a scavenge.
Answer the average percentage of allocated bytes that are found to be garbage during a scavenge. If this number falls below 60-70 you should definitely increment the size of the eden, because you risk that scavenging is eating a considerable fraction of your execution time; do the measurement on a restarted image, so that the extra tenuring incurred when creating long-lived objects such as classes or methods is not considered.
Answer the number of bytes in the ‘survivor’ area of the young generation (the area to which young objects are relocated during scavenges).
Answer the number of bytes that are currently filled in the ‘survivor’ area of the young generation.
Answer the average number of bytes that are promoted to oldspace during a scavenge.
Answer the average number of milliseconds between two global garbage collections.
Answer the average number of milliseconds between decisions to grow the heap.
Answer the average number of milliseconds between two scavenges (fast collections of the young generation).
Answer the average number of milliseconds that a global garbage collection takes.
Answer the average number of milliseconds that compacting the heap takes. This the same time that is taken by growing the heap.
Answer the average number of milliseconds that a scavenge takes (fast collections of the young generation).
Next: ObjectMemory-derived information, Previous: ObjectMemory-accessing, Up: ObjectMemory [Index]
Update the values in the object to the current state of the VM.
Previous: ObjectMemory-builtins, Up: ObjectMemory [Index]
Answer the number of scavenges that an object must on average survive before being promoted to oldspace; this is however only an estimate because objects that are reachable from oldspace have a higher probability to be tenured soon, while objects that are only reachable from thisContext have a lower probability to be tenured. Anyway, if this number falls below 2-3 you should definitely increment the size of eden and/or of survivor space, because you are tenuring too often and relying too much on global garbage collection to keep your heap clean; do the measurement on a restarted image, so that the extra tenuring incurred when creating long-lived objects such as classes or methods is not considered.
Next: Package, Previous: ObjectMemory, Up: Base classes [Index]
My instances represent ordered collections of arbitrary typed objects which are not directly accessible by an index. They can be accessed indirectly through an index, and can be manipulated by adding to the end or based on content (such as add:after:)
• OrderedCollection class-instance creation: | (class) | |
• OrderedCollection-accessing: | (instance) | |
• OrderedCollection-adding: | (instance) | |
• OrderedCollection-built ins: | (instance) | |
• OrderedCollection-enumerating: | (instance) | |
• OrderedCollection-removing: | (instance) |
Next: OrderedCollection-accessing, Up: OrderedCollection [Index]
Answer an OrderedCollection of default size
Answer an OrderedCollection of size anInteger
Next: OrderedCollection-adding, Previous: OrderedCollection class-instance creation, Up: OrderedCollection [Index]
Answer the anIndex-th item of the receiver
Store anObject at the anIndex-th item of the receiver, answer anObject
Answer the first item of the receiver
Answer the last item of the receiver
Return the number of objects in the receiver
Next: OrderedCollection-built ins, Previous: OrderedCollection-accessing, Up: OrderedCollection [Index]
Add anObject in the receiver, answer it
Add newObject in the receiver just after oldObject, answer it. Fail if oldObject can’t be found
Add newObject in the receiver just after the i-th, answer it. Fail if i < 0 or i > self size
Add newObject in the receiver just before oldObject, answer it. Fail if oldObject can’t be found
Add newObject in the receiver just before the i-th, answer it. Fail if i < 1 or i > self size + 1
Add every item of aCollection to the receiver, answer it
Add every item of newCollection to the receiver just after oldObject, answer it. Fail if oldObject is not found
Add every item of newCollection to the receiver just after the i-th, answer it. Fail if i < 0 or i > self size
Add every item of newCollection to the receiver just before oldObject, answer it. Fail if oldObject is not found
Add every item of newCollection to the receiver just before the i-th, answer it. Fail if i < 1 or i > self size + 1
Add every item of newCollection to the receiver right at the start of the receiver. Answer aCollection
Add every item of newCollection to the receiver right at the end of the receiver. Answer aCollection
Add newObject to the receiver right at the start of the receiver. Answer newObject
Add newObject to the receiver right at the end of the receiver. Answer newObject
Next: OrderedCollection-enumerating, Previous: OrderedCollection-adding, Up: OrderedCollection [Index]
Replace the characters from start to stop with new characters whose ASCII codes are contained in byteArray, starting at the replaceStart location of byteArray
Next: OrderedCollection-removing, Previous: OrderedCollection-built ins, Up: OrderedCollection [Index]
Evaluate aBlock for all the elements in the collection
Previous: OrderedCollection-enumerating, Up: OrderedCollection [Index]
Remove oldObject from the receiver. If absent, fail, else answer oldObject.
Remove anObject from the receiver. If it can’t be found, answer the result of evaluating aBlock
Remove anObject from the receiver. If it can’t be found, answer the result of evaluating aBlock
Remove the object at index anIndex from the receiver. Fail if the index is out of bounds.
Remove an object from the start of the receiver. Fail if the receiver is empty
Remove an object from the end of the receiver. Fail if the receiver is empty
Next: PackageLoader, Previous: OrderedCollection, Up: Base classes [Index]
I am not part of a standard Smalltalk system. I store internally the information on a Smalltalk package, and can output my description in XML.
• Package class-accessing: | (class) | |
• Package class-instance creation: | (class) | |
• Package-accessing: | (instance) | |
• Package-still unclassified: | (instance) | |
• Package-version parsing: | (instance) |
Next: Package class-instance creation, Up: Package [Index]
Not commented.
Next: Package-accessing, Previous: Package class-accessing, Up: Package [Index]
Answer a package from the XML description in file.
Next: Package-still unclassified, Previous: Package class-instance creation, Up: Package [Index]
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Answer ‘baseDirectories’.
Check if it’s possible to resolve the names in the package according to the base directories in baseDirectories, which depend on where the packages.xml is found: the three possible places are 1) the system kernel directory’s parent directory, 2) the local kernel directory’s parent directory, 3) the local image directory (in order of decreasing priority).
For a packages.xml found in the system kernel directory’s parent directory, all three directories are searched. For a packages.xml found in the local kernel directory’s parent directory, only directories 2 and 3 are searched. For a packages.xml directory in the local image directory, instead, only directory 3 is searched.
Answer a (modifiable) OrderedCollection of files that are part of the package but are not distributed.
Answer a (modifiable) Set of call-outs that are required to load the package. Their presence is checked after the libraries and modules are loaded so that you can do a kind of versioning.
Answer the base directory from which to load the package.
Answer a (modifiable) Set of features provided by the package.
Answer a (modifiable) OrderedCollections of files that are to be filed-in to load the package. This is usually a subset of ‘files’ and ‘builtFiles’.
Answer a (modifiable) OrderedCollection of files that are part of the package.
Try appending ’self directory’ and fileName to each of the directory in baseDirectories, and return the path to the first tried filename that exists. Raise a PackageNotAvailable exception if no directory is found that contains the file.
Answer a (modifiable) Set of shared library names that are required to load the package.
Answer a (modifiable) Set of modules that are required to load the package.
Answer the namespace in which the package is loaded.
Set to aString the namespace in which the package is loaded.
Answer a (modifiable) Set of prerequisites.
Private - File in the given package without paying attention at dependencies and C callout availability
Answer the directory, relative to the packages file, from which to load the package.
Set the directory, relative to the packages file, from which to load the package, to dir.
Answer the start script for the package.
Set the start script for the package to aString.
Answer the start script for the package.
Set the stop script for the package to aString.
Answer a (modifiable) OrderedCollection of SUnit scripts that compose the package’s test suite.
Answer the test sub-package.
Set the test sub-package to be aPackage.
Answer the URL at which the package repository can be found.
Set to aString the URL at which the package repository can be found.
Not commented.
Not commented.
Next: Package-version parsing, Previous: Package-accessing, Up: Package [Index]
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Previous: Package-still unclassified, Up: Package [Index]
Not commented.
Next: Permission, Previous: Package, Up: Base classes [Index]
I am not part of a standard Smalltalk system. I provide methods for retrieving package information from an XML file and to load packages into a Smalltalk image, correctly handling dependencies.
• PackageLoader class-accessing: | (class) | |
• PackageLoader class-loading: | (class) | |
• PackageLoader class-testing: | (class) |
Next: PackageLoader class-loading, Up: PackageLoader [Index]
Answer a Set of Strings containing the filenames of the given package’s machine-generated files (relative to the directory answered by #directoryFor:)
Answer a Set of Strings containing the filenames of the given package’s required callouts (relative to the directory answered by #directoryFor:)
Answer a Directory object to the given package’s files
Answer a Set of Strings containing the features provided by the given package.
Answer a Set of Strings containing the filenames of the given package’s file-ins (relative to the directory answered by #directoryFor:)
Answer a Set of Strings containing the filenames of the given package’s files (relative to the directory answered by #directoryFor:)
Set to reload the ‘packages.xml’ file the next time it is needed.
Answer whether unavailable C callouts must generate errors or not.
Set whether unavailable C callouts must generate errors or not.
Answer a Set of Strings containing the filenames of the given package’s libraries (relative to the directory answered by #directoryFor:)
Answer a Set of Strings containing the filenames of the given package’s modules (relative to the directory answered by #directoryFor:)
Answer a Package object for the given package
Answer a Package object for the given package
Answer a Set of Strings containing the prerequisites for the given package
Reload the ‘packages.xml’ file in the image and kernel directories. The three possible places are 1) the kernel directory’s parent directory, 2) the ‘.st’ subdirectory of the user’s home directory, 3) the local image directory (in order of decreasing priority).
For a packages.xml found in the kernel directory’s parent directory, all three directories are searched. For a packages.xml found in the ‘.st’ subdirectory, only directories 2 and 3 are searched. For a packages.xml directory in the local image directory, finally, only directory 3 is searched.
Answer a Strings containing a SUnit script that describes the package’s test suite.
Next: PackageLoader class-testing, Previous: PackageLoader class-accessing, Up: PackageLoader [Index]
File in the given package into GNU Smalltalk.
File in all the packages in packagesList into GNU Smalltalk.
Previous: PackageLoader class-loading, Up: PackageLoader [Index]
Answer whether all the needed pre-requisites for package are available.
Next: PluggableAdaptor, Previous: PackageLoader, Up: Base classes [Index]
I am the basic class that represents whether operations that could harm the system’s security are allowed or denied.
• Permission class-testing: | (class) | |
• Permission-accessing: | (instance) | |
• Permission-testing: | (instance) |
Next: Permission-accessing, Up: Permission [Index]
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Next: Permission-testing, Previous: Permission class-testing, Up: Permission [Index]
Not commented.
Answer ‘actions’.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Answer ‘positive’.
Answer ‘name’.
Not commented.
Answer ‘target’.
Not commented.
Previous: Permission-accessing, Up: Permission [Index]
Not commented.
Not commented.
Next: PluggableProxy, Previous: Permission, Up: Base classes [Index]
I mediate between complex get/set behavior and the #value/#value: protocol used by ValueAdaptors. The get/set behavior can be implemented by two blocks, or can be delegated to another object with messages such as #someProperty to get and #someProperty: to set.
• PluggableAdaptor class-creating instances: | (class) | |
• PluggableAdaptor-accessing: | (instance) |
Next: PluggableAdaptor-accessing, Up: PluggableAdaptor [Index]
Answer a PluggableAdaptor using the given blocks to implement #value and #value:
Answer a PluggableAdaptor using anObject’s aSymbol message to implement #value, and anObject’s aSymbol: message (aSymbol followed by a colon) to implement #value:
Answer a PluggableAdaptor using anObject’s getSelector message to implement #value, and anObject’s putSelector message to implement #value:
Answer a PluggableAdaptor using anObject’s #at: and #at:put: message to implement #value and #value:; the first parameter of #at: and #at:put: is anIndex
Same as #on:index:. Provided for clarity and completeness.
Previous: PluggableAdaptor class-creating instances, Up: PluggableAdaptor [Index]
Get the value of the receiver.
Set the value of the receiver.
Next: Point, Previous: PluggableAdaptor, Up: Base classes [Index]
I am a proxy that stores a different object and, upon load, sends #reconstructOriginalObject to that object (which can be a DirectedMessage, in which case the message is sent). The object to be stored is retrieved by sending #binaryRepresentationObject to the object.
• PluggableProxy class-accessing: | (class) | |
• PluggableProxy-saving and restoring: | (instance) |
Next: PluggableProxy-saving and restoring, Up: PluggableProxy [Index]
Answer a proxy to be used to save anObject. The proxy stores a different object obtained by sending to anObject the #binaryRepresentationObject message (embedded between #preStore and #postStore as usual).
Previous: PluggableProxy class-accessing, Up: PluggableProxy [Index]
Reconstruct the object stored in the proxy and answer it; the binaryRepresentationObject is sent the #reconstructOriginalObject message, and the resulting object is sent the #postLoad message.
Next: PositionableStream, Previous: PluggableProxy, Up: Base classes [Index]
Beginning of a Point class for simple display manipulation. Has not been exhaustively tested but appears to work for the basic primitives and for the needs of the Rectangle class.
• Point class-instance creation: | (class) | |
• Point-accessing: | (instance) | |
• Point-arithmetic: | (instance) | |
• Point-comparing: | (instance) | |
• Point-converting: | (instance) | |
• Point-point functions: | (instance) | |
• Point-printing: | (instance) | |
• Point-storing: | (instance) | |
• Point-truncation and round off: | (instance) |
Next: Point-accessing, Up: Point [Index]
Create a new point with both coordinates set to 0
Create a new point with the given coordinates
Next: Point-arithmetic, Previous: Point class-instance creation, Up: Point [Index]
Answer the x coordinate
Set the x coordinate to aNumber
Set the x and y coordinate to anXNumber and aYNumber, respectively
Answer the y coordinate
Set the y coordinate to aNumber
Next: Point-comparing, Previous: Point-accessing, Up: Point [Index]
Multiply the receiver by scale, which can be a Number or a Point
Sum the receiver and delta, which can be a Number or a Point
Subtract delta, which can be a Number or a Point, from the receiver
Divide the receiver by scale, which can be a Number or a Point, with no loss of precision
Divide the receiver by scale, which can be a Number or a Point, with truncation towards -infinity
Answer a new point whose coordinates are the absolute values of the receiver’s
Next: Point-converting, Previous: Point-arithmetic, Up: Point [Index]
Answer whether the receiver is higher and to the left of aPoint
Answer whether aPoint is equal to the receiver, or the receiver is higher and to the left of aPoint
Answer whether the receiver is equal to aPoint
Answer whether the receiver is lower and to the right of aPoint
Answer whether aPoint is equal to the receiver, or the receiver is lower and to the right of aPoint
Answer self if it is lower and to the right of aPoint, aPoint otherwise
Answer self if it is higher and to the left of aPoint, aPoint otherwise
Next: Point-point functions, Previous: Point-comparing, Up: Point [Index]
Answer the receiver.
Answer an empty rectangle whose origin is self
Answer a Rectangle whose origin is the receiver and whose corner is aPoint
Answer a Rectangle whose origin is the receiver and whose extent is aPoint
Answer an hash value for the receiver
Next: Point-printing, Previous: Point-converting, Up: Point [Index]
Answer the angle (measured counterclockwise) between the receiver and a ray starting in (0, 0) and moving towards (1, 0) - i.e. 3 o’clock
Answer the distance between the receiver and aPoint
Answer the dot product between the receiver and aPoint
Answer a new point whose coordinates are rounded towards the nearest multiple of aPoint
Rotate the Point 90degrees clockwise and get the unit vector
Answer a new point whose coordinates are the receiver’s coordinates exchanged (x becomes y, y becomes x)
Answer a new point whose coordinates are rounded towards -infinity, to a multiple of grid (which must be a Point)
Next: Point-storing, Previous: Point-point functions, Up: Point [Index]
Print a representation for the receiver on aStream
Next: Point-truncation and round off, Previous: Point-printing, Up: Point [Index]
Print Smalltalk code compiling to the receiver on aStream
Previous: Point-storing, Up: Point [Index]
Answer a new point whose coordinates are rounded to the nearest integer
Answer a new point whose coordinates are rounded towards -infinity, to a multiple of grid (which must be a Number)
Next: Process, Previous: Point, Up: Base classes [Index]
My instances represent streams where explicit positioning is permitted. Thus, my streams act in a manner to normal disk files: you can read or write sequentially, but also position the file to a particular place whenever you choose. Generally, you’ll want to use ReadStream, WriteStream or ReadWriteStream instead of me to create and use streams.
• PositionableStream class-instance creation: | (class) | |
• PositionableStream-accessing-reading: | (instance) | |
• PositionableStream-class type methods: | (instance) | |
• PositionableStream-compiling: | (instance) | |
• PositionableStream-positioning: | (instance) | |
• PositionableStream-still unclassified: | (instance) | |
• PositionableStream-testing: | (instance) | |
• PositionableStream-truncating: | (instance) |
Next: PositionableStream-accessing-reading, Up: PositionableStream [Index]
Answer an instance of the receiver streaming on the whole contents of aCollection
Answer an instance of the receiver streaming from the firstIndex-th item of aCollection to the lastIndex-th
Next: PositionableStream-class type methods, Previous: PositionableStream class-instance creation, Up: PositionableStream [Index]
Disassociate a stream from its backing store.
Returns a collection of the same type that the stream accesses, up to and including the final element.
Answer the data on which the receiver is streaming, from the start-th item to the end-th. Note that this method is 0-based, unlike the one in Collection, because a Stream’s #position method returns 0-based values.
Answer the next item of the receiver. Returns nil when at end of stream.
Place up to anInteger objects from the receiver into aCollection, starting from position pos in the collection and stopping if no more data is available.
Copy up to anInteger objects from the receiver into aStream, stopping if no more data is available.
Returns the next element of the stream without moving the pointer. Returns nil when at end of stream.
Returns true and gobbles the next element from the stream of it is equal to anObject, returns false and doesn’t gobble the next element if the next element is not equal to anObject.
Answer a ReadStream on the same contents as the receiver
Returns a collection of the same type that the stream accesses, up to and including the final element, but in reverse order.
Returns a collection of the same type that the stream accesses, up to but not including the object anObject. Returns the entire rest of the stream’s contents if anObject is not present.
Returns a collection of the same type that the stream accesses, containing the entire rest of the stream’s contents.
Next: PositionableStream-compiling, Previous: PositionableStream-accessing-reading, Up: PositionableStream [Index]
We stream on a collection residing in the image, so answer false
Return the type of the collections returned by #upTo: etc., which are the same kind as those returned by the collection with methods such as #select:.
Next: PositionableStream-positioning, Previous: PositionableStream-class type methods, Up: PositionableStream [Index]
Answer a string that represents what the receiver is streaming on
Answer an object that, when sent #asString, will yield the result of sending ‘copyFrom: startPos to: endPos’ to the receiver
Next: PositionableStream-still unclassified, Previous: PositionableStream-compiling, Up: PositionableStream [Index]
Move the stream pointer to the anInteger-th object
Answer true if the stream supports moving backwards with #skip:.
Answer the current value of the stream pointer
Move the stream pointer to the anInteger-th object
Move the stream back to its first element. For write-only streams, the stream is truncated there.
Move the current position to the end of the stream.
Answer the size of data on which we are streaming.
Move the current position by anInteger places, either forwards or backwards.
Next: PositionableStream-testing, Previous: PositionableStream-positioning, Up: PositionableStream [Index]
Write all the objects in the receiver to aStream.
Next: PositionableStream-truncating, Previous: PositionableStream-still unclassified, Up: PositionableStream [Index]
Answer whether the objects in the stream have reached an end
Answer whether the objects in the stream have reached an end. This method must NOT be overridden.
Answer whether the stream has no objects
Previous: PositionableStream-testing, Up: PositionableStream [Index]
Truncate the receiver to the current position - only valid for writing streams
Next: ProcessEnvironment, Previous: PositionableStream, Up: Base classes [Index]
I represent a unit of computation. My instances are independantly executable blocks that have a priority associated with them, and they can suspend themselves and resume themselves however they wish.
• Process-accessing: | (instance) | |
• Process-basic: | (instance) | |
• Process-builtins: | (instance) | |
• Process-debugging: | (instance) | |
• Process-printing: | (instance) |
Next: Process-basic, Up: Process [Index]
Answer whether the receiver is executed with interrupts enabled
Answer the user-friendly name of the process.
Give the name aString to the process
Answer the receiver’s priority
Change the receiver’s priority to anInteger
Force the receiver to be interrupted and to evaluate aBlock as soon as it becomes the active process (this could mean NOW if the receiver is active). If the process is temporarily suspended or waiting on a semaphore, it is temporarily woken up so that the interrupt is processed as soon as the process priority allows to do. Answer the receiver.
Answer the context that the process was executing at the time it was suspended.
Modify the context that the process was executing at the time it was suspended.
Evaluate aBlock and delay all interrupts that are requested during its execution to after aBlock returns.
Next: Process-builtins, Previous: Process-accessing, Up: Process [Index]
Return the execution context of the receiver.
Return the object in charge of debugging the receiver. This always returns nil unless the DebugTools package is loaded.
Terminate processes that are GCed while waiting on a dead semaphore.
Lower a bit the priority of the receiver. A #lowerPriority will cancel a previous #raisePriority, and vice versa.
Set whether the receiver is trusted or not.
Terminate the receiver - This is nothing more than prohibiting to resume the process, then suspending it.
Raise a bit the priority of the receiver. A #lowerPriority will cancel a previous #raisePriority, and vice versa.
Execute a limited amount of code (usually a bytecode, or up to the next backward jump, or up to the next message send) of the receiver, which must in a ready-to-run state (neither executing nor terminating nor suspended), then restart running the current process. The current process should have higher priority than the receiver. For better performance, use the underlying primitive, Process>>#singleStepWaitingOn:.
Terminate the receiver after having evaluated all the #ensure: and #ifCurtailed: blocks that are active in it. This is done by signalling a ProcessBeingTerminated notification.
Mark the receiver so that it is terminated when ObjectMemory class>>#quit: is sent.
Next: Process-debugging, Previous: Process-basic, Up: Process [Index]
Resume the receiver’s execution
Execute a limited amount of code (usually a bytecode, or up to the next backward jump, or up to the next message send) of the receiver, which must in a ready-to-run state (neither executing nor terminating nor suspended), then restart running the current process. aSemaphore is used as a means to synchronize the execution of the current process and the receiver and should have no signals on it. The current process should have higher priority than the receiver.
Do nothing if we’re already suspended. Note that the blue book made suspend a primitive - but the real primitive is yielding control to another process. Suspending is nothing more than taking ourselves out of every scheduling list and THEN yielding control to another process
Yield control from the receiver to other processes
Next: Process-printing, Previous: Process-builtins, Up: Process [Index]
Do nothing, instances of Process are already detached.
Previous: Process-debugging, Up: Process [Index]
Print a representation of the receiver on aStream
Next: ProcessorScheduler, Previous: Process, Up: Base classes [Index]
I represent a proxy for thread-local variables defined for Smalltalk processes. Associations requested to me retrieve the thread-local value for the current process. For now, I don’t provide the full protocol of a Dictionary; in particular the iteration protocol is absent.
• ProcessEnvironment class-disabled: | (class) | |
• ProcessEnvironment class-singleton: | (class) | |
• ProcessEnvironment-accessing: | (instance) | |
• ProcessEnvironment-dictionary removing: | (instance) | |
• ProcessEnvironment-dictionary testing: | (instance) |
Next: ProcessEnvironment class-singleton, Up: ProcessEnvironment [Index]
This method should not be called for instances of this class.
Next: ProcessEnvironment-accessing, Previous: ProcessEnvironment class-disabled, Up: ProcessEnvironment [Index]
Return the singleton instance of ProcessEnvironment.
Next: ProcessEnvironment-dictionary removing, Previous: ProcessEnvironment class-singleton, Up: ProcessEnvironment [Index]
Add the newObject association to the receiver
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
Answer the value associated to the given key. Return nil if the key is not found
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
Answer the value associated to the given key, setting it to the result of evaluating aBlock if the key is not found.
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
Store value as associated to the given key
Answer a kind of Set containing the keys of the receiver
Next: ProcessEnvironment-dictionary testing, Previous: ProcessEnvironment-accessing, Up: ProcessEnvironment [Index]
Remove anAssociation’s key from the dictionary
Remove anAssociation’s key from the dictionary
Remove all the keys in keys, without raising any errors
Remove all the keys in keys, passing the missing keys as parameters to aBlock as they’re encountered
Remove the aSymbol key from the dictionary
Remove the aSymbol key from the dictionary
Previous: ProcessEnvironment-dictionary removing, Up: ProcessEnvironment [Index]
Answer whether the receiver contains the given key
Next: ProcessVariable, Previous: ProcessEnvironment, Up: Base classes [Index]
I provide methods that control the execution of processes.
• ProcessorScheduler class-instance creation: | (class) | |
• ProcessorScheduler-basic: | (instance) | |
• ProcessorScheduler-built ins: | (instance) | |
• ProcessorScheduler-idle tasks: | (instance) | |
• ProcessorScheduler-printing: | (instance) | |
• ProcessorScheduler-priorities: | (instance) | |
• ProcessorScheduler-storing: | (instance) | |
• ProcessorScheduler-timed invocation: | (instance) |
Next: ProcessorScheduler-basic, Up: ProcessorScheduler [Index]
Error—new instances of ProcessorScheduler should not be created.
Next: ProcessorScheduler-built ins, Previous: ProcessorScheduler class-instance creation, Up: ProcessorScheduler [Index]
Answer the active process’ debugger
Answer the active process’ priority
Answer the active process
Answer another singleton object hosting thread-local variables for the Smalltalk processes. This acts like a normal Dictionary with a couple of differences: a) using #associationAt: will return special associations that retrieve a thread-local value; b) requesting missing keys will return nil, and removing them will be a nop.
Answer a linked list of processes at the given priority
Terminate the active process
Answer the timeslice that is assigned to each Process before it is automatically preempted by the system (in milliseconds). An answer of zero means that preemptive multitasking is disabled. Note that the system by default is compiled without preemptive multitasking, and that even if it is enabled it will work only under BSD derivatives (or, in general, systems that support ITIMER_VIRTUAL).
Set the timeslice that is assigned to each Process before it is automatically preempted by the system. Setting this to zero disables preemptive multitasking. Note that the system by default is compiled with preemptive multitasking disabled, and that even if it is enabled it will surely work only under BSD derivatives (or, in general, systems that support ITIMER_VIRTUAL).
Let the active process yield control to other processes
Next: ProcessorScheduler-idle tasks, Previous: ProcessorScheduler-basic, Up: ProcessorScheduler [Index]
Disable interrupts caused by external events while the current process is executing. Note that interrupts are disabled on a per-process basis, and that calling #disableInterrupts twice requires calling #enableInterrupts twice as well to re-enable interrupts.
Re-enable interrupts caused by external events while the current process is executing. By default, interrupts are enabled.
Next: ProcessorScheduler-printing, Previous: ProcessorScheduler-built ins, Up: ProcessorScheduler [Index]
Private - Call the next idle task. Return whether GNU Smalltalk should pause until the next OS signal.
Register aBlock to be executed when things are idle
Private - Start the finalization process.
Private - Pause for some time if aBoolean is false, or until a signal if it is true.
Private - Fire a low-priority process to finalize the objects
If we left some work behind when the image was saved, do it now.
Next: ProcessorScheduler-priorities, Previous: ProcessorScheduler-idle tasks, Up: ProcessorScheduler [Index]
Store onto aStream a printed representation of the receiver
Next: ProcessorScheduler-storing, Previous: ProcessorScheduler-printing, Up: ProcessorScheduler [Index]
Answer the priority for system high-priority I/O processes, such as a process handling input from a network.
Answer the highest valid priority
Answer the priority of idle processes.
Answer the priority for system low-priority I/O processes. Examples are the process handling input from the user (keyboard, pointing device, etc.) and the process distributing input from a network.
Answer the lowest valid priority
Private - Answer a name for the given process priority
Answer the priority for system background-priority processes. An incremental garbage collector could run at this level but now it runs at idlePriority instead.
Answer the priority for system real-time processes.
Answer the highest priority avilable in the system; never create a process with this priority, instead use BlockClosure>>#valueWithoutPreemption.
Answer the priority for user background-priority processes
Answer the priority for user interrupt-priority processes. Processes run at this level will preempt the window scheduler and should, therefore, not consume the processor forever.
Answer the priority for user standard-priority processes
Next: ProcessorScheduler-timed invocation, Previous: ProcessorScheduler-priorities, Up: ProcessorScheduler [Index]
Store onto aStream a Smalltalk expression which evaluates to the receiver
Previous: ProcessorScheduler-storing, Up: ProcessorScheduler [Index]
Private - Answer whether there is a pending call to #signal:atMilliseconds:
Private - signal ’aSemaphore’ when the nanosecond clock reaches ’ns’ nanoseconds.
Signal ’aSemaphore’ when the given C signal occurs.
Next: Promise, Previous: ProcessorScheduler, Up: Base classes [Index]
I represent a proxy for a thread-local variable defined for a process. Requesting the value will return the thread-local setting for the current process.
• ProcessVariable class-accessing: | (class) | |
• ProcessVariable-accessing: | (instance) |
Next: ProcessVariable-accessing, Up: ProcessVariable [Index]
Return a new ProcessVariable with the given key. Not that the key need not be a symbol or string, for example you could use an array #(#{class name} ’name’). Setting the variable’s value will automatically create it in the current process, while removal must be done by hand through the ProcessEnvironment singleton object.
Return a new ProcessVariable with a new anonymous but unique key. It is suggested to use a descriptive name instead to ease debugging. Setting the variable’s value will automatically create it in the current process, while removal must be done by hand through the ProcessEnvironment singleton object.
Previous: ProcessVariable class-accessing, Up: ProcessVariable [Index]
Return the environment in which this ProcessVariable lives. This is the singleton instance of ProcessEnvironment for all variables.
Set the value of this variable to anObject during the execution of aBlock, then restore it.
Return the value of this variable in the current process.
Set the value of the current process’s copy of the variable to be anObject.
Return the value of this variable in the current process.
Next: Random, Previous: ProcessVariable, Up: Base classes [Index]
I store my value in a variable, and know whether I have been initialized or not. If you ask for my value and I have not been initialized, I suspend the process until a value has been assigned.
• Promise class-creating instances: | (class) | |
• Promise-accessing: | (instance) | |
• Promise-initializing: | (instance) | |
• Promise-printing: | (instance) | |
• Promise-still unclassified: | (instance) |
Next: Promise-accessing, Up: Promise [Index]
Invoke aBlock at an indeterminate time in an indeterminate process before answering its value from #value sent to my result.
This method should not be called for instances of this class.
Next: Promise-initializing, Previous: Promise class-creating instances, Up: Promise [Index]
Answer whether calling #value will raise an exception.
Answer whether we already have a value (or calling #value will raise an error).
Get the value of the receiver.
Set the value of the receiver.
Next: Promise-printing, Previous: Promise-accessing, Up: Promise [Index]
Private - set the initial state of the receiver
Next: Promise-still unclassified, Previous: Promise-initializing, Up: Promise [Index]
Print a representation of the receiver
Previous: Promise-printing, Up: Promise [Index]
Private - Raise anException whenever #value is called.
Next: ReadStream, Previous: Promise, Up: Base classes [Index]
My instances are generator streams that produce random numbers, which are floating point values between 0 and 1.
• Random class-instance creation: | (class) | |
• Random class-shortcuts: | (class) | |
• Random-basic: | (instance) | |
• Random-testing: | (instance) |
Next: Random class-shortcuts, Up: Random [Index]
Create a new random number generator whose seed is given by the current time on the millisecond clock
Create a new random number generator whose seed is aFloat
Next: Random-basic, Previous: Random class-instance creation, Up: Random [Index]
Return a random integer between the given extrema
Return a random number between 0 and 1 (excluded)
Return a standard source of random numbers.
Next: Random-testing, Previous: Random class-shortcuts, Up: Random [Index]
This stream never ends. Always answer false.
Return a random integer between low and high.
Return the next random number in the sequence.
This method should not be called for instances of this class.
Previous: Random-basic, Up: Random [Index]
Compute the chi-square of the random that this class generates.
Return the chi-square deduced from calculating n random numbers in the 0..r range.
Next: ReadWriteStream, Previous: Random, Up: Base classes [Index]
I implement the set of read-only stream objects. You may read from my objects, but you may not write to them.
• ReadStream class-instance creation: | (class) |
Up: ReadStream [Index]
Answer a new stream working on aCollection from its start.
Answer an instance of the receiver streaming from the firstIndex-th item of aCollection to the lastIndex-th
Next: Rectangle, Previous: ReadStream, Up: Base classes [Index]
I am the class of streams that may be read and written from simultaneously. In some sense, I am the best of both ReadStream and WriteStream.
• ReadWriteStream class-instance creation: | (class) | |
• ReadWriteStream-positioning: | (instance) |
Next: ReadWriteStream-positioning, Up: ReadWriteStream [Index]
Answer a new stream working on aCollection from its start. The stream starts at the front of aCollection.
Answer an instance of the receiver streaming from the firstIndex-th item of aCollection to the lastIndex-th
Answer a new instance of the receiver which streams from the end of aCollection.
Previous: ReadWriteStream class-instance creation, Up: ReadWriteStream [Index]
Unlike WriteStreams, ReadWriteStreams return the whole contents of the underlying collection.
Next: RecursionLock, Previous: ReadWriteStream, Up: Base classes [Index]
Beginning of the Rectangle class for simple display manipulation. Rectangles require the Point class to be available. An extension to the Point class is made here that since it requires Rectangles to be defined (see converting)
• Rectangle class-instance creation: | (class) | |
• Rectangle-accessing: | (instance) | |
• Rectangle-copying: | (instance) | |
• Rectangle-printing: | (instance) | |
• Rectangle-rectangle functions: | (instance) | |
• Rectangle-testing: | (instance) | |
• Rectangle-transforming: | (instance) | |
• Rectangle-truncation and round off: | (instance) |
Next: Rectangle-accessing, Up: Rectangle [Index]
Answer a rectangle with the given coordinates
Answer a rectangle with the given coordinates
Answer the (0 @ 0 corner: 0 @ 0) rectangle
Answer a rectangle with the given corners
Answer a rectangle with the given origin and size
Next: Rectangle-copying, Previous: Rectangle class-instance creation, Up: Rectangle [Index]
Answer the corner’s y of the receiver
Set the corner’s y of the receiver
Answer the center of the receiver’s bottom side
Answer the bottom-left corner of the receiver
Answer the receiver with the bottom-left changed to aPoint
Answer the bottom-right corner of the receiver
Change the bottom-right corner of the receiver
Answer the center of the receiver
Answer the corner of the receiver
Set the corner of the receiver
Answer the extent of the receiver
Change the size of the receiver, keeping the origin the same
Answer the height of the receiver
Set the height of the receiver
Answer the x of the left edge of the receiver
Set the x of the left edge of the receiver
Change all four the coordinates of the receiver’s corners
Answer the center of the receiver’s left side
Answer the top-left corner of the receiver
Change the top-left corner of the receiver to aPoint
Change both the origin (top-left corner) and the corner (bottom-right corner) of the receiver
Change the top-left corner and the size of the receiver
Answer the x of the bottom-right corner of the receiver
Change the x of the bottom-right corner of the receiver
Answer the center of the receiver’s right side
Answer the y of the receiver’s top-left corner
Change the y of the receiver’s top-left corner
Answer the center of the receiver’s top side
Answer the receiver’s top-left corner
Change the receiver’s top-left corner’s coordinates to aPoint
Answer the receiver’s top-right corner
Change the receiver’s top-right corner to aPoint
Answer the receiver’s width
Change the receiver’s width to aNumber
Next: Rectangle-printing, Previous: Rectangle-accessing, Up: Rectangle [Index]
Return a deep copy of the receiver for safety.
Next: Rectangle-rectangle functions, Previous: Rectangle-copying, Up: Rectangle [Index]
Print a representation of the receiver on aStream
Store Smalltalk code compiling to the receiver on aStream
Next: Rectangle-testing, Previous: Rectangle-printing, Up: Rectangle [Index]
Answer a Point so that if aRectangle is translated by that point, its origin lies within the receiver’s.
Answer the receiver’s area. The area is the width times the height, so it is possible for it to be negative if the rectangle is not normalized.
Answer a collection of rectangles containing the parts of the receiver outside of aRectangle. For all points in the receiver, but outside aRectangle, exactly one rectangle in the collection will contain that point.
Answer a new rectangle that is the receiver expanded by aValue: if aValue is a rectangle, calculate origin=origin-aValue origin, corner=corner+aValue corner; else calculate origin=origin-aValue, corner=corner+aValue.
Answer a new rectangle that is the receiver inset by aValue: if aValue is a rectangle, calculate origin=origin+aValue origin, corner=corner-aValue corner; else calculate origin=origin+aValue, corner=corner-aValue.
Answer a new rectangle that is the receiver inset so that origin=origin+originDelta, corner=corner-cornerDelta. The deltas can be points or numbers
Answers the rectangle (if any) created by the overlap of rectangles A and B. Answers nil if the rectangles do not overlap
Answer a new rectangle which is the smallest rectangle containing both the receiver and aRectangle.
Answer a copy of the receiver that does not extend beyond aRectangle.
Next: Rectangle-transforming, Previous: Rectangle-rectangle functions, Up: Rectangle [Index]
Answer whether the receiver is equal to aRectangle
Answer true if the receiver contains (see containsPoint:) both aRectangle’s origin and aRectangle’s corner
Answer true if aPoint is equal to, or below and to the right of, the receiver’s origin; and aPoint is above and to the left of the receiver’s corner
Answer an hash value for the receiver
Answer true if the receiver intersect aRectangle, i.e. if it contains (see containsPoint:) any of aRectangle corners or if aRectangle contains the receiver
Next: Rectangle-truncation and round off, Previous: Rectangle-testing, Up: Rectangle [Index]
Change the receiver so that the origin and corner are shifted by aPoint
Change the receiver so that the origin moves to aPoint and the size remains unchanged
Answer a copy of the receiver in which the origin and corner are multiplied by scale
Answer a copy of the receiver in which the origin and corner are shifted by aPoint
Previous: Rectangle-transforming, Up: Rectangle [Index]
Answer a copy of the receiver with the coordinates rounded to the nearest integers
Next: Regex, Previous: Rectangle, Up: Base classes [Index]
• RecursionLock class-instance creation: | (class) | |
• RecursionLock-accessing: | (instance) | |
• RecursionLock-mutual exclusion: | (instance) | |
• RecursionLock-printing: | (instance) |
Next: RecursionLock-accessing, Up: RecursionLock [Index]
Answer a new semaphore
Next: RecursionLock-mutual exclusion, Previous: RecursionLock class-instance creation, Up: RecursionLock [Index]
Answer whether the receiver is the owner of the lock.
Answer a user-defined name for the lock.
Set to aString the user-defined name for the lock.
Answer the set of processes that are waiting on the semaphore.
Answer whether sending #wait to the receiver would suspend the active process.
Next: RecursionLock-printing, Previous: RecursionLock-accessing, Up: RecursionLock [Index]
Wait for the receiver to be free, execute aBlock and signal the receiver again. Return the result of evaluating aBlock.
Previous: RecursionLock-mutual exclusion, Up: RecursionLock [Index]
Print a human-readable represention of the receiver on aStream.
Next: RegexResults, Previous: RecursionLock, Up: Base classes [Index]
A Regex is a read-only string for which the regular expression matcher can cache a compiled representation, thus speeding up matching. Regex objects are constructed automatically by methods that expect to match many times the same regular expression, but can also be constructed explicitly sending #asRegex to a String or Symbol.
Creation of Regex objects inside a loop is of course slower than creating them outside the loop, but special care is taken so that the same Regex object is used whenever possible (when converting Strings to Regex, the cache is sought for an equivalent, already constructed Regex).
• Regex class-instance creation: | (class) | |
• Regex-basic: | (instance) | |
• Regex-conversion: | (instance) | |
• Regex-printing: | (instance) |
Next: Regex-basic, Up: Regex [Index]
Like ‘aString asRegex’.
Do not send this message.
Next: Regex-conversion, Previous: Regex class-instance creation, Up: Regex [Index]
Fail. Regex objects are read-only.
Answer the receiver; instances of Regex are identity objects because their only purpose is to ease caching, and we obtain better caching if we avoid copying Regex objects
Next: Regex-printing, Previous: Regex-basic, Up: Regex [Index]
Answer the receiver, which *is* a Regex!
Answer the receiver, converted back to a String
Answer ‘String’.
Previous: Regex-conversion, Up: Regex [Index]
Print a represention of the receiver on aStream. For most objects this is simply its #printOn: representation, but for strings and characters, superfluous dollars or extra pairs of quotes are stripped.
Answer a String representing the receiver. For most objects this is simply its #printString, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Print a represention of the receiver on aStream.
Next: RootNamespace, Previous: Regex, Up: Base classes [Index]
I hold the results of a regular expression match, and I can reconstruct which parts of the matched string were assigned to each subexpression. Methods such as #=~ return RegexResults objects, while others transform the string directly without passing the results object back to the caller.
• RegexResults-accessing: | (instance) | |
• RegexResults-testing: | (instance) |
Next: RegexResults-testing, Up: RegexResults [Index]
If the regular expression was matched, return an Array with the subexpressions that were present in the regular expression.
If the regular expression was matched, return the text of the anIndex-th subexpression in the successful match.
If the regular expression was matched, return the index of the first character in the successful match.
If the regular expression was matched, return the index of the first character of the anIndex-th subexpression in the successful match.
If the regular expression was matched, return an Interval for the range of indices in the anIndex-th subexpression of the successful match.
If the regular expression was matched, return the text of the successful match.
If the regular expression was matched, return an Interval for the range of indices of the successful match.
If the regular expression was matched, return the number of subexpressions that were present in the regular expression.
If the regular expression was matched, return the text that was matched against it.
If the regular expression was matched, return the index of the last character in the successful match.
If the regular expression was matched, return the index of the last character of the anIndex-th subexpression in the successful match.
Previous: RegexResults-accessing, Up: RegexResults [Index]
If the regular expression was matched, pass the receiver to oneArgBlock and return its result. Otherwise, return nil.
If the regular expression was matched, evaluate oneArgBlock with the receiver as the argument. If it was not, evaluate zeroArgBlock. Answer the result of the block’s evaluation.
If the regular expression was matched, return the receiver. If it was not, evaluate zeroArgBlock and return its result.
If the regular expression was matched, evaluate oneArgBlock with the receiver as the argument. If it was not, evaluate zeroArgBlock. Answer the result of the block’s evaluation.
Answer whether the regular expression was matched
Next: RunArray, Previous: RegexResults, Up: Base classes [Index]
I am a special form of dictionary. Classes hold on an instance of me; it is called their ‘environment’.
• RootNamespace class-instance creation: | (class) | |
• RootNamespace-namespace hierarchy: | (instance) | |
• RootNamespace-overrides for superspaces: | (instance) | |
• RootNamespace-printing: | (instance) |
Next: RootNamespace-namespace hierarchy, Up: RootNamespace [Index]
Create a new root namespace with the given name, and add to Smalltalk a key that references it.
Next: RootNamespace-overrides for superspaces, Previous: RootNamespace class-instance creation, Up: RootNamespace [Index]
Answer all the other root namespaces
Evaluate aBlock once for each of the other root namespaces, passing the namespace as a parameter.
Next: RootNamespace-printing, Previous: RootNamespace-namespace hierarchy, Up: RootNamespace [Index]
Answer a Set of all the keys in the receiver and its superspaces
Assign newValue to the variable named as specified by ‘key’. This method won’t define a new variable; instead if the key is not found it will search in superspaces and evaluate aBlock if it is not found. Answer newValue.
Previous: RootNamespace-overrides for superspaces, Up: RootNamespace [Index]
Answer Smalltalk code compiling to the receiver when the current namespace is aNamespace
Print on aStream some Smalltalk code compiling to the receiver when the current namespace is aNamespace
Store Smalltalk code compiling to the receiver
Next: ScaledDecimal, Previous: RootNamespace, Up: Base classes [Index]
My instances are OrderedCollections that automatically apply Run Length Encoding compression to the things they store. Be careful when using me: I can provide great space savings, but my instances don’t grant linear access time. RunArray’s behavior currently is similar to that of OrderedCollection (you can add elements to RunArrays); maybe it should behave like an ArrayedCollection.
• RunArray class-instance creation: | (class) | |
• RunArray-accessing: | (instance) | |
• RunArray-adding: | (instance) | |
• RunArray-basic: | (instance) | |
• RunArray-copying: | (instance) | |
• RunArray-enumerating: | (instance) | |
• RunArray-removing: | (instance) | |
• RunArray-searching: | (instance) | |
• RunArray-testing: | (instance) |
Next: RunArray-accessing, Up: RunArray [Index]
Answer an empty RunArray
Answer a RunArray with space for aSize runs
Next: RunArray-adding, Previous: RunArray class-instance creation, Up: RunArray [Index]
Answer the element at index anIndex
Replace the element at index anIndex with anObject and answer anObject
Next: RunArray-basic, Previous: RunArray-accessing, Up: RunArray [Index]
Add anObject after the element at index anIndex
Add all the elements of aCollection after the one at index anIndex. If aCollection is unordered, its elements could be added in an order which is not the #do: order
Add all the elements of aCollection at the beginning of the receiver. If aCollection is unordered, its elements could be added in an order which is not the #do: order
Add all the elements of aCollection at the end of the receiver. If aCollection is unordered, its elements could be added in an order which is not the #do: order
Add anObject at the beginning of the receiver. Watch out: this operation can cause serious performance pitfalls
Add anObject at the end of the receiver
Next: RunArray-copying, Previous: RunArray-adding, Up: RunArray [Index]
Answer the first element in the receiver
Answer the last element of the receiver
Answer the number of elements in the receiver
Next: RunArray-enumerating, Previous: RunArray-basic, Up: RunArray [Index]
Answer a copy of the receiver containing copies of the receiver’s elements (#copy is used to obtain them)
Answer a copy of the receiver. The elements are not copied
Next: RunArray-removing, Previous: RunArray-copying, Up: RunArray [Index]
Enumerate all the objects in the receiver, passing each one to aBlock
Enumerate all the runs in the receiver, passing to aBlock two parameters for every run: the first is the repeated object, the second is the number of copies
Next: RunArray-searching, Previous: RunArray-enumerating, Up: RunArray [Index]
Remove the object at index anIndex from the receiver and answer the removed object
Remove the first object from the receiver and answer the removed object
Remove the last object from the receiver and answer the removed object
Next: RunArray-testing, Previous: RunArray-removing, Up: RunArray [Index]
Answer the index of the first copy of anObject in the receiver, starting the search at the element at index anIndex. If no equal object is found, answer the result of evaluating aBlock
Previous: RunArray-searching, Up: RunArray [Index]
Answer true if the receiver is equal to anObject
Answer an hash value for the receiver
Next: SecurityPolicy, Previous: RunArray, Up: Base classes [Index]
ScaledDecimal provides a numeric representation of fixed point decimal numbers able to accurately represent decimal fractions. It supports unbounded precision, with no limit to the number of digits before and after the decimal point.
• ScaledDecimal class-instance creation: | (class) | |
• ScaledDecimal-arithmetic: | (instance) | |
• ScaledDecimal-coercion: | (instance) | |
• ScaledDecimal-comparing: | (instance) | |
• ScaledDecimal-constants: | (instance) | |
• ScaledDecimal-printing: | (instance) | |
• ScaledDecimal-storing: | (instance) |
Next: ScaledDecimal-arithmetic, Up: ScaledDecimal [Index]
Answer a new instance of ScaledDecimal, representing a decimal fraction with a decimal representation considered valid up to the scale-th digit.
Next: ScaledDecimal-coercion, Previous: ScaledDecimal class-instance creation, Up: ScaledDecimal [Index]
Multiply two numbers and answer the result.
Sum two numbers and answer the result.
Subtract aNumber from the receiver and answer the result.
Divide two numbers and answer the result.
Answer the integer quotient after dividing the receiver by aNumber with truncation towards negative infinity.
Answer the remainder after integer division the receiver by aNumber with truncation towards negative infinity.
Next: ScaledDecimal-comparing, Previous: ScaledDecimal-arithmetic, Up: ScaledDecimal [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Answer the receiver, converted to a FloatD
Answer the receiver, converted to a FloatE
Answer the receiver, converted to a FloatQ
Answer the receiver, converted to a Fraction
Answer the receiver, converted to an Integer and truncated towards +infinity.
Answer aNumber, converted to a ScaledDecimal with the same scale as the receiver.
Answer the fractional part of the receiver.
Return the receiver’s generality
Answer the fractional part of the receiver.
Answer the receiver, converted to an Integer and truncated towards -infinity.
Next: ScaledDecimal-constants, Previous: ScaledDecimal-coercion, Up: ScaledDecimal [Index]
Answer whether the receiver is less than arg.
Answer whether the receiver is less than or equal to arg.
Answer whether the receiver is equal to arg.
Answer whether the receiver is greater than arg.
Answer whether the receiver is greater than or equal to arg.
Answer an hash value for the receiver.
Answer whether the receiver is not equal arg.
Next: ScaledDecimal-printing, Previous: ScaledDecimal-comparing, Up: ScaledDecimal [Index]
Answer the receiver’s representation of one.
Answer the receiver’s representation of zero.
Next: ScaledDecimal-storing, Previous: ScaledDecimal-constants, Up: ScaledDecimal [Index]
Print a representation of the receiver on aStream, intended to be directed to a user. In this particular case, the ‘scale’ part of the #printString is not emitted.
Print a representation of the receiver on aStream.
Previous: ScaledDecimal-printing, Up: ScaledDecimal [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store on aStream some Smalltalk code which compiles to the receiver
Print Smalltalk code that compiles to the receiver on aStream.
Next: Semaphore, Previous: ScaledDecimal, Up: Base classes [Index]
I am the class that represents which operations that could harm the system’s security are allowed or denied to a particular class. If a class does not have a policy, it is allowed everything if it is trusted, and denied everything if it is untrusted
• SecurityPolicy-modifying: | (instance) | |
• SecurityPolicy-querying: | (instance) |
Next: SecurityPolicy-querying, Up: SecurityPolicy [Index]
Not commented.
Not commented.
Not commented.
Not commented.
Previous: SecurityPolicy-modifying, Up: SecurityPolicy [Index]
Not commented.
Not commented.
Next: SequenceableCollection, Previous: SecurityPolicy, Up: Base classes [Index]
My instances represent counting semaphores. I provide methods for signalling the semaphore’s availability, and methods for waiting for its availability. I also provide some methods for implementing critical sections.
• Semaphore class-instance creation: | (class) | |
• Semaphore-accessing: | (instance) | |
• Semaphore-builtins: | (instance) | |
• Semaphore-mutual exclusion: | (instance) | |
• Semaphore-printing: | (instance) |
Next: Semaphore-accessing, Up: Semaphore [Index]
Answer a new semaphore with a signal on it. These semaphores are a useful shortcut when you use semaphores as critical sections.
Answer a new semaphore
Next: Semaphore-builtins, Previous: Semaphore class-instance creation, Up: Semaphore [Index]
Answer a user-friendly name for the receiver
Answer a user-friendly name for the receiver
Answer an Array of processes currently waiting on the receiver.
Answer whether waiting on the receiver would suspend the current process.
Next: Semaphore-mutual exclusion, Previous: Semaphore-accessing, Up: Semaphore [Index]
Without putting the receiver to sleep, force processes that try to wait on the semaphore to block. Answer whether this was the case even before.
Resume one of the processes that were waiting on the semaphore if there were any. Do not leave a signal on the semaphore if no process is waiting.
Resume all the processes that were waiting on the semaphore if there were any. Do not leave a signal on the semaphore if no process is waiting.
Signal the receiver, resuming a waiting process’ if there is one
Wait for the receiver to be signalled, suspending the executing process if it is not yet. Return nil if the wait was interrupted, the receiver otherwise.
Signal aSemaphore then, atomically, wait for the receiver to be signalled, suspending the executing process if it is not yet. This is needed to avoid race conditions when the #notify and #notifyAll are used before waiting on receiver: otherwise, if a process sends any of the two between the time aSemaphore is signaled and the time the process starts waiting on the receiver, the notification is lost.
Next: Semaphore-printing, Previous: Semaphore-builtins, Up: Semaphore [Index]
Wait for the receiver to be free, execute aBlock and signal the receiver again. Return the result of evaluating aBlock.
Previous: Semaphore-mutual exclusion, Up: Semaphore [Index]
Print a human-readable represention of the receiver on aStream.
Next: Set, Previous: Semaphore, Up: Base classes [Index]
My instances represent collections of objects that are ordered. I provide some access and manipulation methods.
• SequenceableCollection class-instance creation: | (class) | |
• SequenceableCollection-basic: | (instance) | |
• SequenceableCollection-comparing: | (instance) | |
• SequenceableCollection-concatenating: | (instance) | |
• SequenceableCollection-copying SequenceableCollections: | (instance) | |
• SequenceableCollection-enumerating: | (instance) | |
• SequenceableCollection-manipulation: | (instance) | |
• SequenceableCollection-replacing items: | (instance) | |
• SequenceableCollection-sorting: | (instance) | |
• SequenceableCollection-still unclassified: | (instance) | |
• SequenceableCollection-testing: | (instance) | |
• SequenceableCollection-testing collections: | (instance) |
Next: SequenceableCollection-basic, Up: SequenceableCollection [Index]
Where aCollection is a collection of SequenceableCollections, answer a new instance with all the elements therein, in order, each separated by an occurrence of sepCollection.
Next: SequenceableCollection-comparing, Previous: SequenceableCollection class-instance creation, Up: SequenceableCollection [Index]
Return the element after oldObject. Error if oldObject not found or if no following object is available
Answer a copy of the receiver without the first object.
Answer a copy of the receiver without the first n objects.
Answer a copy of the receiver without the last object.
Answer a copy of the receiver without the last n objects.
Answer the anIndex-th item of the collection, or evaluate aBlock and answer the result if the index is out of range
Answer a collection of the same kind returned by #collect:, that only includes the values at the given indices. Fail if any of the values in keyCollection is out of bounds for the receiver.
Put anObject at every index contained in aCollection
Put anObject at every index in the receiver
Return a random item of the receiver.
Return the element before oldObject. Error if oldObject not found or if no preceding object is available
Answer the first item in the receiver
Answer the first n items in the receiver
Answer the fourth item in the receiver
Answer whether we include the anObject object
Answer the index of the first occurrence of an object identical to anElement in the receiver. Answer 0 if no item is found
Answer the index of the first occurrence of an object identical to anElement in the receiver. Invoke exceptionBlock and answer its result if no item is found
Answer the first index > anIndex which contains an object identical to anElement. Answer 0 if no item is found
Answer the first index > anIndex which contains an object exactly identical to anObject. Invoke exceptionBlock and answer its result if no item is found
Answer the last index which contains an object identical to anElement. Invoke exceptionBlock and answer its result if no item is found
Answer whether we include anObject
Answer the index of the first occurrence of anElement in the receiver. Answer 0 if no item is found
Answer the index of the first occurrence of anElement in the receiver. Invoke exceptionBlock and answer its result if no item is found
Answer the first index > anIndex which contains anElement. Answer 0 if no item is found
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Answer the last index which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Answer the first index > anIndex at which starts a sequence of items matching aSubCollection. Answer 0 if no such sequence is found.
Answer the first index > anIndex at which starts a sequence of items matching aSubCollection. Answer 0 if no such sequence is found.
Answer the first index > anIndex at which starts a sequence of items matching aSubCollection. Answer 0 if no such sequence is found.
Answer the first index > anIndex at which starts a sequence of items matching aSubCollection. Invoke exceptionBlock and answer its result if no such sequence is found
Answer the last item in the receiver
Answer the last n items in the receiver
Answer the second item in the receiver
Answer the third item in the receiver
Next: SequenceableCollection-concatenating, Previous: SequenceableCollection-basic, Up: SequenceableCollection [Index]
Returns true if the receiver ends with the same characters as aSequenceableCollection.
Returns true if the receiver starts with the same characters as aSequenceableCollection.
Next: SequenceableCollection-copying SequenceableCollections, Previous: SequenceableCollection-comparing, Up: SequenceableCollection [Index]
Answer a new collection like my first element, with all the elements (in order) of all my elements (which should be collections) separated by sepCollection.
I use my first element instead of myself as a prototype because my elements are more likely to share the desired properties than I am, such as in:
#(’hello,’ ’world’) join: ’ ’ => ’hello, world’
Return an Array with the same size as the receiver and aSequenceableCollection, each element of which is a 2-element Arrays including one element from the receiver and one from aSequenceableCollection.
Return an Array with the same size as the receiver and the arguments, each element of which is a 3-element Arrays including one element from the receiver and one from each argument.
Return an Array with the same size as the receiver and the arguments, each element of which is a 4-element Arrays including one element from the receiver and one from each argument.
Next: SequenceableCollection-enumerating, Previous: SequenceableCollection-concatenating, Up: SequenceableCollection [Index]
Answer a new collection holding all the elements of the receiver after the first occurrence of anObject, up to the last.
Answer a new collection holding all the elements of the receiver after the last occurrence of anObject, up to the last.
Answer a new collection containing all the items in the receiver from the start-th.
Answer a new collection containing all the items in the receiver from the start-th and to the stop-th
Answer a new collection in which all the sequences matching oldSubCollection are replaced with newSubCollection
Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index ‘start’ to index ‘stop’.
If start < stop, these are replaced by the contents of the replacementCollection. Instead, If start = (stop + 1), like in ‘copyReplaceFrom: 4 to: 3 with: anArray’, then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index ‘start’.
Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index ‘start’ to index ‘stop’.
If start < stop, these are replaced by stop-start+1 copies of anObject. Instead, If start = (stop + 1), then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index ‘start’.
Answer a new collection holding all the elements of the receiver from the first up to the first occurrence of anObject, excluded.
Answer a new collection holding all the elements of the receiver from the first up to the last occurrence of anObject, excluded.
Answer a new collection holding all the elements of the receiver after the first occurrence of anObject, up to the last.
Next: SequenceableCollection-manipulation, Previous: SequenceableCollection-copying SequenceableCollections, Up: SequenceableCollection [Index]
Answer an unspecified element of the collection.
Evaluate aBlock for all the elements in the sequenceable collection
Evaluate aBlock for all the elements in the sequenceable collection. Between each element, evaluate sepBlock without parameters.
Evaluate aBlock for all the elements in the sequenceable collection, passing the index of each element as the second parameter. This method is mantained for backwards compatibility and is not mandated by the ANSI standard; use #keysAndValuesDo:
Returns the index of the first element of the sequenceable collection for which aBlock returns true, or 0 if none
Returns the index of the last element of the sequenceable collection for which aBlock returns true, or 0 if none does
First, pass to binaryBlock the first and second elements of the receiver; for each subsequent element, pass the result of the previous evaluation and an element. Answer the result of the last invocation, or the first element if the collection has size 1. Fail if the collection is empty.
Evaluate aBlock for all the elements in the sequenceable collection whose indices are in the range index to stopIndex
Evaluate aBlock for all the elements in the sequenceable collection whose indices are in the range index to stopIndex, passing the index of each element as the second parameter. This method is mantained for backwards compatibility and is not mandated by the ANSI standard; use #from:to:keysAndValuesDo:
Evaluate aBlock for all the elements in the sequenceable collection whose indices are in the range index to stopIndex, passing the index of each element as the first parameter and the element as the second.
Return an Interval corresponding to the valid indices in the receiver.
Evaluate aBlock for all the elements in the sequenceable collection, passing the index of each element as the first parameter and the element as the second.
Answer a ReadStream streaming on the receiver
Answer a ReadWriteStream which streams on the receiver
Answer the receivers’ contents in reverse order
Evaluate aBlock for all elements in the sequenceable collection, from the last to the first.
Evaluate aBlock for each pair of elements took respectively from the receiver and from aSequenceableCollection; answer a collection of the same kind of the receiver, made with the block’s return values. Fail if the receiver has not the same size as aSequenceableCollection.
Evaluate aBlock for each pair of elements took respectively from the receiver and from aSequenceableCollection. Fail if the receiver has not the same size as aSequenceableCollection.
Next: SequenceableCollection-replacing items, Previous: SequenceableCollection-enumerating, Up: SequenceableCollection [Index]
Swap the item at index anIndex with the item at index another index
Next: SequenceableCollection-sorting, Previous: SequenceableCollection-manipulation, Up: SequenceableCollection [Index]
In the receiver, replace every occurrence of anObject with anotherObject.
Replace the items from start to stop with replacementCollection’s items from 1 to stop-start+1 (in unexpected order if the collection is not sequenceable).
Replace the items from start to stop with replacementCollection’s items from repStart to repStart+stop-start
Replace every item from start to stop with replacementObject.
Next: SequenceableCollection-still unclassified, Previous: SequenceableCollection-replacing items, Up: SequenceableCollection [Index]
Sort the contents of the receiver according to the default sort block, which uses #<= to compare items.
Sort the contents of the receiver according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one.
Return a copy of the receiver sorted according to the default sort block, which uses #<= to compare items.
Return a copy of the receiver sorted according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one.
Next: SequenceableCollection-testing, Previous: SequenceableCollection-sorting, Up: SequenceableCollection [Index]
Write all the objects in the receiver to aStream
Next: SequenceableCollection-testing collections, Previous: SequenceableCollection-still unclassified, Up: SequenceableCollection [Index]
Answer whether the receiver’s items match those in aCollection
Print all the instance variables and context of the receiver on aStream
Answer an hash value for the receiver
Answer whether the receiver can be accessed by a numeric index with #at:/#at:put:.
Previous: SequenceableCollection-testing, Up: SequenceableCollection [Index]
Answer a dummy size of 0, so that SequenceableCollection>>#do: works.
Next: SharedQueue, Previous: SequenceableCollection, Up: Base classes [Index]
I am the typical set object; I also known how to do arithmetic on my instances.
• Set-arithmetic: | (instance) | |
• Set-awful ST-80 compatibility hacks: | (instance) | |
• Set-comparing: | (instance) |
Next: Set-awful ST-80 compatibility hacks, Up: Set [Index]
Compute the set intersection of the receiver and aSet.
Compute the set union of the receiver and aSet.
Compute the set difference of the receiver and aSet.
Next: Set-comparing, Previous: Set-arithmetic, Up: Set [Index]
Tries to see if anObject exists as an indexed variable. As soon as nil or anObject is found, the index of that slot is answered
Previous: Set-awful ST-80 compatibility hacks, Up: Set [Index]
Answer whether the receiver is a strict subset of aSet
Answer whether the receiver is a subset of aSet
Answer whether the receiver is a strict superset of aSet
Answer whether the receiver is a superset of aSet
Next: SingletonProxy, Previous: Set, Up: Base classes [Index]
My instances provide a guaranteed safe mechanism to allow for communication between processes. All access to the underlying data structures is controlled with critical sections so that things proceed smoothly.
• SharedQueue class-instance creation: | (class) | |
• SharedQueue-accessing: | (instance) |
Next: SharedQueue-accessing, Up: SharedQueue [Index]
Create a new instance of the receiver
Create a new instance of the receiver which implements a priority queue with the given sort block
Previous: SharedQueue class-instance creation, Up: SharedQueue [Index]
Answer whether there is an object on the queue
Wait for an object to be on the queue, then remove it and answer it
Put value on the queue and answer it
Wait for an object to be on the queue if necessary, then answer the same object that #next would answer without removing it.
Next: SmallInteger, Previous: SharedQueue, Up: Base classes [Index]
I am a proxy that stores the class of an object rather than the object itself, and pretends that a registered instance (which most likely is a singleton instance of the stored class) was stored instead.
• SingletonProxy class-accessing: | (class) | |
• SingletonProxy class-instance creation: | (class) | |
• SingletonProxy-saving and restoring: | (instance) |
Next: SingletonProxy class-instance creation, Up: SingletonProxy [Index]
The receiver was asked to be used as a proxy for the class aClass. The registration is fine if the class is actually a singleton.
Next: SingletonProxy-saving and restoring, Previous: SingletonProxy class-accessing, Up: SingletonProxy [Index]
Answer a proxy to be used to save anObject. The proxy stores the class and restores the object by looking into a dictionary of class -> singleton objects.
Previous: SingletonProxy class-instance creation, Up: SingletonProxy [Index]
Reconstruct the object stored in the proxy and answer it; the binaryRepresentationObject is sent the #reconstructOriginalObject message, and the resulting object is sent the #postLoad message.
Next: SortedCollection, Previous: SingletonProxy, Up: Base classes [Index]
I am the integer class of the GNU Smalltalk system. My instances can represent signed 30 bit integers and are as efficient as possible.
• SmallInteger class-getting limits: | (class) | |
• SmallInteger class-testing: | (class) | |
• SmallInteger-bit arithmetic: | (instance) | |
• SmallInteger-built ins: | (instance) | |
• SmallInteger-builtins: | (instance) | |
• SmallInteger-coercion: | (instance) | |
• SmallInteger-coercion methods: | (instance) | |
• SmallInteger-testing functionality: | (instance) |
Next: SmallInteger class-testing, Up: SmallInteger [Index]
Answer the number of bits (excluding the sign) that can be represented directly in an object pointer
Answer the largest integer represented directly in an object pointer
Answer the smallest integer represented directly in an object pointer
Next: SmallInteger-bit arithmetic, Previous: SmallInteger class-getting limits, Up: SmallInteger [Index]
Answer whether x = y implies x == y for instances of the receiver
Next: SmallInteger-built ins, Previous: SmallInteger class-testing, Up: SmallInteger [Index]
Return the index of the highest order 1 bit of the receiver
Return the index of the lowest order 1 bit of the receiver.
Next: SmallInteger-builtins, Previous: SmallInteger-bit arithmetic, Up: SmallInteger [Index]
Multiply the receiver and arg and answer another Number
Sum the receiver and arg and answer another Number
Subtract arg from the receiver and answer another Number
Divide the receiver by arg and answer another Integer or Fraction
Dividing receiver by arg (with truncation towards -infinity) and answer the result
Answer whether the receiver is less than arg
Answer whether the receiver is less than or equal to arg
Answer whether the receiver is equal to arg
Answer whether the receiver is the same object as arg
Answer whether the receiver is greater than arg
Answer whether the receiver is greater than or equal to arg
Calculate the remainder of dividing receiver by arg (with truncation towards -infinity) and answer it
Convert the receiver to a FloatD, answer the result
Convert the receiver to a FloatE, answer the result
Convert the receiver to a FloatQ, answer the result
Answer the object whose index is in the receiver, nil if there is a free object, fail if index is out of bounds
Answer the object whose index is in the receiver, or nil if no object is found at that index
Do a bitwise AND between the receiver and arg, answer the result
Do a bitwise OR between the receiver and arg, answer the result
Shift the receiver by arg places to the left if arg > 0, by arg places to the right if arg < 0, answer another Number
Do a bitwise XOR between the receiver and arg, answer the result
Dividing receiver by arg assuming that the remainder is zero, and answer the result
Answer the index of the first non-free OOP after the receiver. This is used internally; it is placed here to avoid polluting Object.
Dividing receiver by arg (with truncation towards zero) and answer the result
Answer whether the receiver is not equal to arg
Answer whether the receiver is not the same object as arg
Next: SmallInteger-coercion, Previous: SmallInteger-built ins, Up: SmallInteger [Index]
Answer the index-th indexed instance variable of the receiver. This method always fails.
Store value in the index-th indexed instance variable of the receiver This method always fails.
Answer the index-th indexed instance variable of the receiver. This method always fails.
Store value in the index-th indexed instance variable of the receiver This method always fails.
Answer the receiver with its bits mixed and matched.
Next: SmallInteger-coercion methods, Previous: SmallInteger-builtins, Up: SmallInteger [Index]
Convert the receiver to a kind of number that is understood by the C call-out mechanism.
Next: SmallInteger-testing functionality, Previous: SmallInteger-coercion, Up: SmallInteger [Index]
Return the receiver’s generality
Coerce 1 to the receiver’s class
Coerce 0 to the receiver’s class
Previous: SmallInteger-coercion methods, Up: SmallInteger [Index]
Answer ‘true’.
Next: Stream, Previous: SmallInteger, Up: Base classes [Index]
I am a collection of objects, stored and accessed according to some sorting criteria. I store things using heap sort and quick sort. My instances have a comparison block associated with them; this block takes two arguments and is a predicate which returns true if the first argument should be sorted earlier than the second. The default block is [ :a :b | a <= b ], but I will accept any block that conforms to the above criteria – actually any object which responds to #value:value:.
• SortedCollection class-hacking: | (class) | |
• SortedCollection class-instance creation: | (class) | |
• SortedCollection-basic: | (instance) | |
• SortedCollection-copying: | (instance) | |
• SortedCollection-disabled: | (instance) | |
• SortedCollection-enumerating: | (instance) | |
• SortedCollection-saving and loading: | (instance) | |
• SortedCollection-searching: | (instance) | |
• SortedCollection-sorting: | (instance) |
Answer a default sort block for the receiver.
Next: SortedCollection-basic, Previous: SortedCollection class-hacking, Up: SortedCollection [Index]
Answer a new collection with a default size and sort block
Answer a new collection with a default sort block and the given size
Answer a new collection with a default size and the given sort block
Next: SortedCollection-copying, Previous: SortedCollection class-instance creation, Up: SortedCollection [Index]
Answer the last item of the receiver
Remove an object from the end of the receiver. Fail if the receiver is empty
Answer the receiver’s sort criteria
Change the sort criteria for a sorted collection, resort the elements of the collection, and return it.
Next: SortedCollection-disabled, Previous: SortedCollection-basic, Up: SortedCollection [Index]
Answer an empty copy of the receiver, with the same sort block as the receiver
Next: SortedCollection-enumerating, Previous: SortedCollection-copying, Up: SortedCollection [Index]
This method should not be called for instances of this class.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
Next: SortedCollection-saving and loading, Previous: SortedCollection-disabled, Up: SortedCollection [Index]
Prepare the receiver to be walked through with #do: or another enumeration method.
Next: SortedCollection-searching, Previous: SortedCollection-enumerating, Up: SortedCollection [Index]
Restore the default sortBlock if it is nil
Store the default sortBlock as nil
Next: SortedCollection-sorting, Previous: SortedCollection-saving and loading, Up: SortedCollection [Index]
Private - Answer whether the receiver includes an item which is equal to anObject
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Answer how many occurrences of anObject can be found in the receiver
Previous: SortedCollection-searching, Up: SortedCollection [Index]
Sort the contents of the receiver according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one. Fails if the collections’s sort block is not the same as the default sort block.
Sort the contents of the receiver according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one. Fails if the sort block is not the same as the collection’s sort block.
Next: String, Previous: SortedCollection, Up: Base classes [Index]
I am an abstract class that provides interruptable sequential access to objects. I can return successive objects from a source, or accept successive objects and store them sequentially on a sink. I provide some simple iteration over the contents of one of my instances, and provide for writing collections sequentially.
• Stream-accessing-reading: | (instance) | |
• Stream-accessing-writing: | (instance) | |
• Stream-basic: | (instance) | |
• Stream-buffering: | (instance) | |
• Stream-built ins: | (instance) | |
• Stream-character writing: | (instance) | |
• Stream-compiling: | (instance) | |
• Stream-concatenating: | (instance) | |
• Stream-enumerating: | (instance) | |
• Stream-filing out: | (instance) | |
• Stream-filtering: | (instance) | |
• Stream-polymorphism: | (instance) | |
• Stream-positioning: | (instance) | |
• Stream-printing: | (instance) | |
• Stream-still unclassified: | (instance) | |
• Stream-storing: | (instance) | |
• Stream-streaming protocol: | (instance) | |
• Stream-testing: | (instance) |
Next: Stream-accessing-writing, Up: Stream [Index]
Answer the whole contents of the receiver, from the next object to the last
Return nil by default; not all streams have a file.
Return nil by default; not all streams have a name.
Return the next object in the receiver
Return the next anInteger objects in the receiver
Return up to anInteger objects in the receiver. Besides stopping if the end of the stream is reached, this may return less than this number of bytes for various reasons. For example, on files and sockets this operation could be non-blocking, or could do at most one I/O operation.
Place the next anInteger objects from the receiver into aCollection, starting at position pos. Return the number of items stored. Besides stopping if the end of the stream is reached, this may return less than this number of bytes for various reasons. For example, on files and sockets this operation could be non-blocking, or could do at most one I/O operation.
Copy up to anInteger objects in the receiver to aStream. Besides stopping if the end of the stream is reached, this may return less than this number of bytes for various reasons. For example, on files and sockets this operation could be non-blocking, or could do at most one I/O operation.
Returns a collection of the same type that the stream accesses, containing the next line up to the next new-line character. Returns the entire rest of the stream’s contents if no new-line character is found.
Answer whether the next object is equal to anObject. Even if it does not, anObject is lost
Answer an OrderedCollection of parts of the receiver. A new (possibly empty) part starts at the start of the receiver, or after every occurrence of an object which is equal to anObject (as compared by #=).
Returns a collection of the same type that the stream accesses, up to but not including the object anObject. Returns the entire rest of the stream’s contents if anObject is not present.
If there is a sequence of objects remaining in the stream that is equal to the sequence in aCollection, set the stream position just past that sequence and answer the elements up to, but not including, the sequence. Else, set the stream position to its end and answer all the remaining elements.
Answer every item in the collection on which the receiver is streaming, from the next one to the last
Next: Stream-basic, Previous: Stream-accessing-reading, Up: Stream [Index]
Write anInteger copies of anObject to the receiver
Write n objects to the stream, reading them from aCollection and starting at the start-th item.
Write anObject to the receiver
Write all the objects in aCollection to the receiver
Put all the elements of aCollection in the stream, then flush the buffers if supported by the stream.
Next: Stream-buffering, Previous: Stream-accessing-writing, Up: Stream [Index]
Answer ‘Array’.
Next: Stream-built ins, Previous: Stream-basic, Up: Stream [Index]
Read up to anInteger bytes from the stream and store them into answer. Return the number of bytes that were read, raising an exception if we could not read the full amount of data.
Read up to anInteger bytes from the stream and store them into aStream. Return the number of bytes that were read, raising an exception if we could not read the full amount of data.
Next: Stream-character writing, Previous: Stream-buffering, Up: Stream [Index]
File in the contents of the receiver. During a file in operation, global variables (starting with an uppercase letter) that are not declared don’t yield an ‘unknown variable’ error. Instead, they are defined as nil in the ‘Undeclared’ dictionary (a global variable residing in Smalltalk). As soon as you add the variable to a namespace (for example by creating a class) the Association will be removed from Undeclared and reused in the namespace, so that the old references will automagically point to the new value.
Private - Much like a preprocessor #line directive; it is used internally by #fileIn, and explicitly by the Emacs Smalltalk mode.
Private - Much like a preprocessor #line directive; it is used internally by #fileIn, and explicitly by the Emacs Smalltalk mode.
Next: Stream-compiling, Previous: Stream-built ins, Up: Stream [Index]
Store a cr on the receiver
Store a cr and a tab on the receiver
Answer the encoding to be used when storing Unicode characters.
Answer whether the receiver is able to store Unicode characters. Note that if this method returns true, the stream may or may not be able to store Characters (as opposed to UnicodeCharacters) whose value is above 127.
Store a new line on the receiver
Store a new line and a tab on the receiver
Store a space on the receiver
Store n spaces on the receiver
Store a tab on the receiver
Store n tabs on the receiver
Next: Stream-concatenating, Previous: Stream-character writing, Up: Stream [Index]
Answer an object that, when sent #asString, will yield the result of sending ‘copyFrom: startPos to: endPos’ to the receiver
Next: Stream-enumerating, Previous: Stream-compiling, Up: Stream [Index]
Return a new Stream whose elements are 2-element Arrays, including one element from the receiver and one from aStream.
Return a new Stream whose elements are 3-element Arrays, including one element from the receiver and one from each argument.
Return a new Stream whose elements are 3-element Arrays, including one element from the receiver and one from each argument.
Next: Stream-filing out, Previous: Stream-concatenating, Up: Stream [Index]
Evaluate aBlock once for every object in the receiver
Evaluate aBlock once for every line in the receiver (assuming the receiver is streaming on Characters).
Next: Stream-filtering, Previous: Stream-enumerating, Up: Stream [Index]
File out aClass on the receiver. If aClass is not a metaclass, file out class and instance methods; if aClass is a metaclass, file out only the class methods
Next: Stream-polymorphism, Previous: Stream-filing out, Up: Stream [Index]
Answer a new stream that concatenates the data in the receiver with the data in aStream. Both the receiver and aStream should be readable.
Answer a new stream that will pass the returned objects through aBlock, and return whatever object is returned by aBlock instead. Note that when peeking in the returned stream, the block will be invoked multiple times, with possibly surprising results.
Answer a new stream that answers lines from the receiver.
Returns the next element of the stream without moving the pointer. Returns nil when at end of stream. Lookahead is implemented automatically for streams that are not positionable but can be copied.
Returns true and gobbles the next element from the stream of it is equal to anObject, returns false and doesn’t gobble the next element if the next element is not equal to anObject. Lookahead is implemented automatically for streams that are not positionable but can be copied.
Answer a new stream that only returns those objects for which aBlock returns false. Note that the returned stream will not be positionable.
Answer a new stream that only returns those objects for which aBlock returns true. Note that the returned stream will not be positionable.
Next: Stream-positioning, Previous: Stream-filtering, Up: Stream [Index]
Do nothing. This is provided for consistency with file streams
Do nothing. This is provided for consistency with file streams
The end of the stream has been reached. Signal a Notification.
Next: Stream-printing, Previous: Stream-polymorphism, Up: Stream [Index]
Answer true if the stream supports moving backwards with #skip:.
Move the position forwards by anInteger places
Advance the receiver until we find a character that is not a separator. Answer false if we reach the end of the stream, else answer true; in this case, sending #next will return the first non-separator character (possibly the same to which the stream pointed before #skipSeparators was sent).
Move the current position to after the next occurrence of anObject and return true if anObject was found. If anObject doesn’t exist, the pointer is atEnd, and false is returned.
If there is a sequence of objects remaining in the stream that is equal to the sequence in aCollection, set the stream position just past that sequence and answer true. Else, set the stream position to its end and answer false.
Next: Stream-still unclassified, Previous: Stream-positioning, Up: Stream [Index]
This method is a short-cut for #display:; it prints anObject on the receiver by sending displayOn: to anObject. This method is provided so that you can use cascading and obtain better-looking code
Print anObject on the receiver by sending displayOn: to anObject. This method is provided so that you can use cascading and obtain better-looking code
Print anObject on the receiver by sending printOn: to anObject. This method is provided so that you can use cascading and obtain better-looking code
Next: Stream-storing, Previous: Stream-printing, Up: Stream [Index]
Write all the objects in the receiver to aStream
Next: Stream-streaming protocol, Previous: Stream-still unclassified, Up: Stream [Index]
Print Smalltalk code compiling to anObject on the receiver, by sending storeOn: to anObject. This method is provided so that you can use cascading and obtain better-looking code
Next: Stream-testing, Previous: Stream-storing, Up: Stream [Index]
Copy to aStream a more-or-less arbitrary amount of data. When used on files, this does at most one I/O operation. For other kinds of stream, the definition may vary. This method is used to do stream-to-stream copies.
Previous: Stream-streaming protocol, Up: Stream [Index]
Answer whether the stream has got to an end
Answer whether the receiver streams on a file or socket. By default, answer false.
Answer whether the receiver can be accessed by a numeric index with #at:/#at:put:.
As a wild guess, return the receiver. WriteStreams should override this method.
Next: Symbol, Previous: Stream, Up: Base classes [Index]
My instances represent 8-bit character strings. Being a very common case, they are particularly optimized.
Note that, if you care about multilingualization, you should treat String only as an encoded representation of a UnicodeString. The I18N package adds more Unicode-friendliness to the system so that encoding and decoding is performed automatically in more cases. In that case, String represents a case when the encoding is either unknown, irrelevant, or assumed to be the system default.
• String class-instance creation: | (class) | |
• String class-multibyte encodings: | (class) | |
• String-accessing: | (instance) | |
• String-basic: | (instance) | |
• String-built ins: | (instance) | |
• String-CObject: | (instance) | |
• String-converting: | (instance) | |
• String-filesystem: | (instance) | |
• String-printing: | (instance) | |
• String-regex: | (instance) | |
• String-still unclassified: | (instance) | |
• String-testing functionality: | (instance) |
Next: String class-multibyte encodings, Up: String [Index]
Answer a String containing the bytes starting at the location pointed to by aCObject, up to the first NUL character.
Answer a String containing anInteger bytes starting at the location pointed to by aCObject
Next: String-accessing, Previous: String class-instance creation, Up: String [Index]
Answer false; the receiver stores bytes (i.e. an encoded form), not characters.
Next: String-basic, Previous: String class-multibyte encodings, Up: String [Index]
Answer the ascii value of index-th character variable of the receiver
Store (Character value: value) in the index-th indexed instance variable of the receiver
Next: String-built ins, Previous: String-accessing, Up: String [Index]
Answer a new instance of an ArrayedCollection containing all the elements in the receiver, followed by all the elements in aSequenceableCollection
Answer whether the receiver’s items match those in aCollection
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Answer the first index > anIndex which contains anElement. Invoke exceptionBlock and answer its result if no item is found
Next: String-CObject, Previous: String-basic, Up: String [Index]
Allocate memory with malloc for a NULL-terminated copy of the receiver, and return a pointer to it as a CObject of the given type.
Answer the index-th indexed instance variable of the receiver
Answer the index-th indexed instance variable of the receiver
Store value in the index-th indexed instance variable of the receiver
Answer the index-th indexed instance variable of the receiver. This method must not be overridden, override at: instead
Store value in the index-th indexed instance variable of the receiver This method must not be overridden, override at:put: instead
Answer an hash value for the receiver
Replace the characters from start to stop with new characters whose ASCII codes are contained in aString, starting at the replaceStart location of aString
Replace the characters from start to stop with new characters whose ASCII codes are contained in byteArray, starting at the replaceStart location of byteArray
Answer a number that denotes the similarity between aString and the receiver. 0 indicates equality, negative numbers indicate some difference. Implemented as a primitive for speed.
Answer the size of the receiver
Next: String-converting, Previous: String-built ins, Up: String [Index]
Allocate memory with malloc for a NULL-terminated copy of the receiver, and return a pointer to it as a CChar.
Next: String-filesystem, Previous: String-CObject, Up: String [Index]
Return the receiver, converted to a ByteArray of ASCII values
But I already am a String! Really!
Returns the symbol corresponding to the receiver
Answer the encoding of the receiver. This is not implemented unless you load the Iconv package.
Next: String-printing, Previous: String-converting, Up: String [Index]
Answer a File object as appropriate for a file named ’aName’ in the directory represented by the receiver.
Answer a File object for the file whose name is in the receiver.
Next: String-regex, Previous: String-filesystem, Up: String [Index]
Print a representation of the receiver on aStream. Unlike #printOn:, this method strips extra quotes.
Answer a String representing the receiver. For most objects this is simply its #printString, but for CharacterArrays and characters, superfluous dollars or extra pair of quotes are stripped.
Answer whether the receiver is expressible as a Smalltalk literal.
Print a representation of the receiver on aStream
Store a Smalltalk literal compiling to the receiver on aStream
Store Smalltalk code compiling to the receiver on aStream
Next: String-still unclassified, Previous: String-printing, Up: String [Index]
Answer a RegexResults object for matching the receiver against the Regex or String object pattern.
Find all the matches of pattern within the receiver and collect them into an OrderedCollection.
Find all the matches of pattern within the receiver and pass the RegexResults objects to aBlock.
Find all the matches of pattern within the receiver and within the given range of indices. Collect them into an OrderedCollection, which is then returned.
Find all the matches of pattern within the receiver and within the given range of indices. For each match, pass the RegexResults object to aBlock.
Answer the receiver, converted to a Regex object.
Returns the substring of the receiver between from and to. Any match of pattern in that part of the string is replaced using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
Returns the substring of the receiver between from and to. If pattern has a match in that part of the string, the match is replaced using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
Returns the receiver after replacing all the matches of pattern (if any) using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
Returns the receiver after replacing the first match of pattern (if any) using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match. Otherwise return nil.
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match occurring within the given range of indices. Otherwise return nil.
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match occurring within the given indices. Otherwise, evaluate excBlock and return the result.
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match. Otherwise, evaluate excBlock and return the result.
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match starting after the given index. Otherwise return nil.
If an occurrence of the regex is present in the receiver, return the Interval corresponding to the leftmost-longest match starting after the given index. Otherwise, evaluate excBlock and return the result.
Answer whether the receiver is an exact match for the pattern. This means that the pattern is implicitly anchored at the beginning and the end.
Answer whether the given range of indices is an exact match for the pattern. This means that there is a match starting at from and ending at to (which is not necessarily the longest match starting at from).
Returns count of how many times pattern repeats in the receiver.
Return a count of how many times pattern repeats in the receiver within the given range of index.
Returns count of how many times pattern repeats in the receiver, starting the search at the given index.
Find all the matches of pattern within the receiver and, for each match, pass the RegexResults object to aBlock.
Find all the matches of pattern within the receiver and within the given range of indices. For each match, pass the RegexResults object to aBlock.
Returns the receiver if the pattern has no match in it. Otherwise, any match of pattern in that part of the string is replaced using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
Returns the receiver if the pattern has no match in it. If it has a match, it is replaced using aStringOrBlock as follows: if it is a block, a RegexResults object is passed, while if it is a string, %n sequences are replaced with the captured subexpressions of the match (as in #%).
A synonym for #=~. Answer a RegexResults object for matching the receiver against the Regex or String object pattern.
Answer a RegexResults object for matching the receiver against the Regex or String object pattern, restricting the match to the specified range of indices.
Answer a RegexResults object for matching the receiver against the Regex or String object pattern, starting the match at index anIndex.
Split the receiver at every occurrence of pattern. All parts that do not match pattern are separated and stored into an Array of Strings that is returned.
Split the receiver at every occurrence of pattern (considering only the indices between from and to). All parts that do not match pattern are separated and stored into an Array of Strings that is returned.
Answer whether the receiver matched against the Regex or String object pattern.
Next: String-testing functionality, Previous: String-regex, Up: String [Index]
Answer the receiver with all regex special characters escaped by a backslash.
Previous: String-still unclassified, Up: String [Index]
Answer ‘true’.
Next: SymLink, Previous: String, Up: Base classes [Index]
My instances are unique throughout the Smalltalk system. My instances behave for the most part like strings, except that they print differently, and I guarantee that any two instances that have the same printed representation are in fact the same instance.
• Symbol class-built ins: | (class) | |
• Symbol class-instance creation: | (class) | |
• Symbol class-symbol table: | (class) | |
• Symbol-accessing the method dictionary: | (instance) | |
• Symbol-basic: | (instance) | |
• Symbol-built ins: | (instance) | |
• Symbol-converting: | (instance) | |
• Symbol-misc: | (instance) | |
• Symbol-storing: | (instance) | |
• Symbol-testing: | (instance) | |
• Symbol-testing functionality: | (instance) |
Next: Symbol class-instance creation, Up: Symbol [Index]
Private - Same as ’aString asSymbol’
Next: Symbol class-symbol table, Previous: Symbol class-built ins, Up: Symbol [Index]
Answer the one-character symbol associated to the given character.
This method should not be called for instances of this class.
This method should not be called for instances of this class.
Answer a collection whose only element is element1
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Answer a collection whose only elements are the parameters in the order they were passed
Next: Symbol-accessing the method dictionary, Previous: Symbol class-instance creation, Up: Symbol [Index]
If aString has not been interned yet, answer false. Else, pass the interned version to aBlock and answer true. Note that this works because String>>#hash calculates the same hash value used by the VM when interning strings into the SymbolTable. Changing one of the hashing methods without changing the other will break this method.
Answer whether aString has already been interned. Note that this works because String>>#hash calculates the same hash value used by the VM when interning strings into the SymbolTable. Changing one of the hashing methods without changing the other will break this method.
Rebuild the SymbolTable, thereby garbage-collecting unreferenced Symbols. While this process is done, preemption is disabled because it is not acceptable to leave the SymbolTable in a partially updated state. Note that this works because String>>#hash calculates the same hash value used by the VM when interning strings into the SymbolTable. Changing one of the hashing methods without changing the other will break this method.
Next: Symbol-basic, Previous: Symbol class-symbol table, Up: Symbol [Index]
Answer a Set of all the compiled method associated with selector named by the receiver, which is supposed to be a valid message name.
Next: Symbol-built ins, Previous: Symbol-accessing the method dictionary, Up: Symbol [Index]
Returns a deep copy of the receiver. As Symbols are identity objects, we actually return the receiver itself.
Answer an array of keywords that compose the receiver, which is supposed to be a valid message name (#+, #not, #printOn:, #ifTrue:ifFalse:, etc.)
Answer the number of arguments supported by the receiver, which is supposed to be a valid message name (#+, #not, #printOn:, #ifTrue:ifFalse:, etc.)
Returns a deep copy of the receiver. As Symbols are identity objects, we actually return the receiver itself.
Next: Symbol-converting, Previous: Symbol-basic, Up: Symbol [Index]
Answer whether the receiver and aSymbol are the same object
Answer an hash value for the receiver. Symbols are optimized for speed
Next: Symbol-misc, Previous: Symbol-built ins, Up: Symbol [Index]
Answer a String with the same characters as the receiver
But we are already a Symbol, and furthermore, Symbols are identity objects! So answer the receiver.
Next: Symbol-storing, Previous: Symbol-converting, Up: Symbol [Index]
Answer ‘String’.
Next: Symbol-testing, Previous: Symbol-misc, Up: Symbol [Index]
Print a represention of the receiver on aStream. For most objects this is simply its #printOn: representation, but for strings and characters, superfluous dollars or extra pairs of quotes are stripped.
Answer a String representing the receiver. For most objects this is simply its #printString, but for strings and characters, superfluous dollars or extra pair of quotes are stripped.
Print a represention of the receiver on aStream.
Print Smalltalk code on aStream that compiles to the same symbol as the receiver.
Print Smalltalk code on aStream that compiles to the same symbol as the receiver.
Next: Symbol-testing functionality, Previous: Symbol-storing, Up: Symbol [Index]
Answer whether the receiver must be represented in quoted-string (e.g. #’abc-def’) form.
Previous: Symbol-testing, Up: Symbol [Index]
Answer ‘false’.
Answer ‘true’.
Next: SystemDictionary, Previous: Symbol, Up: Base classes [Index]
I am used to implement the Smalltalk symbol table. My instances are links that contain symbols, and the symbol table basically a hash table that points to chains of my instances.
• SymLink class-instance creation: | (class) | |
• SymLink-accessing: | (instance) | |
• SymLink-iteration: | (instance) | |
• SymLink-printing: | (instance) |
Next: SymLink-accessing, Up: SymLink [Index]
Answer a new SymLink, which refers to aSymbol and points to aSymLink as the next SymLink in the chain.
Next: SymLink-iteration, Previous: SymLink class-instance creation, Up: SymLink [Index]
Answer the Symbol that the receiver refers to in the symbol table.
Set the Symbol that the receiver refers to in the symbol table.
Next: SymLink-printing, Previous: SymLink-accessing, Up: SymLink [Index]
Evaluate aBlock for each symbol in the list
Previous: SymLink-iteration, Up: SymLink [Index]
Print a representation of the receiver on aStream.
Next: SystemExceptions.AlreadyDefined, Previous: SymLink, Up: Base classes [Index]
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-initialization: | (class) | |
• SystemDictionary-basic: | (instance) | |
• SystemDictionary-builtins: | (instance) | |
• SystemDictionary-c call-outs: | (instance) | |
• SystemDictionary-command-line: | (instance) | |
• SystemDictionary-miscellaneous: | (instance) | |
• SystemDictionary-printing: | (instance) | |
• SystemDictionary-profiling: | (instance) | |
• SystemDictionary-special accessing: | (instance) | |
• SystemDictionary-testing: | (instance) |
Next: SystemDictionary-basic, Up: SystemDictionary [Index]
Create the kernel’s private namespace.
Next: SystemDictionary-builtins, Previous: SystemDictionary class-initialization, Up: SystemDictionary [Index]
Interrupt interpreter
Smalltalk usually contains a reference to itself, avoid infinite loops
Next: SystemDictionary-c call-outs, Previous: SystemDictionary-basic, Up: SystemDictionary [Index]
Prints the method invocation stack backtrace, as an aid to debugging
Answer the number of bytecodes executed by the VM
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.
Answer whether compiled bytecodes are printed on stdout
Set whether compiled bytecodes are printed on stdout
Answer whether executed bytecodes are printed on stdout
Set whether executed bytecodes are printed on stdout
Private - Returns a boolean value which is one of the interpreter’s tracing flags
Private - Sets the value of one of the interpreter’s tracing flags (indicated by ’anIndex’) to the value aBoolean.
Answer whether execution tracing prints the object on the stack top
Set whether execution tracing prints the object on the stack top
Next: SystemDictionary-command-line, Previous: SystemDictionary-builtins, Up: SystemDictionary [Index]
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Not commented.
Next: SystemDictionary-miscellaneous, Previous: SystemDictionary-c call-outs, Up: SystemDictionary [Index]
Parse the command-line arguments according to the syntax specified in pattern. For every command-line option found, the two-argument block actionBlock is evaluated passing the option name and the argument. For file names (or in general, other command-line arguments than options) the block’s first argument will be nil. For options without arguments, or with unspecified optional arguments, the block’s second argument will be nil. The option name will be passed as a character object for short options, and as a string for long options.
If an error is found, nil is returned. For more information on the syntax of pattern, see #arguments:do:ifError:.
Parse the command-line arguments according to the syntax specified in pattern. For every command-line option found, the two-argument block actionBlock is evaluated passing the option name and the argument. For file names (or in general, other command-line arguments than options) the block’s first argument will be nil. For options without arguments, or with unspecified optional arguments, the block’s second argument will be nil. The option name will be passed as a character object for short options, and as a string for long options.
If an error is found, the parsing is interrupted, errorBlock is evaluated, and the returned value is answered.
Every whitespace-separated part (‘word’) of pattern specifies a command-line option. If a word ends with a colon, the option will have a mandatory argument. If a word ends with two colons, the option will have an optional argument. Before the colons, multiple option names (either short names like ‘-l’ or long names like ‘–long’) can be specified. Before passing the option to actionBlock, the name will be canonicalized to the last one.
Prefixes of long options are accepted as long as they’re unique, and they are canonicalized to the full name before passing it to actionBlock. Additionally, the full name of an option is accepted even if it is the prefix of a longer option.
Mandatory arguments can appear in the next argument, or in the same argument (separated by an = for arguments to long options). Optional arguments must appear in the same argument.
Next: SystemDictionary-printing, Previous: SystemDictionary-command-line, Up: SystemDictionary [Index]
Return the command line arguments after the -a switch
Print a backtrace on the Transcript.
Answer the triplet corresponding to the system for which GNU Smalltalk was built.
Next: SystemDictionary-profiling, Previous: SystemDictionary-miscellaneous, Up: SystemDictionary [Index]
Answer ‘’Smalltalk”.
Store Smalltalk code compiling to the receiver
Store Smalltalk code compiling to the receiver
Next: SystemDictionary-special accessing, Previous: SystemDictionary-printing, Up: SystemDictionary [Index]
Set the raw profile to be anIdentityDictionary and return the old one.
Next: SystemDictionary-testing, Previous: SystemDictionary-profiling, Up: SystemDictionary [Index]
Add the aFeature feature to the Features set
Returns true if the feature or features in ’features’ is one of the implementation dependent features present
Remove the aFeature feature to the Features set
Answer the current version of the GNU Smalltalk environment
Previous: SystemDictionary-special accessing, Up: SystemDictionary [Index]
Answer whether the kernel directory is a subdirectory of the image directory (non-local image) or not.
Answer ‘true’.
Next: SystemExceptions.ArgumentOutOfRange, Previous: SystemDictionary, Up: Base classes [Index]
I am raised when one tries to define a symbol (class or pool variable) that is already defined.
• SystemExceptions.AlreadyDefined-accessing: | (instance) |
Answer a description for the error
Next: SystemExceptions.BadReturn, Previous: SystemExceptions.AlreadyDefined, Up: Base classes [Index]
I am raised when one invokes a method with an argument outside of its valid range.
• SystemExceptions.ArgumentOutOfRange class-signaling: | (class) | |
• SystemExceptions.ArgumentOutOfRange-accessing: | (instance) |
Next: SystemExceptions.ArgumentOutOfRange-accessing, Up: SystemExceptions.ArgumentOutOfRange [Index]
Raise the exception. The given value was not between low and high.
Previous: SystemExceptions.ArgumentOutOfRange class-signaling, Up: SystemExceptions.ArgumentOutOfRange [Index]
Answer a textual description of the exception.
Answer the highest value that was permitted.
Set the highest value that was permitted.
Answer the lowest value that was permitted.
Set the lowest value that was permitted.
Next: SystemExceptions.CInterfaceError, Previous: SystemExceptions.ArgumentOutOfRange, Up: Base classes [Index]
I am raised when one tries to return from an already-terminated method.
• SystemExceptions.BadReturn-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.EmptyCollection, Previous: SystemExceptions.BadReturn, Up: Base classes [Index]
I am raised when an error happens that is related to the C interface.
• SystemExceptions.CInterfaceError-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.EndOfStream, Previous: SystemExceptions.CInterfaceError, Up: Base classes [Index]
I am raised when one invokes a method on an empty collection.
• SystemExceptions.EmptyCollection-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.FileError, Previous: SystemExceptions.EmptyCollection, Up: Base classes [Index]
I am raised when a stream reaches its end.
• SystemExceptions.EndOfStream class-signaling: | (class) | |
• SystemExceptions.EndOfStream-accessing: | (instance) |
Answer an exception reporting the parameter has reached its end.
Answer a textual description of the exception.
Answer the stream whose end was reached.
Set the stream whose end was reached.
Next: SystemExceptions.IndexOutOfRange, Previous: SystemExceptions.EndOfStream, Up: Base classes [Index]
I am raised when an error happens that is related to the file system.
• SystemExceptions.FileError-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.InvalidArgument, Previous: SystemExceptions.FileError, Up: Base classes [Index]
I am raised when one invokes am accessor method with an index outside of its valid range.
• SystemExceptions.IndexOutOfRange class-signaling: | (class) | |
• SystemExceptions.IndexOutOfRange-accessing: | (instance) |
The given index was out of range in aCollection.
Previous: SystemExceptions.IndexOutOfRange class-signaling, Up: SystemExceptions.IndexOutOfRange [Index]
Answer the collection that triggered the error
Set the collection that triggered the error
Answer a textual description of the exception.
Answer an exception’s message text.
Next: SystemExceptions.InvalidProcessState, Previous: SystemExceptions.IndexOutOfRange, Up: Base classes [Index]
I am raised when one invokes a method with an invalid argument.
• SystemExceptions.InvalidArgument-accessing: | (instance) |
Answer an exception’s message text.
Next: SystemExceptions.InvalidSize, Previous: SystemExceptions.InvalidArgument, Up: Base classes [Index]
I am an error raised when trying to resume a terminated process, or stuff like that.
• SystemExceptions.InvalidProcessState-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.InvalidState, Previous: SystemExceptions.InvalidProcessState, Up: Base classes [Index]
I am raised when an argument has an invalid size.
• SystemExceptions.InvalidSize-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.InvalidValue, Previous: SystemExceptions.InvalidSize, Up: Base classes [Index]
I am raised when one invokes a method and the receiver or an argument are in an invalid state for the method.
• SystemExceptions.InvalidState-accessing: | (instance) |
Answer an exception’s message text.
Next: SystemExceptions.MustBeBoolean, Previous: SystemExceptions.InvalidState, Up: Base classes [Index]
I am raised when one invokes a method with an invalid receiver or argument.
• SystemExceptions.InvalidValue class-signaling: | (class) | |
• SystemExceptions.InvalidValue-accessing: | (instance) |
Answer an exception reporting the parameter as invalid.
Answer an exception reporting ‘value’ as invalid, for the given reason.
Answer a textual description of the exception.
Answer an exception’s message text.
Answer the object that was found to be invalid.
Set the object that was found to be invalid.
Next: SystemExceptions.MutationError, Previous: SystemExceptions.InvalidValue, Up: Base classes [Index]
I am raised when one invokes a boolean method on a non-boolean.
• SystemExceptions.MustBeBoolean class-signaling: | (class) |
Signal a new exception, with the bad value in question being anObject.
Next: SystemExceptions.NoRunnableProcess, Previous: SystemExceptions.MustBeBoolean, Up: Base classes [Index]
I am an error raised when a class is mutated in an invalid way.
• SystemExceptions.MutationError class-instance creation: | (class) | |
• SystemExceptions.MutationError-accessing: | (instance) |
Create an instance of the receiver, which you will be able to signal later.
Previous: SystemExceptions.MutationError class-instance creation, Up: SystemExceptions.MutationError [Index]
Answer a textual description of the exception.
Next: SystemExceptions.NotEnoughElements, Previous: SystemExceptions.MutationError, Up: Base classes [Index]
I am raised when no runnable process can be found in the image.
• SystemExceptions.NoRunnableProcess-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.NotFound, Previous: SystemExceptions.NoRunnableProcess, Up: Base classes [Index]
I am raised when one invokes #next: but not enough items remain in the stream.
• SystemExceptions.NotEnoughElements class-signaling: | (class) | |
• SystemExceptions.NotEnoughElements-accessing: | (instance) |
Answer an exception reporting the parameter as invalid.
Previous: SystemExceptions.NotEnoughElements class-signaling, Up: SystemExceptions.NotEnoughElements [Index]
Answer a textual description of the exception.
Answer an exception’s message text.
Answer the number of items that were to be read.
Set the number of items that were to be read.
Next: SystemExceptions.NotImplemented, Previous: SystemExceptions.NotEnoughElements, Up: Base classes [Index]
I am raised when something is searched without success.
• SystemExceptions.NotFound class-accessing: | (class) | |
• SystemExceptions.NotFound-accessing: | (instance) |
Raise an exception: reason specifies the reason of the exception.
Raise an exception; aString specifies what was not found (a key, an object, a class, and so on).
Previous: SystemExceptions.NotFound class-accessing, Up: SystemExceptions.NotFound [Index]
Answer a textual description of the exception.
Next: SystemExceptions.NotIndexable, Previous: SystemExceptions.NotFound, Up: Base classes [Index]
I am raised when a method is called that has not been implemented.
• SystemExceptions.NotImplemented-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.NotYetImplemented, Previous: SystemExceptions.NotImplemented, Up: Base classes [Index]
I am raised when an object is not indexable.
• SystemExceptions.NotIndexable-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.PackageNotAvailable, Previous: SystemExceptions.NotIndexable, Up: Base classes [Index]
I am raised when a method is called that has not been implemented yet.
• SystemExceptions.NotYetImplemented-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.PrimitiveFailed, Previous: SystemExceptions.NotYetImplemented, Up: Base classes [Index]
• SystemExceptions.PackageNotAvailable class-still unclassified: | (class) | |
• SystemExceptions.PackageNotAvailable-description: | (instance) |
Next: SystemExceptions.PackageNotAvailable-description, Up: SystemExceptions.PackageNotAvailable [Index]
Signal an exception saying that the package named aString can’t be found.
Signal an exception saying that be package named package can’t be found because the reason named reason.
Previous: SystemExceptions.PackageNotAvailable class-still unclassified, Up: SystemExceptions.PackageNotAvailable [Index]
Answer true. Package unavailability is resumable, because the package files might just lie elsewhere.
Next: SystemExceptions.ProcessBeingTerminated, Previous: SystemExceptions.PackageNotAvailable, Up: Base classes [Index]
I am raised when a primitive fails for some reason.
• SystemExceptions.PrimitiveFailed-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.ProcessTerminated, Previous: SystemExceptions.PrimitiveFailed, Up: Base classes [Index]
I am raised when a process is terminated.
• SystemExceptions.ProcessBeingTerminated class-still unclassified: | (class) | |
• SystemExceptions.ProcessBeingTerminated-accessing: | (instance) |
Next: SystemExceptions.ProcessBeingTerminated-accessing, Up: SystemExceptions.ProcessBeingTerminated [Index]
Not commented.
Previous: SystemExceptions.ProcessBeingTerminated class-still unclassified, Up: SystemExceptions.ProcessBeingTerminated [Index]
Answer a textual description of the exception.
If the process was waiting on a semaphore, answer it.
If the process was waiting on a semaphore, answer it.
Next: SystemExceptions.ReadOnlyObject, Previous: SystemExceptions.ProcessBeingTerminated, Up: Base classes [Index]
I am raised when somebody tries to resume or interrupt a terminated process.
• SystemExceptions.ProcessTerminated-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.SecurityError, Previous: SystemExceptions.ProcessTerminated, Up: Base classes [Index]
I am raised when one writes to a read-only object.
• SystemExceptions.ReadOnlyObject-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.ShouldNotImplement, Previous: SystemExceptions.ReadOnlyObject, Up: Base classes [Index]
I am an error raised when an untrusted object tries to do an insecure operation.
• SystemExceptions.SecurityError class-accessing: | (class) | |
• SystemExceptions.SecurityError-accessing: | (instance) |
Raise the exception, setting to aPermission the permission that was tested and failed.
Previous: SystemExceptions.SecurityError class-accessing, Up: SystemExceptions.SecurityError [Index]
Answer a textual description of the exception.
Answer the permission that was tested and that failed.
Set which permission was tested and failed.
Next: SystemExceptions.SubclassResponsibility, Previous: SystemExceptions.SecurityError, Up: Base classes [Index]
I am raised when a method is called that a class wishes that is not called.
• SystemExceptions.ShouldNotImplement-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.UnhandledException, Previous: SystemExceptions.ShouldNotImplement, Up: Base classes [Index]
I am raised when a method is called whose implementation is the responsibility of concrete subclass.
• SystemExceptions.SubclassResponsibility-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.UserInterrupt, Previous: SystemExceptions.SubclassResponsibility, Up: Base classes [Index]
I am raised when a backtrace is shown to terminate the current process.
• SystemExceptions.UnhandledException-accessing: | (instance) |
Terminate the current process.
Answer a textual description of the exception.
Answer the uncaught exception.
Set the uncaught exception to anObject.
Next: SystemExceptions.VerificationError, Previous: SystemExceptions.UnhandledException, Up: Base classes [Index]
I am raised when one presses Ctrl-C.
• SystemExceptions.UserInterrupt-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.VMError, Previous: SystemExceptions.UserInterrupt, Up: Base classes [Index]
I am raised when the verification of a method fails.
• SystemExceptions.VerificationError-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.WrongArgumentCount, Previous: SystemExceptions.VerificationError, Up: Base classes [Index]
I am an error related to the innards of the system.
• SystemExceptions.VMError-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.WrongClass, Previous: SystemExceptions.VMError, Up: Base classes [Index]
I am raised when one tries to evaluate a method (via #perform:...) or a block but passes the wrong number of arguments.
• SystemExceptions.WrongArgumentCount-accessing: | (instance) |
Answer a textual description of the exception.
Next: SystemExceptions.WrongMessageSent, Previous: SystemExceptions.WrongArgumentCount, Up: Base classes [Index]
I am raised when an argument is constrained to be an instance of a determinate class, and this constraint is not respected by the caller.
• SystemExceptions.WrongClass class-signaling: | (class) | |
• SystemExceptions.WrongClass-accessing: | (instance) |
Raise an exception. The given object should have been an instance of one of the classes indicated by aClassOrArray (which should be a single class or an array of classes). Whether instances of subclasses are allowed should be clear from the context, though in general (i.e. with the exception of a few system messages) they should be.
Previous: SystemExceptions.WrongClass class-signaling, Up: SystemExceptions.WrongClass [Index]
Answer a textual description of the exception.
Answer an exception’s message text.
Answer the list of classes whose instances would have been valid.
Set the list of classes whose instances would have been valid.
Answer the list of classes whose instances would have been valid, formatted as a string.
Next: TextCollector, Previous: SystemExceptions.WrongClass, Up: Base classes [Index]
I am raised when a method is called that a class wishes that is not called. This exception also includes a suggestion on which message should be sent instead
• SystemExceptions.WrongMessageSent class-signaling: | (class) | |
• SystemExceptions.WrongMessageSent-accessing: | (instance) |
Raise an exception, signaling which selector was sent and suggesting a valid alternative.
Previous: SystemExceptions.WrongMessageSent class-signaling, Up: SystemExceptions.WrongMessageSent [Index]
Answer an exception’s message text.
Answer which selector was sent.
Set which selector was sent.
Answer a valid alternative to the selector that was used.
Set a valid alternative to the selector that was used.
Next: Time, Previous: SystemExceptions.WrongMessageSent, Up: Base classes [Index]
I am a thread-safe class that maps between standard Stream protocol and a single message to another object (its selector is pluggable and should roughly correspond to #nextPutAll:). I am, in fact, the class that implements the global Transcript object.
• TextCollector class-accessing: | (class) | |
• TextCollector-accessing: | (instance) | |
• TextCollector-printing: | (instance) | |
• TextCollector-set up: | (instance) | |
• TextCollector-storing: | (instance) |
Next: TextCollector-accessing, Up: TextCollector [Index]
Answer a new instance of the receiver, that uses the message identified by anAssociation to perform write operations. anAssociation’s key is the receiver, while its value is the selector.
This method should not be called for instances of this class.
Next: TextCollector-printing, Previous: TextCollector class-accessing, Up: TextCollector [Index]
Emit a new-line (carriage return) to the Transcript
Evaluate aBlock while holding the Transcript lock
Emit two new-lines. This method is present for compatibility with VisualWorks.
Write anInteger copies of anObject to the Transcript
Write aString to the Transcript
Emit aCharacter to the Transcript
Write aString to the Transcript
Write aString to the Transcript, followed by a new-line character
Write aString to the Transcript, preceded by a new-line character
Next: TextCollector-set up, Previous: TextCollector-accessing, Up: TextCollector [Index]
Print anObject’s representation to the Transcript
Print a representation of the receiver onto aStream
Next: TextCollector-storing, Previous: TextCollector-printing, Up: TextCollector [Index]
Answer an association representing the message to be sent to perform write operations. The key is the receiver, the value is the selector
Set the message to be sent to perform write operations to the one represented by anAssociation. anAssociation’s key is the receiver, while its value is the selector
Previous: TextCollector-set up, Up: TextCollector [Index]
Print Smalltalk code which evaluates to anObject on the Transcript
Print Smalltalk code which evaluates to the receiver onto aStream
Next: True, Previous: TextCollector, Up: Base classes [Index]
My instances represent times of the day. I provide methods for instance creation, methods that access components (hours, minutes, and seconds) of a time value, and a block execution timing facility.
• Time class-basic (UTC): | (class) | |
• Time class-builtins: | (class) | |
• Time class-clocks: | (class) | |
• Time class-initialization: | (class) | |
• Time class-instance creation: | (class) | |
• Time-accessing (ANSI for DateAndTimes): | (instance) | |
• Time-accessing (non ANSI & for Durations): | (instance) | |
• Time-arithmetic: | (instance) | |
• Time-comparing: | (instance) |
Next: Time class-builtins, Up: Time [Index]
Answer a time representing midnight in Coordinated Universal Time (UTC)
Answer a time representing the current time of day in Coordinated Universal Time (UTC)
Answer the number of seconds since the midnight of 1/1/1901 (unlike #secondClock, the reference time is here expressed as UTC, that is as Coordinated Universal Time).
Next: Time class-clocks, Previous: Time class-basic (UTC), Up: Time [Index]
Returns the number of milliseconds since midnight.
Returns the number of seconds to/from 1/1/2000.
Answer a String associated with the current timezone (either standard or daylight-saving) on this operating system. For example, the answer could be ‘EST’ to indicate Eastern Standard Time; the answer can be empty and can’t be assumed to be a three-character code such as ‘EST’.
Specifies the current bias, in seconds, for local time translation for the current time. The bias is the difference, in seconds, between Coordinated Universal Time (UTC) and local time; a positive bias indicates that the local timezone is to the east of Greenwich (e.g. Europe, Asia), while a negative bias indicates that it is to the west (e.g. America)
Specifies the bias, in seconds, for local time translation for the given second clock value (0 being midnight of 1/1/1901). The bias is the difference, in seconds, between Coordinated Universal Time (UTC) and local time; a positive bias indicates that the local timezone is to the east of Greenwich (e.g. Europe, Asia), while a negative bias indicates that it is to the west (e.g. America)
Next: Time class-initialization, Previous: Time class-builtins, Up: Time [Index]
Answer the number of milliseconds since startup.
Answer the number of milliseconds since startup
Answer the number of milliseconds in a day
Answer the number of milliseconds which timedBlock took to run
Answer the number of nanoseconds since startup.
Answer the number of milliseconds since startup
Answer the number of seconds since the midnight of 1/1/1901
Next: Time class-instance creation, Previous: Time class-clocks, Up: Time [Index]
Initialize the Time class after the image has been bootstrapped
Private - Initialize the receiver’s instance variables
Next: Time-accessing (ANSI for DateAndTimes), Previous: Time class-initialization, Up: Time [Index]
Answer a Time representing secondCount seconds past midnight
Answer a Time that is the given number of hours past midnight
Answer a Time that is the given number of hours, minutes and seconds past midnight
Answer a Time that is the given number of hours past midnight
Answer a Time that is the given number of hours, minutes and seconds past midnight
Answer a Time that is the given number of minutes past midnight
Answer a Time that is the given number of minutes past midnight
Answer a Time representing midnight
Answer a time representing the current time of day
Parse an instance of the receiver (hours/minutes/seconds) from aStream
Answer a Time that is the given number of seconds past midnight
Answer a Time that is the given number of seconds past midnight
Next: Time-accessing (non ANSI & for Durations), Previous: Time class-instance creation, Up: Time [Index]
Answer the number of hours in the receiver
Answer the hour in a 12-hour clock
Answer the hour in a 24-hour clock
Answer the number of minutes in the receiver
Answer the number of seconds in the receiver
Next: Time-arithmetic, Previous: Time-accessing (ANSI for DateAndTimes), Up: Time [Index]
Not commented.
Not commented.
Answer ‘seconds’.
Answer the number of hours in the receiver
Answer the number of minutes in the receiver
Answer the number of seconds in the receiver
Next: Time-comparing, Previous: Time-accessing (non ANSI & for Durations), Up: Time [Index]
Answer a new Time that is timeAmount seconds after the receiver
Answer a new Time that is timeAmount seconds after the receiver; timeAmount is a Time.
Print a representation of the receiver on aStream
Answer a new Time that is timeAmount seconds before the receiver; timeAmount is a Time.
Previous: Time-arithmetic, Up: Time [Index]
Answer whether the receiver is less than aTime
Answer whether the receiver is equal to aTime
Answer an hash value for the receiver
Next: UndefinedObject, Previous: Time, Up: Base classes [Index]
I represent truth and justice in the world. My motto is "semper veritatis".
• True-basic: | (instance) | |
• True-C hacks: | (instance) | |
• True-printing: | (instance) |
Next: True-C hacks, Up: True [Index]
We are true – anded with anything, we always answer the other operand
We are true – anded with anything, we always answer the other operand, so evaluate aBlock
Answer whether the receiver and aBoolean represent the same boolean value
We are true – answer nil
We are true – evaluate trueBlock
We are true – evaluate trueBlock
We are true – evaluate trueBlock
We are true – answer false
We are true – ored with anything, we always answer true
Answer whether the receiver and aBoolean represent different boolean values
We are true – ored with anything, we always answer true
Next: True-printing, Previous: True-basic, Up: True [Index]
Answer ‘1’.
Previous: True-C hacks, Up: True [Index]
Print a representation of the receiver on aStream
Next: UnicodeCharacter, Previous: True, Up: Base classes [Index]
I have the questionable distinction of being a class with only one instance, which is the object "nil".
• UndefinedObject-basic: | (instance) | |
• UndefinedObject-class creation - alternative: | (instance) | |
• UndefinedObject-class polymorphism: | (instance) | |
• UndefinedObject-CObject interoperability: | (instance) | |
• UndefinedObject-dependents access: | (instance) | |
• UndefinedObject-iteration: | (instance) | |
• UndefinedObject-printing: | (instance) | |
• UndefinedObject-still unclassified: | (instance) | |
• UndefinedObject-storing: | (instance) | |
• UndefinedObject-testing: | (instance) |
Answer the receiver.
Answer the receiver.
Answer the receiver.
Next: UndefinedObject-class polymorphism, Previous: UndefinedObject-basic, Up: UndefinedObject [Index]
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Don’t use this, it is only present to file in from IBM Smalltalk
Next: UndefinedObject-CObject interoperability, Previous: UndefinedObject-class creation - alternative, Up: UndefinedObject [Index]
Return all the classes in the system.
Answer ‘0’.
Create a Metaclass object for the given class name. The metaclass is a subclass of Class
Answer ‘nil’.
Ignored – necessary to support disjoint class hierarchies
Define a subclass of the receiver with the given name. If the class is already defined, don’t modify its instance or class variables but still, if necessary, recompile everything needed.
Define a fixed subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a variable subclass of the receiver with the given name, shape, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed. The shape can be one of #byte #int8 #character #short #ushort #int #uint #int64 #uint64 #utf32 #float #double or #pointer.
Define a byte variable subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a variable pointer subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Define a word variable subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.
Next: UndefinedObject-dependents access, Previous: UndefinedObject-class polymorphism, Up: UndefinedObject [Index]
Do nothing, a NULL pointer can be safely freed.
Return the receiver: a NULL pointer is always nil, whatever its type.
Next: UndefinedObject-iteration, Previous: UndefinedObject-CObject interoperability, Up: UndefinedObject [Index]
Fail, nil does not support dependents.
Ignore this call, nil does not support dependents.
Next: UndefinedObject-printing, Previous: UndefinedObject-dependents access, Up: UndefinedObject [Index]
Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock with each element of the receiver (which should be an Iterable).
Evaluate iterableBlock with each element of the receiver (which should be an Iterable) if not nil. Else answer nil
Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock, passing each element of the receiver (which should be an Iterable).
Next: UndefinedObject-still unclassified, Previous: UndefinedObject-iteration, Up: UndefinedObject [Index]
Print a representation of the receiver on aStream.
Print on aStream a representation of the receiver as it would be accessed from aNamespace: nil is the same everywhere, so print the same as #printOn:
Next: UndefinedObject-storing, Previous: UndefinedObject-printing, Up: UndefinedObject [Index]
Always return false, as nil inherits from nothing.
Next: UndefinedObject-testing, Previous: UndefinedObject-still unclassified, Up: UndefinedObject [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store on aStream some Smalltalk code which compiles to the receiver
Store Smalltalk code compiling to the receiver on aStream.
Previous: UndefinedObject-storing, Up: UndefinedObject [Index]
Evaluate nilBlock if the receiver is nil, else answer nil
Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.
Evaluate notNilBlock if the receiver is not nil, passing the receiver. Else answer nil
Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.
Answer whether the receiver is the undefined object nil. Always answer true.
Answer whether the receiver represents a NULL C pointer. Always answer true.
Answer whether the receiver is not the undefined object nil. Always answer false.
Next: UnicodeString, Previous: UndefinedObject, Up: Base classes [Index]
My instances represent the over one million characters of the Unicode character set. It provides messages to translate between integers and character objects.
UnicodeCharacter objects are created when accessing UnicodeStrings, or with Character class>>#codePoint:.
• UnicodeCharacter class-built ins: | (class) | |
• UnicodeCharacter-coercion methods: | (instance) |
Next: UnicodeCharacter-coercion methods, Up: UnicodeCharacter [Index]
Returns the character object, possibly a Character, corresponding to anInteger. Error if anInteger is not an integer, or not in 0..16r10FFFF.
This is only a primitive for speed. UnicodeCharacter’s #value: method is equivalent to #codePoint: (which is the same for Character and UnicodeCharacter).
Previous: UnicodeCharacter class-built ins, Up: UnicodeCharacter [Index]
Returns a String with aNumber occurrences of the receiver.
Next: ValueAdaptor, Previous: UnicodeCharacter, Up: Base classes [Index]
My instances represent Unicode string data types. Data is stored as 4-byte UTF-32 characters
• UnicodeString class-converting: | (class) | |
• UnicodeString class-multibyte encodings: | (class) | |
• UnicodeString-built ins: | (instance) | |
• UnicodeString-built-ins: | (instance) | |
• UnicodeString-converting: | (instance) | |
• UnicodeString-multibyte encodings: | (instance) |
Next: UnicodeString class-multibyte encodings, Up: UnicodeString [Index]
Return the String, aString, converted to its Unicode representation. Unless the I18N package is loaded, this is not implemented.
Next: UnicodeString-built ins, Previous: UnicodeString class-converting, Up: UnicodeString [Index]
Answer the encoding used by the receiver. Conventionally, we answer ’Unicode’ to ensure that two UnicodeStrings always have the same encoding.
Answer true; the receiver stores characters.
Next: UnicodeString-built-ins, Previous: UnicodeString class-multibyte encodings, Up: UnicodeString [Index]
Answer the index-th indexed instance variable of the receiver
Next: UnicodeString-converting, Previous: UnicodeString-built ins, Up: UnicodeString [Index]
Answer an hash value for the receiver
Next: UnicodeString-multibyte encodings, Previous: UnicodeString-built-ins, Up: UnicodeString [Index]
Returns the string corresponding to the receiver. Without the Iconv package, unrecognized Unicode characters become $? characters. When it is loaded, an appropriate single- or multi-byte encoding could be used.
Returns the symbol corresponding to the receiver
But I already am a UnicodeString! Really!
Print a representation of the receiver on aStream
Print a representation of the receiver on aStream
Previous: UnicodeString-converting, Up: UnicodeString [Index]
Answer the encoding used by the receiver. Conventionally, we answer ’Unicode’ to ensure that two UnicodeStrings always have the same encoding.
Answer the number of Unicode characters in the receiver. This is the same as #size for UnicodeString.
Next: ValueHolder, Previous: UnicodeString, Up: Base classes [Index]
My subclasses are used to access data from different objects with a consistent protocol. However, I’m an abstract class.
• ValueAdaptor class-creating instances: | (class) | |
• ValueAdaptor-accessing: | (instance) | |
• ValueAdaptor-printing: | (instance) |
Next: ValueAdaptor-accessing, Up: ValueAdaptor [Index]
We don’t know enough of subclasses to have a shared implementation of new
Next: ValueAdaptor-printing, Previous: ValueAdaptor class-creating instances, Up: ValueAdaptor [Index]
Retrive the value of the receiver. Must be implemented by ValueAdaptor’s subclasses
Set the value of the receiver. Must be implemented by ValueAdaptor’s subclasses
Previous: ValueAdaptor-accessing, Up: ValueAdaptor [Index]
Print a representation of the receiver
Next: VariableBinding, Previous: ValueAdaptor, Up: Base classes [Index]
I store my value in a variable. For example, you can use me to pass numbers by reference. Just instance me before calling a method and ask for my value after that method. There are a lot of other creative uses for my intances, though.
• ValueHolder class-creating instances: | (class) | |
• ValueHolder-accessing: | (instance) | |
• ValueHolder-initializing: | (instance) |
Next: ValueHolder-accessing, Up: ValueHolder [Index]
Create a ValueHolder whose starting value is nil
Answer the sole instance of NullValueHolder
Create a ValueHolder whose starting value is anObject
Next: ValueHolder-initializing, Previous: ValueHolder class-creating instances, Up: ValueHolder [Index]
Get the value of the receiver.
Set the value of the receiver.
Previous: ValueHolder-accessing, Up: ValueHolder [Index]
Private - set the initial value of the receiver
Next: VersionableObjectProxy, Previous: ValueHolder, Up: Base classes [Index]
My instances represent a mapping between a key in a namespace and its value. I print different than a normal Association, and know about my parent namespace, otherwise my behavior is the same.
• VariableBinding-compiler: | (instance) | |
• VariableBinding-printing: | (instance) | |
• VariableBinding-saving and loading: | (instance) | |
• VariableBinding-storing: | (instance) | |
• VariableBinding-testing: | (instance) |
Next: VariableBinding-printing, Up: VariableBinding [Index]
Not commented.
Not commented.
Next: VariableBinding-saving and loading, Previous: VariableBinding-compiler, Up: VariableBinding [Index]
Print a dotted path that compiles to the receiver’s value
Put on aStream a representation of the receiver
Next: VariableBinding-storing, Previous: VariableBinding-printing, Up: VariableBinding [Index]
This method is implemented to allow for a PluggableProxy to be used with VariableBindings. Answer a DirectedMessage which sends #at: to the environment that holds the receiver.
Next: VariableBinding-testing, Previous: VariableBinding-saving and loading, Up: VariableBinding [Index]
Answer whether the receiver is expressible as a Smalltalk literal.
Store on aStream some Smalltalk code which compiles to the receiver
Put on aStream some Smalltalk code compiling to the receiver
Previous: VariableBinding-storing, Up: VariableBinding [Index]
Answer true if this VariableBinding lives outside the Undeclared dictionary
Next: VFS.ArchiveFile, Previous: VariableBinding, Up: Base classes [Index]
I am a proxy that stores additional information to allow different versions of an object’s representations to be handled by the program. VersionableObjectProxies are backwards compatible, that is you can support versioning even if you did not use a VersionableObjectProxy for that class when the object was originarily dumped. VersionableObjectProxy does not support classes that changed shape across different versions. See the method comments for more information.
• VersionableObjectProxy class-saving and restoring: | (class) | |
• VersionableObjectProxy-saving and restoring: | (instance) |
Retrieve the object. If the version number doesn’t match the #binaryRepresentationVersion answered by the class, call the class’ #convertFromVersion:withFixedVariables:instanceVariables:for: method. The stored version number will be the first parameter to that method (or nil if the stored object did not employ a VersionableObjectProxy), the remaining parameters will be respectively the fixed instance variables, the indexed instance variables (or nil if the class is fixed), and the ObjectDumper itself. If no VersionableObjectProxy, the class is sent #nonVersionedInstSize to retrieve the number of fixed instance variables stored for the non-versioned object.
Previous: VersionableObjectProxy class-saving and restoring, Up: VersionableObjectProxy [Index]
Save the object with extra versioning information.
Next: VFS.ArchiveMember, Previous: VersionableObjectProxy, Up: Base classes [Index]
ArchiveFile handles virtual filesystems that have a directory structure of their own. The directories and files in the archive are instances of ArchiveMember, but the functionality resides entirely in ArchiveFile because the members will still ask the archive to get directory information on them, to extract them to a real file, and so on.
• VFS.ArchiveFile-ArchiveMember protocol: | (instance) | |
• VFS.ArchiveFile-directory operations: | (instance) | |
• VFS.ArchiveFile-querying: | (instance) | |
• VFS.ArchiveFile-still unclassified: | (instance) | |
• VFS.ArchiveFile-TmpFileArchiveMember protocol: | (instance) |
Next: VFS.ArchiveFile-directory operations, Up: VFS.ArchiveFile [Index]
Extract the information on anArchiveMember. Answer false if it actually does not exist in the archive; otherwise, answer true after having told anArchiveMember about them by sending #size:stCtime:stMtime:stAtime:isDirectory: to it.
Evaluate aBlock once for each file in the directory represented by anArchiveMember, passing its name.
Set the permission bits for the file in anArchiveMember.
Extract the directory listing from the archive
Remove the member represented by anArchiveMember.
Update the member represented by anArchiveMember by copying the file into which it was extracted back to the archive.
Next: VFS.ArchiveFile-querying, Previous: VFS.ArchiveFile-ArchiveMember protocol, Up: VFS.ArchiveFile [Index]
Answer a FilePath for a file named ‘aName’ residing in the directory represented by the receiver.
Answer a FilePath for a file named ‘aName’ residing in the directory represented by the receiver.
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name.
Release the resources used by the receiver that don’t survive when reloading a snapshot.
Next: VFS.ArchiveFile-still unclassified, Previous: VFS.ArchiveFile-directory operations, Up: VFS.ArchiveFile [Index]
Answer whether a directory with the name contained in the receiver does exist and can be accessed
Answer true. The archive can always be considered as a directory.
Next: VFS.ArchiveFile-TmpFileArchiveMember protocol, Previous: VFS.ArchiveFile-querying, Up: VFS.ArchiveFile [Index]
Print a representation of the file identified by the receiver.
Previous: VFS.ArchiveFile-still unclassified, Up: VFS.ArchiveFile [Index]
Extract the contents of anArchiveMember into a file that resides on disk, and answer the name of the file.
Extract the contents of anArchiveMember into a file that resides on disk, and answer the name of the file.
Next: VFS.FileWrapper, Previous: VFS.ArchiveFile, Up: Base classes [Index]
TmpFileArchiveMember is a handler class for members of archive files that creates temporary files when extracting files from an archive.
• VFS.ArchiveMember-accessing: | (instance) | |
• VFS.ArchiveMember-basic: | (instance) | |
• VFS.ArchiveMember-delegation: | (instance) | |
• VFS.ArchiveMember-directory operations: | (instance) | |
• VFS.ArchiveMember-file operations: | (instance) | |
• VFS.ArchiveMember-initializing: | (instance) | |
• VFS.ArchiveMember-still unclassified: | (instance) | |
• VFS.ArchiveMember-testing: | (instance) |
Next: VFS.ArchiveMember-basic, Up: VFS.ArchiveMember [Index]
Answer the archive of which the receiver is a member.
Answer the name of the file identified by the receiver as answered by File>>#name.
Answer the creation time of the file identified by the receiver. On some operating systems, this could actually be the last change time (the ‘last change time’ has to do with permissions, ownership and the like).
Answer the last access time of the file identified by the receiver
Answer the last change time of the file identified by the receiver (the ‘last change time’ has to do with permissions, ownership and the like). On some operating systems, this could actually be the file creation time.
Answer the last modify time of the file identified by the receiver (the ‘last modify time’ has to do with the actual file contents).
Answer the receiver’s file name.
Set the receiver’s file name to aName.
Refresh the statistics for the receiver
Answer the size of the file identified by the receiver
Next: VFS.ArchiveMember-delegation, Previous: VFS.ArchiveMember-accessing, Up: VFS.ArchiveMember [Index]
Answer whether the receiver represents the same file as the receiver.
Answer a hash value for the receiver.
Next: VFS.ArchiveMember-directory operations, Previous: VFS.ArchiveMember-basic, Up: VFS.ArchiveMember [Index]
Answer the size of the file identified by the receiver
Next: VFS.ArchiveMember-file operations, Previous: VFS.ArchiveMember-delegation, Up: VFS.ArchiveMember [Index]
Answer a FilePath for a file named ‘aName’ residing in the directory represented by the receiver.
Create a subdirectory of the receiver, naming it dirName.
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name.
Next: VFS.ArchiveMember-initializing, Previous: VFS.ArchiveMember-directory operations, Up: VFS.ArchiveMember [Index]
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Remove the file with the given path name
Rename the file with the given path name oldFileName to newFileName
Private - Update the in-archive version of the file before closing.
Next: VFS.ArchiveMember-still unclassified, Previous: VFS.ArchiveMember-file operations, Up: VFS.ArchiveMember [Index]
Set the archive of which the receiver is a member.
Called back by the receiver’s archive when the ArchiveMember asks for file information.
Set the file information for the receiver.
Set the file information for the receiver.
Next: VFS.ArchiveMember-testing, Previous: VFS.ArchiveMember-initializing, Up: VFS.ArchiveMember [Index]
Answer an object of the same kind as the receiver, whose name is suffixed with aName.
Print a representation of the file identified by the receiver.
Answer whether the receiver identifies an absolute path.
Previous: VFS.ArchiveMember-still unclassified, Up: VFS.ArchiveMember [Index]
Answer whether a file with the name contained in the receiver does exist.
Answer whether a directory with the name contained in the receiver does exist and is accessible
Answer whether a file with the name contained in the receiver does exist and identifies a directory.
Answer whether a file with the name contained in the receiver does exist and is executable
Answer whether a file with the name contained in the receiver does exist and is readable
Answer whether a file with the name contained in the receiver does exist and identifies a symbolic link.
Answer whether a file with the name contained in the receiver does exist and is writeable
Answer the octal permissions for the file.
Set the octal permissions for the file to be ‘mode’.
Next: VFS.StoredZipMember, Previous: VFS.ArchiveMember, Up: Base classes [Index]
FileWrapper gives information for virtual files that refer to a real file on disk.
• VFS.FileWrapper class-initializing: | (class) | |
• VFS.FileWrapper class-instance creation: | (class) | |
• VFS.FileWrapper-accessing: | (instance) | |
• VFS.FileWrapper-basic: | (instance) | |
• VFS.FileWrapper-delegation: | (instance) | |
• VFS.FileWrapper-enumerating: | (instance) | |
• VFS.FileWrapper-file operations: | (instance) | |
• VFS.FileWrapper-testing: | (instance) |
Next: VFS.FileWrapper class-instance creation, Up: VFS.FileWrapper [Index]
Register the receiver with ObjectMemory
Private - Remove the files before quitting, and register the virtual filesystems specified by the subclasses upon image load.
Next: VFS.FileWrapper-accessing, Previous: VFS.FileWrapper class-initializing, Up: VFS.FileWrapper [Index]
Create an instance of this class representing the contents of the given file, under the virtual filesystem fsName.
Next: VFS.FileWrapper-basic, Previous: VFS.FileWrapper class-instance creation, Up: VFS.FileWrapper [Index]
Answer the string representation of the receiver’s path.
Answer a File or Directory object as appropriate for a file named ’aName’ in the directory represented by the receiver.
Update the timestamps of the file corresponding to the receiver, to be accessDateTime and modifyDateTime.
Answer the full path to the receiver.
Set the receiver’s owner and group to be ownerString and groupString.
Compute the relative path from the receiver to destName.
Next: VFS.FileWrapper-delegation, Previous: VFS.FileWrapper-accessing, Up: VFS.FileWrapper [Index]
Answer whether the receiver represents the same file as the receiver.
Answer a hash value for the receiver.
Next: VFS.FileWrapper-enumerating, Previous: VFS.FileWrapper-basic, Up: VFS.FileWrapper [Index]
Answer the creation time of the file identified by the receiver. On some operating systems, this could actually be the last change time (the ‘last change time’ has to do with permissions, ownership and the like).
Answer the size of the file identified by the receiver
Answer whether a file with the name contained in the receiver does exist and is executable
Answer whether a file with the name contained in the receiver does exist and is readable
Answer whether a file with the name contained in the receiver does exist and is writeable
Answer the last access time of the file identified by the receiver
Answer the last change time of the file identified by the receiver (the ‘last change time’ has to do with permissions, ownership and the like). On some operating systems, this could actually be the file creation time.
Answer the last modify time of the file identified by the receiver (the ‘last modify time’ has to do with the actual file contents).
Answer the permission bits for the file identified by the receiver
Answer the permission bits for the file identified by the receiver
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Remove the file with the given path name
Answer the size of the file identified by the receiver
Next: VFS.FileWrapper-file operations, Previous: VFS.FileWrapper-delegation, Up: VFS.FileWrapper [Index]
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name.
Next: VFS.FileWrapper-testing, Previous: VFS.FileWrapper-enumerating, Up: VFS.FileWrapper [Index]
Compute the relative path from the directory dirName to the receiver
Rename the file identified by the receiver to newName
Create destName as a symbolic link of the receiver. The appropriate relative path is computed automatically.
Create the receiver as a symbolic link from srcName (relative to the path of the receiver).
Previous: VFS.FileWrapper-file operations, Up: VFS.FileWrapper [Index]
Answer whether a file with the name contained in the receiver does exist.
Answer whether the receiver identifies an absolute path.
Answer whether a directory with the name contained in the receiver does exist and can be accessed
Answer whether a file with the name contained in the receiver does exist identifies a directory.
Answer whether a file with the name contained in the receiver does exist and identifies a symbolic link.
Next: VFS.TmpFileArchiveMember, Previous: VFS.FileWrapper, Up: Base classes [Index]
ArchiveMember is the handler class for stored ZIP archive members, which are optimized.
• VFS.StoredZipMember-accessing: | (instance) | |
• VFS.StoredZipMember-opening: | (instance) |
Next: VFS.StoredZipMember-opening, Up: VFS.StoredZipMember [Index]
Answer ‘offset’.
Not commented.
Previous: VFS.StoredZipMember-accessing, Up: VFS.StoredZipMember [Index]
Not commented.
Next: VFS.ZipFile, Previous: VFS.StoredZipMember, Up: Base classes [Index]
• VFS.TmpFileArchiveMember-directory operations: | (instance) | |
• VFS.TmpFileArchiveMember-finalization: | (instance) | |
• VFS.TmpFileArchiveMember-still unclassified: | (instance) |
Answer the real file name which holds the file contents, or nil if it does not apply.
Open the receiver in the given mode (as answered by FileStream’s class constant methods)
Next: VFS.TmpFileArchiveMember-still unclassified, Previous: VFS.TmpFileArchiveMember-directory operations, Up: VFS.TmpFileArchiveMember [Index]
Release the resources used by the receiver that don’t survive when reloading a snapshot.
Previous: VFS.TmpFileArchiveMember-finalization, Up: VFS.TmpFileArchiveMember [Index]
Answer whether the file has already been extracted to disk.
Next: Warning, Previous: VFS.TmpFileArchiveMember, Up: Base classes [Index]
ZipFile transparently extracts files from a ZIP archive.
• VFS.ZipFile-members: | (instance) |
Up: VFS.ZipFile [Index]
Not commented.
Create a subdirectory of the receiver, naming it dirName.
Extract the contents of anArchiveMember into a file that resides on disk, and answer the name of the file.
Extract the directory listing from the archive
Set the permission bits for the file in anArchiveMember.
Remove the member represented by anArchiveMember.
Update the member represented by anArchiveMember by copying the file into which it was extracted back to the archive.
Next: WeakArray, Previous: VFS.ZipFile, Up: Base classes [Index]
Warning represents an ‘important’ but resumable error.
• Warning-exception description: | (instance) |
Answer a textual description of the exception.
Next: WeakIdentitySet, Previous: Warning, Up: Base classes [Index]
I am similar to a plain array, but my items are stored in a weak object, so I track which of them are garbage collected.
• WeakArray class-instance creation: | (class) | |
• WeakArray-accessing: | (instance) | |
• WeakArray-conversion: | (instance) | |
• WeakArray-loading: | (instance) |
Next: WeakArray-accessing, Up: WeakArray [Index]
Create a new WeakArray of size 0.
Create a new WeakArray of the given size.
Next: WeakArray-conversion, Previous: WeakArray class-instance creation, Up: WeakArray [Index]
Evaluate aBlock for all the elements in the array, excluding the garbage collected ones. Note: a finalized object stays alive until the next collection (the collector has no means to see whether it was resuscitated by the finalizer), so an object being alive does not mean that it is usable.
Answer the index-th item of the receiver, or nil if it has been garbage collected.
Store the value associated to the given index; plus, store in nilValues whether the object is nil. nil objects whose associated item of nilValues is 1 were touched by the garbage collector.
Put object at every index contained in the indices collection
Put object at every index in the receiver
Clear the ‘object has been garbage collected’ flag for the item at the given index
Evaluate aBlock for all the elements in the array, including the garbage collected ones (pass nil for those).
Answer whether the item at the given index is still alive or has been garbage collected. Note: a finalized object stays alive until the next collection (the collector has no means to see whether it was resuscitated by the finalizer), so an object being alive does not mean that it is usable.
Answer the number of items in the receiver
Next: WeakArray-loading, Previous: WeakArray-accessing, Up: WeakArray [Index]
Answer a non-weak version of the receiver
Returns a deep copy of the receiver (the instance variables are copies of the receiver’s instance variables)
Returns a shallow copy of the receiver (the instance variables are not copied)
Answer Array; this method is used in the #copyEmpty: message, which in turn is used by all collection-returning methods (collect:, select:, reject:, etc.).
Previous: WeakArray-conversion, Up: WeakArray [Index]
Called after loading an object; must restore it to the state before ‘preStore’ was called. Make it weak again
Next: WeakKeyDictionary, Previous: WeakArray, Up: Base classes [Index]
I am similar to a plain identity set, but my keys are stored in a weak array; I track which of them are garbage collected and, as soon as I encounter one of them, I swiftly remove all the garbage collected keys
• WeakIdentitySet-accessing: | (instance) |
Up: WeakIdentitySet [Index]
Answer whether I include anObject exactly. As I am an identity-set, this is the same as #includes:.
Next: WeakKeyIdentityDictionary, Previous: WeakIdentitySet, Up: Base classes [Index]
I am similar to a plain Dictionary, but my keys are stored in a weak array; I track which of them are garbage collected and, as soon as I encounter one of them, I swiftly remove all the associations for the garbage collected keys
• WeakKeyDictionary class-hacks: | (class) | |
• WeakKeyDictionary-accessing: | (instance) |
Next: WeakKeyDictionary-accessing, Up: WeakKeyDictionary [Index]
Called after loading an object; must restore it to the state before ‘preStore’ was called. Make it weak again
Previous: WeakKeyDictionary class-hacks, Up: WeakKeyDictionary [Index]
Store value as associated to the given key.
Store value as associated to the given key.
Next: WeakSet, Previous: WeakKeyDictionary, Up: Base classes [Index]
I am similar to a plain identity dictionary, but my keys are stored in a weak array; I track which of them are garbage collected and, as soon as I encounter one of them, I swiftly remove all the associations for the garbage collected keys
Next: WeakValueIdentityDictionary, Previous: WeakKeyIdentityDictionary, Up: Base classes [Index]
I am similar to a plain set, but my items are stored in a weak array; I track which of them are garbage collected and, as soon as I encounter one of them, I swiftly remove all.
• WeakSet-accessing: | (instance) | |
• WeakSet-copying: | (instance) | |
• WeakSet-loading: | (instance) |
Next: WeakSet-copying, Up: WeakSet [Index]
Add newObject to the set, if and only if the set doesn’t already contain an occurrence of it. Don’t fail if a duplicate is found. Answer newObject
Enumerate all the non-nil members of the set
Next: WeakSet-loading, Previous: WeakSet-accessing, Up: WeakSet [Index]
Returns a deep copy of the receiver (the instance variables are copies of the receiver’s instance variables)
Returns a shallow copy of the receiver (the instance variables are not copied)
Previous: WeakSet-copying, Up: WeakSet [Index]
Called after loading an object; must restore it to the state before ‘preStore’ was called. Make it weak again
Next: WeakValueLookupTable, Previous: WeakSet, Up: Base classes [Index]
I am similar to a plain identity dictionary, but my values are stored in a weak array; I track which of the values are garbage collected and, as soon as one of them is accessed, I swiftly remove the associations for the garbage collected values
Next: WordArray, Previous: WeakValueIdentityDictionary, Up: Base classes [Index]
I am similar to a plain LookupTable, but my values are stored in a weak array; I track which of the values are garbage collected and, as soon as one of them is accessed, I swiftly remove the associations for the garbage collected values
• WeakValueLookupTable class-hacks: | (class) | |
• WeakValueLookupTable-hacks: | (instance) | |
• WeakValueLookupTable-rehashing: | (instance) |
Next: WeakValueLookupTable-hacks, Up: WeakValueLookupTable [Index]
Answer a new, uninitialized instance of the receiver with the given size
Next: WeakValueLookupTable-rehashing, Previous: WeakValueLookupTable class-hacks, Up: WeakValueLookupTable [Index]
Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
If aKey is absent, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation
Answer whether the receiver contains the given key.
Previous: WeakValueLookupTable-hacks, Up: WeakValueLookupTable [Index]
Rehash the receiver
Next: WriteStream, Previous: WeakValueLookupTable, Up: Base classes [Index]
I am similar to a plain array, but my items are 32-bit integers.
• WordArray-built ins: | (instance) |
Answer the index-th indexed instance variable of the receiver
Next: ZeroDivide, Previous: WordArray, Up: Base classes [Index]
I am the class of writeable streams. I only allow write operations to my instances; reading is strictly forbidden.
• WriteStream class-instance creation: | (class) | |
• WriteStream-accessing-writing: | (instance) | |
• WriteStream-positioning: | (instance) |
Next: WriteStream-accessing-writing, Up: WriteStream [Index]
Answer a new instance of the receiver which streams on aCollection. Every item of aCollection is discarded.
Answer a new instance of the receiver which streams from the end of aCollection.
Answer a new instance of the receiver which streams from the firstIndex-th item of aCollection to the lastIndex-th. The pointer is moved to the last item in that range.
Next: WriteStream-positioning, Previous: WriteStream class-instance creation, Up: WriteStream [Index]
Returns a collection of the same type that the stream accesses, up to and including the final element.
Put n characters or bytes of aCollection, starting at the pos-th, in the collection buffer.
Store anObject as the next item in the receiver. Grow the collection if necessary
Answer a ReadStream on the same contents as the receiver
Returns a collection of the same type that the stream accesses, up to and including the final element, but in reverse order.
Previous: WriteStream-accessing-writing, Up: WriteStream [Index]
Extension - Reset the stream
Previous: WriteStream, Up: Base classes [Index]
A ZeroDivide exception is raised by numeric classes when a program tries to divide by zero. Information on the dividend is available to the handler.
• ZeroDivide class-instance creation: | (class) | |
• ZeroDivide-accessing: | (instance) | |
• ZeroDivide-description: | (instance) |
Next: ZeroDivide-accessing, Up: ZeroDivide [Index]
Create a new ZeroDivide object remembering that the dividend was aNumber.
Create a new ZeroDivide object; the dividend is conventionally set to zero.
Next: ZeroDivide-description, Previous: ZeroDivide class-instance creation, Up: ZeroDivide [Index]
Answer the number that was being divided by zero
Previous: ZeroDivide-accessing, Up: ZeroDivide [Index]
Answer a textual description of the exception.
Next: Method index, Previous: Base classes, Up: Top [Index]
Jump to: | A B C D E F G H I L M N O P R S T U V W Z |
---|
Jump to: | A B C D E F G H I L M N O P R S T U V W Z |
---|
Next: Cross-reference, Previous: Class index, Up: Top [Index]
Jump to: | %
&
*
+
,
-
/
<
=
>
@
\
|
~
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
---|
Jump to: | %
&
*
+
,
-
/
<
=
>
@
\
|
~
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
---|
Previous: Method index, Up: Top [Index]
Jump to: | #
%
*
+
-
/
<
=
>
~
A B C D E F G H I J K L M N O P Q R S T U V W Y |
---|
Jump to: | #
%
*
+
-
/
<
=
>
~
A B C D E F G H I J K L M N O P Q R S T U V W Y |
---|