Commit Graph

10387 Commits

Author SHA1 Message Date
Vítor Santos Costa
17ba194c1e Include new instruction execute_cpred to perform tail optimisation for
builtins. Required changes:
- be careful about creeping in deallocate: it may be followed by
something that is not a cut nor a proceed.
- include new instruction in absmi.c: it is a merge of execute and
call_cpred.
- change compiler to generate execute even for C builtins.
- be careful with dexecute: it may not be done if execute_op is a C
builtin.
- if we are in execute_cpred, the garbage collector cannot trust P:
instead it must look at CP to find out the size of the current
environment. The macro gc_P receives that information.
- We don't need to change CP if we do a meta-call from within
execute_cpred (and we in fact cannot). Check places where we do
meta-calls: exec, clause in cdmgr, and lu_recorded.
2008-08-28 04:43:00 +01:00
Vítor Santos Costa
ff12e2bdbf use inlines instead of macros;
add ENV_Parent function, to walk an environment chain
2008-08-28 04:37:18 +01:00
Vitor Santos Costa
3a7b3e15c6 include type information in mark_delays. 2008-08-27 17:12:03 +01:00
Vitor Santos Costa
24c2650472 get rid of suprious definition of $message 2008-08-27 00:43:40 +01:00
Vitor Santos Costa
d5d5a6c95f escape from NULL pointer. 2008-08-26 01:08:52 +01:00
Vitor Santos Costa
9821770ce4 remove original CHR from tree. 2008-08-26 00:45:53 +01:00
Vitor Santos Costa
42bed282b4 Updated to Working CHR 2008-08-26 00:18:06 +01:00
Vitor Santos Costa
6f0b3cf2f5 fix flatten/2: it would not create variable elements. 2008-08-25 20:41:09 +01:00
Vitor Santos Costa
8169ef0343 fix stack_dump 2008-08-25 15:20:18 +01:00
Vitor Santos Costa
a6b9d096a6 make sure we always close intermediate memory streams on exit. 2008-08-25 15:19:00 +01:00
Vitor Santos Costa
7a94144ccb support writeln/1 for SWI compatibility. 2008-08-24 16:09:33 +01:00
Vitor Santos Costa
a72355f288 redefine arg/3 as genarg/3 unless first argument is bound on call.
term_variables/3 and /2 is now a builtin-in, and thus not in the interace.
2008-08-24 14:25:04 +01:00
Vitor Santos Costa
46744810ae support exporting DCG rules as // (swi compatibility). 2008-08-24 14:24:02 +01:00
Vitor Santos Costa
2e2aaf040b add PL_fail and PL_succeed to SWI interface emulation. 2008-08-24 14:22:49 +01:00
Vitor Santos Costa
e1544a0358 genarg is at arg module, not at globals module! 2008-08-24 14:18:32 +01:00
Vitor Santos Costa
33af161136 add // operator for SWI compatibility. 2008-08-24 00:46:20 +01:00
Vitor Santos Costa
52a927dcf7 add 'G' option as alias to 'S', again for SWI compatibility. 2008-08-24 00:40:40 +01:00
Vitor Santos Costa
92f99fce25 more SWI compatibility fixes:
make -f option test if there is an argument and if so use it.
2008-08-24 00:30:25 +01:00
Vitor Santos Costa
e0f108ee55 allow -L option to be used for stack size (in SWI compatibility). 2008-08-23 17:48:38 +01:00
Vitor Santos Costa
88759dbb33 make -t option allow top-level-goal if number parsing fails.
add '.' to goals in yap.c so that we can parse them.
2008-08-23 17:26:41 +01:00
Vitor Santos Costa
a7f75fffef Added CHR as git module 2008-08-23 02:48:10 +01:00
Vitor Santos Costa
63d77c3561 Deleted CHR 2008-08-23 02:45:57 +01:00
Vitor Santos Costa
b6409fc980 fix weird instruction with tabling and new optypes;
fix a stray ld.
2008-08-22 03:54:10 +01:00
Vitor Santos Costa
461d24360a support for install_docs 2008-08-22 03:53:45 +01:00
Vítor Santos Costa
29e161399c Merge branch 'master' into devel 2008-08-21 13:49:22 +01:00
Vítor Santos Costa
2fb1cb6e00 fix problem in manual (report from Bernd Gutmann) 2008-08-21 13:45:49 +01:00
Vítor Santos Costa
d96461f04c add missing files 2008-08-21 13:39:56 +01:00
Vítor Santos Costa
f499115573 redo lost updates 2008-08-21 13:38:25 +01:00
vsc
258796098e fix d optype
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2313 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-22 02:03:39 +00:00
vsc
27c1f89dca small change to c* optypes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2312 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-22 02:01:27 +00:00
vsc
82efc8fb2c small fixes to compile in Windows again.
Trust _isatty


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2311 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-22 01:59:48 +00:00
Vitor Santos Costa
0719b8a19d small fixes to compile in Windows again.
Trust _isatty
2008-08-19 15:50:57 +01:00
vsc
16d0f2e749 fix TopLevelGoal to handle correctly undefined predicates. Make sure that
undefined predicated will not force the boot process to loop.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2310 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-19 13:33:45 +00:00
vsc
df22b925b5 fix thread messages
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2309 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-19 00:44:37 +00:00
vsc
d035b22f2c continue fixing
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2308 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-13 10:29:48 +00:00
vsc
af01eeee07 patch previous patch for Linux (Keri Harris)
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2307 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-13 10:26:55 +00:00
vsc
7db64c5e1c more locking fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2306 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-13 01:16:26 +00:00
vsc
8350d52c78 DESTDIR fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2305 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-12 22:04:51 +00:00
vsc
d170b34624 MaxOS fixes
Avoid a thread deadlock
improvements to SWI predicates.
make variables_in_term system builtin.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2304 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-12 01:27:23 +00:00
pmoura
ad67cd43af Added built-in predicate format/1 for compatibility with SWI-Prolog.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2303 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-10 15:44:12 +00:00
vsc
b3a0b412f1 fix threads/0.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2302 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-08 16:05:10 +00:00
vsc
5776abb31c more thread fixes.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2301 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-08 14:05:34 +00:00
vsc
2581c3a3bf more threadin fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2300 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-07 20:51:23 +00:00
vsc
6d23a23a81 fix debugging info
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2299 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 23:05:49 +00:00
vsc
dbd6e1b139 fix fix
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2298 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 17:34:15 +00:00
vsc
85d7d39dbf more thread fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2297 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 17:32:22 +00:00
vsc
ea812ad059 fix expand_term to list at end_of_file
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2296 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 10:15:48 +00:00
vsc
2c829f8e5c fixes to module expansion
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2295 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 00:56:11 +00:00
vsc
a3983fa820 swi compatibility support
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2294 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-01 21:44:25 +00:00
vsc
437fda3c61 fix bad syntax in config.h and first step to fix chr compilation.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2293 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-07-27 22:31:36 +00:00