| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (access-variable)
(reference-variable, set-variable!): Handle globally-bound non-special
variables.
(bind-lexically?): Create lexical bindings for flet and flet*.
* module/language/elisp/runtime.scm (reference-variable, set-variable!):
Handle globally-bound non-special variables.
(built-in-func): Set the variable directly instead of storing the
function in a fluid.
* module/language/elisp/runtime/subrs.scm (funcall): Call apply
directly.
* test-suite/tests/elisp-compiler.test ("Function Definitions")["flet
and flet*"]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (reference-with-check)
(compile-without-void-checks, want-void-check?): Remove.
(compile-function, compile-pair): Use `reference-variable' instead of
`reference-with-check'.
(compile-defvar): Only set `sym' if `sym' is not bound to a bound
fluid, rather than requiring that its value be `void'.
(process-options!): Remove `#:disable-void-check' option handling.
* module/language/elisp/runtime.scm (void)
(reference-variable-with-check): Remove.
(ensure-fluid!): Use an undefined fluid as the initial value for
global variables.
* module/language/elisp/runtime/function-slot.scm (without-void-checks):
Don't import or re-export.
* module/language/elisp/runtime/macros.scm (prog1, cond, or, dolist):
Don't use `without-void-checks'.
* module/language/elisp/runtime/subrs.scm (symbol-value)
(symbol-function, apply): Use `reference-variable' instead of
`reference-variable-with-check'.
(makunbound, fmakunbound, boundp, fboundp): Unset the variable's fluid
(or the variable itself, if it isn't bound to a fluid).
* test-suite/tests/elisp-compiler.test ("Variable
Setting/Referencing")["disabled void check (all)", "disabled void
check (symbol list)", "without-void-checks"]: Remove.
|
|
|
|
|
| |
* libguile/variable.c (scm_variable_unset_x): New function.
* libguile/variable.h (scm_variable_unset_x): New prototype.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/fluids.c (scm_make_undefined_fluid, scm_fluid_unset_x)
(scm_fluid_bound_p): New functions.
(fluid_ref): New function; like scm_fluid_ref, but will not throw an
error for unbound fluids.
(scm_fluid_ref, swap_fluid): Use `fluid_ref'.
* libguile/fluids.h (scm_make_undefined_fluid, scm_fluid_unset_x)
(scm_fluid_bound_p): New prototypes.
* libguile/vm-i-system.c (fluid_ref): If fluid is unbound, jump to
`vm_error_unbound_fluid'.
* libguile/vm-engine.c (VM_NAME)[vm_error_unbound_fluid]: New error
message.
* test-suite/tests/fluids.test ("unbound fluids")["fluid-ref of unbound
fluid", "fluid-bound? of bound fluid", "fluid-bound? of unbound
fluid", "unbound fluids can be set", "bound fluids can be unset"]: New
tests.
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (compile-function): the form
`(function SYMBOL)' evaluates to the functional value of SYMBOL
|
|
|
|
|
| |
* module/language/elisp/runtime/subrs.scm (setcar, setcdr): Allow
setting the car or cdr of `nil' to `nil'.
|
|
|
|
|
|
| |
* module/language/elisp/lexer.scm (lex):
* module/language/elisp/parser.scm (get-expression): Support sharpsign
single-quote syntax as an abbreviation for `function' expressions.
|
|
|
|
| |
* module/ice-9/boot-9.scm (guile-user): Autoload `compile-file'.
|
|
|
|
|
|
|
|
|
|
|
| |
* test-suite/guile-test: Use "../meta/guile" as the interpreter instead
of "../libguile/guile".
(default-test-suite): New function, replacing the variable of the same
name. Look for tests in the same directory as the guile-test script.
Throw an error if not invoked as `guile-test'.
(test-suite): The old default value of `default-test-suite' could now
throw an error, and this already gets initialized in `main', so don't
provide an initial value.
|
|
|
|
| |
* module/language/elisp/.dir-locals.el: New file. Set fill-column to 72.
|
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (compile-setq): Return nil
if called with no arguments, and set the last variable to nil if its
value is omitted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use #{`}#, #{,}# and #{,@}# as the quasiquote, unquote and
unquote-splicing operators, respectively. Previously they were named
escaping.
* module/language/elisp/compile-tree-il.scm (unquote?): Change "\," to
"#{,}#".
(unquote-splicing): Change "\,@" to "#{,@}#".
(#{compile-`}#): Rename from #{compile-\`}#.
* module/language/elisp/runtime/function-slot.scm: Import #{compile-`}#
instead of #{compile-\`}#, and re-export as #{`}# instead of as
#{\`}#.
* module/language/elisp/parser.scm (quotation-symbols):
* test-suite/tests/elisp-compiler.test ("Eval", "Quotation"):
* test-suite/tests/elisp-reader.test ("Parser"): Change "\`", "\,", and
"\,@" to "#{`}#", "#{,}#" and "#{,@}#", respectively.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the function slot of a symbol contains a pair with `special-operator'
in the car and a procedure in the cdr, the procedure is called to
compile the form to Tree-IL. This is similar to other Emacs Lisp
implementations, in which special operators are subrs.
* module/language/elisp/compile-tree-il.scm: Restructured to store
special operator definitions in the function slot. Import `(language
elisp runtime)' for `defspecial'. Export special operators so that
`(language elisp runtime function-slot)' can re-export them.
(backquote?): Removed; the backquote symbol is defined as a special
operator, so it's no longer used in `compile-pair'.
(is-macro?, get-macro): Replaced by `find-operator'.
(find-operator): New procedure.
(compile-progn, compile-if, compile-defconst, compile-defvar,
compile-setq, compile-let, compile-lexical-let, compile-flet,
compile-let*, compile-lexical-let*, compile-flet*,
compile-without-void-checks, compile-with-always-lexical,
compile-guile-ref, compile-guile-primitive, compile-while,
compile-function, compile-defmacro, compile-defun, #{compile-`}#,
compile-quote): New special operators with definitions taken from the
pmatch form in `compile-pair'. There is no special operator `lambda';
it is now a macro, as in other Elisp implementations.
(compile-pair): Instead of directly compiling special forms, check for
a special operator object in the function slot.
* module/language/elisp/runtime.scm: Export `defspecial'.
(make-id): New function.
(built-in-macro): Prefix macros with `macro-'.
(defspecial): New syntax.
* module/language/elisp/runtime/function-slot.scm: Import and re-export
special operators. Rename imported special operators and macros to
remove prefixes. Re-export new macro `lambda'.
* module/language/elisp/runtime/macros.scm (macro-lambda): New Elisp
macro.
|
|
|
|
|
| |
* test-suite/tests/elisp-reader.test (lex-all, "end-of-input",
"lexer/1"): Check for an EOF token instead of the symbol `*eoi*'.
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (ensuring-globals): New
procedure.
(define-macro!): Remove.
(compile-pair) <defmacro>: Make macro available at runtime, not only
during compilation.
(compile-tree-il): Use `ensuring-globals'.
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (define-macro!, get-macro):
Allow fluid macro bindings.
|
|
|
|
|
| |
* module/language/elisp/runtime/subrs.scm: Define new subr `load'.
* module/language/elisp/runtime/function-slot.scm: Re-export `load'.
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (process-options!): Ignore
#:warnings compiler option.
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/lexer.scm (lex, get-lexer/1): Return a valid
token at EOF.
* module/language/elisp/parser.scm (get-expression): Raise an error if
EOF is reached.
(read-elisp): If at EOF, return the EOF object instead of attempting
to read an expression.
|
| |
|
|
|
|
|
| |
* test-suite/tests/elisp-compiler.test (compile-test): Add
`pass-if-equal' to the list of literal identifiers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guile Emacs Lisp previously kept macros in a separate macro slot; now
macros are stored as macro objects in the function slot for
compatibility with other implementations.
* module/language/elisp/compile-tree-il.scm (macro-slot): Remove.
(is-macro?): Check that the argument is a symbol. Now-unnecessary
check removed in `compile-tree-il'.
(macro?, define-macro!, get-macro): Store macro definitions in the
function slot, not in a separate macro slot.
* module/language/elisp/runtime.scm (built-in-macro): Wrap the macro
function in a macro object (i.e., cons the symbol `macro' onto it).
* module/language/elisp/runtime/function-slot.scm: Move contents to
"subrs.scm". Re-export function and macro definitions instead of
defining functions directly in this module.
* module/language/elisp/runtime/macro-slot.scm: Move contents to
"macros.scm" and remove.
* module/language/elisp/runtime/macros.scm: New file containing macro
definitions from "macro-slot.scm".
* module/language/elisp/runtime/subrs.scm: New file containing function
definitions from "function-slot.scm".
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (compile-pair): Use existing
bindings record during macro definition.
|
|
|
|
|
|
| |
* module/language/elisp/compile-tree-il.scm (compile-lambda): Use
Tree-IL's support for optional arguments.
(process-optionals, process-rest): Remove.
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm:
* module/language/elisp/spec.scm: Reindent.
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm:
* module/language/elisp/runtime/value-slot.scm: Reformat comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm: Ensure that all
top-level forms and comments are separated by exactly one newline.
Remove blank lines in most procedure bodies. Delete trailing
whitespace.
|
|
|
|
|
|
|
|
|
|
|
| |
argument to Guile's `member' and `assoc' functions has a different expected
arity.
* module/rnrs/lists.scm (memp, assp): Wrap the predicate function with a
two-argument wrapper before calling Guile's underlying implemenation.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-lists.test to
SCM_TESTS.
* test-suite/tests/r6rs-lists.test: New file.
|
|
|
|
|
|
|
|
|
| |
`for-each' and `map' implementations do not operate on lists and vectors
interchangeably.
* module/rnrs/base.scm (vector-for-each, vector-map): New functions.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-base.test to SCM_TESTS.
* test-suite/tests/r6rs-base.test: New file.
|
|
|
|
| |
* doc/ref/r6rs.texi: Note about rnrs io ports.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* README: Remove docs on "discouraged".
* configure.ac: Remove one more "discouraged" thing.
* doc/ref/api-deprecated.texi: Rename from api-discdepr.texi, and remove
sections on "discouraged".
* doc/ref/Makefile.am:
* doc/ref/guile.texi: Update referrers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/discouraged.h: Remove.
* libguile/deprecated.c (scm_internal_select, scm_thread_sleep)
(scm_thread_usleep): Deprecate formerly discouraged names.
* libguile/eq.h (SCM_EQ_P):
* libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP):
* libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
(SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm
not sure deprecating them will do any good.
* libguile.h:
* libguile/gen-scmconfig.c:
* libguile/numbers.c:
* libguile/init.c:
* libguile/Makefile.am:
* configure.ac: Remove bits that referenced discouraged.h, and dealt
with the "discouraging" system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/Makefile.am:
* libguile/discouraged.c: Remove discouraged.c.
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/discouraged.h: All functions and declarations moved from
discouraged.[ch] to deprecated.[ch], adding deprecation warnings.
* libguile/init.c: Remove discouraged init.
* libguile/numbers.c (scm_num2float, scm_num2double): Deprecate.
* test-suite/standalone/test-num2integral.c: Port to modern API.
|
|
|
|
|
| |
* doc/ref/r6rs.texi (R6RS Incompatibilities): Add section on string
syntax.
|
|
|
|
|
| |
* doc/ref/r6rs.texi (R6RS Incompatibilities): Add a section about
toplevel expansion, before taking a look at fixing it...
|
|
|
|
| |
* NEWS: Update some more.
|
|
|
|
|
| |
* module/system/repl/debug.scm (narrow-stack->vector): Fix for the
tail-call to `throw' case, as in `(quit)'.
|
|
|
|
|
| |
* module/system/repl/repl.scm (run-repl): Catch errors executing
metacommands. Feature on top of feature...
|
|
|
|
| |
* NEWS: Update for 1.9.12.
|
|
|
|
|
|
|
|
|
| |
* libguile/foreign.c (scm_i_pointer_print): Print in hexadecimal.
* doc/ref/api-foreign.texi (Modules and Extensions): Update for
"extensiondir", and a discussion of Guile versions.
(Foreign Variables): Fix discussion of types.
(Void Pointers and Byte Access): Fix typo.
|
|
|
|
|
|
| |
* doc/ref/api-foreign.texi:
* libguile/dynl.c (scm_dynamic_pointer): Remove discussion of types from
the docstring.
|
|
|
|
|
|
| |
* libguile/Makefile.am (libpath.h): Change "extensionsdir" to
"extensiondir".
* meta/guile-2.0.pc.in (extensiondir): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/load.h:
* libguile/load.c (scm_sys_global_site_dir): New API, is what %site-dir
used to be.
(scm_sys_site_dir): Changed to be a version-specific dir.
(scm_init_load_path): Search the version-specific sitedir before the
global one.
* libguile/Makefile.am (libpath.h): Update SCM_SITE_DIR and
SCM_GLOBAL_SITE_DIR, as appropriate.
|
|
|
|
|
|
|
|
| |
* doc/ref/repl-modules.texi: Remove section on Value History, it's
covered in scheme-using.
* doc/ref/scheme-using.texi: Rename "Value Historyx" section to "Value
History".
* doc/ref/guile.texi: Update xref.
|
|
|
|
|
| |
* doc/ref/api-macros.texi (Identifier Macros): Add documentation for
settable identifier syntax.
|
|
|
|
|
|
|
|
|
|
| |
* doc/ref/api-binding.texi: Add docs for letrec*, and revise some other
text.
* doc/ref/compiler.texi: Update <letrec> for in-order?.
* doc/ref/r6rs.texi: Add letrec* entry.
* module/rnrs.scm:
* module/rnrs/base.scm: Export letrec*.
|
|
|
|
| |
* NEWS: Update.
|
|
|
|
|
|
|
|
|
|
| |
* libguile/vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
Fix some bugs reported by Michael Lucy -- both variants would happily
write beyond the end, and vector-move-right! didn't increment the
counter before copying in the reverse direction.
* test-suite/tests/vectors.test ("vector-move-left!"):
("vector-move-right!"): Add tests.
|
|
|
|
|
|
|
|
|
| |
There was a race condition when building Guile since DOT_X_FILES didn't
depend on version.h, which is dynamically generated. Sometimes the
DOT_X_FILES are compiled before the version.h is generated and leads to
build failure. This patch fixed this problem.
Signed-off-by: Yan Li <yan.i.li@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For > 32 bit integers still in the fixnum range, scm_random() would
return random numbers with a lower range than specified.
* libguile/random.c (scm_i_mask32): New static inline function.
(scm_c_random): Use `scm_i_mask32'.
(scm_c_random64): New function, 64-bit variant of scm_c_random.
(scm_random): Use `scm_c_random64' instead of forming the 64-bit random
number in a bogus way.
* libguile/random.h: Added `scm_c_random64'.
|