Age | Commit message (Collapse) | Author | Files | Lines |
|
* module/language/elisp/compile-tree-il.scm (compile-%funcall): New
procedure.
* module/language/elisp/runtime/function-slot.scm: Update module
definition.
|
|
* module/language/elisp/subrs.scm (eval, load): Rewrite in Elisp and
move to...
* module/language/elisp/boot.el (eval, load): ...here.
|
|
* module/language/elisp/compile-tree-il (compile-pair): Use `function'
to perform functional evaluation. Previously, if the operator of a
compound form was not a symbol, the operator would be evaluated as a
normal expression. This happened to work only because there is a
`lambda' macro. The compiler will now signal an error if the operator
is neither a function name nor a lambda expression.
* test-suite/tests/elisp-compiler.test ("Lambda Expressions")["optional
argument"]: Remove an erroneous use of `function' in the function
position.
|
|
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/value-slot.scm: Define these as pure modules.
|
|
* language/elisp/compile-tree-il.scm (compile-lambda): Add a `meta'
argument for the procedure's properties.
(compile-function, compile-defmacro, compile-defun): Update
accordingly, passing a `name' property to `compile-lambda' where
possible.
|
|
* module/language/elisp/boot.el (defvaralias): New function.
|
|
* module/language/elisp/boot.el (fset, symbol-value, symbol-function)
(set, makunbound, fmakunbound, boundp, fboundp): Use procedures in
`(language elisp runtime)'.
(symbolp): New function.
* module/language/elisp/compile-tree-il.scm (set-variable!): Use
`set-symbol-function!'.
* module/language/elisp/runtime.scm (reference-variable, set-variable!):
Remove.
(symbol-fluid, set-symbol-fluid!): New procedure.
(symbol-value, set-symbol-value!, symbol-function)
(set-symbol-function!, symbol-bound?, symbol-fbound?, makunbound!)
(fmakunbound!): Moved from `(language elisp subrs)' and updated to
avoid using `reference-variable' and `set-variable!'.
* module/language/elisp/runtime/subrs.scm (symbol-value)
(symbol-function, set, fset, makunbound, fmakunbound, boundp)
(fboundp): Move to `(language elisp runtime)'.
(apply): Use `symbol-function'.
|
|
* module/language/elisp/boot.el (%plist-member, %plist-get, %plist-put)
(plist-get, plist-put, plist-member, lax-plist-get, lax-plist-put)
(symbol-plist, setplist, get, put): New functions.
(plist-function): New variable.
|
|
* module/language/elisp/bindings.scm (mark-global!): Use `lset-adjoin'.
|
|
* module/language/elisp/compile-tree-il.scm (compile-flet*): Remove.
* module/language/elisp/runtime/function-slot.scm: Update module
definition.
* test-suite/tests/elisp-compiler.test
("Lambda Expressions")["flet and flet*"]: Remove `flet*' test.
|
|
* module/language/elisp/compile-tree-il.scm: (always-lexical): Remove.
All uses changed.
(with-added-symbols): Remove.
(compile-with-always-lexical): Remove.
(process-options!): Remove support for the `#:always-lexical' option.
* module/language/elisp/runtime/function-slot.scm: Update import and
re-export lists.
* test-suite/tests/elisp-compiler.test: Remove or update tests using
`with-always-lexical'.
|
|
* module/language/elisp/bindings.scm (global?): New function.
* module/language/elisp/compile-tree-il.scm (lexical-binding): New
variable.
(bind-lexically?): If lexical binding is enabled, bind lexically
unless a special binding exists.
(compile-%set-lexical-binding-mode): New function.
* module/language/elisp/lexer.scm (lexical-binding-regexp): New
variable.
(lex): Return a `set-lexical-binding-mode!' token if a comment is
found while reading the first line.
* module/language/elisp/parser.scm (get-expression): Add support for
`set-lexical-binding-mode!' tokens.
* module/language/elisp/runtime/function-slot.scm: Import and re-export
the `%set-lexical-binding-mode' special form.
* test-suite/tests/elisp-compiler.test
("Let and Let*")["lambda args inside lexical-let"]: Update.
|
|
* module/language/elisp/compile-tree-il.scm (bind-arg-lexical?): Remove.
All callers changed to use `bind-lexically?'.
|
|
* module/language/elisp/boot.el (catch): Only catch exceptions of type
`elisp-exception'.
|
|
* module/language/elisp/runtime/subrs.scm (throw): Rewrite in Elisp and
move to...
* module/language/elisp/boot.el (throw): ...here.
|
|
* module/language/elisp/bindings.scm (map-globals): Use `append-map' and
`map' instead of explicit iteration with named `let'.
|
|
* module/language/elisp/bindings.scm: Use `(srfi srfi-9)'.
(bindings-type): Remove low-level record type definition and replace
with...
(bindings): ...this, an SRFI-9 record type. All uses changed.
(mark-global-needed!): Rename to...
(mark-global!): ...this. All callers changed.
(map-globals-needed): Rename to...
(map-globals): ...this. All callers changed.
|
|
* module/language/elisp/compile-tree-il.scm (generate-let)
(generate-let*, compile-lambda, compile-with-added-symbols)
(compile-progn, compile-if): Return nil if the form's body is empty.
* test-suite/tests/elisp-compiler.test ("Sequencing")["empty progn"]:
New test.
("Conditionals")["if with no else"]: New test.
("Let and Let*")["empty let, empty let*"]: New test.
("Lambda Expressions")["empty lambda"]: New test.
|
|
* module/language/elisp/runtime/macros.scm: Remove.
(macro-lambda, macro-prog1, macro-prog2, macro-cond, macro-and,
macro-or, macro-catch, macro-unwind-protect): Rewrite in Elisp and
move to...
* module/language/elisp/boot.el (lambda, prog1, prog2, cond, and, or,
catch, unwind-protect): ...here.
(eval-and-compile): New macro.
(funcall, fset, null, consp, listp, car, cdr, make-symbol-signal):
Wrap definitions in an `eval-and-compile' form so that they can be
used by the rewritten macros.
* module/language/elisp/runtime.scm: Remove `built-in-macro'.
* module/language/elisp/Makefile.am: Remove
module/language/elisp/runtime/macros.scm from `ELISP_LANG_SOURCES'.
|
|
* module/language/elisp/compile-tree-il.scm (compile-eval-when-compile):
New function.
* module/language/elisp/runtime/function-slot.scm: Update module
definition.
|
|
* module/language/elisp/runtime/macros.scm (when, unless, dotimes)
(dolist, pop, push): Remove. (They are not special forms in Emacs.)
* module/language/elisp/runtime/function-slot.scm: Update import and
export lists.
* test-suite/tests/elisp-compiler.test ("Conditionals")["failing when"]
["succeeding when", "failing unless", "succeeding unless"]: Remove.
("Iteration")["dotimes", "dolist"]: Remove.
("List Built-Ins")["pop", "push"]: Remove.
|
|
* module/language/elisp/boot.el (string, mapcar): New functions.
|
|
* module/language/elisp/runtime/subrs.scm (%, *, +, -, /=, 1+, 1-, <)
(<=, =, >, >=, abs, append, atom, car, car-safe, cdr, cdr-safe, cons)
(consp, eq, equal, fceiling, ffloor, float, floatp, fround, ftruncate)
(funcall, integerp, length, list, listp, make-list, max, min, nlistp)
(nth, nthcdr, null, numberp, reverse, setcar, setcdr, wholenump)
(zerop): Rewrite in Elisp and move to...
* module/language/elisp/boot.el: ...here. Some functions have stricter
type checking, and `elisp-bool' is not currently used (so some
predicate functions now return `#f' instead of `#nil').
(boundp, eval, fboundp, fmakunbound, fset, load, makunbound, set)
(symbol-function, symbol-value, throw): New functions; they call their
existing implementations in subrs.scm.
(@): New macro.
* module/language/elisp/runtime.scm (built-in-func): Remove. All uses
changed.
* module/language/elisp/runtime/function-slot.scm: Update module
definition.
|
|
* module/language/elisp/runtime/subrs.scm (copy-tree, number-sequence):
Remove. (They are not subrs in Emacs.)
* test-suite/tests/elisp-compiler.test ("List Built-ins")["copy-tree",
"number-sequence"]: Remove.
|
|
* module/language/elisp/runtime/subrs.scm (atomp) Rename to...
(atom): ...this. All callers changed.
|
|
* module/language/elisp/compile-tree-il.scm (compile-if): Use the `nil?'
primitive for conditionals.
|
|
* libguile/boolean.c (scm_nil_p): New function.
* libguile/vm-i-scheme.c (nilp, not_nilp):
* libguile/vm-i-system.c (br_if_nil, br_if_not_nil): New instructions.
Renumber other ops.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Increment.
* module/language/assembly/compile-bytecode.scm (compile-bytecode): Add
support for writing `br-if-nil' and `br-if-not-nil' instructions.
* module/language/assembly/disassemble.scm (code-annotation): Add
`br-if-nil' and `br-if-not-nil' to the list of branch instructions.
* module/language/tree-il/compile-glil.scm: Add `nil?' to
`*primcall-ops*'.
(flatten): Use the new branch instructions for `nil?' conditionals.
* module/language/tree-il/primitives.scm: Add `nil?' to
`*interesting-primitive-names*', `*effect-free-primitives', and
`*effect+exception-free-primitives*'.
|
|
* module/language/tree-il/analyze.scm (format-string-argument-count):
Add support for ~h.
* test-suite/tests/tree-il.test ("warnings")["format"]("~h", "~:h with
locale object", "~:h without locale object"): New tests.
|
|
Conflicts:
libguile/debug.h
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
module/language/tree-il/peval.scm
module/language/tree-il/primitives.scm
|
|
Conflicts:
libguile/foreign.c
libguile/hashtab.c
module/ice-9/psyntax-pp.scm
module/language/tree-il/compile-glil.scm
|
|
Conflicts:
libguile/foreign.c
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
|
|
* module/language/tree-il/peval.scm (peval):
* module/language/tree-il/primitives.scm (dynamic-wind): When you make a
gensym that just has to be compared against other gensyms, it will be
unique if the prefix doesn't end in something that can be interpreted
as a number. There's no reason to make that character something
difficult like " ". So change to use a dash in that case.
* module/ice-9/psyntax-pp.scm: Regenerate. More readable now.
|
|
* module/language/tree-il/analyze.scm (format-analysis): Call `warning',
not `warn'.
|
|
* module/language/tree-il/analyze.scm
(format-analysis)[check-simple-format-args]: New procedure. Use it.
Add support for applications of <module-ref>.
* module/system/base/message.scm (%warning-types): Handle the `format
simple-format' warning.
* module/language/scheme/spec.scm (scheme)[make-default-environment]:
Use `simple-format' as the default `format'.
* test-suite/tests/tree-il.test ("warnings")["format"]: Explicitly use
(@ (ice-9 format) format) where needed.
("simple-format"): New test prefix.
|
|
* module/language/assembly/disassemble.scm (code-annotation): Add an
annotation for assert-nargs-ee/locals and assert-nargs-ge/locals.
|
|
* module/language/tree-il/peval.scm (peval): Fold (values
'singly-valued-expression) to 'singly-valued-expression in contexts
that expect multiple values, in addition to those that expect single
values.
|
|
* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Fix
miscompilation of `values' in a push context with RA.
* test-suite/tests/tree-il.test: Add low-level test for this
miscompilation.
|
|
* module/language/glil/compile-assembly.scm (scheme-list?): Don't
diverge when serializing cyclic lists.
|
|
* module/language/glil/compile-assembly.scm (scheme-list?): New
predicate, like `list?' but requires that the last cdr must be '(),
not #nil.
(dump-object, dump-constants): Use `list' opcode to create a list only
if it is terminated by '(). If it's terminated by #nil, we must use
the more general `cons' opcode.
|
|
Conflicts:
libguile/__scm.h
libguile/array-map.c
libguile/procprop.c
libguile/tags.h
module/ice-9/deprecated.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/standalone/test-num2integral.c
test-suite/tests/regexp.test
|
|
|
|
Conflicts:
module/ice-9/psyntax-pp.scm
module/language/tree-il/peval.scm
|
|
- "filesystem" -> "file system"
- remove doubled words
- use EXIT_* macros instead of literal numbers
- update `syntax-check' exclusion files
|
|
* module/language/tree-il/analyze.scm (analyze-lexicals): Fix comment,
which describes the compiler's allocation table, to match reality.
|
|
* module/language/tree-il/peval.scm (peval): (cons FOO #nil) is not
(cons FOO '()).
* test-suite/tests/tree-il.test ("partial evaluation"): Add a test.
|
|
* module/language/tree-il/peval.scm (peval): Record residual values in
both value and values contexts. No test cases, it just seemed like a
good idea.
|
|
Conflicts:
libguile/feature.c
m4/gnulib-cache.m4
module/ice-9/deprecated.scm
module/language/tree-il/peval.scm
|
|
* module/language/tree-il/peval.scm (singly-valued-expression?): New
helper.
(truncate-values): Use the helper.
(make-operand): Minor refactor.
(set-operand-residual-value!): Try to undo the effects of (values
FOO), if the continuation will check itself for the correct number of
values.
(peval): Fold helpers into fold-constant. Add a constant-expression?
case for (values FOO). Add a new context: "values", for contexts in
which multiple values are allowed, either because of being in a tail
context relative to a function, or because of let-values. "value" is
now for single values. Don't visit operands for "values", as their
binding form truncates to one value. Add a case to fold (values ...)
forms. Fix folding of (lambda), to process the cases in values
context instead of tail context (which could have been "value", which
would cause the procedure to truncate).
|
|
Conflicts:
configure.ac
|
|
Reported by Cédric Cellier <rixed@happyleptic.org>.
* module/language/tree-il/peval.scm (truncate-values): New procedure.
(make-operand): Call `truncate-values' SOURCE.
* test-suite/tests/tree-il.test ("partial evaluation"): New tests for
multiple value truncation.
|