fix garbage collector not to try to garbage collect when we ask for large
chunks of stack in a single go. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1684 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -42,7 +42,7 @@ read_file_to_codes(File, Codes) :-
|
||||
|
||||
read_file_to_terms(File, Codes, _) :-
|
||||
open(File, read, Stream),
|
||||
read_stream_to_terms(Stream, Codes, []),
|
||||
prolog_read_stream_to_terms(Stream, Codes, []),
|
||||
close(Stream).
|
||||
|
||||
read_file_to_terms(File, Codes) :-
|
||||
@@ -51,7 +51,13 @@ read_file_to_terms(File, Codes) :-
|
||||
close(Stream).
|
||||
|
||||
|
||||
|
||||
|
||||
prolog_read_stream_to_terms(Stream, Terms, Terms0) :-
|
||||
read(Stream, Term),
|
||||
(Term == end_of_file ->
|
||||
Terms = Terms0
|
||||
;
|
||||
Terms = [Term|TermsI],
|
||||
prolog_read_stream_to_terms(Stream, TermsI, Terms0)
|
||||
).
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user