RSqueak/VM’s documentation

Building from Source

Common to all systems

We have scripts for installing dependencies, building, running the unit tests, and running JIT tests in the .build subdirectory. You need the PyPy source tree, and the rsdl source tree. If you already have all these, run .build/build.py –32bit to build 32-bit VM. Run .build/build.py to compile a 64-bit VM. The script passes all other arguments on to the rpython translator, so you can pass other options.

It will generate a config file .build/buildconfig.ini where you can set your paths. You can also run .build/download_dependencies.py to download the dependencies automatically. You will also need a Python and a C compiler for 32-bit compilation, if you plan to do 32-bit development.

Windows

On Windows, you will have to use the C compiler that comes with Visual Studio 2008, because newer ones crash the JIT. It suffices to just install the Microsoft C compiler V90 plus Windows SDK 7. Also, install the Python 2.7 Visual Studio compiler package. The packages provided in the link install it to the default paths. If you already have the compiler and SDK, you can also just update the paths in .build/buildconfig.ini.

Linux

RSqueak/VM can currently be compiled in both 32-bit and 64-bit configurations. For 32-bit, you need to use 32-bit python and SDL2 using 32-bit libraries for everything. The easiest way to ensure that is to use a chroot, but you can also install the :i386 versions of the SDL2 dependencies for your distro.

macOS

To compile RSqueak/VM for 32-bit, run

export VERSIONER_PYTHON_PREFER_32_BIT=yes

before you run any of the python scripts in the .build directory. You also need to download SDL2 as a framework (homebrew version is not tested). Check the .travis/build-osx.sh if you get stuck anywhere.

Development

The .build directory includes several scripts that make development easier. Once you’ve setup your system for building, you can use these to work on the RSqueak/VM.

run.py

This script executes RSqueak/VM in hosted mode, that is, it runs on top of a Python interpreter. This is very slow (we recommend using PyPy), but it can be useful to debug specific aspects of the VM quickly. Ideally, you set up an image so that it executes the code that you are interested in early during startup (DisplayScreen class>>startUp is a good candidate) and then you add your breakpoints to the source. You can also pass commandline arguments to the script or tweak the default arguments in the script itself.

Running a “Smalltalk REPL”

When you want to work on primitives or plugins, it is useful to prepare an image a little (for example, make it so test runs print to the console), and then run the following:

pypy .build/run.py --shell <PATH_TO_IMAGE>

This will load the image and dump you in a simple REPL for Smalltalk, but with some commands to help you execute Python code and, in particular, to reload the Python code you write in any plugin or primitive file. Thus, you can run some Smalltalk code, check for errors, change the primitive code, reload it, and try again. This avoids having to reload the image in interpreted mode all the time (which can be slow).

There is an integrated help that you can get by typing !help, and there is limited autocomplete, too.

Note that the REPL only loads the image, but does not process startup. For many things, you might want to run FileStream startUp: true or Delay startUp to get basic I/O working or delays working.

unittests.py

The second script that is useful for working on issues regarding the interpreter is unittests.py. By default it runs all tests under the rsqueakvm/test directory (but not those in rsqueakvm/test/jittest/). This is a standalone pytest script, so you can pass arguments or select single test files as you would for pytest.

jittests.py

This script requires that you have already built an rsqueak binary and that you have the C Squeak VM installed. It executes the tests in rsqueakvm/test/jittest/ and checks for the JIT output. We use these tests to ensure that development on the VM does not break JIT optimizations.

jit.py

This script is useful to figure out what the JIT is doing. Like run.py, it executes the RSqueak/VM in hosted mode, but this time it also simulates the JIT. This is even slower, but allows us to test small code snippets without having to retranslate the entire VM. The code snippets are configured directly in the file. When you run it, it does part of the translation process (but only enough to execute your specific code) and then runs the code. When the JIT kicks in, the compiled loop is shown in a PyGame window. You can then inspect it at your leisure and when you quit the window, the code continues executing. In order for this to work, you need to have pygame and graphviz installed and in your PATH.

shell.py

This script sets all the environment variables as if for translating the VM, and the drops you into an interactive Python prompt. You can type terminal() to drop into a system shell (%COMSPEC% on Windows $SHELL or /bin/sh on Unices) which then has all the environment variables set up that you need to do manual partial translations or similar things.

rsqueakvm package

Subpackages

rsqueakvm.model package

Submodules
rsqueakvm.model.base module
class W_AbstractObjectWithClassReference(space, w_class)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

Objects with arbitrary class (ie not CompiledMethod, SmallInteger or Float).

change_class(space, w_class)[source]
fillin(space, g_self)[source]
getclass(space)[source]

Return Squeak class.

guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

invariant()[source]
pointers_become_one_way(space, from_w, to_w)[source]
repr_classname = 'W_AbstractObjectWithClassReference'
repr_content()[source]
safe_getclass(space)[source]
w_class = None
class W_AbstractObjectWithIdentityHash[source]

Bases: rsqueakvm.model.base.W_Object

Object with explicit hash (ie all except small ints and floats).

UNASSIGNED_HASH = 0
become(w_other)[source]

Become swaps two objects. False means swapping failed

can_become(w_other)[source]
fillin(space, g_self)[source]
gethash()[source]

Return 31-bit hash value.

hash = 0
invariant()[source]
post_become_one_way(w_to)[source]
rehash()[source]
repr_classname = 'W_AbstractObjectWithIdentityHash'
setchar(n0, character)[source]
class W_Object[source]

Bases: object

Root of Squeak model, abstract.

as_repr_string()[source]
at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

become(other)[source]

Become swaps two objects. False means swapping failed

bytes_per_slot = 4
bytesize()[source]

Return bytesize that conforms to Blue Book.

The reported size may differ from the actual size in Spy’s object space, as memory representation varies depending on PyPy translation.

change_class(space, w_class)[source]
class_shadow(space)[source]

Return internal representation of Squeak class.

classname(space)[source]

Get the name of the class of the receiver

clone(space)[source]
fetch(space, n0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

fillin(space, g_self)[source]
fillin_finalize(space, g_self)[source]
fillin_weak(space, g_self)[source]
getclass(space)[source]

Return Squeak class.

gethash()[source]

Return 31-bit hash value.

getword(n0)[source]
guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

has_class()[source]

All Smalltalk objects should have classes. Unfortuantely for bootstrapping the metaclass-cycle and during testing, that is not true for some W_PointersObjects

instsize()[source]

Return the number of slots of the object reserved for instance variables (not number of bytes). Only returns something non-zero for W_PointersObjects, because all other classes in this model hierarchy represent varsized classes (except for SmallInteger).

invariant()[source]
is_array_object()[source]
is_class(space)[source]

Return true, if the receiver seems to be a class. We can not be completely sure about this (non-class objects might be used as class).

is_nil(space)[source]

Return True, if the receiver represents the nil object in the given Object Space.

is_positive(space)[source]
is_same_object(other)[source]

Compare object identity. This should be used instead of directly using is everywhere in the interpreter, in case we ever want to implement it differently (which is useful e.g. for proxies). Also, SmallIntegers and Floats need a different implementation.

pointers_become_one_way(space, from_w, to_w)[source]
post_become_one_way(w_to)[source]
repr_classname = 'W_Object'
repr_content()[source]
safe_getclass(space)[source]
selector_string()[source]
setword(n0, r_uint_value)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

store(space, n0, w_value)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

str_content()[source]
trace_pointers(space)[source]
unwrap_array(space)[source]
unwrap_char_as_byte(space)[source]
unwrap_float(space)[source]
unwrap_int(space)[source]
unwrap_int64(space)[source]
unwrap_rbigint(space)[source]
unwrap_string(space)[source]
unwrap_uint(space)[source]
varsize()[source]

Return number of slots in the of variable-sized part (not number of bytes). Not necessarily number of bytes. Variable sized objects are those created with #new:.

calculate_and_cache(w_object)[source]
rsqueakvm.model.block_closure module
class W_BlockClosure(space, w_outerctxt, startpc, numArgs, size, stack=None)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

bytes_per_slot = 1
changed()
clone(space)[source]
create_frame(space, arguments=[])[source]
empty_stack = []
fetch(space, index0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

fetch_all(space)[source]
fillin(space, g_self)[source]
fillin_finalize(space, g_self)[source]
get_stacksize()[source]
getclass(space)[source]

Return Squeak class.

instsize()[source]

Return the number of slots of the object reserved for instance variables (not number of bytes). Only returns something non-zero for W_PointersObjects, because all other classes in this model hierarchy represent varsized classes (except for SmallInteger).

numArgs()[source]
pointers_become_one_way(space, from_w, to_w)[source]
repr_classname = 'W_BlockClosure'
set_numArgs(numArgs)[source]
set_stack(lst)[source]
set_startpc(pc)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

startpc()[source]
store(space, index0, w_value)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

store_all(space, lst_w)[source]
tempsize()[source]
trace_pointers(space)[source]
varsize()[source]

Return number of slots in the of variable-sized part (not number of bytes). Not necessarily number of bytes. Variable sized objects are those created with #new:.

version = <rsqueakvm.util.version.Version object>
w_method()[source]
w_outerContext()[source]
w_receiver()[source]
rsqueakvm.model.character module
class W_Character(value)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

Boxed char value.

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

clone(space)[source]
fetch(space, n0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

fillin(space, g_self)[source]
getclass(space)[source]

Return Character from special objects array.

gethash()[source]

Return 31-bit hash value.

guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

invariant()[source]
is_same_object(other)[source]

Compare object identity. This should be used instead of directly using is everywhere in the interpreter, in case we ever want to implement it differently (which is useful e.g. for proxies). Also, SmallIntegers and Floats need a different implementation.

repr_classname = 'W_Character'
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

store(space, n0, w_obj)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

str_content()[source]
unwrap_char_as_byte(space)[source]
rsqueakvm.model.compiled_methods module
class CompiledMethodHeader(header_word)[source]

Bases: object

class SpurCompiledMethodHeader(header_word)[source]

Bases: rsqueakvm.model.compiled_methods.CompiledMethodHeader

static has_primitive_bit_set(header_word)[source]
class V3CompiledMethodHeader(header_word)[source]

Bases: rsqueakvm.model.compiled_methods.CompiledMethodHeader

class W_CompiledMethod(space, bytecount=0, header=0)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

My instances are methods suitable for interpretation by the virtual machine. This is the only class in the system whose instances intermix both indexable pointer fields and indexable integer fields.

The current format of a CompiledMethod is as follows:

header (4 bytes) literals (4 bytes each) bytecodes (variable)

An optional method trailer can be part of the bytecodes part.

as_string(markBytecode=0)[source]
at0(space, index0)
atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

bytecode_string(markBytecode=0)[source]
bytecodeoffset()
bytes_per_slot = 1
clone(space)[source]
compiled_in()[source]
compute_frame_size()
constant_compiledin_class()
constant_lookup_class()
create_frame(space, receiver, arguments=[], s_fallback=None)[source]
end_pc()
fetch_bytecode(pc)
fillin(space, g_self)[source]
get_identifier_string()[source]
getbytes()[source]
getclass(space)[source]

Return Squeak class.

getheader()
getliteral(index)
getliteralsize()
guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

guess_containing_classname()[source]
headersize()[source]
initialize_literals(number_of_literals, space, initializing=False)[source]
invariant()[source]
is_array_object()[source]
literalat0(space, index0)
literalatput0(space, index0, w_value, initializing=False)[source]
lookup_class = None
lookup_selector = '<unknown>'
pointers_become_one_way(space, from_w, to_w)[source]
post_init()[source]
primitive()
repr_classname = 'W_CompiledMethod'
safe_compiled_in()[source]
safe_identifier_string()[source]
set_lookup_class_and_name(w_class, selector)[source]
setbytes(bytes)[source]
setchar(index0, character)[source]
setheader(space, header, initializing=False)[source]
setliteral(index, w_lit)[source]
setliterals(literals)[source]
size()
store(space, index0, w_v)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

str_content()[source]
tempsize()
trace_pointers(space)[source]
update_compiledin_class_from_literals()[source]
class W_PreSpurCompiledMethod(space, bytecount=0, header=0)[source]

Bases: rsqueakvm.model.compiled_methods.W_CompiledMethod

setheader(space, header, initializing=False)[source]
class W_SpurCompiledMethod(space, bytecount=0, header=0)[source]

Bases: rsqueakvm.model.compiled_methods.W_CompiledMethod

Handles the specialities of the method header in Spur

setbytes(bytes)[source]
setchar(index0, character)[source]
setheader(space, header, initializing=False)[source]
update_primitive_index()[source]
rsqueakvm.model.display module
class W_16BitDisplayBitmap(space, size, depth)[source]

Bases: rsqueakvm.model.display.W_DirectDisplayBitmap

getword(n)[source]
repr_classname = 'W_16BitDisplayBitmap'
setword(n, word)[source]
swap_pixels(word)[source]
class W_32BitDisplayBitmap(space, size, depth)[source]

Bases: rsqueakvm.model.display.W_DirectDisplayBitmap

repr_classname = 'W_32BitDisplayBitmap'
class W_DirectDisplayBitmap(space, size, depth)[source]

Bases: rsqueakvm.model.display.W_DisplayBitmap

force_rectange_to_screen(left, right, top, bottom)[source]
repr_classname = 'W_DirectDisplayBitmap'
class W_DisplayBitmap(space, size, depth)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

can_become(w_other)[source]

TODO implement _become() for this class. Impossible due to _immutable_fields_?

clone(space)[source]
display()[source]
flush_to_screen()[source]
getclass(space)[source]

Return Squeak class.

getword(n)[source]
guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

invariant()[source]
is_array_object()[source]
relinquish_display()[source]
repr_classname = 'W_DisplayBitmap'
repr_content()[source]
setword(n, word)[source]
setwords(lst)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

take_over_display()[source]
unwrap_string(space)[source]
class W_MappingDisplayBitmap(space, size, depth)[source]

Bases: rsqueakvm.model.display.W_DisplayBitmap

force_rectange_to_screen(left, right, top, bottom)[source]
repr_classname = 'W_MappingDisplayBitmap'
set_pixelbuffer_word(n, word)[source]
take_over_display()[source]
word_from_pixel(x, y)[source]
from_words_object(w_obj, form)[source]
rsqueakvm.model.numeric module
class W_AbstractFloat(value)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

clone(space)[source]
fetch(space, n0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

fillin(space, g_self)[source]
fillin_fromwords(space, high, low)[source]
getclass(space)[source]

Return Float from special objects array.

gethash()[source]

Return 31-bit hash value.

getvalue()[source]
guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

is_same_object(other)[source]

Compare object identity. This should be used instead of directly using is everywhere in the interpreter, in case we ever want to implement it differently (which is useful e.g. for proxies). Also, SmallIntegers and Floats need a different implementation.

setvalue(v)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

store(space, n0, w_obj)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

str_content()[source]
unwrap_float(space)[source]
unwrap_string(space)[source]
class W_Float(value)[source]

Bases: rsqueakvm.model.numeric.W_AbstractFloat

Boxed float value.

fillin_fromwords(space, high, low)[source]
getvalue()[source]
repr_classname = 'W_Float'
setvalue(v)[source]
store(space, n0, w_obj)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

class W_LargeInteger(space, w_class)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithClassReference

bytes_per_slot = 1
is_array_object()[source]
is_positive(space)[source]
repr_classname = 'W_LargeInteger'
class W_LargeIntegerBig(space, w_class, value, size=0)[source]

Bases: rsqueakvm.model.numeric.W_LargeInteger

Large integer using rbigints

at0(space, n0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, n0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

clone(space)[source]
fillin(space, g_self)[source]
repr_classname = 'W_LargeIntegerBig'
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

str_content()[source]
unwrap_float(space)[source]
unwrap_int(space)[source]
unwrap_int64(space)[source]
unwrap_long_untranslated(space)[source]
unwrap_rbigint(space)[source]
unwrap_string(space)[source]
unwrap_uint(space)[source]
class W_LargeIntegerWord(space, w_class, value, size)[source]

Bases: rsqueakvm.model.numeric.W_LargeInteger

at0(space, n0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, n0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

clone(space)[source]
fillin(space, g_self)[source]
repr_classname = 'W_LargeIntegerWord'
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

str_content()[source]
unwrap_float(space)[source]
unwrap_int64(space)[source]
unwrap_long_untranslated(space)[source]
unwrap_rbigint(space)[source]
unwrap_string(space)[source]
unwrap_uint(space)[source]
class W_MutableFloat(value)[source]

Bases: rsqueakvm.model.numeric.W_AbstractFloat

Balloon frequently converts 32-bit words into Floats from within the image. If we give a normal W_Float and let Balloon mutate the words to fill it in, we always have to abort any trace because we’re forcing a quasi-immutable. So just for those cases where someone in the image is creating floats using `new’ (in storage_classes.py), we use W_MutableFloat instances, which do not declare they’re value as quasi-immutable.

getvalue()[source]
repr_classname = 'W_MutableFloat'
setvalue(v)[source]
store(space, n0, w_obj)[source]

Floats are stored in big-endian (PowerPC) order

class W_MutableSmallInteger(value)[source]

Bases: rsqueakvm.model.numeric.W_SmallInteger

set_value(v)[source]
value
class W_SmallInteger(value)[source]

Bases: rsqueakvm.model.base.W_Object

Boxed integer value

clone(space)[source]
fillin(space, g_self)[source]

This is only called for Large Integers that for us fit in SmallIntegers

getclass(space)[source]

Return Squeak class.

gethash()[source]

Return 31-bit hash value.

guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

invariant()[source]
is_positive(space)[source]
is_same_object(other)[source]

Compare object identity. This should be used instead of directly using is everywhere in the interpreter, in case we ever want to implement it differently (which is useful e.g. for proxies). Also, SmallIntegers and Floats need a different implementation.

repr_classname = 'W_SmallInteger'
str_content()[source]
unwrap_char_as_byte(space)[source]
unwrap_float(space)[source]
unwrap_int(space)[source]
unwrap_int64(space)[source]
unwrap_long_untranslated(space)[source]
unwrap_rbigint(space)[source]
unwrap_uint(space)[source]
value
calculate_exposed_size_for_big_int(value)[source]
rsqueakvm.model.pointers module
class W_PointersObject(space, w_class, size, weak=False)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

Common object.

as_cached_object_get_shadow(space)[source]
as_class_get_shadow(space)[source]
as_context_get_shadow(space)[source]
as_methoddict_get_shadow(space)[source]
as_observed_get_shadow(space)[source]
as_special_get_shadow(space, TheClass)[source]
assert_strategy()[source]
at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

change_class(space, w_class)[source]
clone(space)[source]
fetch(space, n0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

fetch_all(space)
fillin(space, g_self)[source]
fillin_weak(space, g_self)[source]
getclass(space)[source]

Return Squeak class.

guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

has_class()[source]

All Smalltalk objects should have classes. Unfortuantely for bootstrapping the metaclass-cycle and during testing, that is not true for some W_PointersObjects

has_space()[source]
has_strategy()[source]
instsize()[source]

Return the number of slots of the object reserved for instance variables (not number of bytes). Only returns something non-zero for W_PointersObjects, because all other classes in this model hierarchy represent varsized classes (except for SmallInteger).

invariant()[source]
is_class(space)[source]

Return true, if the receiver seems to be a class. We can not be completely sure about this (non-class objects might be used as class).

is_weak()[source]
pointers_become_one_way(space, from_w, to_w)[source]
repr_classname = 'W_PointersObject'
repr_content()[source]
safe_getclass(space)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

space()[source]
store(space, n0, w_value)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

store_all(space, collection)
store_strategy(strategy)[source]
strategy = None
trace_pointers(space)[source]
unwrap_array(space)
unwrap_char(space)[source]
rsqueakvm.model.variable module
class W_BytesObject(space, w_class, size)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithClassReference

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

bytes_per_slot = 1
clone(space)[source]
fillin(space, g_self)[source]
getbytes()[source]
getchar(n0)[source]
getrbigint()
invariant()[source]
is_array_object()[source]
is_positive(space)[source]
mutate()[source]
repr_classname = 'W_BytesObject'
selector_string()[source]
setbytes(lst)[source]
setchar(n0, character)[source]
short_at0(space, index0)[source]
short_atput0(space, index0, w_value)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

str_content()[source]
unwrap_int64(space)[source]
unwrap_long_untranslated(space)[source]
unwrap_rbigint(space)[source]
unwrap_string(space)[source]
unwrap_uint(space)[source]
class W_WordsObject(space, w_class, size)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithClassReference

at0(space, index0)[source]

Access variable-sized part, as by Object>>at:.

Return value depends on layout of instance. Byte objects return bytes, word objects return words, pointer objects return pointers. Compiled method are treated special, if index0 within the literalsize returns pointer to literal, otherwise returns byte (ie byte code indexing starts at literalsize).

atput0(space, index0, w_value)[source]

Access variable-sized part, as by Object>>at:put:.

Semantics depend on layout of instance. Byte objects set bytes, word objects set words, pointer objects set pointers. Compiled method are treated special, if index0 within the literalsize sets pointer to literal, otherwise patches bytecode (ie byte code indexing starts at literalsize).

clone(space)[source]
convert_to_bytes_layout(wordsize)[source]
fillin(space, g_self)[source]
getchar(n0)[source]
getword(n)[source]
getwords()[source]
invariant()[source]
is_array_object()[source]
repr_classname = 'W_WordsObject'
setchar(n0, character)[source]
setword(n, word)[source]
setwords(lst)[source]
short_at0(space, index0)[source]
short_atput0(space, index0, w_value)[source]
size()[source]

Return the number of “slots” or “items” in the receiver object. This means different things for different objects. For ByteObject, this means the number of bytes, for WordObject the number of words, for PointerObject the number of pointers (regardless if it’s varsized or not).

unwrap_string(space)
Module contents

Squeak model.

W_Object
W_SmallInteger
W_MutableSmallInteger
W_AbstractObjectWithIdentityHash
W_AbstractFloat
W_Float W_MutableFloat

W_Character W_PointersObject W_AbstractObjectWithClassReference

W_LargeInteger
W_LargeIntegerWord W_LargeIntegerBig

W_BytesObject W_WordsObject

W_CompiledMethod
W_SpurCompiledMethod W_PreSpurCompiledMethod

rsqueakvm.plugins package

Subpackages
rsqueakvm.plugins.database package
Submodules
rsqueakvm.plugins.database.model module
class DBType[source]

Bases: object

class W_DBObject(space, w_class, size, weak=False, w_id=None, cache=None)[source]

Bases: rsqueakvm.model.pointers.W_PointersObject

class_name(space)[source]
fetch(space, n0)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

is_same_object(other)[source]

Compare object identity. This should be used instead of directly using is everywhere in the interpreter, in case we ever want to implement it differently (which is useful e.g. for proxies). Also, SmallIntegers and Floats need a different implementation.

static next_id()[source]
repr_classname = 'W_DBObject'
state = <rsqueakvm.plugins.database.model.W_DBObject_State instance>
store(space, n0, w_value)[source]

Access fixed-size part, maybe also variable-sized part (we have to consult the Blue Book).

class W_DBObject_State[source]
create_table_if_neccessary(space, class_name, connection)[source]
get_column_type(class_name, n0)[source]
get_column_types(class_name)[source]
init_column_types_if_neccessary(class_name, size)[source]
set_column_type(class_name, position, value)[source]
alter_sql(class_name, n0, dbtype)[source]
create_sql(class_name)[source]
insert_sql(class_name)[source]
select_sql(class_name, n0)[source]
update_sql(class_name, n0)[source]
Module contents
class CConfig[source]
SQLITE_BLOB = None
SQLITE_DONE = None
SQLITE_FLOAT = None
SQLITE_INTEGER = None
SQLITE_NULL = None
SQLITE_ROW = None
SQLITE_TEXT = None
class DBManager[source]

Bases: object

close(db_pointer)[source]
connect(db_class, filename)[source]
connection()[source]
cursor(cursor_handle)[source]
execute(space, db, sql, args=None)[source]
get_connection(db_handle)[source]
class SQLConnection(db_class, filename)[source]

Bases: object

close()[source]
connect(db_class, filename)[source]
cursor()[source]
execute(space, sql, args=None)[source]
class SQLCursor(connection)[source]

Bases: object

bind_query_argument(space, w_value, query, i)[source]
close()[source]
execute(space, sql, args=None)[source]
next(space)[source]
raw_next(space)[source]
class Statement(w_connection, sql)[source]

Bases: object

close()[source]
class StatementCache(w_connection)[source]

Bases: object

all_statements()[source]
get_holder(sql)[source]
get_or_make(sql)[source]
invalidate()[source]
class StatementHolder[source]

Bases: object

rsqueakvm.plugins.immutability package
Submodules
rsqueakvm.plugins.immutability.bytes module

Immutable W_BytesObject Implementation.

class W_Immutable_BytesObject(space, w_cls, bytes)[source]

Bases: rsqueakvm.model.variable.W_BytesObject

W_BytesObject subclass with immutable bytes.

rsqueakvm.plugins.immutability.pointers module

Immutable W_PointersObject Implementation.

POINTERS_CLASSES

A list of all immutable W_PointersObject subclasses. The position of each class in the list correlates to its number of storage slots (0 no storage, 1 has one storage slot, …). The last class in the list is an immutable W_PointersObject subclass with variable storage size.

POINTERS_CLASS_ITER

Unrolling iterable of POINTERS_CLASSES.

STORAGE_ATTR_TEMPLATE

Storage attribute template.

MAX_FIXED_SLOTS

Number of immutable subclasses with fixed number of slots to generate.

class W_AbstractImmutable_PointersObject(space, w_cls)[source]

Bases: rsqueakvm.model.pointers.W_PointersObject

Abstract W_PointersObject subclass for immutable pointers objects.

class_shadow(space)[source]
Returns:Class shadow stored in self.strategy slot.
fetch(space, n0)[source]
Raises:NotImplementedError
getclass(space)[source]
Returns:Class from class shadow stored in self.strategy slot.
size()[source]
Raises:NotImplementedError
class W_Immutable_PointersObject(space, w_cls, pointers_w)[source]

Bases: rsqueakvm.plugins.immutability.pointers.W_AbstractImmutable_PointersObject

W_PointersObject subclass with immutable storage of variable size.

fetch(space, n0)[source]
Raises:NotImplementedError
size()[source]
Raises:NotImplementedError
generate_fixed_immutable_subclass(n_storage)[source]

Generate W_PointersObject subclass with immutable storage of fixed size.

Parameters:n_storage – Number of storage slots.
Returns:Immutable W_PointersObject subclass with fixed slots.
select_immutable_pointers_class(storage)[source]

Select immutable W_PointersObject subclass for a given pointers storage. If there is no immutable W_PointersObject subclass with the right fixed storage size, it returns the immutable subclass with variable storage size.

Parameters:storage – Pointers to store.
Returns:Immutable W_PointersObject subclass.
rsqueakvm.plugins.immutability.words module

Immutable W_WordsObject Implementation.

class W_Immutable_WordsObject(space, w_cls, words)[source]

Bases: rsqueakvm.model.variable.W_WordsObject

W_WordsObject subclass with immutable words.

Module contents

Base functions for ImmutabilityPlugin.

WRITE_OPERATIONS

A list of all write operations to be stubbed out by immutable_class(cls) decorator.

immutable_class(cls)[source]

This function decorates classes, so that is_immutable returns True and all WRITE_OPERATIONS are implemented as NoOps.

Parameters:cls – The target class.
Returns:The decorated class.
patch_w_object()[source]

Add W_Object.is_immutable which by default returns False.

rsqueakvm.plugins.vmdebugging package
Submodules
rsqueakvm.plugins.vmdebugging.hooks module
class JitIface[source]

Bases: rpython.rlib.jit.JitHookInterface

after_compile(debug_info)[source]

A hook called after a loop has compiled assembler, called with JitDebugInfo instance. Overwrite for custom behavior

after_compile_bridge(debug_info)[source]

A hook called after a bridge is compiled, called with JitDebugInfo instance, overwrite for custom behavior

before_compile(debug_info)[source]

A hook called after a loop is optimized, before compiling assembler, called with JitDebugInfo instance. Overwrite for custom behavior

before_compile_bridge(debug_info)[source]

A hook called before a bridge is compiled, but after optimizations are performed. Called with instance of debug_info, overwrite for custom behavior

on_abort(reason, jitdriver, greenkey, greenkey_repr, logops, operations)
on_trace_too_long(jitdriver, greenkey, greenkey_repr)
prepare_abort(reason, jitdriver, greenkey, greenkey_repr, logops, operations)[source]
prepare_compile_hook(jitdriver, debug_info, is_bridge)[source]
prepare_trace_too_long(jitdriver, greenkey, greenkey_repr)[source]
wrapped_compiled_hook(jitdriver, debug_info, is_bridge)
make_hook(args, func)[source]
rsqueakvm.plugins.vmdebugging.model module
DebugMergePoint(space, name, repr_of_resop, jd_name, call_depth, call_id, w_greenkey)[source]
GuardOp(space, name, offset, repr_of_resop, hash)[source]
WrappedOp(space, name, offset, repr_of_resop)[source]
method_from_greenkey(space, jitdriver, greenkey)[source]
wrap_debug_info(space, debug_info, is_bridge=False)[source]
wrap_greenkey(space, jitdriver, greenkey, greenkey_repr)[source]
wrap_oplist(space, logops, operations, ops_offset=None)[source]
Module contents
Submodules
rsqueakvm.plugins.database_plugin module
rsqueakvm.plugins.file_plugin module
class FilePlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

primitiveDirectoryCreate(interp, s_frame, w_rcvr, dir_path)[source]
primitiveDirectoryDelete(interp, s_frame, w_rcvr, dir_path)[source]
primitiveDirectoryDelimitor(interp, s_frame, w_rcvr)[source]
primitiveDirectoryLookup(interp, s_frame, w_file_directory, full_path, index)[source]
primitiveDirectorySetMacTypeAndCreator(interp, s_frame, w_rcvr, filename, type, creator)[source]
primitiveFileAtEnd(interp, s_frame, w_rcvr, fd)[source]
primitiveFileClose(interp, s_frame, w_rcvr, fd)[source]
primitiveFileDelete(interp, s_frame, w_rcvr, file_path)[source]
primitiveFileFlush(interp, s_frame, w_rcvr, fd)[source]
primitiveFileGetPosition(interp, s_frame, w_rcvr, fd)[source]
primitiveFileOpen(interp, s_frame, w_rcvr, file_path, w_writeable_flag)[source]
primitiveFileRead(interp, s_frame, w_rcvr, fd, target, start, count)[source]
primitiveFileSetPosition(interp, s_frame, w_rcvr, fd, position)[source]
primitiveFileSize(interp, s_frame, w_rcvr, fd)[source]
primitiveFileStdioHandles(interp, s_frame, w_rcvr)[source]
primitiveFileTruncate(interp, s_frame, w_rcvr, fd, position)[source]
primitiveFileWrite(interp, s_frame, w_rcvr, fd, content, start, count)[source]
smalltalk_timestamp(space, sec_since_epoch)[source]
rsqueakvm.plugins.immutability_plugin module

RSqueak/VM plugin which provides support for immutable objects.

Immutable objects can be created as copy of existing objects or from a list of arguments. The package ImmutableObjects, located in /repository, needs to be loaded in the image.

class ImmutabilityPlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

setup()[source]

Called when enabled during instantiation.

primitiveImmutableFrom(interp, s_frame, w_cls, w_obj)[source]

Creates an immutable copy of a given Smalltalk object.

Parameters:
  • interp – The interpreter proxy.
  • s_frame – The stack frame.
  • w_cls – The imutable objects target class.
  • w_obj – The Smalltalk object to produce an immutable copy from.
Returns:

An immutable copy of w_obj with class w_cls.

Raises:

PrimitiveFailedError

primitiveImmutableFromArgs(interp, s_frame, argcount)[source]

Returns an immutable instance of the receiver (which is a class) with all fields initialized with the arguments given.

Parameters:
  • interp – The interpreter proxy.
  • s_frame – The stack frame.
  • argcount – The number of arguments.
Returns:

An immutable object.

Raises:

PrimitiveFailedError

primitiveIsImmutable(interp, s_frame, w_recv)[source]

Tests if w_recv is an immutable object.

Parameters:
  • interp – The interpreter proxy.
  • s_frame – The stack frame.
  • w_recv – The receiver object.
Returns:

w_true if w_recv is immutable object, otherwise w_false.

rsqueakvm.plugins.large_integers module
class LargeIntegers[source]

Bases: rsqueakvm.plugins.plugin.Plugin

make_func(name, primitive)[source]
minimum_bytelen_for(val)[source]
primDigitAdd(interp, s_frame, rcvr, arg)[source]
primDigitCompare(interp, s_frame, rcvr, arg)[source]
primDigitDivNegative(interp, s_frame, rcvr, arg, neg)[source]
primDigitMultiplyNegative(interp, s_frame, rcvr, arg, neg)[source]
primDigitSubtract(interp, s_frame, rcvr, arg)[source]
primNormalizeNegative(interp, s_frame, w_rcvr)[source]
primNormalizePositive(interp, s_frame, w_rcvr)[source]
rsqueakvm.plugins.locale_plugin module
class LocalePlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

primitiveCountry(interp, s_frame, w_rcvr)[source]
primitiveLanguage(interp, s_frame, w_rcvr)[source]
rsqueakvm.plugins.misc_primitive_plugin module
class MiscPrimitivePlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

compare_ascii(string1, string2)[source]
compare_collated(string1, string2, order)[source]
is_ascii_order(w_order)[source]
primitiveCompareString(interp, s_frame, w_rcvr, string1, string2, w_order)[source]
primitiveIndexOfAsciiInString(interp, s_frame, w_rcvr, thechar, thebytes, start)[source]
primitiveStringHash(interp, s_frame, w_rcvr, thebytes, initialHash)[source]
rsqueakvm.plugins.plugin module
class Plugin[source]

Bases: object

call(name, interp, s_frame, argcount, w_method)[source]
expose_primitive(wrap_func=None, **kwargs)[source]
is_enabled()[source]
is_optional()[source]
name()[source]
patch()[source]

Called once in the beginning of main.py to patch interpreter.

setup()[source]

Called when enabled during instantiation.

static startup(space, argv)[source]

Called after image has been loaded and space has been set up.

rsqueakvm.plugins.profiler_plugin module
class LogFile[source]

Bases: object

close()[source]
fileno()[source]
isopen()[source]
open(name)[source]
class ProfilerPlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

is_optional()[source]
patch()[source]

Called once in the beginning of main.py to patch interpreter.

setup()[source]

Called when enabled during instantiation.

disableJitlog(interp, s_frame, w_rcvr)[source]
disableProfiler(interp, s_frame, w_rcvr)[source]
enableJitlog(interp, s_frame, w_rcvr, fileno)[source]
enableProfiler(interp, s_frame, w_rcvr, fileno, period)[source]
func(interp, s_frame, w_rcvr)[source]
patch_compiled_method()[source]
patch_interpreter()[source]
rsqueakvm.plugins.ruby_plugin module
rsqueakvm.plugins.simulation module
class SimulationPlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

simulate(w_name, signature, interp, s_frame, argcount, w_method)[source]
simulateNumeric(code, interp, s_frame, argcount, w_method)[source]
rsqueakvm.plugins.socket_plugin module
class SocketPlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

expose_primitive(wrap_func=None, **kwargs)[source]
get_last_lookup()[source]
is_socket(space, w_int)[source]
set_last_lookup(v)[source]
static startup(space, argv)[source]
class W_SocketHandle(family, socketType)[source]

Bases: rsqueakvm.model.base.W_AbstractObjectWithIdentityHash

can_read()[source]
close()[source]
connect(w_bytes, port)[source]
destroy()[source]
getclass(space)[source]

Return Squeak class.

guess_classname()[source]

Get the name of the class of the receiver without using a space. If the shadow of the class of the receiver is not yet initialized, this might not return a correct name.

isipv4()[source]
isipv6()[source]
make_socket()[source]
recv(count)[source]
repr_classname = 'W_SocketHandle'
send(data)[source]
ensure_socket(w_socket)[source]
non_blocking_recv(self, count)[source]
primitiveHasSocketAccess(interp, s_frame, w_rcvr)[source]
primitiveInitializeNetwork(interp, s_frame, w_rcvr, w_semaphore)[source]
primitiveResolverAbortLookup(interp, s_frame, argcount)[source]
primitiveResolverAddressLookupResult(interp, s_frame, argcount)[source]
primitiveResolverError(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfo(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoFamily(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoNext(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoProtocol(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoResult(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoSize(interp, s_frame, argcount)[source]
primitiveResolverGetAddressInfoType(interp, s_frame, argcount)[source]
primitiveResolverGetNameInfo(interp, s_frame, argcount)[source]
primitiveResolverGetNameInfoHostResult(interp, s_frame, argcount)[source]
primitiveResolverGetNameInfoHostSize(interp, s_frame, argcount)[source]
primitiveResolverGetNameInfoServiceResult(interp, s_frame, argcount)[source]
primitiveResolverGetNameInfoServiceSize(interp, s_frame, argcount)[source]
primitiveResolverHostNameResult(interp, s_frame, argcount)[source]
primitiveResolverHostNameSize(interp, s_frame, argcount)[source]
primitiveResolverLocalAddress(interp, s_frame, argcount)[source]
primitiveResolverNameLookupResult(interp, s_frame, w_rcvr)[source]
primitiveResolverStartAddressLookup(interp, s_frame, argcount)[source]
primitiveResolverStartNameLookup(interp, s_frame, w_rcvr, hostname)[source]
primitiveResolverStatus(interp, s_frame, w_rcvr)[source]
primitiveSocketAbortConnection(interp, s_frame, argcount)[source]
primitiveSocketAccept3Semaphores(interp, s_frame, argcount)[source]
primitiveSocketAddressGetPort(interp, s_frame, argcount)[source]
primitiveSocketAddressSetPort(interp, s_frame, argcount)[source]
primitiveSocketBindTo(interp, s_frame, argcount)[source]
primitiveSocketCloseConnection(interp, s_frame, w_rcvr, w_handle)[source]
primitiveSocketConnectTo(interp, s_frame, argcount)[source]
primitiveSocketConnectToPort(interp, s_frame, w_rcvr, w_handle, w_hostaddr, port)[source]
primitiveSocketConnectionStatus(interp, s_frame, w_rcvr, w_socket)[source]
primitiveSocketCreate3Semaphores(interp, s_frame, w_rcvr, netType, socketType, rcvBufSize, sendBufSize, sema, readSema, writeSema)[source]
primitiveSocketDestroy(interp, s_frame, w_rcvr, w_handle)[source]
primitiveSocketError(interp, s_frame, argcount)[source]
primitiveSocketGetOptions(interp, s_frame, argcount)[source]
primitiveSocketListenOnPortBacklogInterface(interp, s_frame, argcount)[source]
primitiveSocketListenWithBacklog(interp, s_frame, argcount)[source]
primitiveSocketListenWithOrWithoutBacklog(interp, s_frame, argcount)[source]
primitiveSocketLocalAddress(interp, s_frame, argcount)[source]
primitiveSocketLocalAddressResult(interp, s_frame, argcount)[source]
primitiveSocketLocalAddressSize(interp, s_frame, argcount)[source]
primitiveSocketLocalPort(interp, s_frame, argcount)[source]
primitiveSocketReceiveDataAvailable(interp, s_frame, w_rcvr, w_handle)[source]
primitiveSocketReceiveDataBufCount(interp, s_frame, w_rcvr, w_handle, w_target, start, count)[source]
primitiveSocketReceiveUDPDataBufCount(interp, s_frame, argcount)[source]
primitiveSocketRemoteAddress(interp, s_frame, argcount)[source]
primitiveSocketRemoteAddressResult(interp, s_frame, argcount)[source]
primitiveSocketRemoteAddressSize(interp, s_frame, argcount)[source]
primitiveSocketRemotePort(interp, s_frame, argcount)[source]
primitiveSocketSendDataBufCount(interp, s_frame, w_rcvr, w_handle, data, start, count)[source]
primitiveSocketSendDone(interp, s_frame, w_rcvr, fd)[source]
primitiveSocketSendUDPDataBufCount(interp, s_frame, argcount)[source]
primitiveSocketSetOptions(interp, s_frame, argcount)[source]
rsqueakvm.plugins.squeak_s_s_l module
rsqueakvm.plugins.tailcall_plugin module
class TailcallPlugin[source]

Bases: rsqueakvm.plugins.plugin.Plugin

is_optional()[source]
patch()[source]

Called once in the beginning of main.py to patch interpreter.

setup()[source]

Called when enabled during instantiation.

primitiveIsTailcallContext(interp, s_frame, w_recv)[source]
primitiveMarkTailcallContext(interp, s_frame, w_recv)[source]
rsqueakvm.plugins.unix_o_s_process_plugin module
rsqueakvm.plugins.v_m_debugging module
rsqueakvm.plugins.win32_o_s_process_plugin module
Module contents
class PluginRegistry[source]

Bases: object

static add(instance)[source]
disabled_names = ['RubyPlugin']
enabled_names = ['SimulationPlugin', 'FilePlugin', 'ImmutabilityPlugin', 'LargeIntegers', 'LocalePlugin', 'MiscPrimitivePlugin', 'ProfilerPlugin', 'SocketPlugin', 'TailcallPlugin']
enabled_plugins = [<rsqueakvm.plugins.simulation.SimulationPlugin object>, <rsqueakvm.plugins.file_plugin.FilePlugin object>, <rsqueakvm.plugins.immutability_plugin.ImmutabilityPlugin object>, <rsqueakvm.plugins.large_integers.LargeIntegers object>, <rsqueakvm.plugins.locale_plugin.LocalePlugin object>, <rsqueakvm.plugins.misc_primitive_plugin.MiscPrimitivePlugin object>, <rsqueakvm.plugins.profiler_plugin.ProfilerPlugin object>, <rsqueakvm.plugins.socket_plugin.SocketPlugin object>, <rsqueakvm.plugins.tailcall_plugin.TailcallPlugin object>]
get_plugins()[source]
print_plugin_overview()[source]
should_load_plugin(localfile)[source]

rsqueakvm.primitives package

Submodules
rsqueakvm.primitives.arithmetic module
rsqueakvm.primitives.array_stream module
func(interp, s_frame, w_receiver, n0, w_value)[source]
rsqueakvm.primitives.block_closure module
activateClosure(interp, w_block, args_w)[source]
func(interp, s_frame, w_rcvr)[source]
rsqueakvm.primitives.constants module
rsqueakvm.primitives.control module
rsqueakvm.primitives.input_output module
func(interp, s_frame, w_rcvr)[source]
rsqueakvm.primitives.mirror module
expose_mirror_primitive(code)[source]
rsqueakvm.primitives.misc module
fake_bytes_left(interp)[source]
func(interp, s_frame, w_receiver, attr_id)[source]
next_object(space, list_of_objects, w_obj)[source]
rsqueakvm.primitives.storage module
func(interp, s_frame, w_class, bytecount, header)[source]
get_instances_array(interp, s_frame, w_class=None, store=True, some_instance=False)[source]
get_instances_array_gc(interp, w_class=None)[source]
get_instances_array_trace(interp, w_class, some_instance=False)[source]
next_instance(space, list_of_objects, w_obj)[source]
primitive_fetch(interp, s_frame, w_rcvr, n0)[source]
primitive_store(interp, s_frame, w_rcvr, n0, w_value)[source]
rsqueakvm.primitives.system module
current_gc_old_mem(*args)[source]
current_gc_time(*args)[source]
current_gc_total_mem(*args)[source]
current_gc_young_mem(*args)[source]
func(interp, s_frame, w_rcvr, index)[source]
translated_or_default(default)[source]
Module contents
class PrimitiveHolder[source]

Bases: object

assert_class(interp, w_obj, w_class)[source]
assert_pointers(w_obj)[source]
assert_valid_index(space, n0, w_obj)[source]
assert_valid_inst_index(space, n0, w_obj)[source]
expose_also_as(*codes)[source]
expose_alternative_primitive(code, **kwargs)[source]
expose_primitive(code, wrap_func=None, **kwargs)[source]
make_prim(i)[source]
make_simulation(code)[source]
primitive_name_from_code(code)[source]
unwrap_alternatives(unwrap_specs=None)[source]
wrap_primitive(unwrap_spec=None, no_result=False, result_is_new_frame=False, may_context_switch=True, clean_stack=True, compiled_method=False)[source]

rsqueakvm.util package

Submodules
rsqueakvm.util.bitmanipulation module
class BitSplitter[source]

Bases: dict

rsqueakvm.util.cells module
Cell(initial_value, type=<type 'object'>)[source]
QuasiConstant(initial_value, cls=None)[source]
class QuasiConstantCache[source]

Bases: rpython.rlib.cache.Cache

class QuasiConstantMixin(initial_value)[source]

Bases: object

Mixin for constant values that can be edited, but will be promoted to a constant when jitting.

activate()[source]
changed()[source]
deactivate()[source]
get()[source]
is_set()[source]
set(value)[source]
rsqueakvm.util.dialog module
ask_question(string)[source]
get_file()[source]
rsqueakvm.util.logparser module
class Trace(trace)[source]

Bases: object

addbridge(trace)[source]
keep_op(op)[source]
parse(remove_debug, remove_main_labels, remove_all_labels)[source]
parse_bridges()[source]
parse_loop()[source]
extract_traces(file, remove_debug=True, remove_main_labels=True, remove_all_labels=False)[source]
rsqueakvm.util.platform_calls module
get_memory_usage()[source]
rsqueakvm.util.progress module
class Progress(stages, silent=False)[source]

Bases: object

next_stage(steps)[source]
update(new_steps=-1)[source]
rsqueakvm.util.shell module
class Shell(interp, space, code=None)[source]

Bases: object

db(code)[source]

!db to drop to pdb (untranslated) or gdb (translated)

help(code)[source]

!help to print this help

load(code)[source]

!load Filename to read and execute a file

method(code)[source]

!method Class to define a method. End with !!

q(code)[source]

!q for quitting

raw_input(delim)[source]
reload(c)[source]
reset_readline()[source]
run()[source]
set_interp(interp)[source]
set_readline()[source]
trace(code)[source]

!trace on|off to enable/disable interp tracing

cmd(func)[source]
completer(text, state, completions=None)[source]
untranslated_cmd(func)[source]
rsqueakvm.util.stream module
class Stream(filename=None, inputfile=None, data=None)[source]

Bases: object

Simple input stream. Data is completely read into memory. Constructor can raise OSError.

be_32bit()[source]
be_64bit()[source]
bytes2dword_with_correct_endianness(bytes)[source]
bytes2qword_with_correct_endianness(bytes)[source]
close()[source]
length()[source]
next()[source]
next_bytes(n)[source]
next_qword()[source]
next_short()[source]
peek()[source]
peek_bytes(n)[source]
reset()[source]
reset_count()[source]
skipbytes(jump)[source]
skipwords(jump)[source]
chrs2int(b)[source]
chrs2long(b)[source]
runpack(fmt, arg)[source]
swapped_chrs2int(b)[source]
swapped_chrs2long(b)[source]
rsqueakvm.util.system module
expose_options(config)[source]
translation_options()[source]
rsqueakvm.util.version module
class Version[source]

Bases: object

class VersionMixin[source]

Bases: object

changed()[source]
version = <rsqueakvm.util.version.Version object>
elidable_for_version(numargs, promote='all')[source]
elidable_for_version_iff(numargs, promote='all', cond=None)[source]
Module contents

Submodules

rsqueakvm.constants module

decode_alternate_compiled_method_header(header)[source]

Decode 30-bit method header and apply new format.

(index 0) 16 bits: number of literals (#numLiterals) (index 16) 1 bit: has primitive (index 17) 1 bit: whether a large frame size is needed (#frameSize) (index 18) 6 bits: number of temporary variables (#numTemps) (index 24) 4 bits: number of arguments to the method (#numArgs) (index 28) 2 bits: reserved for an access modifier (00-unused, 01-private, 10-protected, 11-public)

decode_compiled_method_header(header)[source]

Decode 30-bit method header and apply new format.

(index 0) 9 bits: main part of primitive number (#primitive) (index 9) 8 bits: number of literals (#numLiterals) (index 17) 1 bit: whether a large frame size is needed (#frameSize) (index 18) 6 bits: number of temporary variables (#numTemps) (index 24) 4 bits: number of arguments to the method (#numArgs) (index 28) 1 bit: high-bit of primitive number (#primitive) (index 29) 1 bit: flag bit, ignored by the VM (#flag)

find_selectorindex(selector)[source]
init_special_objects_mapping(constant_objects_in_special_object_table)[source]

rsqueakvm.display module

class NullDisplay[source]

Bases: object

defer_updates(flag)[source]
flip(pixels, x, y, x2, y2)[source]
get_dropped_filename()[source]
get_next_event(time=0)[source]
get_pixelbuffer()[source]
get_plain_pixelbuffer()[source]
has_clipboard_text()[source]
has_interrupts_pending()[source]
is_headless()[source]
mouse_button()[source]
mouse_point()[source]
next_keycode()[source]
peek_keycode()[source]
render(force=False)[source]
set_clipboard_text(text)[source]
set_full_screen(flag)[source]
set_interrupt_key(space, encoded_key)[source]
set_title(title)[source]
set_video_mode(w, h, d)[source]
class SDLCursorClass[source]

Bases: object

Cursor modification not yet implemented in RSDL2?

cursor_words_to_bytes(bytenum, words)[source]

In Squeak, only the upper 16bits of the cursor form seem to count (I’m guessing because the code was ported over from 16-bit machines), so this ignores the lower 16-bits of each word.

instance = None
set(data_words, w, h, x, y, mask_words=None)[source]
class SDLDisplay(title, highdpi, software_renderer, altf4quit)[source]

Bases: rsqueakvm.display.NullDisplay

close()[source]
copy_pixels(pixels, start, stop)[source]
create_window_and_renderer(x, y, width, height)[source]
defer_updates(flag)[source]
dequeue_event()[source]
fix_key_code_case()[source]
flip(pixels, x, y, x2, y2)[source]
full_damage()[source]
get_clipboard_text()[source]
get_dropevent(time, c_type, event)[source]
get_dropped_filename()[source]
get_modifier_mask(shift)[source]
get_mouse_event_buttons_and_mods()[source]
get_next_event(time=0)[source]
get_next_key_event(key_event_type, time)[source]
get_next_mouse_event(time)[source]
get_next_mouse_wheel_event(time, event)[source]
handle_keyboard_event(c_type, event)[source]
handle_mouse_button(c_type, event)[source]
handle_mouse_move(c_type, event)[source]
handle_textinput_event(event)[source]
handle_windowevent(c_type, event)[source]
has_clipboard_text()[source]
has_interrupts_pending()[source]
has_queued_events()[source]
insert_padding_event()[source]
is_control_key(key_ord)[source]
is_headless()[source]
is_modifier_key(key_ord)[source]
lock()[source]
mouse_button()[source]
mouse_point()[source]
next_keycode()[source]
peek_keycode()[source]
pump_events()[source]
queue_event(evt)[source]
record_damage(x, y, w, h)[source]
render(force=False)[source]
reset_damage()[source]
set_clipboard_text(text)[source]
set_full_screen(flag)[source]
set_interrupt_key(space, encoded_key)[source]
set_title(title)[source]
set_video_mode(w, h, d)[source]
unlock()[source]
exception SqueakInterrupt[source]

Bases: exceptions.Exception

rsqueakvm.error module

exception BlockCannotReturnError(msg='<no message>')[source]

Bases: rsqueakvm.error.SmalltalkException

exception_type = 'BlockCannotReturnError'
exception CleanExit(msg='')[source]

Bases: rsqueakvm.error.Exit

exception CorruptImageError(msg)[source]

Bases: rsqueakvm.error.Exit

exception Exit(msg)[source]

Bases: exceptions.Exception

exception FatalError(msg='<no message>')[source]

Bases: rsqueakvm.error.SmalltalkException

exception_type = 'FatalError'
exception MissingBytecode(bytecodename)[source]

Bases: rsqueakvm.error.SmalltalkException

Bytecode not implemented yet.

exception_type = 'MissingBytecode'
exception PrimitiveFailedError(msg='', name=None)[source]

Bases: rsqueakvm.error.SmalltalkException

exception_type = 'PrimitiveFailedError'
exception PrimitiveNotYetWrittenError(msg='', name=None)[source]

Bases: rsqueakvm.error.PrimitiveFailedError

exception_type = 'PrimitiveNotYetWrittenError'
exception SimulatedPrimitiveFailedError(msg, w_name, s_class)[source]

Bases: rsqueakvm.error.PrimitiveFailedError

exception_type = 'SimulatedPrimitiveFailedError'
exception SmalltalkException(msg='<no message>')[source]

Bases: exceptions.Exception

Base class for Smalltalk exception hierarchy

exception_type = 'SmalltalkException'
exception UnwrappingError(msg='', name=None)[source]

Bases: rsqueakvm.error.PrimitiveFailedError

exception_type = 'UnwrappingError'
exception WrapperException(msg='', name=None)[source]

Bases: rsqueakvm.error.PrimitiveFailedError

exception_type = 'WrapperException'
exception WrappingError(msg='', name=None)[source]

Bases: rsqueakvm.error.PrimitiveFailedError

exception_type = 'WrappingError'

rsqueakvm.interpreter module

exception ContextSwitchException(s_new_context)[source]

Bases: exceptions.Exception

General Exception that causes the interpreter to leave the current context.

print_trace()[source]
type = 'ContextSwitch'
exception FreshReturn(exception)[source]

Bases: exceptions.Exception

exception IntLocalReturn(intresult)[source]

Bases: rsqueakvm.interpreter.LocalReturn

value(space)[source]
exception IntNonLocalReturn(s_home_context, intvalue)[source]

Bases: rsqueakvm.interpreter.NonLocalReturn

value(space)[source]
class Interpreter(space, image=None, trace_important=False, trace=False, evented=True, interrupts=True)[source]

Bases: object

check_for_interrupts(s_frame)[source]
check_sigusr(s_frame)[source]
create_toplevel_context(w_receiver, selector='', w_selector=None, w_arguments=[])[source]
event_time_now()[source]

Answer the number of milliseconds since the millisecond clock was last reset or rolled over.

getblockmethod(s_context)[source]
getreceiverclass(s_context)[source]
interpret_toplevel(w_frame)[source]
is_tracing()[source]
jit_driver = <rpython.rlib.jit.JitDriver object>
jitted_check_for_interrupt(s_frame)[source]
loop(w_active_context)[source]
loop_bytecodes(s_context, may_context_switch)[source]
perform(w_receiver, selector='', w_selector=None, w_arguments=[])[source]
perform_headless(w_receiver, w_selector, w_arguments)[source]
print_padded(str)[source]
quick_check_for_interrupt(s_frame, dec=1)[source]
resume_driver = <rpython.rlib.jit.JitDriver object>
signal_memory_error(s_frame)[source]
stack_frame(s_frame, s_sender, may_context_switch)[source]
step(context)[source]
time_now()[source]

Answer the UTC microseconds since the Smalltalk epoch. The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds between the two epochs according to RFC 868

unwind_context_chain(start_context, target_context, return_value, s_current_context)[source]
unwind_context_chain_local(target_context, return_value, s_current_context)[source]
unwind_primitive_simulation(start_context, error_code)[source]
exception LocalReturn[source]

Bases: rsqueakvm.interpreter.Return

static make(space, w_value)[source]
exception NonLocalReturn(s_home_context)[source]

Bases: rsqueakvm.interpreter.Return

static make(space, s_home_context, w_value)[source]
exception NonVirtualReturn(s_target_context, s_current_context, w_result)[source]

Bases: exceptions.Exception

print_trace()[source]
exception ProcessSwitch(s_new_context, forced=False)[source]

Bases: rsqueakvm.interpreter.ContextSwitchException

This causes the interpreter to switch the executed context. Triggered when switching the process.

type = 'Process Switch'
exception Return[source]

Bases: exceptions.Exception

value(space)[source]
exception ReturnFromTopLevel(object, s_current_frame)[source]

Bases: exceptions.Exception

exception StackOverflow(s_new_context)[source]

Bases: rsqueakvm.interpreter.ContextSwitchException

This causes the current jit-loop to be left, dumping all virtualized objects to the heap. This breaks performance, so it should rarely happen. In case of severe performance problems, execute with -t and check if this occurrs.

type = 'Stack Overflow'
exception WrappedLocalReturn(w_result)[source]

Bases: rsqueakvm.interpreter.LocalReturn

value(space)[source]
exception WrappedNonLocalReturn(s_home_context, w_value)[source]

Bases: rsqueakvm.interpreter.NonLocalReturn

value(space)[source]
get_printable_location(pc, self, method, w_class, blockmethod)[source]
resume_get_printable_location(pc, self, method, w_class)[source]

rsqueakvm.interpreter_bytecodes module

bytecode_implementation(parameter_bytes=0)[source]
initialize_bytecode_names()[source]
initialize_bytecode_table()[source]
initialize_return_bytecodes()[source]
make_call_primitive_bytecode(primitive, selector, argcount, store_pc=False)[source]
make_call_primitive_bytecode_classbased(a_class_name, a_primitive, alternative_class_name, alternative_primitive, selector, argcount)[source]
make_quick_call_primitive_bytecode(primitive_index, argcount)[source]
make_send_selector_bytecode(selector, argcount)[source]
class unrolling_int[source]

Bases: int, rpython.rlib.unroll.SpecTag

rsqueakvm.interpreter_debugging module

activate_debugging()[source]
activating_init(original)[source]

rsqueakvm.key_constants module

rsqueakvm.main module

class Config(space, argv)[source]

Bases: object

ensure_path()[source]
find_executable(executable)[source]
get_exedir()[source]
init_from_arguments()[source]
init_from_ini()[source]
parse_args(argv, skip_bad=False)[source]
sanitize()[source]
active_context(space)[source]
compile_code(interp, w_receiver, code, isclass=False, make_selector=True)[source]
create_context(interp, w_receiver, selector, stringarg)[source]
create_process(interp, s_frame)[source]
entry_point(argv)[source]
execute_context(interp, s_frame)[source]
get_int_parameter(argv, idx, arg)[source]
get_parameter(argv, idx, arg)[source]
make_initial_space()[source]
print_error(str)[source]
result_string(w_result)[source]
safe_entry_point(argv)[source]

rsqueakvm.objspace module

class ForceHeadless(space)[source]

Bases: object

class ObjSpace[source]

Bases: object

display()[source]
executable_path()[source]
get_image_name()[source]
get_special_selector(selector)[source]
get_system_attribute(idx)[source]
init_system_attributes(argv)[source]
make_special_objects()[source]
newClosure(w_outer_ctxt, pc, numArgs, copiedValues)[source]
runtime_setup(interp, exepath, argv, image_name, image_args_idx)[source]
set_system_attribute(idx, value)[source]
set_w_display(w_obj)
set_w_interrupt_semaphore(w_obj)
set_w_jit_hook_receiver(w_obj)
set_w_jit_hook_selector(w_obj)
set_w_low_space_semaphore(w_obj)
set_w_timerSemaphore(w_obj)
smalltalk_at(string)[source]

A helper to find a class by name in modern Squeak images

unwrap_array(w_array)[source]
unwrap_char_as_byte(w_char)[source]
unwrap_float(w_v)[source]
unwrap_int(w_value)[source]
unwrap_int64(w_value)[source]
unwrap_positive_uint(w_value)[source]
unwrap_rbigint(w_value)[source]
unwrap_string(w_object)[source]
unwrap_uint(w_value)[source]
w_display()
w_interrupt_semaphore()
w_jit_hook_receiver()
w_jit_hook_selector()
w_low_space_semaphore()
w_timerSemaphore()
window_title()[source]
wrap_bool(b)[source]
wrap_char(c)[source]
wrap_float(i)[source]
wrap_int(val)[source]
wrap_list(lst_w)[source]

Converts a Python list of wrapped objects into a wrapped smalltalk array

wrap_list_unroll_safe(lst_w)[source]
wrap_rbigint(val)[source]
wrap_rbigint_direct(val, w_class=None)[source]
wrap_smallint_unsafe(val)[source]
wrap_string(string)[source]
wrap_symbol(string)[source]
wrap_wordint_direct(val, w_class)[source]
add_special_properties()[source]
empty_object()[source]
empty_symbol()[source]

rsqueakvm.squeakimage module

class AncientReader(imageReader, version, stream, space)[source]

Bases: rsqueakvm.squeakimage.NonSpurReader

Reader strategy for pre-4.0 images

class BaseReaderStrategy(imageReader, version, stream, space)[source]

Bases: object

assign_prebuilt_constants()[source]
continue_read_header()[source]
fillin_finalize()[source]
fillin_w_object(chunk)[source]
fillin_w_objects()[source]
fillin_weak_w_object(chunk)[source]
fillin_weak_w_objects()[source]
g_class_of(chunk)[source]
get_bytes_of(chunk)[source]
init_compactclassesarray()[source]
init_g_object(chunk)[source]
init_g_objects()[source]
init_w_object(chunk)[source]
init_w_objects()[source]
isbiginteger(g_object)[source]
isfloat(g_object)[source]
islargeinteger(g_object)[source]
issignedinteger(g_object)[source]
isunsignedinteger(g_object)[source]
len_bytes_of(chunk)[source]
log(msg)[source]
lookup_in_assocs_g(array_g, lookup_name)[source]
read_and_initialize()[source]
read_body()[source]
skip_to_body()[source]
smalltalk_g_at(lookup_name)[source]
special_g_object(index)[source]
special_g_object_safe(index)[source]
class GenericObject[source]

Bases: object

Intermediate representation of squeak objects. To establish all pointers as object references, ImageReader creates instances of GenericObject from the image chunks, and uses them as starting point for the actual create of rsqueakvm.model classes.

as_string()[source]
classname()[source]
fillin(space)[source]
fillin_finalize(space)[source]
fillin_weak(space)[source]
format
get_bytes()[source]
get_class()[source]
get_hash()[source]
get_pointers()[source]
get_ruints(required_len=-1)[source]
hash
init_g_class()[source]
init_pointers()[source]
init_w_object(space)[source]
initialize(chunk, reader, space)[source]
initialize_char(untagged_value, reader, space)[source]
initialize_int(value, reader, space)[source]
isinitialized()[source]
isweak()[source]
len_bytes()[source]
size
class ImageChunk(size, format, classid, hash, data=None)[source]

Bases: object

A chunk knows the information from the header, but the body of the object is not decoded yet.

as_g_object(reader, space)[source]
iscompact()[source]
class ImageReader(space, stream, logging_enabled=False)[source]

Bases: object

choose_reader_strategy()[source]
chunklist
chunks
compactclasses
create_image()[source]
decode_pointers(g_object, space, end=-1)[source]
g_class_of(chunk)[source]
intcache
read_all()[source]
read_header()[source]
read_version()[source]
try_read_version()[source]
class ImageVersion(magic, is_big_endian, is_64bit, has_closures, has_floats_reversed, is_spur=False)[source]

Bases: object

configure_stream(stream)[source]
class NonSpurReader(imageReader, version, stream, space)[source]

Bases: rsqueakvm.squeakimage.BaseReaderStrategy

decode_pointers(g_object, space, end=-1)[source]
g_class_of(chunk)[source]
init_compactclassesarray()[source]

from the blue book (CompiledMethod Symbol Array PseudoContext LargePositiveInteger nil MethodDictionary Association Point Rectangle nil TranslatedMethod BlockContext MethodContext nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil )

init_g_objects()[source]
instantiate(g_object)[source]
0 no fields

1 fixed fields only (all containing pointers) 2 indexable fields only (all containing pointers) 3 both fixed and indexable fields (all containing pointers) 4 both fixed and indexable weak fields (all containing pointers).

5 unused 6 indexable word fields only (no pointers) 7 indexable long (64-bit) fields (only in 64-bit images)

8-11 indexable byte fields only (no pointers) (low 2 bits are low 2 bits of size)

12-15 compiled methods:
# of literal oops specified in method header, followed by indexable bytes (same interpretation of low 2 bits as above)
isblockclosure(g_object)[source]
isbytes(g_object)[source]
ischar(g_object)[source]
iscompiledmethod(g_object)[source]
ispointers(g_object)[source]
isweak(g_object)[source]
iswords(g_object)[source]
literal_count_of_method_header(untagged_header)[source]
read_1wordobjectheader()[source]
read_2wordobjectheader()[source]
read_3wordobjectheader()[source]
read_body()[source]
read_object()[source]
class SpurImageWriter(interp, filename)[source]

Bases: object

convert_instspec_to_spur(spec)[source]
fixed_and_indexable_size_for(obj)[source]
frame_size_for(obj)[source]
headers_for_hash_numfields(Class, Hash, size)[source]
image_header_size = 64
insert_class_into_classtable(obj)[source]
len_and_header(obj)[source]
old_to_spur_specs = [0, 1, 2, 3, 4, -1, 10, 9, 16, 16, 16, 16, 24, 24, 24, 24]
padding_for(length)[source]
reserve(obj)[source]
ruint64_tobytes(i)[source]
trace_image(s_frame)[source]
trace_until_finish()[source]
word_size = 4
write_and_trace(obj)[source]
write_bytes_object(obj)[source]
write_compiled_method(obj)[source]
write_file_header(w_special_objects)[source]
write_header(hdrsize, sz, obj, oop)[source]
write_last_bridge()[source]
write_pointers_object(obj)[source]
write_word(word)[source]
write_words_object(obj)[source]
class SpurReader(imageReader, version, stream, space)[source]

Bases: rsqueakvm.squeakimage.BaseReaderStrategy

FREE_OBJECT_CLASS_INDEX_PUN = 0
SLOTS_MASK = -72057594037927936
continue_read_header()[source]
decode_pointers(g_object, space, end=-1)[source]
g_class_of(chunk)[source]
instantiate(g_object)[source]

0 no fields 1 fixed fields only (all containing pointers) 2 indexable fields only (all containing pointers) 3 both fixed and indexable fields (all containing pointers) 4 indexable weak fields (all containing pointers) 5 fixed weak fields (all containing pointers) 6-8 unused

9 indexable 64 bit fields (no pointers) 10-11 indexable 32 bit fields (no pointers) 12-15 indexable 16 bit fields (no pointers) 16-23 indexable byte fields (no pointers)

for the above, the lower bits are the lower bits of the size
24-31 compiled methods:
# of literal oops specified in method header, followed by indexable bytes (same interpretation of low bits as above)
isblockclosure(g_object)[source]
isbytes(g_object)[source]
ischar(g_object)[source]
iscompiledmethod(g_object)[source]
ispointers(g_object)[source]
isweak(g_object)[source]
iswords(g_object)[source]
literal_count_of_method_header(untagged_header)[source]
major_class_index_of(classid)[source]
minor_class_index_of(classid)[source]
read_body()[source]
read_object()[source]
words_for(size)[source]
class SqueakImage(reader)[source]

Bases: object

find_symbol(space, reader, symbol)[source]
special(index)[source]

rsqueakvm.storage module

class AbstractCachingShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractGenericShadow

Abstract shadow maintaining an empty version object for the underlying Smalltalk object. The version object allows jit-related optimizations.

changed()
get_storage(w_self)
repr_classname = 'AbstractCachingShadow'
set_storage(w_self, storage)
version = None
class AbstractGenericShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.ListStrategy

This class behaves just like a generic list storage strategy, but allows safe subclassing for more specific, non-singleton strategies.

become(w_other)
get_storage(w_self)
is_shadow()
onesided_become(w_other)
own_fetch(i)
own_size()
own_store(i, val)
promote_if_neccessary()
set_storage(w_self, storage)
w_self()
class AbstractStrategy(space, w_self, size, w_class)[source]

Bases: object

Subclasses of this handle the information contained in Smalltalk objects. The common API allows to store and fetch elements from object slots. Every object has some kind of storage representation attached. Some subclasses (those with *Shadow in their name) contain additional information, required by the VM. These ‘shadows’ not only manage the memory of their Smalltalk objects, but are also the VM-internal representation of these objects.

append(w_self, list_w)[source]
become(w_other)[source]
delete(w_self, start, end)[source]
fetch(w_self, index0)[source]
fetch_all(w_self)[source]
get_storage(w_self)
getclass()[source]
getname()[source]
handles_become()[source]

Only shadows are non-singletons and actually handle become

insert(w_self, index0, list_w)[source]
instantiate(w_self, w_class)[source]
is_shadow()[source]
onesided_become(w_other)[source]
pop(w_self, index0)[source]
promote_if_neccessary()[source]
provides_getname = False
repr_classname = 'AbstractStrategy'
set_storage(w_self, storage)
size(w_self)[source]
slice(w_self, start, end)[source]
store(w_self, index0, value)[source]
store_all(w_self, elements)[source]
strategy_factory()[source]
strategy_switched(w_self)[source]
class AllNilStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
delete(w_self, start, end)
fetch(w_self, index0)
fetch_all(w_self)
generalized_strategy_for(value)
get_storage(w_self)
insert(w_self, index0, list_w)
instantiate_type

alias of AllNilStrategy

pop(w_self, index0)
repr_classname = 'AllNilStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, value)
store_all(w_self, elements)
strategy_switched(w_self)
value()[source]
class CachedObjectShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractCachingShadow

A shadow which treats its contents as jit constants as long as the object is not modified.

fetch(arg0, arg1)
get_storage(w_self)
instantiate_type

alias of CachedObjectShadow

repr_classname = 'CachedObjectShadow'
set_storage(w_self, storage)
store(w_self, n0, w_value)[source]
class CharacterOrNilStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
contained_type

alias of rsqueakvm.model.character.W_Character

delete(w_self, start, end)
fetch(w_self, index0)
fetch_all(w_self)
generalized_strategy_for(value)
get_storage(w_self)
insert(w_self, start, list_w)
instantiate_type

alias of CharacterOrNilStrategy

pop(w_self, index0)
repr_classname = 'CharacterOrNilStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, wrapped_value)
store_all(w_self, elements)
strategy_switched(w_self)
unwrap(w_val)[source]
unwrapped_tagged_value()[source]
wrap(val)[source]
wrapped_tagged_value()[source]
class ExtendableStrategyMetaclass[source]

Bases: rpython.tool.pairtype.extendabletype, rpython.rlib.rstrategies.rstrategies.StrategyMetaclass

class FloatOrNilStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
contained_type

alias of rsqueakvm.model.numeric.W_Float

delete(w_self, start, end)
fetch(w_self, index0)
fetch_all(w_self)
generalized_strategy_for(value)
get_storage(w_self)
insert(w_self, start, list_w)
instantiate_type

alias of FloatOrNilStrategy

pop(w_self, index0)
repr_classname = 'FloatOrNilStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, wrapped_value)
store_all(w_self, elements)
strategy_switched(w_self)
tag_float = 1.7976931348623157e+308
unwrap(w_val)[source]
unwrapped_tagged_value()[source]
wrap(val)[source]
wrapped_tagged_value()[source]
class ListEntry[source]

Bases: object

static build(value, is_instvar)[source]
static is_strong_anyway(value, is_instvar)[source]
class ListStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
delete(w_self, start, end)
fetch(w_self, index0)
fetch_all(w_self)
get_storage(w_self)
insert(w_self, start, list_w)
instantiate_type

alias of ListStrategy

pop(w_self, index0)
repr_classname = 'ListStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, w_value)[source]
store_all(w_self, elements)
strategy_switched(w_self)
class ObserveeShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractGenericShadow

A generic shadow that notifies a single observer object whenever changes are made.

get_storage(w_self)
instantiate_type

alias of ObserveeShadow

repr_classname = 'ObserveeShadow'
set_observer(observer)[source]
set_storage(w_self, storage)
store(w_self, n0, w_value)[source]
class OptimizedConvertFromAllNilMixin[source]

Bases: object

class ShadowMixin[source]

Bases: object

Shadows are non-singleton strategies. They maintain a backpointer to their shadowed W_PointersObject instance. This is a mixin, because it is used at several places in the class tree.

become(w_other)[source]
is_shadow()[source]
onesided_become(w_other)[source]
own_fetch(i)[source]
own_size()[source]
own_store(i, val)[source]
promote_if_neccessary()[source]
w_self()[source]
class SimpleStorageStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractStrategy

Singleton strategies handle ‘simple’ object storage in normal objects, without additional VM-internal information. Depending on the data inside an object, different optimizing strategies are used.

check_index_fetch(w_self, index0)
check_index_range(w_self, start, end)
check_index_store(w_self, index0)
default_value()[source]
get_storage(w_self)
repr_classname = 'SimpleStorageStrategy'
set_storage(w_self, storage)
class SmallIntegerOrNilStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
contained_type

alias of rsqueakvm.model.numeric.W_SmallInteger

delete(w_self, start, end)
fetch(w_self, index0)
fetch_all(w_self)
generalized_strategy_for(value)
get_storage(w_self)
insert(w_self, start, list_w)
instantiate_type

alias of SmallIntegerOrNilStrategy

pop(w_self, index0)
repr_classname = 'SmallIntegerOrNilStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, wrapped_value)
store_all(w_self, elements)
strategy_switched(w_self)
unwrap(w_val)[source]
unwrapped_tagged_value()[source]
wrap(val)[source]
wrapped_tagged_value()[source]
class StrategyFactory(space)[source]

Bases: rpython.rlib.rstrategies.rstrategies.StrategyFactory

empty_storage_type(w_self, size, weak=False)[source]
instantiate_strategy(strategy_type, w_class, w_self=None, initial_size=0)[source]

Return a functional instance of strategy_type. Overwrite this if you need a non-default constructor. The two additional parameters should be ignored for singleton-strategies.

log(w_self, new_strategy, old_strategy=None, new_element=None)[source]

This can be overwritten into a more appropriate call to self.logger.log

set_initial_strategy(w_self, strategy_type, w_class, size, elements=None)[source]

Initialize the strategy and storage fields of w_self. This must be called before switch_strategy or any strategy method can be used. elements is an optional list of values initially stored in w_self. If given, then len(elements) == size must hold.

strategy_singleton_instance(strategy_class, w_class=None)[source]
strategy_singleton_instance_from_cache(strategy_class, w_class)[source]
strategy_type_for(objects, weak=False)[source]

Return the best-fitting strategy to hold all given objects.

switch_strategy(w_self, new_strategy_type, new_element=None)[source]

Switch the strategy of w_self to the new type. new_element can be given as as hint, purely for logging purposes. It should be the object that was added to w_self, causing the strategy switch.

class StrongListEntry(value)[source]

Bases: rsqueakvm.storage.ListEntry

get()[source]
class WeakListEntry(value)[source]

Bases: rsqueakvm.storage.ListEntry

get()[source]
class WeakListStrategy(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.SimpleStorageStrategy

append(w_self, list_w)
delete(w_self, start, end)[source]
fetch(w_self, index0)
fetch_all(w_self)
get_storage(w_self)
insert(w_self, start, list_w)[source]
instantiate_type

alias of WeakListStrategy

pop(w_self, index0)
repr_classname = 'WeakListStrategy'
set_storage(w_self, storage)
size(w_self)
slice(w_self, start, end)
store(w_self, index0, wrapped_value)[source]
store_all(w_self, elements)
strategy_switched(w_self)

rsqueakvm.storage_classes module

class ClassShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractCachingShadow

A shadow for Smalltalk objects that are classes (i.e. used as the class of another Smalltalk object).

attach_s_class(s_other)[source]
changed()[source]
detach_s_class(s_other)[source]
flush_method_caches()[source]
get_instance_kind()
get_storage(w_self)
getname()
inherits_from(s_superclass)[source]
initialize_methoddict()[source]
installmethod(w_selector, w_method)[source]
instantiate_type

alias of ClassShadow

instsize()
isvariable()
lookup(arg0)
make_pointers_object(w_cls, size)[source]
name = '??? (incomplete class info)'
new(extrasize=0)[source]
provides_getname = True
repr_classname = 'ClassShadow'
s_methoddict()
s_superclass()
set_storage(w_self, storage)
store(w_self, n0, w_val)[source]
store_pre_spur_classformat(w_self, n0, w_val)[source]
store_s_methoddict(s_methoddict)[source]
store_spur_classformat(w_self, n0, w_val)[source]
store_w_methoddict(w_methoddict)[source]
store_w_name(w_name)[source]
store_w_superclass(w_class)[source]
superclass_changed(version)[source]
w_methoddict()
exception ClassShadowError(msg='<no message>')[source]

Bases: rsqueakvm.error.SmalltalkException

exception_type = 'ClassShadowError'
class MethodDictionaryShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractGenericShadow

become(w_other)[source]
find_selector(w_selector)[source]
flush_method_cache()[source]
get_storage(w_self)
instantiate_type

alias of MethodDictionaryShadow

notify()[source]
repr_classname = 'MethodDictionaryShadow'
set_storage(w_self, storage)
setup_notification()[source]
store(w_self, n0, w_value)[source]
sync_method_cache()[source]
w_values()[source]

rsqueakvm.storage_contexts module

class ContextPartShadow(space, w_self, size, w_class)[source]

Bases: rsqueakvm.storage.AbstractStrategy

This Shadow handles the entire object storage on its own, ignoring the _storage field in W_PointersObject. The w_self parameter in fetch/store/size etc. is ignored, and the own_fetch/own_store/own_size methods from ShadowMixin should be used instead. This shadow can exist without a W_PointersObject. In order to integrate well with the RPython toolchain (virtualizables and jit), this class actually represents one of two classes, determined by the is_block_context switch.

argument_strings()[source]
become(w_other)
static build_block_context(space, s_home, argcnt, pc)
static build_method_context(space, w_method, w_receiver, arguments=[], closure=None, s_fallback=None)
bytecodePrimAdd(interp, current_bytecode)
bytecodePrimAt(interp, current_bytecode)
bytecodePrimAtEnd(interp, current_bytecode)
bytecodePrimAtPut(interp, current_bytecode)
bytecodePrimBitAnd(interp, current_bytecode)
bytecodePrimBitOr(interp, current_bytecode)
bytecodePrimBitShift(interp, current_bytecode)
bytecodePrimBlockCopy(interp, current_bytecode)
bytecodePrimClass(interp, current_bytecode)
bytecodePrimDiv(interp, current_bytecode)
bytecodePrimDivide(interp, current_bytecode)
bytecodePrimDo(interp, current_bytecode)
bytecodePrimEqual(interp, current_bytecode)
bytecodePrimEquivalent(interp, current_bytecode)
bytecodePrimGreaterOrEqual(interp, current_bytecode)
bytecodePrimGreaterThan(interp, current_bytecode)
bytecodePrimLessOrEqual(interp, current_bytecode)
bytecodePrimLessThan(interp, current_bytecode)
bytecodePrimMakePoint(interp, current_bytecode)
bytecodePrimMod(interp, current_bytecode)
bytecodePrimMultiply(interp, current_bytecode)
bytecodePrimNew(interp, current_bytecode)
bytecodePrimNewWithArg(interp, current_bytecode)
bytecodePrimNext(interp, current_bytecode)
bytecodePrimNextPut(interp, current_bytecode)
bytecodePrimNotEqual(interp, current_bytecode)
bytecodePrimPointX(interp, current_bytecode)
bytecodePrimPointY(interp, current_bytecode)
bytecodePrimSize(interp, current_bytecode)
bytecodePrimSubtract(interp, current_bytecode)
bytecodePrimValue(interp, current_bytecode)
bytecodePrimValueWithArg(interp, current_bytecode)
callPrimitiveBytecode(interp, current_bytecode)
debug_bytecode(interp)
doubleExtendedDoAnythingBytecode(interp, current_bytecode)
duplicateTopBytecode(interp, current_bytecode)
enter_virtual_frame(s_sender)[source]
exitFromHeadlessExecution(selector='', w_message=None)[source]
expected_argument_count()
extendedPushBytecode(interp, current_bytecode)
extendedStoreAndPopBytecode(interp, current_bytecode)
extendedStoreBytecode(interp, current_bytecode)
external_stackpointer()[source]
fetch(ignored_w_self, n0)[source]
fetch_block_context(n0)
fetch_bytecode(pc)[source]
fetch_context_part(n0)[source]
fetch_method_context(n0)
fetch_next_bytecode()[source]
full_stacksize()[source]
get_extra_data()[source]
get_fallback()[source]
get_state()[source]
get_storage(w_self)
gettemp(index)[source]
gettemp_block_context(index)
gettemp_method_context(index0)
has_s_sender()[source]
home_is_self()[source]
home_is_self_block_context()
home_is_self_method_context()
init_temps_and_stack()[source]
initialip()
initialize_temps(space, arguments)
instances_array(w_class)[source]
instantiate_type

alias of ContextPartShadow

is_BlockClosure_ensure()[source]
is_closure_context()[source]
is_closure_context_block_context()
is_closure_context_method_context()
is_privileged_index(n0)[source]
is_returned()[source]
is_shadow()
leave_virtual_frame(vref, ref)[source]
longJumpIfFalseBytecode(interp, current_bytecode)
longJumpIfTrueBytecode(interp, current_bytecode)
longUnconditionalJumpBytecode(interp, current_bytecode)
mark_returned()[source]
method_str()[source]
method_str_block_context()
method_str_method_context()
onesided_become(w_other)
own_fetch(i)
own_size()
own_store(i, val)
pc()[source]
peek(idx)[source]
peek_n(n)[source]
pop()[source]
popStackBytecode(interp, current_bytecode)
pop_and_return_n(n)[source]
pop_n(n)[source]
print_padded_stack(method)[source]
print_stack(method=True)[source]
privileged_block_fields = (5,)
privileged_method_fields = (3, 4)
promote_if_neccessary()
pure_is_block_context()[source]
push(w_v)[source]
pushActiveContextBytecode(interp, current_bytecode)
pushClosureCopyCopiedValuesBytecode(interp, current_bytecode)
pushConstantFalseBytecode(interp, current_bytecode)
pushConstantMinusOneBytecode(interp, current_bytecode)
pushConstantNilBytecode(interp, current_bytecode)
pushConstantOneBytecode(interp, current_bytecode)
pushConstantTrueBytecode(interp, current_bytecode)
pushConstantTwoBytecode(interp, current_bytecode)
pushConstantZeroBytecode(interp, current_bytecode)
pushLiteralConstantBytecode(interp, current_bytecode)
pushLiteralVariableBytecode(interp, current_bytecode)
pushNewArrayBytecode(interp, current_bytecode)
pushReceiverBytecode(interp, current_bytecode)
pushReceiverVariableBytecode(interp, current_bytecode)
pushRemoteTempLongBytecode(interp, current_bytecode)
pushTemporaryVariableBytecode(interp, current_bytecode)
push_all(lst)[source]
remove_s_sender()[source]
repr_classname = 'ContextPartShadow'
reset_pc()
reset_stack()
returnFalseBytecode(interp, current_bytecode)
returnNilBytecode(interp, current_bytecode)
returnReceiverBytecode(interp, current_bytecode)
returnTopFromBlockBytecode(interp, current_bytecode)
returnTopFromMethodBytecode(interp, current_bytecode)
returnTrueBytecode(interp, current_bytecode)
s_home()[source]
s_home_block_context()
s_home_method_context()
s_sender()[source]
secondExtendedSendBytecode(interp, current_bytecode)
sendLiteralSelectorBytecode(interp, current_bytecode)
set_state(t)[source]
set_storage(w_self, storage)
set_top(value, position=0)[source]
settemp(index, w_value)[source]
settemp_block_context(index, w_value)
settemp_method_context(index0, w_value)
shortConditionalJumpBytecode(interp, current_bytecode)
shortUnconditionalJumpBytecode(interp, current_bytecode)
short_str()[source]
singleExtendedSendBytecode(interp, current_bytecode)
singleExtendedSuperBytecode(interp, current_bytecode)
size(ignored_w_self)[source]
stack()[source]
stack_get(index0)[source]
stack_ptr()[source]
stack_put(index0, w_val)[source]
stackdepth()[source]
stackend()[source]
stacksize()[source]
stackstart()[source]
stackstart_block_context()
stackstart_method_context()
store(ignored_w_self, n0, w_value)[source]
storeAndPopReceiverVariableBytecode(interp, current_bytecode)
storeAndPopRemoteTempLongBytecode(interp, current_bytecode)
storeAndPopTemporaryVariableBytecode(interp, current_bytecode)
storeRemoteTempLongBytecode(interp, current_bytecode)
store_block_context(n0, w_value)
store_context_part(n0, w_value)[source]
store_expected_argument_count(argc)
store_initialip(initialip)
store_instances_array(w_class, match_w)[source]
store_method_context(n0, w_value)
store_pc(newpc)[source]
store_s_sender(s_sender)[source]
store_stack_ptr(ptr)[source]
store_stackpointer(size)[source]
store_unwrap_pc(w_pc)[source]
store_w_home(w_home)
store_w_method(w_method)
store_w_receiver(w_receiver)
tempsize()[source]
tempsize_block_context()
tempsize_method_context()
top()[source]
unknownBytecode(interp, current_bytecode)
unwrap_store_eargc(w_value)
unwrap_store_initialip(w_value)
unwrap_store_stackpointer(w_sp1)[source]
w_arguments()[source]
w_arguments_block_context()
w_arguments_method_context()
w_method()[source]
w_method_block_context()
w_method_method_context()
w_receiver()[source]
w_receiver_block_context()
w_receiver_method_context()
w_self()
w_sender()[source]
wrap_eargc()
wrap_initialip()
wrap_pc()[source]
wrap_stackpointer()[source]
class ContextState(name)[source]

Bases: object

num()[source]
states = [InactiveContext, ActiveContext, DirtyContext]
class ExtraContextAttributes[source]

Bases: object

fresh_virtualizable(x)[source]

rsqueakvm.wrapper module

class AssociationWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

static build(space, w_assoc)[source]
key()
static make_w_assoc(space, w_key, w_value)[source]
store_value(w_new)
value()
class CriticalSectionWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.LinkedListWrapper

enter(s_frame)[source]
exit(s_current_frame)[source]
owner()
store_owner(w_new)
test_and_set_owner(s_current_frame)[source]
class FormWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

bits()
create_display_bitmap()[source]
depth()
get_display_bitmap()[source]
height()
store_bits(w_new)
store_depth(new)
store_height(new)
store_width(new)
take_over_display()[source]
width()

Bases: rsqueakvm.wrapper.Wrapper

class LinkedListWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

is_empty_list()[source]
remove(w_link)[source]
class PointWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

store_x(new)
store_y(new)
x()
y()
class ProcessWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.LinkWrapper

is_active_process()[source]
my_list()
priority()
put_to_sleep()[source]
resume(s_current_frame, forced=False)[source]
store_my_list(w_new)
store_suspended_context(w_new)
suspend(s_current_frame)[source]
suspended_context()
transfer_to_self_from(s_old_frame, forced=False)[source]
yield_(s_current_frame)[source]
class PromotingAssociationWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.AssociationWrapper

value()[source]
class SchedulerWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

active_process()
get_process_list(priority)[source]
priority_list()[source]
process_list(priority)[source]
store_active_process(w_new)
wake_highest_priority_process()[source]
class SemaphoreWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.LinkedListWrapper

excess_signals()
signal(s_current_frame, forced=False)[source]
store_excess_signals(new)
wait(s_current_frame)[source]
class VarsizedWrapper(space, w_self)[source]

Bases: rsqueakvm.wrapper.Wrapper

at0(i0)[source]
atput0(i0, w_value)[source]
class Wrapper(space, w_self)[source]

Bases: object

read(index0)[source]
write(index0, w_new)[source]
make_getter(index0)[source]
make_getter_setter(index0)[source]
make_int_getter(index0)[source]
make_int_getter_setter(index0)[source]
make_int_setter(index0)[source]
make_setter(index0)[source]
scheduler(space)[source]
unwrapped_wake_highest_priority_process(space, w_lists)[source]

Module contents

Indices and tables