Juan Jose Garcia Ripoll
d400a096eb
Change of syntax in WITH-BACKEND.
...
Using (WITH-BACKEND :BYTECODES form :C/C++ form ...) allows us
to coalesce both possibilities without the output value of
one suppressed form hiding the other one
2010-04-25 14:33:09 +02:00
Juan Jose Garcia Ripoll
f3071cc41e
Implemented WITH-BACKEND and small interpreter fix.
...
- A new special form, EXT:WITH-BACKEND allows us to select the code depending
on whether it is going to be processed by the interpreter or by the C
compiler.
(defun example ()
(ext:with-backend (:bytecodes) (print 3))
(ext:with-backend (:c/c++) (print 2)))
The two currently available backends are :bytecodes and :c/c++. Note that
when the backend does not match the value, the form is replaced with (VALUES).
- Some forms, such as LIST, CONS, etc, when optimized by the interpreter,
compiled their arguments as toplevel forms, causing the right result,
but out of order evaluation.
2010-04-24 10:39:46 +02:00
Juan Jose Garcia Ripoll
c43a6928e1
Allow SYMBOL-MACROLET be used inside a form that declares the symbol as special, and also allow special declarations inside the SYMBOL-MACROLET, as in
...
(let ((x :special))
(declare (special x))
(symbol-macrolet ((x :symbol-macro))
(values x (locally (declare (special x)) x))))
2010-03-19 18:55:12 +01:00
Juan Jose Garcia Ripoll
e0a268376f
Normalize names after @(defun tags so that the appear in the TAGS file.
2010-02-24 08:17:37 +01:00
Juan Jose Garcia Ripoll
337819233d
Replace use of __builtin_expect() with two macros, ecl_{likely,unlikely}
2010-02-04 16:54:05 +01:00
Juan Jose Garcia Ripoll
7d9fb8bbc7
Mark FEprogram_error as noreturn.
2010-02-04 00:31:03 +01:00
Juan Jose Garcia Ripoll
549f4b0e26
Rewrite c_multiple_value_bind using a switch instead of concatenated ifs.
2009-11-15 09:57:02 +01:00
Juan Jose Garcia Ripoll
2c0cfb74c5
src/c/compiler.d: the interpreter optimizes MULTIPLE-VALUE-BIND with zero and one variables.
2009-11-14 18:12:12 +01:00
Juan Jose Garcia Ripoll
1bb7f6e807
si::process-declarations did not identify extended strings as documentation.
2009-10-06 14:24:58 +02:00
Juan Jose Garcia Ripoll
99c98f82e2
src/c/compiler.d: asm_end() now always sets the value of bytecodes.definition
2009-09-05 12:43:36 +02:00
Juan Jose Garcia Ripoll
c90431dbdb
Remove an extra POP1 operand that was pushed after STEPCALL. This operand is no longer needed by the new implementation of the stepper.
2009-07-28 12:20:26 +02:00
Juan Jose Garcia Ripoll
8c0314022c
Added support for new kind of break environment that will be needed to debug C-compiled code.
2009-06-08 11:49:19 +02:00
Juan Jose Garcia Ripoll
f682dda3f4
Functions can now carry information about the source file and its position.
2009-06-07 01:14:16 +02:00
Juan Jose Garcia Ripoll
77cde5c2f8
Several fixes for various compiler warnings.
2009-06-07 00:02:49 +02:00
Juan Jose Garcia Ripoll
98ec5e960b
Remove useless statements (ihs_push is done by ecl_interpret)
2009-06-06 22:12:15 +02:00
Juan Jose Garcia Ripoll
005dc07061
Added the possibility of bytecompiling forms and saving them. New module bytecmp uses this to implement COMPILE and COMPILE-FILE.
2009-04-01 02:29:48 +02:00
Juan Jose Garcia Ripoll
174b95cd49
The interpreter environment format changed and guess_environment() was not adapted
2009-03-23 20:10:16 +01:00
Juan Jose Garcia Ripoll
d019afbb72
Replace CAR/CDR by ECL_CONS_CAR/CDR where we know that argument is a CONS
2009-02-28 00:24:21 +01:00
Juan Jose Garcia Ripoll
702dafcf94
Use bytecodes to undo the special bindings before exiting an interpreted function, not by keeping a copy of the bds_top pointer.
2009-02-27 23:40:39 +01:00
Juan Jose Garcia Ripoll
d71a16daac
Remove an unused argument from ecl_interpret()
2009-02-26 00:14:07 +01:00
Juan Jose Garcia Ripoll
fef38353bf
The bytecodes compiler now passes around an environment pointer, instead of calling ecl_process_env() so often.
2009-02-25 23:06:01 +01:00
Juan Jose Garcia Ripoll
22b070d0ac
Removed ecl_stack_{push,pop,set_index}. Fixed ECL_STACK_SET_INDEX.
2009-02-25 20:52:48 +01:00
Juan Jose Garcia Ripoll
4ffa8552ae
The ECL_STACK* macros were not hygienic and caused problems due to the duplication of the 'env' name.
2009-02-25 20:15:33 +01:00
Juan Jose Garcia Ripoll
8fe85d2e7c
Introduce ECL_STACK_INDEX macro
2009-02-25 19:11:28 +01:00
Juan Jose Garcia Ripoll
8004e7e027
Removed the entry_fixed pointer because we are not using it.
2009-02-21 22:51:36 +01:00
Juan Jose Garcia Ripoll
2923753c44
Slight optimizations of C code for compiler.d
2009-02-21 22:31:50 +01:00
Juan Jose Garcia Ripoll
03ed288a85
New bytecodes for parsing the arguments of an interpreted function.
2009-02-21 00:07:16 +01:00
Juan Jose Garcia Ripoll
69bdd4f3ff
Slight simplification of the ecl_stack_frame structure, with changes associated to interpreter, gfun and apply
2009-02-19 00:04:31 +01:00
Juan Jose Garcia Ripoll
8697d90d4b
The {instance,bytecodes,bclosure}.entry{,_fixed} fields were not always filled
2009-02-15 16:25:01 +01:00
Juan Jose Garcia Ripoll
c9b36e4005
Merged the new_signals branch.
2008-12-23 12:08:29 +01:00
Juan Jose Garcia Ripoll
47cff9f6ff
Special variable declarations are no longer ignored in neither LABELS nor FLET forms. Only affected the interpreter.
2008-12-06 13:04:27 +01:00
Juan Jose Garcia Ripoll
7452875f32
ihs_push now requires the lisp environment.
2008-10-13 22:48:37 +02:00
Juan Jose Garcia Ripoll
46aa17b1d9
frs_push, frs_pop and ecl_unwind tak an environment as arg
2008-10-13 22:34:18 +02:00
Juan Jose Garcia Ripoll
70c64f9652
The macros/functions for accessing and changing symbol values require an environment value.
2008-10-12 16:44:29 +02:00
Juan Jose Garcia Ripoll
0126a558fb
Eliminate more uses of fake variable cl_env
2008-10-11 23:09:45 +02:00
Juan Jose Garcia Ripoll
7c5ab4f1fb
Some functions now take a cl_env_ptr argument, becoming better isolated.
2008-10-11 22:32:54 +02:00
Juan Jose Garcia Ripoll
5bda4b4f61
All allocation functions are now in the ECL library and they now have the ecl_* prefix. Old names are kept in macro form.
2008-10-10 22:36:15 +02:00
jjgarcia
8b1c69589a
ECL now signals a STACK-OVERFLOW condition when the binding stack grows too much
2008-09-28 20:11:38 +00:00
jjgarcia
8e508390bf
Bytecode objects created inside an eval-when had an invalid name.
2008-08-24 10:23:29 +00:00
jjgarcia
250b294aaa
Added hooks for registering DEF* forms and their locations with some database.
2008-07-12 14:13:05 +00:00
jjgarcia
8913840914
Temporarily deactivate location objects
2008-06-28 18:56:18 +00:00
jjgarcia
03c9c55e1c
Do not use constants for OP_GO labels
2008-06-23 20:39:12 +00:00
jjgarcia
df9aacf3db
Split an opcode for actual frame creation from those for frame identification.
2008-06-23 20:38:32 +00:00
jjgarcia
5d98623c8a
Restructure code so that OP_DO admits a location
2008-06-23 20:38:05 +00:00
jjgarcia
3df72c1d30
Introduce location objects
2008-06-23 20:36:50 +00:00
jjgarcia
0953e12582
Extend c_new_env as a step towards changing the lexical environments.
2008-06-23 20:36:37 +00:00
jjgarcia
da0452752b
Failure in checking for integer constants.
2008-06-19 16:41:15 +00:00
jjgarcia
d003cc91fc
More consistent undoing of variable bindings in compiler.
2008-06-19 15:09:28 +00:00
jjgarcia
38bbf43237
Opcodes for small integers
2008-06-19 15:09:12 +00:00
jjgarcia
3654ccf8b4
Replace ecl_apply_{lambda|bclosure} with calls to ecl_interpret.
2008-06-19 15:08:52 +00:00