Commit Graph

38525 Commits

Author SHA1 Message Date
Ryan Culpepper
5f68f0d5a5 trim requires 2018-03-27 22:31:10 +02:00
Ryan Culpepper
778b184526 avoid generating macro definition; use compile-time helper instead 2018-03-27 22:31:10 +02:00
Matthew Flatt
f6424ff7c2 Windows: adjust DLL embedding implementation
Define `__pfnDliNotifyHook2` instead of declaring it as `extern` seems
to make it work in more build environments.
2018-03-27 13:57:41 -06:00
Matthew Flatt
5ec71d45e8 Restrict W+X based on signal handlers to intended pages
Make 9d0ab74e9e more responsible by limiting permission changes to
pages that are intended to be both writable and executable for code
generation. That way, the signal handler doesn't just reopen holes in
loaded foreign libraries that W^X would close.
2018-03-27 11:34:42 -06:00
Kieron Hardy
9498f52c71 Update misc.rkt 2018-03-27 10:01:13 -05:00
Matthew Flatt
f67d4f349e Windows: unbreak loading of "longdouble.dll"
Changes to support embedded DLLs make loading worked only
in embedded mode.
2018-03-26 18:15:18 -06:00
Matthew Flatt
bf0a739991 raco exe: fix section alignment for PE rewriting
A new resource section was aligned based on the old section's
virtual address, instead of the PE's specified section
alignment. That could make alignment round up too far, leaving
a disallowed gap in the sections' virtual addresses.
2018-03-26 17:41:59 -06:00
Matthew Flatt
f8dac3d47d byte compiler: fix excessive fixnum assumptions in unsafe mode
The comparison operations `=`, `<`, etc., were incorrectly compiled as
fixnum operations in the expander's implementation.
2018-03-26 17:27:54 -06:00
Matthew Flatt
9d0ab74e9e OpenBSD: follow the letter of W^X
Conform to W^X by using a signal handler that switches between W and X
mode on any fault. That's not the spirit of W^X, certainly, but it
should make Racket work without special configuration.

Beware that this change can turn some crashes into infinite loops.
It may be possible to detect those loops, but I didn't find a
good and portable way, so far.
2018-03-26 14:08:16 -06:00
Michael Myers
a70e6bdfc9 Fix typo 2018-03-26 08:08:51 -05:00
Matthew Flatt
e01a21db0c raco exe: add --embed-dlls for Windows
Creating an executable with embedded DLLs means that the executable
can be truly stand-alone, instead of needing to be kept with its
DLLs in a relative subdirectory.

DLL embedding works by bypassing the OS's LoadLibrary and
GetProcAddress functions, and instead maps the DLL into memory
and performs relocations explicitly. Joachim Bauch's MemoryModule
(Mozilla license) implements those steps.
2018-03-25 16:35:42 -06:00
Matthew Flatt
1803e647e1 net/win32-ssl: repairs for RacketCS 2018-03-24 07:04:31 -06:00
Matthew Flatt
7fd6e07ad7 io: another repair to Windows path parsing 2018-03-23 21:46:12 -06:00
Matthew Flatt
2754f22844 cs & io: repairs for locks & DLL errors 2018-03-23 19:20:14 -06:00
Matthew Flatt
f048f23ade schemify: fix problem with inlining
Recently added support for inlining functions with a "rest" arg
exposed a problem in constructing an inlining environment.
2018-03-23 17:01:21 -06:00
Kieron Hardy
e0a8f475a7 Update misc.rkt 2018-03-23 14:31:03 -05:00
Matthew Flatt
0ebcb23244 io: repairs for Windows path maniplation
Perpetuate a failure to make Windows paths behave reasonably with
path-manipulation functions.

In one case, the new implementation seemed better than the old one, so
I've changed the old implementation (by deleting code) and test cases.
The old code would split "x /y" to "\\?\REL\x " and "y", and the new
one splits to "x /" and "y"; the trailing separator is now enough to
preserve the space character, and it also preserves the directoryness
of the path. Of course, "x /" splits to 'relative and "\\?\REL\x " as
it strips away the trailing "/".

A remaining problem in both implementations: some Windows API
functions implicitly erase a trailing "." in a directory name, making
"x./y" equivalent to "x/y". The Racket path-manipulation functions
don't do that, so splitting and recombining "x./y" does not access the
same path as the original. This apparently hasn't been a problem in
practice, and there are so many terrible hacks already, so I left it
alone.

The new implementation perpetuates also the implementation mistake of
representing paths internally as byte strings. If, in some terrible
universe, I'm forced to do this again, the right choice is probably to
keep the path in a parsed form with enough information to reconstruct
the original, but with the information sorted nicely to make various
normalizations and combinations easy.
2018-03-23 10:37:59 -06:00
Robby Findler
e031e04f62 improve error message for xml contract violation 2018-03-23 08:45:34 -05:00
Robby Findler
26d1e94421 correct typo 2018-03-23 08:45:10 -05:00
Robby Findler
11d6664b7e stop referring to functions that don't appear to exist 2018-03-22 18:03:31 -05:00
Paulo Matos
42017fa671 Add example showing +nan.0 is a number 2018-03-22 09:35:05 -05:00
Philip McGrath
8db1c39a7a Typo fix 2018-03-21 14:18:55 -05:00
Kieron Hardy
13c31221d6 Update thread.c
Fix typo in comment.
2018-03-21 11:49:35 -05:00
Matthew Flatt
b0424737a7 places: handle impersonated values by copying
Recognize vector, hash table, and prefab impersoantors/chaperones,
and allow them as place0channel messages by copying.

Closes #2001
2018-03-21 08:57:16 -06:00
Matthew Flatt
f4db704b5b --help on Windows: fix misleading description of "racketrc.rktl"
The path usually is found some other way than through `HOMEDIRVE`
and `HOMEPATH`.
2018-03-21 07:20:05 -06:00
Matthew Flatt
808bdb6d0b JIT-inline symbol-interned? 2018-03-20 17:44:35 -06:00
Matthew Flatt
811ae4f72a change unsafe immutable hash table iteration 2018-03-20 17:44:35 -06:00
Leandro Facchinetti
b8341f1559 Fix grammar 2018-03-20 14:58:45 -05:00
Matthew Flatt
3fef5de8b9 cs: fix options-argument handling in compile-linklet 2018-03-20 08:27:54 -06:00
Robby Findler
c442e9707f fix bugs with error checking for ->* and ->
closes 1997
2018-03-20 08:34:27 -05:00
Matthew Flatt
93e3b44fd2 expander: repair phase >= 1 undefined-variable checking
Closes #1996
2018-03-20 07:20:24 -06:00
Matthew Flatt
5ed0cdf563 expander: sync cify with recently newly used operations 2018-03-19 16:54:47 -06:00
Matthew Flatt
b177a5c908 hash-update! and similar: minor performance reorg
Reorganize the implementation of `hash-update!` and related fuctions
to help the bytecode compiler a little.
2018-03-19 10:42:09 -06:00
Matthew Flatt
f138469464 reverse and map: skip checks in unsafe mode
Since only the expander is compiled in unsafe mode right now, the
checks are skipped only when the implementations of `reverse`, `map`,
etc., are part of the flattened expander.
2018-03-19 10:11:48 -06:00
Matthew Flatt
b82d6e2204 expander: remove backend-specific vector handling
Backend-specific handling is no longer useful, since the rules have
changed for code inspectors, bytecode, and unsafe operations.
2018-03-19 08:01:50 -06:00
Matthew Flatt
77a978fb10 expander: another cache layer for binding
Add a cache on binding lookup that is like the old expander --- a
small cache that is consulted before the more general cache that is
already in place.

The new cache layer primarily helps when a single identifier is
compared to a sequence of other identifiers.
2018-03-18 15:28:51 -06:00
Matthew Flatt
60471c2691 improve continuation-mark fast path
Follow the metacontinuation chain, and also distinguish between
"definitely not found" and "not easily found, so try the slow path".
2018-03-18 13:10:01 -06:00
Matthew Flatt
547e027118 compiler/zo-unmarshal: unbreak
Fill in a missing piece for 37a985a681.
2018-03-18 10:56:47 -06:00
Matthew Flatt
f03cb9144e unbreak cify build
Handle `(case-lambda)`.
2018-03-17 08:27:49 -06:00
Matthew Flatt
a62e159e33 expander: performance tweak 2018-03-17 08:27:43 -06:00
Matthew Flatt
37a985a681 compile expander in "static" linklet mode
The expander as a linklet will be instantiated once, so there's no
need to capture references in closures among functions within the
expander. Add a "static" linklet compilation mode to inline the
variable addresses that would otherwise be referenced via a closure.

Although the change is intended to speed up the expander by avoiding
some indrections, it also reduces the bytecode size of the expander.
Bitmaps that track which linklet variables are used in closures turn
out to have been about 25% of the expander's bytecode size, since the
linklet has so many definitions.
2018-03-17 07:24:50 -06:00
Matthew Flatt
ad3ab8b352 optimizer: fix guarded-constructor tracking
Some parts of the optimizer were inconsistent in whether a tracked
structure type needed to have a constructor that always succeeds
(i.e., no associated guard). Increase precision to track both kinds of
structure types, and avoid some unnecessary space-safety clearing in
the vicinity of nonfailing constructors.
2018-03-17 07:24:50 -06:00
Matthew Flatt
600469d164 expander & bytecode compiler: performance tweaks 2018-03-17 07:24:49 -06:00
Paulo Matos
11e3d7a1f8 Fix function name imap-get-messages
The function is called `imap-get-messages` but the example refers to `imap-get-message`, which does not exist.
2018-03-15 10:06:10 -05:00
Paulo Matos
6d74c37b05 Simple typo fix in net/imap documentation
Typo fix in `net/imap` documentation for `imap-get-updates` documentation.
2018-03-15 10:05:01 -05:00
Jakub Jirutka
f23b27e393 Fix bashism in Makefile for better portability
Syntax `[[ "foo" != /* ]]` is not defined by POSIX Shell Command
Language. It's supported only by ksh, Bash and ZSH. Other POSIX
shells, such as ash or dash, does not support it.

This patch replaces this problematic syntax with simple case statement
that is supported by all POSIX-sh compatible shells, including (but not
limited to) ash, bash, dash, ZSH.
2018-03-14 20:43:31 -06:00
Matthew Flatt
67a982ad6a cs: add lock on equal?-based weak hash table
Also, repair a test that didn't properly retain weak-hash keys.
2018-03-14 14:37:41 -06:00
Matthew Flatt
aad799f09e racket/cmdline: add missing checks in command-line
Closes #1989
2018-03-14 06:32:50 -06:00
Matthew Flatt
145b3d840e remove unused function 2018-03-13 20:15:07 -06:00
Matthew Flatt
1dd0a83333 racket/path: add #:more-than-same? argument to find-relative-path
Closes #1980
2018-03-13 20:14:04 -06:00