paul@126 | 1 | /* Program type definitions. */ |
paul@126 | 2 | |
paul@162 | 3 | #include <stdlib.h> |
paul@126 | 4 | #include "types.h" |
paul@126 | 5 | |
paul@126 | 6 | /* Common operations. */ |
paul@126 | 7 | |
paul@162 | 8 | __attr __new(const __table *table, __ref cls, size_t size); |
paul@159 | 9 | |
paul@283 | 10 | __fragment *__new_fragment(unsigned int n); |
paul@283 | 11 | |
paul@283 | 12 | void __newdata_sequence(__attr args[], unsigned int number); |
paul@283 | 13 | |
paul@327 | 14 | #ifdef __HAVE___builtins___dict_dict |
paul@283 | 15 | void __newdata_mapping(__attr args[], unsigned int number); |
paul@327 | 16 | #endif /* __HAVE___builtins___dict_dict */ |
paul@159 | 17 | |
paul@317 | 18 | /* Exception raising. */ |
paul@317 | 19 | |
paul@327 | 20 | #ifdef __HAVE___builtins___exception_io_IOError |
paul@327 | 21 | void __raise_io_error(); |
paul@327 | 22 | #endif /* __HAVE___builtins___exception_io_IOError */ |
paul@327 | 23 | |
paul@306 | 24 | void __raise_memory_error(); |
paul@306 | 25 | void __raise_overflow_error(); |
paul@306 | 26 | void __raise_zero_division_error(); |
paul@305 | 27 | void __raise_type_error(); |
paul@317 | 28 | __attr __ensure_instance(__attr arg); |
paul@317 | 29 | |
paul@317 | 30 | /* Generic invocation operations. */ |
paul@305 | 31 | |
paul@156 | 32 | __attr __invoke(__attr callable, int always_callable, |
paul@156 | 33 | unsigned int nkwargs, __param kwcodes[], __attr kwargs[], |
paul@156 | 34 | unsigned int nargs, __attr args[]); |
paul@126 | 35 | |
paul@126 | 36 | /* Error routines. */ |
paul@126 | 37 | |
paul@126 | 38 | __attr __unbound_method(__attr args[]); |
paul@126 | 39 | |
paul@126 | 40 | /* Generic operations depending on specific program details. */ |
paul@126 | 41 | |
paul@126 | 42 | void __SETDEFAULT(__ref obj, int pos, __attr value); |
paul@159 | 43 | |
paul@126 | 44 | __attr __GETDEFAULT(__ref obj, int pos); |
paul@159 | 45 | |
paul@144 | 46 | int __BOOL(__attr attr); |