2007-04-06 01:09:58 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2020-02-16 08:10:43 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2020-06-21 14:15:17 +00:00
|
|
|
#include "tools/qfcc/include/class.h"
|
|
|
|
#include "tools/qfcc/include/codespace.h"
|
|
|
|
#include "tools/qfcc/include/diagnostic.h"
|
|
|
|
#include "tools/qfcc/include/dot.h"
|
|
|
|
#include "tools/qfcc/include/debug.h"
|
|
|
|
#include "tools/qfcc/include/def.h"
|
|
|
|
#include "tools/qfcc/include/defspace.h"
|
|
|
|
#include "tools/qfcc/include/emit.h"
|
|
|
|
#include "tools/qfcc/include/expr.h"
|
|
|
|
#include "tools/qfcc/include/function.h"
|
|
|
|
#include "tools/qfcc/include/obj_file.h"
|
|
|
|
#include "tools/qfcc/include/obj_type.h"
|
|
|
|
#include "tools/qfcc/include/options.h"
|
|
|
|
#include "tools/qfcc/include/qfcc.h"
|
|
|
|
#include "tools/qfcc/include/strpool.h"
|
|
|
|
#include "tools/qfcc/include/struct.h"
|
|
|
|
#include "tools/qfcc/include/symtab.h"
|
|
|
|
#include "tools/qfcc/include/type.h"
|
|
|
|
#include "tools/qfcc/include/value.h"
|
2004-01-29 07:43:05 +00:00
|
|
|
|
|
|
|
struct dstring_s;
|
|
|
|
options_t options;
|
|
|
|
int num_linenos;
|
|
|
|
pr_lineno_t *linenos;
|
|
|
|
pr_info_t pr;
|
2020-02-16 08:10:43 +00:00
|
|
|
type_t type_Class;
|
|
|
|
type_t type_SEL;
|
|
|
|
type_t type_id;
|
2023-08-21 08:37:56 +00:00
|
|
|
void algebra_print_type_str (struct dstring_s *str, const struct type_s *type);
|
|
|
|
void algebra_print_type_str (struct dstring_s *str, const struct type_s *type){}
|
|
|
|
void algebra_encode_type (struct dstring_s *encoding,
|
|
|
|
const struct type_s *type);
|
|
|
|
void algebra_encode_type (struct dstring_s *encoding,
|
|
|
|
const struct type_s *type){}
|
|
|
|
__attribute__((const)) int algebra_type_size (const struct type_s *type);
|
|
|
|
int algebra_type_size (const struct type_s *type){return 0;}
|
|
|
|
__attribute__((const)) int algebra_type_width (const struct type_s *type);
|
|
|
|
int algebra_type_width (const struct type_s *type){return 0;}
|
|
|
|
__attribute__((const)) int algebra_type_assignable (const type_t *dst, const type_t *src);
|
|
|
|
int algebra_type_assignable (const type_t *dst, const type_t *src){return 0;}
|
|
|
|
__attribute__((const)) int is_algebra (const type_t *type);
|
|
|
|
int is_algebra (const type_t *type){return 0;}
|
[qfcc] Use scatter-gather for multivec expressions
This makes working with them much easier, and the type system reflects
what's in the multi-vector. Unfortunately, that does mean that large
algebras will wind up having a LOT of types, but it allows for efficient
storage of sparse multi-vectors:
auto v = 4*(e1 + e032 + e123);
results in:
0005 0213 1:0008<00000008>4:void 0:0000<00000000>?:invalid
0:0044<00000044>4:void assign (<void>), v
0006 0213 1:000c<0000000c>4:void 0:0000<00000000>?:invalid
0:0048<00000048>4:void assign (<void>), {v + 4}
Where the two source vectors are:
44:1 0 .imm float:18e [4, 0, 0, 0]
48:1 0 .imm float:1aa [4, 0, 0, 4]
They just happen to be adjacent, but don't need to be.
2023-08-22 15:03:56 +00:00
|
|
|
__attribute__((const)) int algebra_base_type (const type_t *type);
|
|
|
|
int algebra_base_type (const type_t *type){return 0;}
|
2023-08-21 08:37:56 +00:00
|
|
|
|
2022-01-18 03:11:14 +00:00
|
|
|
__attribute__((const)) pr_string_t ReuseString (const char *str) {return 0;}
|
2018-10-09 03:35:01 +00:00
|
|
|
__attribute__((const)) codespace_t *codespace_new (void) {return 0;}
|
2011-01-19 06:47:45 +00:00
|
|
|
void codespace_addcode (codespace_t *codespace, struct dstatement_s *code, int size) {}
|
2018-10-09 03:35:01 +00:00
|
|
|
__attribute__((const)) int function_parms (function_t *f, byte *parm_size) {return 0;}
|
2004-01-29 07:43:05 +00:00
|
|
|
void def_to_ddef (def_t *def, ddef_t *ddef, int aux) {}
|
2023-08-20 05:44:59 +00:00
|
|
|
__attribute__((noreturn)) void _internal_error (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {abort();}
|
|
|
|
__attribute__((const)) expr_t *_warning (expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {return 0;}
|
|
|
|
__attribute__((const)) expr_t *_error (expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {return 0;}
|
2020-02-16 08:10:43 +00:00
|
|
|
__attribute__((const)) symbol_t *make_structure (const char *name, int su, struct_def_t *defs, type_t *type) {return 0;}
|
|
|
|
__attribute__((const)) symbol_t *symtab_addsymbol (symtab_t *symtab, symbol_t *symbol) {return 0;}
|
|
|
|
__attribute__((const)) symbol_t *new_symbol_type (const char *name, type_t *type) {return 0;}
|
2020-03-28 13:15:06 +00:00
|
|
|
__attribute__((const)) def_t *qfo_encode_type (type_t *type, defspace_t *space) {return 0;}
|
2020-02-16 08:10:43 +00:00
|
|
|
__attribute__((const)) int obj_types_assignable (const type_t *dst, const type_t *src) {return 0;}
|
|
|
|
void print_protocollist (struct dstring_s *dstr, protocollist_t *protocollist) {}
|
2020-03-27 06:16:41 +00:00
|
|
|
int is_id (const type_t *type){return type->type;}
|
2023-06-13 04:03:38 +00:00
|
|
|
int is_SEL (const type_t *type){return 0;}
|
|
|
|
int is_Class (const type_t *type){return 0;}
|
2020-02-16 08:10:43 +00:00
|
|
|
int compare_protocols (protocollist_t *protos1, protocollist_t *protos2){return protos1->count - protos2->count;}
|
2020-03-28 06:34:34 +00:00
|
|
|
void dump_dot (const char *stage, void *data,
|
|
|
|
void (*dump_func) (void *data, const char *fname)){}
|
|
|
|
void dump_dot_type (void *_t, const char *filename){}
|
2020-04-01 12:17:13 +00:00
|
|
|
char *fubar;
|
|
|
|
const char *file_basename(const char *p, int keepdot) { return fubar;}
|