Commit Graph

114 Commits

Author SHA1 Message Date
Matthew Flatt
5630a3a1ca racket/sandbox: use `gui-available?' at sandbox creation
Previously, sandbox creation used `gui?', which is the result of
`gui-available?' at the time that `racket/sandbox' is instanited.
This change makes sandbox behavior less sensitive tothe order in
which modules `require'd into a program are intiantiated.

The change depends on a new `sandbox-make-namespace' default
function for `sandbox-namespace-specs'. The new function uses
either  `make-base-namespace' or `make-gui-namespace', depending
on whether the GUI library is available at that point.

A new `sandbox-gui-enabled' parameter can disable use of the
GUI library even if it is available.

The `gui?' binding is still exported for backward compatibility,
but it shouldn't be used anymore.
2012-03-02 07:47:16 -07:00
Matthew Flatt
645ca02e92 racket/draw: add `record-dc%' 2012-02-25 20:57:56 +00:00
Eli Barzilay
c007c345f9 A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00
Matthew Flatt
530b353798 racket/draw: change font face name interpretation again
Treat a "face" as a font description only if it has a comma,
otherwise go back to treating it as a family name.

This change fixes the problem of parsing "Times New Roman"
as "Times New, Roman".
2012-02-17 11:25:15 -07:00
Matthew Flatt
11de33d4ff remove MysterX DLL, replace with wrapper around `ffi/com'
The ActiveX part of MysterX is gone. The `ffi/com' re-imeplemtnation
provides only core COM support.

The "mysssink" DLL is still needed, and its source is still
in the tree, but it is downloaded in the same way as other
pre-built DLLs. The DLL no longer needs to be registered with
regsvr32.
2012-02-17 06:37:19 -07:00
Matthew Flatt
e5d8b9f049 add release note about `handle-evt' 2012-02-17 06:36:23 -07:00
Matthew Flatt
6cd2e3c71b add `prop:cpointer'
Extend `define-cstruct' to support #:property specs, which causes
the constructor and C->Racket coercsions to wrap the pointer in
a structure instance with the specified properties. Of course,
the wrapper structure has a `prop:cpointer' property so that the
wrapper can be used transparently as a C pointer.

Add missing tests and documentation for the id`->list', `list->'id,
id`->list*', and `list*->'id bindings created by `define-cstruct'.
2012-02-14 14:25:55 -07:00
Matthew Flatt
2493564a35 note re-export of racket/future 2012-02-14 14:25:55 -07:00
Matthew Flatt
937cdf51d7 change `current-write-relative-directory' to support more path conversions
In particular, allow a pair of a relative-to directory and a base
directory. Paths that syntactically extend the base directory are
recorded as relative to the relative-to directory (which must
syntactically extend the base directory).

The compilation manager now sets the parameter to a pair with
the base directory as the main collection directory, if the source
file's path extends that directory's path.

This generalization solves problems created by cross-module inlining,
where the source location of a procedure in bytecode can now be in a
different file than the enclosing module's file.

Also add a test that checks whether the build directory shows up
in any ".zo", ".dep", or documentation ".html" files.

Closes PR 12549
2012-02-10 06:17:18 -07:00
Matthew Flatt
13a5b0c623 change `ffi-lib' to not make library symbols global by default 2012-01-26 09:30:25 -05:00
Matthew Flatt
23010fc495 add #:fail' option to collection-file-path' and `collection-path'
Merge a variant to 5.2.1
2012-01-09 15:59:05 -07:00
Matthew Flatt
0d47cea848 collapse Racket HISTORY.txt for v5.2.1
Merge to 5.2.1
2012-01-09 15:59:05 -07:00
Matthew Flatt
7153fbd4d5 net/mime: allow any subtype, exns as exn:fail subtypes; doc fixes 2012-01-08 12:14:51 -07:00
Matthew Flatt
6c5c170565 racket/draw: add text-outline' to dc-path%' 2011-12-25 18:20:39 -06:00
Matthew Flatt
ee775c3cc3 intern strings, etc. only when making syntax objects, not in `read'
Rename `read-intern-literal' to `datum-intern-literal'.

Interning is needed only in `read-syntax' or `datum->syntax' to
set up the invariants that the bytecode compiler needs for cross-module
optimization. When `read'ing numbers from a data file, meanwhile,
interning slows things down a lot and doesn't seem worthwhile.
2011-12-14 16:03:44 -07:00
Matthew Flatt
287d5cedf5 add `pseudo-random-generator-vector?'
Also, adjust docs to clarify that `vector->pseudo-random-generator!'
can be used as a more complete seeding function.
2011-12-09 09:12:17 -07:00
Matthew Flatt
657be87c66 generalize gcd' and lcm' to work on rationals 2011-12-08 09:25:39 -07:00
Matthew Flatt
7e666b4b45 add stream' to racket/stream'
based on a pull request from Dan King
2011-12-08 09:25:34 -07:00
Matthew Flatt
99032a75d0 inline map', for-each', andmap', and ormap'
More generally, support a
 (define _id (begin 'compiler-hint:cross-module-inline _proc-expr))
hint, which is how the compiler determines that `map', etc., are
candidates for inlining.
2011-12-01 06:59:27 -07:00
Matthew Flatt
779b419c03 first cut at cross-module function inlining
Inline only trivial functions, such as `(empty? x)' -> `(null? x)',
to avoid generating too much code.

Bytecode includes a new `inline-variant' form, which records a
version of a function that is suitable for cross-module inlining.
Mostly, the variant let the run-time system to retain a copy
of the bytecode while JITting (and dropping the bytecode of)
the main variant, but it may be different from the main variant
in other ways that make it better for inlining (such a less loop
unrolling).
2011-11-30 07:39:36 -07:00
Matthew Flatt
1ac7e7e19d racket/class: add `dynamic-send' 2011-11-25 13:22:05 -07:00
Matthew Flatt
fe3b6ea003 at-exp, scribble: remove distinctness of @{}-introduced newlines 2011-11-24 09:17:34 -07:00
Matthew Flatt
6a99c93ebb add get-colors' to color-database<%>' 2011-11-22 20:17:58 -07:00
Matthew Flatt
c7464dcbd3 mzlib/pconvert: `add-make-prefix-to-constructor' parameter
Defaults to #f, which fixes constructor-style printing in `plai'
and `racket', and is set to #t for the HtDP languages.
2011-11-22 19:42:35 -07:00
Matthew Flatt
4c7727e7af add HISTORY note on read-intern-literal 2011-11-22 18:12:28 -07:00
Matthew Flatt
e44bd3f79d intern literal strings, byte strings, regexps, characters, and numbers 2011-11-22 08:54:37 -07:00
Matthew Flatt
3bffcae3c2 fix places & executable interaction
Added `module-predefined?' and changed `racket -k ...'
2011-11-15 18:42:21 -07:00
Matthew Flatt
5139de9cec add `port-closed-evt' 2011-11-10 10:01:57 -07:00
Eli Barzilay
cfc465932e Add a history note on the lazy change, make the TR history specify 5.2. 2011-11-03 17:09:58 -04:00
Matthew Flatt
ff839d1cda update Racket history for v5.2
Merge to 5.2
2011-10-18 06:46:30 -06:00
Matthew Flatt
8f0fa96d69 docs and release notes for `set-icon' change
Merge to 5.2
2011-10-09 09:45:42 -06:00
Matthew Flatt
ec380e34ed remove built-in reader and printing support for Honu
This is a backward-incompatible change, but I think it's
unlikely that any code depends on the removed bindings
or reader syntax.
2011-10-05 09:40:27 -06:00
Robby Findler
11a3d9b0ac add support for redirections to get-pure-port and add get-pure-port/headers 2011-10-03 13:21:30 -05:00
Matthew Flatt
ac8990d519 add date*' and exn:fail:syntax:unbound'
The `date*' structure type is an extension of `date' with
`nanosecond' and `time-zone-name' fields.

The `seconds->date' function now accepts a real and returns a
`date*'. The fractional part of its argument goes into the
`nanosecond' field.
2011-09-29 09:22:10 -06:00
Matthew Flatt
0ab6637539 remove obsolete and unused Racket-to-C compiler
Removes `raco ctool -e/-c', `mzc -e/-c', `compile-extensions',
`compile-extensions-to-c', `compile-c-extensions', `compiler/cffi',
`compiler/comp-unit', `compiler:inner^', and most options in
`compiler/option'.
2011-09-20 15:26:39 -06:00
Matthew Flatt
0197902309 add var-ref->mod-decl-insp' and switch cur-code-insp' uses
Macros and other tools that need syntax privilege used
`(current-code-inspector)' at the module top-level to try to
capture the right code inspector at load time. It's more
consistent to instead use the enclosing module's declaration-time
inspector, and `var-ref->mod-decl-insp' provides that. The
new function works only on references to anonymous variables,
which limits access to the inspector.

The real function name is longer, of course.
2011-09-20 13:50:36 -06:00
Kevin Tew
14014b3d36 Add place ffi, fd, and port changes to HISTORY.txt 2011-09-17 12:52:40 -06:00
Matthew Flatt
a233697f08 fix errortrace (required API changes), add `syntax-shift-phase-level'
Also fix a bug in the `module' expander and streamline lazy
visits.
2011-09-13 21:04:10 -06:00
Matthew Flatt
d3c56c9f13 generalized `begin-for-syntax' 2011-09-08 14:06:00 -06:00
Robby Findler
5e943709ef catch up on the release notes 2011-09-06 11:12:26 -05:00
Matthew Flatt
a7855e20a8 add `raco link'
includes a rewrite the "Module Basics" section of the Guide
2011-08-24 09:07:14 -06:00
Matthew Flatt
c908d77be1 history note 2011-08-20 11:10:35 -06:00
Matthew Flatt
71621bfd72 remove unsupported MDI styles and method
Closes PR 12042
2011-08-04 08:02:54 -06:00
Matthew Flatt
5ef147397c add missing items to the release notes
Merge to 5.1.2
2011-08-01 13:15:17 -06:00
Matthew Flatt
cc6f3f69ab add `port-set-next-location!'; make prompt read handler use it
Closes PR 12035
2011-07-10 08:36:47 -06:00
Matthew Flatt
b98e1b189a change semantic of internal definitions
and `letrec-syntaxes+values' --- allowing `let' in place
 of `letrec', which in turn lets the compiler optimize
 away location allocation
2011-07-08 14:00:41 -06:00
Matthew Flatt
fb5c62d9d7 update Racket release notes for v5.1.2
Merge to v5.1.2
2011-07-08 13:52:08 -06:00
Matthew Flatt
ba8f278fc5 note racket/function additions in HISTORY file 2011-07-04 16:41:26 -06:00
Matthew Flatt
4905d344dd slideshow/pict: add `rotate'
which requires two new fields in the `child' struct to support
 `lt-find', etc., when child picts are rotated
2011-07-04 16:26:09 -06:00
Matthew Flatt
1160d3df62 remove syntax certificates; add syntax taints 2011-06-29 19:15:48 -06:00