CS 342 Lecture -*- Outline -*- * Implementation of Smalltalk (how does anything get done?) Most of system written in Smalltalk most data structures are objects Virtual machine (written in assembler) interprets internal form of methods 3 parts: storage manager, interpreter, primitives ** Storage Manager creation of objects, management of free space fetch and store class fetch and store fields *** objects contain: length, reference count, pointer to class, contained objects all pointers same size *** class objects are objects, but in particular contain: superclass message dictionary of instance methods (name method pairs) instance variable specification instance variables contain object pointers or numbers? number of fixed fields that an instance has (whether it has any indexed instance vars) pointer to list of instance variable names name of class (as string) class variables (pointers) *** message dictionaries (name, compiled form, source form) triples *** activation records (contexts) dynamic link (sender part) is pointer to AR of caller instruction part (IP) is (pointer to method, offset) pair environment part self and other parameters (can access all instance vars in self including those defined in superclasses) temps (including those generated by ST) static link is class pointer static chain made up of superclass pointers