Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release fixes 2023.1 #1502

Merged
merged 2 commits into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sources/lib/run-time/collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ typedef intptr_t DSINT;

#define MISCEXTENDBY ((size_t)16384)
#define MISCAVGSIZE ((size_t)32)
#define MISCMAXSIZE ((size_t)65536)

static void report_runtime_error (char* header, char* message);

Expand Down
4 changes: 3 additions & 1 deletion sources/lib/run-time/mps-collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,9 @@ MMError dylan_init_memory_manager(void)
/* Create the MVFF pool for miscellaneous objects. */
/* This is also used for wrappers. */
res = mps_pool_create(&misc_pool, arena, mps_class_mvff(),
MISCEXTENDBY, MISCAVGSIZE, MISCMAXSIZE);
MISCEXTENDBY, MISCAVGSIZE,
(size_t) 16,
TRUE, TRUE, TRUE);
if (res) { init_error("create misc pool"); return(res); }

wrapper_pool = misc_pool;
Expand Down
11 changes: 6 additions & 5 deletions sources/system/file-system/win32-file-system.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ define function %resolve-locator
end
elseif (path-length > $MAX_PATH)
win32-file-system-error("resolve", "%s", locator)
elseif (~%file-exists?(locator))
elseif (~%file-exists?(locator, #t))
win32-file-system-error("resolve", "%s", locator)
else
as(object-class(locator), copy-sequence(path-buffer, end: path-length))
Expand All @@ -99,7 +99,8 @@ end function;

///
define function %file-exists?
(file :: <microsoft-file-system-locator>) => (exists? :: <boolean>)
(file :: <microsoft-file-system-locator>, follow-links? :: <boolean>)
=> (exists? :: <boolean>)
let file = %expand-pathname(file);
if (primitive-machine-word-not-equal?
(%call-c-function ("GetFileAttributesA", c-modifiers: "__stdcall")
Expand Down Expand Up @@ -179,7 +180,7 @@ define function %copy-file
let destination = %expand-pathname(destination);
// NOTE: Contrary to the documentation, CopyFile won't copy over
// an existing read-only file so we need to delete it manually.
if (if-exists == #"replace" & %file-exists?(destination))
if (if-exists == #"replace" & %file-exists?(destination, #f))
%delete-file(destination)
end;
unless (primitive-raw-as-boolean
Expand Down Expand Up @@ -211,7 +212,7 @@ define function %rename-file
// the move if the target exists because MoveFileEx isn't implemented
// in Windows 95. (When this code was originally written, the
// documentation for MoveFileEx failed to mention that fact. Sigh)
if (if-exists == #"replace" & %file-exists?(destination))
if (if-exists == #"replace" & %file-exists?(destination, #f))
%delete-file(destination)
end;
unless (primitive-raw-as-boolean
Expand Down Expand Up @@ -494,7 +495,7 @@ end function %delete-directory;
///---*** Is there an easier way? (Look into it ...)
define function %directory-empty?
(directory :: <microsoft-directory-locator>) => (empty? :: <boolean>)
~%file-exists?(directory)
~%file-exists?(directory, #f)
| block (return)
%do-directory
(method (directory :: <microsoft-directory-locator>, name :: <string>, type :: <file-type>)
Expand Down