1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 05:20:16 +02:00
guile/module/language
Andy Wingo 6f16379e9a allocate free variables inline to closures
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.

* libguile/programs.h (SCM_PROGRAM_FREE_VARIABLES)
  (SCM_PROGRAM_FREE_VARIABLE_REF, SCM_PROGRAM_FREE_VARIABLE_SET)
  (SCM_PROGRAM_NUM_FREE_VARIABLES):
* libguile/programs.c (scm_make_program, scm_program_num_free_variables)
  (scm_program_free_variable_ref, scm_program_free_variable_set_x):
  Allocate free variables inline with programs, instead of being in a
  vect. Should improve locality, and require fewer local variables in
  the VM.

* libguile/vm-engine.c (vm_engine): Remove free_vars and free_vars_count
  variables.

* libguile/vm-engine.h (CACHE_PROGRAM): No need to muck with free_vars
  and free_vars_count.
  (CHECK_FREE_VARIABLE): Update for inline free vars.

* libguile/vm-i-system.c (FREE_VARIABLE_REF): Update for inline free
  vars.
  (make-closure, fix-closure): Take the closure vals as separate stack
  args, and copy or fix them inline into the appropriate closure.

* module/language/objcode/spec.scm (program-free-variables): Define a
  local version of this removed function.

* module/language/tree-il/compile-glil.scm (flatten): Adjust to not make
  a vector when making closures.

* module/system/vm/program.scm: Export program-num-free-variables,
  program-free-variable-ref, program-free-variable-set!, and remove
  program-free-variables.

* test-suite/tests/tree-il.test ("lambda"): Update to not make vectors
  when making closures.
2010-01-09 16:43:26 +01:00
..
assembly Fix incorrect display of wide strings in decompilation 2009-10-28 06:27:47 -07:00
brainfuck Revert "implement #:predicate" and remove predicate from <lambda-case> 2009-11-15 21:02:26 +01:00
bytecode language-readers receive environment as an arg 2009-10-16 13:39:24 +02:00
ecmascript Revert "implement #:predicate" and remove predicate from <lambda-case> 2009-11-15 21:02:26 +01:00
elisp Change the Elisp compiler from GPLv2+ to LGPLv3+. 2009-12-15 19:10:48 +01:00
glil rename goto/args and friends to tail-call, tail-apply, etc 2010-01-03 14:49:40 +01:00
objcode allocate free variables inline to closures 2010-01-09 16:43:26 +01:00
scheme compilation enviroments are always modules; simplifications & refactorings 2009-10-16 15:33:32 +02:00
tree-il allocate free variables inline to closures 2010-01-09 16:43:26 +01:00
value Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
assembly.scm merge from master to elisp 2009-12-11 10:45:18 +01:00
glil.scm more work towards compiling and interpreting keyword args 2009-10-23 15:20:22 +02:00
objcode.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
tree-il.scm rename <conditional> then and else to consequent and alternate 2009-12-11 12:00:27 +01:00