Commit Graph

38480 Commits

Author SHA1 Message Date
Vincent St-Amour
61f1c1406c Fix doc typo.
To be consistent with racket/tcp's docs.
2015-09-08 10:44:45 -05:00
Matthew Flatt
98b819edd4 enable some tests
Some tests that rely on a `main` submodule for places
need a `test` submodule, too.
2015-09-08 07:39:48 -06:00
Matthew Flatt
8394936ee0 collapse copied code in GC 2015-09-08 07:39:48 -06:00
Matthew Flatt
37c4ea4720 GC: adjust backpointer marking to not touch other page records
Also, free medium pages for a terminated place.
2015-09-08 07:39:48 -06:00
Matthew Flatt
9372862ee2 GC: move minor work to clean-up phase instead of setup 2015-09-08 07:39:48 -06:00
Matthew Flatt
7eee429705 avoid traversing table of JITted code names on every GC
The table as a tree is traversed to prune empty branches,
but the travseral is needed only toward branches that
have changed. Skipping the traversal can save several
milliseconds on each collection.
2015-09-08 07:39:48 -06:00
Matthew Flatt
c401d86bb3 streamline name handling in make-struct-type
Name handling formerly interned symbols along the
way to allocating a plain string, which takes effort
and causes changes to the symbol table, which forces
a minor GC to traverse the whole symbol table. Skip
unnecessary symbol-interning steps.
2015-09-08 07:39:48 -06:00
Matthew Flatt
0ab94dd3e4 force GC more appropriately on phantom bytes
When the number of bytes recorded via phantom bytes approaches memory
use at the last GC, force a garbage collection.
2015-09-08 07:39:48 -06:00
Gustavo Massaccesi
27791ebab7 Remove ignored call/cc
Reduce (call/cc (lambda (<ignored>) body ...)) to (begin body ...)
2015-09-08 09:13:44 -03:00
Vincent St-Amour
d705e928ac Add a mode argument to pretty-format.
... which controls whether it uses `print`, `write` or `display`.

Obsoletes most of `unstable/pretty`.
2015-09-07 15:46:58 -05:00
Matthew Flatt
ae3c87c106 fix "extensions" test to work when files are compiled 2015-09-07 12:02:02 -06:00
Matthew Flatt
796b0796f4 raco test: run configure-runtime submodule of module to test
Unless `-s` or `--submodule` is specified, and as long as each
test is run in its own place or process, require a `configure-runtime`
submodule of the specified module before running the module or its
`test` submodule.

For example, this change makes `raco test` run `htdp/bsl` tests
with printing configured correctly for `htdp/bsl`.
2015-09-07 11:59:15 -06:00
Matthew Flatt
3963f30070 document new configure-runtime behavior of raco test 2015-09-07 11:58:41 -06:00
Brian Lachance
e0f2d9c0d6 Fix make-contract example to show the correct contract violation
There was a duplicate quote around `given:' which caused a violation in
make-contract's internals.
2015-09-07 11:58:13 -05:00
Matthew Flatt
e1333d0616 fix compilation-top contract in docs
The associated change in the "zo-lib" package fixes #1038.
2015-09-07 08:28:52 -06:00
Matthew Flatt
7d60d6d885 fix contract on compilation-top field
A binding-name table has identifiers encoded as `stx`, not
actual identifiers.
2015-09-07 08:26:40 -06:00
Matthew Flatt
5ca752c92b fix problems with internal calls to syntax-track-origin 2015-09-07 08:22:21 -06:00
Matthew Flatt
c1ef6b999d fix documentation's contract for syntax-track-origin 2015-09-07 07:48:43 -06:00
Matthew Flatt
4cb74da76c add patch for Mac OS X build of Cairo
Pull in a patch to avoid CGFontGetGlyphPath, which is deprecated.
2015-09-06 17:18:35 -06:00
Matthew Flatt
8566c67b35 make syntax-object unmarshaling more accepting
Defend against certain bad encodings, but accept an encoding
that includes more sharing than the built-in marshaling
could create.
2015-09-06 16:37:31 -06:00
Matthew Flatt
9571b33f40 zo-marshal: add missing protect-quote
The `protect-quote` call is needed when the right-hand side of a
`set!` is a literal hash table, for example.
2015-09-06 16:07:35 -06:00
Spencer Florence
3018417249 added args checking to prefix functions 2015-09-06 15:28:53 -05:00
Matthew Flatt
079f46fbc1 adjust top-level handling for identifiers without #%top
Refine the changes in 16c198805b so that `(define id ... id ... )` at
the top level compiles more consistently when `id` is an identifier
whose lexical context does not include `#%top`.
2015-09-06 08:06:07 -06:00
Matthew Flatt
9c51370e51 repair extract-base-filename/ext and extract-base-filename/o 2015-09-05 17:59:44 -06:00
Matthew Flatt
06841bbaff doc typo and clarification 2015-09-05 17:59:19 -06:00
Matthew Flatt
6632070f75 repair test for new compilation-top field 2015-09-05 17:39:31 -06:00
Matthew Flatt
c3f876d2f7 fix bug in mashaling paths
The change in commit fb8e08a2ac could lose part of a relative path.
2015-09-05 14:09:38 -06:00
Matthew Flatt
89d99b92da update for 6.2.900.15 bytecode change
The `compilation-top` bytecode form has a new `binding-namess` field.
2015-09-05 13:13:38 -06:00
Matthew Flatt
16c198805b prevent compile from binding in the current namespace
When `compile` is used on a top-level definition, do not
create a binding in the current namespace, but arrange for
a suitable binding to be in place for the target namespace.

Closes #1036
2015-09-05 10:58:44 -06:00
Matthew Flatt
24592f78fc ffi/unsafe/objc: add support for blocks
Also add some functions for manipualting classes and objects.
2015-09-04 08:31:52 -06:00
Vincent St-Amour
053aae7b59 Prefix property name 2015-09-03 14:08:02 -05:00
Daniel Feltey
6e5d443d7d Rename syntax property to avoid a name suggesting it is only useful for Typed Racket 2015-09-03 14:05:49 -05:00
Daniel Feltey
dc19e9c9b2 Clarify syntax property further 2015-09-03 14:05:49 -05:00
Daniel Feltey
7b513e1103 Internal documentation for init-depend syntax property 2015-09-03 14:05:49 -05:00
Daniel Feltey
b3fe6bb778 Handle tags in case this syntax-property may have uses outside of Typed Racket 2015-09-03 14:05:49 -05:00
Daniel Feltey
9b7e1767dd Add syntax property with static init-depend information to compound-unit/infer results 2015-09-03 14:05:48 -05:00
Matthew Flatt
ddb683e1f2 unbreak compile-directory 2015-09-02 18:21:38 -06:00
Matthew Flatt
8ee717520f fix sync when resumed after a break exception
This repair adjusts the bug fix of commit 769ad3e98. That older commit
ensured that `sync/enable-break` doesn't both break and accept a
channel message or semaphore wait. But it effectively disables those
actions if the break is continued.

Instead of (partially!) ending the `sync` get out of semaphore
and channel queues so that no event can be selected during
the break, and then get back in line if the break is continued.
2015-09-02 18:21:38 -06:00
Matthew Flatt
322714f123 untar and unzip: reject paths that contain ".."
Also, for unzip, reject absolute paths.
2015-09-02 18:21:38 -06:00
Matthew Flatt
efe056f18d update documentation for preserved syntax-object source locations 2015-09-02 18:21:38 -06:00
Matthew Flatt
fb8e08a2ac adjust path encoding in bytecode and syntax-object sources
When a path is made relative for marshaling to bytecode, record
a list of byte strings in stead of a platform-specific relative
path.

For syntax-object source locations, convert any non-relative path to a
string that shows just the last couple of path elements preceded by
".../". This conversion avoids embedding absolute paths in bytecode,
but at the cost of some information. A more complete and consistent
solution would invove using a module-path index instead of a path, but
that would be a big change at several layers.
2015-09-02 18:21:38 -06:00
Matthew Flatt
2a542b3966 restore accidentally disabled tests 2015-09-02 18:20:53 -06:00
Matthew Flatt
c1d05fa694 update bytecode tools for syntax-object source locations 2015-09-02 18:09:16 -06:00
Matthew Flatt
a934bdf444 Adjust the bytecode format to accomodate syntax source locations
Make room in the bytecode format for source locations and 'paren-shape
property values for syntax objects. Saving source locations increases
bytecode size by about 10% on average.

Also, convert the internal representation of syntax properties to
use immutable hash tables, instead of lists.
2015-09-02 14:49:39 -06:00
Matthew Flatt
53821a4997 intern path values in bytecode 2015-09-01 15:54:41 -06:00
Matthew Flatt
929db29b67 add prop:expansion-contexts
The `prop:expansion-contexts` property can control the expansion
of a rename transformer in much the same that conditionals on
`(syntax-local-context)` can control the expansion of other
transformers.
2015-09-01 13:55:35 -06:00
Gustavo Massaccesi
c290de0f88 Fix typos 2015-09-01 11:46:41 -05:00
Daniel Feltey
4fefec6386 Add test case
Closes PR 15139
2015-09-01 11:46:40 -05:00
Daniel Feltey
450ea8236d Bug fix for calculating init-dependencies when subtyping is involved. 2015-09-01 11:46:40 -05:00
Robby Findler
13964c4141 add and use late-neg projections to the contract system
These avoid one layer of currying and are more efficient, getting
about a 1.3x speed up on this program:

 #lang racket/base
(module server racket/base
  (require racket/contract/base)
  (provide
   (contract-out
    [f (-> integer? boolean? char? void?)]))
  (define (f i b c) (void)))

(require (submod "." server))

(time
  (for ([x (in-range 10000000)])
    (f 1 #t #\x)))
2015-08-31 20:48:03 -05:00