Commit Graph

1528 Commits

Author SHA1 Message Date
Costa Vitor
69c0a52548 Revert "ENV may not be in scope of catch in very special cases (eg, call counter)."
This reverts commit 15f9a68a35.

Botch!
2009-06-26 13:04:07 -05:00
Vitor Santos Costa
15f9a68a35 ENV may not be in scope of catch in very special cases (eg, call counter). 2009-06-26 09:15:19 -05:00
Vitor Santos Costa
ff20a23e64 stop counters at counter underflow event 2009-06-26 08:42:40 -05:00
Vitor Santos Costa
4d6cd779cb fix warnings. 2009-06-25 22:31:02 -05:00
Costa Vitor
924cf77fed fix another loop in spy_pred. 2009-06-23 23:24:16 -05:00
Costa Vitor
058b389566 asserta dynamic predicates should not kill preexisting code. 2009-06-23 06:51:28 -05:00
Costa Vitor
246d32551a do not set PREG until being sure we have to jump 2009-06-23 06:50:53 -05:00
Costa Vitor
2588f5b7c5 make sure we count built-ins. 2009-06-22 16:03:14 -05:00
Costa Vitor
09f5a9ccb1 make YAP ask less space in deeply nested calls of findall. 2009-06-22 15:37:17 -05:00
Costa Vitor
d8595221d0 optimise sub_atom when sub_atom is known. 2009-06-22 15:35:40 -05:00
Costa Vitor
d47560342c more fixes to call_counter: try to keep on counting system builtins. 2009-06-22 12:40:55 -05:00
Costa Vitor
50f7a80546 transfer call and profiler to spy. 2009-06-22 11:12:56 -05:00
Costa Vitor
bf9091b5ed fix bug in copyterm 2009-06-17 14:43:24 -05:00
Costa Vitor
53fa330d90 always use YREG, not YENV, in case we have enough registers. 2009-06-16 21:20:35 -05:00
Costa Vitor
de5a09039f no_readline patches
avoid warnings in no_gmp world
avoid complaining by Solaris
2009-06-15 14:59:50 -05:00
Costa Vitor
7f0a712c88 fix call to trim_trail on solaris 2009-06-15 13:51:30 -05:00
Costa Vitor
f5a72828a0 fix SPARC register allocation bugs (not verified) #130 2009-06-15 10:29:31 -05:00
Costa Vitor
9569d04a9f remove some warnings in the absence of GMP 2009-06-15 10:11:05 -05:00
Vitor Santos Costa
b4ff9b492a make sure to recover stack before copying exception term. 2009-06-14 11:17:12 -05:00
Vitor Santos Costa
826b45d21c fix handling of out stack while throwing an exception. 2009-06-13 15:21:13 -05:00
Vitor Santos Costa
5a10dda14e fix threads version. 2009-06-13 14:01:16 -05:00
Vitor Santos Costa
475e681907 do fetch and remove a the same time: PopFromDB 2009-06-13 13:06:02 -05:00
Vitor Santos Costa
4de6e48a33 save exception term in database, so that it is clean separate from stacks. #116 2009-06-12 14:35:15 -05:00
Vitor Santos Costa
e6265e9d84 only dump stack if user not handling the stack #47 2009-06-12 14:04:32 -05:00
Vitor Santos Costa
1005fa8abf PLIOError should not prevent weird errors, like
resource_errors (#36).
2009-06-12 13:46:44 -05:00
Vitor Santos Costa
303261b283 improve error messages. 2009-06-12 13:44:22 -05:00
Ulrich Neumerkel
2f47f8902b Operator change for ISO/SWI 2009-06-11 09:27:48 -05:00
Costa Vitor
9b7d2b1cd4 if the compiler has ommited the instructions, it means we should the
argument set up there by the compiler.
2009-06-08 20:08:21 -05:00
Costa Vitor
15519fa3cd tightenn conditions on JumpExec 2009-06-05 18:45:41 -05:00
Costa Vitor
5e4be93491 able to commit 64 bits 2009-06-05 12:18:10 -05:00
Vitor Santos Costa
7e108201b0 fix memory leak in mod. 2009-06-05 10:55:28 -05:00
Vitor Santos Costa
ecb03a61c0 fix memory leak in min/2 and max/2. 2009-06-05 10:38:07 -05:00
Vitor Santos Costa
a1b621507a max of bignums would always return the first bignum #118 2009-06-05 09:49:00 -05:00
Vitor Santos Costa
4b91f13ee1 allow easy shunting, but make sure we do not shunt chains below the current CP. 2009-06-05 09:47:17 -05:00
Vitor Santos Costa
b455f057a8 fix writing of atributed variables. 2009-06-04 10:18:28 -05:00
Vitor Santos Costa
cd63a1f493 temporary disable easy shunting until I understand trouble with aattributed variables #80 2009-06-04 10:14:27 -05:00
Vitor Santos Costa
ea4f3f6447 always count gc calls #93 2009-06-03 20:36:15 -05:00
Costa Vitor
5da51d615d fix crashes in 64-bit mode with unknown predicates. 2009-06-03 15:27:53 -05:00
Costa Vitor
efb72f7d0e make sure we send unsigned chars to writing routine (obs from Simon Strobl) 2009-06-03 10:25:21 -05:00
Costa Vitor
7f54acb536 separate standard alarm from virtual alarm. timeout uses virtual alarm #112 2009-06-03 10:09:14 -05:00
Costa Vitor
b72345cc97 handle correctly throws within the scope of a call_cleanup. This is implemented
by using an extra argument to verify if the catcher is the current call_cleanup.
If it is, we allow the exception to go forth.
2009-06-02 19:46:41 -05:00
Costa Vitor
2daccab1cb avoid setjmp if we can do it. 2009-06-02 18:08:40 -05:00
Costa Vitor
adb25ff96f growglobal would core dump over holes. 2009-06-02 18:08:18 -05:00
Costa Vitor
f10dde5b90 make sure garbage collector goes to FAILCODE, not do a hard reset. 2009-06-02 16:36:00 -05:00
Vitor Santos Costa
a2a8f8e40e stop writing at very long lists. 2009-06-01 22:54:56 -05:00
Costa Vitor
8870a1e661 define virtual timer and use it for timeout (#96) 2009-06-01 19:49:03 -05:00
Costa Vitor
8e55611d90 fix bad test for space overflow 2009-06-01 19:28:30 -05:00
Costa Vitor
00c9194014 fix reference to Yap_regp 2009-06-01 15:46:37 -05:00
Vitor Santos Costa
0bd3c910dd step towards better emulation of SWI in backtrackable predicates. 2009-06-01 15:32:36 -05:00
Vitor Santos Costa
45a1544307 use Int for 32 bit flags (int would be ok, though). 2009-06-01 15:32:07 -05:00
Vitor Santos Costa
95f28228f6 - separate user_try and user_retry
- make sure we have slots inited in retrying user C code.
2009-06-01 15:30:22 -05:00
Vitor Santos Costa
e84ecf2eaf fix #37: give resource error if trying to create a functor with bignum arity
also, allow meta-call to create large functors > Int.
2009-05-29 22:34:50 -05:00
Vitor Santos Costa
0cd72ad258 changes to compile YAP in WIN32 2009-05-29 14:36:49 -05:00
Vitor Santos Costa
a45da5f722 check for memory overflows in format (very long double, say) obs from Ingo Thon. 2009-05-29 10:26:48 -05:00
Costa Vitor
43e9e9f337 alarm(0) should be careful to kill existing signals. 2009-05-26 17:31:21 -05:00
Vitor Santos Costa
3c57286531 make sure we disable disabling interrupts on error handler. 2009-05-25 09:58:27 -05:00
Vitor Santos Costa
a6f0b8cc9f ignore specific limit for max write depth on lists. Use same limit everywhere. 2009-05-24 19:37:07 -05:00
Vitor Santos Costa
a0750ff5b7 handle heap overflows when constructing new predicates. 2009-05-24 19:25:26 -05:00
Vitor Santos Costa
9a9767d73c cannot just do error when user does crazy things. 2009-05-24 19:20:00 -05:00
Vitor Santos Costa
46dc2b1a49 should exit if interrupts *are* disabled. 2009-05-24 19:19:22 -05:00
Vitor Santos Costa
de3c042143 just update, no interesting change. 2009-05-24 15:17:23 -05:00
Vitor Santos Costa
09216a70b8 fix unprotected calls to plwrite. 2009-05-24 15:15:36 -05:00
Vitor Santos Costa
81970013ed allow storing a pointer. 2009-05-24 15:14:44 -05:00
Vitor Santos Costa
b94baf1e5f try not to loop in infinite terms. 2009-05-24 15:14:23 -05:00
Vitor Santos Costa
b5e5a671a8 restore stack on JumpExec 2009-05-23 15:51:50 -05:00
Vitor Santos Costa
b9a7d24e8b avoid too long messages
back to top level if Yap_Error is called in a critical region.
2009-05-23 15:51:00 -05:00
Vitor Santos Costa
4d497193b6 fix garbage collection on attributed variables with lots of choice points. 2009-05-23 12:41:37 -05:00
Vitor Santos Costa
04c419b3b0 not always throw an error when it is not a variable. 2009-05-22 22:35:40 -05:00
Vitor Santos Costa
9a2dbdcb24 one extra warning goes away. 2009-05-22 21:53:24 -05:00
Vitor Santos Costa
f79d79e926 replace TYPE_ERROR_VARIABLE for attributes #57 2009-05-22 21:51:48 -05:00
Vitor Santos Costa
264d9322b9 fix compiler warning messages. 2009-05-22 21:33:09 -05:00
Costa Vitor
7304fbda13 fix lack of streams message (Ulrich Neumerkel #60) 2009-05-22 19:55:18 -05:00
Costa Vitor
c00facdd17 exception at fail could loop with bad env. #59 2009-05-22 19:43:17 -05:00
Costa Vitor
e611e1061a fix annoying int cast problems (64 bit only) 2009-05-22 19:09:18 -05:00
Costa Vitor
8fcc534a19 fix bad error propagation in term comparison #53 2009-05-22 18:44:05 -05:00
Costa Vitor
ec595374a6 fix allocation of temporary stack so that unification can work even for
very deep terms.
fix occur_unification_bug X = a(f(Y)).
2009-05-22 18:35:24 -05:00
Costa Vitor
75e08846fe vargs needs include. 2009-05-22 14:44:32 -05:00
Vitor Santos Costa
23301fb19a avoid warning on malloc 2009-05-22 14:01:22 -05:00
Vitor Santos Costa
51e669dcfb support for passing priority as argument to write. (Ulrich's #45).
fixes on making write handle infinite loops
2009-05-22 13:24:27 -05:00
Vitor Santos Costa
e1421f207e use DebugPlWrite for debugging writes 2009-05-22 13:23:51 -05:00
Vitor Santos Costa
328e2f5c22 don't loop on cyclic terms. 2009-05-22 12:24:30 -05:00
Vitor Santos Costa
8e1c8d723e never do P=FAILCODE directly in the code. 2009-05-22 11:24:44 -05:00
Vitor Santos Costa
9852f7781d - simplify error handling in arithmetic and handle infinite terms (#46) 2009-05-22 11:21:39 -05:00
Vitor Santos Costa
3a3220d1a1 make sure we don't generate an heapexpansion in the middle of a write. 2009-05-21 01:04:13 -05:00
Vitor Santos Costa
88b5f1a735 be careful to make sure we can hanle the interrupt. 2009-05-21 00:39:14 -05:00
Vitor Santos Costa
a59a434d66 use interrupts_disabled
make onerrupts disabled recursive (not quite needed, but maybe one day).
2009-05-21 00:38:35 -05:00
Vitor Santos Costa
aaec9ddceb fix overflow while dumping very large big ints (Ulrich #18) 2009-05-20 08:12:18 -07:00
Vitor Santos Costa
c7066b43ec first try of setup_call_cleanup/3 and setup_call_catcher_cleanup/4 2009-05-19 23:53:14 -07:00
Vitor Santos Costa
a1203e56dd we don't always expand stack on attvar overflow. 2009-05-17 22:51:34 -07:00
Vitor Santos Costa
17e36dbda1 keep things right if there is a temporary overflow in loopy term checking. 2009-05-17 12:39:51 -07:00
Vitor Santos Costa
a52317b9c2 fix Yap_shift_visit for malloc: a few miscalculations... 2009-05-17 12:26:09 -07:00
Vitor Santos Costa
44f7e67394 make sure we reset global variables when exiting a thread 2009-05-17 10:38:39 -07:00
Vitor Santos Costa
ae5bf4d6e7 support resource errors for out of memory conditions.
improve stack dump message.
2009-05-17 09:42:56 -07:00
Vitor Santos Costa
d8590f2587 return error message if no room available. 2009-05-17 09:42:40 -07:00
Vitor Santos Costa
55e37020a4 return copy when copying term 2009-05-17 09:41:59 -07:00
Vitor Santos Costa
94e740ae31 reduce the initail amount of space for globals 2009-05-17 09:41:34 -07:00
Vitor Santos Costa
de1fb3e2c5 copy exception term early on to avoid dangling pointers. 2009-05-17 08:02:34 -07:00
Vitor Santos Costa
8e7695a42c make Yap_Eval only on entry. 2009-05-16 22:41:44 -07:00
Vitor Santos Costa
7953004610 fix unused variable warning. 2009-05-13 17:12:12 -05:00
Vitor Santos Costa
6d8649226c fix tabling code. 2009-05-13 17:11:46 -05:00