add-literal fix
parent
a5377b2e6a
commit
0f34d6ecec
|
|
@ -1,4 +1,9 @@
|
||||||
- UI word wrap problem
|
- crash:
|
||||||
|
- start UI
|
||||||
|
- redefine new-size
|
||||||
|
- recompile all
|
||||||
|
- full gc
|
||||||
|
- crash!
|
||||||
|
|
||||||
- unix i/o: problems with passing f to syscalls
|
- unix i/o: problems with passing f to syscalls
|
||||||
- if a primitive throws an error, :c doesn't show the call frame there
|
- if a primitive throws an error, :c doesn't show the call frame there
|
||||||
|
|
@ -36,6 +41,7 @@
|
||||||
- fix remaining HTML stream issues
|
- fix remaining HTML stream issues
|
||||||
- need to present $list in a useful way
|
- need to present $list in a useful way
|
||||||
- better line spacing in ui and html - related issue
|
- better line spacing in ui and html - related issue
|
||||||
|
- get rid of style stack
|
||||||
|
|
||||||
+ fix compiled gc check
|
+ fix compiled gc check
|
||||||
- there was a performance hit, investigate
|
- there was a performance hit, investigate
|
||||||
|
|
@ -57,6 +63,8 @@
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
- { } H{ } [ ] tabular-output -- excess newline
|
||||||
|
- multiple listener-run-files is broken
|
||||||
- word wrap in UI broken again
|
- word wrap in UI broken again
|
||||||
- table line styles
|
- table line styles
|
||||||
- x11 input methods
|
- x11 input methods
|
||||||
|
|
@ -65,6 +73,7 @@
|
||||||
- browse generic words and classes
|
- browse generic words and classes
|
||||||
- need actions for reloading the source file and opening word in jEdit
|
- need actions for reloading the source file and opening word in jEdit
|
||||||
- highlight showing panes in originating list
|
- highlight showing panes in originating list
|
||||||
|
- single set of tabs across the top
|
||||||
- toggle/radio buttons/tabs or something
|
- toggle/radio buttons/tabs or something
|
||||||
- make-frame should compile
|
- make-frame should compile
|
||||||
- speed up ideas:
|
- speed up ideas:
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,7 @@ call
|
||||||
{ "cd" "io" }
|
{ "cd" "io" }
|
||||||
{ "compiled-offset" "assembler" }
|
{ "compiled-offset" "assembler" }
|
||||||
{ "set-compiled-offset" "assembler" }
|
{ "set-compiled-offset" "assembler" }
|
||||||
{ "literal-top" "assembler" }
|
{ "add-literal" "assembler" }
|
||||||
{ "set-literal-top" "assembler" }
|
|
||||||
{ "address" "memory" }
|
{ "address" "memory" }
|
||||||
{ "dlopen" "alien" }
|
{ "dlopen" "alien" }
|
||||||
{ "dlsym" "alien" }
|
{ "dlsym" "alien" }
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ GENERIC: set-fill
|
||||||
: expand ( len seq -- )
|
: expand ( len seq -- )
|
||||||
[ underlying resize ] keep set-underlying ; inline
|
[ underlying resize ] keep set-underlying ; inline
|
||||||
|
|
||||||
: new-size ( n -- n ) 3 * dup 50 < [ drop 50 ] when ;
|
: new-size ( n -- n ) 1+ 3 * ; inline
|
||||||
|
|
||||||
: ensure ( n seq -- )
|
: ensure ( n seq -- )
|
||||||
2dup length >= [
|
2dup length >= [
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@ math memory namespaces ;
|
||||||
: compile-aligned ( n -- )
|
: compile-aligned ( n -- )
|
||||||
compiled-offset 8 align set-compiled-offset ; inline
|
compiled-offset 8 align set-compiled-offset ; inline
|
||||||
|
|
||||||
: add-literal ( obj -- lit# )
|
|
||||||
address literal-top [ set-compiled-cell ] keep
|
|
||||||
dup cell + set-literal-top ;
|
|
||||||
|
|
||||||
: assemble-1 ( n -- )
|
: assemble-1 ( n -- )
|
||||||
compiled-offset set-compiled-1
|
compiled-offset set-compiled-1
|
||||||
compiled-offset 1+ set-compiled-offset ; inline
|
compiled-offset 1+ set-compiled-offset ; inline
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,9 @@ HELP: set-compiled-offset "( n -- )"
|
||||||
{ $values { "n" "an address" } }
|
{ $values { "n" "an address" } }
|
||||||
{ $description "Sets the pointer to the top of the code heap where new code can be compiled." } ;
|
{ $description "Sets the pointer to the top of the code heap where new code can be compiled." } ;
|
||||||
|
|
||||||
HELP: literal-top "( -- n )"
|
HELP: add-literal "( obj -- n )"
|
||||||
{ $values { "n" "an address" } }
|
{ $values { "obj" "an object" } { "n" "an address" } }
|
||||||
{ $description "Outputs a pointer to the top of the literal data area. The compiler deposits references made to heap-allocated objects from compiled code in this area." } ;
|
{ $description "Adds a pointer to the object to the compiled literal area and outputs a pointer to a pointer to the object." } ;
|
||||||
|
|
||||||
HELP: set-literal-top "( -- n )"
|
|
||||||
{ $values { "n" "an address" } }
|
|
||||||
{ $description "Sets the pointer to the top of the literal data area. The compiler deposits references made to heap-allocated objects from compiled code in this area." } ;
|
|
||||||
|
|
||||||
HELP: flush-icache "( -- )"
|
HELP: flush-icache "( -- )"
|
||||||
{ $description "Flushes the CPUs instruction cache on PowerPC, and does nothing on other architectures. PowerPC CPUs do not automatically invalidate the cache when memory contents change, so the compiler must do this explicitly." } ;
|
{ $description "Flushes the CPUs instruction cache on PowerPC, and does nothing on other architectures. PowerPC CPUs do not automatically invalidate the cache when memory contents change, so the compiler must do this explicitly." } ;
|
||||||
|
|
|
||||||
|
|
@ -293,9 +293,7 @@ sequences strings vectors words prettyprint ;
|
||||||
|
|
||||||
\ set-compiled-offset [ [ integer ] [ ] ] "infer-effect" set-word-prop
|
\ set-compiled-offset [ [ integer ] [ ] ] "infer-effect" set-word-prop
|
||||||
|
|
||||||
\ literal-top [ [ ] [ integer ] ] "infer-effect" set-word-prop
|
\ add-literal [ [ object ] [ integer ] ] "infer-effect" set-word-prop
|
||||||
|
|
||||||
\ set-literal-top [ [ integer ] [ ] ] "infer-effect" set-word-prop
|
|
||||||
|
|
||||||
\ address [ [ object ] [ integer ] ] "infer-effect" set-word-prop
|
\ address [ [ object ] [ integer ] ] "infer-effect" set-word-prop
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ unit-test
|
||||||
unit-test
|
unit-test
|
||||||
|
|
||||||
[ { "a" "b" "c" "d" "e" "f" } ]
|
[ { "a" "b" "c" "d" "e" "f" } ]
|
||||||
[ "aXXbXXcXXdXXeXXf" "XX" split ] unit-test
|
[ "aXbYcXdYeXf" "XY" split ] unit-test
|
||||||
|
|
||||||
[ "Hello world" t ] [ "Hello world\n" "\n" ?tail ] unit-test
|
[ "Hello world" t ] [ "Hello world\n" "\n" ?tail ] unit-test
|
||||||
[ "Hello world" f ] [ "Hello world" "\n" ?tail ] unit-test
|
[ "Hello world" f ] [ "Hello world" "\n" ?tail ] unit-test
|
||||||
|
|
|
||||||
|
|
@ -25,17 +25,15 @@ void primitive_set_compiled_offset(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void primitive_literal_top(void)
|
void primitive_add_literal(void)
|
||||||
{
|
{
|
||||||
box_unsigned_cell(literal_top);
|
CELL object = dpeek();
|
||||||
}
|
CELL offset = literal_top;
|
||||||
|
put(literal_top,object);
|
||||||
void primitive_set_literal_top(void)
|
literal_top += CELLS;
|
||||||
{
|
if(literal_top >= literal_max)
|
||||||
CELL offset = unbox_unsigned_cell();
|
critical_error("Too many compiled literals",literal_top);
|
||||||
if(offset >= literal_max)
|
drepl(tag_cell(offset));
|
||||||
critical_error("Too many compiled literals",offset);
|
|
||||||
literal_top = offset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void primitive_flush_icache(void)
|
void primitive_flush_icache(void)
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ CELL literal_max;
|
||||||
void init_compiler(CELL size);
|
void init_compiler(CELL size);
|
||||||
void primitive_compiled_offset(void);
|
void primitive_compiled_offset(void);
|
||||||
void primitive_set_compiled_offset(void);
|
void primitive_set_compiled_offset(void);
|
||||||
void primitive_literal_top(void);
|
void primitive_add_literal(void);
|
||||||
void primitive_set_literal_top(void);
|
|
||||||
void collect_literals(void);
|
void collect_literals(void);
|
||||||
|
|
||||||
#ifdef FACTOR_PPC
|
#ifdef FACTOR_PPC
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,9 @@ INLINE CELL tag_header(CELL cell)
|
||||||
|
|
||||||
INLINE CELL untag_header(CELL cell)
|
INLINE CELL untag_header(CELL cell)
|
||||||
{
|
{
|
||||||
|
/* if((cell & TAG_MASK) != OBJECT_TYPE)
|
||||||
|
critical_error("Corrupt object header",cell); */
|
||||||
|
|
||||||
return cell >> TAG_BITS;
|
return cell >> TAG_BITS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,7 @@ void* primitives[] = {
|
||||||
primitive_cd,
|
primitive_cd,
|
||||||
primitive_compiled_offset,
|
primitive_compiled_offset,
|
||||||
primitive_set_compiled_offset,
|
primitive_set_compiled_offset,
|
||||||
primitive_literal_top,
|
primitive_add_literal,
|
||||||
primitive_set_literal_top,
|
|
||||||
primitive_address,
|
primitive_address,
|
||||||
primitive_dlopen,
|
primitive_dlopen,
|
||||||
primitive_dlsym,
|
primitive_dlsym,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue