72/73:\r
\r
-- [ [ dup call ] dup call ] infer hangs\r
-- move tuple to generic vocab\r
- update plugin docs\r
- word preview for remote words\r
-- vectors: ensure its ok with bignum indices\r
-- code gc\r
+- faster completion\r
+\r
+- [ [ dup call ] dup call ] infer hangs\r
- type inference fails with some assembler words;\r
displaced, register and other predicates need to inherit from list\r
not cons, and need stronger branch partial eval\r
- print warning on null class\r
- optimize away dispatch\r
-- faster completion\r
+\r
+- move tuple to generic vocab\r
+\r
+- vectors: ensure its ok with bignum indices\r
+- code gc\r
- ppc register decls\r
\r
+- unit test failure\r
+- #jump-f #jump-f-label\r
- extract word inside M:, C:, and structure browsing for these\r
- fix checkbox alignment\r
- begin-scan, next-object, end-scan primitives\r
- each-object, each-slot combinators\r
-- port leak\r
- references primitive\r
- ditch % for tuples?\r
- resize window: world not updated until mouse moved\r
- x>offset\r
- fix completion invoke in middle of word\r
-- html: word links\r
- don't hardcode so many colors\r
- ffi unicode strings: null char security hole\r
- utf16 string boxing\r
- slot compile problem\r
- sdl console crash\r
-- x86 register decl\r
- UI: don't roll over if mouse button is down\r
\r
+ compiler/ffi:\r
: fixnum-insn ( overflow opcode -- )
#! This needs to be factored.
- ECX DS>
- EAX [ ECX -4 ] MOV
- EAX [ ECX ] rot execute
+ EAX [ ESI -4 ] MOV
+ EAX [ ESI ] rot execute
0 JNO fixup
swap compile-call
0 JMP fixup >r
compiled-offset swap patch
- ECX 4 SUB
- [ ECX ] EAX MOV
- ECX >DS
+ ESI 4 SUB
+ [ ESI ] EAX MOV
r> compiled-offset swap patch ;
\ fixnum+ [
\ fixnum* [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
EAX 3 SHR
- EAX [ ECX ] IMUL
+ EAX [ ESI ] IMUL
0 JNO fixup
\ fixnum* compile-call
0 JMP fixup >r
compiled-offset swap patch
- ECX 4 SUB
- [ ECX ] EAX MOV
- ECX >DS
+ ESI 4 SUB
+ [ ESI ] EAX MOV
r> compiled-offset swap patch
] "generator" set-word-property
\ fixnum/i [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
CDQ
- [ ECX ] IDIV
+ [ ESI ] IDIV
EAX 3 SHL
0 JNO fixup
\ fixnum/i compile-call
0 JMP fixup >r
compiled-offset swap patch
- ECX 4 SUB
- [ ECX ] EAX MOV
- ECX >DS
+ ESI 4 SUB
+ [ ESI ] EAX MOV
r> compiled-offset swap patch
] "generator" set-word-property
\ fixnum-mod [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
CDQ
- [ ECX ] IDIV
+ [ ESI ] IDIV
EAX 3 SHL
0 JNO fixup
\ fixnum/i compile-call
0 JMP fixup >r
compiled-offset swap patch
- ECX 4 SUB
- [ ECX ] EDX MOV
- ECX >DS
+ ESI 4 SUB
+ [ ESI ] EDX MOV
r> compiled-offset swap patch
] "generator" set-word-property
\ fixnum/mod [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
CDQ
- [ ECX ] IDIV
+ [ ESI ] IDIV
EAX 3 SHL
0 JNO fixup
\ fixnum/mod compile-call
0 JMP fixup >r
compiled-offset swap patch
- [ ECX -4 ] EAX MOV
- [ ECX ] EDX MOV
- ECX >DS
+ [ ESI -4 ] EAX MOV
+ [ ESI ] EDX MOV
r> compiled-offset swap patch
] "generator" set-word-property
\ arithmetic-type [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
EAX BIN: 111 AND
- EDX [ ECX ] MOV
+ EDX [ ESI ] MOV
EDX BIN: 111 AND
EAX EDX CMP
0 JE fixup >r
\ slot [
PEEK-DS
- ( EAX [ EAX 3 ] MOV )
2unlist type-tag >r cell * r> - EAX swap 2list EAX swap MOV
- [ ECX ] EAX MOV
+ [ ESI ] EAX MOV
] "generator" set-word-property
: compile-call-label ( label -- )
IN: compiler
USING: inference kernel assembler words lists alien memory ;
-: rel-ds ( -- )
- #! Add an entry to the relocation table for the 32-bit
- #! immediate just compiled.
- "ds" f f rel-dlsym ;
-
-: DS ( -- [ address ] ) "ds" f dlsym unit ;
-: DS> ( register -- ) DS MOV rel-ds ;
-: >DS ( register -- ) DS swap MOV rel-ds ;
-
: rel-cs ( -- )
#! Add an entry to the relocation table for the 32-bit
#! immediate just compiled.
: PEEK-DS ( -- )
#! Peek datastack to EAX.
- ECX DS>
- EAX [ ECX ] MOV ;
+ EAX [ ESI ] MOV ;
: POP-DS ( -- )
#! Pop datastack to EAX.
PEEK-DS
- ECX 4 SUB
- ECX >DS ;
+ ESI 4 SUB ;
: PUSH-DS ( -- )
#! Push EAX to datastack.
- ECX 4 ADD
- [ ECX ] EAX MOV
- ECX >DS ;
+ ESI 4 ADD
+ [ ESI ] EAX MOV ;
: PEEK-CS ( -- )
#! Peek return stack to EAX.
ECX >CS ;
: immediate-literal ( obj -- )
- [ ECX ] swap address MOV ;
+ [ ESI ] swap address MOV ;
: indirect-literal ( obj -- )
- ( EAX [ obj ] MOV )
EAX swap intern-literal unit MOV rel-address ;
#push-immediate [
- ECX DS>
- ECX 4 ADD
+ ESI 4 ADD
immediate-literal
- ECX >DS
] "generator" set-word-property
#push-indirect [
- ECX DS>
indirect-literal
PUSH-DS
] "generator" set-word-property
#replace-immediate [
- ECX DS>
immediate-literal
] "generator" set-word-property
#replace-indirect [
- ECX DS>
indirect-literal
- [ ECX ] EAX MOV
+ [ ESI ] EAX MOV
] "generator" set-word-property
\ drop [
drop
- ECX DS>
- ECX 4 SUB
- ECX >DS
+ ESI 4 SUB
] "generator" set-word-property
\ dup [
\ swap [
drop
- ECX DS>
- EAX [ ECX ] MOV
- EDX [ ECX -4 ] MOV
- [ ECX ] EDX MOV
- [ ECX -4 ] EAX MOV
+ EAX [ ESI ] MOV
+ EDX [ ESI -4 ] MOV
+ [ ESI ] EDX MOV
+ [ ESI -4 ] EAX MOV
] "generator" set-word-property
\ over [
drop
- ECX DS>
- EAX [ ECX -4 ] MOV
+ EAX [ ESI -4 ] MOV
PUSH-DS
] "generator" set-word-property
\ pick [
drop
- ECX DS>
- EAX [ ECX -8 ] MOV
+ EAX [ ESI -8 ] MOV
PUSH-DS
] "generator" set-word-property
\ r> [
drop
POP-CS
- ECX DS>
PUSH-DS
] "generator" set-word-property
CELL ds_bot;
/* raw pointer to datastack top */
-DLLEXPORT CELL ds;
+register DLLEXPORT CELL ds asm("esi");
/* raw pointer to callstack bottom */
CELL cs_bot;