Back: Collection-testing collections
Up: Class reference
Forward: CompiledBlock class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.33 CompiledBlock

Defined in namespace Smalltalk
Category: Language-Implementation
I represent a block that has been compiled.

6.33.1 CompiledBlock class: instance creation  (class)
6.33.2 CompiledBlock: accessing  (instance)
6.33.3 CompiledBlock: basic  (instance)
6.33.4 CompiledBlock: printing  (instance)
6.33.5 CompiledBlock: saving and loading  (instance)


6.33.1 CompiledBlock class: instance creation

newMethod: numBytecodes header: anInteger method: outerMethod
Answer a new CompiledMethod with room for the given bytes and the given header

numArgs: args numTemps: temps bytecodes: bytecodes depth: depth literals: literalArray
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.


6.33.2 CompiledBlock: accessing

flags
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

method
Answer the CompiledMethod in which the receiver lies

methodClass
Answer the class in which the receiver is installed.

methodClass: methodClass
Set the receiver's class instance variable

numArgs
Answer the number of arguments passed to the receiver

numLiterals
Answer the number of literals for the receiver

numTemps
Answer the number of temporary variables used by the receiver

selector
Answer the selector through which the method is called

selector: aSymbol
Set the selector through which the method is called

stackDepth
Answer the number of stack slots needed for the receiver


6.33.3 CompiledBlock: basic

= aMethod
Answer whether the receiver and aMethod are equal

methodCategory
Answer the method category

methodCategory: aCategory
Set the method category to the given string

methodSourceCode
Answer the method source code (a FileSegment or String or nil)

methodSourceFile
Answer the file where the method source code is stored

methodSourcePos
Answer the location where the method source code is stored in the methodSourceFile

methodSourceString
Answer the method source code as a string


6.33.4 CompiledBlock: printing

printOn: aStream
Print the receiver's class and selector on aStream


6.33.5 CompiledBlock: saving and loading

binaryRepresentationObject
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.




This document was generated on May, 12 2002 using texi2html