Files
mercury/bytecode/static_data.h
Bert Thompson ba415565b5 - Changes to support portable numeric constants in the
Estimated hours taken: 3

A number of changes:
	- Changes to support portable numeric constants in the
	  bytecode file.
	- read_int() now returns a Mercury `Integer', which is platform
	  dependent. However it actually reads a portable, 64-bit,
	  big-endian, 2's complement integer from the bytecode stream.
	- read_float() now returns a Mercury `Float', which is platform
	  dependent.
	- Comment-style changed to agree with C coding standard.
	- malloc and realloc are now used instead of mem_malloc and
	  mem_realloc. Need to look at memory-management in a lot
	  more depth when the bytecode interpreter starts linking
	  in Mercury shared objects.
	- Removed Bytecode-doc since it's now an HTML file in
	  the developer documentation directory of the Mercury web pages.
	- Removed the Makefile since we're now using an Mmakefile.

bytecode/
	bytecode.c
	bytecode.h
		Changes to read_int(), read_float() and others.
	disasm.c
	disasm.h
	machine.c
	machine.h
	mbi.c
	mbi.h
	mdis.c
	mdis.h
	mem.c
	mem.h
	static_data.c
	static_data.h
	template.c
	template.h
	util.c
	util.h
		Divers changes as described above.
	Bytecode-doc
	Mmakefile
		Removed as described above.
1997-04-24 05:31:48 +00:00

58 lines
1.4 KiB
C

/*
** Copyright (C) 1997 University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
**
** $Id: static_data.h,v 1.3 1997-04-24 05:31:25 aet Exp $
*/
#if ! defined(STATIC_DATA_H)
#define STATIC_DATA_H
/*
* XXX: We should also have:
* - Strings area to store all embedded strings
* in the byte stream. This should have appropriate
* connections to the code area, stack and heap so we
* can, for instance, look up predicate names from
* the code area, and lookup constructor names from
* the heap.
*/
/*
* XXX: We have an arbitrary maximum size for the table
* of labels in a module. This is not good.
*/
#define MAX_LABELS 1000
typedef struct Label_table {
Address labels[MAX_LABELS]; /* array : label -> address */
short max_label;
} Label_table;
typedef struct Proc_info {
Byte proc_id;
Determinism det;
short label_count;
short temp_count;
CString *var_infos; /* Use as an array of CStrings */
short var_count;
Address proc_entry;
} Proc_info;
typedef struct Pred_info {
CString pred_name;
short proc_count;
Proc_info *proc_tab; /* Use as an array of Proc_infos */
} Pred_info;
typedef struct Module_Info {
Label_table label_tab;
Pred_info *pred_tab; /* Use as an array of Pred_infos */
Address module_entry;
} Module_Info;
#endif /* STATIC_DATA_H */