9 months ago | Paul Boddie | raw annotate files changeset graph | Permit the replacement of floating-point values in locally-referenced objects. To achieve this, a result target parameter has been introduced in callable signatures alongside the existing context parameter so that references to objects can be propagated to operations that are able to replace the value of such objects. Result target objects are currently supported only for locals and intermediate results in functions and methods, with assignments to locals or the storage of intermediate results involving the copying of any given floating-point objects instead of merely referencing them. Such distinct copies may then be used as result targets when locals or intermediate result locations are subsequently reused. Value replacement avoids the allocation of temporary objects that can quickly dominate execution time in programs repeatedly performing large numbers of floating-point calculations. | value-replacement |
1 # operation flags 2 OP_ASSIGN = 'OP_ASSIGN' 3 OP_DELETE = 'OP_DELETE' 4 OP_APPLY = 'OP_APPLY' 5 6 SC_LOCAL = 1 7 SC_GLOBAL_IMPLICIT = 2 8 SC_GLOBAL_EXPLICT = 3 9 SC_FREE = 4 10 SC_CELL = 5 11 SC_UNKNOWN = 6 12 13 CO_OPTIMIZED = 0x0001 14 CO_NEWLOCALS = 0x0002 15 CO_VARARGS = 0x0004 16 CO_VARKEYWORDS = 0x0008 17 CO_NESTED = 0x0010 18 CO_GENERATOR = 0x0020 19 CO_GENERATOR_ALLOWED = 0 20 CO_FUTURE_DIVISION = 0x2000 21 CO_FUTURE_ABSIMPORT = 0x4000 22 CO_FUTURE_WITH_STATEMENT = 0x8000 23 CO_FUTURE_PRINT_FUNCTION = 0x10000