removed unneeded text
This commit is contained in:
parent
f9ad51b5c5
commit
4bbd5b52bb
22
stix/configure
vendored
22
stix/configure
vendored
@ -19835,28 +19835,6 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define STIX_SIZEOF_STRUCT_SOCKADDR_IN ${ac_cv_sizeof_struct_sockaddr_in}
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 ${ac_cv_sizeof_struct_sockaddr_in6}
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define STIX_SIZEOF_STRUCT_SOCKADDR_UN ${ac_cv_sizeof_struct_sockaddr_un}
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define STIX_SIZEOF_SOCKLEN_T ${ac_cv_sizeof_socklen_t}
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
stix_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`"
|
||||
stix_package_version_minor="`echo ${PACKAGE_VERSION} | cut -d. -f2`"
|
||||
stix_package_version_patch="`echo ${PACKAGE_VERSION} | cut -d. -f3`"
|
||||
|
@ -1,9 +1,5 @@
|
||||
dnl AC_PREREQ([2.67])
|
||||
|
||||
dnl Make sure you change the version information
|
||||
dnl in include/stix/conf_*.h whenever you change the version
|
||||
dnl here. Those files don't depend on autoconf, thus requiring
|
||||
dnl manual change.
|
||||
AC_INIT([stix],[0.6.0],[Chung, Hyung-Hwan (hyunghwan.chung@gmail.com)],[],[http://code.abiyo.net/@stix])
|
||||
|
||||
AC_CONFIG_HEADER([lib/stix-cfg.h])
|
||||
@ -361,12 +357,6 @@ AC_DEFINE_UNQUOTED(STIX_SIZEOF_OFF64_T, ${ac_cv_sizeof_off64_t}, [sizeof(off64_t
|
||||
AC_DEFINE_UNQUOTED(STIX_SIZEOF_MBSTATE_T, ${ac_cv_sizeof_mbstate_t}, [sizeof(mbstate_t)])
|
||||
AC_DEFINE_UNQUOTED(STIX_MBLEN_MAX, ${ax_cv_numvalof_MB_LEN_MAX}, [MB_LEN_MAX])
|
||||
|
||||
AC_DEFINE_UNQUOTED(STIX_SIZEOF_STRUCT_SOCKADDR_IN, ${ac_cv_sizeof_struct_sockaddr_in}, [sizeof(struct sockaddr_in)])
|
||||
AC_DEFINE_UNQUOTED(STIX_SIZEOF_STRUCT_SOCKADDR_IN6, ${ac_cv_sizeof_struct_sockaddr_in6}, [sizeof(struct sockaddr_in6)])
|
||||
AC_DEFINE_UNQUOTED(STIX_SIZEOF_STRUCT_SOCKADDR_UN, ${ac_cv_sizeof_struct_sockaddr_un}, [sizeof(struct sockaddr_un)])
|
||||
AC_DEFINE_UNQUOTED(STIX_SIZEOF_SOCKLEN_T, ${ac_cv_sizeof_socklen_t}, [sizeof(socklen_t)])
|
||||
|
||||
|
||||
stix_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`"
|
||||
stix_package_version_minor="`echo ${PACKAGE_VERSION} | cut -d. -f2`"
|
||||
stix_package_version_patch="`echo ${PACKAGE_VERSION} | cut -d. -f3`"
|
||||
|
@ -201,6 +201,44 @@
|
||||
^true.
|
||||
}
|
||||
|
||||
## -------------------------------------------------------
|
||||
## -------------------------------------------------------
|
||||
|
||||
#method(#class) inheritsFrom: aClass
|
||||
{
|
||||
| c |
|
||||
c := self superclass.
|
||||
[c notNil] whileTrue: [
|
||||
[ c == aClass ] ifTrue: [^true].
|
||||
c := c superclass.
|
||||
].
|
||||
^false
|
||||
}
|
||||
|
||||
#method(#class) isMemberOf: aClass
|
||||
{
|
||||
## a class object is an instance of Class
|
||||
## but Class inherits from Apex. On the other hand,
|
||||
## most of ordinary classes are under Object again under Apex.
|
||||
## special consideration is required here.
|
||||
^aClass == Class
|
||||
}
|
||||
|
||||
#method(#class) isKindOf: aClass
|
||||
{
|
||||
^(self isMemberOf: aClass) or: [self inheritsFrom: aClass].
|
||||
}
|
||||
|
||||
#method isMemberOf: aClass
|
||||
{
|
||||
^self class == aClass
|
||||
}
|
||||
|
||||
#method isKindOf: aClass
|
||||
{
|
||||
^(self isMemberOf: aClass) or: [self class inheritsFrom: aClass].
|
||||
}
|
||||
|
||||
|
||||
## -------------------------------------------------------
|
||||
## -------------------------------------------------------
|
||||
|
@ -14,6 +14,11 @@
|
||||
^self.
|
||||
}
|
||||
|
||||
|
||||
## ########################################################################
|
||||
## most of the following methods can actuall become class methods of Apex.
|
||||
## ########################################################################
|
||||
|
||||
#method name
|
||||
{
|
||||
^self.name
|
||||
@ -31,7 +36,7 @@
|
||||
^self.spec bitShift: -7
|
||||
}
|
||||
|
||||
#method inheritsFrom: aSuperclass
|
||||
"#method inheritsFrom: aSuperclass
|
||||
{
|
||||
| c |
|
||||
c := self superclass.
|
||||
@ -40,5 +45,5 @@
|
||||
c := c superclass.
|
||||
].
|
||||
^false
|
||||
}
|
||||
}"
|
||||
}
|
||||
|
@ -56,7 +56,7 @@
|
||||
^self.method preambleCode == 10.
|
||||
}
|
||||
|
||||
#method findExceptionHandlerBlock: anException
|
||||
#method findExceptionHandlerBlock: anExceptionClass
|
||||
{
|
||||
## for this to work, self must be an exception handler context.
|
||||
## For a single on:do: call,
|
||||
@ -70,7 +70,7 @@
|
||||
bound := self basicSize - 1.
|
||||
8 to: bound by: 2 do: [ :i |
|
||||
exc := self basicAt: i.
|
||||
((anException == exc) or: [anException inheritsFrom: exc]) ifTrue: [^self basicAt: (i + 1)].
|
||||
((anExceptionClass == exc) or: [anExceptionClass inheritsFrom: exc]) ifTrue: [^self basicAt: (i + 1)].
|
||||
]
|
||||
].
|
||||
^nil.
|
||||
@ -415,7 +415,7 @@ thisContext isExceptionHandlerContext dump.
|
||||
ctx := thisContext.
|
||||
[ctx notNil] whileTrue: [
|
||||
(ctx class == MethodContext)
|
||||
ifTrue: [ (ctx method owner name, ' - ', ctx method name) dump ].
|
||||
ifTrue: [ (ctx method owner name, '>>', ctx method name) dump ].
|
||||
## TODO: include blockcontext???
|
||||
ctx := ctx sender.
|
||||
].
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include 'Boolean.st'.
|
||||
|
||||
|
||||
#########################################################################################
|
||||
|
||||
#class Error(Object)
|
||||
{
|
||||
#method(#class) signal: aString
|
||||
@ -350,3 +352,7 @@ f isNil ifTrue: [ self error: 'No such function' ].
|
||||
}
|
||||
|
||||
|
||||
|
||||
#########################################################################################
|
||||
|
||||
## #include 'Console.st'
|
||||
|
@ -171,13 +171,28 @@
|
||||
## self test4.
|
||||
|
||||
## self test5.
|
||||
## self test11.
|
||||
self test11.
|
||||
## self test12.
|
||||
##100 timesRepeat: ['>>>>> END OF MAIN' dump].
|
||||
|
||||
|
||||
"(Exception isKindOf: Apex) dump.
|
||||
(Exception isMemberOf: Apex) dump.
|
||||
(Exception isMemberOf: Class) dump.
|
||||
(1 isMemberOf: SmallInteger) dump.
|
||||
(1 isKindOf: Integer) dump.
|
||||
(1 isKindOf: Class) dump.
|
||||
(1 isKindOf: Apex) dump.
|
||||
(Exception isKindOf: Class) dump.
|
||||
(Exception isKindOf: Apex) dump.
|
||||
(Exception isKindOf: Object) dump.
|
||||
(Exception isKindOf: (Apex new)) dump.
|
||||
(Exception isKindOf: (Object new)) dump."
|
||||
|
||||
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@' dump.
|
||||
## the following line(return:to:) must cause primitive failure...
|
||||
[ Processor return: 10 to: 20. ] on: Exception do: [:ex | ex messageText dump].
|
||||
##[ Processor return: 10 to: 20. ] on: Exception do: [:ex | ex messageText dump].
|
||||
|
||||
##[ Processor return: 10 to: 20. ]
|
||||
## on: PrimitiveFailureException do: [:ex | 'PRIMITIVE FAILURE CAUGHT HERE HERE HERE' dump]
|
||||
|
@ -3717,6 +3717,7 @@ static int compile_keyword_message (stix_t* stix, int to_super)
|
||||
saved_kwsel_loc = stix->c->tok.loc;
|
||||
saved_kwsel_len = stix->c->mth.kwsels.len;
|
||||
|
||||
/* TODO: optimization for ifTrue: ifFalse: whileTrue: whileFalse .. */
|
||||
do
|
||||
{
|
||||
kw = stix->c->tok.name;
|
||||
|
@ -1653,51 +1653,6 @@ printf ("PRIMITVE VALUE RECEIVER IS NOT A BLOCK CONTEXT\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int prim_block_on_do (stix_t* stix, stix_ooi_t nargs)
|
||||
{
|
||||
int x;
|
||||
stix_oop_oop_t exarr;
|
||||
stix_oop_context_t blkctx;
|
||||
stix_ooi_t i, j;
|
||||
|
||||
STIX_ASSERT (nargs >= 2);
|
||||
|
||||
if ((stix_oow_t)nargs & 1) return 0; /* it expects even number of arguments */
|
||||
|
||||
//for (i = 0; i < nargs; i += 2)
|
||||
//{
|
||||
// exblk = ACTIVE_STACK_GET(stix, stix->sp);
|
||||
// excls = ACTIVE_STACK_GET(stix, stix->sp - 1);
|
||||
//}
|
||||
|
||||
x = __block_value (stix, nargs, 0, 0, &blkctx);
|
||||
if (x <= 0) return x; /* hard failure and soft failure */
|
||||
|
||||
/* TOOD: implement zero-cost exception handling.
|
||||
* this implementation requires allocation of a new array
|
||||
* every time on:do: is executed */
|
||||
|
||||
stix_pushtmp (stix, (stix_oop_t*)&blkctx);
|
||||
exarr = (stix_oop_oop_t)stix_instantiate (stix, stix->_array, STIX_NULL, nargs);
|
||||
stix_poptmp (stix);
|
||||
if (!exarr) return -1; /* hard failure */ /* TOOD: can't this be treated as a soft failure? */
|
||||
|
||||
for (i = nargs, j = 0; i > 0;)
|
||||
{
|
||||
--i;
|
||||
exarr->slot[j++] = ACTIVE_STACK_GET(stix, stix->sp - i);
|
||||
--i;
|
||||
exarr->slot[j++] = ACTIVE_STACK_GET(stix, stix->sp - i);
|
||||
}
|
||||
|
||||
|
||||
#if defined(STIX_DEBUG_EXEC_001)
|
||||
printf ("<<ENTERING BLOCK BY ON:DO:>> SP=%ld\n", (long int)stix->sp);
|
||||
#endif
|
||||
SWITCH_ACTIVE_CONTEXT (stix, (stix_oop_context_t)blkctx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int prim_process_resume (stix_t* stix, stix_ooi_t nargs)
|
||||
{
|
||||
stix_oop_t rcv;
|
||||
@ -2597,7 +2552,6 @@ static prim_t primitives[] =
|
||||
|
||||
{ 0, MAX_NARGS, prim_block_value, "_block_value" },
|
||||
{ 0, MAX_NARGS, prim_block_new_process, "_block_new_process" },
|
||||
{ 2, MAX_NARGS, prim_block_on_do, "_block_on_do" },
|
||||
|
||||
{ 0, 0, prim_process_resume, "_process_resume" },
|
||||
{ 0, 0, prim_process_terminate, "_process_terminate" },
|
||||
|
@ -480,18 +480,6 @@
|
||||
/* sizeof(short) */
|
||||
#undef STIX_SIZEOF_SHORT
|
||||
|
||||
/* sizeof(socklen_t) */
|
||||
#undef STIX_SIZEOF_SOCKLEN_T
|
||||
|
||||
/* sizeof(struct sockaddr_in) */
|
||||
#undef STIX_SIZEOF_STRUCT_SOCKADDR_IN
|
||||
|
||||
/* sizeof(struct sockaddr_in6) */
|
||||
#undef STIX_SIZEOF_STRUCT_SOCKADDR_IN6
|
||||
|
||||
/* sizeof(struct sockaddr_un) */
|
||||
#undef STIX_SIZEOF_STRUCT_SOCKADDR_UN
|
||||
|
||||
/* sizeof(void*) */
|
||||
#undef STIX_SIZEOF_VOID_P
|
||||
|
||||
|
@ -56,11 +56,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__WATCOMC__) && !defined(__386__)
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
# define STIX_SIZEOF_SHORT 2
|
||||
@ -86,11 +81,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__TURBOC__)
|
||||
/* TODO: be more version specific wchar_t may be available in newer BCC */
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
@ -117,11 +107,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__ZTC__) && defined(DOS386)
|
||||
|
||||
/* Zortech in DOSX 386 mode (ztc -mx) */
|
||||
@ -149,11 +134,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#else
|
||||
# error Define the size of various data types.
|
||||
#endif
|
||||
|
@ -52,11 +52,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 16
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#else
|
||||
# error Define the size of various data types.
|
||||
#endif
|
||||
|
@ -76,11 +76,6 @@ _M_X64 x64 platform
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 16
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__GNUC__) || defined(__DMC__) || defined(__POCC__)
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
# define STIX_SIZEOF_SHORT 2
|
||||
@ -110,10 +105,6 @@ _M_X64 x64 platform
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 16
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
# define STIX_SIZEOF_SHORT 2
|
||||
@ -147,11 +138,6 @@ _M_X64 x64 platform
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
@ -182,11 +168,6 @@ _M_X64 x64 platform
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#else
|
||||
# error Define the size of various data types.
|
||||
#endif
|
||||
|
@ -59,11 +59,6 @@
|
||||
/* TODO: check the exact value */
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
/* these two have only to be large enough */
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define STIX_SIZEOF_CHAR 1
|
||||
# define STIX_SIZEOF_SHORT 2
|
||||
@ -88,10 +83,6 @@
|
||||
# define STIX_SIZEOF_MBSTATE_T STIX_SIZEOF_LONG
|
||||
# define STIX_MBLEN_MAX 8
|
||||
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define STIX_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define STIX_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#else
|
||||
# error Define the size of various data types.
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user