From 5d3ab97c381499f6e65818935f34ba70f0d642ce Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 18 Aug 2005 15:28:18 +0000 Subject: [PATCH] *** empty log message *** --- ase/stx/array.h | 4 ++-- ase/stx/bootstrp.h | 4 ++-- ase/stx/bytecode.h | 4 ++-- ase/stx/class.h | 4 ++-- ase/stx/context.h | 4 ++-- ase/stx/dict.h | 4 ++-- ase/stx/interp.h | 4 ++-- ase/stx/memory.h | 4 ++-- ase/stx/method.h | 4 ++-- ase/stx/misc.h | 4 ++-- ase/stx/name.h | 4 ++-- ase/stx/object.h | 4 ++-- ase/stx/parser.h | 4 ++-- ase/stx/stx.c | 4 ++-- ase/stx/stx.h | 50 ++++++++++++++++++++++++++++++++++++++- ase/stx/stxi.h | 59 ---------------------------------------------- 16 files changed, 77 insertions(+), 88 deletions(-) delete mode 100644 ase/stx/stxi.h diff --git a/ase/stx/array.h b/ase/stx/array.h index 7bf5fce0..6cbacc3c 100644 --- a/ase/stx/array.h +++ b/ase/stx/array.h @@ -1,11 +1,11 @@ /* - * $Id: array.h,v 1.2 2005-08-18 15:16:39 bacon Exp $ + * $Id: array.h,v 1.3 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_ARRAY_H_ #define _XP_STX_ARRAY_H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/ase/stx/bootstrp.h b/ase/stx/bootstrp.h index 712311dd..c08ed58e 100644 --- a/ase/stx/bootstrp.h +++ b/ase/stx/bootstrp.h @@ -1,11 +1,11 @@ /* - * $Id: bootstrp.h,v 1.7 2005-08-18 15:16:39 bacon Exp $ + * $Id: bootstrp.h,v 1.8 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_BOOTSTRP_H_ #define _XP_STX_BOOTSTRP_H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/ase/stx/bytecode.h b/ase/stx/bytecode.h index a3656127..5b735ebd 100644 --- a/ase/stx/bytecode.h +++ b/ase/stx/bytecode.h @@ -1,11 +1,11 @@ /* - * $Id: bytecode.h,v 1.9 2005-08-18 15:16:39 bacon Exp $ + * $Id: bytecode.h,v 1.10 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_BYTECODE_H_ #define _XP_STX_BYTECODE_H_ -#include +#include #define PUSH_RECEIVER_VARIABLE 0x00 #define PUSH_TEMPORARY_LOCATION 0x10 diff --git a/ase/stx/class.h b/ase/stx/class.h index 7886572e..64f504ab 100644 --- a/ase/stx/class.h +++ b/ase/stx/class.h @@ -1,11 +1,11 @@ /* - * $Id: class.h,v 1.12 2005-08-18 15:16:39 bacon Exp $ + * $Id: class.h,v 1.13 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_CLASS_H_ #define _XP_STX_CLASS_H_ -#include +#include /* definitions for common objects */ #define XP_STX_CLASS_SIZE 8 diff --git a/ase/stx/context.h b/ase/stx/context.h index 217d90c9..9933a811 100644 --- a/ase/stx/context.h +++ b/ase/stx/context.h @@ -1,11 +1,11 @@ /* - * $Id: context.h,v 1.4 2005-08-18 15:16:39 bacon Exp $ + * $Id: context.h,v 1.5 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_CONTEXT_H_ #define _XP_STX_CONTEXT_H_ -#include +#include #define PUSH_OBJECT 0xA0 #define SEND_UNARY_MESSAGE 0xB0 diff --git a/ase/stx/dict.h b/ase/stx/dict.h index a6468c86..38629d2c 100644 --- a/ase/stx/dict.h +++ b/ase/stx/dict.h @@ -1,11 +1,11 @@ /* - * $Id: dict.h,v 1.3 2005-08-18 15:16:39 bacon Exp $ + * $Id: dict.h,v 1.4 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_DICT_H_ #define _XP_STX_DICT_H_ -#include +#include #define XP_STX_ASSOCIATION_SIZE 2 #define XP_STX_ASSOCIATION_KEY 0 diff --git a/ase/stx/interp.h b/ase/stx/interp.h index 9a43cfa9..e36ed09f 100644 --- a/ase/stx/interp.h +++ b/ase/stx/interp.h @@ -1,11 +1,11 @@ /* - * $Id: interp.h,v 1.3 2005-08-18 15:16:39 bacon Exp $ + * $Id: interp.h,v 1.4 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_INTERP_H_ #define _XP_STX_INTERP_H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/ase/stx/memory.h b/ase/stx/memory.h index 3d62855b..104583f8 100644 --- a/ase/stx/memory.h +++ b/ase/stx/memory.h @@ -1,11 +1,11 @@ /* - * $Id: memory.h,v 1.7 2005-08-18 15:16:39 bacon Exp $ + * $Id: memory.h,v 1.8 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_MEMORY_H_ #define _XP_STX_MEMORY_H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/ase/stx/method.h b/ase/stx/method.h index fc0af2cf..1c1b64aa 100644 --- a/ase/stx/method.h +++ b/ase/stx/method.h @@ -1,11 +1,11 @@ /* - * $Id: method.h,v 1.4 2005-08-18 15:16:39 bacon Exp $ + * $Id: method.h,v 1.5 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_METHOD_H_ #define _XP_STX_METHOD_H_ -#include +#include #define XP_STX_METHOD_SIZE 3 #define XP_STX_METHOD_TEXT 0 diff --git a/ase/stx/misc.h b/ase/stx/misc.h index 217c3072..459d1449 100644 --- a/ase/stx/misc.h +++ b/ase/stx/misc.h @@ -1,11 +1,11 @@ /* - * $Id: misc.h,v 1.14 2005-08-18 15:16:39 bacon Exp $ + * $Id: misc.h,v 1.15 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_MISC_H_ #define _XP_STX_MISC_H_ -#include +#include /* TODO: remove this header later */ #include diff --git a/ase/stx/name.h b/ase/stx/name.h index 2bfa7d74..d793b2b4 100644 --- a/ase/stx/name.h +++ b/ase/stx/name.h @@ -1,11 +1,11 @@ /* - * $Id: name.h,v 1.2 2005-08-18 15:16:39 bacon Exp $ + * $Id: name.h,v 1.3 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_NAME_H_ #define _XP_STX_NAME_H_ -#include +#include struct xp_stx_name_t { diff --git a/ase/stx/object.h b/ase/stx/object.h index eb830445..9432e2d0 100644 --- a/ase/stx/object.h +++ b/ase/stx/object.h @@ -1,11 +1,11 @@ /* - * $Id: object.h,v 1.29 2005-08-18 15:16:39 bacon Exp $ + * $Id: object.h,v 1.30 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_OBJECT_H_ #define _XP_STX_OBJECT_H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/ase/stx/parser.h b/ase/stx/parser.h index d531d77d..44d53fb6 100644 --- a/ase/stx/parser.h +++ b/ase/stx/parser.h @@ -1,11 +1,11 @@ /* - * $Id: parser.h,v 1.33 2005-08-18 15:16:39 bacon Exp $ + * $Id: parser.h,v 1.34 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_PARSER_H_ #define _XP_STX_PARSER_H_ -#include +#include #include #include #include diff --git a/ase/stx/stx.c b/ase/stx/stx.c index 80a825cf..8db775e7 100644 --- a/ase/stx/stx.c +++ b/ase/stx/stx.c @@ -1,8 +1,8 @@ /* - * $Id: stx.c,v 1.38 2005-08-18 15:16:39 bacon Exp $ + * $Id: stx.c,v 1.39 2005-08-18 15:28:18 bacon Exp $ */ -#include +#include #include #include diff --git a/ase/stx/stx.h b/ase/stx/stx.h index 9649a4ed..6cc25133 100644 --- a/ase/stx/stx.h +++ b/ase/stx/stx.h @@ -1,5 +1,5 @@ /* - * $Id: stx.h,v 1.42 2005-08-18 15:16:39 bacon Exp $ + * $Id: stx.h,v 1.43 2005-08-18 15:28:18 bacon Exp $ */ #ifndef _XP_STX_STX_H_ @@ -13,6 +13,8 @@ typedef struct xp_stx_object_t xp_stx_object_t; typedef struct xp_stx_word_object_t xp_stx_word_object_t; typedef struct xp_stx_byte_object_t xp_stx_byte_object_t; typedef struct xp_stx_char_object_t xp_stx_char_object_t; +typedef struct xp_stx_memory_t xp_stx_memory_t; +typedef struct xp_stx_symtab_t xp_stx_symtab_t; typedef struct xp_stx_t xp_stx_t; /* common object structure */ @@ -48,6 +50,52 @@ struct xp_stx_char_object_t xp_char_t data[1]; }; + +struct xp_stx_memory_t +{ + xp_word_t capacity; + xp_stx_object_t** slots; + xp_stx_object_t** free; + xp_bool_t __malloced; +}; + +struct xp_stx_symtab_t +{ + xp_word_t* datum; + xp_word_t size; + xp_word_t capacity; +}; + +struct xp_stx_t +{ + xp_stx_memory_t memory; + xp_stx_symtab_t symtab; + + xp_word_t nil; + xp_word_t true; + xp_word_t false; + + xp_word_t smalltalk; + + xp_word_t class_symbol; + xp_word_t class_metaclass; + xp_word_t class_association; + + xp_word_t class_object; + xp_word_t class_class; + xp_word_t class_array; + xp_word_t class_bytearray; + xp_word_t class_string; + xp_word_t class_character; + xp_word_t class_context; + xp_word_t class_system_dictionary; + xp_word_t class_method; + xp_word_t class_smallinteger; + + xp_bool_t __malloced; + xp_bool_t __wantabort; /* TODO: make it a function pointer */ +}; + #define XP_STX_IS_SMALLINT(x) (((x) & 0x01) == 0x01) #define XP_STX_TO_SMALLINT(x) (((x) << 1) | 0x01) #define XP_STX_FROM_SMALLINT(x) ((x) >> 1) diff --git a/ase/stx/stxi.h b/ase/stx/stxi.h deleted file mode 100644 index 69f3f902..00000000 --- a/ase/stx/stxi.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id: stxi.h,v 1.1 2005-08-18 15:16:39 bacon Exp $ - */ - -#ifndef _XP_STX_STXI_H_ -#define _XP_STX_STXI_H_ - -#include - -typedef struct xp_stx_memory_t xp_stx_memory_t; -typedef struct xp_stx_symtab_t xp_stx_symtab_t; - -struct xp_stx_memory_t -{ - xp_word_t capacity; - xp_stx_object_t** slots; - xp_stx_object_t** free; - xp_bool_t __malloced; -}; - -struct xp_stx_symtab_t -{ - xp_word_t* datum; - xp_word_t size; - xp_word_t capacity; -}; - - -struct xp_stx_t -{ - xp_stx_memory_t memory; - xp_stx_symtab_t symtab; - - xp_word_t nil; - xp_word_t true; - xp_word_t false; - - xp_word_t smalltalk; - - xp_word_t class_symbol; - xp_word_t class_metaclass; - xp_word_t class_association; - - xp_word_t class_object; - xp_word_t class_class; - xp_word_t class_array; - xp_word_t class_bytearray; - xp_word_t class_string; - xp_word_t class_character; - xp_word_t class_context; - xp_word_t class_system_dictionary; - xp_word_t class_method; - xp_word_t class_smallinteger; - - xp_bool_t __malloced; - xp_bool_t __wantabort; /* TODO: make it a function pointer */ -}; - -#endif