1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

83 commits

Author SHA1 Message Date
Andy Wingo
e42573315b merge from master to elisp
* module/language/elisp/compile-tree-il.scm: Update for changes to
  tree-il (lambda-case, mainly).

* module/language/elisp/spec.scm: Update GPL version to 3. Update reader
  for new taking a port and environment argument.

* libguile/_scm.h: Bump objcode version.

* libguile/vm-i-system.c: Fix conflicts.

* module/Makefile.am: Fix conflicts, and add elisp modules to the build.
2009-12-11 10:45:18 +01:00
Daniel Kraft
15eeabfd53 Don't accept backquote/unquote/unquote-splicing any longer in elisp.
The real names \`, \, and \,@ should be used instead and are returned
now by the real reader.

* module/language/elisp/compile-tree-il.scm: Only accept correct names.
2009-08-27 16:19:03 +02:00
Daniel Kraft
1b1195f29b Abstracted dynamic binding a little off the fluids.
* module/language/elisp/compile-tree-il.scm: Move dynamic binding to one place
  and changed names that refer to `fluids' for dynamic binding.
* module/language/elisp/bindings.scm: Changed names referring to `fluids'.
2009-08-04 09:23:02 +02:00
Daniel Kraft
f4dc86f137 Implement catch and unwind-protect as macros.
* module/language/elisp/compile-tree-il.scm: Remove catch and unwind-protect.
* module/language/elisp/runtime/macro-slot.scm: Re-implement them here.
2009-08-03 18:22:12 +02:00
Daniel Kraft
dfbc6e9d54 Allow lexical binding of lambda arguments.
* module/language/elisp/compile-tree-il.scm: Rework lambda compiler to allow
  opional lexical binding of (some) lambda arguments.
* test-suite/tests/elisp-compiler.test: Check this.
2009-08-01 13:00:27 +02:00
Daniel Kraft
c808c926fd Compiler option to always bind certain symbols lexically.
Affects so far let-bound symbols, lambda arguments to come in the future.

* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Add :always-lexical option.
* test-suite/tests/elisp-compiler.test: Test it.
2009-07-31 18:00:01 +02:00
Daniel Kraft
e6042c08b7 Implement some elisp constructs in macros instead of hard-coded compiler code.
* module/language/elisp/compile-tree-il.scm: Remove implementation of prog1,
  and, or, cond, dolist.
* module/language/elisp/runtime/macro-slot.scm: Implement them here instead.
2009-07-30 21:43:24 +02:00
Daniel Kraft
f3df67e203 without-void-checks as new extension for fine-control
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Handle without-void-checks.
* test-suite/tests/elisp-compiler.test: Test it.
2009-07-30 13:51:45 +02:00
Daniel Kraft
c61ec8e29e Added guile-primitive construct for references to primitives from Elisp.
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Implement guile-primitive.
* test-suite/tests/elisp-compiler.test: Switched a usage of guile-ref to
  the now available guile-primitive.
2009-07-29 14:25:33 +02:00
Daniel Kraft
a6a5cf03d4 Implemented lexical-let and lexical-let* for elisp.
* module/language/elisp/README: Document it.
* module/language/elisp/bindings.scm: New fields in bindings data structure
  to keep track of lexical bindings for symbols.
* module/language/elisp/compile-tree-il.scm: Implement lexical-let(*).
* test-suite/tests/elisp-compiler.test: Test lexical scoping with lexical-let.
2009-07-29 12:09:43 +02:00
Daniel Kraft
a089997441 Compiler option to disable void-checks in elisp.
* module/language/elisp/README: Document the change.
* module/language/elisp/compile-tree-il.scm: Add disable-void-check option.
* test-suite/tests/elisp-compiler.test: Test it.
2009-07-24 11:09:57 +02:00
Daniel Kraft
a90d9c855d Don't pass the bindings-data all around in compile-tree-il, but use fluids for this dynamic binding.
* module/language/elisp/compile-tree-il.scm: Use fluid for bindings-data.
2009-07-24 10:40:07 +02:00
Daniel Kraft
e8f18b3f63 Implemented the flet and flet* extensions.
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Implement flet and flet*.
* test-suite/tests/elisp-compiler.test: Test flet and flet*.
2009-07-24 09:56:13 +02:00
Daniel Kraft
3709984696 Implemented dynamic symbol access built-ins (set, fset, symbol-value, makunbound...)
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Moved ensure-fluid! to runtime function.
* module/language/elisp/runtime.scm: Runtime functions to support dynamic value access.
* module/language/elisp/runtime/function-slot.scm: Defined the built-ins.
* test-suite/tests/elisp-compiler.test: Test them.
2009-07-23 14:09:55 +02:00
Daniel Kraft
33da12eeff Added guile-ref extension construct, change throw implementation to easier one using a built-in function and implement unwind-protect.
* module/language/elisp/README: Document the changes.
* module/language/elisp/compile-tree-il.scm: Implement unwind-protect.
* module/language/elisp/runtime/function-slot.scm: throw as built-in.
* test-suite/tests/elisp-compiler.test: Test unwind-protect.
2009-07-22 12:50:56 +02:00
Daniel Kraft
35b2e41d6d Implemented catch and throw in elisp.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement catch and throw.
* test-suite/tests/elisp-compiler.test: Test catch/throw.
2009-07-22 12:23:03 +02:00
Daniel Kraft
5d221ca375 Don't ensure fluids all over the place but scan for variables needed and ensure just before the compiled code all those.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement it here, pass bindings all around the compilation.
* module/language/elisp/bindings.scm: New module with symbol-tracking abilities needed for this.
2009-07-21 16:45:10 +02:00
Daniel Kraft
fb66a47a8e Implemented prog1, prog2, dotimes, dolist control structures.
* module/language/elisp/README: Document it and some further ideas written down.
* module/language/elisp/compile-tree-il.scm: Implement prog1, dolist.
* module/language/elisp/runtime/macro-slot.scm: prog2 and dotimes.
* test-suite/tests/elisp-compiler.test: Test prog1, prog2, dotimes, dolist.
2009-07-20 20:52:00 +02:00
Daniel Kraft
570c12aca7 Return correct value for setq form.
* module/language/elisp/compile-tree-il.scm: Fix implementation of setq.
* test-suite/tests/elisp-compiler.test: Check for value of setq form.
2009-07-18 17:58:01 +02:00
Daniel Kraft
9b5ff6a6e1 Implemented real quotation (added support for backquotation).
* module/language/elisp/README: Document that.
* module/language/elisp/compile-tree-il.scm: Implement backquote.
* test-suite/tests/elisp-compiler.test: Test quotation and backquotes.
2009-07-18 17:32:59 +02:00
Daniel Kraft
74c009dadc Implemented macros in elisp compiler.
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Implement defmacro and expansion.
* module/language/elisp/runtime/macro-slot.scm: New module to keep definitions.
* test-suite/Makefile.am: Add elisp-compiler.test to list of tests.
* test-suite/tests/elisp-compiler.test: Basic macro tests.
2009-07-16 15:23:38 +02:00
Daniel Kraft
de9f26b5f0 Implemented defconst, defvar, defun special forms for elisp.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement defconst/defvar/defun.
2009-07-14 21:18:07 +02:00
Daniel Kraft
1e018f6c67 Some bug fixes on the way and mainly implemented some built-ins (arithmetic).
* module/language/elisp/README: Document changes.
* module/language/elisp/compile-tree-il.scm: Bug fixes to fluid-creation.
* module/language/elisp/runtime.scm: Some helping definitions for built-ins.
* module/language/elisp/runtime/function-slot.scm: Defined artihmetic built-ins.
2009-07-13 18:35:57 +02:00
Daniel Kraft
f28de79197 Automatically create fluids when necessary.
* module/language/elisp/README: Document that.
* module/language/elisp/compile-tree-il.scm: Create fluids when necessary.
* module/language/elisp/runtime/function-slot.scm: Fix module name.
2009-07-13 17:26:07 +02:00
Daniel Kraft
cef997e82a Fixed lambda expressions and implemented function calls using the basic list notation.
* module/language/elisp/README: Document that.
* module/language/elisp/compile-tree-il.scm: Implement function calls.
2009-07-13 16:51:05 +02:00
Daniel Kraft
50abfe7649 Lambda expressions in elisp, but not yet function calls.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement lambda expressions.
2009-07-13 15:43:53 +02:00
Daniel Kraft
3a4b86357e Implemented let and let* in elisp.
* module/language/elisp/README: Document it.
* module/language/elisp/compile-tree-il.scm: Implement let and let*.
2009-07-07 19:38:25 +02:00
Daniel Kraft
d221c18bc0 Implemented while construct in elisp.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement while construct.
2009-07-07 17:26:22 +02:00
Daniel Kraft
344927c3f8 Implemented fluid-based variable references and setting using setq.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement variable references, setq
* module/language/elisp/runtime.scm: New file for runtime definitions.
* module/language/elisp/runtime/function-slot.scm: Ditto.
* module/language/elisp/runtime/value-slot.scm: Ditto.
2009-07-03 23:00:12 +02:00
Daniel Kraft
fdfb36de84 Implemented elisp's or form.
* module/language/elisp/README: Document this.
* module/language/elisp/compile-tree-il.scm: Implement or.
2009-07-02 21:22:25 +02:00
Daniel Kraft
a431673924 For elisp's (cond ...) and (condition) forms without body, return the condition as value.
* compile-tree-il.scm: Fix compilation of (cond ...) for bodyless conditions.
2009-07-02 21:10:38 +02:00
Daniel Kraft
4530432e01 Added make-nil instruction to VM and use it for Emacs' nil in the compiler.
* doc/ref/vm.texi: Document new instruction.
* libguile/vm-i-system.c: Add it to the VM.
* module/language/assembly.scm: Compile (const %nil) to (make-nil) assembly.
* module/language/glil/decompile-assembly.scm: Handle (make-nil)
* module/language/elisp/compile-tree-il.scm: Use (const %nil) for nil.
2009-06-29 13:16:27 +02:00
Daniel Kraft
51248e6e25 First code for elisp compilation, handling a very limited set of operations (but not really usable yet).
* module/language/elisp/README: New file containing some notes.
* module/language/elisp/compile-tree-il.scm: New file with compilation code.
* module/language/elisp/spec.scm: Updated language definition.
2009-06-09 21:37:13 +02:00