Back: CompiledCode-translation
Up: Class reference
Forward: CompiledMethod class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.35 CompiledMethod

Defined in namespace Smalltalk
Category: Language-Implementation
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.

6.35.1 CompiledMethod class: instance creation  (class)
6.35.2 CompiledMethod class: lean images  (class)
6.35.3 CompiledMethod: accessing  (instance)
6.35.4 CompiledMethod: basic  (instance)
6.35.5 CompiledMethod: printing  (instance)
6.35.6 CompiledMethod: saving and loading  (instance)


6.35.1 CompiledMethod class: instance creation

literals: lits numArgs: numArg numTemps: numTemp
primitive: primIndex bytecodes: bytecodes depth: depth 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.


6.35.2 CompiledMethod class: lean images

stripSourceCode
Remove all the references to method source code from the system


6.35.3 CompiledMethod: accessing

flags
Private - Answer the optimization flags for the receiver

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 for the receiver

numTemps
Answer the number of temporaries for the receiver

primitive
Answer the primitive called 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

withNewMethodClass: class
Answer either the receiver or a copy of it, with the method class set to class

withNewMethodClass: class selector: selector
Answer either the receiver or a copy of it, with the method class set to class


6.35.4 CompiledMethod: basic

= aMethod
Answer whether the receiver and aMethod are equal

hash
Answer an hash value for the receiver

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.35.5 CompiledMethod: printing

storeOn: aStream
Print code to create the receiver on aStream


6.35.6 CompiledMethod: saving and loading

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




This document was generated on May, 12 2002 using texi2html