loadfile  again!

who is calling loadfile?

in c compiler
  mode 2  (compile)
  c load compiler-object
  generate "call loadfile 1"
    at the end of CS
  start vm by eval(2)

in som compiler

in "main", it called 
  loadfile "lib2.som"
  loadfile src_file


source file "som51.txt" is a recursive load source files:

  load "string-s.txt" 
  load ...

(*) load is syscall {15 fn}
which in turn switch to system space (the compiler object) and eval(call_load) 

call_load is a call to the compiler "loadfile" 

at the return of "loadfile", this vm is stopped. then, switch back to user space (continue to run user program).

each line in recursive source file is a call to "load source" which in turn execute syscall {15 fn} hence it repeats (*).
when it returns it should continue to read the next line.

23 Dec 2010
