1.1 --- a/templates/ops.h Tue Mar 21 18:45:42 2017 +0100
1.2 +++ b/templates/ops.h Thu Mar 23 16:40:57 2017 +0100
1.3 @@ -22,11 +22,15 @@
1.4 #include "types.h"
1.5 #include <string.h> /* for __COPY */
1.6
1.7 +/* Get object reference from attribute. */
1.8 +
1.9 +__ref __VALUE(__attr attr);
1.10 +
1.11 /* Direct access and manipulation of static objects. */
1.12
1.13 __attr __load_static_ignore(__ref obj);
1.14 -__attr __load_static_replace(__ref context, __ref obj);
1.15 -__attr __load_static_test(__ref context, __ref obj);
1.16 +__attr __load_static_replace(__attr context, __ref obj);
1.17 +__attr __load_static_test(__attr context, __ref obj);
1.18
1.19 /* Direct retrieval operations, returning attributes. */
1.20
1.21 @@ -93,24 +97,24 @@
1.22
1.23 /* Context-related operations. */
1.24
1.25 -int __test_context_update(__ref context, __attr attr);
1.26 -__attr __test_context(__ref context, __attr attr);
1.27 -__attr __update_context(__ref context, __attr attr);
1.28 -__attr __test_context_revert(int target, __ref context, __attr attr, __ref contexts[]);
1.29 -__attr __test_context_static(int target, __ref context, __ref value, __ref contexts[]);
1.30 +int __test_context_update(__attr context, __attr attr);
1.31 +__attr __test_context(__attr context, __attr attr);
1.32 +__attr __update_context(__attr context, __attr attr);
1.33 +__attr __test_context_revert(int target, __attr context, __attr attr, __attr contexts[]);
1.34 +__attr __test_context_static(int target, __attr context, __ref value, __attr contexts[]);
1.35
1.36 #define __get_context(__TARGET) (__tmp_contexts[__TARGET])
1.37 -#define __set_context(__TARGET, __ATTR) (__tmp_contexts[__TARGET] = (__ATTR).value)
1.38 -#define __set_private_context(__ATTR) (__tmp_private_context = (__ATTR).value)
1.39 -#define __set_accessor(__ATTR) (__tmp_value = (__ATTR).value)
1.40 -#define __set_target_accessor(__ATTR) (__tmp_target_value = (__ATTR).value)
1.41 +#define __set_context(__TARGET, __ATTR) (__tmp_contexts[__TARGET] = (__ATTR))
1.42 +#define __set_private_context(__ATTR) (__tmp_private_context = (__ATTR))
1.43 +#define __set_accessor(__ATTR) (__tmp_value = (__ATTR))
1.44 +#define __set_target_accessor(__ATTR) (__tmp_target_value = (__ATTR))
1.45
1.46 /* Context testing for invocations. */
1.47
1.48 __attr __unwrap_callable(__attr callable);
1.49 __attr (*__get_function_unchecked(__attr target))(__attr[]);
1.50 -__attr (*__get_function(__ref context, __attr target))(__attr[]);
1.51 -__attr (*__check_and_get_function(__ref context, __attr target))(__attr[]);
1.52 +__attr (*__get_function(__attr context, __attr target))(__attr[]);
1.53 +__attr (*__check_and_get_function(__attr context, __attr target))(__attr[]);
1.54
1.55 /* Parameter position operations. */
1.56