summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tweak to eval.ceval-cleanupAndy Wingo2009-08-211-3/+3
| | | | | * libguile/eval.c (eval_letrec_inits): Rename from ceval_letrec_inits. Caller changed.
* eval.i.c -> eval.cAndy Wingo2009-08-213-1690/+1653
| | | | | | | * libguile/Makefile.am: * libguile/eval.i.c: Remove eval.i.c. * libguile/eval.c: Fold eval.i.c's contents into eval.c.
* more ceval excisionAndy Wingo2009-08-212-44/+24
| | | | | | * libguile/eval.c: * libguile/eval.i.c: Rename deval to eval. Substitute in some preprocessor macros.
* remove code from eval.i.c that was only for CEVAL.Andy Wingo2009-08-211-259/+0
| | | | * libguile/eval.i.c: Remove CEVAL-only code.
* Don't double-include eval.i.c -- let's only build deval.Andy Wingo2009-08-212-48/+37
| | | | | | | | | * libguile/eval.c (SCM_I_XEVAL, SCM_I_XEVALCAR): No more debug_p args, we are always debugging. Adapt all callers. (ceval_letrec_inits): For some reason this function is used by deval. No idea why. Pull it out here. * libguile/eval.i.c (SCM_APPLY): scm_dapply is scm_apply.
* gut trampolinesAndy Wingo2009-08-211-306/+11
| | | | | | | * libguile/eval.c: Gut the trampoline implementation. We'll be doing much more clever things here that will obviate the need for the procedure arg of map and for-each to be allocated in many cases... trampolines were a noble attempt at optimizing in the wrong place.
* expand out named let to letrec in the eval caseAndy Wingo2009-08-212-5340/+5365
| | | | | | * module/ice-9/psyntax.scm: In the eval case, expand out named let to letrec. * module/ice-9/psyntax-pp.scm: Regenerated.
* eval is actually compileAndy Wingo2009-08-202-24/+30
| | | | | | | | | | * module/ice-9/boot-9.scm (eval): Here at the tail of boot-9, replace the root definition of `eval' with a procedure that will call `compile'. * test-suite/tests/syntax.test ("top-level define"): ("internal define"): Run unmemoization tests in the interpreter, using primitive-eval.
* programs have their own tc7 nowAndy Wingo2009-08-2019-81/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/tags.h (scm_tc7_program): * libguile/programs.h: Programs now have their own tc7 code. Fix up the macros appropriately. * libguile/programs.c: Remove smobby bits, leaving marking, printing, and application for other parts of Guile. * libguile/debug.c (scm_procedure_source): * libguile/eval.c (scm_trampoline_0, scm_trampoline_1) (scm_trampoline_2): Add cases for tc7_program. * libguile/eval.i.c (CEVAL, SCM_APPLY): * libguile/evalext.c (scm_self_evaluating_p): * libguile/gc-card.c (scm_i_sweep_card, scm_i_tag_name): * libguile/gc-mark.c (1): * libguile/print.c (iprin1): * libguile/procs.c (scm_procedure_p, scm_thunk_p) * libguile/vm-i-system.c (make-closure): Adapt to new procedure representation. * libguile/procprop.c (scm_i_procedure_arity): Do the right thing for programs. * test-suite/tests/procprop.test ("procedure-arity"): Arity test now succeeds. * libguile/goops.c (scm_class_of): Programs now belong to the class <procedure>, not a smob class. * libguile/vm.h (struct vm, struct vm_cont): * libguile/vm-engine.c (vm_engine): * libguile/frames.h (SCM_FRAME_BYTE_CAST, struct vm_frame): * libguile/frames.c (scm_c_make_vm_frame): Fix usages of scm_byte_t, changing them to scm_t_uint8.
* eval-elisp uses primitive-evalAndy Wingo2009-08-201-1/+4
| | | | | * lang/elisp/interface.scm (eval-elisp): Use primitive-eval, as we will be switching the evaluator soon.
* define @bind using syntax-caseAndy Wingo2009-08-202-9/+39
| | | | | | | | * module/ice-9/boot-9.scm (@bind): Define a VM-compatible syntax definition for this old evaluator primitive. * test-suite/tests/dynamic-scope.test: Change the expected error messages.
* use primitive-eval in run-vm-tests.scmAndy Wingo2009-08-201-2/+1
| | | | | * testsuite/run-vm-tests.scm (run-vm-tests): Use primitive-eval, as we'll be changing eval soon.
* better VM error messagesAndy Wingo2009-08-201-9/+8
| | | | | * libguile/vm-engine.c: Attempt to make error messages more friendly and uniform with historical expectation.
* update docs for calling convention changeAndy Wingo2009-08-201-64/+54
| | | | * doc/ref/vm.texi: Update.
* push new frame on stack before procedure & argsAndy Wingo2009-08-205-57/+78
| | | | | | | | | | | | | | | | | | | * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump * libguile/vm-engine.c (vm_engine): Push a frame corresponding to the mv-call. * libguile/vm-i-system.c: Renumber ops. (new-frame): New op, pushes a frame. (call, mv-call): No need to shuffle args, though we do need to pop the frame in the non-vm call case. (goto/args): Inconsequential tweaks. (call/cc): Push a frame if needed. * module/language/tree-il/compile-glil.scm (flatten): Emit `new-frame' as appropriate. * test-suite/tests/tree-il.test: Fix to expect new-frame.
* reorder frame layoutAndy Wingo2009-08-206-123/+85
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/frames.h: Reorder the frame layout so the return address comes below the arguments.working (SCM_FRAME_SET_RETURN_ADDRESS, SCM_FRAME_SET_MV_RETURN_ADDRESS): New macros. * libguile/frames.c (scm_vm_frame_arguments): Use the macros to access the arguments. * libguile/vm-engine.c (vm_engine): Fix for new calling convention. * libguile/vm-engine.h (INIT_FRAME): New macro. Does part of what NEW_FRAME used to do. * libguile/vm-i-system.c (call, mv-call): Shuffle args up to make room for the stack, and adapt to new calling convention. (goto/args): Shuffling down is easier now. (return, return/args): Adapt to new frame layout. * libguile/vm.c (vm_mark_stack): Adapt to new frame layout, and the possibility of there being crap on the stack. (really_make_boot_program): Remove extraneous comment.
* remove dead weight from vm-i-system.cAndy Wingo2009-08-202-222/+59
| | | | | | | | | | | | * libguile/vm-i-system.c: Remove mark, list-mark, cons-mark, vector-mark, and list-break, as they are no longer used. (call, goto/args, mv-call): Remove bits about trampolines, which was slower, and VM continuations, which are not used (we use Guile's continuations as the applicable objects). Renumber ops. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
* disable autocompilation in the test suiteAndy Wingo2009-08-201-1/+1
| | | | | * check-guile.in: Disable autocompilation while working in the test suite, for now at least. We'll enable it again later.
* autocompiled files before installation go to a cache dir in the builddirAndy Wingo2009-08-204-3/+10
| | | | | | | | | | | | * libguile/load.c (scm_init_load_path): Append a slash after XDG_CACHE_HOME. * meta/gdb-uninstalled-guile.in: * meta/guile.in (XDG_CACHE_HOME): Export this var so we write to a cache within the build directory. Probably we should have a GUILE_CACHE_DIR to be more specific, though. * Makefile.am (clean-local): Clear the cache when making clean.
* type limits error in string-tabulateMichael Gran2009-08-201-1/+1
| | | | | * libguile/srfi-13.c (scm_string_tabulate): test range of signed integer before casting it to unsigned size_t
* Update srfi-13 functions for UnicodeMichael Gran2009-08-191-913/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/srfi-13.c (MY_SUBF_VALIDATE_SUBSTRING_SPEC): new macro (MY_VALIDATE_SUBSTRING_SPEC_COPY): now unused, removed (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): now unused, removed (REF_IN_CHARSET): new macro (race_error)[0]: unused, removed (scm_string_any, scm_string_every, scm_string_tabulate) (scm_substring_to_list, scm_reverse_string_to_list) (scm_reverse_list_to_string, scm_string_join) (s_scm_srfi13_substring_copy, scm_string_copy, scm_string_copy_x) (scm_string_pad, scm_string_pad_right, scm_string_trim) (scm_string_trim_right, scm_string_trim_both, scm_substring_fill_x): (scm_string_compare, scm_string_compare_ci): modified for both wide and narrow strings (compare_string): new function (scm_string_eq, scm_string_neq, scm_string_lt, scm_string_gt) (scm_string_le, scm_string_ge, scm_string_ci_eq, scm_string_ci_neq) (scm_string_ci_lt, scm-string_ci_gt, scm_string_ci_le, scm_string_ci_gt) (scm_substring_hash, scm_string_prefix_length, scm_string_suffix_length) (scm_string_prefix_length_ci, scm_string_suffix_length_ci) (scm_string_prefix_p, scm_string_prefix_ci_p, scm_string_suffix_p) (scm_string_suffix_ci_p, scm_string_index, scm_string_index_right) (scm_string_skip, scm_string_skip_right, scm_string_count) (scm_string_contains, scm_string_contains_ci, string_upcase_x) (scm_substring_upcase_x, scm_substring_upcase, string_downcase_x) (scm_string_downcase_x, scm_string_downcase, scm_string_titlecase_x) (scm_string_titlecase, scm_string_capitalize, scm_string_reverse) (scm_string_reverse_x, scm_string_map, scm_string_map_x) (scm_string_fold, scm_string_fold_right, scm_string_unfold) (scm_string_unfold_right, scm_xsubstring, scm_string_xcopy_x) (scm_string_replace, scm_string_tokenize, scm_string_split) (scm_string_filter, scm_string_delete): modified for both wide and narrow strings
* Some srfi-13 test with wide stringsMichael Gran2009-08-191-4/+52
| | | | * test-suite/tests/srfi-13.test: more tests
* Updates to benchmarks for srfi-13Michael Gran2009-08-191-46/+65
| | | | | | | | | Test more of the positive paths. Add test for string-prefix-ci? string-suffix-ci? and string-hash-ci. Update the counts per test to give approximately the same bench/interp time for each test for 1.8.7. * benchmark-suite/benchmarks/srfi-13.bm: update benchmarks
* Avoid possible mutex hang on error message outputMichael Gran2009-08-191-1/+26
| | | | | | | | | | | | | Avoid possible mutex hang when scm_lfwrite_substr is used in error message output and when an error has caused the stringbuf write mutex to not be unlocked. scm_lfwrite_substr makes a substring: making a substring requires that mutex. Hopefully, all cases of non-local jumps when the stringbuf write lock is held have been eliminated anyway, making this O.B.E. * libguile/ports.c (scm_lfwrite_str): include functionality in this function instead of making this a special case of scm_lfwrite_substr
* Add VM exception in strings.testMichael Gran2009-08-191-0/+4
| | | | * test-suite/tests/strings.test (exception:wrong-type-arg): change regex
* Try to optimize scm_string for speedMichael Gran2009-08-191-10/+32
| | | | * libguile/strings.c (scm_string): optimize for speed
* Rename string-width to string-bytes-per-charMichael Gran2009-08-194-8/+8
| | | | | | | | | | | | | * libguile/strings.h: rename scm_string_width to scm_string_bytes_per_char * libguile/strings.c (scm_string_width): renamed to scm_string_bytes_per_char (scm_string_bytes_per_char): renamed from scm_string_width * module/language/assembly/compile-bytecode.scm (write-bytecode): string-width -> string-bytes-per-char * module/language/glil/compile-assembly.scm (dump-object): string-width -> string-bytes-per-char
* Misleading error message text in scm_i_string_writable_wide_charsMichael Gran2009-08-191-1/+1
| | | | * libguile/strings.c (scm_i_string_writable_wide_chars): change error text
* procedure-documentation works on vm proceduresAndy Wingo2009-08-191-0/+4
| | | | | * libguile/procs.c (scm_procedure_documentation): Add a hack so that this function works for compiled procedures too.
* Display wide strings using escapesMichael Gran2009-08-181-2/+1
| | | | | * libguile/print.c (iprin1): for now, display wide strings as escaped strings
* Avoid double-casts of stringbufMichael Gran2009-08-181-11/+11
| | | | | | | | | | Conversion from char to scm_t_wchar require an intermediate cast to unsigned char. By changing the return type of SCM_STRINGBUF_INLINE_CHARS to unsigned char *, doublecasts in the code can be avoided. Also, some clarification of return types. * libguile/strings.c (STRINGBUF_OUTLINE_CHARS) (STRINGBUF_INLINE_CHARS): now returns unsigned char *; all callers changed.
* Avoid compilation warnings in SCM_MAKE_CHARMichael Gran2009-08-181-3/+9
| | | | * libguile/chars.h (SCM_MAKE_CHAR): change inequality
* Benchmarks for common character and string proceduresMichael Gran2009-08-182-0/+348
| | | | | | * benchmark-suite/benchmarks/chars.bm: new benchmarks * benchmark-suite/benchmarks/srfi-13.bm: new benchmarks
* remove (ice-9 lineio)'s dependency on (ice-9 readline)Andy Wingo2009-08-181-1/+1
| | | | | * module/ice-9/lineio.scm: Use (ice-9 rdelim) instead of (ice-9 readline) to remove readline dependency.
* `load' autocompilesAndy Wingo2009-08-183-7/+51
| | | | | | | | | | | | | * libguile/load.h: * libguile/load.c (scm_sys_warn_autocompilation_enabled): New primitive, not exported. Since `load' autocompiles now, it should warn in the same way that the bits hardcoded into C warn. (scm_try_autocompile): Use scm_sys_warn_autocompilation_enabled. * module/ice-9/boot-9.scm (autocompiled-file-name): New helper. (load): Try autocompiling the argument, if appropriate. Will autocompile files passed on Guile's command line. `primitive-load' is unaffected.
* Thanks, Mike.Ludovic Courtès2009-08-171-0/+1
|
* Update `NEWS' for commit d8dd381fa781c236ae777ca1ac55b73d3ca91c2a.Ludovic Courtès2009-08-172-0/+8
|
* Bump version number for 1.9.2.release_1-9-2Ludovic Courtès2009-08-151-1/+1
| | | | * GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
* Turn off auto-compilation to stand-alone tests.Ludovic Courtès2009-08-151-1/+2
| | | | | * test-suite/standalone/Makefile.am (TESTS_ENVIRONMENT): Add "GUILE_AUTO_COMPILE=0".
* Update the manual and `NEWS' regarding `guile-2.0.pc'.Ludovic Courtès2009-08-152-5/+15
| | | | | | * NEWS: Mention `guile-2.0.pc'. * doc/ref/autoconf.texi (Autoconf Macros): Update to `guile-2.0'.
* Add proper `--help' and `--version' for `guile-tools compile'.Ludovic Courtès2009-08-156-7/+29
| | | | | | | | | | | | | | * configure.ac: Produce `meta/guile-tools'. * meta/Makefile.am (EXTRA_DIST): Add `guile-tools.in'. (bin_SCRIPTS): Remove `guile-tools'. * meta/uninstalled-env.in (PATH): Add "${top_builddir}/meta". * module/scripts/compile.scm (%options): Add `--version'. (parse-args): Show the offending option name upon error. (show-version): New. (compile): Use `%guile-bug-report-address'.
* update NEWS for 1.9.2Andy Wingo2009-08-151-53/+65
| | | | * NEWS: Update.
* Update `.gitignore' for GNU Global.Ludovic Courtès2009-08-151-0/+4
|
* Switch from `guile-1.8.pc' to `guile-2.0.pc'.Ludovic Courtès2009-08-156-8/+9
| | | | | | | | | | * configure.ac: Produce guile-2.0*.pc. * meta/Makefile.am (EXTRA_DIST): Rename guile-1.8*.pc.in to guile-2.0*.pc.in. (pkgconfig_DATA): Update accordingly. * meta/guile-config (guile-module): Likewise.
* Uncomment run-time objcode alignment check.Ludovic Courtès2009-08-132-7/+7
| | | | | | | | | | | | | | This should now work thanks to the changes in 28b119ee3da0f4b14cb87e638794d22843778cda ("make sure all programs are 8-byte aligned"). This commit is a follow-up to ec99fe8ecb412e49e8e981246eb62ca46b32754b ("Add FIXMEs about misaligned objcode-metas."). * libguile/objcodes.c (scm_c_make_objcode_slice): Uncomment assertion that checks for proper alignment of PTR. * module/language/assembly/compile-bytecode.scm (write-bytecode): Update comment about META's alignment.
* Remove deprecated semi-public memoizers.Ludovic Courtès2009-08-132-67/+4
| | | | | | | | | * libguile/eval.c (scm_m_expand_body, scm_macroexp, scm_unmemocar): Remove. (scm_m_undefine): Make `static'. * libguile/eval.h (scm_m_undefine, scm_m_expand_body, scm_unmemocar, scm_macroexp): Remove declarations.
* Make the evaluator's memoizers private.Ludovic Courtès2009-08-133-128/+129
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/eval.c (macroexp): Move upwards. (scm_m_quote, scm_m_begin, scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay, scm_m_generalized_set_x, scm_m_define, scm_m_letrec, scm_m_let, scm_m_at, scm_m_atat, scm_m_apply, scm_m_cont, scm_m_nil_cond, scm_m_atfop, scm_m_atbind, scm_m_atslot_ref, scm_m_atslot_set_x, scm_m_at_call_with_values, scm_m_eval_when): New static declarations; definitions made static. (s_atslot_ref, s_atslot_set_x): New, from `goops.c'. * libguile/eval.h (scm_m_quote, scm_m_begin, scm_m_if, scm_m_set_x, scm_m_vref, scm_m_vset, scm_m_and, scm_m_or, scm_m_case, scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay, scm_m_generalized_set_x, scm_m_future, scm_m_define, scm_m_letrec, scm_m_let, scm_m_at, scm_m_atat, scm_m_apply, scm_m_cont, scm_m_nil_cond, scm_m_atfop, scm_m_atbind, scm_m_atslot_ref, scm_m_atslot_set_x, scm_m_atdispatch, scm_m_at_call_with_values, scm_m_eval_when): Remove public declarations. * libguile/goops.c (s_atslot_ref, s_atslot_set_x): Remove.
* compiler.test: Enforce evaluation order.Ludovic Courtès2009-08-131-9/+11
| | | | | | * test-suite/tests/compiler.test ("psyntax")["redefinition", "compile in current module", "compile in fresh module"]: Use `begin' to enforce evaluation order. Thanks Andy!
* Allow fresh modules to be passed to `compile'.Ludovic Courtès2009-08-133-6/+34
| | | | | | | | | | | * module/ice-9/boot-9.scm (module-name): When making MOD non-anonymous, bind it in the `(%app modules)' name space. * test-suite/tests/compiler.test ("psyntax")["compile in current module", "compile in fresh module"]: New tests. * test-suite/tests/modules.test ("foundations")["modules don't remain anonymous"]: New test.
* Allow redefinitions in compiled code as in `(define round round)'.Ludovic Courtès2009-08-133-5105/+5987
| | | | | | | | | * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/psyntax.scm (chi-top)[define-form]: If a same-named imported variable exists, take its value instead of `#f'. * test-suite/tests/compiler.test ("psyntax")["redefinition"]: New tests.