Commit Graph

35878 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Matthew Flatt
f09c78b5f4 racket/unit: fix #:omit-constructor
Closes #1006, with a test case based on that report.
2015-08-31 16:22:12 -06:00
Blake Johnson
38317b87c2 setting the imported flag on toplevels 2015-08-31 16:13:08 -06:00
Matthew Flatt
9c0b6593b6 filesystem-change-evt: wide paths for Windows 2015-08-30 12:20:40 -06:00
Matthew Flatt
73e5313e1c fix starter icons for Windows cross-compile 2015-08-30 10:58:07 -06:00
Matthew Flatt
9aba66b608 makefile target for creating a native executable for cross compiling 2015-08-30 08:14:04 -06:00
Matthew Flatt
1b778bf34b fix GRacket paths for MinGW build 2015-08-30 07:01:10 -06:00
Matthew Flatt
ad4dcdeac0 cross-compilation support in the top-level makefile 2015-08-29 20:54:27 -06:00
Matthew Flatt
0e4d9a68af fix executable creation for cross-installation 2015-08-29 20:54:27 -06:00
Matthew Flatt
6beff43439 fix expand[-syntax[-to-top-form]] to add namespace's scope
Make `expand` more consistent with `eval` and with the old expander.
2015-08-29 11:44:33 -06:00
Matthew Flatt
94e5b1723b JIT simplification
Remove unused and confusing attempt to avoid runstack sync.
2015-08-28 20:24:46 -06:00
Matthew Flatt
ab6b58a476 avoid compiler warning 2015-08-28 20:21:29 -06:00
Gustavo Massaccesi
152787cb0e JIT: inline string=? and bytes=? 2015-08-28 20:57:39 -03:00
Matthew Flatt
79738d3bf6 fix no-places build 2015-08-28 17:27:17 -06:00
Matthew Flatt
bfb4d34715 fix memory accounting for useless channels
Fix accounting for a channel that is without a
peer for sending and/or receiving.
2015-08-28 17:05:38 -06:00
Matthew Flatt
b016246096 avoid interferences among places for memory accounting
All places uses the same accounting bit for objects
that are in the shared space. Each place also flips
the bit value it wants on each accounting, so if two
places are accounting at the same time with opposite
bit values and can reach the same objects, they can
interefere. It's even possible for them to race
through cycles and cause each other to loop forever.

Add a lock to ensure that there's only one bit value
in play for the shared space at any given time. A
place must stall if other places are busy with memory
accounting and an opposite bit value.
2015-08-28 17:05:37 -06:00