Commit Graph

38639 Commits

Author SHA1 Message Date
Matthew Flatt
6c7a9ae03a sync "base" version 2016-03-05 05:17:38 -07:00
Matthew Flatt
79ad86d891 fix optimization related to with-continuation-mark
Fix mistake intoduced in 5904acc69a adding `with-continuation-mark`
to single_valued_noncm_expression().
2016-03-05 05:17:37 -07:00
Matthew Flatt
2bfb851ccc optimizer: generalize intraprocedural type tracking
Enable the optimizer to figure to figure out that a loop
argument is always a real number, for example, in much the
same way that it can detect fixnums and flonums for unboxing.

Unboxing information was only needed at the resolve level,
but `real?` information is useful only to the optimizer, so
the generalization enables the optimizer to reach
approximations of type information earlier (e.g., among
a subset of a function's arguments).
2016-03-05 05:17:37 -07:00
Matthew Flatt
8ec35de0b2 generalize predicate tracking to support numerics 2016-03-05 05:17:37 -07:00
Matthew Flatt
1c8881dbef optimizer: convert (let ([x M]) x) to (begin0 M #f)
For simple enough M, `(let ([x M]) x)` is already converted
to just M, but add a conversion for other forms that gets rid
of the binding while preserving non-tailness.
2016-03-05 05:17:37 -07:00
Matthew Flatt
254dac4625 optimizer: drop redundant with-continuation-marks
Simplify `(wcm <k1> <v1> (wcm <k1> <v2> <e>))` to
`(begin <v1> (wcm <k1> <v2> <e>))` for a simple enough <k1>.
A variable simple enough, so this is useful for improving
errortrace output.
2016-03-05 05:17:37 -07:00
Matthew Flatt
7e4d7dfdee repairs and clarification for raco exe docs 2016-03-05 05:17:37 -07:00
Sam Caldwell
8039a759f4 Fix typo in package docs 2016-03-03 15:33:30 -05:00
Robby Findler
b52a4b3318 make struct-out leave behind a disappeared use for its argument
closes PR 15263
2016-03-03 03:38:53 -06:00
Sam Tobin-Hochstadt
8eadc197a9 Use syntax-local-introduce to fix arrows in match. 2016-03-02 18:03:46 -05:00
Matthew Flatt
9b4f830268 improve hashing on structs, especially prefabs
Use the structure-type name, in addition to the structure
content. Including the name is espeically useful for
distinguishing prefabs structs that differ in the prefab
name.
2016-03-02 10:42:57 -07:00
Matthew Flatt
97d951af54 improve equal-hash-code on interned symbols
Compute an `equal?` hash code for `read`able values that
is a constant, at least for a given version of Racket. Only
(interned) symbols failed to have that property before.
2016-03-02 10:31:34 -07:00
Matthew Flatt
3617e1f81e xform: add XFORM_ASSERT_NO_CONVERSION
A `XFORM_ASSERT_NO_CONVERSION` declaration makes xform check that
an procedure that is intended to avoid instrumentation actually
does avoid it.
2016-03-02 09:48:24 -07:00
Sam Tobin-Hochstadt
f2e34fedea Avoid intermittent timeout with longer time limit. 2016-03-01 18:52:46 -05:00
Robby Findler
753def919b cooperate better with check syntax for variables generated by #:pre and #:post in ->i
closes PR 15256
2016-03-01 00:56:34 -06:00
Asumu Takikawa
f8a4982bae Add doc category for syntax collection docs 2016-02-29 18:07:03 -05:00
Sam Tobin-Hochstadt
e94081c5aa Initialize variables to avoid compiler warnings. 2016-02-29 12:21:55 -05:00
Matthew Flatt
59f3f82460 GC: fix initialization of mark tables for places
Fixes a mistake in 7d90b27524.
2016-02-29 06:08:29 -07:00
Matthew Flatt
3b25e22dd6 add XFORM_NONGCING_NONALIASING annotation
An `XFORM_NONGCING_NONALIASING` function doesn't trigger a GC, and
when it is given an argument that is an address of a local variable,
it fills in that address and doesn't leak it. This annotation allows
the xform transformation (to support precise GC) avoid some work for
some hash-iteration functions.
2016-02-28 17:19:34 -07:00
Matthew Flatt
8a59534669 adjust unsafe hash-table iteration implementation
Restore exports available to embedding, extending, and FFI
applications, and shift boundary back between hash-table
implementation details (in "hash.c") and Racket interface
(in "list.c").
2016-02-28 16:23:52 -07:00
Matthew Flatt
3ac2c69f6c add explanations for primitive-property flags 2016-02-28 15:14:53 -07:00
Matthew Flatt
428d02c78c enumerate some guidelines for changing the core implementation 2016-02-28 15:14:53 -07:00
Gustavo Massaccesi
828335a879 optimizer: split optimize_info_lookup
With the old representation of local variables, optimize_info_lookup
had to search the stack for the frame with the information about the
variable. This was complicated so it has many flags to be used in
different situations and extract different kind of information.

With the new representation this process is easier, so it's possible
to split the function into a few smaller functions with an easier
control flow.

In particular, this is useful to avoid marking a variable as used
inside a lambda when the reference in immediately reduced to a
constant using the type information.
2016-02-28 17:59:34 -03:00
Gustavo Massaccesi
5ef3a53002 special cases for small hashes in unsafe_scheme_hash_tree_iterate_*
The iterator saves the return points in a list. For small immutable hashes,
encode the values in the list in the bits of a fixnum to avoid allocations.
2016-02-28 15:34:16 -03:00
Matthew Flatt
7d90b27524 add support for defining GC traversals through ffi/unsafe
Expose tagged allocation and a function that interprets a description
of tagged shapes. As a furst cut, the description can only specify
constant offsets for pointers within the object, but future extensions
are possible.
2016-02-27 20:33:50 -07:00
Matthew Flatt
e4f0b69b72 fix chaperone-of? and property-only impersonators
Closes #1263
2016-02-27 19:50:54 -06:00
Matthew Flatt
032b1871d1 bytecode compiler: break up and improve comments at final let step 2016-02-27 18:13:14 -06:00
Matthew Flatt
d70616ec65 raco exe: fix 32-bit ELF updating
Closes #1264
2016-02-27 18:12:57 -06:00
Lehi Toskin
bc99eb0eef Fix grammar mistake 2016-02-26 23:54:15 -05:00
ben
f83cec1b04 fix (combinations n k) bug
Now using Gosper's hack to enumerate length k binary numbers.
New implementation is shorter & a little more obviously correct
(if you trust the bit-twiddling)
https://en.wikipedia.org/wiki/Combinatorial_number_system#Applications
2016-02-26 17:59:59 -05:00
Ryan Culpepper
301b47df2c saved-errno tests for windows 2016-02-26 17:57:56 -05:00
Ryan Culpepper
5aff9925ad add tests for saved-errno 2016-02-26 17:57:56 -05:00
Ryan Culpepper
c1664610e1 update version number for ffi change 2016-02-26 17:57:56 -05:00
Ryan Culpepper
2cc4b66184 add saved-errno setter variant
This makes it easier to create mock foreign functions
(or wrap existing ones) for testing.
2016-02-26 17:57:56 -05:00
ben
f2bef56a2e margin-note to say #:auto-value is evaluated once 2016-02-26 17:47:54 -05:00
Matthew Flatt
81b5d74ed6 fix mishandling of the continuation-mark depth
When a chaperone-wrapped function leads to a slow-path tail
call, the continuation-mark depth can be made too deep when
resolving the slow tail call.

Closes #1265
2016-02-26 16:39:05 -05:00
Robby Findler
7151d6d034 add missing history annotation 2016-02-26 08:10:42 -06:00
Robby Findler
990555cd8d fix arity checking for -> contract with ellipses
closes #1266
2016-02-26 08:10:42 -06:00
Matthew Flatt
d9971292a6 make compiled-expression-recompile work on top-level forms
Mostly just fill in some corners, but also fix a bug with lifted
functions that accepted a boxed argument and have less than three
arguments total.

The `tests/racket/test` test suite now passes with
`PLT_RECOMPILE_COMPILE` set --- except for the "optimize.rktl" test
suite, wher emore work is needed to ensure that optimizations
don't get lost.
2016-02-26 06:03:11 -05:00
Matthew Flatt
f0500c64d3 Windows: always get errno from "MSVCRT.dll" 2016-02-26 06:03:10 -05:00
Stephen Chang
15f47ef62e fix context of macro-generated default-in-hash- internal ids 2016-02-25 23:40:30 -05:00
Vincent St-Amour
f71474baca Add missing "not".
Found by Greg Hendershott back in September.
2016-02-25 16:09:53 -06:00
John Clements
a45330815d add note about sorting with NaN 2016-02-25 15:51:04 -06:00
Gustavo Massaccesi
5a378ca883 More reductions for (if t v v) and (eq? v v)
Reduce
(eq? v v) ==> #t
(if t v v) ==> (begin t v)
(if v v #f) ==> v
when v is a local or a top level variable.

Previously, the last two reductions were used only
with local variables.

Also, move the (if x #t #f) ==> (not x) reduction
after branch optimization.
2016-02-24 21:56:04 -03:00
Gustavo Massaccesi
6cd225e073 avoid compiler warning 2016-02-24 21:55:05 -03:00
Stephen Chang
3e29101e48 properly throw exn when in-hash seq input is wrong type of hash
- refactors define-in-hash-sequences
- closes #1256
2016-02-24 14:43:44 -05:00
ben
c15a357417 add #:exact-columns option to table-display
Least invasive change I could think of to solve #1252.
When `--full-checksum` is set, never truncates the checksum column.

Examples:
```
$ raco pkg show typed-racket
Installation-wide:
 Package       Checksum               Source
 typed-racket  32d0a97058b797a8ef...  clone...=typed-racket
User-specific for installation "development":
 [none]
```

```
$ raco pkg show --full-checksum typed-racket
Installation-wide:
 Package       Checksum                                  Source
 typed-racket  32d0a97058b797a8efe794336dde069156b98630  clone...=typed-racket
User-specific for installation "development":
 [none]
```

```
$ raco pkg show --long typed-racket
Installation-wide:
 Package         Checksum                                    Source
 typed-racket    32d0a97058b797a8efe794336dde069156b98630    (clone "/Users/ben/code/racket/fork/extra-pkgs/typed-racket/typed-racket" "git://github.com/racket/typed-racket/?path=typed-racket")
User-specific for installation "development":
 [none]
```
2016-02-23 19:23:08 -05:00
Asumu Takikawa
98ba277948 Normalize path to have a trailing slash
The regexp-based helper did not work correctly for
a path like the one in the following use:

  raco pkg install -n foo /
2016-02-22 21:53:22 -05:00
Matthew Flatt
9494216a9b fix a problem with hash-remove
When a key is removed at a level that other only has a collision
table, the HAMT representation was not adjusted properly by
eliminating the layer. As aresult, table comparison via
`equal?` could fail. The problem could show up with hash tables
used to represent scope sets, where an internal "subset?" test
could fail and produce an incorrect binding resolution.
2016-02-22 15:24:17 -07:00
Jay McCarthy
619ef41f7d If full-checksum, table can be as long as necessary 2016-02-22 09:32:06 -05:00