Commit Graph

1758 Commits

Author SHA1 Message Date
Matthew Flatt
8a45f9d341 impersonated mutator: fix internal stack overflow
This is not a new bug, but it was exposed by the interaction
of the changed to the impersonated-mutator protocol and
the `unstable/option` test suite.
2014-10-21 13:53:09 -06:00
Eli Barzilay
e52f273491 Prevent irregular real numbers from being treated as valid JSON values.
Fixes PR 14628.
2014-10-21 10:15:36 -06:00
Matthew Flatt
0b71b8481d {impersonator,chaperone}-struct: change protocol to receive self
When calling a wrapper procedure for a field accessor or mutator,
provide the structure that was originally passed to the accessor or
mutator, instead of the value that was wrapped to create an
impersonator.

This is a backward-incompatible change, but I can't find any uses of
that initial argument to the wrapper procedure. Also, a wrapper can
capture the original value in its closure, while passing "self" allows
wrappers that are sensitive to overridden impersonator properties.
2014-10-21 10:05:02 -06:00
Matthew Flatt
99832efb45 openssl: fix ssl-load-default-verify-sources! for Win64
Closes PR 14784

Merge to v6.1.1
2014-10-21 07:33:11 -05:00
Matthew Flatt
3323605fa9 racket/udp: adjust receive into a zero-sized buffer
The OS doesn't necessarily react to a zero-sized buffer the way
that `udp-receive!` is supposed to work, so provide only a
non-zero-sized buffer to the OS.
2014-10-21 07:31:07 -05:00
Matthew Flatt
fbdfa36594 raco pkg: support "git://..." and "http[s]://[...].git" sources
Use the `net/git-checkout` library to support git repository servers
in general, instead of supporting only GitHub. A HTTP(S) source is
treated as a repository source when it ends with the ".git" suffix.
2014-10-18 09:16:01 -05:00
Matthew Flatt
ce464810d5 file/tar: add #:exists-ok? argument
The new argument is needed to reliably write to a tmp file, for
example, where the existence of the tmp file prevents other processes
from using the same name.
2014-10-18 07:14:50 -05:00
Matthew Flatt
ecc1d5dff2 net/git-checkout: repairs for HTTP(S)
Declare a "git" user agent, and use a secure client context for HTTPS
unless the `GIT_SSL_NO_VERIFY` environment variable is defined.
2014-10-18 07:14:50 -05:00
Matthew Flatt
06803e4da7 net/git-checkout: support ref -> ID mapping without download 2014-10-18 07:14:50 -05:00
Matthew Flatt
bbf154ba36 net/git-checkout: support the smart HTTP(S) transport
Git-based hosting services most commonly support the smart HTTPS
protocol, which carries "git://"-format payload in a fairly straightforward
way. (Supporting the dumb protocol looks much more difficult.)
2014-10-18 07:14:50 -05:00
Matthew Flatt
babd420293 net/git-checkout: checkout a tree via the "git://" protocol
The `net/git-checkout` library implements enough of `git clone` to
extract a tree from a repository that is accessed via the "git://"
protocol. It doesn't preserve a local clone, and it attempts to
download only the slice of the repository that is needed for the
requested tree (depending on how the tree is referenced).
2014-10-18 07:14:50 -05:00
Matthew Flatt
3a3ffe1efa note v6.1.1 in Racket "HISTORY.txt"
Merge to v6.1.1
2014-10-17 07:19:11 -06:00
Matthew Flatt
5650e8fc03 reorganize pkg/lib implementation
Split the module into several (smaller) modules.
2014-10-14 17:37:05 -06:00
Matthew Flatt
1cc86d3cea ffi/unsafe: fix make-sized-byte-string on a #f argument
In particular, a #f argument can make sense if the length is 0.
Technically, a byte string's byte array is supposed to be nul-terminated,
but many uses of byte strings get away without that terminator. I've
adjust the documentation to note that `bytes-copy` will work with a
non-terminated byte string.

Merge to v6.1.1
2014-10-14 16:43:20 -06:00
Robby Findler
ec4542383c add list*of 2014-10-11 23:23:38 -05:00
Matthew Flatt
608ac636eb repair ELF fixup on native-library installation
The fixup is not allowed to changed the virtual
address of a SHT_PROGBITS section, so a expanded
".dynstr" section might have to be moved to a
virtual address after everything else.
2014-10-11 14:11:21 -06:00
Matthew Flatt
71c93c2615 raco setup: unbreak for native libraries on Windows and Mac OS X
Repairs commit bd29411579.
2014-10-11 08:25:32 -06:00
Matthew Flatt
d4ad0a20e4 macro expander: fix an internal hash-table traversal bug
This bug could result in weird "cannot re-define a constant: lifted.0.2"
errors, or probably even worse collsisions of definitions, but I think
only in a namespace created from `module->namespace`.

So far, I haven't been able to create a reasonably small test,
because so many things have to line up in just the right way.

Merge to v6.1.1
2014-10-10 17:51:07 -06:00
Matthew Flatt
3692abf61e Windows: add "CP" before code page number as locale encoding
If you set the locale to something like "us_EN.1252", then
"1252" was returned as the encoding, but "CP1252" is more likely
to be recognized by `bytes-open-converter`.
2014-10-10 17:51:07 -06:00
Matthew Flatt
d8793e5b8b Always convert string<->paths with UTF-8 on Windows
Also, document representation information on paths. In particular,
explain that Unix and Mac OS X paths are natively byte strings, while
Windows paths are natively UTF-16 code-unit sequences. The byte-string
representation of a Windows path is a UTF-8-like encoding of the UTF-16
code-unit sequence, which is why it makes no sense to convert it using
the current locale's encoding.
2014-10-10 17:51:07 -06:00
Matthew Flatt
7e984c6009 fix allocation bug in equal? on deeply nested values
Based on the core file, this bug seems likely responsible for the
`raco setup` crash on DrDr for push 29346.

Merge to v6.1.1
2014-10-10 08:20:33 -06:00
Matthew Flatt
bd29411579 setup and pkg create: adjust ELF RPATH on install and uninstall
Allow a library installed as user-specific to refer to libraries
installed installation-wide.
2014-10-10 05:54:42 -06:00
Ryan Culpepper
653939ffa7 Post-release version for the v6.1.1 release 2014-10-08 14:39:56 -04:00
Matthew Flatt
40f5ec070a configure: add --enable-natipkg and 64-bit Linux native libraries
The `--enable-natipkg` configuration option adds "-natipkg" to the
platform library subpath. The suffix is intended to trigger the
installation of packages that supply native libraries for supported
platforms (where 64-bit Linux is the supported platform, for now, for
main-distribution packages), instead of relying on libraries installed
via the OS's package manager.

The intended client for "-natipkg" is the package-build service, where
installing packages via the OS package manager would require network
access and either trust or constrained installations. The build
machine is intentionally disconnected from the network and can only
access Racket packages, so repackaging native libraries as Racket
packages makes those libraries accessible.

A disadvantage of this approach to installing native libraries is that
it creates work for implementers of packages that access native
libraries. Those implementers will have to supply packages for 64-bit
Linux versions of native libraries to the degree needed to build and
(eventually) test the package. An advantage of the approach is that it
requires no changes to the package system; it will be cheap to replace
this approach if we find a better way to deal with native libraries
and/or OS packages in the package-build service.
2014-10-08 05:19:33 -06:00
Matthew Flatt
9d864b1182 fix UDP improvement for Windows 2014-10-03 06:44:47 -06:00
Matthew Flatt
2a387aceea racket/network: improve UDP support
Generalize `udp-send-to`, etc., to try each possibility of
a resolved address (instead of just the first one) like
`udp-connect!` does. This matters, for example, when using
"localhost" as an address, when the machine resolves "locahost"
to both "127.0.0.1" and "::1", and when the socket is created
for the second one that would be tried.

Also, detect and discard asynchronous ICMP errors.
2014-10-02 11:33:38 -06:00
Robby Findler
7aa4c94b9b fix some random generators broken when refactoring things to improve contract-stronger? 2014-10-01 21:44:02 -05:00
Matthew Flatt
b946d4639e JIT: fix allocation of letrec-bound closure over unboxed flonums
The closure could be allocated as uninitialized memory with the
expectation that it would be filled right away, but boxing values
to put in the closure could expose the uninitialized memory to
the GC. Fix the problem by boxing before allocating closures.
2014-10-01 13:13:37 -06:00
Ryan Culpepper
b2c6022989 syntax/parse: support pvar:literal patterns 2014-10-01 10:39:56 -04:00
Ryan Culpepper
e1e2e7e5da syntax/parse: conventions have lowest priority 2014-10-01 10:39:56 -04:00
Ryan Culpepper
ee65681a90 syntax/parse: literals shadow pattern forms etc
closes PR 14750
2014-10-01 10:39:56 -04:00
Jay Kominek
320079eeab add server-side support for TLS SNI 2014-10-01 10:39:56 -04:00
Robby Findler
221519f47f change the recursive contract stronger implementation
to use hash tables instead of association lists
2014-09-30 21:02:13 -05:00
Ryan Culpepper
3d5fcaa355 move pattern-expander contracts to outer modules, trim exports
This avoids mysterious errors later in the build process related to
TR and static-contracts. I don't see how the pattern-expander code
could possibly cause the errors that occur, but this commit fixes them.
2014-09-30 11:05:04 -04:00
AlexKnauth
81cc6bf4d0 add pattern-expanders to syntax/parse 2014-09-30 11:05:04 -04:00
Vincent St-Amour
e5fd7e504d Revert "Revert "fix a bug in f669c47c1""
This reverts commit 2e29a18039.

Reverted the wrong commit.
2014-09-29 15:41:51 -04:00
Matthias Felleisen
2e29a18039 Revert "fix a bug in f669c47c1"
This reverts commit 379ed6b46e.

Stupid robby experiment
2014-09-29 12:06:47 -04:00
Matthew Flatt
cf7c013477 Windows: fix handling of junctions as links
On Windows, a "soft link" or "junction" is different from a
"symbolic link". The current Windows documentation is
incomplete in that it describes the behavior of GetFileAttributesEx
for a symbolic link, but not for a junction, and I guessed wrong.
For consistency, junctions need to be treated like symbolic links.
2014-09-27 20:45:13 -06:00
Matthew Flatt
2eb943e0de racket/place: fix nested-place termination 2014-09-26 06:41:41 -06:00
Robby Findler
a9c0c8bccd add hash/c stronger
also, bring down below 102 columns
2014-09-25 17:42:43 -05:00
Matthew Flatt
116e06407b racket/draw Windows: patch Cairo for clipped DC surface creation 2014-09-25 16:17:29 -06:00
Robby Findler
a41ba9d37f add stronger for parametric->/c
(and test cases for stronger with new-∀/c)
2014-09-24 16:53:35 -05:00
Robby Findler
1f1479c7be add stronger to implementation?/c and subclass?/c
also, bring down below 102 cols
2014-09-24 16:53:25 -05:00
Robby Findler
9e3a9d17d5 add stronger to is-a?/c 2014-09-24 16:53:25 -05:00
Robby Findler
748e3ef7cc add stronger to syntax/c 2014-09-24 16:53:25 -05:00
Matthew Flatt
a64a1cb177 racket/gui: DPI-aware on Windows
The `racket/draw` library is now independent of the screen resolution
on Windows. Font sizes in "points" are the only place where the
resolution mattered before, and now `racket/draw` assumes a
traditional 96dpi on Windows and Linux (and a traditional 72dpi
on Mac OS X).

Setting the scale for "text and other items" in Windows now adjusts
the backing scale of screen and canvas-compatible bitmaps, as well as
setting a scale on canvas drawing. Window and screen positions and
sizes are similarly scaled; for example, if the screen is 2048x1436
with text scaled by 200%, then `racket/gui` reports the display size
as 1024x768 (and the display backing scale as 2.0).

Backing scales of 1.25 and 1.5 are common for Windows. Rounding
associated with those scales could cause trouble for virtual -> actual
-> virtual conversions.
2014-09-24 08:40:52 -06:00
Robby Findler
bbb4897ce2 add a stronger to class/c 2014-09-24 06:49:46 -05:00
Robby Findler
ac9b1cd05b add box/c stronger 2014-09-23 12:52:51 -05:00
Robby Findler
5da7104829 improve contract-stronger for vectors 2014-09-23 12:41:28 -05:00
Robby Findler
5099b380e6 improve contract stronger for promise/c 2014-09-22 21:39:43 -05:00
Robby Findler
932f041597 improve contract stronger for </c and >/c
and modernize those combinators, too
2014-09-22 20:45:18 -05:00
Robby Findler
379ed6b46e fix a bug in f669c47c1 2014-09-22 15:20:26 -05:00
Robby Findler
f669c47c1d improve contract-stronger for list-related contracts
also bring listof in line with the present
best practices of the contract library
2014-09-22 12:55:38 -05:00
Robby Findler
05185dcdde improve stronger for flat-named-contract
by making the equal, eq, and regexp contracts all have
an extra field to hold the name. This mostly has the advantage
that flat-named-contract has to turn a flat contract into it's
predicate a bit less often
2014-09-21 21:02:50 -05:00
Robby Findler
404c067286 improve chaperone-procedure error messages a little 2014-09-21 16:53:16 -05:00
Matthew Flatt
a8d0534e65 chaperones: allow procedure chaperones that supplies no redirection
The same as the change for structure chaperones, but for procedures.
2014-09-21 12:13:55 -05:00
Matthew Flatt
1f1a10db87 chaperones: allow struct chaperones that supply no redirections
(as requested by Asumu)

A witness accessor or mutator is still required to create a structure
chaperone, but `#f` can be provided in place of a redirection, and
then impersonator properties can be attached to the chaperone.

At the same time, adjust `(chaperone-of? v1 v2)` so that `v1` as a
chaperone is not required to preserve non-redirecting chaperones of
`v2`.

The overall consequence is that a redirection procedure can cooperate
with a (suitably protected) impersonator property to override
redirection behavior without running afoul of the chaperone invariant
and without requiring O(N) space for O(N) overrides. For example, the
contract system can implement the re-application of a contract with
different blame information by overriding blame information as
represented by properties, instead of adding a new chaperone layer
every time that blame changes.

... and all the same for non-chaperone impersonators, of course.
2014-09-21 11:51:36 -05:00
Robby Findler
9681032783 improve contract-stronger for instanceof/c 2014-09-21 06:13:58 -05:00
Robby Findler
eaf48bbbf1 add a proper stronger implementation based for recursive-contract
Following _Subtyping Recursive Types_ by Roberto M. Amadio and Luca Cardelli
2014-09-19 23:29:11 -05:00
Robby Findler
929ed92f40 fix bug in ->i expansion when the name ctc is used in certain ways 2014-09-19 23:29:11 -05:00
Robby Findler
ad7e2a71b7 Those commits can change the blame assignment in
incorrect ways

This reverts commit 0aee13bf22.
This reverts commit a0880f7403.
2014-09-19 23:29:10 -05:00
Robby Findler
a0880f7403 improve contract-stronger and related things
Specifically, add a mechanism so that contract combinators
can accumulate contracts on a value (instead just storing
only one) and then use that in instanceof/c to avoid
putting contracts on values more often.

Also, fill in better contract-stronger implementations in
some of the combinators
2014-09-19 12:57:08 -05:00
Sam Tobin-Hochstadt
837abdd51a Add raco pkg archive.
This creates a catalog from the specified currently-installed
packages. The catalog can then be used to replicate some or
all of the currently-installed packages in another installation
or other context.

Also extend `pkg/command` so that `#:multi` is useful.
2014-09-19 11:03:26 -04:00
Matthew Flatt
43d6684ab9 avoid stack-overflow in scheduler-triggered foreign calls
While a foreigh call is normally guarded by a check on the amount
of available stack space, a callbacks triggered by the
scheduler will first put Racket in no-stack-overflow mode, and
then it's too late to check stack space before making further
foreign calls. With Cocoa, there's some chance that the process
will run out of space. Avoid the mismatch by checking the stack
availability at the start of a scheduler iteration.
2014-09-18 06:06:21 -05:00
Mike Sperber
9dbc4842f7 Unbreak the build on FreeBSD 10.
isnan expands into a use of a function called _Generic.

Tell xform not to worry about it.
2014-09-14 09:09:45 +02:00
Matthew Flatt
ad2243ee01 restore accidentally removed GC check
Fixes a mistake in commit 768b93be82, which dropped a check that is
needed to trigger GCs during a sequence of large-block allocations.

Closes PR 14738
2014-09-12 12:22:55 -06:00
Robby Findler
dcfe7ede67 make some arity error messages for ->i contracted functions
slightly less terrible

... but ->i still doesn't do as good a job as -> and ->* do for arity
errors (specifically, ->i is still letting the blame-less errors that
application constructs thru when it could be assigning blame)
2014-09-10 16:57:52 -05:00
William J. Bowman
c6b3f337e9 Added trace-define, trace-let, trace-lambda
In racket/collects/racket/trace.rkt
2014-09-08 16:36:16 -04:00
Robby Findler
863f7d6669 improve parametric->/c's cooperation with a few bells and whistles in contract error reporting 2014-09-08 09:29:11 -05:00
Gustavo Massaccesi
1542398822 optimizer: move more things inside let and begin
Refactor the code to move inside 'let' or 'begin'.

Also, in the test position of a 'if', recognize the 'not' inside a 'let' or 'begin'.
For example, transform (if (begin ... (not p)) x y) => (if (begin ... p) y x)
Previously, this conversion was made only when
the 'not' was the outermost expression.

And use the refactored code to move application inside 'let' or 'begin' in a single step
For example, transform ((let (...) ... (let (...) ... f) x) => (let (...) ... (let (...) ... (f x))
In the conversion, it's necessary to shift x to the new coordinates inside the 'let's.
In the new version x is shifted only once.
2014-09-07 19:33:46 -06:00
Matthew Flatt
cddfdca835 JIT: fix problem with arity checking with >= 25 arguments 2014-09-07 18:41:16 -06:00
Marc Burns
467786fc1c Handle data descriptor signatures in file/unzip
http://www.pkware.com/documents/casestudies/APPNOTE.TXT specifies that a data
descriptor signature may be placed after the compressed data and before the
data descriptor. file/unzip now handles this case.
2014-09-07 07:47:20 -06:00
Marc Burns
478b01b0e3 unzip: Handle non-seekable input ports.
Before this commit:
  - unzip would attempt to seek the input port via file-position in some cases

After this commit:
  - unzip reads and discards bytes as needed to skip forward
2014-09-07 07:47:20 -06:00
Matthew Flatt
f9f43a4be7 avoid compiler warnings 2014-09-07 07:47:19 -06:00
Matthew Flatt
289e908ab2 string-normalize-...: fix memcpy that should be memmove 2014-09-05 22:02:13 -06:00
Matthew Flatt
230ce10b11 bump version 2014-09-05 21:13:16 -06:00
Matthew Flatt
51d91032f5 optimizer: fix bug
Repair a typo in b0f4a32049; thanks to Blake Johnson.
2014-09-05 21:10:16 -06:00
Matthew Flatt
79f7a642e1 avoid compiler warnings 2014-09-05 19:06:02 -06:00
Matthew Flatt
33e97745e9 treat OS page manager (especially Linux) more gently
Batch up mprotect() calls when cleaning up a place. Hopefully,
this will avoid ENOMEM errors from mprotect() on DrDr's build.
2014-09-05 17:49:41 -06:00
Matthew Flatt
af9e891215 module caching: ensure consistency of directory paths
Use `path->directory-path` to normalize directory paths and
increase use of the cache.
2014-09-05 15:54:18 -06:00
Matthew Flatt
bc48e9b935 win32: reduce allocation in the scheduler
It's not clear that the changes affect anything in practice,
but they avoid unnecessary allocation and quadratic behavior
in principle.
2014-09-05 15:54:17 -06:00
Matthew Flatt
cd17e08f12 check result of mprotect() 2014-09-05 13:49:27 -06:00
Matthew Flatt
59d3663106 ffi/unsafe win32: fix inefficiency in call-in-orig-thread mode
The problem made simultaneous rendering of "plot" and "math"
documentation about 10 times slower than it should be.
2014-09-05 10:34:27 -06:00
Matthew Flatt
f32d4b0187 minor cleanup on thread termination 2014-09-04 23:49:50 +02:00
Matthew Flatt
52514a4af4 fix interaction of alarm-evt and replace-evt
With `replace-evt` the time that the system needs to wake up
to check the event can drift later, but scheduling state was
carried in a way that works only if the wake-up time drifts
earlier.

Unfortunately, I don't know how to write a test for this bug.
The usual stategy of using `system-idle-evt` to detect busy
waiting doesn't work here, because the business happens despite
the scheduler's conclusion that the system is idle.

As reported by Jan Dvořák on the mailing list.
2014-09-04 23:49:28 +02:00
Matthew Flatt
59fac3d38a racket/port: fix busy-wait bug in make-limited-input-port
As reported by Marc Burns on the mailing list
2014-09-04 23:46:18 +02:00
Jay McCarthy
34dc76bd05 Revert "Fix PR14692"
This reverts commit 92d5408aa8, because
it breaks the build due to recursive deps. (It also breaks if the core
is in the "racket" package.)
2014-09-03 10:53:28 -04:00
Jay McCarthy
92d5408aa8 Fix PR14692 2014-09-03 10:44:29 -04:00
Matthew Flatt
b942a21846 fix module-code caching
Fixes a problem with c4508ad0d9, which disabled module-code
caching too often. A symptom of the disabled cache was that
running "math/scribblings/math.scrbl" would use twice
as much memory.
2014-09-03 12:16:29 +02:00
Matthew Flatt
fa75aec408 make installers: avoid dot-files (like ".gitignore") in installers
Closes PR 14716
2014-09-01 12:08:45 +02:00
Matthew Flatt
b0f4a32049 fix cross-module function inlining and argument use-count tracking
Order mismatch between tracking an use could cause a multiply-used
argument to be treated after inlining as a single-use argument.

Closes PR 14717
2014-09-01 12:08:44 +02:00
Sam Tobin-Hochstadt
2d701f046c Add get-all-pkg-scopes. 2014-08-29 21:40:38 -04:00
Matthew Flatt
1cb16f6c36 ffi/unsafe/objc: fix objc-is-a? to recognize subclass instances
This repair turns out to matter for Mac OS X 10.10, where creating
a list box in a frame somehow makes the frame an instance of a
subclass (that implements notifications of some sort, I think).
That subclassing broke an `(objc-is-a? ... RacketWindow)` test to
recognize windows that belong to a particular eventspace.
2014-08-29 14:12:26 -06:00
Matthew Flatt
76f1ebded9 Mac OS X: incorporate Pango repair for Yosemite
Pango 1.36.6 fixes the problem, so update native libraries
and the Coretext patch.
2014-08-29 10:12:27 -06:00
Matthew Flatt
768b93be82 improve GC handling of out-of-memory
There's a point in attempting to allocate a new large page
where it makes sense to GC and try again.
2014-08-29 10:12:27 -06:00
Matthew Flatt
edf140a440 make server: snapshot source catalog, set local cache 2014-08-26 14:41:13 -06:00
Matthew Flatt
b00638c52d ffi/unsafe: changed the way ffi-lib uses a version number with ".dll"
Add the version with a "-" before ".dll", instead of with a "."
after ".dll".
2014-08-26 09:18:43 -06:00
Gustavo Massaccesi
35eb65628e optimizer: use the equal? => eq? transformation to the optimizer phase
For some types, (equal? x y) is transformed into (eq? x y) in the resolve phase.
This commit adds this transformation to the optimizer phase. This improves
constant folding and enable some optimizations that are prevented
because equal? can run arbitrary code.

Also, transform   (eq? #f x) => (not x)   and   (eq? '() x) => (null? x)   to use
the type information of x when it's known.
2014-08-26 09:18:43 -06:00
Matthew Flatt
3943826b70 raco setup: fix ".dylib" references on install
If a Mach-O file installed with `{copy,move}-foreign-libs` has a
"@loader_path/" reference to a library that is installed in a
different target directory (normally because it's from a package that
is installed in a different scope), then change "@loader_path/" to an
absolute-path reference to that target.
2014-08-25 17:16:01 -06:00
Gustavo Massaccesi
fdf1a1f7ae optimizer: Remove unused flag added in d14b4a8 2014-08-24 07:29:55 -06:00
Matthew Flatt
769c5b6edd optimizer: another ((begin ... proc) x) to (begin ... (proc x))
The tranformation this time applies before optimization of the rator
and complements Gustavo's variant, which applies after optimization of
the rator.
2014-08-23 09:13:49 -06:00
Gustavo Massaccesi
d14b4a8095 optimizer: transform ((begin ... proc) x) to (begin ... (proc x))
Currently the optimizer can convert ((let (...) ... proc) x) to
(let (...) ... (proc x)). This is useful especially if proc can be
inlined. Extend this to begin's forms.
2014-08-23 08:59:39 -06:00
Gustavo Massaccesi
1f2f7a1df4 optimizer: more optimizations for unary operations
Previously, the optimizer simplified the application of some unary functions inside let,
for example (car (let () ... (cons 1 2)) => (let () ... 1). This commit extends this to begin forms,
like (car (begin ... (cons 1 2)) => (begin ... 1).

Also, constant folding and some reductions were only availed in the direct case, for example
(procedure? car) => #t. With this commit these reductions are extended to the expressions
inside let and begin, for example (procedure? (let () (begin ... car))) => (let () (begin ... #t).
2014-08-21 09:37:10 -06:00
Tobias Hammer
e637d78a09 fix cross compile on QNX
got broken in 2e284cc783
The racket version of libunwind is not compatible with QNX but old-style stacktraces are still working with the default gcc version
2014-08-20 16:47:20 -06:00
AlexKnauth
0b045ba77b Add syntax-local-match-introduce 2014-08-15 11:19:48 -04:00
Matthew Flatt
b2b00010e3 annotate and check packages for build and binary modes
If "p" is available as a source package, which is typical, then `raco
pkg install --binary p` would strip away the build dependencies of "p",
so that "p" would not install properly.

This commit changes `raco pkg install` to look for an annotation on
the package and complain if the annotation is inconsistent with the
requested conversion: a binary package cannot be used as a source
package or vice versa. (A built package, as provided by a snapshot
site, can be used as any kind of package.)
2014-08-15 15:41:27 +01:00
Matthew Flatt
05523a0b42 raco pkg: add --binary-lib package stripping to remove docs
The `--binary-lib` mode is like `--binary`, but it also omits
documentation to form a "binary library package".

The `--binary-lib` flag and "X-lib" vs. "X-doc" approaches solve the
same problem with different trade-offs:

 * When a package is split into "-lib" and "-doc" packages, then it's
   easier install non-documentation parts, and it's possible to
   install them from source. A programmer has to work more to split
   the packages, however, and the library and its implementation must
   have separate sources (i.e., no or restricted in-source
   documentation).

 * When a package is just "X", then users can install a no-source,
   no-documentation version by specifying `--binary-lib`, but only
   when the package is available from some catalog and provider in
   built form (such as from a distribution site or a package-build
   service).

In the long run, I think that relying on `--binary-lib will be best
and typical for most packages. The "X-lib" plus "X-doc" approach
that's common in the current distribution's packages, meanwhile, will
likely stick around for basic packages that are commonly useful in
constrained settings (including the setting of a package-build
service).
2014-08-15 10:33:20 +01:00
Matthew Flatt
ed66ff4ecc pkg metadata: add update-implies
The `update-implies` declaration is half of `implies` (even though the
name is bigger): update of the package implies an update of another,
but a dependency on the package is no license to access the content
of the other.

This declaration is intended as an alternative to keeping version and
dependency declarations in sync for a pair of packages that are always
updated together, normally because the packages are in the same
repository. For example, a "-test" or "-doc" package might have an
`update-implies` declartion on the corresponding "-lib" package.
2014-08-14 16:49:52 +01:00
Matthew Flatt
c61a4714e8 doc clarifications and typo in command-line help 2014-08-14 14:00:01 +01:00
Matthew Flatt
906ba45c6c reegxp-match: fix problem with lazy string decoding and output port
Closes PR 14684
2014-08-13 13:28:51 +01:00
Matthew Flatt
c359f7ac29 build less when a pre-built racket is supplied
Adjust dependency tracking and makefile rules to that when
`--enable-racket=...` is provided to `configure`, intermediate
CGC objects are not compiled.

The new approach uses dependency tracking that was already supported
by xform, previously used only for Windows.
2014-08-13 07:33:09 +01:00
Matthew Flatt
7e141a89f7 suppress ar output for SGC library
The `nicear` script avoids stderr output on DrDr.
2014-08-13 07:33:09 +01:00
Matthew Flatt
a266d623aa windows: better approach to manifest
Works for VS 2008 and 2012, at least.
2014-08-12 18:07:28 +01:00
Matthew Flatt
3b962a235d Revert "windows: remove custom manifest"
This reverts commit 67007451b3.

Seems to be needed after all.
2014-08-12 16:43:26 +01:00
Matthew Flatt
fa66067359 fix no-places, no-futures build 2014-08-12 15:58:43 +01:00
Matthew Flatt
fc8b2f02f9 Windows: more changes to auto-adapt to Visual Studio version
Although newer versions of Visual Studio can open 2010 projects, the
meaning of the project turns out to be: use 2010 tools. So, I've added
a step in the build script to automatically upgrade the solutions and
projects based on the version of Visual Studio that is being run.

Meanwhile, since my previous tests for VS 2012 and VS 2013 were using
VS 2010 projects, I wasn't actually testing with the 2012 and 2013
compilers. Additional changes are needed to make those work, notably a
fresh implementation of setjmp() and longjmp() for Win64.

This was all very painful, but the projects are now in much better
shape, so maybe it won't be so bad from here.
2014-08-12 15:55:37 +01:00
Matthew Flatt
67007451b3 windows: remove custom manifest
The manifest was intended to enable XP-style controls, but at this
point it doesn't seem to do anything except interefere with some
variants of the build tools.
2014-08-12 15:42:13 +01:00
Matthew Flatt
df375daef4 avoid NULL argument to memcpy()
gcc 4.9 takes advantage of the specification of undefined behavior if
you pass a NULL to memcpy(), even if the last argument is 0
2014-08-12 08:47:14 +01:00
Matthew Flatt
3c8b5b672e windows: fix sgc allocation of executable pages 2014-08-12 07:33:43 +01:00
Matthew Flatt
881990eddf windows: switch projects to SGC by default 2014-08-12 06:44:55 +01:00
Matthew Flatt
a312f499cb racketcgc: use SenoraGC instead of Boehm GC by default
This new default for Unix and Mac OS X trades performance for
portability (hopefully), but for most users the switch affects only
for the build process, where `racketcgc` is used to build `racket`.

To continue using Boehm GC, configure with `--disable-sgc`.

For now, Boehm GC continues to be the default for Windows.
2014-08-12 05:14:44 +01:00
Matthew Flatt
2916fc34cc SenoraGC: support allocation of executable memory; tune for performance
Allocation of executable memory is intended to make SELinux
happier by mmapping with PROT_EXEC instead of using mprotect()
to allow execution after the fact.

Performance improvements bring SGC within 30% of the Boehm GC on
`racketcgc -cl racket`, which makes SGC an even more plausible
substitute.
2014-08-12 05:14:14 +01:00
Matthew Flatt
2220452b72 racket/place: protect place-creation bindings
Closes PR 14677
2014-08-11 10:48:58 +01:00
Matthew Flatt
c4508ad0d9 avoid cross-namespace submodule pollution via module-code cache
When a module is loaded with submodules intact, it should not be
cached and used for a later load that is intended to obtain the
module without submodules. Avoid mismatches by constraining the
cache to modules without submodules.
2014-08-11 10:26:32 +01:00
Matthew Flatt
2bdb8c1de5 fix rename-transformer-target for chaperoned structs 2014-08-11 07:41:47 +01:00
Matthew Flatt
5ef75682d7 fix run-time error reporting for variables in a submodule
Error reports used the "source" field of a module, which
doesn't have submodule information, or the "name" field of
a module, which might not match an actual filename (".ss"
vs. ".rkt"). Create the right combination.
2014-08-11 07:41:43 +01:00
Matthew Flatt
f4c1d7ec03 racket/class: add missing check for #<unsafe-undefined>
When a superclass method is called before the superclass
is initialized, then all field accesses need to be guarded.

Robby found this one.
2014-08-06 08:46:51 +01:00
Matthew Flatt
fe12e93192 bump version 2014-08-05 16:23:10 +01:00
Matthew Flatt
926e64f5f1 fix "fixing letrec" pass
Adjust the compiler pass to insert checks for #<unsafe-undefined>.
The chanegs amount to throwing out the old attempt to follow the
implementation sketched in "Fixing Letrec", and instead use a
simpler abstract interpretation.
2014-08-05 16:22:31 +01:00
Matthew Flatt
ac428f89fa use-before-definition analysis: fix checking of with-cont-mark form
Similar to the `set!` problem.
2014-08-05 16:00:19 +01:00
Matthew Flatt
6efac46b3f letrec-check analysis: remove no-op part of implementation
The `deferred_uvars` list is constucted so that it always
has the same length as `uvars`.
2014-08-05 16:00:19 +01:00
Matthew Flatt
837a55f484 use-before-definition analysis: fix handling of let[*]
Bindings in `let` and `let*` need to be tracked much the same
way as for `letrec`, so that

 (letrec ([b (let ([d (lambda () c)])
               (d))]
          [c 1])
   b)

raises an exception.
2014-08-05 16:00:19 +01:00
Matthew Flatt
7d85bccaa2 use-before-definition analysis: fix checking of set! form
Treat the RHS of `set!` as escaping to an unknown context, so
that any variables it references are treated as unprotected.
2014-08-05 16:00:19 +01:00
Matthew Flatt
30d30ce74c win32: fix 32-bit get-seconds 2014-07-31 09:53:07 +01:00
Matthew Flatt
dc271e8347 racket/port: enable buffering for peeking-input-port 2014-07-30 11:49:04 +01:00
Matthew Flatt
9d17a35539 fix expand on a module containing lifts from expression
Another attempt at the bug that b95baa1d25 was intended to fix.
2014-07-30 10:33:52 +01:00
Matthew Flatt
b95baa1d25 fix expand on a module containing a #%declare form 2014-07-30 08:49:28 +01:00
Matthew Flatt
21f78ecd14 fix problem with (continuation-marks <thread>)
A thread can be swapped out while it's in transition between a
mandling of the mark-stack position and recovering from C-stack
overflow. Fix up that case.
2014-07-30 07:20:45 +01:00
Matthew Flatt
807b909e73 allow expand on cross-phase-persistent modules
Previoulsy, `expand` mode explicitly disallowed cross-phase declaration
in commit 2e652fc2b3. I'm not sure why, and that commit has no test
case that fails when the restriction is removed, so my best guess is
that it was a debugging strategy that I forgot to undo.
2014-07-30 06:30:44 +01:00
Robby Findler
7472058fd9 fix contract random generation for -> when the range is 'any' 2014-07-29 09:38:09 -05:00
Leif Andersen
027fb52c66 mz-gdbinit script gives type when using pso
The mz-gdbinit script (generated by mk-gdbinit.rkt) gives the type when using
pso, even when the default template did not include the type.

It defaults to printing out only the name of the type without additional
information.
2014-07-29 14:22:07 +01:00
Jan Dvořák
8bd5aa38b1 allow mixing exceptions with ffi/unsafe/alloc
Use call-as-atomic that can handle exceptions instead of dynamic-winding
start-atomic and end-atomic. Exceptions can be found in the functions's
result wrapper such as:

    (define-lib find-some-object
                (_fun (name : _string/utf-8)
                      (object : (_ptr o _some-object-pointer))
                      --> (result : _int)
                      --> (begin
                            (when (negative? result)
                              (error 'find-some-object "unknown name"))
                            object))
                #:wrap (allocator free-some-object))

Signed-off-by: Jan Dvořák <mordae@anilinux.org>
2014-07-29 14:16:26 +01:00
Matthew Flatt
41e7d346d1 adjust link-all to avoid conflicts 2014-07-29 10:48:33 +01:00
Matthew Flatt
04c36e2c09 adjust pack-all script to flush status messages 2014-07-29 10:48:32 +01:00
Matthew Flatt
d2a8bfcfe6 raco pkg update: don't claim conflict with package being updated
Merge to v6.1
2014-07-28 16:29:43 +01:00
Robby Findler
e082f9b183 adjust real-in implementation so that it prints as (real-in ...) instead
of (between/c ...)
2014-07-28 08:37:19 -05:00
Matthew Flatt
135ccf094e Windows: use native Win32 API for dates
Allows conversion of negative "seconds" to reach dates before
1970, and fixes year-varying DST tracking for versions of
Windows that know about those details.

As far as I can tell, we have to compute ourselves whether a
date is in daylight-saving time based on specifications of
when daylight and standard times start. That part seems tricky
and could use extra review.
2014-07-25 15:37:35 +01:00
Matthew Flatt
816d09bb24 macro expander: fix #%top via local-expand
Fix bug in b25a2b83ba that breaks the teaching languages.
2014-07-25 11:21:20 +01:00
Matthew Flatt
8f8e3b7c65 close hole in chaperone implementation
Problem, example, and solution from Sam; see the dev mailing-list post
on 24-JUL-2014.

When a chaperoned accessor, mutator, or property accessor is used to
chaperone a struct, the chaproning procedure must not be able to
see things that the chaproned accessor, mutator, or property accessor
would not allow.
2014-07-25 11:02:08 +01:00
Matthew Flatt
b25a2b83ba The implementation of #%top within a module has, for a while,
required that the identifier wrapped by `#%top` not have a local
binding. Change the documentation to match the implementation in that
way. (Since local binding in an identifier's lexical information
contributes to its identity as a top-level binding, that specification
of `#%top` would make sense everywhere, but I've left the top level
alone for backward compatibility.)

Also, change `local-expand` to never introduct `#%top`
wrappers. That's a little more consistent with what `#%top` has
evolved to mean, and it specifically works better with
`local-expand/capture-lifts`.

Closes PR 14635 and PR 14654
2014-07-25 09:07:46 +01:00
Matthew Flatt
ccda0e4abb macro expander: fix identifier-binding on fully expanded module
Fix the case of an identifier that is used as a binding in a module
but originated from a different module.
2014-07-25 07:21:06 +01:00
Asumu Takikawa
1bf54b06ee Revert label phase check, do correct thing
Thanks to Matthew for advice
2014-07-24 13:46:42 -04:00
Matthew Flatt
682c92554f net/http-client: don't send a 0-sized chunk that isn't a terminator 2014-07-24 16:40:34 +01:00
Scott Bell
29922c8a77 Send a final, empty chunk as required by RFC 2616 in http-conn-send! 2014-07-24 16:39:41 +01:00
Matthew Flatt
1809df456a regexp-match: tune chunking of UTF-8 decoding
A `string-split` on a big string with lots of small matches sends the
regexp matcher a big string many times. Decoding 1024 bytes each time
is too much. Decoding 32 bytes is be a better trade-off between
chunking for large matches and being lazy for small matches.

For example, on a 60MB string with a space every 15 characters or so,
splitting on a space is about 3 times as fast with this adjustment.

I tried a few chunk sizes, and 32 worked the best in my experiments.
Naturally, as more bytes are read, the chunk size ramps up, so it's
a question of initial size; larger matches are relatively insensitive to
the initial size (so, again, it makes little sense to cater to large
matches with a large initial decoding size of 1024 bytes).
2014-07-24 16:07:01 +01:00
Matthew Flatt
fffcf9f921 equal?: remove redundant eqv? test 2014-07-24 14:39:51 +01:00
Matthew Flatt
f0e710179c filesystem-change-evt: report inotify_init() error correctly 2014-07-24 14:12:17 +01:00
Matthew Flatt
c570a86201 streamline some paths for equality and hashing
Cuts about 1/3 of the time for a string-hashing microbenchmark
provided by Pedro Ramos:

 #lang racket
 (define alphabet "abcdefghijklmnopqrstuvwxyz")
 (define (random-word n)
   (build-string n (lambda (x) (string-ref alphabet (random 26)))))
 (define words (for/list ([k 1000000])
                 (random-word 3)))
 (define d (make-hash))
 (time (for ([w (in-list words)])
         (if (hash-has-key? d w)
             (hash-set! d w (add1 (hash-ref d w)))
             (hash-set! d w 1))))
2014-07-24 13:33:11 +01:00
Asumu Takikawa
ad677478ab Test for begin at label phase 2014-07-23 12:20:50 -04:00
Matthew Flatt
a95e279219 fix submodule export of enclosing module's binding
When `x` and `x`-with-a-mark are both defined, then the order of
definitions affected the binding that `(provide x)` would export
in a submodule that uses `#f` as its language. The problem was
in the implementation of the implicit `require`, which needs to
look up a variable's symbolic name in two different environments
to set up the right mapping.
2014-07-23 16:46:51 +01:00
Matthew Flatt
4c8084e5d8 quasisyntax: fix reporting for misused unsyntax[-splicing]
Closes PR 14652
2014-07-23 11:01:41 +01:00
Matthew Flatt
df5bfe19c0 sync: accept 0 arguments
As suggested by Jonathan Schuster.

Note that the `choice-evt` constructor already accepted 0 arguments.
2014-07-23 07:55:17 +01:00
Robby Findler
f9b20d3789 fix bug in ->i 2014-07-22 22:42:41 -05:00
Asumu Takikawa
041c2b1a07 Add flatten-all-begins to syntax/flatten-begin 2014-07-22 17:38:08 -04:00
Robby Findler
2a07425f26 renaming bug in file/convertible's contract 2014-07-18 23:32:24 -05:00
Robby Findler
5641ab84db add contracts to file/convertible 2014-07-18 20:59:09 -05:00
Robby Findler
4a996cce6b add context into the blame record for struct-type-property/c
and use the standard contract printer
2014-07-18 20:33:41 -05:00
Matthew Flatt
e8278176fa update racket/HISTORY.txt
Merge to v6.1
2014-07-18 07:55:50 +01:00
Matthew Flatt
7a5746d9a7 future: fix completion of a future that ends with a delayed tail call
The completion needs to be set up as an lightweight contination so
that it can be captured.

Merge to v6.1
2014-07-17 17:02:02 +01:00
Matthew Flatt
4541a75e76 future: fix slow path for inlined struct getter
Merge to v6.1
2014-07-17 17:02:01 +01:00
Matthew Flatt
76aefcb508 fix sleep timeout in scheduler
In the case that the current time equals exactly the timeout of
a `sync/timeout`, the Racket process could get stuck (using no CPU)
instead of continuing as it should.

How did we not find this before? Why am I suddenly able to replicate
the problem (i.e., hitting exactly the target timeout in the secheduler
at the millisecond granularity)?

Merge to v6.1
2014-07-17 07:53:55 +01:00
Matthew Flatt
c681c6e8e5 raco pkg install: reject overlapping package directories
For example, if you accidentally type `raco pkg install` in your
"racket" directory, you'd rather have an error rather than competing
module paths that reach all libraries.
2014-07-16 17:20:17 +01:00
Matthew Flatt
d7f2c869b6 openssl: add supported-{client,server}-protocols
Use the new functions to avoid running a test that requires 'tls12
to succeed.
2014-07-16 12:53:18 +01:00
Matthew Flatt
0bb1bab059 file/tar: don't try to read link permissions or timestamp
Links don't (normally) have those properties, and attempting to
read them makes a link fail when its target does not exist.
2014-07-16 06:37:58 +01:00
Matthew Flatt
bc832a680b pkg/lib: make pkg-directory->additional-installs recognize root docs
Merge to v6.1
2014-07-15 15:34:07 +01:00
Matthew Flatt
bc69a9b05c Add replace-evt
As suggested by Jan Dvořák.

The event created by `replace-evt` is a kind of event-gated
version of `guard-evt`. In particular,

 (guard-evt thunk)

could be expressed as

 (replace-evt always-evt (lambda (_) (thunk)))

Use `replace-evt` as a shortcut for the case when you want to
synchronize on either A or C, but you need to wait for B to get C.
You could wait on A+B and then, if B is selected, wait on A+C;
wrapping B with `replace-evt` to generate C is a kind of shortcut that
is eaiser to write and avoids tear-down and re-setup of A.

The `replace-evt` constructor is more than a shortcut in the sense
that it builds the pattern A+B->A+C into `sync`, which enables
abstractions that need a B->C transition. So, `replace-evt` adds
expressiveness, but (perhap reassuringly) it does not add any new
rendezvous capability.

Naturally, the procedure given to `replace-evt` can produce
another `replace-evt`, and the event argument to
`replace-evt` could also be a `replace-evt`.
2014-07-15 15:22:11 +01:00
Matthew Flatt
add04001cd pkg/lib: fix pkg-directory->additional-installs
Merge to v6.1 (with a70b3173b2)
2014-07-15 10:39:53 +01:00
Matthew Flatt
a3af35754d prop:evt, prop:{input,output}-port and evt chaperones: fix up scheduling
Although it doesn't seem to be possible currently, avoid the case
that a property-based access or chaperone is called in a scheduler
context.
2014-07-15 09:12:14 +01:00
Matthew Flatt
fed14e1ce1 prop:evt: support chaperone when extracting field
Thanks to Sam for noticing this problem.
2014-07-15 08:50:13 +01:00
Matthew Flatt
a027e1445f chaperone-evt: don't drop other chaperones 2014-07-15 07:58:15 +01:00
Matthew Flatt
a70b3173b2 pkg/lib: make pkg-directory->additional-installs use 'compile-omit-paths
Otherwise, "test/pkgs" claims to provide various documents and executables
that are in test packages.

Merge to v6.1
2014-07-15 07:22:22 +01:00
Robby Findler
1dda800ca2 add contract-correct caveat to contract violation error messages 2014-07-14 08:10:51 -05:00
Matthew Flatt
e063b654fa xform: fix bad parsing of array sizes
A size expression N+M for a literal integer N was parsed as just N.
Report an error when that case happens (since it's difficult to
handle) instead of mishandling it.

Merge to v6.1
2014-07-13 18:42:45 +01:00
Matthew Flatt
c72f441d93 JIT: fix array-size expression that is handled badly by xform
This bug (in xform, really) appears to be responsible for recent "JIT
buffer overflow" crashes. It could also cause other memory-corruption
crashes.

The bug could be triggered by any program that uses operators like
`+`, `<`, and `bitwise-ior` on more than 2 and less than 6 operands
(which is a lot of programs), but only if a certain allocation and
GC pattern happens at just the right time (which is why a crash was
relatively rare).

Merge to v6.1
2014-07-13 18:41:11 +01:00
Matthew Flatt
689f449c8d ffi/unsafe/com: convert to date*, document limitations
Merge to v6.1 along with 7d65ee6127.
2014-07-12 08:17:47 +01:00
Kalimehtar
7d65ee6127 Fix _date to allow dates before 1970 year 2014-07-12 08:16:07 +01:00
Matthew Flatt
75e201cc06 optimizer: fix tail-position bug in recent optimizer change
Fixes a problem with a7a912eeab.

The existing test suite caught this bug, but I somehow overlooked
the failure report.
2014-07-11 13:59:57 +01:00
Matthew Flatt
f57c1c8e2a fix GC-cooperation bug in vector->values
The `vector->values` function set up multiple return values
badly in the case that the given vector is chaperoned.
The problem could lead to NULL as results for `vector->values`.

Merge to v6.1
2014-07-11 13:31:17 +01:00
Matthew Flatt
94bd5369b5 avoid over-large buffer for tail calls
Applying to a large number of arguments once causes the run-time
system to maintain a too-large buffer for managing tail calls in
the future. Decay the buffer size as it is reallocated.
2014-07-11 07:43:02 +01:00
Matthew Flatt
4aa61744c6 net/http-client: adjust data-procedure/c contract
Promise more (a `void?` result) and requies less (`any` instead of `any/c`).
2014-07-11 06:21:33 +01:00
Matthew Flatt
a7a912eeab optimizer: generalize moving expressions to single-value context
Gemeralize Gustavo's change so that immediately-used right-hand sides
can be moved into any position that (like the binding context) enforces
single-valuedness --- for arbitrary right-hand expressions.
2014-07-11 06:02:14 +01:00
Gustavo Massaccesi
25c05d66b6 optimizer: allow to move once_used to test position 2014-07-11 06:02:14 +01:00
Gustavo Massaccesi
82ffd40592 optimizer: transform (if v x v) to (if v x #f) 2014-07-11 06:02:14 +01:00
Matthew Flatt
55c040cf3a raco setup -c => disable everything else 2014-07-11 06:02:13 +01:00
Matthew Flatt
8f20264a83 fix marshaling of #'(.... . ()) to bytecode 2014-07-11 06:02:13 +01:00
Matthew Flatt
95a126b2e1 raco setup: reorganize command-line flags
Group flags and refine the descriptions and documentation.

Merge to v6.1
2014-07-11 06:02:13 +01:00
Robby Findler
b9f423c9c5 unbreak contract system
fix bug introduced in 72c83a32e
2014-07-10 04:56:02 -05:00
Robby Findler
72c83a32e6 improve the random checking for ->i so that it can exercise
simple ->i contracts

specifically, ones with no dependency. This is useful for
when there are dependent #:post conditions (which can't be
expressed with the other combinators)
2014-07-10 04:05:41 -05:00
Matthew Flatt
7ccac3c054 fix guard on references to unsafe functions in bytecode
The protection against unsafe-function references was designed for
bytecode that referred to unsafe operations indirectly, and that
was broken when the compiler changed to refer to unsafe functions
directly in bytecode (to simplify JIT inlining bytecode optimization).
Actually, the relevant code (now removed) seems to be pointless,
since protected-binding checking should cover it already. Maybe
something else changed, or maybe the code was not properly checked
in the first place.

Now, `read` rejects a bytecode stream if it contains a direct
reference to an unsafe function and the code inspector is not the
original code inspector. It's still possible to synthesize bytecode
that contains an indirect reference, and then protected-binding
checking does its job.
2014-07-10 07:10:03 +01:00
Matthew Flatt
efa9a1e920 fix protected-export checking in dynamic-require
The `dynamic-require` funciton was not checking correctly for
re-exported bindings.
2014-07-10 07:10:03 +01:00
Matthew Flatt
8559192944 fix order of file close and kqueue de-registration
Thanks to memcheck.

Merge to v6.1.
2014-07-10 07:10:03 +01:00
Matthew Flatt
45eb084d27 fix uses of uninitilized memory
Thanks to memcheck. (I'm unable to get far with Racket and memcheck,
but I get this far.)

Merge to v6.1.
2014-07-10 07:10:03 +01:00
Scott Bell
ec0468a1f1 Allow http-conn-send! to take a procedure as its #:data parameter 2014-07-09 09:45:15 -04:00
Matthew Flatt
42aeae24be raco pkg catalog-archive: handle interrupted update
While `catalog-archive` cannot handle arbitrary corruption of
a previous archive run, it should be able to handle a state
due to interruption or other transient errors.

Merge to v6.1.
2014-07-09 13:02:02 +01:00
Ryan Culpepper
406ba23077 Post-release version for the v6.1 release 2014-07-08 20:54:31 -04:00
Matthew Flatt
139452dcc2 read: fix long-double error reporting
This repair corrects an ocassional test failure in the `read`
test suite.
2014-07-08 08:00:16 +01:00
Matthew Flatt
7dde0e98cf refine attempt at debugging output for JIT buffer overflow 2014-07-08 07:02:42 +01:00
Matthew Flatt
5c5bc86915 raco setup: make --check-pkg-deps require dependency declarations
By default, `raco setup` skips checking dependencies when a package
declares no dependencies. Make `--check-pkg-deps` check in that
case, too.
2014-07-07 09:41:19 +01:00
Juan Francisco Cantero Hurtado
6922ba8c23 Define SCHEME_PLATFORM_LIBRARY_SUBPATH for some architectures on OpenBSD 2014-07-07 06:17:40 +01:00
Matthew Flatt
b2897b33d5 raco setup: add --pkgs argument
The arguments to `--pkgs` specify collections to set up as the collections
that are (partially) provided by a set of packages.

Closes PR 14396
2014-07-07 06:17:21 +01:00
Matthew Flatt
03413f2298 raco setup: add --check-pkg-deps for checking specified collections
This flag enables scalable package dependency checking to a large
degree, although dependencies related to documentation cross
references can escape detection.
2014-07-07 06:17:20 +01:00
Matthew Flatt
f5d4093ffa raco pkg install: make conflict checking sensitive to platform specifier 2014-07-07 06:17:20 +01:00
Matthew Flatt
739863099d add setup/matching-platform
Put a function that was implemented in two places in one place.
2014-07-07 06:17:20 +01:00
Matthew Flatt
b64db3d0e6 raco setup: propagate doc-build error in summary and exit status 2014-07-04 10:42:22 +01:00
Matthew Flatt
8d6870a7c3 fill in some missing history on Racket's slice of lightning 2014-07-04 06:21:26 +01:00
Matthew Flatt
f93f52474f fix encoding of CMN in ARM JIT
It looks like bits 12 through 15 of the ARM encoding for CMN
should be 0s, not 1s, although many processors don't care.
2014-07-04 05:17:20 +01:00
Matthew Flatt
e23f22a9af raco pkg: check for conflicting docs, executables, etc.
Unfortunately, many existing packages rely on the fact that documentation-name
conflicts do not cause trouble when a package is installed in user scope
(because the documentation in that case is rendered with the package).
So, flag conflicts only for installation scope by default, but add a
`--strict-doc-conflicts` flag for strict checking even for user scope.
2014-07-04 05:17:20 +01:00
Matthew Flatt
82326631a9 raco {pkg,planet}: exit with non-0 status for bad sub-command 2014-07-04 05:17:20 +01:00
Matthew Flatt
b99260bb32 fix declaration for non-places, non+futures build 2014-07-04 05:17:20 +01:00
Matthew Flatt
50715f7bda setup/pkg-deps: fix "racket" mapping
I'm unable to construct a test that exposes the problem, but fix the
"type" on the dependency list for the special "racket" package.
2014-07-04 05:17:20 +01:00
Robby Findler
f49dd363fa added list-contract?
and specialized a bunch of list-related contracts to track list?-ness,
notably recursive-contract now accepts a #:list-contract? argument
that means that it insists that values it accepts be list? (and
thus not cyclic)

related to PR 14559
2014-07-03 23:07:38 -05:00
Robby Findler
0db4df1d33 Revert "adjust recursive-contract so that it terminates on cyclic values"
This reverts commit 7728e062f4.
2014-07-03 22:18:33 -05:00
Robby Findler
822526a5a2 add natural-number/c random generator 2014-07-03 22:18:32 -05:00
Robby Findler
400e4de891 bring down below 102 columns 2014-07-03 22:18:32 -05:00
Matthew Flatt
116555c517 optimizer: fix crashing bug
A continuation of 22b7cc6a5e: a second old bug in
shift_closure_compilation() than became more exposed.
2014-07-02 12:09:50 +01:00
Matthew Flatt
183ad7e3e4 raco catalog-archive: fix dependencies and tags in new catalog 2014-07-02 09:07:36 +01:00
Matthew Flatt
d316652160 raco setup / raco pkg install: add --fail-fast flag
This flag is useful for speculative package installations runs where
we'd like to give up and try something else if it's not working.
Specifically, we might try installing multiple packages at once,
and then back off to a smaller subset if something goes wrong.
2014-07-02 09:07:36 +01:00
Matthew Flatt
795c13d4a4 file/untar: fix handling of filename prefix in USTAR format
Combine prefix and filename with a "/".
2014-06-30 18:38:00 +01:00
Matthew Flatt
22f90ce8fe pkg/lib: add #:package-exn-handler to pkg-catalog-archive 2014-06-30 09:18:38 +01:00
Matthew Flatt
356196d62b racket/port: fix problem with reencode-input-port
For the case that a larger buffer is needed than provided for
a read, decoding should make progress as long as some bytes are
converted.

Closes PR 14607
2014-06-27 07:51:07 +01:00
Asumu Takikawa
6fe2745f55 Add syntax properties in contract expansion for TR
This establishes a communication channel between the
contract system and TR. TR normally can't track the
relationship between the identifier bound to the transformer
that produces the lifted value expression (which has the
type in the environment) and the lifted expression
itself.

This also adds properties that indicate which parts are
lifted expressions and if a function has an extra negative
party argument.

Finally, the expansion of keyword arguments is modified
slightly to propagate syntax properties on function argument
syntax to the let-bound identifiers that the keyword application
generates.
2014-06-26 15:46:08 -04:00
Matthew Flatt
31c35d8da2 add missing casts that are required by some C compilers 2014-06-26 13:06:42 +01:00
Matthew Flatt
5cbe6cfdcb work around bug(?) in Mac OS X select()
Using select() to check whether a pipe is ready for writing seems to
fail on Mac OS X 10.8 and 10.9. See the PR for a small C program to
demonstrate. It's possible that the small program is broken and
there's no bug, but the program works on Linux and on Mac OS X 10.7
and 10.6.

Although poll() seems to work, switching completely to poll() is not a
good option on Mac OS X, since poll() does not support devices on that
platform.

The kqueue() facility seems to handle pipes and writing ok, so work
around the bug by enabling the use of kqueue() on pipes.

Closes PR 14596
2014-06-25 09:56:44 +01:00
Matthew Flatt
94a5c6e3fb add more debugging output for a JIT-buffer-overflow internal error
Show the content of the buffer and the content of the temporary buffer
used to predict the size; then, I should be able to track down the
source of a mismatch.
2014-06-25 07:46:39 +01:00
Matthew Flatt
d3e008af50 racket/tcp: use %E instead of %e for socket error reporting
Using "%E" is right for WinSock errors, instead of "%e".
2014-06-24 11:40:21 +01:00
Sam Tobin-Hochstadt
dcb5b09a14 Optimize match patterns of the form (list x ...).
This also applies to `(mlist x ...)`, even though
that involves two traversals when only one is
required by the old method. Timing suggests that
the new code is nonetheless faster.
2014-06-23 15:27:19 -04:00
Matthew Flatt
58eab92dc3 Fix reading of badly encoded symbols from bytecode
This is the third try to fix the bug exposed by "fuzz.rkt". Previous
repairs addressed a symptom at the point of printing bad symbols,
instead of the cause at a failure to validate a symbol's encoding
when reading bytecode. This one fixes reading.
2014-06-23 16:21:48 +01:00
Matthew Flatt
408d6bb773 Fix UTF-8 symbol repair
Commit 6a5a3037b4 was not quite right, because it used sightly the
wrong variant among a dozen decoding functions.  The test suite caught
the problem, but I forgot to run it before pushing.

Also, repair the "Inside" documentation on the function that was
incorrectly used, and document the new variant.
2014-06-23 15:35:25 +01:00
Matthew Flatt
6a5a3037b4 avoid getting stuck on non-UTF-8 symbol encodings in bytecode
Found by fuzz tester, and this bug seems to be a common reason for
the fuzz test to time out.
2014-06-23 13:27:52 +01:00
Matthew Flatt
431321f2cb fix use of wrong comparsion macro
The wrong comparison could possibly (though not likely) cause an
operation-skipping optimization to be missed.
2014-06-23 10:44:56 +01:00
Matthew Flatt
93fdbdc79c optimizer: refine virtual clock, more precise shift-fuel tracking
Allow an effect-free `if` to not increment the effect-tracking
virtual clock (but increment the clock during branches, to avoid
moving computation into a branch).

Spend empty-`let`-elimination fuel more precisely, so that more
empty `let`s can be removed while still avoiding quadratic
compile times.
2014-06-23 06:28:50 +01:00
Matthew Flatt
22b7cc6a5e optimizer: improvements mostly for splitting of multiple-value bindings
Convert

 (let-values ([(<id> ...) (if <id-t>
                              (values <e1> ...)
                              (values <e2> ...))])
    ....)

to

 (let ([<id> (if <id-t> <e1> <e2>)]
       ...)
    ....)

which duplicates the `(if <id-t> ....)` test, but that's likely to
be worthwhile to avoid multiple-values shuffling and enable more
constant and copy propagation.

A related improvement is to more eagerly discard `let` wrappers
with unused bindings during optimization, which could enable
further optimization, and allow moving conditionals relative
to other expressions to avoid intermediate binding.

Eagerly discarding `let` wrappers exposed a bug in the optimizer's
shifting of variable locations by exercising the relavant shifting
operation in shift_closure_compilation().

Closes PR 14588
2014-06-20 11:05:07 +01:00
Matthew Flatt
16a0727231 optimizer: fix reordering in let+values+values splitting
While the commit comment in 3150b31eb7 still seems right, the changed
overlooked the fact that the arguments to a split `values` might get
reordered (due to the way binding positions are calculated). Fix the
optimizer to make sure that reordering is allowed.

The change touches a lot of code, because we want to use
"omittable" to implement "movable", and it's not ok to
reorder access of mutable variables (in case some other thread is
mutating them). We have to fix all the calls to "omittable"
to support the slight generalization.
2014-06-20 08:08:17 +01:00
Matthew Flatt
da979b6c8d optimizer: fix with-continuation-mark optimization
Misuse of the function to optimize applications constrained the
body of a `with-continuation-mark` form to a single result
value.
2014-06-20 06:41:39 +01:00
Matthew Flatt
9c05eff875 make installers: give MSVC setup "x86_amd64" instead of "x64" by default
The "x86_amd64" mode seems to work more often, especially with
Visual Studio Express installations.
2014-06-19 15:09:26 +01:00
Matthew Flatt
92f76764c7 optimizer: recognize that arguments to void are ignored 2014-06-19 15:09:26 +01:00
Matthew Flatt
780a825d34 optimizer: boolean conversion on app of predicate-matching primitives 2014-06-19 15:09:26 +01:00
Gustavo Massaccesi
50ef3a8295 optimizer: optimizes the argument of not in a Boolean context
This enables more reductions, for example: (not (if x y 2)) => (not (if x y #t))
2014-06-19 15:09:26 +01:00
Matthew Flatt
23f6d1a651 optimizer: reorganize & generalize dropping of ignored operations
The optimizer was willing to convert `(pair? (cons w (random)))` to
`(begin (random) #t)`, but not `(car (cons w (random)))` to
`(begin (random) w)` because the `(car (cons ....))` transformation
required simple ignored arguments. Put the treatment of ignored,
non-omittable arguments of a dropped operation in one place. Also,
recognize expressions within `begin` whose results will be ignored.
2014-06-19 15:09:26 +01:00
Matthew Flatt
9fed5b585a windows: fix symbolic link handling to match the OS
Windows parses relative-path links with yet another set of rules ---
slightly different from the many other existing rules for parsing
paths. Unfortunately, a few OS calls don't provide an option for
having the OS follow links, so we have to re-implement (our best guess
at) the OS's parsing of links.
2014-06-19 05:28:16 +01:00
Matthew Flatt
e1c735f66f win64: fix fixnum-to-extfl conversion 2014-06-19 05:28:16 +01:00
Matthew Flatt
3e3cb71680 win32: support symbolic links
Windows supports symbolic links in Vista and later.
2014-06-19 05:28:16 +01:00
Matthew Flatt
c8c0972fec ignore .sl.cache files
Created by `msbuild`?
2014-06-19 05:28:15 +01:00
Matthew Flatt
2193d2ad87 optimizer: add missing "else"
Thanks to David Vanderson
2014-06-19 05:28:15 +01:00
Matthew Flatt
6a1ace3522 optimizer: unwrap let and begin around constant test in if
Takes advantage of Gustavo's improvements
2014-06-17 12:41:23 +01:00
Gustavo Massaccesi
2063511bfd optimizer: local known to satisfy predicate => #t in a boolean context
For example, `(if (pair? x) (if x e1 e2) e3)` => `(if (pair? x) e1 e3)`.
2014-06-17 12:41:23 +01:00
Gustavo Massaccesi
7cb37d1bc8 optimizer: reduce constants to #t/#f in boolean contexts
While something like `(if 7 e1 e2)` was already reduced to `e1`,
this improvement makes `(if (let ([x (random)]) 7) e1 e2)`
reduce to `(if (let ([x (random)]) #t) e1 e2)`.
2014-06-17 12:41:23 +01:00
Matthew Flatt
36aaf3dd7b bitwise-bit-field: repair fixnum overflow problems
Bug reported by Roman Klochkov
2014-06-17 07:17:16 +01:00
Matthew Flatt
6778604bd2 Makefile: improve DESTDIR support 2014-06-16 11:41:00 +01:00
Matthew Flatt
4f96f6fe62 Windows: long double fix for MSVC 2013 2014-06-16 10:25:34 +01:00
Matthew Flatt
cee00a1c6e Windows build: use msbuild instead of devenv or vsexpress 2014-06-16 10:25:34 +01:00
Matthew Flatt
5e3ddea2ae syntax-local-lift-...: fix for use during module visit
Closes PR 14573
2014-06-15 09:24:11 +01:00
Robby Findler
151e4cfac4 add missing guard 2014-06-14 06:04:43 -05:00
Robby Findler
fd3aaf6f20 fix struct/dc's flatness test so that contracts with lazy fields aren't flat
closes PR 14558
2014-06-14 04:03:15 -05:00
Matthew Flatt
49691c4000 fix glib build for Windows 64
The previous build attempted to cooperate with Valgrind in a way that
truncates a 64-bit address to a 32-bit address. Disable Valgrind
cooperation. (Other builds seem ok for now, but future rebuilds will
disable Valgrind cooperation for them, too.)
2014-06-13 16:32:51 +01:00
Matthew Flatt
dda2520a12 fix --enable-sgcdebug build 2014-06-13 16:32:51 +01:00
Matthew Flatt
aa487175ad change default MSVC projects to Visual Studio 2010 (version 10) and up
Visual Studio 2008 is still supported by "9.sln" projects and
".vcproj" files, while ".sln" and ".vcxproj" work for 2010, 2012,
and 2013. The "build.bat" script detects which version of
Visual Studio is active and uses the appropriate ".sln" files.

The bad news is that we have two copies of each project until we
decide to drop support for Visual Studio 2008. (We had two copies
before, but one copy was unmaintained.) The good news is that
we have only 2 copies of each project, because recent versions of
Visual Studio are willing to use 2010 projects as-is.

Change project and related files to text instead of always CRLF,
because that seems to be ok for modern Windows tools.
2014-06-13 16:32:51 +01:00
Matthew Flatt
b7610c405d distro-build: move a file out that is accessed directly
The "pack-all.rkt" file is needed before (and only before) the
distro-build package itself is ready, so move it to the "racket/src"
directory.
2014-06-13 16:32:51 +01:00
Robby Findler
0a0c62a1e6 add has-blame? and value-blame 2014-06-13 08:28:40 -05:00
Robby Findler
17451d9662 Revert "change recursive-contract to reject cyclic values"
This reverts commit d664ee1430.

This commit broke recursive-contract because it disallowed any sharing,
not just cycles. And fixing this in the obvious way leads to about a 20x
slowdown (compared to v6.0's recursive-contract) on the micro-benchmark
mentioned in the original change to recursive contract.

So, for now, just go back to accepting cycles.
2014-06-13 03:02:19 -05:00
Robby Findler
d664ee1430 change recursive-contract to reject cyclic values
For a few reasons:

 - this seems to fit better with how TR already works

 - cyclic values are something that, at least in my experience,
   abstractions are not generally equipped to handle (and,
   perhaps worse, don't seem all that useful when weighed against
   the non-termination problems that can come up)

 - there was a suspicious case in the projection where, when a
   cycle was detected the projection just returned its argument
   (the place in the diff for this commit where there is now a
   call to raise-blame-error). I couldn't get this to cause problems,
   but this might just be because I'm not smart enough

related to PR 14559
2014-06-12 23:54:52 -05:00
Ryan Culpepper
d0eff55de5 better error message for unused #:declare clause 2014-06-12 17:03:41 -04:00
Robby Findler
7728e062f4 adjust recursive-contract so that it terminates on cyclic values
closes PR 14559

This slows down tight recursive contract loops by about 10%, using
the code below as the micro-benchmark:

(require racket/contract/base)

(define c
  (recursive-contract
   (or/c #f (cons/c c c))
   #:flat))

(define n1
  (let loop ([i 500000])
    (cond
      [(zero? i) #f]
      [else (cons (loop (- i 1)) #f)])))

(define n2
  (let loop ([i 500000])
    (cond
      [(zero? i) n1]
      [else (cons (loop (- i 1)) #f)])))

(collect-garbage) (collect-garbage) (collect-garbage)

(void
 (time (contract c n1 'pos 'neg))
 (time (contract c n2 'pos 'neg)))

(cdr n1)
(cdr n2)
2014-06-12 07:55:39 -05:00
Matthew Flatt
42e0d69746 racket/runtime-path: fix problems with 'so paths
Search for versions within a library directory, instead of searching
across library directories for a version. That way, user-specific libraries
can take precedence generally.

Fix the construction of library names with versions to match `ffi-lib`.
Specifically, put the version after the suffix on platforms other than
Mac OS X.

Put the code to resolve 'so specs in one place.
2014-06-11 09:23:04 +01:00
Matthew Flatt
5b852cc4bd setup/dirs: adjust get-lib-search-dirs and use if find-dll-dir
Add `find-dll-dir` to the end, not the beginning, so that it doesn't
override the user's directory. Improve checking for whether the DLL
directory is already covered by the library directories.
2014-06-11 09:23:04 +01:00
Matthew Flatt
ce08805026 raco setup: fix dependency checking for "racket" as a dependency 2014-06-10 19:15:12 +01:00
Matthew Flatt
2ea5fa3631 pkg/lib: create and unpack ".zip" files with timestamps as UTC 2014-06-10 19:15:12 +01:00
Matthew Flatt
e5dd7183b5 file/[un]zip: add UTC and time-rounding option
A `zip` archive normally holds timestamps in local time; a new option
records/interprets a UTC time instead. (Use the option both to zip and
unzip.) Also, add an option to round the 2-second resolution of time
to the past instead of the future (to avoid files with timestamps in
the future) when zipping.
2014-06-10 19:15:12 +01:00
Matthew Flatt
3342c19210 raco pkg catalog-archive: build on raco pkg catalog-copy
... instead of `pkg-catalog-update-local`.
2014-06-10 19:15:12 +01:00
Matthew Flatt
f90bf5e43b win32: repair for VS Studio build
Thanks to Gustavo Massaccesi

Closes PR 14555
2014-06-09 06:57:22 -06:00
Matthew Flatt
006ffc8ae3 syntax/docprovide: fix direct call to module name resolver
Also, deprecate the library.
2014-06-09 08:46:44 +01:00
Matthew Flatt
8aaa3fc5b5 document and deprecate 3-argument call to default module name resolver
Calling the default module name resolver with three arguments logs an
error message. The intent is that 3-argument support will be removed,
eventually.
2014-06-09 08:46:44 +01:00
Matthew Flatt
27c9007a82 raco setup: fix for relative & multiple paths in PLTCOMPILEDROOTS
Fix the part of `raco setup` that deletes ".zo" files that
have no corresponding source.
2014-06-09 08:05:05 +01:00
Matthew Flatt
0f6cdbf9e3 raco setup: fix PLTCOMPILEDROOTS handling when checking pkg deps
Closes PR 14540
2014-06-04 19:57:57 +01:00
Matthew Flatt
8828865c79 raco pkg install: change interpretation of archive with a single directory
When an archive used as a package source has all of its content
within a single top-level directory, then treat that directory's
content as the package content, instead of treating the directory
itself as the package content.

The change makes "x.zip" created with

  zip -r x.zip x

work the same as "x" as a package source. It also makes a ".zip"
for a package's GitHub repository (from clicking the "Download ZIP"
button) work the same as the repository.

This change is backward incompatible, but it's unlikely to break
any working package (since that would be a single-collection package
that provides only a subcollection).
2014-06-04 16:49:18 +01:00
Matthew Flatt
0ed142b78f raco pkg install: fix tmp-directory clean-up
Fix when installing from a non-directory in `--source` or
`--binary` mode, and fix clean up of a GitHub-generated archive
when using a path within the archive.
2014-06-04 16:49:18 +01:00
Matthew Flatt
374742e905 zip: add #:path-prefix argument 2014-06-04 13:16:58 +01:00
Matthew Flatt
8792c52e1d raco pkg create: adjust rules for for {binary,source}-keep-files
Allow `{binary,source}-keep-files` to override omission of an
enclosing directory. Also, adjust the default for binary mode to
keep "doc" and "info.rkt" within "scribblings" and not "tests".

With this change, starting with Minimal Racket and installing DrRacket
in binary mode gets you a working DrRacket with documentation. A
binary install is less than half the space of a non-binary install,
in part because the binary installation has fewer dependencies.
2014-06-04 10:14:48 +01:00
Matthew Flatt
15214b9983 raco setup: clean up "library" installs that are directories 2014-06-04 10:14:45 +01:00
Matthew Flatt
4b5c907440 raco pkg: fix binary stripping of submodules 2014-06-04 09:35:51 +01:00
Matthew Flatt
25cc7c7125 raco setup: detect binary-only setup/scribble 2014-06-04 08:29:55 +01:00
Jay McCarthy
d909a9590d Adding things to unstable/error that are painful to remember and used everywhere 2014-06-02 18:31:31 -06:00
Matthew Flatt
b055db088c racket/base: fix module-compiled-submodules name handling
Mandled name handling breaks pkg binary-mode submodule stripping.
2014-06-02 21:34:42 +01:00
Matthew Flatt
f02d9268ec adjust some collection-file-path calls to work with binary packages
In a few cases, sources should be preserved in binary mode.
2014-06-02 20:13:00 +01:00
Matthew Flatt
fc74fa36ef change collection-file-path to check for compiled by default for ".rkt" 2014-06-02 20:12:41 +01:00
Matthew Flatt
8638a55b67 optimizer report use-before-definition check at debug level
It's too common and noisy as a warning.
2014-06-02 19:59:30 +01:00
Matthew Flatt
e17acf5fef Win64: fix JIT floating-point constant
Repairs commit 71591a62a4 for Win64, where `long` != `intptr_t`
2014-06-02 18:26:50 +01:00
Matthew Flatt
a539f4ed25 fix typo in Windows "build.bat" 2014-06-02 17:27:09 +01:00
Matthew Flatt
c1c12b05f5 raco pkg: fix conflict checking for PLTCOMPILEDROOTS
The fix is for a corner case that is unlikely to show up,
but the repaired code is simpler.
2014-06-02 16:46:45 +01:00
Matthew Flatt
5ea04493a2 raco setup: fix dependency checking and PLTCOMPILEDROOTS
Closes PR 14537
2014-06-02 15:45:22 +01:00
Matthew Flatt
2360a9f69a pkg/lib: more fixes to handling of relative package sources in catalogs
Relative paths in a catalog should be treated as relative URLs, not
relative paths.
2014-06-02 15:03:16 +01:00
Matthew Flatt
e27c51698b net/url: add relative-path->relative-url-string 2014-06-02 14:34:22 +01:00
Matthew Flatt
43d81b06da fix collection-file-path & related for binary package installation
Binary package installation failed in the case of collection
splicing, because module-name resolution via `collection-file-path`
did not check for compiled files along hte search path of
registered collection directories.
2014-06-02 11:57:08 +01:00
Matthew Flatt
e0a82393b7 raco pkg: fix treatmennt of "file://" package sources
A "file://" prefix on a package source needs to be consistently
removed. The new `package-source->path` function does that, so it
should be used to convert a package source to a filesystem path.
2014-06-02 11:57:07 +01:00
Matthew Flatt
ae2b0b93a1 raco pkg catalog-archive: fix handling of source with no checksum 2014-06-02 11:57:07 +01:00
Matthew Flatt
a718aeb441 raco pkg catalog-show: improve error for bad catalog 2014-06-02 11:57:07 +01:00
Matthias Felleisen
89dea63995 removed _contract_ language from _invariant-..._ as much as possible
added a hint as to why the error message uses the inappropriate contract language
2014-05-31 15:45:57 -04:00
Matthew Flatt
9d94ef725e update bytecode compiler/optimizer overview in source comments
Explain the recently added "letrec_check" pass.
2014-05-31 20:26:16 +01:00
Matthew Flatt
1558e1243a JIT: improve transition from 32-bit to 64-bit jumps
Use a recursive call to try again, instead of trying to reset local
state. The reset-local-state variant is definitely broken in
some caes, though I could not provoke the JIT buffer overflow
that I was hoping to fix with this change.
2014-05-31 20:26:16 +01:00
Robby Findler
ddb7477494 added invariant-contract
Jay implemented this
2014-05-30 21:03:11 -05:00
Matthew Flatt
2eef2ce409 optimizer: fix inference bug
The optimizer's inference that could incorrectly that that a
conditional produced a flonum (when it actually produced a fixnum or a
fixnum in one branch and flonum in the other).
2014-05-30 18:50:26 +01:00
Matthew Flatt
948a709b47 clarify comment in JIT implementation
Refines commmit c0ec9702e8.
2014-05-30 12:51:53 +01:00
Matthew Flatt
d1be74fc3b compiler letrec_check pass: recognize effect-free primitives
As in "Fixing Letrec". This improvement corrects a performance
regression with the revised expansion of R5RS `letrec`, which
wraps right-hand sides with `values`.

Besides detecting effect-free primitives, we have to fix the
treatment of the right-hand side for a multi-binding `letrec-values`
clause. For now, we conflate all of the bindings in a single
clause.
2014-05-30 12:51:21 +01:00
Matthew Flatt
71591a62a4 JIT: better code for floating-point constants on x86+SSE 2014-05-30 08:18:25 +01:00
Matthew Flatt
9b1a2e7b37 JIT: minor comparison repairs
Fix some comparisions that are written as pointer comparisons
when they're actually integer comparisons. Also, remove an
unnecessarily slow variant of pointer compairson for x86_64.
2014-05-30 07:51:05 +01:00
Matthew Flatt
c0ec9702e8 JIT: fix potential problem in transition to 64-bit jumps
On x86_64, the JIT compiler initially generates code with 32-bit
jumps, but it switches to 64-bit jumps when so much code is allocated
that it gets spaced out enough. That transition could happen during a
recursive call to the JIT compiler or while one place is in the JIT
and other installs a shared code pointer, in which case a bad jump
could be generated. This problem is unlikely to happen, but it looks
possible.
2014-05-30 07:07:28 +01:00
Matthew Flatt
3392ca36f7 pkg/db: make local package database's path relative to installation name
Instead of `(version)`, use `(get-installation-name)` for the path
of the local database used by the GUI package manager.
2014-05-29 13:42:57 +01:00
Matthew Flatt
f9d6edd8ec raco pkg catalog-archive: keep module & dependency info
Also fixes another relative-path problem.
2014-05-29 13:19:47 +01:00
Matthew Flatt
cc4d00efa6 raco pkg catalog-show: improve output format
Separate packages with a blank line, and fix formatting of
a module list.
2014-05-29 12:48:24 +01:00
Matthew Flatt
ab4172fbf2 raco pkg catalog-archive: parse sources like catalog-copy 2014-05-29 11:45:42 +01:00
Matthew Flatt
11aca05fb5 pkg/lib: fix pkg-catalog-update-local version selection
Also fixes problems with using a relative target path
with `raco pkg catalog-archive`.
2014-05-29 11:15:56 +01:00
Matthew Flatt
9393592a80 optimizer: another little step toward type inference
Generalize some of the tracking and optimization of predicates
with respect to constructors and bindings.

This generalization exposed an old bug in the optimizer, which is
that information accumulated in the "then" branch of a conditional
was not reliably flushed when continuing analysis after the conditional.
2014-05-29 09:22:29 +01:00
Matthew Flatt
eac2ce0ef6 optimizer: ad hoc optimization of predicates applied to constructions
This is probably more of a job for Typed Racket, but maybe it's
useful to detect some obviously unnecessary allocations of lists, etc.

Closes PR 14532
2014-05-28 20:11:24 +01:00
Matthew Flatt
ca315e6f34 optimizer: more ad hoc car and cdr cases
Closes PR 14533
2014-05-28 19:55:42 +01:00
Matthew Flatt
dad9d001e1 optimizer: enable movement of constants that shouldn't be duplicated
Closes PR 14531
2014-05-28 19:55:41 +01:00
Matthew Flatt
81f6f32440 racket/private/class-internal: protect ids private to class implementation 2014-05-28 13:10:29 +01:00
Matthew Flatt
8ad889e2c4 racket/class: shave a little time from send 2014-05-28 13:10:29 +01:00
Matthew Flatt
ec96592702 optimizer: treat known procedure bindings, etc., as #t for if
Closes PR 14526
2014-05-27 09:27:15 +01:00
Matthew Flatt
dfcadcfacf compiler/compilation-path: added
Provides functions for finding the bytecode path for a source file,
which might depend on PLTCOMPILEDROOTS, etc.
2014-05-27 09:27:15 +01:00
Jay Kominek
57753a7b6c define and use TLSEXT_NAMETYPE_host_name 2014-05-26 16:49:46 -04:00
Jay Kominek
52159fea13 add SSL Server Name Indication support 2014-05-26 16:49:45 -04:00
Robby Findler
5631732e9d improve ->i syntax error message when dependencies are cyclic 2014-05-26 14:53:31 -05:00
Matthew Flatt
9e3b984463 raco make: improve parallelism
The `require` macro now logs "prefetch" messages when it sees a `require`
with multiple module paths. The prefix information is approximate, since
parsing a `require` subform might depend on imports from a previous subform,
but in the common case, there are many obvious module paths to prefetch.

The parallel mode of `raco make` watches for prefetch messages and
records the suggested "prefetch" paths so they can be compiled by other
processes.
2014-05-26 18:56:50 +01:00
Matthew Flatt
e29418f204 compiler/cm: fix propagation of log messages 2014-05-26 18:56:50 +01:00
Matthew Flatt
e16b6fd06e logger: fix problems with level checking, add option to log-message
Logged messages could get dropped if a log receiver is specialized
to a name that is provided as an argument to `log-message` instead
of used from the target logger.

Add an option to `log-message` to avoid adding the name to the
start of the message string, which is needed to propagate messages
from one logger to another.
2014-05-26 18:56:50 +01:00
Matthew Flatt
7137c8d6a6 racket/unit: fix signature handling of define-values/invoke-unit/infer
Closes PR 14453
2014-05-26 08:43:34 +01:00
Matthew Flatt
0e9f468d3f repair JIT bug
The bug incorrectly tracks the value that is available in virtual
register R0 --- only in the case that some value was known to be ready
in R0, and some other value was known to be ready in R1, and a value
is moved from R1 to R0.

Closes PR 14523
2014-05-25 21:45:20 +01:00
Matthew Flatt
bcafba989f racket/unit: repairs related to signature extension
Fix signature extension so that the scope of identifiers in the
extended signature behaves the same as `open`.

Also, fix `struct` (or generally `define-values-for-export`)
in its interaction with `open` and `unit-from-context` (two
different bugs).
2014-05-23 18:58:42 +01:00
Robby Findler
81cd1e3404 vectorof contract: add some tests and make flat variant subscribe to the val-first protocol 2014-05-23 10:16:03 -05:00
Robby Findler
37a4a9ada6 adjust box/c to use the val-first-projection protocol 2014-05-21 23:42:49 -05:00
Robby Findler
1f1d1a38aa minor cleanups to contract-random-generate's API 2014-05-21 12:10:45 -05:00
Matthew Flatt
dfeba12997 MzCOM: avoid the ATL framework
Building MzCOM without ATL means that Visual Studio Express --- or
other free compilers, in principle --- can build MzCOM. It also cleans
up and simplifies the build.

The non-ATL implementation is based on "Com in Plain C" by
Jeff Glatt, and uses a lot of his code (with instructive
comments intact).
2014-05-21 08:58:33 +01:00
Matthew Flatt
165bae6c2c repair and streamline VS 2008 projects 2014-05-21 08:51:37 +01:00
Matthew Flatt
a57e712ba3 add scheme_jit_now() 2014-05-20 09:01:40 +01:00
Matthew Flatt
9b78847be0 add unix-style makefile target
Also, revise "INSTALL.txt" to better explain the build options.
2014-05-20 09:01:40 +01:00
Robby Findler
61dbf1a34f make struct/dc cooperate better with check syntax so that the struct name gets an arrow 2014-05-19 13:35:26 -05:00
Robby Findler
419f3fdee1 use the name in the exists contract in its error message 2014-05-17 22:22:31 -05:00
Robby Findler
01fb28fa87 fix cons/c for combinators that insist on projections for subcontracts
(instead of working with val-first projections)
2014-05-17 16:06:14 -05:00
Matthew Flatt
a0485cb58c fix build for module name resolver cache change
The xform bootstrap sets `current-library-collections-path` without
changing the namespace, which is a bad idea that was exposed by
the module name resolved cache change (commit a7ad0e3a01).
2014-05-17 21:25:05 +01:00
Matthew Flatt
02bc905c02 repair for identifier handling
Repairs commit d67082ea60.
2014-05-17 19:56:25 +01:00
Matthew Flatt
35c996d041 add scheme_jit_find_code_end 2014-05-17 07:20:04 +01:00
Matthew Flatt
d67082ea60 adjust handling of identifiers without module context by set!
... and `#%variable-reference`, adding a special case for an identifier
that is bound in the encloding module.
2014-05-17 07:20:04 +01:00
Robby Findler
39195bd04f add generator for (and/c real? (not/c negative?)) and (and/c rational? (not/c negative?))
and fix -> generator for mandatory keyword arguments
2014-05-16 22:43:57 -05:00
Robby Findler
3f5ca73338 added a real? generator 2014-05-16 22:43:56 -05:00
Robby Findler
541582cbc6 improve ->i's printing so it saves some of the source text of the dependent contracts 2014-05-16 17:13:16 -05:00
Robby Findler
0e90d6449f improve contract-exercise so that it can take multiple arguments
(and can use one to generate values that might break another)
2014-05-15 22:32:48 -05:00
Robby Findler
ae298ae353 make contract-stronger? recognize that predicates are stronger than
values that they accept (for certain, well-known predicates, anyway)
2014-05-15 22:30:21 -05:00
Robby Findler
cd4dde5865 add an implementation of stronger to cons/c 2014-05-15 22:30:19 -05:00
Robby Findler
e1bd6bab6a improve new or/c's stronger predicate 2014-05-15 22:30:17 -05:00
Asumu Takikawa
7bc88336f5 Add Dr. Chang to acks. 2014-05-14 22:11:39 -04:00
Ryan Culpepper
95d1bacf15 template: pre-allocate local env vectors for nested ellipses 2014-05-14 15:51:37 -04:00
Ryan Culpepper
217dc89f5c template: fix checking of ellipsis-driving variables
closes PR 14497
2014-05-14 15:51:37 -04:00
Matthew Flatt
a7ad0e3a01 default module name resolver: fix cache
The cache was keyed on `current-library-collection-paths`, but
not other parameters such as `current-library-collection-links`,
so it was too "sticky" in the case that some parameters changed.
Adjust the cache to be specific to loaded module in a namespace's
module registry.
2014-05-14 06:10:50 -06:00
Robby Findler
5ed9b65ae5 add a random generator for struct/c
This is actually done by adding a generator for struct/dc in the case
that there are no dependencies, so it'll also work for such contracts.
2014-05-13 22:49:02 -05:00
Robby Findler
c64d70abc6 contract improvements
- add a generator for cons/c
- make flat-rec-contract not just build the predicate, meaning:
  - it has a better name
  - it can do random generation
- make the procedures that come from any/c random generation indicate that from their names
- make or/c with one argument just (check and) return that argument, so
  (or/c (or/c number?)) has the name 'number?'
2014-05-13 22:49:02 -05:00
Robby Findler
cfd1f46fa2 fix bug in flat struct/dc predicate implementation 2014-05-13 22:49:01 -05:00
Matthew Flatt
d96bfb6e29 setup/dirs et al.: thread-safe promises
Use `delay/sync` instead of `delay`.
2014-05-13 16:27:11 -06:00
Robby Findler
8b0e23d15a fix struct/dc's flat-contract mode predicate 2014-05-12 10:05:54 -05:00
Robby Findler
a1fd690201 add random generation for polymorphic contracts 2014-05-12 09:49:15 -05:00
Robby Findler
318130b716 fix positive integer generator to not generate zero 2014-05-12 09:49:15 -05:00
Matthew Flatt
be04593a31 fix bug in insertion of guards to prevent use before definition 2014-05-12 08:09:23 -06:00
Matthew Flatt
1d87c95bf0 reduce calls to current-process-milliseconds on thread swap
Call `current-process-milliseconds` once per swap, instead of twice.
2014-05-12 04:57:44 -06:00
Matthew Flatt
98b91a11e4 faster path for TCP input
Avoid polling a file descriptor to determine whether it has bytes;
just try to read, and then go to epoll/kevent mode when available,
skipping a poll/select.
2014-05-12 04:57:44 -06:00
Matthew Flatt
97da48ab67 remove/adjust obsolete C preprocessor cases
Mac OS Classic and Palm ae long since unsupported.

TCP support implies sockets (since old Mac TCP is gone).

For what it's worth, make the build work without TCP support, although
no one ever builds that way.
2014-05-12 04:57:44 -06:00
Robby Findler
6df33ab08c make new-∀/c and new-∃/c figure our their own names and have a better printing 2014-05-11 22:30:14 -05:00
Matthew Flatt
b15aea28c2 fix accidental disabling of thread-specific process-milliseconds 2014-05-10 19:29:54 -06:00
Robby Findler
9d87fe5079 cleanups to old, broken test suite and some bug fixes it uncovered
also, fix any/c generator
2014-05-10 10:01:29 -05:00
Matthew Flatt
7987740d18 file/gzip: compensate for too-far lookahead 2014-05-09 15:47:01 -06:00
Jay McCarthy
723fae213c changing valid char to XML 1.1 rather than 1.0 and reverting changes from recent PR 2014-05-09 10:39:35 -06:00
Jay McCarthy
fc8075245a protect against errors in chunking or gunziping... without this there can be hangs 2014-05-09 10:39:34 -06:00
Matthew Flatt
d5b42f8c50 add plumbers, remove custodian-tidy-all
In v6.0.1.7, I tried to give a port-flushing job to custodians. They
turned out to be unqualified, so let's try employing specialists.

Thanks to Eli for pointing out the problem with the v6.0.1.7 design:
attaching callbacks to custodians allows a sandboxed task to escape
through the custodian hierarchy. Plumbers avoid this problem by
having no hierarchy.
2014-05-09 07:06:27 -06:00
Matthew Flatt
fdf06e461a add raco pkg catalog-archive
The `catalog-archive` command not only copies a catalog, but also copies
all package sources referenced by the catalog to create a snapshot that
doesn't depend on any external pieces.

One reason you might want to do that is to download all packages on a
machine with general network access, and then building packages on a
(virtual) machine whose network access is limited.

This commit also adds support for relative package sources in the
catalog protocol, where a client converts a relative package source to
an absolute one.  Since the relative-to-absolute conversion happens on
clients, relative sources will be of limited use until v6.0 and v6.0.1
become deprecated.

A new `current-pkg-lookup-version` parameter corrects the misuse of
`current-pkg-scope-version` for package-catalog queries.
2014-05-08 11:03:31 -06:00
Robby Findler
ce3f891209 improve any/c's random generation
by using the environment sometimes and making up (simple) functions
sometimes
2014-05-07 21:29:32 -05:00
Robby Findler
05def2ddf5 unbreak or/c opter
(the missing require meant that the wrong "or/c" was being registered in the table)
2014-05-07 21:29:32 -05:00
Robby Findler
d812d171f9 add generator for any/c and improve generator for or/c
also improve test cases a little bit and minor Rackety
2014-05-07 19:25:22 -05:00
Robby Findler
7ec9cb0274 fix generator for or/c 2014-05-07 19:25:22 -05:00
Jay McCarthy
7740733c05 Fixing PR14478 2014-05-07 15:42:52 -06:00
Matthew Flatt
903e82731e fix vector-map! to not mutate immutable vectors 2014-05-07 07:41:13 -06:00
Matthew Flatt
c33707329c racket/port: add a flushing tidy callback for reencode-output-port
This change solves a long-standing problem that reencoded output
was not flushed on exit, especially in the case that the
current output port is reencoded.
2014-05-07 07:41:13 -06:00
Matthew Flatt
1bd604073a add custodian-tidy-all 2014-05-07 07:41:13 -06:00
Robby Findler
0f16f31db9 clean up and export support for exercising values with contracts 2014-05-06 21:29:19 -05:00
Robby Findler
9a6970043a fix contract-random-generate so it picks the generation method
randomly during generation, not randomly up-front, before
generation
2014-05-06 21:29:18 -05:00
Robby Findler
4de1583c68 make or/c and contract-stronger? collaborate
in order to make contract-stronger? work better when given the result of or/c
2014-05-06 16:33:20 -05:00
Matthew Flatt
5e8e2771b5 raco setup: fix default package version
The default is "0.0", not "1.0".
2014-05-05 10:37:09 -06:00
Robby Findler
1f212a2fe4 fix struct/dc chaperone/flat/impersonator-ness when #:inv is used 2014-05-05 11:27:52 -05:00
Robby Findler
90053d7d40 fix random generation environment usage
closes PR 14484
2014-05-04 14:34:55 -05:00
Matthew Flatt
2e284cc783 enable DWARF-based stack unwind for x86
Newer versions of gcc seem to use -fno-frame-pointer by
default for x86, which disables Racket's stack traces.
Use DWARF information to get them back.
2014-05-04 11:47:31 -06:00
Matthew Flatt
51614ab0b2 raco pkg config: add doc-open-url key 2014-05-04 09:32:00 -06:00
Matthew Flatt
33ad485081 setup/unixstyle-install: preserve all other config entries
Preserve any configuration entry that is not explicitly set,
as opposed to keeping only entries that are known to the
script.
2014-05-04 09:32:00 -06:00
Matthew Flatt
a8105dc0e3 config: add doc-open-url configuration
This configuration option is a better way to redirect documentation
access (at a place like NEU) than patching "search.rkt".
2014-05-04 09:31:59 -06:00
Robby Findler
974ee9df75 fix contract-stronger for struct/dc with #:inv clauses 2014-05-03 22:22:10 -05:00
Matthew Flatt
9cd528ca08 racket/base: add #:for-module? argument to open-input-file
Exposes a feature that is used by the default load handler to
raise `exn:fail:{syntax,filesystem}:missing-module` exceptions.
2014-05-03 20:05:59 -06:00
Matthew Flatt
cb322e939a pkg/lib: add #:catalogs & #:set-catalogs? args to pkg-catalog-update-local
These additions allow the GUI package manager to use `pkg-catalog-upload-local`
instead of having a its own copy of the same opertation. Not surprisingly,
with two copies of the code, the `pkg/lib` copy was missing support for tags.
2014-05-03 17:39:06 -06:00
Robby Findler
e51ba9b565 add invariant clauses to struct/dc (keyword #:inv) 2014-05-03 10:31:09 -05:00
Matthew Flatt
18531772e3 setup/getinfo: shortcut for simple modules
When an "info.rkt" module is simple enough, build a hash table
directly instead of compiling and loading the module.
2014-05-02 12:30:31 -06:00
Matthew Flatt
573c127002 make pkg-links: shortcut for no-change case
Taking a shortcut skips dependency and module-declaration checks, but
that job is now covered by `raco setup`.
2014-05-02 12:30:31 -06:00
Matthew Flatt
b25e9fd0d4 raco setup: check package version deps and multiple module declarations
The package dependency checking process was already gathering all the
reelvant information, or nearly all of it, so it's relatively cheap to
add the checks.
2014-05-02 12:30:31 -06:00
Matthew Flatt
33547d554a pkg/lib: add #:versions? argument to extract-pkg-dependencies 2014-05-02 12:30:31 -06:00
Matthew Flatt
68421f05dd places: improve comments on msg_chain treatment 2014-05-01 19:13:55 -06:00
Matthew Flatt
6d4c25a322 places: fix gc of place channels containing place channels
The bug was a kind of typo: using `&` where `%` was intended to
implement a counter wraparound.

This bug is an even more likely candidate to be resopnsible for the
occassional crashes from the DrRacket easter-egg test.
2014-05-01 19:13:55 -06:00
Vincent St-Amour
fc512ba78d Instrument pattern matching for feature-specific profiling. 2014-05-01 11:54:09 -04:00
Vincent St-Amour
584e494d5a Instrument send dispatch for feature-specific profiling. 2014-05-01 11:54:09 -04:00
Vincent St-Amour
b474ba765e Add instrumentation to profile generic sequence overhead. 2014-05-01 11:54:08 -04:00
Vincent St-Amour
9d7b6a1c89 Instrument the opt/kw protocol for feature-specific profiling.
That code is only executed for higher-order uses of these functions,
otherwise protocol gets optimized away.
2014-05-01 11:54:08 -04:00
Matthew Flatt
61d717fd07 file/unzip: change to call-with-unzip and call-with-unzip-entry
Use `call-with-` instead of `with-`, since it's a function instead
of a syntactic form. (This is a weak convention, but one to try to
follow with new functions and forms.)

Fix up the contracts and change the documentation to match the
usual style.

Create the temporary directory in `(find-system-path 'temp-dir)`
instead of the current directory.
2014-05-01 06:18:24 -06:00
simmone
f592cf6e35 file/unzip: add help func with-unzip with-unzip-entry 2014-05-01 06:18:24 -06:00
Robby Findler
a628bf4040 Rackety
bring down below 102 columns
2014-04-30 21:58:14 -05:00
Matthew Flatt
5c909cca0d raco dist: preserve relative location of runtime files only within a package
Previously, relative locations were preserved for all files with the same
root, but that tends to keep too much information about the original
filesystem layout, especially when runtime files are pulled both from
the installation and a user-specific area. Since packages can be installed
at different relative locations, it makes sense to preserve relative
locations only up to package boundaries.
2014-04-30 14:59:16 -06:00
Matthew Flatt
0c9685d136 raco exe: normalize runtime-file paths
Normalization is needed to ensure that `raco dist` doesn't generate
longer paths (by converting a "/" to "\\", for example) in its
path manipulations.
2014-04-30 14:23:46 -06:00
Matthew Flatt
04a60d713b fix sync on inaccessible place channel
Commit 5ea4c2ab68 broke GCing of a thread that is blocked
via `sync` (as opposed to `place-channel-get`) on a place
channel whose write end is inaccessible.
2014-04-29 12:56:19 -06:00
Matthew Flatt
f2335ae4dc fix performance bug in equal? on vectors 2014-04-29 06:58:36 -06:00
Matthew Flatt
07e390302c raco exe: attempt to fix problem with room made for runtime-paths table 2014-04-29 06:18:55 -06:00
Matthew Flatt
dee331e3b1 raco setup: fix info-domain cleanup of unlinked planet packages 2014-04-28 19:03:39 -06:00
Matthew Flatt
afb75c7cfe linux: close "/proc/self/maps" after finding the stack base 2014-04-28 17:50:50 -06:00
Matthew Flatt
acf250891f fix wrong size for memset
Probably the assignments cover the structure, anyway.
2014-04-28 17:42:17 -06:00
Matthew Flatt
2ff4802a14 configure: for BSDs, enable pthreads by default, but don't force enabled 2014-04-28 13:07:26 -06:00
Matthew Flatt
bc871b904e need CAS only for futures or places 2014-04-28 13:07:26 -06:00
Robby Findler
d4c60e8608 generalize the random contract generation so that it can exercise
a function to get more interesting values and then use those values
to guarantee it can generate things it couldn't before

For example, it can now generate a function with this contract:

  (-> (-> is-eleven?) is-eleven?)

without knowing what the is-eleven? predicate does -- instead it can
figure out to call the argument thunk and then pipe that result around
2014-04-28 12:22:01 -05:00
Matthew Flatt
04c4538f44 speed up inexact->exact
Parse IEEE floating-point numbers directly.

Thanks to Neil T.!
2014-04-27 16:51:23 -06:00
Matthew Flatt
d682c940bd repairs to precision of exact->inexact et al.
Thanks to Neil T.!
2014-04-27 16:51:23 -06:00
Matthew Flatt
da600ad291 file/zip: recognize string ports as seekable 2014-04-27 10:25:06 -06:00
Matthew Flatt
64bfb58dad racket/base: add string-port? 2014-04-27 10:25:06 -06:00
Matthew Flatt
83dcf446a3 fix clean-up handling for the main thread of a terminated place
This bug might be reposnible for the occassional crashes seen in
DrDr for the easter-egg test.

Merge to v6.0.1
2014-04-27 09:15:18 -06:00
Matthew Flatt
5232b099a2 revise error printed for kernel-/debugger-sent SIGSEGVs 2014-04-27 09:15:17 -06:00
Robby Findler
9e9b291d4a improve or/c random generation and get rid of old, not-working
generation for the old-style -> contracts
2014-04-27 07:34:44 -05:00
Robby Findler
76c6a1b7b0 improve random contract generation
notably enable the generator to actually use things from the
environment but currently only when they are directly in the
environment so, eg:

   (-> (-> is-eleven?) is-eleven?)

can't be generated (since the contract system doesn't know
about is-eleven? and also doesn't yet know that it can call
the argument thunk)
2014-04-27 07:10:50 -05:00
Matthew Flatt
cdd6bf438a no getprotobyname on Android 2014-04-26 20:10:52 -06:00
Matthew Flatt
ffb0dd52c5 ARM JIT: fix software floating-point
I broke uses of LDRD and STRD when compacting the set of registers
used by the JIT. The LDRD and STRD instructions are given one
register explicitly, but they implicitly use the next regsister, too,
and the specified register must be even-numbered. Lining up a pair of
registers requires a little shuffling before and after the operation.

Also, the LDRDI and STRD encodings were broken, and the inlined
fl->fx conversion was not right.

Closes PR 14470
2014-04-26 20:10:51 -06:00
Matthew Flatt
b88f391c1c configure: add --enable-sysroot
The `--enable-sysroot` flag simplifies an Android cross-compilation,
for example.
2014-04-26 20:10:51 -06:00
Jay Kominek
70802ce217 Avoid feeding inexact numbers to random while generating contract-satisfying values.
Also fix a minor doc error.
2014-04-24 22:55:15 -06:00
Matthew Flatt
4d2b24b325 clean-ups to commit 4fde0e9901 2014-04-24 10:21:52 -06:00
Neil Toronto
85deab7cb8 Added ExtFlonum (and subtypes) and ExtFlVector to the base type environment 2014-04-22 10:45:40 -06:00
Matthew Flatt
4fde0e9901 avoid write-barrier memory protection for 'atomic-interior allocation
Split 'atomic-interior allocation to separate pages from other 'interior
allocation, and do not page-protect 'atomic-interior memory. Otherwise,
atomic-interior memory passed from one place to another --- especially
via the `#:in-original-place?` option on foreign functions --- can crash
due to triggering a write barrier in the wrong place.

Commit c18f6e8d6d, which changed some cross-place arguments to Pango and
Cairo to be 'atomic-interior, exposed the problem.

Merge to v6.0.1
2014-04-22 09:36:37 -06:00
Matthew Flatt
6856e5253f fix incorrect sharing of submodule-declaration tables
Cuts the peak memory use of

 racket -c -l match

from 1.2 GB to 400 MB on a 64-bit machine.
2014-04-21 15:41:59 -06:00
Matthew Flatt
7f8f8c0b59 dump-memory-stats: add mode to return a tag count 2014-04-21 15:41:59 -06:00
Matthew Flatt
0985bcda66 minor allocation speedup for immutable hash tables 2014-04-21 15:41:58 -06:00
Matthew Flatt
d7ad3955a5 in-directory: keep subdirectory content in order
The content produced by `directory-list` was reversed by an
accumulator loop.
2014-04-21 15:41:58 -06:00
Matthew Flatt
4e3ff69798 fix taint-transparent syntax to lose lexical context
When submodules were introduced, the handling of taint-transparent
syntax changed to keep its lexical context. Restore the original
behavior, which is necessary to protect bindings, and fix taint
handling on submodules.
2014-04-20 20:20:33 -06:00
Matthew Flatt
7bccae1ce0 fix type mismatch in JIT 2014-04-19 15:21:26 -06:00
Matthew Flatt
3fa9f99e2c racket/unsafe/undefined: add chaperone-struct-unsafe-undefined 2014-04-19 11:14:37 -06:00
Matthew Flatt
04f9918aa9 racket/shared: get rid of `(include "shared-body.rktl")
Use a macro instead of text reuse.
2014-04-19 11:14:37 -06:00
Matthew Flatt
a01b12e5ef optimizer: don't move expressions into a with-continuation-mark
... unless the optimizer can prove that the expression doesn't
inspect continuation marks.
2014-04-19 11:14:37 -06:00
Robby Findler
1cb1ff284b some work on random generation from contracts 2014-04-17 16:51:17 -05:00
Matthew Flatt
4bf1f90c3c racket/class: fix empty define-values
Closes PR 14451
2014-04-17 10:48:16 -06:00
Matthew Flatt
46a66819cc add 'undefined-error-name property for letrec bindings 2014-04-17 06:58:01 -06:00
Matthew Flatt
13db06d5df racket/draw Cocoa: fix (again!) surroate-pair patch for Pango 2014-04-17 06:37:15 -06:00
Matthew Flatt
f36e575735 add Claire to acks 2014-04-17 06:37:15 -06:00
Matthew Flatt
22b48e03c8 make assignment-before-initialization an error
Recent changes made use-before-initialization an error for
`letrec` bindings, `class` fields, and `unit` definitions.
Now, assignment-before-initialization is also an error.
2014-04-17 06:37:15 -06:00
Matthew Flatt
52ea013f87 add static annotations on local functions 2014-04-17 06:37:14 -06:00
Claire Alvis
a6ea577869 make indentation match other files
(Actually by Matthew, but setting Claire as the author so
that it will be easier to see via `git blame` in the future
if I mangle Claire's code.)
2014-04-17 06:37:14 -06:00
Matthew Flatt
d212fc7eba racket/draw Cocoa: fix surroate-pair patch for Pango 2014-04-16 12:53:07 -06:00
Matthew Flatt
6ce5e3d34a optimizer repair related to use-before-defined
Don't optimize away a use-before-definition in an early compiler
pass. (More specifically, adjust the meaning of a flag within an
optimization helper function so that it works for decisions before the
letrec-fixing pass.)
2014-04-16 07:02:50 -06:00
Asumu Takikawa
6c400adce0 Update HISTORY file for mzlib/class100 removal 2014-04-16 00:33:37 -04:00
Matthew Flatt
2b63977f24 avoid compiler warnings 2014-04-15 20:15:05 -06:00
Matthew Flatt
df436b0c88 racket/class: add expression to optimizer log message 2014-04-15 16:24:59 -06:00
Claire Alvis
a283f3d804 removing dead code in fun.c 2014-04-15 15:06:41 -06:00
Matthew Flatt
d4cf4f4ee8 remove unnecessary "return;"s
Some compilers particularly dislike

 return function_that_returns_void();
2014-04-15 15:06:41 -06:00
Matthew Flatt
0fcde57817 fix Windows projects for new file 2014-04-15 15:06:41 -06:00
Matthew Flatt
4c947f188d reduce racket/undefined to just undefined 2014-04-15 15:06:28 -06:00
Matthew Flatt
574b8a5d3b move internal undefined to unsafe-undefined 2014-04-15 15:06:28 -06:00
Claire Alvis
fbb419a9fa removing debugging code 2014-04-15 15:06:26 -06:00
Matthew Flatt
714ac04b55 JIT-inline check-not-undefined 2014-04-15 15:06:25 -06:00
Claire Alvis
72c958df62 all necessary changes to check references to uninitialized letrec variables
includes a new pass, letrec_check, two new primitives, and
changes to packages that grabbed the letrec undefined value
2014-04-15 15:03:10 -06:00
Matthew Flatt
800641e11a racket/draw Cocoa: hack to make Courier New work in 10.{7,8}
The bounding box in the Courier New font is wrong in Mac OS X
10.7 and 10.8. Recognize that combination and make the bounding
box bigger as a workaround.
2014-04-15 14:57:49 -06:00
Matthew Flatt
16dcc6f62a fix excessive correction of bounding
Commit 69984fb231 extended glyph bounding boxes in the wrong
(pre-scaled) coordinate system.
2014-04-15 14:40:13 -06:00
Matthew Flatt
69984fb231 racket/gui Cocoa: repairs for Cairo and Pango
* Fix a clipped-rendering problem for text in Cairo.

 * Fix Pango's CoreText back-end to support non-BMP characters.

   Note that Emoji characters still do not render. Cairo uses
   CGContextShowGlyphsWithAdvances() to draw glyphs, but it
   would need to use CTFontDrawGlyphs() to make Emoji work.
   (Mozilla has a patch to do that for some older version
   of Cairo, so look there if it seems worth doing one day.)

 * Disable Pango's CoreText font fallbacks in favor of the
   Racket-implemented fallback.

   This is not obviously a good idea, but it restore the
   `racket/draw` hack of prefering "Arial Unicode MS". Otherwise,
   various symbol glyphs are chosen badly, such as #\u273A,
   at least on my machine.

 * Drop the clusters argument to `pango_cairo_show_glyph_string`,
   which turns out to be unnecessary.
2014-04-15 11:22:54 -06:00
Matthew Flatt
8bbc00c7c1 fix equal? on chaperoned values
Recursive traversal of components should use chaperoned access of
the components, not direct access.
2014-04-14 10:14:20 -06:00
Matthew Flatt
393456563e avoid overflow in poll() timeout calculation
Closes PR 14410

Merge to v6.0.1
2014-04-13 19:09:08 -06:00
Matthew Flatt
414507699b fix problem with syntax-local-lift-require
Closes PR 13797

Merge to v6.0.1
2014-04-13 19:08:56 -06:00
Matthew Flatt
4807dce556 fix equal-[secondary-]hash-code for impersonators
Merge to v5.0.1
2014-04-13 08:38:38 -06:00
Ryan Culpepper
4f6f3a35da docs and tests for DHE and ECDHE support; simplify curve name code 2014-04-12 16:40:40 -04:00
Ryan Culpepper
5c11e6211c add DHE and ECDHE support, and TLS versions 1.1 and 1.2
Thanks for Edward Lee for this patch.

The DH params file is identical to apps/dh4096.pem from openssl source.
2014-04-12 15:37:26 -04:00
Matthew Flatt
1f5d08dc29 fix a leak related to submodules
The leak caused compile-time environments to be retained until
the next module complation, so it doesn't affect much.
2014-04-12 09:35:07 -06:00
Matthew Flatt
86d5940139 clear a cached syntax object
Another potential (but minor in practice) leak
2014-04-12 09:35:07 -06:00
Matthew Flatt
9c74269877 compile: fix namespace leak related to submodules and compilation
A reference intended to be temporary from a submodule to its enclosing
module wasn't NULLed out.
2014-04-11 06:20:34 -06:00
Matthew Flatt
206466708f raco pkg: improve error for failed package-source download
Related to PR 14441
2014-04-10 05:26:43 -06:00
Matthew Flatt
145dc95b87 openssl: recognize version 1.0.1g
Merge to v6.0.1
2014-04-09 07:36:37 -06:00
Matthew Flatt
23cf3ba11e upgrade pre-built libraries for Windows and Mac OS X
Mostly upgrades the drawing stack to the latest Cairo, Pango, Glib,
etc., but also upgrades the OpenSSL library on Windows to 1.0.1g.

The new "racket/src/native-libs" directory provides scripts to
rebuild the libraries from source. Those script are fragile, because
library sources and configuration scripts are fragile. The
scripts at least archive some expertise/advice in a mostly executable
form.
2014-04-09 07:35:37 -06:00
Matthew Flatt
83a573ccd8 racket/undefined: remove undefined? and check-not-undefined
The intent is to provide a minimal bridge between the current Racket
and one where `(letrec ([x x]) x)` no longer works.

Merge to v6.0.1
2014-04-08 11:26:22 -06:00
Ryan Culpepper
152cf764a0 Post-release version for the v6.0.1 release 2014-04-08 08:47:35 -04:00
Robby Findler
a3d77986cb fix object/c & fields that just have to exist
closes PR 14437
2014-04-07 22:19:03 -05:00
Robby Findler
980e957407 Improve DrRacket .plt installation functionality so that it prints
out the file it tried to unpack when it fails
2014-04-06 17:49:22 -05:00
Matthew Flatt
40027e8b1d pkg/path: fix for when the argument = a pkgs install directory 2014-04-05 16:40:43 -06:00
Matthew Flatt
15630b5245 avoid compiler warning 2014-04-05 07:31:58 -06:00
Matthew Flatt
6d54632319 places on Windows: fix OS thread identification
The bug particularly broke `#:async-apply` handling for an FFI callback,
causing the current thread always to be equated with the target thread.
For example, the teachpack documentation (which now renders images
to SVG) kept crashing on a multi-place build due to callbacks getting
invoked in the wrong place.
2014-04-05 07:13:28 -06:00
Matthew Flatt
b065d1f868 ffi/unsafe: add #:malloc-mode to define-cstruct and _list-cstruct 2014-04-05 07:13:27 -06:00
Robby Findler
a205cb2d0c fix bug in val-first version of or/c
It didn't follow the val-first protocol properly and
ended up losing the neg party
2014-04-05 07:38:19 -05:00
Matthew Flatt
8abf78256a add racket/undefined
The `(letrec ([x x]) x)` pattern for getting the undefined value will
cease to work in a near-future version of Racket (ater
v6.0.1). Instead, the initial refernce to `x` will produce a "variable
used before its definition" error.

For libraries that need an "undefined" value, this new library
provides `undefined`, and the library will continue to work in future
Racket versions.

The library also provides a `check-no-undefined` operation that
normally should be wrapped around an expression to keep it from
producing `undefined`. For example, the class system initializes
object fields with `undefined`, but it could (and will, eventually)
wrap each access to a field within `class` to check that the field's
value is not `undefined`.
2014-04-04 10:07:08 -06:00
Matthew Flatt
1d8cfea1fc ffi/unsafe: add _stdbool 2014-04-04 09:57:42 -06:00
Matthew Flatt
120d17fccc fix makefile for MinGW cross-compile 2014-04-03 07:16:50 -06:00
Matthew Flatt
418ee07f4e module: disallow definition skipping
Invoking a non-composable, empty continuation during the right-hand
side of a variable definition skips the definition --- while continuing
the module body. The compiler assumes, however, that variable references
later in the module do not need a check that the variable is undefined.
Fix that mismatch by changing `module` to double-check that defined
variables are really defined before continuing the module body.
(The check and associated prompt are skipped in simple cases, such as
function definitions.)

A better choice is probably to move the prompt to the right-hand
side of a definition, both in a module and at the top level. That's
a much different language, though, so we should consider the point again
in some future variant of Racket.

Closes PR 14427
2014-04-01 18:15:01 -06:00
Jens Axel Søgaard
6722b7a71e Fix of PR 14413
Improved type per Ryans suggestion.
2014-03-31 16:53:32 -04:00
Sam Tobin-Hochstadt
431ba2e88b Use the form name from match*/derived to improve error messages. 2014-03-31 10:12:29 -04:00
Matthew Flatt
3e3829c2b9 ffi/unsafe/com: fix VT_BOOL representation
A VT_BOOL isn't a _bool; it's a 16-bit #xFFFF or #x0000.

Closes PR 14425
2014-03-28 15:11:08 -06:00
Matthew Flatt
709ff43174 unboxing improvement in the JIT
Improve the "can unbox test" to include patterns that were already covered
by the more restrictive "can unbox without disturbing N registers" test
(which is always tried first, but the weaker test recurs within patterns
that the stronger test does not recognize).
2014-03-27 14:30:03 -06:00
Matthew Flatt
6af65ee19a avoid compiler warnings 2014-03-26 12:46:01 -06:00
Matthew Flatt
cdce954128 configure: test for large page sizes
Intended to fix PPC64 builds.
2014-03-26 12:30:33 -06:00
Matthew Flatt
e28303033a tweak bitwise-operation optimization
Recognize arguments that are variables bound to fixnums.
2014-03-18 11:42:56 -06:00
Matthew Flatt
a86b851f74 fix compiler--validator mismatch on bitwise specializations 2014-03-18 09:16:58 -06:00
Matthew Flatt
6182541889 fix handling of code compiled to ignore
When the compiler sees `(if #f A B)`, it compiles A in a throwaway
mode, but the throwaway mode need to produce a slightly more plausible
result than it was so that further throwaway transformation is not
confused.
2014-03-16 09:18:40 -06:00
Matthew Flatt
40f3bf1810 setup/dirs: change default doc indirection to a useful URL 2014-03-16 09:18:40 -06:00
Robby Findler
4d94ef91cf allow 'contract' to use #f for the positive
name, but still disallow #f at the blame record
level

closes PR 14387
2014-03-13 14:18:26 -05:00
Matthew Flatt
8a5c50485c Another makefile CFLAGS/CPPFLAGS adjustment
Missed another spot in c97184b581.
2014-03-12 18:45:09 -06:00
Tony Garnock-Jones
139b228f2e Add TAGS target to toplevel makefile. Adjust clean target to match. 2014-03-12 18:45:09 -06:00
Matthew Flatt
389aa9fcd8 fix compiler to not move allocation across continuation capture
Note that even the movement of operations like `unsafe-fl+` is
constrained, since the operation can allocate. For example, a
continuation captured in

    (let ([a (unsafe-fl+ x y)])
      (call-with-composable-continuation ....)
      a)

should return an `eq?` result. The compiler must not only refrain from
moving the `unsafe-fl+` call, it must not mark `a` as a flonum
binding, because that would cause the JIT to delay allocation of `a`
until the return site.
2014-03-11 13:59:28 -06:00
Matthew Flatt
f340625333 fix syntax checking for #%declare 2014-03-11 08:21:03 -06:00
Matthew Flatt
99f124e82d raco pkg: preserve/adjust timestamps when extracting/creating packages
Perserve and adjust timestamps in a way that helps make re-packing an
installed-from-built package produce an archive with the same checksum
as the original.
2014-03-11 08:10:35 -06:00
Matthew Flatt
ce6b8b8d5c file/zip, file/tar: add #:get-timestamp argument
Allows the recorded timestamp to be adjusted in a general way.
2014-03-11 08:10:35 -06:00
Matthew Flatt
ff6b4efb17 file/unzip: support preserving timestamps 2014-03-11 08:10:35 -06:00
Matthew Flatt
5deac9ef2b subprocess: allocate for environment variables before fork
I'm running into stuck processes via `subprocess`, where the stuck
process is in malloc() for environment variables. I'm not really sure
of the problem, but moving that work before the fork() could
avoid problems related to pages or signal handlers.
2014-03-09 21:00:37 -06:00
Matthew Flatt
4476e36705 configure: propagate CPP, LD, CPPFLAGS, LDFLAGS for --enable-sdk build 2014-03-09 17:18:43 -06:00
Matthew Flatt
8253994434 create-embedding-executable: fix namespace and module-declaration problem 2014-03-09 08:44:53 -06:00
Matthew Flatt
9e716b0422 add openssl/md5
Like `openssl/sha1`, the `openssl/md5` library falls back to the
plain Racket `file/md5` implementation if OpenSSL is not available.
2014-03-02 20:20:52 -07:00
Matthew Flatt
7e57274a64 Revert "file/md5: faster"
This reverts commit cbc1637e56295e2769bd3a599831cff670584fd6.
2014-03-02 20:20:52 -07:00
Matthew Flatt
7e546d1a5a file/md5: faster
Use unsafe operations and forced inlining to speed up
MD5 calculation by about x2.25 on 32-bit platforms, and
use all that plus fixnums to speed up by about x7 on
64-bit platforms.

This implementation is still about a factor of 5 off
a C implementation. So, while this was a fun little
experiment, I'll revert this commit and add a binding
to the OpenSSL MD5 implementation, instead.
2014-03-02 20:20:52 -07:00
Matthew Flatt
4d3baa3b7d [unsafe-]fl{real,image}-part: fix contracts in docs and errors
Closes PR 14368
2014-02-28 15:39:49 -07:00
Matthew Flatt
e231718075 repairs for srcloc->string
Fix predicate on argument, including allowing chaperoned srclocs.

Closes PR 14376
2014-02-28 15:39:49 -07:00
Matthew Flatt
efa199184c fix bignum allocation
Space used by GMP needs to be immobile, and the allocation path
on 3m still used a strategy of allocating page-sized blocks;
the GC now provides much better support for small, immobile
blocks.
2014-02-28 11:45:09 -07:00
Robby Findler
4a71adf8b9 improve error message of object=? 2014-02-28 06:33:02 -06:00
Matthew Flatt
4491b6a687 Windows installer: fix recording of document-icon paths 2014-02-27 15:56:11 -07:00
Matthew Flatt
3e9b82bdd0 JIT: enable unboxing of flonum arguments in mutual recursion 2014-02-27 12:04:02 -07:00
Matthew Flatt
e4ce0d0331 add PLTUSERHOME
The new `PLTUSERHOME` environment variable redirects all of the
user-specific paths reported by `find-system-path`.

Also, improve the tests for `raco exe` (particularly the bug
fixed in 6cb6f3fbf1) using `PLTUSERHOME`.
2014-02-25 16:01:44 -07:00
Matthew Flatt
6cb6f3fbf1 raco exe: fix GUI executables for runnnig without a preference file
A check for a default preferences file in the configuration
directory failed, because there is no configuration directory
to check.

Closes PR 14370
2014-02-25 13:48:37 -07:00
Matthew Flatt
eff53cde87 treat FFI primitives like other primitives internally
This change paves the way for JIT-inlining FFI operations
such as `ptr-ref`. Even without JIT treatment, the change
slightly reduces the overhead for calling FFI primitives.
2014-02-25 06:18:02 -07:00
Matthew Flatt
46523d307b fix PLT_VALIDATE_COMPILE interaction with 3-D code
Makes the "optimize.rktl" test suite pass when PLT_VALIDATE_COMPILE
is defined.
2014-02-25 06:18:02 -07:00
Matthew Flatt
22617b7800 JIT: enable unboxing in branches of if and end of begin
When both branches of an `if` form can produce unboxed results, then
allow the unboxed result. Similarly, allow a `begin` form's last
expression to be unboxed.
2014-02-23 15:34:57 -07:00
Eric Dobson
ec4793ad16 Make module reader not return negative span when port location changes. 2014-02-22 11:34:23 -08:00
Matthew Flatt
90f371a06a Another makefile CFLAGS/CPPFLAGS adjustment
Missed a spot in c97184b581.
2014-02-20 07:11:30 -07:00
Matthew Flatt
c97184b581 makefiles: adjust definition and handling of CFLAGS and CPPFLAGS
Try to make the makefiles work better if CFLAGS and/or CPPFLAGS
is defined externally.
2014-02-20 07:01:35 -07:00
Matthew Flatt
1d0e4bedde setup/unixstyle-install: fix up only installed ".desktop" files
Closes PR 14354
2014-02-18 06:48:55 -07:00
Matthew Flatt
5ada90bfd2 raco setup: fix the way that "stamp" is compiled for avoided files
Instead of claiing "beginning of time" and an empty SHA1, use
`file-stamp-in-paths` to get a proper stamp.

This fixes a problem when installing built packages into user scope
where the built packages refers to an installation-scope library
and SHA1s need to be checked to fix up file timestamps.
2014-02-15 14:45:14 -07:00
Matthew Flatt
7b4ea16bc0 setup/dirs: fix get-apps-dir
Affects the location of ".desktop" file installation, especially in
a Unix-style installation.
2014-02-15 09:38:25 -07:00
Robby Findler
2e06761531 fix error message 2014-02-14 23:03:00 -06:00
Robby Findler
73bbabe7d4 adjust error message for impersonate-struct to match its actual contract 2014-02-14 23:02:59 -06:00
Robby Findler
0c73784c3c more unexpected strange things broke, so disable new class/c yet again
No joy in mudville. See
http://drdr.racket-lang.org/28175/ for details

Also fix (just introduced) infinite loop in class/c contract-name
implementation and tweak naming stuff a little so tests pass
2014-02-12 11:06:05 -06:00
Robby Findler
53d30648f9 fix class/c contract-name implementation
specifically, fix the case where a field doesn't have
a contract, but just has to exist
2014-02-12 10:15:49 -06:00
Robby Findler
83eab4158a remove dead code
and shrink dependencies correspondingly
2014-02-12 10:10:26 -06:00
Robby Findler
59f57b1bd1 Improvement and bug fixes to the new class/c; try again to re-enable it
Fixed:
- class-field-accessor and class-field mutator,
- the interaction between init args contracts and subclasses,
- object=? on wrapped objects (ie if 'this' flows out and
  is compared to the object thatn 'new' returns)
- contract-name for class/c

Also, the code now uses impersonator properties internally to track a
class that is wrapped (instead of a wrapper struct).  This simplifies
a bunch of places in the code and paves the way for classes that have
a class/c contract to be chapeone-of the original class (altho that
doesn't work yet)
2014-02-12 06:43:23 -06:00
Vincent St-Amour
8e32e6e44c Make flvectors and fxvectors sequences. 2014-02-11 10:27:33 -05:00
Matthew Flatt
ca3757367d fix checking of attempt to impersonte non-struct via mutator 2014-02-10 06:49:26 -07:00
Robby Findler
4d12021dbf disable the new class/c implementation for now
the new implementation doesn't provide eq? guarantees
as often as the old one does, so hold off on this until
we can sort that out. Thanks to drdr for pointing out
the problem:

http://drdr.racket-lang.org/28156/pkgs/drracket-pkgs/drracket-test/tests/drracket/teaching-lang-save-file.rkt
2014-02-08 20:42:37 -06:00
Robby Findler
f26279bfa2 fix bugs in the interaction between subclasses and external class/c contracts 2014-02-08 12:39:02 -06:00
Robby Findler
788ec1d87d fix interaction of mixins and contracted classes 2014-02-08 09:09:49 -06:00
Matthew Flatt
8a14fbd5b1 raco pkg: fix strip of package without "info.rkt" 2014-02-07 22:36:01 -07:00
Robby Findler
a1293d4284 add forgotten file 2014-02-07 23:17:46 -06:00
Robby Findler
e47c0efa1f change class/c to keep a vector of wrapper methods, not a hash table
this change is mostly motivated by improving how generics work on
contracted objects.

Also fix dynamic-send

TR's optimizer seems to get angry at the new send expansion, so
disable optimizations auto-language.rkt and insert-large-letters.rkt
(for now)
2014-02-07 22:18:56 -06:00
Ryan Culpepper
ed5a4ff619 improve error message for bad attribute values
closes PR 14340
2014-02-06 23:28:52 -05:00
Vincent St-Amour
741a11a1b7 Fix for to propagate source locations in more cases.
Thanks to Tobias Hammer for the patch.

Closes PR 14343.
2014-02-06 15:54:26 -05:00
Vincent St-Amour
a2204a0740 Expose missing blame parties to the contract profiler.
Done by pairing up incomplete blame objects with the missing blame party
before attaching it to the continuation mark. Other approaches were
explored (having a separate mark for each, imperatively updating blame
objects to add missing blame parties, etc.), but pairing had the least
overhead.
2014-02-06 15:01:29 -05:00
Robby Findler
6535d33db5 unbreak racket: disable the new class/c in favor of the old one (for now) 2014-02-05 15:02:53 -06:00
Robby Findler
4f65d57f80 Adjust class/c to use the new strategy for the external
parts of a contract (field, method, init, absent clauses)

Still to do:

- delay the creation of the class that checks internal contracts
  until a new derived class is created from a contracted class.

- extend the new implementation so it handles interface contracts
  (currently the old version of the external contracts is still there,
  just to handle this case)

The first of those is what (I hope) will bring down the memory
footprint for class/c contracts.
2014-02-05 13:42:03 -06:00
Asumu Takikawa
41fa9dfac9 Add contracts for synchronizable events 2014-02-05 11:37:53 -05:00
Asumu Takikawa
25907189f3 Fix evt chaperones for multiple-valued evts 2014-02-05 11:37:53 -05:00
Matthew Flatt
27f62a591e macro expander repair
Fix problem with sealing annotations on module contexts generated
to record a context identity.
2014-02-04 20:57:37 -07:00
Matthew Flatt
0eb9975f66 JIT: fix fast path for with-continuation-mark
Incorrect bitwise shift caused a fast-path test to be too
conservative.
2014-02-04 16:29:46 -07:00
Matthew Flatt
f801fe0736 places: improve and extend logging of place-related events 2014-02-04 14:27:52 -07:00
Ryan Culpepper
0b934997b3 module->namespace: accept module-path-indexs and resolved-module-paths 2014-02-04 11:11:57 -05:00
Matthew Flatt
756b110287 makefile: add dependency of ".app"s "Info.plist" on Racket version
The "Info.plist" file in an ".app" embeds the version number.
2014-02-04 06:46:54 -07:00
Vincent St-Amour
b71a214b45 Comment typo. 2014-02-03 14:04:32 -05:00
Robby Findler
f774a9098e fix error message for set-field! and dynamic-set-field! 2014-02-03 10:06:06 -06:00
Robby Findler
a75e770534 add missing provide 2014-02-02 22:00:10 -06:00
Robby Findler
7bec967c0d adjust class/c so the expansion is slightly smaller
that is, instead of (class/c [m (->m integer? integer?)] n) turning
into a call to a constructor that has calls to coerce-contract for
the 'm' method, it instead expands the 'n' method contract into an
identifier reference (that isnt' bound to #f, since #f is coercable to
a contract) and the 'm' contract argument just sits there in the expansion
2014-02-02 21:34:30 -06:00
Robby Findler
2989918a4f break up class/c's representation into the internal and external parts
The main change in this commit is to refactor the class/c projection
such that it actually build two classes internally when only a single
class/c is applied to a single class. The goal is to further adjust
class/c so that the projection corresponding to the external method
contracts goes away (to be replaced by a new strategy) and the
projection corresponding to the internal method contracts gets delayed
using some as-yet-underminded strategy that avoids creating the new
class until someone actually creates a subclass.

This commit, but itself, however is a performance lose to the tune of
about 2 megabytes in DrRacket's startup footprint. Hopefully this
doesn't last too long.
2014-02-02 08:28:39 -06:00
Robby Findler
ced62b8975 add missing export 2014-01-30 22:42:48 -06:00
Robby Findler
a12ebdeff9 move the class/c implementation into its own file 2014-01-30 16:32:05 -06:00
Matthew Flatt
24025fe5ed unix-style install: preserve build stamp
Instead of preserving specific configuration entries, it's probably
better to preserve all of them that are not specifically replaced.
I'm going with the simpler change for now, though.
2014-01-29 18:12:39 -07:00
Matthew Flatt
ed007e0fa0 fix another potential overflow in fixnum expt
This commit is a follow-up to e96d592735. The bug fixed this time is
more subtle, because the overflowing computation is never used, but
that doesn't matter in terms of avoiding undefined behavior.

Thanks for Pascal Cuoq and John Regehr.
2014-01-29 16:26:04 -07:00
Matthew Flatt
b07fa81950 unix: fix gracket-based launcher creation
The launcher was always create assuming a specific relative path
from the "bin" drectory to the "lib" directory, but that relative
path changes in a Unix-style install.
2014-01-27 08:20:58 -07:00
Matthew Flatt
e96d592735 expt: avoid undefined integer overflow in fixnum implementation
Also, extend fixnum fast path to work more often in 64-bit mode.

More review would be appreciated to help ensure that the revised
implementation avoids undefined behavior in C.
2014-01-26 21:02:28 -07:00
Matthew Flatt
58b898bc13 fix in-directory for a non-#f argument, not inline for clause
Closes PR 14312
2014-01-26 19:15:03 -07:00
Matthew Flatt
bc018585ac avoid a malloc(0)
This is unlikely to fix any problems, but I think malloc(0) is not
specified by C99.
2014-01-26 18:38:40 -07:00
Matthew Flatt
791ec4cfb1 recognize "1.0.1e" for openssl libraries 2014-01-26 18:38:40 -07:00
Matthew Flatt
6c25579b6b configure test for powl(), which is used for extflonums 2014-01-24 07:18:30 -07:00
Matthew Flatt
81ef1c876b on BSDs, avoid seconds->date conversion that won't fit
On FreeBSD and related systems, calling localtime() on an out-of-range
value (e.g., where the year doesn't fit in 32 bits) still returns a
tm pointer, instead or returning NULL for an error. To avoid this
problem, restrict the argument to 51 bits (which seems like a lot
of bits, but is still confortably away from the overflow point).

Closes PR 14305
2014-01-24 07:18:13 -07:00
Matthew Flatt
018af7e809 remove redundant comparison
Closes PR 14296
2014-01-24 07:11:53 -07:00
Eli Barzilay
c61a549840 2013 -> 2014 2014-01-21 15:02:21 -05:00
Matthew Flatt
bfda0665de add syntax/wrap-modbeg 2014-01-15 10:31:11 -07:00
Matthew Flatt
780d6ae566 x86_64: minor bignum performance boost
Incorporate a few x86_64 assembly routines from the latest GMP,
which provides a small speed boost for operations such as bignum
multiplication and division.
2014-01-15 10:31:11 -07:00
Eric Dobson
f0ebfee9ac Make parallel compile not call exit.
Closes PR 13373.
2014-01-13 09:34:40 -08:00
Robby Findler
4d123bb26d fall back to the slow path when application expression looks wrong
closes PR 14279
2014-01-12 23:37:09 -06:00
Robby Findler
04628e3516 remove accidentally left behind logger 2014-01-12 23:37:08 -06:00
Matthew Flatt
dc8d2fb7fc fix memory problem with places & built-in structure types
Thanks to Asumu for tracking down the problem.
2014-01-10 06:54:37 -06:00
Matthew Flatt
33b7f6f92f package binary strip: work on "info.rkt" files that use `(module ....) 2014-01-09 14:07:26 -06:00
Matthew Flatt
ba99bba668 net/http-client: restore use of abandon
The difference between `abandon` and `close-output-port` seems to
matter for downloading PLaneT packages on some networks. Using
`abandon` does not seem to create any problems now that an extra
"\r\n" is not incorrecty included in PUT/POST requests.
2014-01-08 23:08:14 -06:00
Robby Findler
a7304d18eb add some missing custom printers (to recursive-contract) 2014-01-08 13:42:53 -06:00
Matthew Flatt
409c8ef512 racket/enter: add dynamic-enter! 2014-01-07 15:07:39 -07:00
Matthew Flatt
a7bc240b3c setup/[main-]collects: doc and error-message repairs
Closes PR 14222
2014-01-07 14:09:10 -07:00
Matthew Flatt
4fe1673475 fix (more) closure type tracking for a procedure with only an unused rest arg
Fixs the repair in fe12a32dc3

Relevant to PR 14259
2014-01-07 10:22:58 -07:00
Matthew Flatt
331825700b fix bad interaction among JIT, 3-D macro, and bytecode reader
Closes PR 14186
2014-01-07 10:22:58 -07:00
Eric Dobson
54c50dd8d2 Add caching for collects-relative->path. 2014-01-06 21:16:26 -08:00
Eric Dobson
10fa612681 Minor cleanups to compiler. 2014-01-06 21:16:26 -08:00
Scott Moore
26cb1f7ce6 path-element? should disallow '.' and '..'
Fix `path-element?` to check whether the name returned by split-path
is a path or a special entry. This behavior matches both the documentation
of `path-element?` and the implementation of `string->path-element`.
2014-01-06 19:33:44 -07:00
Matthew Flatt
ff478f3173 allow optimizer to move mcons and box-immutable
Suggested by Gustavo Massaccesi.
2014-01-05 08:54:52 -07:00
Sam Tobin-Hochstadt
aeaf018d01 Provide and document match-expander? and legacy-match-expander?. 2014-01-04 17:56:38 -05:00
Matthew Flatt
b7f4e10fe1 MzCom: fix command-line parsing
I couldn't get MzCOM to work in a release build, because my
installations always had a "-" in the path.

Merge bug fix to v6.0 (pending review)
2013-12-31 10:55:04 -07:00
Matthew Flatt
93b38e25a6 fix CPP guard on clang pragmas 2013-12-31 06:49:49 -07:00
Matthew Flatt
bce8fc84f8 fix ordering bug in place termination
This bug was introduced in 94771f16ed, moving a local-variable
initialization to after its use.
2013-12-30 16:23:44 -07:00
Matthew Flatt
56483c8809 suppress clang warnings
The warnings need to be suppressed only when compiling preprocessed
code during 3m compilation (because clang doesn't complain about
the relevant patterns when it knows that macros produced them).
2013-12-30 16:22:43 -07:00
Matthew Flatt
33f2c23c05 workaround clang problem
Using MZ_INLINE on scheme_get_realint_val() and
scheme_get_unsigned_realint_val() leads to a link
error when using the current clang on Mac OS X 10.9.
Remove the MZ_INLINE declaration, since a modern C
compiler will inline, anyway.
2013-12-30 15:20:30 -07:00
Matthew Flatt
b3ab82c5f9 fix problem with path->collects-relative
An internal error could be triggered by a path immediately
inside the "pkgs" directory.
2013-12-30 12:15:18 -07:00
Matthew Flatt
e226ad66c5 move "props" test configs to test submodules or "info.rkt" files
The "props" file still has

 * ".rkt" `drdr:timeout` entries, needed until DrDr uses submodules and
   "info.rkt" files; although timeout information has been put in
   submodules for `raco test`, DrDr uses `raco test` in a way that does not
   enable timeouts, so that DrDr can implement timeouts itself (and record
   when a test times out)

 * ".rkt" `drdr:random #t` entries; not sure what to do with these, yet

 * ".rkt" `responsible` entries; not sure what to do with these, yet

 * ".rktl" `drdr:command-line #f` entries, needed until all ".rktl" files
   are disabled in DrDr

The following files were previously disabled for DrDr testing, but were
intentionally left as enabled with these changes:

pkgs/racket-pkgs/racket-test/tests/pkg/shelly.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/info.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/basic-index.rkt
pkgs/racket-pkgs/racket-test/tests/racket/link.rkt
pkgs/racket-pkgs/racket-test/tests/racket/embed-in-c.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/use-c-printf.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/c-printf.rkt
pkgs/parser-tools-pkgs/parser-tools-lib/parser-tools/private-lex/error-tests.rkt
pkgs/mysterx/mysterx.rkt
pkgs/mysterx/main.rkt
pkgs/games/gobblet/test-model.rkt
pkgs/games/gobblet/test-explore.rkt
pkgs/games/gobblet/robot.rkt
pkgs/games/gobblet/check.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/main.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/ffi.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/dbsystem.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/connection.rkt
pkgs/distributed-places-pkgs/distributed-places-lib/racket/place/distributed/examples/hello-world.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/htdp-pkgs/htdp-test/2htdp/utest/balls.rkt
pkgs/gui-pkgs/gui-test/framework/tests/test-suite-utils.rkt
pkgs/games/paint-by-numbers/raw-problems/size-calculation.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
pkgs/compatibility-pkgs/compatibility-lib/mzlib/traceld.rkt
pkgs/cext-lib/dynext/private/stdio.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
racket/collects/ffi/unsafe/objc.rkt
racket/collects/ffi/objc.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/tests-db.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-docs.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-catalogs-api.rkt
pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/redextomatrix.rkt
pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt
pkgs/planet-pkgs/planet-test/tests/planet/version.rkt
pkgs/planet-pkgs/planet-test/tests/planet/test-docs-complete.rkt
pkgs/planet-pkgs/planet-test/tests/planet/lang.rkt
pkgs/planet-pkgs/planet-test/tests/planet/docs-build.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/follow-log.rkt
pkgs/drracket-pkgs/drracket/drracket/private/dock-icon.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/tool-lib-and-sig.rkt
2013-12-30 12:15:18 -07:00
Matthew Flatt
5ea4c2ab68 fix sync on place with no writers
A `sync` on a place whose initial channel is known to have no writers
could trigger a place result instead of blocking on the place.
2013-12-28 19:55:31 -06:00
Matthew Flatt
94771f16ed fix race in place termination
A place claimed to be done according to `place-wait` before its
clean-up actions ran, including flushing output ports. Fix the
order.
2013-12-28 19:55:31 -06:00
Robby Findler
0edcbf3f82 fix bug in ->* contract combinator
that would cause the optional and mandatory keyword arguments
to get mixed up in certain situations
2013-12-28 16:15:25 -06:00
Matthew Flatt
22513439ff raco setup: fix dependency checking for "racket" package
Possibly, only "base" should depend on "racket", while the version
number of "base" should track the version number of "racket".
2013-12-24 18:00:38 -06:00
Matthew Flatt
99daa9b34d in-directory: add optional argument to filter directories 2013-12-24 18:00:38 -06:00
Matthew Flatt
f5cfcfecfe setup/command-name: drop ".exe" in short form 2013-12-24 15:38:29 -06:00
Matthew Flatt
1f2012a106 Windows: fix reported exe name in "independent" launchers
For example, make `raco exe --wrong` show "raco" instead of "racket"
as the error-reporting program. Normally, only `raco` and `setup-plt`
are implemented as "independent" launchers, because it's needed for
bootstrapping.
2013-12-24 15:38:28 -06:00
Robby Findler
06598dd5c7 forgot to add a file to the last commit 2013-12-24 15:34:51 -06:00
Robby Findler
e28b63e056 improve the speed of "second order" -> contacts
to bring them back in line with how they were before the
first order special-casing happened
2013-12-24 15:02:38 -06:00
Matthew Flatt
85c85b02b9 mzcom: fix rebuild when version changes 2013-12-24 06:56:03 -06:00
Matthew Flatt
6858b8df90 fix problem with doc database in read-only mode
Now that the documentation-build phase of `raco setup` uses read-only
mode, contention between writing and reading sometimes (though
infrequently) triggers an SQLITE_IOERR_LOCK error. Change the SQLite
binding to expose that specific error, as well as SQLITE_IOERR_BLOCKED,
because a retry of the affected operation is appropriate.
2013-12-21 14:37:17 -07:00
Ryan Culpepper
06aa4770f1 fix sqlite rollback-transaction in case of auto-rollback error
Merge to release branch.

An invalid (needs-rollback?) transaction may correspond to a closed
underlying transaction. In that case, don't issue ROLLBACK command.
2013-12-21 10:24:39 -05:00
Jay McCarthy
7faab4d617 Fix PR14216 2013-12-20 16:31:27 -07:00
Jay McCarthy
6c4650ebbd Remove secret information from pkg error messages 2013-12-20 16:31:27 -07:00
Robby Findler
438942c059 update HISTORY based on some of Jay's changes
please include in 6.0
2013-12-20 15:44:37 -06:00
Asumu Takikawa
8c6cf7395d Update HISTORY
Please merge to v6.0
2013-12-20 14:55:20 -05:00
Matthew Flatt
dc526f95f3 fill in some missing history notes
Merge to v6.0
2013-12-20 06:23:13 -07:00
Robby Findler
4408cdcfe4 add missing HISTORY entries based on my changes leading up to 6.0
Please merge to 6.0 (some of the history files already have
post-6.0 notes in them, but hopefully this patch still applies
cleanly)
2013-12-19 22:35:57 -06:00
Matthew Flatt
bfb4af3e84 raco: use executable yield handler before existing
Makes `raco` wait as it should for a GUI tool.

Closes PR 14261
2013-12-19 14:34:59 -07:00
Matthew Flatt
fe12a32dc3 fix closure type tracking for a procedure with only an unused rest arg
Closes PR 14259
2013-12-19 14:19:01 -07:00
Matthew Flatt
01eece18a7 dynamic-require: fast path for re-exported variables
When `dynamic-require` is used to access an export that isn't a
variable defined in the same module, `dynamic-require` falls
back to `eval` in a fresh namespace, which can be expensive.
The new fast path handles the case that a variable is re-exported.

The new fast path is relevant to deserialization, which now
uses a submodule that re-exports from an enclosing module.
2013-12-19 12:35:29 -07:00
Ryan Culpepper
d0e8e715b4 remove extraneous CRLF after message-body
RFC2616 section 4.1 (http://www.ietf.org/rfc/rfc2616.txt):
"... an HTTP/1.1 client MUST NOT preface or follow a request
with an extra CRLF."
2013-12-19 01:34:04 -05:00
Matthew Flatt
a8f2405b4b fix rendering of column by srcloc->string 2013-12-18 18:49:38 -07:00
Matthew Flatt
c8085a2988 fix chaperone-procedure wth extra properies
Continues the saga of 5bae9773a, this time fixing chaperone
properties.
2013-12-18 15:19:19 -07:00
Matthew Flatt
4070bcd461 fix chaperones and prop:procedure functions with keyword arguments
Commit 5bae9773aa broke `chaperone-procedure` and `impersonate-procedure`
so that it didn't always produce a chaperone or impersonator. Also,
the arity-error changeds intended for that commit were not complete,
because tests were accidentally commented out.

The main repair involves a new internal property that keeps track of an
accessor that is used to extract a procedure from a field in a structure
type that has `prop:procedure`.
2013-12-18 05:42:42 -07:00
Matthew Flatt
a9f64f4615 MzCOM: fix versioning and collection path
Merge bug fix to v6.0 (pending review)
2013-12-16 21:08:35 -07:00
Matthew Flatt
0f80c71fab setup/doc-db: propagate read-only flag for database connection
Fixes a problem installation Planet packages under Windows,
for example, where attempting to open a read-only file in
write mode triggers an extremely slow result.

Merge bug fix to v6.0 (pending review)
2013-12-16 14:38:26 -07:00
Matthew Flatt
ec5157d78f setup/setup: fix #:make-doc-index? default
Making the default match the docs fixes Planet package installation,
which otherwise tries to rebuild the index too frequently.

Merge bug fix to v6.0 (pending review)
2013-12-16 14:38:26 -07:00
Matthew Flatt
1ceca069c8 more repairs to function-name inference
The main change is to add an option to `syntax-local-infer-name` to
select whether `syntax-local-name` is used, and to use the new option
to disable `syntax-local-name` for the function expression in a
keyword `#%app`.

Improvements in the expander/compiler generalize a previous repair.

Merge to v6.0
2013-12-16 09:07:36 -07:00
Matthew Flatt
4abe7d2657 fix incorrect propagation of name via syntax-local-name
Merge to v6.0
2013-12-14 21:11:08 -07:00
Matthew Flatt
80d0b2fcc3 fix for-label import of a submodule
Closes PR 14155

Merge to v6.0
2013-12-14 20:27:55 -07:00
Robby Findler
2199d96100 implement a little bit of the random generation for the new ->
(just enough to pass the test suite)
2013-12-14 15:47:31 -06:00
Jay McCarthy
87135b110b Fix PR14247
Add "Connection: close" to requests that we know will end after one
request.

Read upto 1K bytes at a time on requests rather than just 1 at a time.

Change closing semantics to be "close" and not "abandon"
2013-12-14 08:00:41 -07:00
Robby Findler
074f21203a another fix to the first-order check I added earlier today
(discovered by the test suites run by drdr)
2013-12-13 19:19:25 -06:00
Robby Findler
14645b8cc5 fix class/c first-order check for interface contracts 2013-12-13 16:20:59 -06:00
Robby Findler
52c74701ec improve the first-order checking for the current class/c implementation
(not strictly necessary, but the new, still pending class/c first-order
checking checks the arities of the methods and those additional
tests got put into the test suite, so the easiest thing for now
is just to make the current class/c implementation do that check too)
2013-12-13 12:02:53 -06:00
Robby Findler
ecc1facdaa improve source locations for uses of contracted variables 2013-12-12 22:48:57 -06:00
Matthew Flatt
0b48e883da fix reducing arity or chaperoning keyword-valued prop:procedure
Fix various problems, including a bad result from `procedure-arity`
and problems with chaperones and arity error messages when a
structure's `prop:procedure` value is a keyword-accepting procedure.

Merge to v6.0
2013-12-12 12:15:10 -07:00
Matthew Flatt
861384d36d Mac OS X: fix executable creation for LC_DYLIB_CODE_SIGN_DRS
The LC_DYLIB_CODE_SIGN_DRS load command is relatively new, and
it needs to be updated when we shift __LINKEDIT to add
__PLTSCHEME.

Merge to v6.0
2013-12-11 19:54:58 -07:00