Hi Slava,

I tried using STRUCT: instead of C-STRUCT: in vm.factor, but this 
generates a bootstrap error on loading the vocab. The problem seems to 
occur when using the 'zone' struct in the 'vm' struct. If I replace '{ 
nursery zone }' with '{ nursery cell[4] } then it builds fine.
(file and error pasted below)

I guess this is a dependency issue: vm.factor is loaded before the 
compiler starts compiling. Is there a way around this? I guess if 
C-STRUCT is going soon then I'll need to do the above cell[4] hack.

Thanks,

Phil

---- vm.factor ----

USING: alien.structs alien.syntax classes.struct ;
IN: vm

TYPEDEF: void* cell

STRUCT: zone
{ start cell }
{ here cell }
{ size cell }
{ end cell }
;

STRUCT: vm
{ stack_chain context* }
{ nursery zone }
{ cards_offset cell }
{ decks_offset cell }
{ userenv cell[70] }
;

: vm-field-offset ( field -- offset ) "vm" offset-of ;

---

bootstrap error:

[ ..... stack trace ..... ]
[
     63 getenv error-thread set-global
     continuation -> error-continuation set-global rethrow
]
resource:basis/cpu/x86/64/64.factor

8: cpu.x86.assembler cpu.x86.assembler.operands cpu.x86 cpu.architecture ;
                                                                           ^
resource:basis/cpu/x86/x86.factor

14: compiler.codegen.fixup ;
                             ^
resource:basis/vm/vm.factor

21: ;
      ^
alien-invoke-error instance
library "libc"
symbol  "memcpy"

The following restarts are available:

:1    Load resource:basis/vm/vm.factor again
:2    Load resource:basis/cpu/x86/x86.factor again
:3    Load resource:basis/cpu/x86/64/64.factor again
( scratchpad )



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to