Commit Graph

38553 Commits

Author SHA1 Message Date
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
Matthew Flatt
6db03c7eb9 racket/promise: fix promise/force on the result of delay/sync
Closes #1933
2018-03-13 19:39:52 -06:00
Matthew Flatt
7af67af119 missed updates to the sandbox test suite
Tests need to change due to 0cda14300d.
2018-03-13 17:48:47 -06:00
Matthew Flatt
0cda14300d non-original code inspector => mark loaded bytecode as non-runnable
This change adjusts the way that trust is threaded through bytecode
and the code inspector. In Racket v6.x, reading bytecode would fail if
the code inspector is non-original and if the bytecode contains a
reference to an unsafe operation. Now, reading bytecode doesn't fail
for that reason, but all bytecode is marked as non-runnable (even
without references to unsafe operations) when loaded under a
non-original code inspector. A `read` operation by itself remains as
safe as ever.

This commit also disables the bytecode validator. For now, the
validate can be re-enabled with `PLT_VALIDATE_LOAD`.
2018-03-13 17:26:50 -06:00
Matthew Flatt
85ff4eee74 racket/fasl: switch to version-independent format
Make `s-exp->fasl` generate an encoding that can be parsed by any
future version of `fasl->s-exp`. The new format does not rely on the
runtime system's bytecode writer and reader.
2018-03-13 16:32:01 -06:00
Sam Tobin-Hochstadt
2195efa08d Don't eval in fuzz tester. 2018-03-13 18:21:46 -04:00
Sam Tobin-Hochstadt
0a00e82ca1 Copy source location to generate runtime paths.
Fix found by @lexi-lambda. Bug reported by dbenoit@fedoraproject.org.
2018-03-13 18:21:46 -04:00
Matthew Flatt
efe5d2d83f expander: fix module-path?
Fix `module-path?` to check the first character of a path string.

Closes #1988
2018-03-12 20:50:58 -06:00
Matthew Flatt
68a96e094e bytecode optimizer repair
Closes #1986
2018-03-12 20:17:54 -06:00
Vincent St-Amour
b4fec19c40 Fix link to TR test suite.
Closes #1985.
2018-03-12 09:08:00 -05:00
Leandro Facchinetti
e7a421d08c Fix typo in package documentation 2018-03-12 09:04:25 -05:00
Matthew Flatt
994a4d4a35 expander: fix problem with syntax-local-expand-expression
Closes #1984
2018-03-12 07:11:31 -06:00
Matthew Flatt
2f930dd6f3 add syntax-property-remove 2018-03-11 11:31:56 -06:00
Matthew Flatt
13242b06d6 expander: fix an error message 2018-03-11 10:37:37 -06:00
Sarah Spall
14448eb1bd Moved release of lock to fix use after free 2018-03-10 08:55:21 -07:00
Matthew Flatt
f3596d96c2 bytes-converter: avoid unnecessary custodian registration
Some built-in bytes-converter combinations that were not
supposed to require custodian registration were neveretheless
registered, which created a small leak for some programs.
2018-03-10 07:20:41 -07:00
Matthew Flatt
3f2fd06cb0 expander: fix namespace-require/copy 2018-03-09 16:32:19 -07:00
Matthew Flatt
0d06ba2848 expander: treat unbound and top-level-bound as free-identifier=?
Restores quetionable but traditional behavior.
2018-03-09 16:07:37 -07:00
Matthew Flatt
35dc59ee07 expander: preserve syntax properties on let[rec]-values clauses 2018-03-09 15:44:11 -07:00
Matthew Flatt
af4c23fa72 variable-reference->namespace: ensure that module is available 2018-03-09 11:06:49 -07:00
Matthew Flatt
234e47a58f remove accidentally committed debugging output
Attempting to write the output could cause places to crash
on Windows.
2018-03-08 18:14:33 -07:00
Matthew Flatt
97721be2af Windows: fix extflonum infinity and NaN without longdouble.dll
Since the reader's implementation includes quoted references
to infinity and NaN extflonums, make sure it reads and writes
and compiles correctly before "longdouble.dll" is installed.
2018-03-08 18:14:33 -07:00
Matthew Flatt
3cf2138841 expander: avoid equal?-based hash table for module cache
Since a thread can be terminated while accessing the cache, it
can't be an `equal?`-based table where the lock can get lost.
2018-03-08 16:36:16 -07:00