Commit Graph

38480 Commits

Author SHA1 Message Date
Ryan Culpepper
accb87eddc syntax/parse: add more tests 2016-04-22 09:54:30 -04:00
Matthew Flatt
b523c9c13f local-transformer-expand: catch lifts in 'top-level mode
Change the one expansion mode as far as I can tell) that disables
lifts so that lifts are now allowed, which means that
`(syntax-transforming?)` implies `(syntax-transforming--with-lifts?)`.

The old documentation incorrectly characterized when lifts
were allowed. Ryan noticed the documentation problem, and that
observation led to this simplication.
2016-04-21 13:58:05 -06:00
Matthew Flatt
9ff64fc6ed GC: guard against excessive fragmentation in incremental mode
Although excessive fragmentation is already detected at the end
of a major GC, it can get out of hand already during a long
incremental phase. So, check for excessive fragmentation and
bail out to a major GC when it happens.

Related to PR 15287
2016-04-19 16:26:42 -06:00
Robby Findler
fa4a6d4c13 fix the 'just check existence' part of object/c contracts 2016-04-19 14:07:50 -05:00
Matthew Flatt
d8c9ae8057 update tests for string->url and path-absolute? 2016-04-19 08:12:12 -06:00
Matthew Flatt
3b1b4a0d26 string->url: always mark as absolute when a host is present
Fixes a failure in the web server tests caused by d23b296627.

Formerly, `(string->url "http://racket-lang.org")`, with no trailing
slash, would produce a `url` structure with `path-absolute?` as #f.
That doesn't exactly make sense, because a URL with a host must always
have an absolute path component. Claiming a relative path component
interacts badly with extending a URL with a path later. (Although
`combine-url/relative` compenstate, a similar function in the web
server doesn't.) The revised `url->string` always sets `path-absolute?`
to #t when a host is present, and whether the path is empty or contains
an empty string still records whether a trailing "/" was present.

The `url->string` function, meanwhile, now needs to use whether the
path is empty to determine whether a "/" should be added after
the host name, not whether `path-absolute?` is true.
2016-04-19 05:42:07 -06:00
Matthew Flatt
ddd4190edf GC: improve backtrace info for 'interior pointers 2016-04-19 05:25:07 -06:00
Matthew Flatt
84bffd41af GC: fix backtrace reporting
The addition ot limited recursive marking broke the implementation
of memory-debugging backtraces.
2016-04-18 18:39:20 -06:00
Matthew Flatt
027dd9a43c untgz and gunzip: report unexpected end-of-file
Report an explicit "unexpected end-of-file" error instead of
a later contract failure on #<eof> insteda of a byte

Closes #1204
2016-04-18 08:25:41 -06:00
Matthew Flatt
734d81fed1 clarification on PLT_VALIDATE_COMPILE
Closes #1181
2016-04-18 08:25:41 -06:00
Ryan Culpepper
837fe2a91a use group-by 2016-04-18 09:13:11 -04:00
Ryan Culpepper
6da3e88bd8 fix and update syntax/parse/debug 2016-04-18 09:13:11 -04:00
Ryan Culpepper
4e6438eaf2 syntax/parse: add groups of post progress
This is a partial solution to the ~and problem, only for side clauses.
In (~and p1 p2 p3), one often wants errors in p2 to take precedence over
errors in p1, and likewise for p3 over p2. One solution is ~commit, but
that prevents backtracking. Another is ~post, but then two ~post wrappers
are needed around p3. Also, it doesn't make sense to compare progress of
the third #:with clause from stxclass A to the second #:with clause of
stxclass B and say third beats second.

So, generalize 'post to (post group index); post frames are comparable to
each other only if group is the same, then compared by index. (Post still
beats CAR and CDR.) Each set of side clauses shares a group.

For simplicity of code generation for now, use gensyms to identify groups.
2016-04-18 09:13:11 -04:00
Matthew Flatt
51061c0829 fallback for sqlite3_clear_bindings
Work with older SQLite, such as the one with Fedora 6

Closes #769

Merge to v6.5
2016-04-17 14:24:52 -06:00
Matthew Flatt
dda791c8cb remove unneeded use of long-double function
Using stdtold() instead of strtod() causes trouble with the
version of gcc on Fedora 6.

Merge to v6.5
2016-04-17 11:35:50 -06:00
Matthew Flatt
f75729ef41 raco pkg: improve error reporting for bad URLs
Related to #1257
2016-04-17 09:10:06 -06:00
Matthew Flatt
6b522f50da updated test and docs for url->string and srtung->url
Test and document host-plus-absoulte-path constraint on string forms.
2016-04-17 09:05:16 -06:00
Matthew Flatt
d23b296627 URL string conversions: disallow host plus relative path
Closes #1257
2016-04-17 09:02:19 -06:00
Matthew Flatt
1fb0f4d143 improve docs for path-only
Closes #1289
2016-04-17 08:36:43 -06:00
Matthew Flatt
a0b5403bd8 Tests and docs for an IPv6 literal address as host in a URL 2016-04-16 21:30:26 -06:00
Matthew Flatt
53ffad767b net/url-string: support URLs that contain IPv6 literals
Since an IPv6 literal address includes ":"s, it must be written
between "[" and "]" as a host name.

Based on a patch by @Phlosioneer and comments by @Blaisorblade,
with additional changes to make `url->string` work.

Closes #980
Closes #1243
2016-04-16 21:19:33 -06:00
Matthew Flatt
8993398033 Add #:name and #:extra-name to struct
A `#:name` identifier picks the name that is bound to static
information about a structure type. An `#:extra-name` identifier
specifies an additional name to be bound to the information.
This pair of options is analogous to `#:constructor-name`
and `#:extra-constructor-name`.

Based on Jen Axel's suggestion and implementation.

Closes #1309
2016-04-16 18:39:48 -06:00
Matthew Flatt
4d9427af44 add path-extension, path-has-extension? and path-{add,replace}-extension
Provide a cleaned-up set up path-extension functions. In contrast
to `path-{add,replace}-suffix` and `filename-extension`, a dot
at the beginning of a path element is not treated as an extension
separator. Also, `path-extension` returns an extension including
its separator, which is more consistent with other extension
functions.

The new `path-has-extension?` function replaces many uses of
regexp matching in the base collections.

Closes #1307
2016-04-16 17:56:34 -06:00
Matthew Flatt
1e597a885c reorganize docs for raco make-related APIs
Closes #1293
2016-04-16 11:06:20 -06:00
Matthew Flatt
467979cd8b improve docs for compile-file
Clarify that it expects to be called via
`with-module-reading-parameterization`.

Closes #1291
2016-04-16 10:56:50 -06:00
Matthew Flatt
446b93882c fix docs for path-add-suffix
Adjusts the docs, but a future replacement (possibly with a new name
to avoid compatibility issues) should behave like the old docs,
instead.

Closes #1292
2016-04-16 10:47:49 -06:00
Matthew Flatt
4cc3aad30b fix problem with (open-input-file #:for-module? #f ...)
Also, clarify failure handling in the docs.

Closes #1298
2016-04-16 10:34:18 -06:00
Matthew Flatt
a6e773f69b fix syntax checking in for/vector
Closes #1308
2016-04-16 09:48:08 -06:00
Eric Dobson
8fccc07259 Fix docs for call-with-atomic-output-file (#1192) 2016-04-16 09:40:36 -06:00
Spencer Florence
123755437c remove bad srcloc from define-runtime-path (#1203) 2016-04-16 09:39:28 -06:00
Matthew Flatt
2dce66925a update HISTORY.txt for v6.5
Merge to v6.5
2016-04-16 07:01:38 -06:00
Matthew Flatt
e1a5e41ddc The set of environment variables accessible via getenv is
restricted through `get-info`, which prunes the environment
variable set before it loads the "info.rkt" file. All
environment variables are pruned except those listed in
`PLT_INFO_ALLOW_VARS` (separated by semicolons).

Related to emina/rosette#17.
2016-04-15 09:56:59 -06:00
Matthew Flatt
f2b76a675a make raco exe -l cooperate with tethered-executable builds
The configuration of an addon-tethered directory is treated as a sign
that access to collections in the "user" space should be accessible by
default in a launcher, as well as propagating the addon-directory
setting to the launched program.
2016-04-15 06:54:00 -06:00
Matthew Flatt
6369e56709 add support for tethering to a config or addon dir
Add a hook to `raco setup` to make copies of installed executables,
where the copies start with the configuration or addon directory
of creation time, instead of the default installation or user-specific
path.

Although the same effect can be achived by setting environment
variables such as PLTADDONDIR, tethered executables can be easier
to work with and compose better with other programs.

See also #1206 for some discussion, although this change does
not exactly address the original idea there.
2016-04-15 06:42:15 -06:00
Gustavo Massaccesi
91d6c69565 Avoid compiler warning 2016-04-13 19:23:56 -03:00
Gustavo Massaccesi
b93d94bb67 optimizer: allow duplication of toplevels 2016-04-11 23:08:23 -03:00
Gustavo Massaccesi
2d0f8f6c0f reduce (unbox (box x)) and extend reductions to unsafe-cXr
Reduce (unbox (box x)) => x

Extend the reductions for cXr to the unsafe versions, for
example reduce (unsafe-car (cons x y)) => x

Check and save types in unsafe operations
2016-04-11 21:14:22 -03:00
Gustavo Massaccesi
c4e5a0b190 check for single value expressions in ensure_single_value
Only wrap the argument when the optimizer is not sure that
it is a single valued expression. This allows to remove the
checks in the calling sites.
2016-04-11 21:13:37 -03:00
Vincent St-Amour
f33a4ba471 Fix ->* pre/desc and post/desc handling. 2016-04-11 17:12:23 -05:00
Vincent St-Amour
ee43151154 Fix doc typoes.
Found by Josep Portella Florit.
2016-04-11 14:14:36 -05:00
Robby Findler
6ad9a6cdf8 avoid platform-specific problems in test case 2016-04-11 08:53:03 -05:00
Robby Findler
3636e35480 more compiler/cm log message cleanup 2016-04-10 21:23:12 -05:00
Robby Findler
d83fbf81f3 fix typo 2016-04-10 21:23:12 -05:00
Robby Findler
e846db0937 add a test case for current-path->mode
I should have included this in 20e2e839cb
2016-04-10 21:23:12 -05:00
Matthew Flatt
c0bbfe8237 fix raco pkg show --rx on bad patterns
Fix error reporting so it's not an internal error. Also,
report errors before printing a scope, and update the docs
for earlier changes.

Closes #1251
2016-04-08 19:10:56 -06:00
Matthew Flatt
13ebd0e1c8 adjustments for regexp failure handler
Pass a string to the handler to describe the problem.
Also, fix minor issues (GC registration, contracts and `history`
in docs) and make `pregexp`, etc., report compilation errors as
`pregexp`, etc.
2016-04-08 18:34:51 -06:00
Asumu Takikawa
436fca7134 Add optional failure thunk for regexp and friends 2016-04-08 17:15:39 -06:00
Matthew Flatt
c59e1a2ea9 Add note about MMTabBarView 2016-04-08 09:37:14 -06:00
Matthew Flatt
7a339f45b9 Merge pull request #1303 from jsmaniac/doc-changes
Update to the package template + small documentation changes
2016-04-08 09:37:04 -06:00
Vincent St-Amour
249e8eabab Post-release version for the v6.5 release 2016-04-07 11:43:45 -05:00