paul@187 | 1 | Object contexts:
|
paul@187 | 2 |
|
paul@187 | 3 | Object Context
|
paul@187 | 4 | ------ -------
|
paul@187 | 5 | function overridable
|
paul@187 | 6 | method defining/originating class
|
paul@187 | 7 | class null
|
paul@187 | 8 | instance self
|
paul@187 | 9 | module null
|
paul@187 | 10 |
|
paul@186 | 11 | Assignment types:
|
paul@186 | 12 |
|
paul@186 | 13 | Assignment of stored value to... Effect on context
|
paul@186 | 14 | -------------------------------- -----------------
|
paul@186 | 15 | local preserved
|
paul@186 | 16 | global (module) preserved
|
paul@187 | 17 | class overridden (if overridable)
|
paul@186 | 18 | instance preserved
|
paul@186 | 19 |
|
paul@187 | 20 | Assignment to a namespace preserves the context except for some class
|
paul@187 | 21 | assignments
|
paul@187 | 22 |
|
paul@187 | 23 | Assigning to classes:
|
paul@187 | 24 |
|
paul@187 | 25 | Assignment of... Effect on context
|
paul@187 | 26 | ---------------- -----------------
|
paul@187 | 27 | function (overridable context) overridden by class (becomes method)
|
paul@187 | 28 | method (existing context) preserved
|
paul@187 | 29 | class (null context) preserved
|
paul@187 | 30 | instance (self context) preserved
|
paul@187 | 31 | module (null context) preserved
|
paul@187 | 32 |
|
paul@187 | 33 | With run-time restrictions on assignment targets:
|
paul@187 | 34 |
|
paul@187 | 35 | Assignment of stored value to... Effect on context Optimised instruction Unoptimised instruction
|
paul@187 | 36 | -------------------------------- ----------------- --------------------- -----------------------
|
paul@187 | 37 | local preserved StoreName
|
paul@187 | 38 | global (module) preserved StoreAddress StoreAttrIndex
|
paul@187 | 39 | instance preserved StoreAttr StoreAttrIndex
|
paul@187 | 40 |
|
paul@187 | 41 | Class assignments are not permitted
|
paul@186 | 42 |
|
paul@186 | 43 | Access types:
|
paul@186 | 44 |
|
paul@186 | 45 | Access to stored value from... Effect on context Optimised instruction Unoptimised instruction
|
paul@186 | 46 | ------------------------------ ----------------- --------------------- -----------------------
|
paul@186 | 47 | local preserved LoadName
|
paul@186 | 48 | global (module) preserved LoadAddress LoadAttrIndex
|
paul@186 | 49 | class preserved LoadAddress LoadAttrIndex
|
paul@186 | 50 | class via instance overridden LoadAddressContext LoadAttrIndex
|
paul@186 | 51 | instance preserved LoadAttr LoadAttrIndex
|
paul@186 | 52 |
|
paul@186 | 53 | Access to a namespace may not preserve the stored context
|