| | 1 | /* |
| | 2 | * Copyright (c) 2002 by Michael J. Roberts. All Rights Reserved. |
| | 3 | * |
| | 4 | * Please see the accompanying license file, LICENSE.TXT, for information |
| | 5 | * on using and copying this software. |
| | 6 | */ |
| | 7 | /* |
| | 8 | Name |
| | 9 | vmglobv.h - global variable definitions |
| | 10 | Function |
| | 11 | Defines the global variables for the T3 VM |
| | 12 | Notes |
| | 13 | This file is NOT protected against multiple inclusion, because it's |
| | 14 | designed to be included more than once with different definitions for |
| | 15 | the macros. |
| | 16 | Modified |
| | 17 | 09/18/02 MJRoberts - Creation |
| | 18 | */ |
| | 19 | |
| | 20 | |
| | 21 | VM_GLOBALS_BEGIN |
| | 22 | |
| | 23 | /* object memory manager */ |
| | 24 | VM_GLOBAL_OBJDEF(class CVmMemory, mem) |
| | 25 | |
| | 26 | /* variable-size block heap manager */ |
| | 27 | VM_GLOBAL_OBJDEF(class CVmVarHeap, varheap) |
| | 28 | |
| | 29 | /* object table */ |
| | 30 | VM_GLOBAL_PREOBJDEF(class CVmObjTable, obj_table) |
| | 31 | |
| | 32 | /* undo manager */ |
| | 33 | VM_GLOBAL_OBJDEF(class CVmUndo, undo) |
| | 34 | |
| | 35 | /* constant pool manager */ |
| | 36 | VM_GLOBAL_PREOBJDEF(class CVmPool_CLASS, const_pool) |
| | 37 | |
| | 38 | /* code pool manager */ |
| | 39 | VM_GLOBAL_PREOBJDEF(class CVmPool_CLASS, code_pool) |
| | 40 | |
| | 41 | /* the stack */ |
| | 42 | VM_GLOBAL_PRECOBJDEF(class CVmStack, stk, |
| | 43 | (VM_STACK_SIZE, vm_init_stack_reserve())) |
| | 44 | |
| | 45 | /* metaclass dependency table for loaded image file */ |
| | 46 | VM_GLOBAL_OBJDEF(class CVmMetaTable, meta_table) |
| | 47 | |
| | 48 | /* built-in function set table */ |
| | 49 | VM_GLOBAL_OBJDEF(class CVmBifTable, bif_table) |
| | 50 | |
| | 51 | /* source file list (for debugger) */ |
| | 52 | VM_GLOBAL_OBJDEF(class CVmSrcfTable, srcf_table) |
| | 53 | |
| | 54 | /* global symbol table (for debugger) */ |
| | 55 | VM_GLOBAL_OBJDEF(class CTcPrsSymtab, sym_table) |
| | 56 | |
| | 57 | /* byte code interpreter */ |
| | 58 | VM_GLOBAL_PREOBJDEF(class CVmRun, interpreter) |
| | 59 | |
| | 60 | /* size of each exception table entry in the image file */ |
| | 61 | VM_GLOBAL_VARDEF(size_t, exc_entry_size) |
| | 62 | |
| | 63 | /* size of each debugger source line entry in the image file */ |
| | 64 | VM_GLOBAL_VARDEF(size_t, line_entry_size) |
| | 65 | |
| | 66 | /* size of header of each method's debug table */ |
| | 67 | VM_GLOBAL_VARDEF(size_t, dbg_hdr_size) |
| | 68 | |
| | 69 | /* size of each debugger local symbol header */ |
| | 70 | VM_GLOBAL_VARDEF(size_t, dbg_lclsym_hdr_size) |
| | 71 | |
| | 72 | /* debug record format version */ |
| | 73 | VM_GLOBAL_VARDEF(int, dbg_fmt_vsn) |
| | 74 | |
| | 75 | /* debugger API */ |
| | 76 | VM_GLOBAL_OBJDEF(class CVmDebug, debugger) |
| | 77 | |
| | 78 | /* pre-defined objects and properties */ |
| | 79 | VM_GLOBAL_PREOBJDEF(struct CVmPredef, predef) |
| | 80 | |
| | 81 | /* preinit mode flag */ |
| | 82 | VM_GLOBAL_VARDEF(int, preinit_mode) |
| | 83 | |
| | 84 | /* flag: error subsystem initialized outside of VM globals */ |
| | 85 | VM_GLOBAL_VARDEF(int, err_pre_inited) |
| | 86 | |
| | 87 | /* resource loader for program-loaded resources */ |
| | 88 | VM_GLOBAL_OBJDEF(class CResLoader, res_loader) |
| | 89 | |
| | 90 | /* TADS built-in function globals */ |
| | 91 | VM_GLOBAL_OBJDEF(class CVmBifTADSGlobals, bif_tads_globals) |
| | 92 | |
| | 93 | /* host application interface */ |
| | 94 | VM_GLOBAL_OBJDEF(class CVmHostIfc, host_ifc) |
| | 95 | |
| | 96 | /* image file loader */ |
| | 97 | VM_GLOBAL_OBJDEF(class CVmImageLoader, image_loader) |
| | 98 | |
| | 99 | /* name of the UI character set, if specified explicitly */ |
| | 100 | VM_GLOBAL_OBJDEF(char, disp_cset_name) |
| | 101 | |
| | 102 | /* |
| | 103 | * Character mappings to and from the local filename character set. |
| | 104 | * This is the character set that's used by the local file system to |
| | 105 | * represent filenames. Note that this isn't the set for the |
| | 106 | * *contents* of files - just for their names. |
| | 107 | */ |
| | 108 | VM_GLOBAL_OBJDEF(class CCharmapToUni, cmap_from_fname) |
| | 109 | VM_GLOBAL_OBJDEF(class CCharmapToLocal, cmap_to_fname) |
| | 110 | |
| | 111 | /* |
| | 112 | * Character mappings to and from the default local file-contents |
| | 113 | * character set. |
| | 114 | * |
| | 115 | * At best, this is only a default. In actual practice files can be in |
| | 116 | * any character set (or even in no character sets at all, or in |
| | 117 | * multiple character sets, in the case of binary or structured files). |
| | 118 | * Even so, on most systems, there will be a character set that most |
| | 119 | * ordinary text files use; this is that set. |
| | 120 | */ |
| | 121 | VM_GLOBAL_OBJDEF(class CCharmapToUni, cmap_from_file) |
| | 122 | VM_GLOBAL_OBJDEF(class CCharmapToLocal, cmap_to_file) |
| | 123 | |
| | 124 | /* |
| | 125 | * Character mapping to the log file. This is the mapping from unicode |
| | 126 | * to the log file. |
| | 127 | */ |
| | 128 | VM_GLOBAL_OBJDEF(class CCharmapToLocal, cmap_to_log) |
| | 129 | |
| | 130 | /* |
| | 131 | * Character mappings to and from the local character set for the |
| | 132 | * console/display user interface. This character set is used for |
| | 133 | * formatting output to the display and reading input from the |
| | 134 | * keyboard. |
| | 135 | */ |
| | 136 | VM_GLOBAL_OBJDEF(class CCharmapToUni, cmap_from_ui) |
| | 137 | VM_GLOBAL_OBJDEF(class CCharmapToLocal, cmap_to_ui) |
| | 138 | |
| | 139 | /* user interface primary console */ |
| | 140 | VM_GLOBAL_OBJDEF(class CVmConsoleMain, console) |
| | 141 | |
| | 142 | /* BigNumber package temporary register cache */ |
| | 143 | VM_GLOBAL_OBJDEF(class CVmBigNumCache, bignum_cache) |
| | 144 | |
| | 145 | /* TadsObject inheritance path analysis queue */ |
| | 146 | VM_GLOBAL_OBJDEF(class CVmObjTadsInhQueue, tadsobj_queue) |
| | 147 | |
| | 148 | VM_GLOBALS_END |
| | 149 | |