*** empty log message ***

This commit is contained in:
2005-07-07 07:45:05 +00:00
parent e73fb585bd
commit 516fee2ea7
17 changed files with 179 additions and 58 deletions

View File

@ -11,6 +11,7 @@
#include <xp/stx/parser.h>
#include <xp/stx/bootstrp.h>
#include <xp/stx/class.h>
#include <xp/stx/bytecode.h>
#ifdef __linux
#include <mcheck.h>
@ -153,7 +154,13 @@ int xp_main (int argc, xp_char_t* argv[])
if (xp_stx_parser_parse_method (&parser, n,
(void*)XP_TEXT("test.st")) == -1) {
xp_printf (XP_TEXT("parser error <%s>\n"),
xp_stx_parser_error_string (&parser));
xp_stx_parser_error_string (&parser));
}
xp_printf (XP_TEXT("== Decoded Methods ==\n"));
if (xp_stx_decode(&stx, n) == -1) {
xp_printf (XP_TEXT("parser error <%s>\n"),
xp_stx_parser_error_string (&parser));
}
}

View File

@ -15,12 +15,12 @@
#include <xp/stx/class.h>
#include <xp/stx/hash.h>
void print_symbol_names (xp_stx_t* stx, xp_word_t sym)
void print_symbol_names (xp_stx_t* stx, xp_word_t sym, void* unused)
{
xp_printf (XP_TEXT("%lu [%s]\n"), (unsigned long)sym, &XP_STX_CHARAT(stx,sym,0));
}
void print_symbol_names_2 (xp_stx_t* stx, xp_word_t idx)
void print_symbol_names_2 (xp_stx_t* stx, xp_word_t idx, void* unused)
{
xp_word_t key = XP_STX_WORDAT(stx,idx,XP_STX_PAIRLINK_KEY);
xp_word_t value = XP_STX_WORDAT(stx,idx,XP_STX_PAIRLINK_VALUE);
@ -167,10 +167,10 @@ int xp_main (int argc, xp_char_t* argv[])
xp_printf (XP_TEXT("stx.false %lu\n"), (unsigned long)stx.false);
xp_printf (XP_TEXT("-------------\n"));
xp_stx_traverse_symbol_table (&stx, print_symbol_names);
xp_stx_traverse_symbol_table (&stx, print_symbol_names, XP_NULL);
xp_printf (XP_TEXT("-------------\n"));
xp_stx_hash_traverse (&stx, stx.smalltalk, print_symbol_names_2);
xp_stx_hash_traverse (&stx, stx.smalltalk, print_symbol_names_2, XP_NULL);
xp_printf (XP_TEXT("-------------\n"));
print_superclasses (&stx, XP_TEXT("Array"));

View File

@ -3,7 +3,7 @@ perform: method with: x with: y with: z with: a with: b with: c
| a b c d e f g |
< primitive: 10 >
< primitive: 21 >
"
a := 'this is ''good'.
a := #xxx niceMethod.