Commit graph

776 commits

Author SHA1 Message Date
Juan Jose Garcia Ripoll
8525362b33 Whenever we check the argument types, also check the argument number 2010-05-09 23:54:01 +02:00
Juan Jose Garcia Ripoll
bb29cc908b Changed the way toplevel macros are registered because we have no way to let MACROEXPAND know about the compiler *GLOBAL-MACROS* table 2010-05-09 23:05:13 +02:00
Juan Jose Garcia Ripoll
17790c4770 Remove the function TYPE-FILTER and deal with the whole set of Common Lisp types in the compiler. 2010-05-09 22:20:47 +02:00
Juan Jose Garcia Ripoll
a8211519df The optimizers in cmparray distinguish between the policies for type assertions and and those for index bound checking 2010-05-09 20:28:54 +02:00
Juan Jose Garcia Ripoll
d92ba5052d New policy for emitting type assertions 2010-05-09 20:28:24 +02:00
Juan Jose Garcia Ripoll
6ae9d38bdb New type, ARRAY-INDEX, exported from EXT. 2010-05-09 20:28:01 +02:00
Juan Jose Garcia Ripoll
9e46f3d357 Introduce policy aliases, interned some declaration names in EXT and replaced some of those names with more meaningful ones. 2010-05-09 19:41:04 +02:00
Juan Jose Garcia Ripoll
8a72a6fb6e Do not filter types in declarations / proclamations 2010-05-09 16:17:19 +02:00
Juan Jose Garcia Ripoll
c79c014e31 Export declarations into the EXT package and remove debug statements. 2010-05-09 16:16:31 +02:00
Juan Jose Garcia Ripoll
d6f84775fb Optimization and policy levels are now bitmaps 2010-05-09 15:50:22 +02:00
Juan Jose Garcia Ripoll
b04a647c2e Replace cmp-env-optimization with compiler policies. 2010-05-09 09:59:53 +02:00
Juan Jose Garcia Ripoll
a701663b62 Compiler policies are now defined as flags 2010-05-08 13:31:40 +02:00
Juan Jose Garcia Ripoll
fb55d5151d The special form C-INLINE was destructively manipulating its arguments. 2010-05-08 00:35:18 +02:00
Juan Jose Garcia Ripoll
d8abf4d4b7 Use hash tables to store representation type properties. 2010-05-08 00:31:53 +02:00
Juan Jose Garcia Ripoll
2495ae0b8e Toplevel DEFMACRO forms are processed differently and stored by the compiler in a local table. These definitions do not propagate beyond the currently compiled file. 2010-05-07 22:20:14 +02:00
Juan Jose Garcia Ripoll
4ebd664c92 DECLARE was destructively modifying the compiler environment 2010-05-07 22:12:32 +02:00
Juan Jose Garcia Ripoll
b48bc21580 New function to create the root environment for each toplevel form 2010-05-07 21:18:50 +02:00
Juan Jose Garcia Ripoll
4d1d068edf With the new inline behavior we can make ASSERT-TYPE-IF-KNOWN more efficient by use of ecl_unlikely(). 2010-05-07 17:20:49 +02:00
Juan Jose Garcia Ripoll
b8ce2506ed When inlining to save intermediate computations, the temporary variables are created with a C type that matches the value, not the expected destination of that value. 2010-05-07 17:09:51 +02:00
Juan Jose Garcia Ripoll
5dcb1f6ebc New type assertion macros for lambdas, reused by both compilers. 2010-05-07 16:02:42 +02:00
Juan Jose Garcia Ripoll
1a5444eb39 Removed debug statements from cmparray.lsp and fixed typo in ARRAY-DIMENSION-ACCESSOR 2010-05-06 08:41:19 +02:00
Juan Jose Garcia Ripoll
1b808f2290 Compiler macros that open code AREF/ASET using cheap checks written in C 2010-05-05 23:52:25 +02:00
Juan Jose Garcia Ripoll
cf60cb2181 New function for testing whether a variable was declared special 2010-05-05 23:42:21 +02:00
Juan Jose Garcia Ripoll
c8c36d32b9 DECLAIM + SPECIAL did not work because ECL was not looking for special declarations in the compiler environment. 2010-05-05 23:27:43 +02:00
Juan Jose Garcia Ripoll
6a91d3b45a Refactored code so that it is shared by cmp and new-cmp:
* Use the new proclamations/sysfun.lsp files from the new compiler.
* We split src/cmp/cmpdefs.lsp into cmpdefs, cmppackage, cmptypes and cmpglobals
* Split cmpform.lsp out of cmpmac.lsp
* Merged in {cmp,new-cmp}/cmpc-wt.lsp some of the cmpmac wt routines
* Use functions instead of macros for the WT-* operations
* Split out from *cmp/cmpenv.lsp a file cmppolicy.lsp
* A single file, cmpenv-api.lsp for the manipulation of environments.
* The type comparison functions go into cmptype-arith.lsp and are cached.
* The code that propagates types in function calls goes into cmptype-prop.lsp.
* The remainings of cmpenv go into cmpenv-{declare,proclaim,declaim}.

Associated fixes:
* Fixed typo and wrong proclamation for SI:GET-SYSPROP.
* Fixed typo in SIMPLIFY-ARITHMETIC.
* Explicitely set the debug level when building ECL
* All declarations are stored in the compiler environment.
* Each function and form stores the compilation environment.
* Declaration POLICY-DEBUG-IHS-FRAME is acts only on the function environment.
* Make the definition if ihs_env only happen when it is used.
* Eliminated *notinline*, *inline-functions*  and *function-declarations*
* Slightly more efficient creation of accessors in kernel.lsp
* Remove the proxy C2DECL-BODY
* Fix the order of declarations in SI:PROCESS-DECLARATIONS
* Reimplemented C1BODY using SI:PROCESS-DECLARATIONS
* DECLAIM's proclamation do not propagate beyond the compiled file.
2010-05-05 17:36:19 +02:00
Juan Jose Garcia Ripoll
77afbfd6da Slightly more compact format for proclamations / sysfun 2010-04-30 23:44:17 +02:00
Juan Jose Garcia Ripoll
840140d447 Remove from sysfun.lsp types which are already defined in proclamations.lsp. 2010-04-30 17:25:23 +02:00
Juan Jose Garcia Ripoll
8007ff56b4 The inline declarations were not properly inserted in the code. 2010-04-30 15:56:04 +02:00
Juan Jose Garcia Ripoll
8b7c9a7580 Merge sysfun.lsp and proclamations.lsp into the compiled file cmp.fas 2010-04-30 14:57:16 +02:00
Juan Jose Garcia Ripoll
3f0cda1ee3 Undo the previous change to SUBTYPEP and eliminate recursive types from proclamations.lsp 2010-04-30 14:41:17 +02:00
Juan Jose Garcia Ripoll
e8cecf9935 Declarations for all Common Lisp functions.
Split out a new file, proclamations.lsp, with the declarations oof the types of functions in the ANSI specification and in ECL's extensions.
2010-04-30 14:40:36 +02:00
Juan Jose Garcia Ripoll
de2602da46 DEFCALLBACK was not properly compiled when the return type was :VOID 2010-04-26 14:52:02 +02:00
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
a588dcb62c Callback functions must appear in the headers so that they can be called by other compiled functios. 2010-04-24 10:39:22 +02:00
Juan Jose Garcia Ripoll
905a0bd4d8 Implemented SI:FOREIGN-DATA-P and used it to optimize (and inline) (TYPEP x 'SI:FOREIGN-DATA) 2010-04-23 20:07:48 +02:00
Juan Jose Garcia Ripoll
6a57070b93 ECL defines the feature :LONG-LONG when this type is in the C compiler 2010-04-23 19:39:58 +02:00
Trail@.(none)
48e066f45b Reinstate missing quoting of commands fed to SI:SYSTEM. 2010-04-05 22:33:14 +02:00
Juan Jose Garcia Ripoll
ebf1d5f9a4 The code that adds declarations to symbol macros did not process properly the resulting records. 2010-04-04 03:35:20 +02:00
Juan Jose Garcia Ripoll
384daa770b A bug in the declaration interpreter can induce an infinite recursion when finding a symbol macro 2010-04-01 22:27:20 +02:00
Juan Jose Garcia Ripoll
8bd09af0fb Reorder functions in cmpenv.lsp, needed to complete the last change. 2010-03-28 21:32:32 +02:00
Juan Jose Garcia Ripoll
efe893efe7 ECL did not understand type declarations that involved symbol macros. 2010-03-28 20:11:20 +02:00
Juan Jose Garcia Ripoll
322064aacb ECL can build again itself using a C++ compiler (--with-cxx thus works). 2010-03-19 22:04:27 +01:00
Juan Jose Garcia Ripoll
6e55e9c3b5 After loading the compiler, lock again the COMMON-LISP package 2010-03-19 19:40:11 +01:00
Juan Jose Garcia Ripoll
cbc50ceab2 The newline character has to be _before_ each string in clines 2010-03-13 09:46:36 +01:00
Juan Jose Garcia Ripoll
3102c32ef4 FFI:CLINES admits @lisp-object notation in the strings. 2010-03-13 01:16:50 +01:00
Juan Jose Garcia Ripoll
87f60d3db1 Source offsets were not used in cmpdefs.lsp 2010-03-04 20:39:32 +01:00
Juan Jose Garcia Ripoll
035a52823c Replaced many uses of type_of() with specialized macros (ECL_BIT_VECTOR_P, ECL_BASE_STRING_P, etc), now in the compiler as well. 2010-02-28 01:20:26 +01:00
Juan Jose Garcia Ripoll
d7aff31c8a Use ecl_unlikely() in the expansion of RPLACA/D 2010-02-27 20:01:05 +01:00
Juan Jose Garcia Ripoll
48d816b039 Added the possibility of specifying a different name for the source location stored in compiled files. 2010-02-25 23:36:56 +01:00