Alex Shinn
b638b9f1b4
Hygiene change. Removing syntactic closure flattening to
...
support unhygienic insertion. Breaks the previous assumption
that syntactic closures were never nested.
2014-01-12 19:29:11 +09:00
Alex Shinn
156505e798
The environment chain lookup should ignore undefined cells if there
...
are defined cells available. This avoids previously undefined values
blocking an export-all import.
2013-10-14 08:10:34 +09:00
Alex Shinn
7a5f317811
Fixing bug in the non-strict top-level identifier matching logic.
...
Matching worked when both bindings were missing, and when both
bindings were present at the top-level but different. The case
when only one top-level binding was present wasn't handled correctly.
Local lexical matching remains unchanged.
Fixes issue #198 .
2013-10-10 16:41:01 +09:00
Alex Shinn
a887b49e0c
make-syntactic-closure generates a copy of existing closures, to allow for syntax generated syntax.
2013-10-07 18:57:43 +09:00
Alex Shinn
39eba86d49
Don't warn on import redefining an undefined value.
2013-10-04 16:45:50 +09:00
Alex Shinn
86d9957ae9
Making sexp_make_primitive_env available from Scheme.
...
Adding the (chibi primitive) module to access this directly.
2013-09-29 11:05:54 +09:00
Alex Shinn
a9d4bf434c
GC-preserving intermediate sexp_fixnum_to_bignum result in sexp_expt.
...
Patch from Lorenzo.
2013-09-24 15:51:12 +09:00
Alex Shinn
d85cff247e
Fixing bug when using -x with a language which doesn't have
...
interaction-environment. We need to set this in the underlying
core environment first. Fixes issue #193 .
2013-09-14 22:31:27 +09:00
Alex Shinn
fd9e9b5bf1
Replacing exact, inexact opcodes with primitive functions.
2013-09-08 17:48:38 +09:00
Alex Shinn
d32cc99cc1
Adding set-current-environment! and using it in the pure-Scheme load.
...
This is necessary if the loaded file uses import.
2013-09-02 21:05:42 +09:00
Alex Shinn
a32edf7138
Making port-fileno support non-stream ports.
2013-08-18 18:34:06 +09:00
Alex Shinn
a6e71e47b8
Adding port-fileno.
2013-08-18 17:45:23 +09:00
Alex Shinn
3fe7b71519
CHIBI_MODULE_PATH defaults to ./lib:., but these paths aren't
...
hardcoded anymore.
2013-07-28 19:09:05 +09:00
Alex Shinn
13b540418e
C-level string API redesign with cursor support.
...
s/sexp_string_length/sexp_string_size/
Make sexp_string_ref/sexp_string_set Unicode aware.
Provide cursor level alternatives for efficiency.
Document all of this.
2013-07-21 14:59:51 +09:00
William Light
34adcd3b19
Implement SEXP_MAX_ANALYZE_DEPTH
...
This fixes issue #89 .
---
eval.c | 90 ++++++++++++++++++++++++++----------------------
include/chibi/features.h | 4 +++
2 files changed, 53 insertions(+), 41 deletions(-)
2013-06-17 21:09:05 +09:00
Alex Shinn
83fb186edc
Wrapping continuable exceptions in specially tagged exceptions rather than pairs.
...
This way C functions that check for and print exceptions support them
automatically. Notably continuable errors in macro expansions, will had
temporarily been suppressed, are printed again.
2013-06-15 17:47:37 +09:00
Alex Shinn
d6b6ce955b
Differentiating between analyze_app and the new analyze_list.
...
The latter is just for any list of ASTs to analyze, whereas the former
checks for lambda applications and fills in names. Fixes equality
comparisons for procedures, so (equal? (lambda (x) x) (lambda (y) y))
now returns true.
2013-06-08 23:37:12 +09:00
Alex Shinn
1736a8306b
Adding set-port-line! and using it in the pure Scheme load to preserve source info.
2013-06-02 10:44:10 +09:00
Alex Shinn
a49f14d011
Adding currently immutable (current-module-path).
2013-05-31 23:39:56 +09:00
Alex Shinn
2b5f8ea007
Adding -s option to escalate warnings to errors.
...
Fixes issue #107 .
2013-05-31 23:31:03 +09:00
Alex Shinn
9ed486dbe3
Adding sexp_maybe_wrap_error utility to pass exceptions from the FFI without raising.
...
Fixes issue #156 .
2013-05-29 23:37:30 +09:00
Alex Shinn
0659ad4484
Need to GC preserve earlier in sexp_sqrt.
2013-04-14 05:01:38 +00:00
Alex Shinn
83f8cfd69b
Adding note about the derived syntax definition of quote. It makes
...
compilation slightly but noticeably slower and is inconvenient, so
leaving as a core form for now.
2013-04-09 21:46:29 +09:00
Alex Shinn
2e63b2be00
Using non-mutating tree of dynamic-wind state for thread safety.
2013-04-07 23:59:41 +09:00
Alex Shinn
63a365f214
Factoring out generate opcode and exporting it.
2013-04-07 20:09:39 +09:00
Alex Shinn
f4b42132a3
Making sexp_env_cell_define available.
2013-04-07 17:08:56 +09:00
Alex Shinn
7c1c40fb07
checking for NULLs before checking exceptions
2013-04-05 19:55:36 +09:00
Alex Shinn
39b67ea455
Reducing primitive errors to warnings.
...
Should add an option to escalate all warnings to errors.
2013-04-01 22:30:47 +09:00
Alex Shinn
64931197a6
Fixing warnings inside modules with no current-error-port defined.
2013-04-01 21:05:51 +09:00
ashinn
ec8255a27b
Fixing sqrt for builds with bignums but no complex.
2013-03-23 21:13:11 +01:00
Alex Shinn
a61cebb1e9
Thread parameters are still needed when threads are disabled.
2013-02-27 09:04:56 +09:00
Alex Shinn
b2caf66dcb
Adding a type check on env-exports.
2013-02-14 22:13:30 +09:00
Alex Shinn
a689b1a399
primitive load should use a fresh stack
2013-02-11 15:24:31 +09:00
Alex Shinn
20c62ffe4a
The global ABI error object needs to be an immediate, since if
...
the ABI is incompatible we can't even necessarily refer to a
global from within the bad library.
2013-02-10 16:38:18 +09:00
Alex Shinn
2b68fca125
Raising a friendly error on non-identifier syntax bindings (previously silently a useless operation).
2013-01-08 22:43:25 +09:00
Alex Shinn
df116bb779
Fixing macro environment to be the evaluation, not binding
...
environment, in let-syntax. The difference arises when the same
binding is inside and outside the let-syntax. Patch from Zhang Meng.
2013-01-03 22:34:40 +09:00
Alex Shinn
bd3eec54d7
log should promote to complex logic for negative inputs.
...
Fixes issue #166 .
2012-12-26 07:25:22 +09:00
Alex Shinn
7ae254fc28
More accurate square roots for bignums - compute via iteration rather
...
than approximation via flonums for very large bignums.
2012-12-22 18:06:22 +09:00
Alex Shinn
2eecec0a4b
hard-coding scheme-report-environment version lookup to 7
2012-11-01 23:26:52 +09:00
Alex Shinn
74d0980b82
Adding file-error? and read-error? predicates.
2012-10-14 23:27:16 +09:00
Alex Shinn
2c5522dfff
Don't unwrap syntatic closures in top-level defines by default.
2012-10-01 22:56:21 +09:00
Alex Shinn
7b1760ef82
Don't share stack on eval primitive, clean up load.
...
Fixes issue #148 .
2012-09-29 15:38:05 +09:00
Alex Shinn
e562cc0be3
Incorporating Alan Watson's TAI time library.
2012-08-17 10:04:37 +09:00
Alex Shinn
93ba0926a7
Build fixes for plan9. Moving individual object files out of opt/ since plan9 mkfiles have issues with these.
2012-08-16 16:04:02 +09:00
Alex Shinn
57b2bc281d
apply opcode is now tail-recursive - calling it in a non-tail position is an error
2012-07-18 21:34:53 +09:00
Alex Shinn
016560e5fe
Additional OOM checks - harder but still not impossible to segfault on OOM.
2012-07-17 23:40:16 +09:00
Alex Shinn
6de7d5621d
Keeping track of the maximum stack depth a procedure needs for accurate stack checks
...
(fixes bug #130 ). Done in conjunction with code generation refactoring, so that context
objects temporarily use their specific slot instead of having space for useful fields
at runtime.
2012-07-16 16:23:54 +09:00
Alex Shinn
c063dadd2e
build fixes for global symbols and vm profiling
2012-07-10 22:42:31 +09:00
Alex Shinn
150cfd0a8b
too dangerous to leave bytecode source uninitialized
2012-07-09 20:20:07 +09:00
Alex Shinn
3e79138e21
Various fixes for better debug output.
...
* Associate file/line source info with corresponding bytecode offset.
* Fixes for losing source info after macro expansion and simplification.
* Fix for showing the source info of the calling procedure of an error.
2012-07-07 15:26:08 +09:00