Commit Graph

1054 Commits

Author SHA1 Message Date
AlexKnauth
0b045ba77b Add syntax-local-match-introduce 2014-08-15 11:19:48 -04:00
Matthew Flatt
b2b00010e3 annotate and check packages for build and binary modes
If "p" is available as a source package, which is typical, then `raco
pkg install --binary p` would strip away the build dependencies of "p",
so that "p" would not install properly.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Closes PR 14635 and PR 14654
2014-07-25 09:07:46 +01:00
Matthew Flatt
ccda0e4abb macro expander: fix identifier-binding on fully expanded module
Fix the case of an identifier that is used as a binding in a module
but originated from a different module.
2014-07-25 07:21:06 +01:00
Asumu Takikawa
1bf54b06ee Revert label phase check, do correct thing
Thanks to Matthew for advice
2014-07-24 13:46:42 -04:00
Matthew Flatt
682c92554f net/http-client: don't send a 0-sized chunk that isn't a terminator 2014-07-24 16:40:34 +01:00
Scott Bell
29922c8a77 Send a final, empty chunk as required by RFC 2616 in http-conn-send! 2014-07-24 16:39:41 +01:00