Commit Graph

1077 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
8f20264a83 fix marshaling of #'(.... . ()) to bytecode 2014-07-11 06:02:13 +01: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
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
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
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
b99260bb32 fix declaration for non-places, non+futures build 2014-07-04 05:17:20 +01: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
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
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
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
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
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
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
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
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
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
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
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
ec96592702 optimizer: treat known procedure bindings, etc., as #t for if
Closes PR 14526
2014-05-27 09:27:15 +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
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
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
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
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
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
Matthew Flatt
b15aea28c2 fix accidental disabling of thread-specific process-milliseconds 2014-05-10 19:29:54 -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
1bd604073a add custodian-tidy-all 2014-05-07 07:41:13 -06: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
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
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
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
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
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
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
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
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
Matthew Flatt
4d2b24b325 clean-ups to commit 4fde0e9901 2014-04-24 10:21:52 -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
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
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
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
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
Matthew Flatt
2b63977f24 avoid compiler warnings 2014-04-15 20:15:05 -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
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
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
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
Ryan Culpepper
152cf764a0 Post-release version for the v6.0.1 release 2014-04-08 08:47:35 -04: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
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
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
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
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
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
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
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
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
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
Matthew Flatt
ca3757367d fix checking of attempt to impersonte non-struct via mutator 2014-02-10 06:49:26 -07: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
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
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
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
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
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
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
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
Matthew Flatt
ff478f3173 allow optimizer to move mcons and box-immutable
Suggested by Gustavo Massaccesi.
2014-01-05 08:54:52 -07: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
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
Matthew Flatt
85c85b02b9 mzcom: fix rebuild when version changes 2013-12-24 06:56:03 -06: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
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
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
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
280bb31d70 fix a synchronization problem in the GC for places
When a GC is needed for the shared space, a GC is triggered
in all places, and the places wait until each other place
has completed. However, the places also need to wait until
all other places are ready to *start* a GC; otherwise, a
place may be modifying a shared record while some other place
traverses it for a GC.

Closes PR 14229

Merge to v6.0
2013-12-07 09:32:51 -07:00
Matthew Flatt
d48a75eddf make pkg-links: fix to allo "racket" as a dependency
Probably only the "base" package should rely on a "racket" version,
while other packages should rely on a "base" version.
2013-11-30 21:01:21 -07:00
Matthew Flatt
d007ec3e56 fix an error message
Merge to v6.0
2013-11-26 18:19:54 -07:00
Matthew Flatt
335177f1bc fix problems with text-mode ports on Windows
Closes PR 14198

Merge to v6.0
2013-11-25 10:00:23 -07:00
Asumu Takikawa
289a19e237 Fix format string for GC debug log message
Closes PR 13998

Please merge to v6.0
2013-11-25 11:55:00 -05:00
Matthew Flatt
90388d1549 fix handling of choice evt returned by a guard evt
Closes PR 14195

Merge to v6.0
2013-11-24 08:20:44 -07:00
Matthew Flatt
9213d1aa79 configure: add fallback when checking for ar 2013-11-21 20:24:32 -07:00
Ryan Culpepper
f12cfe185b Post-release version for the v6.0 release 2013-11-20 14:10:06 -05:00
Matthew Flatt
1d8a2516b2 fix problem resizing mutable hash tables
A hash-table size grew based on the number of key slots occupied,
instead of the number of value slots, where the two differ when
keys are added and removed in the table.

Thanks to Ryan for the example.
2013-11-20 07:28:34 -07:00
Matthew Flatt
a88aa3c428 fix JIT slow path for bitwise-bit-set?
I'm having trouble producing a small test that triggers the bug, but
I'll keep trying.
2013-11-18 17:41:04 -07:00
Matthew Flatt
38752b2aa2 fix build for platforms with disabled threads + inline allocation 2013-11-14 07:43:21 -07:00
Matthew Flatt
6e983482bb add flrandom and unsafe-flrandom 2013-11-13 13:40:15 -07:00
Matthew Flatt
8039f8177d make random slightly faster on 64-bit machines in integer mode
Exploit the fact that a 32-bit range fits in a fixnum.
2013-11-12 20:17:03 -07:00
Matthew Flatt
c81a468bc4 annotate some primitives as "immediate"
This annotation is useful mainly for functions that might be called
frequently from JIT-generated code.
2013-11-12 20:17:03 -07:00
Matthew Flatt
8722653664 fix some misleading error messages
The misleading message that dropped submodule paths.
2013-11-08 18:13:42 -07:00
Matthew Flatt
d23d2f8c5b path-replace-suffix: raise exception when result should be an empty path 2013-11-03 10:04:00 -07:00
Matthew Flatt
afcecc73f1 {string,bytes}->path-element: error on empty [byte] string 2013-11-03 09:57:26 -07:00
Matthew Flatt
f6cfd14c5e shutdown custodian-managed subprocesses on exit 2013-11-03 09:25:15 -07:00
Matthew Flatt
31d6b02d92 configure: DragonFly is like OpenBSD 2013-11-02 20:37:36 -06:00
Matthew Flatt
fec1c8c115 avoid some compiler warnings 2013-11-02 20:37:35 -06:00
Juan Francisco Cantero Hurtado
39bcfb5871 drop unneeded #include
The "sys/param.h" header was used to check the OpenBSD version.
It's not needed, anymore.
2013-11-02 12:33:12 -06:00
Asumu Takikawa
1f700947d4 Add channel chaperones
These chaperones only protect the "put" end of the
channel and use evt chaperones to protect the "get"
end.
2013-11-01 13:31:17 -04:00
Matthew Flatt
fac247d340 Mac OS X: support Retina mode
Seems to work for Mac OS X 10.9 (Mavericks), at least.

In Retina mode, a drawing unit corresponds to two pixels on
the screen or in a bitmap created by `make-screen-bitmap'.
In particular, a bitmap created by `make-screen-bitmap' is
actually twice as big in each dimension as requested, and the
bitmap is scaled when transferring to other drawing contexts.
When transferring onto the screen, scalings cancel so that the
result looks right.

Adds `get-display-backing-scale` to `racket/gui/base`, and
also `get-backing-scale` to `bitmap%`.

To do: add a way to set the backing scale of a bitmap. That
option will provide a way to give controls higher-resolution
bitmaps as labels.
2013-10-31 08:50:22 -06:00
Matthew Flatt
d80e6fac7f update GMP for x86 and clang 2013-10-31 08:43:00 -06:00
Matthew Flatt
d07bd11495 Makefile: make PLT_SETUP_ARGS work more sensibly
Make sure it's at the end of the `raco setup` command line, and set
the executable name to "raco" instead of "raco setup" so that the `-l`
flag is effectively implied.
2013-10-25 15:59:53 -06:00
Sam Tobin-Hochstadt
d6610289b8 Check that all in-repository packages have description and authors. 2013-10-20 11:08:03 -04:00
Jay McCarthy
0182e3ff33 Fixing broken build and improving error message 2013-10-15 10:53:59 -06:00
Matthew Flatt
3a9ad7746b OpenBSD: another approach to finding stack bounds
OpenBSD provides pthread_stackseg_np(), which directly reports
the stack-bounds information that Racket needs, so we can use
that instead of the approach used on other Unix variants. The
approach used for other Unix variants seems not to work for OpenBSD
because the stack location at the point that main() is called
is already significantly far from the stack base (on the order
of 100k on a 32-bit system in my test using OpenBSD 5.2).
2013-10-15 08:59:06 -06:00
Matthew Flatt
eb42f25a4e Windows: pass current directory CreateProcess instead of setting
Avoids races setting/using a process-wide current directory,
and avoids locking the directory that was most recently used to
start a subprocess.
2013-10-14 21:28:08 -06:00
Matthew Flatt
b83373d6a4 fix error typo 2013-10-14 18:18:33 -06:00
Matthew Flatt
e0c143ff33 fix problems with pipe limits
A pipe's limit is supposed to apply only to unpeeked bytes, but
there were problems related to triggering further writes after
a peek, and also triggering further reads after a partial
write.
2013-10-14 14:46:09 -06:00
Matthew Flatt
2a79377c60 further tighten eq-hash code generation
Avoids including the bit thet indicates whether the object
is GCable in the eq hash code (in a configuration where
bits are available in the GC header for hashing).
2013-10-12 08:37:15 -06:00
Matthew Flatt
8b7b96215b equal hash code: avoid dropping useful bits
Closes PR 14059

Symbols in the PR were mapped to coliding hashes in
groups of 4 because the low 2 bits of the `eq?` hash
code were begin dropped to generate an `equal?` hash
code. Those two bits got lost due to a refectoring
a while back that moved the dropping of two useless
bits to a more centralized place, but the 2-bit shift
did not get removed from the `equal` hash code comparision.

The PR's example program will still generate groups of 2
when hashing around 10k symbols (which used to be groups of 8).
That's because there's a bit in the hash-code counter that
turns out to be forced to 1.
2013-10-12 08:37:15 -06:00
baoti
d9f0d52c8a Fix path-replace-suffix' and path-add-suffix' on path for some system 2013-10-11 16:09:30 -06:00
Matthew Flatt
7e42ee2003 fix custodian-related memory-management problem
The problem mainly affected `register-custodian-shutdown`
from `ffi/unsafe/custodian`, which is used by `math/bigfloat`
and `ffi/unsafe/com`.

When a value is registered with a custodian, the value is held
weakly, but the shutdown procedure is intended to be held
strongly. At the C API level, the data associated with a shutdown
function pointer is intended to be held strongly.

A custodian itself, however, is retained weakly by other custodians
in its family, so that custodians can be GCed and their elements
transferred to a parent custodian. Since the custodian itself may
be held only weakly, the callback & data in a custodian was effectively
held weakly --- which, in turn, can break assumptions in code such
as `ffi/unsafe/custodian` that expects strong references to prevent
finalizers from running.

Fix the problem by registering a reference to callback data as
data in a custodian's finalizer, which makes the data strongly
retained no matter how the custodian is retained.
2013-10-11 13:11:13 -06:00
Matthew Flatt
e8605a7181 avoid internal error on misconfigured executable 2013-10-11 13:11:12 -06:00
Matthew Flatt
ca002494e3 fix an inconsistency in free-identifier=?
Closes PR 13982
2013-10-10 18:16:47 -06:00
Matthew Flatt
9a74e633ae macro expander: restore a minor shortcut lost in a previous commit
The commit c352ef8f lost a shortcut that is used for looking up
certain bindings in an environment during expansion/compilation.
2013-10-10 18:16:46 -06:00
Matthew Flatt
70b6f6464f fix .zo marshal of a syntax object containing a hash table in a list
Also, fix `zo-parse` unmarshaling of syntax-object hash tables.

Closes PR 14087
2013-10-09 07:09:36 -06:00
Matthew Flatt
6d4ff30909 fix JIT bug related to unboxed arguments in self tail calls 2013-09-28 17:57:06 -04:00
Matthew Flatt
af7dcf0dd0 JIT: improve configuration dependency 2013-09-28 17:57:05 -04:00
Matthew Flatt
162edd099d box-cas!: less JIT-generated work if the boolean result is ignored 2013-09-26 14:21:39 -04:00
Matthew Flatt
6f1588fcac fix custodian-limit checking for phantom byte strings
Closes PR 14036
2013-09-19 16:56:01 -05:00
Matthew Flatt
68c4b0590d fix local-expand on module body with phase-2 binding 2013-09-19 07:27:57 -05:00
Juan Francisco Cantero Hurtado
bb5323e448 Fix a crash of racket on OpenBSD systems, when pixman is compiled with SSE support and racket tries to load cairo using libffi.
Bug found initially by Juan Francisco Cantero Hurtado. Reported by many.

Mark Kettenis (from the OpenBSD Project) found the real reason of the
crash and created this patch for libffi. Patch taken from OpenBSD Ports.
2013-09-16 10:04:12 -06:00
Matthew Flatt
160e5d3579 remove unused field 2013-09-11 08:34:27 -06:00
Matthew Flatt
df2e2d76c7 JIT: fix slow path branch patch for structure-field assignment
The broken branch patch caused the slow path to be taken on
PPC.
2013-09-09 20:45:29 -06:00
Matthew Flatt
fc9b23e550 JIT: fix slow path for inlined structure-field assignment 2013-09-09 20:45:29 -06:00
Matthew Flatt
41477ab7eb ARM JIT: make calls & returns visible for branch prediction
This improvement makes `inflate` about 5% faster on
one test platform (with no change on a much older one).
2013-09-06 20:02:06 -06:00
Matthew Flatt
fb80ac7385 minor JIT instruction improvement 2013-09-06 20:02:06 -06:00
Matthew Flatt
300e81cb65 fix some variable-initialization problems/warnings 2013-09-06 20:02:05 -06:00
Matthew Flatt
b5fe0203e2 remove bad return 2013-09-04 08:44:49 -06:00
Matthew Flatt
6530062120 raco pkg {install,update}: add --checksum argument
The `--checksum` argument's main use is that it lets you pick a specific
commit from a GitHub repository. More generally, it lets you simulate
a package-catalog result, which includes a checksum.

Also, adjust checking of downloaded checksums to ensure that they
match the expected checksum, as predicted by a package catalog or
by the `--checksum` argument.
2013-09-02 10:10:31 -06:00
Ryan Culpepper
5c462eee2b remove uses of scheme/* in src
Fixes windows snapshot builds.
2013-08-28 21:48:53 -04:00
Matthew Flatt
d175c3949c move "scheme" collection to a "scheme-lib" package
Also, move remaining "srfi" libraries to "srfi-lite-lib".

In principle, "base" should depend on "scheme-lib" and
"srfi-lite-lib", and a new "base2" package would represent the new,
smaller base. But I don't think the window has yet closed on
determining the initial "base" package.

The "srfi" libraries moved to "srfi-lite-lib", instead of "srfi-lib",
to avoid creating many extra dependencies on "srfi-lib" and all of its
dependencies. The SRFIs in "srfi-lite-lib" depend only on "base",
and they are used relatively widely.
2013-08-27 15:19:24 -06:00
Tobias Hammer
0b1f96ab3d Add missing fender to define-cstruct
prevents internal error from libffi for
(define-cstruct _S ())
2013-08-27 10:15:25 -06:00
Tobias Hammer
e6886e4213 Fix missing initialization in filesystem-change-evt 2013-08-27 07:27:54 -06:00
Matthew Flatt
392a8219ae futures: fix rest-arg list creation
Also, make rest-arg list creation safe for futures (and slightly
faster in general).

Closes PR 13832
2013-08-26 20:17:52 -06:00
Matthew Flatt
44e324db12 ARM JIT: fix test for VFP
Having `__VFP_FP__` defined does not mean that VFP instructions are
available; it just means that floating-point is native-endian.

According to

 https://wiki.debian.org/ArmEabiPort

the absence of `__SOFTFP__` combined with the precense of `__VFP_FP__`
can mean VFP, though.
2013-08-25 12:54:04 -06:00
Matthew Flatt
7e0d3beb67 ARM JIT: avoid direct use of __aeabi_... for software fp 2013-08-24 12:28:25 -06:00
Matthew Flatt
0b8e764e99 ARM JIT: fix soft-float `round'
Use our own implementation of round(), since the round()
function might be missing.
2013-08-24 10:39:09 -06:00
Matthew Flatt
d901504174 allow hash-table chaperones to support efficient hash-clear[!] 2013-08-22 07:50:42 -06:00
Matthew Flatt
e02e04ff2a fix `hash-clear!' on impersonated hash tables
Closes PR 13977
2013-08-20 05:52:47 -06:00
Matthew Flatt
220b284175 find-collects-dir' and find-config-dir' as built-in, cache values
The computations already existed in the built-in code, so moving
the functions reduces code duplication. Caching the values will
save a little time, but mostly it will avoid sandbox interactions
with the task of locating the main "collects" and "etc" directories.
2013-08-19 17:54:20 -06:00
Matthew Flatt
1b7819dcd5 Windows: disable message box from system errors
For example, disable a message box for DLL links errors.
2013-08-19 06:34:18 -06:00
Matthew Flatt
f93f488a5a add PLT_DUMP_JIT_RANGES
This variable is intended to support machine-code tracing
experiments. To enable a dump of ranges on exit, both
define PLT_DUMP_JIT_RANGES at compile time and as an environment
variable at run time.
2013-08-17 08:42:15 -06:00
Matthew Flatt
6baf90e3be Documentation and adjustments to `clear'-related hash and set operations
Document and adjust `hash-clear!', `hash-clear', and `hash-empty?'.

Also, add `hash-copy-clear'.

The clear operations are constant-time for a non-impersonated
hash table, otherwise they always remove keys one-by-one to
trigger the impersonator's interpositions.

The `hash-clear' operation works only on immutable hash tables,
in contrast to the original implementation. The new `hash-copy-clear'
works on both immutable and mutable hash tables. The "copy"
in its name is meant to suggest a difference with `hash-clear',
even on immutable hash tables: any chaperone on the input
is not on the outpue.

Change `set-clear' to be like `hash-clear', and add
`set-copy-clear'.

(Changes are in consultation with Carl.)
2013-08-17 06:03:10 -06:00
Matthew Flatt
1347073cc5 fix immutable hash tree balancing
When an existing entry in the AVL tree for an immutable hash
is replaced with a new one, the new one did not always get
the right depth, which could throw off the tree balance.
2013-08-16 11:35:40 -06:00
Matthew Flatt
f8a225f741 faster paths for parameter lookup
Calling a parameter function (with no arguments) can be 2-3 times
as fast as before.
2013-08-16 10:24:18 -06:00
Matthew Flatt
3f8475d6a9 optimizer: certain bitwise-operation patterns always produce fixnums 2013-08-13 16:05:36 -06:00
Matthew Flatt
b1e33773c6 increase stack safety margin for 64-bit platforms
Make the stack-safety margin twice as big for 64-bit platforms
as 32-bit platforms. That was already done for Windows, but it's
also needed for Mac OS X. Also, double-check that there's a
good amount of space on the stack before calling a foreign
function.
2013-08-12 19:42:36 -06:00
Matthew Flatt
d52ba1b5e7 fix interaction of continuations and stack overflow
There was an off-by-one error in trimming overflow
records in a captured continuation.

I provoked the crash by running the program below on Mac OS X;
resizing the frame caused a crash. It has something to do with the
`try-atomic' implementation, I think. I wasn't able to make a test
case in a half-hour of trying, however, and I'm giving up for now.

(define f (new frame% [label "deep"]))
(define b (new button%
               [parent f]
               [label "0"]))
(send f show #t)
(let loop ([n 0] [m 0])
  (if (= n 10000)
      (begin
        (send b set-label (format "~a" m))
        (for ([i 10]) (yield))
        (loop 0 (add1 m)))
      (cons 1 (loop (add1 n) m))))
2013-08-12 19:42:36 -06:00
Matthew Flatt
74e49d8499 enable JIT stack trace on arity errors
On x86_64 Linux and Win64.
2013-08-12 16:27:06 -06:00
Matthew Flatt
04454678eb remove unnecessary stack-unwind test
The test was meant to detect a bad traversal step, but it could unnecessarily
truncate the stack traversal when encountering recursive calls.
2013-08-12 16:22:18 -06:00
Matthew Flatt
8f9e6529da fix (extracted part of) libunwind for x86_64
I had mixed up EBP vs. REG_EBP, etc., in extracting the x86_64 code.
2013-08-12 15:02:24 -06:00
Matthew Flatt
2d8edeffe8 make install: drop -S' flag to strip'
It turns out that no flags are standard, so don't try to use
any. That seems to be fine on the platforms that I tried.
2013-08-12 15:02:24 -06:00
Matthew Flatt
7c638a03a0 remove some obsolete files 2013-08-12 07:07:27 -06:00
Matthew Flatt
7c95c5ad38 add path<?' and symbol<?'
These comparisons are useful for sorting while avoiding the overhead
of conversions to bytes or strings.

Having `path<' reduces the cost of sorting in `directory-list'.
2013-08-11 14:30:04 -06:00
Matthew Flatt
58c0074a71 Add ".desktop" file support
A launcher can have a ".desktop" file (found like other files: as the
same name as the main launcher file, but with a ".desktop" suffix),
where the "Exec" and "Icon" fields are added automatically. A ".png"
or ".ico" file can be supplied for the icon (where the ".ico" file
is already used for Windows launchers).

Closes PR 13953

Fix various problems with Unix-style install from an installer.

Also, add an ugly icon for the Racket Package Manager, with the hope
that it will provoke someone to create a nicer one.
2013-08-10 12:52:17 -06:00
Matthew Flatt
47d433b9c1 Solaris: disable places and futures by default
The issue is that gcc and the Sun linker do not cooperate
correctly to implement thread-local variables on x86_64.
Since gcc is normally configured to use the Sun linker by
default, enabling places and futures is asking for trouble.
2013-08-09 19:46:37 -06:00
Matthew Flatt
19cda0396b fix stack size of threads that implement places
... on platforms other than Mac OS X and Linux.
2013-08-09 14:26:32 -06:00
Matthew Flatt
6bb55f7d14 Solaris: various repairs
Fix threading, including SIGCHLD mask.
2013-08-09 10:49:46 -06:00
Matthew Flatt
3ca82d5df7 fix subprocess issues
Fix SIGCHLD suspension for fork()-based file locks (i.e., Solaris).

Also, fix commit ea51d32e, which broke termination of process groups
where the main process terminated before the rest of the group,
because it used sigwait() before the terminate action.
2013-08-09 07:55:14 -06:00
Matthew Flatt
d93ce089a3 fixes of OpenSolaris
Make the GC always use the mmap() block cache, since mmap() on Solaris
allocates much more than a page when a single page is requested.

Enable places and threads by default on x86 and x86_64.

Fix pthread-related compilation flags.
2013-08-09 07:55:14 -06:00
Matthew Flatt
9068341cb9 JIT: add missing check on inlined `procedure-arity-includes?'
Closes PR 13951
2013-08-08 17:57:49 -07:00
Matthew Flatt
b8db5aacb3 fix bytecode-format bug
The range of values used to represent "improper lists"
of length 36 to 65 overlapped with the range of values
used to represent other things.

This bug is the new chapion of the "how did we not hit that
earlier?" category. The bug was introduced around v300, at
the latest.
2013-08-07 08:37:50 -07:00
Matthew Flatt
c67fd14ae8 remove prohibition on handle-evt?' arguments to wrap-evt', etc.
The intent of disallowing `handle-evt?' arguments to `wrap-evt',
`handle-evt', and `chaperone-evt' was that those extra wrappers
break the tail-handling behavior that is almost certainly intended
when `handle-evt' is used. The extra checking was not obviously
worthwhile (we don't have any checked "this procedure should be called
in tail position" annotations, after all), and pushing the distinction
through Typed Racket looked particularly inconvenient.

Dropping the constraint is trivial if we say that wrapping a
`handle-evt' result disables the tail invocation of the handler
procedure.
2013-08-04 10:35:30 -06:00
Matthew Flatt
df30e9c148 add missing lock acquire 2013-08-03 13:56:18 -06:00
Matthew Flatt
8eefa2126b add `current-library-collection-links' parameter
Also, the initial value causes `curent-library-collection-paths'
before collection links files, instead of after.
2013-08-02 08:24:15 -06:00
Matthew Flatt
a6f8f00f55 fix cross-phase-persistent attribute of primitive modules 2013-08-01 05:55:24 -06:00
Matthew Flatt
c137b44a68 change `syntax-local-lift-context' to distinguish top-level environments
Although not documented as such, the implementation used to return
form did not take the special meaning of #f into account. It seems
better to fix `syntax-local-lift-context' to match its documentation.
2013-07-31 17:28:56 -06:00
Matthew Flatt
895b8d2760 configure: fix `--enable-portable-binary' addition 2013-07-29 10:58:16 -06:00
Matthew Flatt
df34ffe450 configure: pass `--enable-portable-binary' to libffi configure
The `--enable-portable-binary' flag disables optimizations specific
to the build machine's processor that may ne unportable to other
machines.

This also fixes a problem where a VirtualBox runs on an x86_64 machine
with AVX support, and so `congure' enables AVX operations, but AVX
doesn't work within a virtual machine.
2013-07-28 11:46:10 -06:00
Matthew Flatt
67c33fb13d adjust startup to avoid config file if collection links are disabled
The intent of this change is to avoid trying to read a configuration
file from a stand-alone executable.
2013-07-26 22:36:21 -06:00
Matthew Flatt
68f4d297f7 make a build via the top-level makefile set scope to `installation'
Also, set the installation name to "development".
2013-07-26 11:52:48 -06:00
Matthew Flatt
afe8c37a2a user paths depend on name (not always version); no `shared' pkg scope
An installation has a name (via the configuration file "config.rktd")
that defaults to the version string. The name, instead of the
Racket version, is used for forming the path to the user "collects"
directory, user packages, and so on. The `user' package scope is
thus user- and installation-name-specific (instead of user- and
version-specific).

Remove `shared' package and link scope, since the notion of
installation names generalizes the concept (a set of installations
can be given the same name) and fits it into `user' scope.
2013-07-26 11:52:47 -06:00
Matthew Flatt
e0bab441a8 fix `get-output-{bytes,string}' with bad starting index, no ending index
Closes PR 13933
2013-07-25 20:39:57 -06:00
Matthew Flatt
aeb3372faf more safe-dereference repairs for DWARF native stack trace (on ARM) 2013-07-23 20:38:23 -06:00
Matthew Flatt
a31e9b29e0 no dprintf() macro in libunwind to avoid collisions on some platforms 2013-07-23 19:59:00 -06:00
Matthew Flatt
245a688c2e fix for inotify() use with places and futures disabled 2013-07-23 19:46:10 -06:00
Matthew Flatt
9f0c5b1487 fix x86_64 DWARF-based stack trace
Commit 5917d4c added a guard on some pointer dereferences, but
the guard is too strict for DWARF. Allow reading of TEXT segments,
etc.
2013-07-23 17:20:20 -06:00
Matthew Flatt
92f2d7d386 remove bogus cross-phase-persistent declaration
Also fix and improve source-location reporting.
2013-07-22 15:31:18 -06:00
Matthew Flatt
9f4420b07a allow gensym' and string->uninterned-symbol' in cross-phase persistent 2013-07-22 12:51:37 -06:00
Matthew Flatt
9e2cf2ab37 add `#%declare', require declaration of cross-phase persistent modules 2013-07-22 12:51:37 -06:00
Matthew Flatt
df891791b4 avoid a compiler warning 2013-07-21 21:57:25 -06:00
Matthew Flatt
a5f26013ab place: fix finalizaiton of place channels stuck in a GC'ed channel
Lack of ordering on finalization requires some care for explicit
clean-up actions in a finalizer.
2013-07-21 16:35:56 -06:00
Matthew Flatt
a0741c5ea7 JIT repair for `(/ (most-negative-fixnum) -1)'
When I added JIT-inling of '/' for fixnums, I somehow forgot to
handle the special case that is already handled for `quotient'.
2013-07-21 09:59:08 -06:00
Matthew Flatt
22dbcaa77f fix arithmetic-shift' with shifts close to (- (expt 2 31))' on 64-bit
The bug was caused by an accidental cast of a 64-bit integer to a
32-bit integer.

Closes PR 13923
2013-07-21 08:03:53 -06:00
Matthew Flatt
aecf0e60b5 add catalog, source, and Mac OS X instructions to basic README
Also, include "stamp.txt" and "collects.tgz" at a build site.
2013-07-20 10:17:14 -06:00
Matthew Flatt
e7b0e4ffab fix problems with "collects" path and GUI executables 2013-07-19 13:17:40 -06:00
Matthew Flatt
67a9889ef7 add "share", move "collects" back out of "lib", move "pkgs"
The "share" directory holds platform-independent files, while
"lib" holds platform-specific files.

In principle, the "collects" directory belongs in "share",
as does "doc". Those directories are put into "share"
by a Unix-style install, but left at top level for an
in-place install.

Packages in installation scope are put in "share" instead
of "lib", and the top-level Makefile puts development links
in "share/devel-pkgs".

The `configure' script now supports `--docdir' and `--collectsdir'.

Changed the version to 5.90.0.1.
2013-07-19 11:52:02 -06:00
Matthew Flatt
e59f888310 GC clean-ups related to disabled collections and place-shared space
The changes make shared-space allocation work in GC-stress mode
(forcing "master" GCs, just like other GCs).
2013-07-16 11:03:40 -06:00
Matthew Flatt
c88dc8efc8 configure: fix a CC vs. CC_FOR_BUILD mismatch 2013-07-16 06:07:42 -06:00
Matthew Flatt
691a6303eb use CONFIGURE_ARGS_qq' in reconfigure' 2013-07-15 19:22:27 -06:00
Matthew Flatt
9aee8b53d9 use `filesystem-change-evt' for collection paths only if low-latency
Specifically, this change disables the use of inotify() for detecting
changes to collection-links files, because the latency is too large
on some (many?) Linux configurations. (The fallback is to detect changes
to a links file by reading the whole content every time.)
2013-07-15 08:58:39 -06:00
Matthew Flatt
df79198e6e add 'fs-change mode to `system-type'
Report whether `filesyste-change-evt' is supported, works
at the granularity of files, etc.
2013-07-15 08:58:39 -06:00
Matthew Flatt
b3715ba36e filesystem-notify-evt: change inotify() implementation
Create a single inotify() connection per place, which should reduce
the latency of operations on filesystem change events and make
them generally scale better on Linux.

Internally, add a filesystem-never-changes mode, which could be useful
for platforms with fixed filesystems, but it's also for experiments in
checking the cost of filesystem change events.
2013-07-15 07:07:27 -06:00
Matthew Flatt
5aab8a0137 disable inotify()-based `filesystem-change-evt'
... until we can track down latency problems with the use of
inotify().
2013-07-14 07:54:57 -06:00
Matthew Flatt
59170d4caf x86_64 native stack traces: protect some pointer dereferenecs
Guard dereferences of DWARF information to avoid crashing when
the information is wrong or misinterpreted.
2013-07-12 14:52:43 -06:00
Matthew Flatt
79abd1f629 clean up deregistration of VNODE watches via kqueue()
The shotgun approach generates errors/warnings.
2013-07-12 14:52:42 -06:00
Matthew Flatt
d5558a4fe0 raco setup and scribble: fix problems tracking document changes
Some non-transparent but serializable data structures broke
the comparison between previous and new outputs, which caused
too many document rebuilds.

Includes a change to make module path indexes work with `equal?'.
2013-07-12 14:52:42 -06:00
Matthew Flatt
30a1c3565d fix "collects" path setup in 3m build 2013-07-10 13:41:06 -06:00
Matthew Flatt
32b0064b56 Don't install "libracket3m.a" by default
Configure with `--enable-libs' to install the library.
2013-07-10 13:09:41 -06:00
Matthew Flatt
2a4f32d853 remove core dependency on `mzlib/restart' 2013-07-10 12:57:02 -06:00
Matthew Flatt
fe98a80c22 add `identifier-bindig-symbol'; fix free-id-table for renames
The implement of `free-id-table' uses `identifier-binding'
to decide on a symbolic name as a key for each identifier,
but `identifier-binding' doesn't provide enough information
for local and top-level bindings. The new `identifier-binding-symbol'
function provides that information.

Closes PR 13911
2013-07-10 07:10:39 -06:00
Matthew Flatt
9cc50dc914 Makefile: make PKGS' not sticky by default, add again' target
More generally, `LINK_MODE' controls how the `PKGS' value is saved
or restored: "--save" saves the value (the default), "--restore"
uses a previously saved value (if any), and "" disables saving or
restoring.

The `again' target recurs to `in-place' with `LINK_MODE=--restore'.
2013-07-08 20:11:26 -06:00
Matthew Flatt
267ba4c72b fix some absolute paths in an in-place build 2013-07-08 20:01:05 -06:00
Matthew Flatt
36f7b7051e drop non-relative paths in procedure source locations
A path that is not relative to the enclosing file can show up
due to cross-module inlining. Package-based modules do not have
a good relative path to "collects", which creates trouble for
distributing compiled modules where, say, `map' was inlined.

It might be possible to keep the path in module-path-index form
so that a path can be constructed appropriately at run time, but
it's much simpler to just punt on function source locations in
this relatively rare case.
2013-07-08 12:24:16 -06:00
Matthew Flatt
e3c27b2737 fix `call-with-default-reading-parameterization'
The `read-accept-compiled' parameter is supposed to be #f.
2013-07-07 11:51:25 -06:00
Matthew Flatt
1a0312acc0 Package-database reading and related library improvements
The main result is that `path->selative-string/library' now generates
"<pkg>/..." strings.

To make that possible, minimal support for reading the
installed-package database moved to a new `pkg/path' library.

To make that possible and avoid poetntial problems from concurrent
reading and writing of the database file, `racket/file' now provides
`call-with-atomic-output-file', which implements the write-and-move
dance that CM uses for compiled bytcode (i.e., `with-compile-output').
The new function is used to write links and installed-package files.

Finally, `racket/base' provides the new function
`call-with-default-reading-parameterization', which is used to guard
various file `read's to make them consistent and avoid security holes.
2013-07-07 11:26:40 -06:00
Matthew Flatt
7ef5048961 `filesystem-change-evt' and use repairs 2013-07-07 08:12:43 -06:00
Matthew Flatt
22ab892143 minor Makefile and C fixes 2013-07-07 06:42:00 -06:00
Matthew Flatt
b8e20f5a3e use `filesystem-change-evt' and static roots to speed library search
Use `filesystem-change-evt' (where supported) to detect changes to
collection link files.

Add "static root" as a new kind of collection root directory in links
files. A static root directory is assumed to not change (in terms of
its collection subdirectories) as long as the links file itself does
not change.

Propagate the notion of static roots through `raco link' and `raco pkg
install'.

Change the `pkg-links' makefile target to install static links
instead of plain links.

The result of all of these changes is to cut 25%-33% of the
time for `racket -l racket', bringing it back in line with
the pre-package-reorganization time.
2013-07-07 06:42:00 -06:00
Matthew Flatt
3b0566ea0a add `filesystem-change-evt'
The `filesystem-change-evt' function takes a path to a file
or directory and returns an event that becomes ready when
the file or directory changes (conservatively, so false
positives are possible).

These events are supported on Linux, Mac OS X and other BSD
variants with kqueue(), and Windows.
2013-07-07 06:41:59 -06:00
Matthew Flatt
4266e606e3 fix GC bug
This is a variant of the bug fixed in
49fbca5b18,
where a GC-notification callback still
could cause problems in a GC during a finalization
callback.

(Bug found by running tests in GC-stress mode.)
2013-07-06 07:21:46 -06:00
Matthew Flatt
e3eed89b1d fix GC bug in FFI
A foreign procedure's data could get GCed before the procedure
was called, if the procedure is not otherwise reachable.

(Bug found by running tests in GC-stress mode.)
2013-07-06 07:19:42 -06:00
Matthew Flatt
2f637741e2 switch makefile's parallelism control to `JOB_OPTIONS'
Avoid potential collision with `PLT_SETUP_OPTIONS' as an environment
variable.
2013-07-05 12:09:09 -06:00
Matthew Flatt
a8ed2b1546 Add -j'/--jobs' <n> argument to `raco pkg install', etc.
Also, thread `PLT_SETUP_OPTIONS' though server and client build
(so that a `#:j' configuration works as intended).
2013-07-05 11:33:57 -06:00
Matthew Flatt
f98c56f722 fix exception handler inside links-reading code 2013-07-05 08:30:01 -06:00
Matthew Flatt
6a78219d5d fix some clang warnings
The "if (pi->unwind_info);" change might be a bug fix.
2013-07-05 08:30:00 -06:00
Matthew Flatt
fb052532c0 make in-place: keep non-default `PKGS' value in "racket/etc/link-pkgs.rktd"
This change makes a `PKGS=...' setting sticky for an in-place build via
`make', `make in-place', `make pkg-links', etc.
2013-07-05 08:30:00 -06:00
Sam Tobin-Hochstadt
14207682d3 Create info collection for "info.rkt" files. 2013-07-04 16:46:31 -04:00
Matthew Flatt
0d60486a32 GC: make place-message support work with GC stress mode 2013-07-04 14:25:18 -06:00
Matthew Flatt
b232f572a9 add missing GC traversal-function registration
Related to places and place messages.

(Bug found by running tests in GC-stress mode.)
2013-07-04 14:25:10 -06:00
Matthew Flatt
49fbca5b18 fix GC bug
GC during allocation of a pair, weak box, ephemeron, or
weak array went wrong if the GC-notification callback
allocated any of those kinds of things.

(Bug found by running tests in GC-stress mode.)
2013-07-04 14:20:44 -06:00
Matthew Flatt
bf175c5fb0 configure: add --enable-sdk6
To ensure that the Mac OS X 64-bit builds work on 10.6.
2013-07-04 06:53:08 -06:00
Matthew Flatt
9b4940d6a6 fix build on version change 2013-07-01 10:53:04 -06:00
Matthew Flatt
b12cdecb9f fixup for mzscheme' -> racket/base' conversion 2013-07-01 10:49:07 -06:00
Sam Tobin-Hochstadt
d54c1e4e49 Remove most uses of mzscheme in the core.
Remaining are:
 - parts of unit200 that Matthew plans to remove.
 - the `mzscheme` implementation itself.

The implementation of `mzscheme` has been moved
to the `mzscheme` collection (from the `racket` and
`scheme` collections). The `scheme/mzscheme`
language, which was undocumented, has been removed.

This is slightly backwards-incompatible, because
the `xform` handling of precompiled headers now
evaluates code in a `racket/base`-like namespace,
instead of in a `mzscheme`-like namespace.
2013-07-01 12:08:42 -04:00
Sam Tobin-Hochstadt
d0a0e31abc Fix uses of 'mzscheme' in comments. 2013-07-01 11:27:14 -04:00
Sam Tobin-Hochstadt
9f31b8bb30 Copy many fewer files for xform. 2013-07-01 11:27:14 -04:00
Robby Findler
d412afa426 removed unused variable 2013-06-29 10:33:37 -05:00
Matthew Flatt
04d5d9bd55 raco setup: add package-dependency checking
The new `--no-pkg-deps' or `-K' flag skips the check.

If a module in package X refers to a module in package Y, check that
package X declares a dependency on Y.  Note that package X must
specifically depend on Y --- not another package that at the moment
happens to declare a dependency on Y.

A new "base" package represents the content of the core (so that, if
the core shrinks, a new "base2" can represent the smaller core).
Most every package now needs a dependency on "base".

Sometimes, it makes sense for X to access Y when X declares a
dependency on Z, because Z promises to always depend on Y.  For
example, the "gui" package is defined to combne "gui-lib" and
"gui-doc", so it's appropriate to use the modules of "gui-lib" when
depending on "gui". A package's "info.rkt" can therefore define
`implies' as a subset of the dependencies listed in `deps', which
means that depending on the package implies a dependency on the listed
packages. (It's even possible for packages to mutually imply each
other, which is why the dependency checking code ends up with a
union-find.)

Dependency checking distinguishes between run-time dependencies and
build-time dependencies: anything listed in a ".dep" file is a build
dependency, at least. To imply a run-time dependency, a reference must
appear in a bytecode file's imports, and not in a subdirectory or
submodule that would be pruned for a binary package.

The `--fix-pkg-deps' flag attempts to automatically fix package
dependency declarations (i.e., modify a package's "info.rkt" file)
based on inferred dependencies.
2013-06-29 06:51:18 -06:00
Matthew Flatt
336d6ebc09 ditto on build repair (missed two places) 2013-06-29 06:19:09 -06:00
Matthew Flatt
0fdc7ec1a1 build repair for case that "etc" does not exist 2013-06-28 08:32:33 -06:00
Matthew Flatt
d450ee9707 link development-mode packages in a separate pkg database
Use `PKGS' with the top-level makefile to select packages for
a development-mode build. The default is "main-distribution",
which includes all packages in "pkgs".
2013-06-27 21:52:23 -06:00
Sam Tobin-Hochstadt
5ec754803e Fix some mzlib references. 2013-06-27 23:13:46 -04:00
Asumu Takikawa
42b5cfe8b2 Use racket/cmdline instead of mzlib/cmdline
This should fix the build
2013-06-27 22:17:15 -04:00
Matthew Flatt
53d68e2149 switch "config.rktd" dirs back to "collects"-relative
Making them "etc"-relative intercts badly with redirecting
a configuration to override just a few values --- such as
the links path, which is what `make core' needs.
2013-06-27 17:04:16 -06:00
Matthew Flatt
a5ce399dcf .gitignore fixups 2013-06-27 07:52:28 -06:00
Matthew Flatt
dc11090f6b repair interaction of taints and submodule expansion 2013-06-26 12:59:44 -07:00
Eli Barzilay
555c300c72 .gitignore cleanups
* Clarified bogosity of toplevel .gitignore (and other such files)

* Removed "doc/" in the toplevel file -- looks like this was some broken
  leftover, and it's dangerous for at least "scribble/doc" (which
  contains code).

* Collapse more common patterns into worksp instead of in each file.

* Use a trailing "/" for directories.

* racket/lib/collects/pkg/.gitignore looks like a leftover that is no
  longer needed.
2013-06-26 00:52:01 -04:00
Matthew Flatt
1ee88e2721 links file and pkg directrory location and search paths in "config.rktd"
Allow the location of the installation-specific "links.rktd" file to
be specified in "config.rktd", and also allow extra link files to
be provided.

Allow the same for package directories.

The main file/directory in each case corresponds to the file/directory
that can be modified by an installation-scope install. Extra files
or directories in a search path supports constant links and libraries
that are shared across installations --- like "/usr/lib" versus "/lib".
2013-06-25 22:46:23 +02:00
Matthew Flatt
2aed2138a6 raco link: "user" versus "shared" links
By default, `raco link' is now more like `raco pkg' in terms of scope,
and version-specific information doesn't pile up in a user's "links.rktd"
file.
2013-06-25 22:46:23 +02:00
Matthew Flatt
e51ac9cc61 fix `local-transformer-expand' with 'top-level context 2013-06-25 11:02:10 +02:00
Matthew Flatt
208c7d23a6 detect changes to "links.rktd" by content instead of timestamp
The 1-second granularity of filesystem timestamps is not
good enough to deetct changes to the file --- especially
when `raco pkg' installs links and runs `raco setup' (in
the same Rcket process), in which case a newly installed link
might not be detected.

The longer-term repair is probably to add file-changed
events to Racket (based on `inotify' and similar interfaces
provided by OSes).
2013-06-21 13:16:03 -06:00
Matthew Flatt
2ff05e2dda win32: fix destination of COPYING files in build 2013-06-20 07:21:46 -06:00
Matthew Flatt
fc79d744d1 win32: make "doc" dir for core install 2013-06-20 06:41:09 -06:00
Matthew Flatt
fa6f56fcb1 move release notes in appropriate packages
A collection declares release notes with a `release-notes' field in
"info.rkt".

The "doc" directory is now populated exclusively by generated content,
instead of having a static "release-notes" directory (and a "keep-dirs.rktd"
file to record the static directories).
2013-06-19 21:01:52 -06:00
Matthew Flatt
2e781d32f7 mzcom: set mzobj interface version to bogus value, for now
MzCOM and its build process need some sort of overhaul, but
it's on the backburner for now.
2013-06-19 21:01:52 -06:00
Matthew Flatt
8f2b08d0f5 win32: fix `win32-in-place' target on existing tree 2013-06-19 21:01:51 -06:00
Matthew Flatt
a3c7be1a9c win32: fix version info in executables
Also, remove the need for a cron job that patches the version
number in resource and manifest files.
2013-06-19 11:20:03 -06:00
Matthew Flatt
b2ebb0a28b reorganize into core plus packages
The "racket" directory contains a pared-back version of the
repository, roughly.

The "pkgs" directory everything else in the repository, but
organized into packages.
2013-06-19 09:01:37 -06:00